svnno****@sourc*****
svnno****@sourc*****
2010年 1月 24日 (日) 19:24:33 JST
Revision: 800 http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=800 Author: rsk Date: 2010-01-24 19:24:33 +0900 (Sun, 24 Jan 2010) Log Message: ----------- expack: - æºå¸¯ã»iPhoneã¢ã¼ãã§ã¯ååæ¬ã®ä¸²ç¼ããã¼ã¯ãç縮ããããã«ããã - ãã¼ã¸ã§ã³ã¢ããå¤å®ã¨ç§»è¡ã¹ã¯ãªããé¢é£ã®ãã°ãä¿®æ£ã Modified Paths: -------------- p2ex/trunk/conf/conf.inc.php p2ex/trunk/conf/ip_iphone.php p2ex/trunk/edit_conf_user.php p2ex/trunk/lib/ShowThreadK.php p2ex/trunk/lib/bootstrap.php p2ex/trunk/lib/migrators/100120_0700.php -------------- next part -------------- Modified: p2ex/trunk/conf/conf.inc.php =================================================================== --- p2ex/trunk/conf/conf.inc.php 2010-01-23 15:04:30 UTC (rev 799) +++ p2ex/trunk/conf/conf.inc.php 2010-01-24 10:24:33 UTC (rev 800) @@ -51,11 +51,6 @@ // î{ÝèðÀs p2_init(); -// N[Abv -if (basename($_SERVER['SCRIPT_NAME']) != 'edit_conf_user.php') { - unset($conf_user_def, $conf_user_rules, $conf_user_rad, $conf_user_sel); -} - // E_NOTICE ¨æÑÃÙÌzñú»¯ $_conf['filtering'] = false; $hd = array('word' => null); @@ -72,7 +67,6 @@ global $MYSTYLE, $STYLE, $debug; global $skin, $skin_en, $skin_name, $skin_uniq; global $_conf, $_info_msg_ht, $_login, $_p2session; - global $conf_user_def, $conf_user_rules, $conf_user_rad, $conf_user_sel; // G[oÍÝè if (defined('E_DEPRECATED')) { @@ -269,6 +263,7 @@ // {{{ ÏÝè $preferences = array( + 'conf_user_file' => 'conf_user.srd.cgi', // [U[Ýèt@C (VACYhf[^) 'favita_brd' => 'p2_favita.brd', // ¨CÉ (brd) 'favlist_idx' => 'p2_favlist.idx', // ¨CÉX (idx) 'recent_idx' => 'p2_recent.idx', // ÅßÇñ¾X (idx) Modified: p2ex/trunk/conf/ip_iphone.php =================================================================== --- p2ex/trunk/conf/ip_iphone.php 2010-01-23 15:04:30 UTC (rev 799) +++ p2ex/trunk/conf/ip_iphone.php 2010-01-24 10:24:33 UTC (rev 800) @@ -2,13 +2,32 @@ /** * iPhoneÌ[gzXg³K\»ÆIPAhXÑæ + * + * 126.240.0.0/12 ð /16 ²Æɲ×ÄÝéÆ... + * 126.240.*.* -> pw126240*.0.tik.panda-world.ne.jp + * 126.241.*.* -> pw126241*.1.tik.panda-world.ne.jp + * 126.242.*.* -> ai126242*.tss.access-internet.ne.jp + * 126.243.*.* -> om126243*.openmobile.ne.jp + * 126.244.*.* -> pw126244*.4.tik.panda-world.ne.jp + * 126.245.*.* -> pw126245*.5.tik.panda-world.ne.jp + * 126.246.*.* -> pw126246*.6.tik.panda-world.ne.jp + * 126.247.*.* -> pw126247*.7.tik.panda-world.ne.jp + * 126.247.*.* -> pw126247*.7.tik.panda-world.ne.jp + * 126.248.*.* -> pw126248*.8.tss.panda-world.ne.jp + * 126.249.*.* -> pw126249*.9.tss.panda-world.ne.jp + * 126.250.*.* -> pw126250*.10.tss.panda-world.ne.jp + * 126.251.*.* -> pw126251*.11.tss.panda-world.ne.jp + * 126.252.*.* -> pw126252*.12.tss.panda-world.ne.jp + * 126.253.*.* -> pw126253*.13.tss.panda-world.ne.jp + * 126.254.*.* -> pw126254*.14.tss.panda-world.ne.jp + * 126.255.*.* -> pw126255*.15.tss.panda-world.ne.jp */ -$reghost = '/\\.(?:[0-9]|1[0-5])\\.tik\\.panda-world\\.ne\\.jp$/'; +$reghost = '/\\.panda-world\\.ne\\.jp$/'; $bands = array( - '126.240.0.0/12', // \tgoNBBª 126.0.0.0/8 ÈÌÅ - // iPhoneÉÀèÅ«È¢¨»ê è + '126.240.0.0/12', // \tgoNBBª 126.0.0.0/8 ðÁĨèA + // iPhoneÈOÌX}[gtHpÌÑæàÜÞ ); /* Modified: p2ex/trunk/edit_conf_user.php =================================================================== --- p2ex/trunk/edit_conf_user.php 2010-01-23 15:04:30 UTC (rev 799) +++ p2ex/trunk/edit_conf_user.php 2010-01-24 10:24:33 UTC (rev 800) @@ -4,7 +4,6 @@ */ require_once './conf/conf.inc.php'; -require_once P2_CONF_DIR . '/conf_user_def.inc.php'; $_login->authorize(); // [UFØ @@ -25,6 +24,8 @@ define('P2_EDIT_CONF_FILE_ADMIN', 1024); define('P2_EDIT_CONF_FILE_ADMIN_EX', 2048); +include P2_CONF_DIR . '/conf_user_def.inc.php'; + //===================================================================== // O //===================================================================== @@ -45,7 +46,7 @@ applyRules(); // |Xg³ê½l > »ÝÌl > ftHgl ÌÅVµ¢Ýèð쬷é - $conf_save = array('.' => P2_VERSION_ID); + $conf_save = array('.' => $_conf['p2expack']); foreach ($conf_user_def as $k => $v) { if (array_key_exists($k, $_POST['conf_edit'])) { $conf_save[$k] = $_POST['conf_edit'][$k]; Modified: p2ex/trunk/lib/ShowThreadK.php =================================================================== --- p2ex/trunk/lib/ShowThreadK.php 2010-01-23 15:04:30 UTC (rev 799) +++ p2ex/trunk/lib/ShowThreadK.php 2010-01-24 10:24:33 UTC (rev 800) @@ -17,8 +17,6 @@ static private $_spm_objects = array(); - public $BBS_NONAME_NAME = ''; - public $am_autong = false; // ©®AAªð·é©Û© public $aas_rotate = '90ñ]'; // AAS ñ]N¶ñ @@ -34,6 +32,9 @@ //private $_lineBreaksReplace; // A±·éüsÌu·¶ñ + private $_nanashiName = null; // ftHg̼O + private $_kushiYakiName = null; // BBQÉÄ©êÄ¢éƫ̼OÚª« + // }}} // {{{ constructor @@ -66,15 +67,21 @@ } $this->_url_handlers[] = 'plugin_linkURL'; - $this->BBS_NONAME_NAME = null; if (!$_conf['mobile.bbs_noname_name']) { $st = new SettingTxt($this->thread->host, $this->thread->bbs); $st->setSettingArray(); - if (!empty($st->setting_array['BBS_NONAME_NAME'])) { - $this->BBS_NONAME_NAME = $st->setting_array['BBS_NONAME_NAME']; + if (array_key_exists('BBS_NONAME_NAME', $st->setting_array)) { + $BBS_NONAME_NAME = $st->setting_array['BBS_NONAME_NAME']; + if (strlen($BBS_NONAME_NAME)) { + $this->_nanashiName = $BBS_NONAME_NAME; + } } } + if (P2Util::isHost2chs($aThread->host)) { + $this->_kushiYakiName = ' </b>[\{}@{}@{}-]<b> '; + } + if ($_conf['mobile.date_zerosuppress']) { $this->_dateIdPattern = '~^(?:' . date('Y|y') . ')/(?:0(\\d)|(\\d\\d))?(?:(/)0)?~'; $this->_dateIdReplace = '$1$2$3'; @@ -154,11 +161,6 @@ $idstr = null; } - // ftHg̼OƯ¶ÈçȪ - if ($name === $this->BBS_NONAME_NAME) { - $name = ''; - } - // {{{ tB^O if (isset($_REQUEST['word']) && strlen($_REQUEST['word']) > 0) { @@ -182,7 +184,6 @@ $res_id = "r{$i}"; } - // NG Ú[ñ`FbN $nong = !empty($_GET['nong']); $ng_type = $this->_ngAbornCheck($i, strip_tags($name), $mail, $date_id, $id, $msg, $nong, $ng_info); @@ -203,8 +204,22 @@ $ngaborns_body_hits = self::$_ngaborns_body_hits; } - // {{{ útEIDð²® + // {{{ ¼OÆútEIDð²® + // øÄ«}[NðZk + if ($this->_kushiYakiName !== null && strpos($name, $this->_kushiYakiName) === 0) { + $name = substr($name, strlen($this->_kushiYakiName)); + // ftHg̼OÍȪ + if ($name === $this->_nanashiName) { + $name = '[ø]'; + } else { + $name = '[ø]' . $name; + } + // ftHg̼OƯ¶ÈçȪ + } elseif ($name === $this->_nanashiName) { + $name = ''; + } + // »ÝÌNÍȪJbg·éBúÌæª0àJbgB $date_id = preg_replace($this->_dateIdPattern, $this->_dateIdReplace, $date_id); Modified: p2ex/trunk/lib/bootstrap.php =================================================================== --- p2ex/trunk/lib/bootstrap.php 2010-01-23 15:04:30 UTC (rev 799) +++ p2ex/trunk/lib/bootstrap.php 2010-01-24 10:24:33 UTC (rev 800) @@ -8,9 +8,6 @@ // {{{ [U[Ýè Ç -// [U[Ýèt@C -$_conf['conf_user_file'] = $_conf['pref_dir'] . '/conf_user.srd.cgi'; - // [U[Ýèª êÎÇÝÞ if (file_exists($_conf['conf_user_file'])) { if ($cont = file_get_contents($_conf['conf_user_file'])) { @@ -48,26 +45,28 @@ // ftHgÝèðÇÝÝA[U[ÝèÆÆàÉ}[W include P2_CONF_DIR . '/conf_user_def.inc.php'; $_conf = array_merge($_conf, $conf_user_def, $conf_user); - $creae_config_cache = true; + $save_conf_user = true; } else { // LbV ³êÄ¢½[U[Ýèð}[W $_conf = array_merge($_conf, $conf_user); - $creae_config_cache = false; + $save_conf_user = false; } } else { // ftHgÝèðÇÝÝA}[W include P2_CONF_DIR . '/conf_user_def.inc.php'; $_conf = array_merge($_conf, $conf_user_def); - $creae_config_cache = true; + $save_conf_user = true; } -// Vµ¢[U[ÝèðLbV -if ($creae_config_cache) { - $conf_user = array('.' => $_conf['p2expack']); +// Vµ¢[U[ÝèðVACYµÄÛ¶ +if ($save_conf_user) { + $conf_save = array('.' => $_conf['p2expack']); foreach ($conf_user_def as $k => $v) { - $conf_user[$k] = $_conf[$k]; + $conf_save[$k] = $_conf[$k]; } - $cont = serialize($conf_user); + + $cont = serialize($conf_save); + FileCtl::make_datafile($_conf['conf_user_file'], $_conf['conf_user_perm']); if (FileCtl::file_write_contents($_conf['conf_user_file'], $cont) === false) { $dispname = '$_conf[\'pref_dir\']/' . basename($_conf['conf_user_file']); p2die("[U[Ýèt@C {$dispname} É«ßܹñŵ½B"); Modified: p2ex/trunk/lib/migrators/100120_0700.php =================================================================== --- p2ex/trunk/lib/migrators/100120_0700.php 2010-01-23 15:04:30 UTC (rev 799) +++ p2ex/trunk/lib/migrators/100120_0700.php 2010-01-24 10:24:33 UTC (rev 800) @@ -92,6 +92,9 @@ if ($oldKvs->getTableName() != $newKvs->getTableName()) { $oldKvs->prepare('DROP TABLE $__table')->execute(); } + + // vyA[hXe[ggðjü·é½ßÉ optimize() + $newKvs->optimize(); } // }}}