Changeset 18579 for branches/comu-ver2


Ignore:
Timestamp:
2010/02/23 20:04:35 (14 years ago)
Author:
shutta
Message:

#557 の続き。
 http://xoops.ec-cube.net/modules/newbb/viewtopic.php?topic_id=5456&forum=9
での話題を受けて、メールチェックをRFC準拠にするか選択できるように変更。
定数RFC_COMPLIANT_EMAIL_CHECK を追加。

Location:
branches/comu-ver2
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/SC_CheckError.php

    r18467 r18579  
    532532        $addr_spec     = "${local_part}[@]$domain"; 
    533533 
    534         $regexp = "/\A${addr_spec}\z/"; 
     534        $dot_atom_loose   = "$atext+(?:[.]|$atext)*"; 
     535        $local_part_loose = "(?:$dot_atom_loose|$quoted_string)"; 
     536        $addr_spec_loose  = "${local_part_loose}[@]$domain"; 
     537 
     538        if (RFC_COMPLIANT_EMAIL_CHECK) { 
     539            $regexp = "/\A${addr_spec}\z/"; 
     540        } else { 
     541            // 携帯メールアドレス用に、..や.@を許容する。 
     542            $regexp = "/\A${addr_spec_loose}\z/"; 
     543        } 
    535544 
    536545        if(strlen($this->arrParam[$value[1]]) > 0 && !preg_match($regexp, $this->arrParam[$value[1]])) { 
  • branches/comu-ver2/data/mtb_constants_init.php

    r18570 r18579  
    613613/** プラグイン URL */ 
    614614define('PLUGIN_URL', USER_URL . PLUGIN_DIR); 
     615/** EメールアドレスチェックをRFC準拠にするか(true:準拠する、false:準拠しない) */ 
     616define('RFC_COMPLIANT_EMAIL_CHECK', false); 
    615617?> 
  • branches/comu-ver2/html/install/sql/insert_data.sql

    r18570 r18579  
    10391039INSERT INTO mtb_constants VALUES ('CAMPAIGN_TEMPLATE_ACTIVE','"active/"',319,'キャンペーン関連'); 
    10401040INSERT INTO mtb_constants VALUES ('CAMPAIGN_TEMPLATE_END','"end/"',320,'キャンペーン関連'); 
     1041INSERT INTO mtb_constants VALUES ('RFC_COMPLIANT_EMAIL_CHECK', 'false', 321, 'EメールアドレスチェックをRFC準拠にするか(true:準拠する、false:準拠しない)'); 
    10411042INSERT INTO mtb_constants VALUES ('MOBILE_TEMPLATE_DIR', 'TEMPLATE_DIR . "mobile/"', 400,'SMARTYテンプレート(mobile)'); 
    10421043INSERT INTO mtb_constants VALUES ('MOBILE_COMPILE_DIR', 'COMPILE_DIR . "mobile/"', 401,'SMARTYコンパイル(mobile)'); 
Note: See TracChangeset for help on using the changeset viewer.