svnno****@sourc*****
svnno****@sourc*****
2010年 1月 19日 (火) 05:23:38 JST
Revision: 794 http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=794 Author: rsk Date: 2010-01-19 05:23:38 +0900 (Tue, 19 Jan 2010) Log Message: ----------- expack: - æ¿åãã¹ã¬ã¿ã¤ãã«çãGETã¡ã½ããã§åã渡ãããããã®å¤æã« UrlSafeBase64::encode() ã使ãããã«ããã - æºå¸¯ç¨ã®æ°çã¾ã¨ãèªã¿ãã£ãã·ã¥ã®ä¸è¦§è¡¨ç¤ºãã³ã³ãã¯ãã«ããã Modified Paths: -------------- p2ex/trunk/edit_conf_user.php p2ex/trunk/editfavita.php p2ex/trunk/editpref.php p2ex/trunk/editrss.php p2ex/trunk/httpcmd.php p2ex/trunk/info.php p2ex/trunk/info_js.php p2ex/trunk/info_sp.php p2ex/trunk/lib/BrdMenuIta.php p2ex/trunk/lib/ShowBrdMenuK.php p2ex/trunk/lib/ShowBrdMenuPc.php p2ex/trunk/lib/ShowThreadK.php p2ex/trunk/lib/ShowThreadPc.php p2ex/trunk/lib/expack/rss/menu.inc.php p2ex/trunk/lib/expack/rss/setrss.inc.php p2ex/trunk/lib/expack/rss/subject.inc.php p2ex/trunk/lib/expack/tgrep/view.inc.php p2ex/trunk/lib/expack/tgrep/view_k.inc.php p2ex/trunk/lib/expack/tgrep/view_x.inc.php p2ex/trunk/lib/menu_iphone.inc.php p2ex/trunk/lib/read_footer.inc.php p2ex/trunk/lib/read_header.inc.php p2ex/trunk/lib/read_header_k.inc.php p2ex/trunk/lib/sb_print_k.inc.php p2ex/trunk/lib/setfavita.inc.php p2ex/trunk/post.php p2ex/trunk/post_form.php p2ex/trunk/read_copy_k.php p2ex/trunk/read_filter.php p2ex/trunk/read_filter_k.php p2ex/trunk/read_new.php p2ex/trunk/read_new_k.php p2ex/trunk/subject.php -------------- next part -------------- Modified: p2ex/trunk/edit_conf_user.php =================================================================== --- p2ex/trunk/edit_conf_user.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/edit_conf_user.php 2010-01-18 20:23:38 UTC (rev 794) @@ -87,11 +87,11 @@ if ($_conf['ktai']) { if (isset($_POST['edit_conf_user_group_en'])) { - $selected_group = base64_decode($_POST['edit_conf_user_group_en']); + $selected_group = UrlSafeBase64::decode($_POST['edit_conf_user_group_en']); } elseif (isset($_POST['edit_conf_user_group'])) { $selected_group = $_POST['edit_conf_user_group']; } elseif (isset($_GET['edit_conf_user_group_en'])) { - $selected_group = base64_decode($_GET['edit_conf_user_group_en']); + $selected_group = UrlSafeBase64::decode($_GET['edit_conf_user_group_en']); } elseif (isset($_GET['edit_conf_user_group'])) { $selected_group = $_GET['edit_conf_user_group']; } else { @@ -678,7 +678,7 @@ // gÑp\¦ } else { if (!empty($selected_group)) { - $group_en = htmlspecialchars(base64_encode($selected_group)); + $group_en = UrlSafeBase64::encode($selected_group); echo "<input type=\"hidden\" name=\"edit_conf_user_group_en\" value=\"{$group_en}\">"; echo $htm['form_submit']; } @@ -709,7 +709,7 @@ } } $group_ht = htmlspecialchars($groupname, ENT_QUOTES); - $group_en = htmlspecialchars(base64_encode($groupname)); + $group_en = UrlSafeBase64::encode($groupname); $selected = ($selected_group == $groupname) ? ' selected' : ''; echo "<option value=\"{$group_en}\"{$selected}>{$group_ht}</option>"; } Modified: p2ex/trunk/editfavita.php =================================================================== --- p2ex/trunk/editfavita.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/editfavita.php 2010-01-18 20:23:38 UTC (rev 794) @@ -116,7 +116,7 @@ if (preg_match("/^\t?(.+?)\t(.+?)\t(.+?)\$/", $l, $matches)) { $id = "li{$i}"; $okini_itas[$id]['itaj'] = $itaj = rtrim($matches[3]); - $okini_itas[$id]['itaj_en'] = $itaj_en = base64_encode($itaj); + $okini_itas[$id]['itaj_en'] = $itaj_en = UrlSafeBase64::encode($itaj); $okini_itas[$id]['host'] = $host = $matches[1]; $okini_itas[$id]['bbs'] = $bbs = $matches[2]; $okini_itas[$id]['itaj_view'] = htmlspecialchars($itaj); @@ -285,7 +285,7 @@ foreach ($lines as $l) { if (preg_match('/^\t?(.+?)\t(.+?)\t(.+?)$/', rtrim($l), $matches)) { $itaj = rtrim($matches[3]); - $itaj_en = rawurlencode(base64_encode($itaj)); + $itaj_en = UrlSafeBase64::encode($itaj); $host = $matches[1]; $bbs = $matches[2]; $itaj_view = htmlspecialchars($itaj, ENT_QUOTES); Modified: p2ex/trunk/editpref.php =================================================================== --- p2ex/trunk/editpref.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/editpref.php 2010-01-18 20:23:38 UTC (rev 794) @@ -376,13 +376,11 @@ } else { echo "<tr><td colspan=\"2\">\n"; echo "<fieldset>\n<legend>V ÜÆßÇÝLbV </legend>\n"; + echo "<ul id=\"matome_cache\">\n"; } - echo "<ul id=\"matome_cache\">\n"; - foreach ($matome_cache_list as $cache_key => $cache_info) { - echo '<li>'; - + // PCEgѤÊÏ $i++; $ckey = substr($cache_key, $ckeyprefixlen); $clink = 'read_new_cache.php?ckey=' . rawurlencode($ckey) . $_conf['k_at_a']; @@ -394,9 +392,16 @@ $cnumthreads = count($cache_info['threads']); if ($_conf['ktai']) { - $cdate = date('y/m/d G:i', $cache_info['time']); - echo "{$cdate}<br><a href=\"{$clink}\">{$ctitle}</a>"; + // LbV ÖÌNAgÑp + if ($_conf['iphone']) { + $cdate = date('y/m/d H:i', $cache_info['time']); + echo "<p>{$cdate} [<a href=\"{$clink}\">{$ctitle}</a>]</p>"; + } else { + $cdate = date('y/m/d G:i', $cache_info['time']); + echo "<p>{$cdate}<br>[<a href=\"{$clink}\">{$ctitle}</a>]</p>"; + } } else { + // LbV ÖÌNAPCp $cid = 'matome_cache_meta' . $i; $cdate = date('Y/m/d H:i:s', $cache_info['time']); if ($cnumthreads) { @@ -405,15 +410,16 @@ } else { $cpopup_at = ''; } - echo "<span class=\"matome_cache_date\">{$cdate}</span> "; + echo "<li><span class=\"matome_cache_date\">{$cdate}</span> "; echo "[<a href=\"{$clink}\" target=\"read\"{$cpopup_at}>{$ctitle}</a>]"; if ($cnumthreads) { echo "<div class=\"popup_element\" id=\"{$cid}\"{$cpopup_at}>"; } } - if ($cnumthreads) { - if ($_conf['ktai']) { + // ÜÆßÇÝÉÜÜêéeXbhÖÌN + if ($cnumthreads && (!$_conf['ktai'] || $_conf['iphone'])) { + if ($_conf['iphone']) { $ctarget_at = ''; } else { $ctarget_at = ' target="read"'; @@ -430,17 +436,20 @@ echo "<li><a href=\"{$cthreadlink}\"{$ctarget_at}>{$cthread['title']}</a></li>"; } echo '</ul>'; + } - if (!$_conf['ktai']) { + // ¶^OAPCp + if (!$_conf['ktai']) { + if ($cnumthreads) { echo '</div>'; } + echo "</li>\n"; } - - echo "</li>\n"; } - echo "</ul>\n"; + // ¶^OAPCp if (!$_conf['ktai']) { + echo "</ul>\n"; echo "</fieldset>\n"; echo "</td></tr>\n"; } Modified: p2ex/trunk/editrss.php =================================================================== --- p2ex/trunk/editrss.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/editrss.php 2010-01-18 20:23:38 UTC (rev 794) @@ -126,7 +126,7 @@ $site = $p[0]; $xml = $p[1]; $atom = !empty($p[2]) ? '1' : '0'; - $site_en = base64_encode($site); + $site_en = UrlSafeBase64::encode($site); $myrss["li{$i}"] = array( 'site' => $site, 'site_en' => $site_en, @@ -311,7 +311,7 @@ $type_ht = 'RSS'; $cngtype_ht = '&setrss=atom'; } - $site_ht = '&site_en=' . rawurlencode(base64_encode($site)); + $site_ht = '&site_en=' . UrlSafeBase64::encode($site); echo <<<EOP <tr> <td><a href="{$editrss_php_ht}?xml={$xml_en}&setrss=0" class="fav"></a></td> Modified: p2ex/trunk/httpcmd.php =================================================================== --- p2ex/trunk/httpcmd.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/httpcmd.php 2010-01-18 20:23:38 UTC (rev 794) @@ -77,7 +77,7 @@ include P2_LIB_DIR . '/setfavita.inc.php'; } if (isset($_REQUEST['itaj_en'])) { - $itaj = base64_decode($_REQUEST['itaj_en']); + $itaj = UrlSafeBase64::decode($_REQUEST['itaj_en']); } elseif (isset($_REQUEST['itaj'])) { $itaj = $_REQUEST['itaj']; } else { @@ -105,7 +105,7 @@ include P2_LIB_DIR . '/setfav.inc.php'; } if (isset($_REQUEST['ttitle_en'])) { - $ttitle = base64_decode($_REQUEST['ttitle_en']); + $ttitle = UrlSafeBase64::decode($_REQUEST['ttitle_en']); } elseif (isset($_REQUEST['ttitle'])) { $ttitle = $_REQUEST['ttitle']; } else { @@ -133,7 +133,7 @@ include P2_LIB_DIR . '/setpalace.inc.php'; } if (isset($_REQUEST['ttitle_en'])) { - $ttitle = base64_decode($_REQUEST['ttitle_en']); + $ttitle = UrlSafeBase64::decode($_REQUEST['ttitle_en']); } elseif (isset($_REQUEST['ttitle'])) { $ttitle = $_REQUEST['ttitle']; } else { @@ -195,7 +195,7 @@ } $set = (bool)$_REQUEST['bookmark']; if (isset($_REQUEST['ttitle_en'])) { - $ttitle = base64_decode($_REQUEST['ttitle_en']); + $ttitle = UrlSafeBase64::decode($_REQUEST['ttitle_en']); } elseif (isset($_REQUEST['ttitle'])) { $ttitle = $_REQUEST['ttitle']; } else { Modified: p2ex/trunk/info.php =================================================================== --- p2ex/trunk/info.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/info.php 2010-01-18 20:23:38 UTC (rev 794) @@ -77,7 +77,7 @@ if (!function_exists('setFav')) { include P2_LIB_DIR . '/setfav.inc.php'; } - $ttitle = is_string($ttitle_en) ? base64_decode($ttitle_en) : null; + $ttitle = is_string($ttitle_en) ? UrlSafeBase64::decode($ttitle_en) : null; if (isset($_GET['setnum'])) { setFav($host, $bbs, $key, $_GET['setfav'], $ttitle, $_GET['setnum']); } else { @@ -121,19 +121,19 @@ if (!$aThread->ttitle) { if (isset($ttitle_en)) { - $aThread->setTtitle(base64_decode($ttitle_en)); + $aThread->setTtitle(UrlSafeBase64::decode($ttitle_en)); } else { $aThread->setTitleFromLocal(); } } if (!$ttitle_en) { if ($aThread->ttitle) { - $ttitle_en = base64_encode($aThread->ttitle); + $ttitle_en = UrlSafeBase64::encode($aThread->ttitle); //$ttitle_urlen = rawurlencode($ttitle_en); } } if ($ttitle_en) { - $ttitle_en_q = '&ttitle_en=' . rawurlencode($ttitle_en); + $ttitle_en_q = '&ttitle_en=' . $ttitle_en; } else { $ttitle_en_q = ''; } Modified: p2ex/trunk/info_js.php =================================================================== --- p2ex/trunk/info_js.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/info_js.php 2010-01-18 20:23:38 UTC (rev 794) @@ -45,7 +45,7 @@ $itaj = P2Util::getItaName($host, $bbs); if (!$itaj) { if (isset($_GET['itaj_en'])) { - $itaj = base64_decode($_GET['itaj_en']); + $itaj = UrlSafeBase64::decode($_GET['itaj_en']); } else { $itaj = $bbs; } @@ -135,7 +135,7 @@ $aThread->itaj = P2Util::getItaName($host, $bbs); if (!$aThread->itaj) { if (isset($_GET['itaj_en'])) { - $aThread->itaj = base64_decode($_GET['itaj_en']); + $aThread->itaj = UrlSafeBase64::decode($_GET['itaj_en']); } else { $aThread->itaj = $bbs; } @@ -145,7 +145,7 @@ // X^Cgðæ¾ if (!$aThread->ttitle) { if (isset($_GET['ttitle_en'])) { - $aThread->setTtitle(base64_decode($_GET['ttitle_en'])); + $aThread->setTtitle(UrlSafeBase64::decode($_GET['ttitle_en'])); } else { $aThread->setTitleFromLocal(); } Modified: p2ex/trunk/info_sp.php =================================================================== --- p2ex/trunk/info_sp.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/info_sp.php 2010-01-18 20:23:38 UTC (rev 794) @@ -21,7 +21,7 @@ if (isset($_GET['aborn_str_en'])) { $aborn_str_en = $_GET['aborn_str_en']; - $aborn_str = base64_decode($aborn_str_en); + $aborn_str = UrlSafeBase64::decode($aborn_str_en); } elseif (isset($_GET['aborn_str'])) { $aborn_str = $_GET['aborn_str']; } @@ -34,7 +34,7 @@ $itaj = $bbs; } -$ttitle_name = is_string($ttitle_en) ? base64_decode($ttitle_en) : ''; +$ttitle_name = is_string($ttitle_en) ? UrlSafeBase64::decode($ttitle_en) : ''; $thread_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}{$_conf['k_at_a']}"; @@ -84,7 +84,7 @@ } if (!is_string($ttitle_en)) { $onear = $aThread->explodeDatLine($aThread->datlines[0]); - $_GET['ttitle_en'] = $ttitle_en = base64_encode($ttitle_name = $onear[4]); + $_GET['ttitle_en'] = $ttitle_en = UrlSafeBase64::encode($ttitle_name = $onear[4]); } } @@ -133,7 +133,7 @@ } else { $aborn_str = $host . '/' . $bbs . '/' . $key . '/' . $resnum; $msg = '<b>' . $aborn_str . '</b> ð Ú[ñµÄæ뵢ŷ©H'; - $aborn_str_en = base64_encode($aborn_str); + $aborn_str_en = UrlSafeBase64::encode($aborn_str); } $edit_value = ' Ú[ñXÒW'; break; @@ -143,7 +143,7 @@ $msg = ' Ú[ñ[hi¼OjÉ <b>' . $aborn_str . '</b> ðo^µÜµ½B'; } elseif ($resar[0] != "") { $msg = ' Ú[ñ[hi¼OjÉ <b>' . $resar[0] . '</b> ðo^µÄæ뵢ŷ©H'; - $aborn_str_en = base64_encode($resar[0]); + $aborn_str_en = UrlSafeBase64::encode($resar[0]); } $edit_value = ' Ú[ñ[hÒWF¼O'; break; @@ -153,7 +153,7 @@ $msg = ' Ú[ñ[hi[jÉ <b>' . $aborn_str . '</b> ðo^µÜµ½B'; } elseif ($resar[1] != "") { $msg = ' Ú[ñ[hi[jÉ <b>' . $resar[1] . '</b> ðo^µÄæ뵢ŷ©H'; - $aborn_str_en = base64_encode($resar[1]); + $aborn_str_en = UrlSafeBase64::encode($resar[1]); } $edit_value = ' Ú[ñ[hÒWF['; break; @@ -172,7 +172,7 @@ $msg = ' Ú[ñ[hiIDjÉ <b>' . $aborn_str . '</b> ðo^µÜµ½B'; } elseif ($aborn_id != "") { $msg = ' Ú[ñ[hiIDjÉ <b>' . $aborn_id . '</b> ðo^µÄæ뵢ŷ©H'; - $aborn_str_en = base64_encode($aborn_id); + $aborn_str_en = UrlSafeBase64::encode($aborn_id); } $edit_value = ' Ú[ñ[hÒWFID'; break; @@ -182,7 +182,7 @@ $msg = 'NG[hi¼OjÉ <b>' . $aborn_str . '</b> ðo^µÜµ½B'; } elseif ($resar[0] != "") { $msg = 'NG[hi¼OjÉ <b>' . $resar[0] . '</b> ðo^µÄæ뵢ŷ©H'; - $aborn_str_en = base64_encode($resar[0]); + $aborn_str_en = UrlSafeBase64::encode($resar[0]); } $edit_value = 'NG[hÒWF¼O'; break; @@ -192,7 +192,7 @@ $msg = 'NG[hi[jÉ <b>' . $aborn_str . '</b> ðo^µÜµ½B'; } elseif ($resar[1] != "") { $msg = 'NG[hi[jÉ <b>' . $resar[1] . '</b> ðo^µÄæ뵢ŷ©H'; - $aborn_str_en = base64_encode($resar[1]); + $aborn_str_en = UrlSafeBase64::encode($resar[1]); } $edit_value = 'NG[hÒWF['; break; @@ -211,7 +211,7 @@ $msg = 'NG[hiIDjÉ <b>' . $aborn_str . '</b> ðo^µÜµ½B'; } elseif ($aborn_id != "") { $msg = 'NG[hiIDjÉ <b>' . $aborn_id . '</b> ðo^µÄæ뵢ŷ©H'; - $aborn_str_en = base64_encode($aborn_id); + $aborn_str_en = UrlSafeBase64::encode($aborn_id); } $edit_value = 'NG[hÒWFID'; break; Modified: p2ex/trunk/lib/BrdMenuIta.php =================================================================== --- p2ex/trunk/lib/BrdMenuIta.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/BrdMenuIta.php 2010-01-18 20:23:38 UTC (rev 794) @@ -21,7 +21,7 @@ public function setItaj($itaj) { $this->itaj = $itaj; - $this->itaj_en = rawurlencode(base64_encode($this->itaj)); + $this->itaj_en = UrlSafeBase64::encode($this->itaj); $this->itaj_ht = htmlspecialchars($this->itaj, ENT_QUOTES); } Modified: p2ex/trunk/lib/ShowBrdMenuK.php =================================================================== --- p2ex/trunk/lib/ShowBrdMenuK.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/ShowBrdMenuK.php 2010-01-18 20:23:38 UTC (rev 794) @@ -226,7 +226,7 @@ if (preg_match("/^\t?(.+)\t(.+)\t(.+)\$/", $l, $matches)) { $itaj = rtrim($matches[3]); $itaj_view = htmlspecialchars($itaj, ENT_QUOTES); - $itaj_en = rawurlencode(base64_encode($itaj)); + $itaj_en = UrlSafeBase64::encode($itaj); if ($i <= 9) { $accesskey_at = $_conf['k_accesskey_at'][$i]; $accesskey_st = $_conf['k_accesskey_st'][$i]; Modified: p2ex/trunk/lib/ShowBrdMenuPc.php =================================================================== --- p2ex/trunk/lib/ShowBrdMenuPc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/ShowBrdMenuPc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -121,7 +121,7 @@ foreach ($favitas as $favita) { extract($favita); $itaj_view = htmlspecialchars($itaj, ENT_QUOTES); - $itaj_en = rawurlencode(base64_encode($itaj)); + $itaj_en = UrlSafeBase64::encode($itaj); $itaj_js = addslashes($itaj_view); $p_htm['star'] = <<<EOP Modified: p2ex/trunk/lib/ShowThreadK.php =================================================================== --- p2ex/trunk/lib/ShowThreadK.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/ShowThreadK.php 2010-01-18 20:23:38 UTC (rev 794) @@ -540,7 +540,7 @@ return $retry ? self::$_spm_objects[$this->spmObjName] : ''; } - $ttitle_en = rawurlencode(base64_encode($this->thread->ttitle)); + $ttitle_en = UrlSafeBase64::encode($this->thread->ttitle); $motothre_url = $this->thread->getMotoThread(); $motothre_url = substr($motothre_url, 0, strlen($this->thread->ls) * -1); Modified: p2ex/trunk/lib/ShowThreadPc.php =================================================================== --- p2ex/trunk/lib/ShowThreadPc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/ShowThreadPc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -928,7 +928,7 @@ return $retry ? self::$_spm_objects[$this->spmObjName] : ''; } - $ttitle_en = rawurlencode(base64_encode($this->thread->ttitle)); + $ttitle_en = UrlSafeBase64::encode($this->thread->ttitle); if ($_conf['expack.spm.filter_target'] == '' || $_conf['expack.spm.filter_target'] == 'read') { $_conf['expack.spm.filter_target'] = '_self'; Modified: p2ex/trunk/lib/expack/rss/menu.inc.php =================================================================== --- p2ex/trunk/lib/expack/rss/menu.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/expack/rss/menu.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -49,8 +49,8 @@ if (PEAR::isError($localpath)) { echo "\t@" . $site . ' ' . $localpath->getMessage() . "<br>\n"; } else { - $mtime = file_exists($localpath) ? filemtime($localpath) : 0; - $site_en = rawurlencode(base64_encode($site)); + $mtime = file_exists($localpath) ? filemtime($localpath) : 0; + $site_en = UrlSafeBase64::encode($site); $xml_en = rawurlencode($xml); $rss_q = sprintf('?xml=%s&site_en=%s%s&mt=%d', $xml_en, $site_en, $atom_q, $mtime); $rss_q_ht = htmlspecialchars($rss_q, ENT_QUOTES); @@ -108,8 +108,8 @@ if (PEAR::isError($localpath)) { echo $accesskey_st . $site . ' ' . $localpath->getMessage() . "<br>\n"; } else { - $mtime = file_exists($localpath) ? filemtime($localpath) : 0; - $site_en = rawurlencode(base64_encode($site)); + $mtime = file_exists($localpath) ? filemtime($localpath) : 0; + $site_en = UrlSafeBase64::encode($site); $xml_en = rawurlencode($xml); $rss_q = sprintf('?xml=%s&site_en=%s%s&mt=%d', $xml_en, $site_en, $atom_q, $mtime); $rss_q_ht = htmlspecialchars($rss_q, ENT_QUOTES); Modified: p2ex/trunk/lib/expack/rss/setrss.inc.php =================================================================== --- p2ex/trunk/lib/expack/rss/setrss.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/expack/rss/setrss.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -64,7 +64,7 @@ // RSSÌ^CgÝè if ($site === '') { if ($site_en !== '') { - $site = base64_decode($site_en); + $site = UrlSafeBase64::decode($site_en); } else { $purl = @parse_url($xml); if (is_array($purl)) { Modified: p2ex/trunk/lib/expack/rss/subject.inc.php =================================================================== --- p2ex/trunk/lib/expack/rss/subject.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/expack/rss/subject.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -32,7 +32,7 @@ // c[o[¤Êi $matomeyomi = ''; if (rss_item_exists($items, 'content:encoded') || rss_item_exists($items, 'description')) { - $all_en = rawurlencode(base64_encode(base64_decode($site_en) . ' Ì TvÜÆßÇÝ')); + $all_en = UrlSafeBase64::encode(UrlSafeBase64::decode($site_en) . ' Ì TvÜÆßÇÝ'); $matomeyomi = <<<EOP <a class="toolanchor" href="read_rss.php?xml={$xml_en}&title_en={$all_en}&num=all{$atom_q}" target="read">TvÜÆßÇÝ</a>\n EOP; @@ -145,7 +145,7 @@ // Tv if ($description_column_ht) { if (isset($item['content:encoded']) || isset($item['description'])) { - $title_en = rawurlencode(base64_encode($item['title'])); + $title_en = UrlSafeBase64::encode($item['title']); $description_ht = "<td class=\"tu\"><a class=\"thre_title\" href=\"read_rss.php?xml={$xml_en}&title_en={$title_en}&num={$i}{$atom_q}{$mtime_q}\" target=\"{$_conf['expack.rss.desc_target_frame']}\"></a></td>"; } else { $description_ht = "<td class=\"tu\"></td>"; Modified: p2ex/trunk/lib/expack/tgrep/view.inc.php =================================================================== --- p2ex/trunk/lib/expack/tgrep/view.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/expack/tgrep/view.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -112,7 +112,7 @@ <select onchange="location.href=document.getElementById('h_subject_php').value+'?word='+document.getElementById('h_query_en').value+this.options[this.selectedIndex].value"> <option value="">-</option> <?php $m = ($htm['category'] && isset($profile['categories'][$htm['category']])) ? $profile['categories'][$htm['category']]->member : null; ?> -<?php foreach ($profile['boards'] as $n => $b) { if (!$m || in_array($n, $m)) { ?><option value="<?php printf('&host=%s&bbs=%s&itaj_en=%s', $b->host, $b->bbs, rawurlencode(base64_encode($b->name))); ?>"><?php echo htmlspecialchars($b->name, ENT_QUOTES); ?> (<?php echo $b->hits; ?>)</option><?php } } ?> +<?php foreach ($profile['boards'] as $n => $b) { if (!$m || in_array($n, $m)) { ?><option value="<?php printf('&host=%s&bbs=%s&itaj_en=%s', $b->host, $b->bbs, UrlSafeBase64::encode($b->name)); ?>"><?php echo htmlspecialchars($b->name, ENT_QUOTES); ?> (<?php echo $b->hits; ?>)</option><?php } } ?> </select> </div> <?php } ?> @@ -138,7 +138,7 @@ foreach ($threads as $o => $t) { $new = ''; $turl = sprintf('%s?host=%s&bbs=%s&key=%d', $_conf['read_php'], $t->host, $t->bbs, $t->tkey); - $burl = sprintf('%s?host=%s&bbs=%s&itaj_en=%s&word=%s', $_conf['subject_php'], $t->host, $t->bbs, rawurlencode(base64_encode($t->ita)), $htm['query_en']); + $burl = sprintf('%s?host=%s&bbs=%s&itaj_en=%s&word=%s', $_conf['subject_php'], $t->host, $t->bbs, UrlSafeBase64::encode($t->ita), $htm['query_en']); if (P2Util::isHostMachiBbs($t->host)) { $ourl = sprintf('http://%s/bbs/read.cgi/%s/%s/', $t->host, $t->bbs, $t->tkey); } else { Modified: p2ex/trunk/lib/expack/tgrep/view_k.inc.php =================================================================== --- p2ex/trunk/lib/expack/tgrep/view_k.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/expack/tgrep/view_k.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -76,7 +76,7 @@ foreach ($threads as $o => $t) { $new = ''; $turl = sprintf('%s?host=%s&bbs=%s&key=%d', $_conf['read_php'], $t->host, $t->bbs, $t->tkey); - $burl = sprintf('%s?host=%s&bbs=%s&itaj_en=%s&word=%s', $_conf['subject_php'], $t->host, $t->bbs, rawurlencode(base64_encode($t->ita)), $htm['query_en']); + $burl = sprintf('%s?host=%s&bbs=%s&itaj_en=%s&word=%s', $_conf['subject_php'], $t->host, $t->bbs, UrlSafeBase64::encode($t->ita), $htm['query_en']); $aThread = new Thread; $aThread->setThreadPathInfo($t->host, $t->bbs, $t->tkey); if ($aThread->getThreadInfoFromIdx() && $aThread->isKitoku()) { Modified: p2ex/trunk/lib/expack/tgrep/view_x.inc.php =================================================================== --- p2ex/trunk/lib/expack/tgrep/view_x.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/expack/tgrep/view_x.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -116,7 +116,7 @@ $host_en, $bbs_en, $t->tkey, - base64_encode($ttitle_ht) + UrlSafeBase64::encode($ttitle_ht) ); /* @@ -124,7 +124,7 @@ $_conf['subject_php'], $host_en, $bbs_en, - rawurlencode(base64_encode($t->ita)), + UrlSafeBase64::encode($t->ita), $htm['query_en'] ); */ Modified: p2ex/trunk/lib/menu_iphone.inc.php =================================================================== --- p2ex/trunk/lib/menu_iphone.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/menu_iphone.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -228,7 +228,7 @@ if (preg_match("/^\t?(.+)\t(.+)\t(.+)\$/", $l, $matches)) { $itaj = rtrim($matches[3]); $itaj_view = htmlspecialchars($itaj, ENT_QUOTES); - $itaj_en = rawurlencode(base64_encode($itaj)); + $itaj_en = UrlSafeBase64::encode($itaj); echo "<li><a href=\"{$_conf['subject_php']}?host={$matches[1]}&bbs={$matches[2]}", "&itaj_en={$itaj_en}\" target=\"_self\">{$itaj_view}</a></li>"; } @@ -278,8 +278,8 @@ if (PEAR::isError($localpath)) { $errors[] = array($site, $localpath->getMessage()); } else { - $mtime = file_exists($localpath) ? filemtime($localpath) : 0; - $site_en = rawurlencode(base64_encode($site)); + $mtime = file_exists($localpath) ? filemtime($localpath) : 0; + $site_en = UrlSafeBase64::encode($site); $xml_en = rawurlencode($xml); $rss_q = sprintf('?xml=%s&site_en=%s%s&mt=%d', $xml_en, $site_en, $atom_q, $mtime); $rss_q_ht = htmlspecialchars($rss_q, ENT_QUOTES); Modified: p2ex/trunk/lib/read_footer.inc.php =================================================================== --- p2ex/trunk/lib/read_footer.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/read_footer.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -13,7 +13,7 @@ $key = $aThread->key; $host = $aThread->host; $rescount = $aThread->rescount; - $ttitle_en = base64_encode($aThread->ttitle); + $ttitle_en = UrlSafeBase64::encode($aThread->ttitle); $submit_value = '«Þ'; Modified: p2ex/trunk/lib/read_header.inc.php =================================================================== --- p2ex/trunk/lib/read_header.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/read_header.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -21,9 +21,8 @@ $aborn_st = ' Úñ'; $motothre_url = $aThread->getMotoThread(false, ''); -$ttitle_en = base64_encode($aThread->ttitle); -$ttitle_urlen = rawurlencode($ttitle_en); -$ttitle_en_q = '&ttitle_en=' . $ttitle_urlen; +$ttitle_en = UrlSafeBase64::encode($aThread->ttitle); +$ttitle_en_q = '&ttitle_en=' . $ttitle_en; $bbs_q = '&bbs=' . $aThread->bbs; $key_q = '&key=' . $aThread->key; $host_bbs_key_q = 'host=' . $aThread->host . $bbs_q . $key_q; @@ -128,7 +127,9 @@ // c[o[ªHTML ======= // ¨CÉ}[NÝè -$similar_q = '&itaj_en=' . rawurlencode(base64_encode($aThread->itaj)) . '&method=similar&word=' . rawurlencode($aThread->ttitle_hc) . '&refresh=1'; +$similar_q = '&itaj_en=' . UrlSafeBase64::encode($aThread->itaj) + . '&method=similar&word=' . rawurlencode($aThread->ttitle_hc) + . '&refresh=1'; $itaj_hd = htmlspecialchars($aThread->itaj, ENT_QUOTES); if ($_conf['expack.misc.multi_favs']) { Modified: p2ex/trunk/lib/read_header_k.inc.php =================================================================== --- p2ex/trunk/lib/read_header_k.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/read_header_k.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -18,7 +18,7 @@ $find_st = 'õ'; $motothre_url = $aThread->getMotoThread(false, '1-10'); -$ttitle_en = rawurlencode(base64_encode($aThread->ttitle)); +$ttitle_en = UrlSafeBase64::encode($aThread->ttitle); $ttitle_en_q = '&ttitle_en=' . $ttitle_en; $bbs_q = '&bbs=' . $aThread->bbs; $key_q = '&key=' . $aThread->key; @@ -189,7 +189,9 @@ //==================================================================== // {{{ c[o[ªHTML -$similar_q = '&itaj_en=' . rawurlencode(base64_encode($aThread->itaj)) . '&method=similar&word=' . rawurlencode($aThread->ttitle_hc) . '&refresh=1'; +$similar_q = '&itaj_en=' . UrlSafeBase64::encode($aThread->itaj) + . '&method=similar&word=' . rawurlencode($aThread->ttitle_hc) + . '&refresh=1'; $itaj_hd = htmlspecialchars($aThread->itaj, ENT_QUOTES); $toolbar_right_ht = <<<EOTOOLBAR <a href="{$_conf['subject_php']}?{$host_bbs_key_q}{$_conf['k_at_a']}"{$_conf['k_accesskey_at']['up']}>{$_conf['k_accesskey_st']['up']}{$itaj_hd}</a> Modified: p2ex/trunk/lib/sb_print_k.inc.php =================================================================== --- p2ex/trunk/lib/sb_print_k.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/sb_print_k.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -212,7 +212,7 @@ $thre_url = "{$_conf['read_php']}?{$host_bbs_key_q}"; if ($_conf['iphone']) { - $thre_url .= '&ttitle_en=' . rawurlencode(base64_encode($aThread->ttitle)); + $thre_url .= '&ttitle_en=' . UrlSafeBase64::encode($aThread->ttitle); } $thre_url .= "{$rescount_q}{$offline_q}{$_conf['k_at_a']}{$anum_ht}"; Modified: p2ex/trunk/lib/setfavita.inc.php =================================================================== --- p2ex/trunk/lib/setfavita.inc.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/lib/setfavita.inc.php 2010-01-18 20:23:38 UTC (rev 794) @@ -46,7 +46,7 @@ $bbs = $_GET['bbs']; } if (isset($_GET['itaj_en'])) { - $itaj = base64_decode($_GET['itaj_en']); + $itaj = UrlSafeBase64::decode($_GET['itaj_en']); } } elseif ($_SERVER['REQUEST_METHOD'] == 'POST') { if (isset($_POST['setfavita'])) { @@ -178,7 +178,7 @@ $rec_lines = array(); foreach (explode(',', $list) as $aList) { list($host, $bbs, $itaj_en) = explode('@', $aList); - $rec_lines[] = "\t{$host}\t{$bbs}\t" . base64_decode($itaj_en); + $rec_lines[] = "\t{$host}\t{$bbs}\t" . UrlSafeBase64::decode($itaj_en); } $_info_msg_ht .= <<<EOJS Modified: p2ex/trunk/post.php =================================================================== --- p2ex/trunk/post.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/post.php 2010-01-18 20:23:38 UTC (rev 794) @@ -48,7 +48,7 @@ if (!isset($ttitle)) { if ($ttitle_en) { - $ttitle = base64_decode($ttitle_en); + $ttitle = UrlSafeBase64::decode($ttitle_en); } elseif ($subject) { $ttitle = $subject; } else { Modified: p2ex/trunk/post_form.php =================================================================== --- p2ex/trunk/post_form.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/post_form.php 2010-01-18 20:23:38 UTC (rev 794) @@ -30,7 +30,7 @@ $itaj_hd = htmlspecialchars($itaj, ENT_QUOTES, 'Shift_JIS', false); $ttitle_en = isset($_GET['ttitle_en']) ? $_GET['ttitle_en'] : ''; -$ttitle = (strlen($ttitle_en) > 0) ? base64_decode($ttitle_en) : ''; +$ttitle = (strlen($ttitle_en) > 0) ? UrlSafeBase64::decode($ttitle_en) : ''; $ttitle_hd = htmlspecialchars($ttitle, ENT_QUOTES); $key_idx = P2Util::idxDirOfHostBbs($host, $bbs) . $key . '.idx'; Modified: p2ex/trunk/read_copy_k.php =================================================================== --- p2ex/trunk/read_copy_k.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/read_copy_k.php 2010-01-18 20:23:38 UTC (rev 794) @@ -41,7 +41,7 @@ $aThread->readDat($aThread->keydat); $one = $aThread->explodeDatLine($aThread->datlines[0]); $ttitle = trim($one[4]); - $ttitle_en = rawurlencode(base64_encode($ttitle)); + $ttitle_en = UrlSafeBase64::encode($ttitle); $ttitle_ht = htmlspecialchars($ttitle, ENT_QUOTES); $url_txt = $aThread->getMotoThread(true); $url_k_txt = $aThread->getMotoThread(); Modified: p2ex/trunk/read_filter.php =================================================================== --- p2ex/trunk/read_filter.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/read_filter.php 2010-01-18 20:23:38 UTC (rev 794) @@ -26,7 +26,7 @@ $res_filter['field'] = $field; $itaj = P2Util::getItaName($host, $bbs); if (!$itaj) { $itaj = $bbs; } -$ttitle_name = base64_decode($ttitle_en); +$ttitle_name = UrlSafeBase64::decode($ttitle_en); $popup_filter = 1; /** Modified: p2ex/trunk/read_filter_k.php =================================================================== --- p2ex/trunk/read_filter_k.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/read_filter_k.php 2010-01-18 20:23:38 UTC (rev 794) @@ -13,7 +13,7 @@ $host = $_GET['host']; $bbs = $_GET['bbs']; $key = $_GET['key']; -$ttitle = base64_decode($_GET['ttitle_en']); +$ttitle = UrlSafeBase64::decode($_GET['ttitle_en']); $ttitle_back = (isset($_SERVER['HTTP_REFERER'])) ? '<a href="' . htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_QUOTES) . '" title="ßé">' . $ttitle . '</a>' : $ttitle; Modified: p2ex/trunk/read_new.php =================================================================== --- p2ex/trunk/read_new.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/read_new.php 2010-01-18 20:23:38 UTC (rev 794) @@ -425,9 +425,8 @@ //================================================================== $motothre_url = $aThread->getMotoThread(false, ''); - $ttitle_en = base64_encode($aThread->ttitle); - $ttitle_urlen = rawurlencode($ttitle_en); - $ttitle_en_q = '&ttitle_en=' . $ttitle_urlen; + $ttitle_en = UrlSafeBase64::encode($aThread->ttitle); + $ttitle_en_q = '&ttitle_en=' . $ttitle_en; $bbs_q = '&bbs=' . $aThread->bbs; $key_q = '&key=' . $aThread->key; $host_bbs_key_q = 'host=' . $aThread->host . $bbs_q . $key_q; @@ -504,7 +503,8 @@ // ¨CÉ}[NÝè $itaj_hd = htmlspecialchars($aThread->itaj, ENT_QUOTES); - $similar_q = '&itaj_en=' . rawurlencode(base64_encode($aThread->itaj)) . '&method=similar&word=' . rawurlencode($aThread->ttitle_hc); + $similar_q = '&itaj_en=' . UrlSafeBase64::encode($aThread->itaj) + . '&method=similar&word=' . rawurlencode($aThread->ttitle_hc); if ($_conf['expack.misc.multi_favs']) { $toolbar_setfav_ht = '¨CÉ['; Modified: p2ex/trunk/read_new_k.php =================================================================== --- p2ex/trunk/read_new_k.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/read_new_k.php 2010-01-18 20:23:38 UTC (rev 794) @@ -393,7 +393,7 @@ //================================================================== $motothre_url = $aThread->getMotoThread(); - $ttitle_en = rawurlencode(base64_encode($aThread->ttitle)); + $ttitle_en = UrlSafeBase64::encode($aThread->ttitle); $ttitle_en_q = '&ttitle_en=' . $ttitle_en; $bbs_q = '&bbs=' . $aThread->bbs; $key_q = '&key=' . $aThread->key; Modified: p2ex/trunk/subject.php =================================================================== --- p2ex/trunk/subject.php 2010-01-18 09:46:50 UTC (rev 793) +++ p2ex/trunk/subject.php 2010-01-18 20:23:38 UTC (rev 794) @@ -94,7 +94,7 @@ } if (isset($_GET['itaj_en'])) { - $p2_setting['itaj'] = base64_decode($_GET['itaj_en']); + $p2_setting['itaj'] = UrlSafeBase64::decode($_GET['itaj_en']); } // }}} @@ -210,7 +210,7 @@ } elseif (isset($_GET['setfav']) && !empty($_GET['key']) && $host && $bbs) { require_once P2_LIB_DIR . '/setfav.inc.php'; setFav($host, $bbs, $_GET['key'], $_GET['setfav'], - isset($_GET['ttitle_en']) ? base64_decode($_GET['ttitle_en']) : null); + isset($_GET['ttitle_en']) ? UrlSafeBase64::decode($_GET['ttitle_en']) : null); // a°üè } elseif (isset($_GET['setpal']) && $_GET['key'] && $host && $bbs) {