• R/O
  • SSH
  • HTTPS

p2-php: Commit


Commit MetaInfo

Révision976 (tree)
l'heure2014-04-26 23:29:17
Auteurakid

Message de Log

p2/ for version 1.8.100

Change Summary

Modification

--- p2/trunk/read_new_i.php (revision 975)
+++ p2/trunk/read_new_i.php (revision 976)
@@ -162,7 +162,7 @@
162162 <script type="text/javascript" src="js/basic.js?2012"></script>
163163 <script type="text/javascript" src="iphone/js/respopup.iPhone.js?v=20090429"></script>
164164 <script type="text/javascript" src="iphone/js/setfavjs.js?v=20090428"></script>
165- <script type="text/javascript" src="iphone/js/iphone.js?2013060918"></script>
165+ <script type="text/javascript" src="iphone/js/iphone.js?20140423"></script>
166166 <script type="text/javascript" src="iphone/js/smartpopup.iPhone.js?v=20130612"></script>
167167 <script type="text/javascript">
168168 <!--
@@ -201,8 +201,8 @@
201201 // -->
202202 </script>
203203 <?php // ここでは iui.css は読んでいないことに注意 ?>
204-<link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140114">
205-<link rel="stylesheet" type="text/css" href="./iui/read.css?20140114">
204+<link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140423">
205+<link rel="stylesheet" type="text/css" href="./iui/read.css?20140423">
206206 <?php
207207
208208 echo "<title>{$ptitle_ht}</title>";
@@ -574,7 +574,7 @@
574574 ?>
575575 <div id="footToolbar" class="footbar">
576576 <span class="home"><a name="ntt_bt1" href="<?php eh($index_uri); ?>">TOP</a></span>
577-<span class="other" id="etcButoon" title="off"><a onclick="popUpFootbarFormIPhone(2);">その他</a></span>
577+<span id="etcButoon" title="off"><a onclick="popUpFootbarFormIPhone(2);">その他</a></span>
578578 <?php
579579 if (!isset($GLOBALS['rnum_all_range']) or $GLOBALS['rnum_all_range'] > 0 or !empty($GLOBALS['_is_eq_limit_to_and_to'])) {
580580 if (!empty($GLOBALS['_is_eq_limit_to_and_to'])) {
@@ -584,13 +584,13 @@
584584 }
585585 ?><span class="next_disabled"></span><?php
586586 echo <<<EOP
587- <span class="new"><a href="{$_conf['read_new_k_php']}?host={$aThreadList->host}&bbs={$aThreadList->bbs}&spmode={$aThreadList->spmode}&nt={$newtime}{$_conf['k_at_a']}">{$str}</a></span>
587+ <span id="newButton" ontouchstart="startTap(this)" ontouchmove="resetTap()" ontouchend="if(detectTap(this)){ this.style.backgroundPositionY = '-50px' }"><a href="{$_conf['read_new_k_php']}?host={$aThreadList->host}&bbs={$aThreadList->bbs}&spmode={$aThreadList->spmode}&nt={$newtime}{$_conf['k_at_a']}">{$str}</a></span>
588588 EOP;
589589 } else {
590590 echo <<<EOP
591591 <span class="next"><a href="{$_conf['read_new_k_php']}?host={$aThreadList->host}&bbs={$aThreadList->bbs}&spmode={$aThreadList->spmode}&nt={$newtime}&amp;norefresh=1{$_conf['k_at_a']}">新まとめの続き</a></span>
592592 EOP;
593- ?><span class="new_disabled"></span><?php
593+ ?><span class="newButton_disabled"></span><?php
594594
595595 }
596596 //{$sb_ht_btm}の
--- p2/trunk/conf/conf_system.inc.php (revision 975)
+++ p2/trunk/conf/conf_system.inc.php (revision 976)
@@ -3,7 +3,7 @@
33 // このファイルは、特に理由の無い限り変更しないで下さい。
44 // include from conf.inc.php
55
6-$_conf['p2version'] = '1.8.99'; // rep2のバージョン
6+$_conf['p2version'] = '1.8.100'; // rep2のバージョン
77
88 $_conf['p2name'] = 'rep2'; // rep2の名前。
99
--- p2/trunk/subject_i.php (revision 975)
+++ p2/trunk/subject_i.php (revision 976)
@@ -222,7 +222,7 @@
222222 if (!$aThreadList->spmode || $aThreadList->spmode == "news" and (strlen($GLOBALS['word_fm']) > 0)) {
223223
224224 $aThread->setThreadPathInfo($aThread->host, $aThread->bbs, $aThread->key);
225-
225+
226226 // マッチしなければスキップ
227227 if (!_matchSbFilter($aThread)) {
228228 unset($aThread);
@@ -446,8 +446,7 @@
446446 }
447447 }
448448
449- // {{{ 新着ソートの便宜上 (未取得スレッドの)unum をセット調整
450-
449+ // 新着ソートの便宜上 (未取得スレッドの)unum をセット調整
451450 if (!isset($aThread->unum)) {
452451 if (in_array($aThreadList->spmode, array('recent', 'res_hist', 'taborn'))) {
453452 $aThread->unum = -0.1;
@@ -456,8 +455,6 @@
456455 }
457456 }
458457
459- // }}}
460-
461458 // 勢いのセット
462459 $aThread->setDayRes();
463460
@@ -488,7 +485,7 @@
488485 }
489486
490487 // ソート
491-_sortThreads($aThreadList);
488+$aThreadList->sortThreads(!empty($_REQUEST['rsort']));
492489
493490 //===============================================================
494491 // HTMLプリント
@@ -498,7 +495,7 @@
498495
499496 // {{{ 倉庫にtorder付与
500497
501- if ($aThreadList->spmode == "soko") {
498+ if ($aThreadList->spmode == 'soko') {
502499 if ($aThreadList->threads) {
503500 $soko_torder = 1;
504501 $newthreads = array();
@@ -505,10 +502,8 @@
505502 foreach ($aThreadList->threads as $at) {
506503 $at->torder = $soko_torder++;
507504 $newthreads[] = $at;
508- unset($at);
509505 }
510- $aThreadList->threads =& $newthreads;
511- unset($newthreads);
506+ $aThreadList->threads = $newthreads;
512507 }
513508 }
514509
@@ -524,11 +519,11 @@
524519 $newthreads = array();
525520 for ($i = $disp_navi['from']; $i <= $disp_navi['end']; $i++) {
526521 if ($aThreadList->threads[$i-1]) {
527- $newthreads[] =& $aThreadList->threads[$i-1];
522+ $newthreads[] = $aThreadList->threads[$i-1];
528523 }
529524 }
530- $aThreadList->threads =& $newthreads;
531- unset($newthreads);
525+ $aThreadList->threads = $newthreads;
526+
532527 $aThreadList->num = sizeof($aThreadList->threads);
533528
534529 // }}}
@@ -604,74 +599,6 @@
604599 }
605600
606601 /**
607- * スレ一覧($aThreadList->threads)をソートする
608- *
609- * @return void
610- */
611-function _sortThreads(&$aThreadList)
612-{
613- global $_conf;
614-
615- $GLOBALS['debug'] && $GLOBALS['profiler']->enterSection('sort');
616-
617- if ($aThreadList->threads) {
618- if (!empty($GLOBALS['wakati_words'])) {
619- $GLOBALS['now_sort'] = 'title';
620- usort($aThreadList->threads, 'cmp_similarity');
621-
622- } elseif ($GLOBALS['now_sort'] == 'midoku') {
623- if ($aThreadList->spmode == 'soko') {
624- usort($aThreadList->threads, 'cmp_key');
625- } else {
626- usort($aThreadList->threads, 'cmp_midoku');
627- }
628-
629- } elseif ($GLOBALS['now_sort'] == 'res') {
630- usort($aThreadList->threads, 'cmp_res');
631-
632- } elseif ($GLOBALS['now_sort'] == 'title') {
633- usort($aThreadList->threads, 'cmp_title');
634-
635- } elseif ($GLOBALS['now_sort'] == 'ita') {
636- usort($aThreadList->threads, 'cmp_ita');
637-
638- } elseif ($GLOBALS['now_sort'] == 'ikioi' || $GLOBALS['now_sort'] == 'spd') {
639- if ($_conf['cmp_dayres_midoku']) {
640- usort($aThreadList->threads, 'cmp_dayres_midoku');
641- } else {
642- usort($aThreadList->threads, 'cmp_dayres');
643- }
644-
645- } elseif ($GLOBALS['now_sort'] == 'bd') {
646- usort($aThreadList->threads, 'cmp_key');
647-
648- } elseif ($GLOBALS['now_sort'] == 'fav') {
649- usort($aThreadList->threads, 'cmp_fav');
650-
651- } if ($GLOBALS['now_sort'] == 'no') {
652- if ($aThreadList->spmode == 'soko') {
653- usort($aThreadList->threads, 'cmp_key');
654- } else {
655- usort($aThreadList->threads, 'cmp_no');
656- }
657- }
658- }
659-
660- // ニュースチェック
661- if ($aThreadList->spmode == 'news') {
662- for ($i = 0; $i < $threads_num ; $i++) {
663- if ($aThreadList->threads) {
664- $newthreads[] = array_shift($aThreadList->threads);
665- }
666- }
667- $aThreadList->threads = $newthreads;
668- $aThreadList->num = sizeof($aThreadList->threads);
669- }
670-
671- $GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('sort');
672-}
673-
674-/**
675602 * p2_setting 記録する
676603 *
677604 * @return boolean
@@ -982,154 +909,6 @@
982909 return false;
983910 }
984911
985-//============================================================
986-// ソート関数
987-//============================================================
988-
989-/**
990- * 新着ソート
991- *
992- * @return integer
993- */
994-function cmp_midoku($a, $b)
995-{
996- if ($a->new == $b->new) {
997- if (($a->unum == $b->unum) or ($a->unum < 0) && ($b->unum < 0)) {
998- return ($a->torder > $b->torder) ? 1 : -1;
999- } else {
1000- return ($a->unum < $b->unum) ? 1 : -1;
1001- }
1002- } else {
1003- return ($a->new < $b->new) ? 1 : -1;
1004- }
1005-}
1006-
1007-/**
1008- * レス数 ソート
1009- *
1010- * @return integer
1011- */
1012-function cmp_res($a, $b)
1013-{
1014- if ($a->rescount == $b->rescount) {
1015- return ($a->torder > $b->torder) ? 1 : -1;
1016- } else {
1017- return ($a->rescount < $b->rescount) ? 1 : -1;
1018- }
1019-}
1020-
1021-/**
1022- * タイトル ソート
1023- *
1024- * @return integer
1025- */
1026-function cmp_title($a, $b)
1027-{
1028- if ($a->ttitle == $b->ttitle) {
1029- return ($a->torder > $b->torder) ? 1 : -1;
1030- } else {
1031- return strcmp($a->ttitle, $b->ttitle);
1032- }
1033-}
1034-
1035-/**
1036- * 板 ソート
1037- *
1038- * @return integer
1039- */
1040-function cmp_ita($a, $b)
1041-{
1042- if ($a->host != $b->host) {
1043- return strcmp($a->host, $b->host);
1044- } else {
1045- if ($a->itaj != $b->itaj) {
1046- return strcmp($a->itaj, $b->itaj);
1047- } else {
1048- return ($a->torder > $b->torder) ? 1 : -1;
1049- }
1050- }
1051-}
1052-
1053-/**
1054- * お気に ソート
1055- *
1056- * @return integer
1057- */
1058-function cmp_fav($a, $b)
1059-{
1060- if ($a->fav == $b->fav) {
1061- return ($a->torder > $b->torder) ? 1 : -1;
1062- } else {
1063- return strcmp($b->fav, $a->fav);
1064- }
1065-}
1066-
1067-/**
1068- * 勢いソート(新着レス優先)
1069- *
1070- * @return integer
1071- */
1072-function cmp_dayres_midoku($a, $b)
1073-{
1074- if ($a->new == $b->new) {
1075- if (($a->unum == $b->unum) or ($a->unum >= 1) && ($b->unum >= 1)) {
1076- return ($a->dayres < $b->dayres) ? 1 : -1;
1077- } else {
1078- return ($a->unum < $b->unum) ? 1 : -1;
1079- }
1080- } else {
1081- return ($a->new < $b->new) ? 1 : -1;
1082- }
1083-}
1084-
1085-/**
1086- * 勢いソート
1087- *
1088- * @return integer
1089- */
1090-function cmp_dayres($a, $b)
1091-{
1092- if ($a->new == $b->new) {
1093- return ($a->dayres < $b->dayres) ? 1 : -1;
1094- } else {
1095- return ($a->new < $b->new) ? 1 : -1;
1096- }
1097-}
1098-
1099-/**
1100- * key ソート
1101- *
1102- * @return integer
1103- */
1104-function cmp_key($a, $b)
1105-{
1106- return ($a->key < $b->key) ? 1 : -1;
1107-}
1108-
1109-/**
1110- * No. ソート
1111- *
1112- * @return integer
1113- */
1114-function cmp_no($a, $b)
1115-{
1116- return ($a->torder > $b->torder) ? 1 : -1;
1117-}
1118-
1119-/**
1120- * 類似性ソート
1121- *
1122- * @return integer
1123- */
1124-function cmp_similarity($a, $b)
1125-{
1126- if ($a->similarity == $b->similarity) {
1127- return ($a->key < $b->key) ? 1 : -1;
1128- } else {
1129- return ($a->similarity < $b->similarity) ? 1 : -1;
1130- }
1131-}
1132-
1133912 /*
1134913 * Local Variables:
1135914 * mode: php
--- p2/trunk/subject_new.php (revision 975)
+++ p2/trunk/subject_new.php (revision 976)
@@ -1,8 +1,9 @@
11 <?php
22 /*
3- //p2 - スレッドサブジェクト表示スクリプト
4- //フレーム分割画面、右上部分
3+ (// p2 - スレッドサブジェクト表示スクリプト)
4+ (// フレーム分割画面、右上部分)
55
6+ このスクリプトは変則的。includeで呼び出して利用している。一度の実行で複数回呼び出される。
67 無理矢理だが、板メニューで新着数を知るために使用している // $shinchaku_num, $_newthre_num をセット
78 (変数のスコープは閉じたいところ)
89
--- p2/trunk/doc/ChangeLog.txt (revision 975)
+++ p2/trunk/doc/ChangeLog.txt (revision 976)
@@ -1,3 +1,14 @@
1+2014/04/26
2+ * rep2 version 1.8.100
3+
4+ [修正] PC表示で、スレ一覧の「新」マークが色付け表示されていなかったのを修正した。
5+ [新機能] スレ一覧を逆順ソート表示できるようにした。
6+ [更新] 2ch.scの「.net」付きのIDの抽出に対応した。
7+ [更新] 携帯、スマホから2ch内リンクを開く時は、プレビュー表示で開くようにした。
8+ [更新] 携帯、スマホ用表示でレスの名前を<b></b>で囲って表示するようにした。
9+ [更新] スマホ向け表示デザインを微調整した。
10+ [更新] 書き込み後の結果判別処理を更新した。
11+
112 2014/04/12
213 * rep2 version 1.8.99
314
--- p2/trunk/lib/ShowThreadPc.php (revision 975)
+++ p2/trunk/lib/ShowThreadPc.php (revision 976)
@@ -253,7 +253,7 @@
253253 // NGID変換
254254 } elseif ($isNgId) {
255255 $date_id = preg_replace(
256- '|ID: ?([0-9A-Za-z/.+]{8,11}).*|',
256+ '|ID: ?([0-9A-Za-z/.+]{8,15}).*|',
257257 "<s class=\"ngword\" onClick=\"showHide('ngn{$_ngaborns_head_hits}', 'ngword_cont');\"{$atTitle}>NG:\\0</s>",
258258 $date_id
259259 );
@@ -325,11 +325,11 @@
325325
326326 // IDフィルタ
327327 if ($_conf['flex_idpopup'] == 1) {
328- if (preg_match('|ID: ?([0-9A-Za-z/.+]{8,11})|', $date_id, $matches)) {
328+ if (preg_match('|ID: ?([0-9A-Za-z/.+]{8,15})|', $date_id, $matches)) {
329329 $idkey = $matches[1];
330330 if ($this->thread->idcount[$idkey] > 1) {
331331 $date_id = preg_replace_callback(
332- '|ID: ?([0-9A-Za-z/.+]{8,11})|',
332+ '|ID: ?([0-9A-Za-z/.+]{8,15})|',
333333 array($this, 'idfilter_callback'), $date_id
334334 );
335335 }
@@ -492,7 +492,7 @@
492492 // NGID変換
493493 } elseif ($isNgId) {
494494 $date_id = preg_replace(
495- '|ID: ?([0-9A-Za-z/.+]{8,11}).*|',
495+ '|ID: ?([0-9A-Za-z/.+]{8,15}).*|',
496496 "<s class=\"ngword\" onClick=\"showHide('ngn{$_ngaborns_head_hits}', 'ngword_cont');\"{$atTitle}>NG:\\0</s>",
497497 $date_id
498498 );
@@ -518,11 +518,11 @@
518518
519519 // IDフィルタ
520520 if ($_conf['flex_idpopup'] == 1) {
521- if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,11})|', $date_id, $matches)) {
521+ if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,15})|', $date_id, $matches)) {
522522 $idkey = $matches[1];
523523 if ($this->thread->idcount[$idkey] > 1) {
524524 $date_id = preg_replace_callback(
525- '|ID: ?([0-9A-Za-z/.+]{8,11})|',
525+ '|ID: ?([0-9A-Za-z/.+]{8,15})|',
526526 array($this, 'idfilter_callback'), $date_id
527527 );
528528 }
@@ -1203,13 +1203,16 @@
12031203 if (preg_match('{^http://(orz\.2ch\.io/p/-/)?(\\w+\\.(?:2ch\\.net|bbspink\\.com))/(test/read\\.cgi/)?([^/]+)/([1-9]\\d+)(?:/([^/]+)?)?$}', $url, $m)) {
12041204
12051205 if ($m[1] != '' xor $m[3] != '') {
1206-
12071206 $ls = (!isset($m[6]) || $m[6] == 'i') ? '' : $m[6];
12081207 $host = $m[2];
12091208 $bbs = $m[4];
12101209 $key = $m[5];
1211- $read_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}&ls={$ls}";
1212-
1210+ $read_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}";
1211+ if ($ls) {
1212+ $read_url .= "&ls=$ls";
1213+ } else {
1214+ //$read_url .= '&onlyone=1';
1215+ }
12131216 if ($_conf['iframe_popup']) {
12141217 if (preg_match('/^[0-9\\-n]+$/', $ls)) {
12151218 $pop_url = $url;
--- p2/trunk/lib/SubjectTxt.php (revision 975)
+++ p2/trunk/lib/SubjectTxt.php (revision 976)
@@ -170,6 +170,7 @@
170170 $error_msg = $response->getMessage();
171171 } else {
172172 $code = $req->getResponseCode();
173+ // 302 Found (Redirection 転送)
173174 if ($code == 302) {
174175 // ホストの移転を追跡
175176 require_once P2_LIB_DIR . '/BbsMap.php';
--- p2/trunk/lib/ShowThread.php (revision 975)
+++ p2/trunk/lib/ShowThread.php (revision 976)
@@ -181,7 +181,7 @@
181181 . '(ftp|h?ttps?|tps?)://([0-9A-Za-z][\\w!#%&+*,\\-./:;=?@\\[\\]^~]+)' // URL
182182 . ')'
183183 . '|'
184- . '(?P<id>ID: ?([0-9A-Za-z/.+]{8,11})(?=[^0-9A-Za-z/.+]|$))' // ID(8,10桁 +PC/携帯識別フラグ)
184+ . '(?P<id>ID: ?([0-9A-Za-z/.+]{8,15})(?=[^0-9A-Za-z/.+]|$))' // ID(8,10桁 +PC/携帯識別フラグ)
185185 . ')'
186186 . '}';
187187 }
@@ -222,7 +222,7 @@
222222 function parseDateId($date_id)
223223 {
224224 $id = null;
225- if (preg_match('| (ID: ?[0-9a-zA-Z/.+]{8,11}.*)|', $date_id, $m)) {
225+ if (preg_match('| (ID: ?[0-9a-zA-Z/.+]{8,15}.*)|', $date_id, $m)) {
226226 $id = $m[1];
227227 }
228228 return $id;
@@ -450,7 +450,7 @@
450450 }
451451 foreach ($lines as $k => $line) {
452452 $lar = explode('<>', $line);
453- if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,10})|', $lar[2], $matches)) {
453+ if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,15})|', $lar[2], $matches)) {
454454 $id = $matches[1];
455455 if (isset($this->thread->idcount[$id])) {
456456 $this->thread->idcount[$id]++;
--- p2/trunk/lib/ShowBrdMenuK.php (revision 975)
+++ p2/trunk/lib/ShowBrdMenuK.php (revision 976)
@@ -283,47 +283,46 @@
283283
284284 $csrfid = P2Util::getCsrfId();
285285 $hr = P2View::getHrHtmlK();
286+
287+ $favitas = BrdCtl::readFavItas();
286288
287- $show_flag = false;
288-
289- if (file_exists($_conf['favita_path']) and $lines = file($_conf['favita_path'])) {
289+ if ($favitas) {
290290 echo 'お気に板 [<a href="editfavita.php?b=k">編集</a>]' . $hr;
291291 $i = 0;
292- foreach ($lines as $l) {
292+ foreach ($favitas as $favita) {
293293 $i++;
294- $l = rtrim($l);
295- if (preg_match("/^\t?(.+)\t(.+)\t(.+)$/", $l, $matches)) {
296- $itaj = rtrim($matches[3]);
297- $attr = array();
298- $key_num_st = '';
294+
295+ extract($favita); // $host, $bbs, $itaj
296+
297+ $attr = array();
298+ $key_num_st = '';
299299
300- if ($i <= 9) {
301- $attr[$_conf['accesskey_for_k']] = $i;
302- $key_num_st = "$i.";
303- }
304-
305- $atag = P2View::tagA(
306- UriUtil::buildQueryUri($_conf['subject_php'],
307- array(
308- 'host' => $matches[1],
309- 'bbs' => $matches[2],
310- 'itaj_en' => base64_encode($itaj),
311- UA::getQueryKey() => UA::getQueryValue()
312- )
313- ),
314- UA::isIPhoneGroup() ? hs($itaj) : hs("$key_num_st$itaj"),
315- $attr
316- );
300+ if ($i <= 9) {
301+ $attr[$_conf['accesskey_for_k']] = $i;
302+ $key_num_st = "$i.";
303+ }
304+
305+ $atag = P2View::tagA(
306+ UriUtil::buildQueryUri($_conf['subject_php'],
307+ array(
308+ 'host' => $host,
309+ 'bbs' => $bbs,
310+ 'itaj_en' => base64_encode($itaj),
311+ UA::getQueryKey() => UA::getQueryValue()
312+ )
313+ ),
314+ UA::isIPhoneGroup() ? hs($itaj) : hs("$key_num_st$itaj"),
315+ $attr
316+ );
317317
318- if (UA::isIPhoneGroup()) {
319- echo '<li>' . $atag . '</li>';
320- } else {
321- echo $atag . '<br>';
322- }
318+ if (UA::isIPhoneGroup()) {
319+ echo '<li>' . $atag . '</li>';
320+ } else {
321+ echo $atag . '<br>';
322+ }
323323
324- // [<a href="{$_SERVER['SCRIPT_NAME']}?host={$matches[1]}&amp;bbs={$matches[2]}&amp;setfavita=0&amp;csrfid={$csrfid}&amp;view=favita{$_conf['k_at_a']}">削</a>]
325- $show_flag = true;
326- }
324+ // [<a href="{$_SERVER['SCRIPT_NAME']}?host={$host}&amp;bbs={$bbs}&amp;setfavita=0&amp;csrfid={$csrfid}&amp;view=favita{$_conf['k_at_a']}">削</a>]
325+
327326 }
328327 if (UA::isIPhoneGroup()) {
329328 ?></ul><?php
@@ -330,7 +329,7 @@
330329 }
331330 }
332331
333- if (!$show_flag) {
332+ if (!$favitas) {
334333 ?><p>お気に板はまだないようだ</p><?php
335334 }
336335 }
--- p2/trunk/lib/ShowBrdMenuPc.php (revision 975)
+++ p2/trunk/lib/ShowBrdMenuPc.php (revision 976)
@@ -82,20 +82,7 @@
8282 global $_conf, $matome_i, $STYLE;
8383
8484 // favita読み込み
85- $favitas = array();
86- if (file_exists($_conf['favita_path'])) {
87- if ($lines = file($_conf['favita_path'])) {
88- foreach ($lines as $l) {
89- if (preg_match("/^\t?(.+)\t(.+)\t(.+)\$/", trim($l), $matches)) {
90- $favitas[] = array(
91- 'host' => $matches[1],
92- 'bbs' => $matches[2],
93- 'itaj' => $matches[3],
94- );
95- }
96- }
97- }
98- }
85+ $favitas = BrdCtl::readFavItas();
9986
10087 // 空っぽなら
10188 if (!$favitas) {
--- p2/trunk/lib/ThreadRead.php (revision 975)
+++ p2/trunk/lib/ThreadRead.php (revision 976)
@@ -303,7 +303,7 @@
303303 if ($code == '200' || $code == '206') {
304304 // OK。何もしない
305305
306- // 302 Found (Redirection)
306+ // 302 Found (Redirection 転送)
307307 } elseif ($code == '302') {
308308
309309 // 板移転を自動追跡
--- p2/trunk/lib/ThreadList.php (revision 975)
+++ p2/trunk/lib/ThreadList.php (revision 976)
@@ -268,4 +268,216 @@
268268 return $this->num;
269269 }
270270
271+ /**
272+ * スレ一覧(ThreadList->threads)をソートする
273+ *
274+ * @access public
275+ * @return void
276+ */
277+ function sortThreads($reverse = false)
278+ {
279+ global $_conf; // now_sort, wakati_words
280+
281+ if (!$this->threads) {
282+ return;
283+ }
284+
285+ $GLOBALS['debug'] && $GLOBALS['profiler']->enterSection('sort');
286+
287+ if (!empty($GLOBALS['wakati_words'])) {
288+ $GLOBALS['now_sort'] = 'title';
289+ usort($this->threads, 'cmp_similarity');
290+
291+ } elseif ($GLOBALS['now_sort'] == 'midoku') {
292+ if ($this->spmode == 'soko') {
293+ usort($this->threads, 'cmp_key');
294+ } else {
295+ usort($this->threads, 'cmp_midoku');
296+ }
297+
298+ } elseif ($GLOBALS['now_sort'] == 'res') {
299+ usort($this->threads, 'cmp_res');
300+
301+ } elseif ($GLOBALS['now_sort'] == 'title') {
302+ usort($this->threads, 'cmp_title');
303+
304+ } elseif ($GLOBALS['now_sort'] == 'ita') {
305+ usort($this->threads, 'cmp_ita');
306+
307+ } elseif ($GLOBALS['now_sort'] == 'ikioi' || $GLOBALS['now_sort'] == 'spd') {
308+ if ($_conf['cmp_dayres_midoku']) {
309+ usort($this->threads, 'cmp_dayres_midoku');
310+ } else {
311+ usort($this->threads, 'cmp_dayres');
312+ }
313+
314+ } elseif ($GLOBALS['now_sort'] == 'bd') {
315+ usort($this->threads, 'cmp_key');
316+
317+ } elseif ($GLOBALS['now_sort'] == 'fav') {
318+ usort($this->threads, 'cmp_fav');
319+
320+ } if ($GLOBALS['now_sort'] == 'no') {
321+ if ($this->spmode == 'soko') {
322+ usort($this->threads, 'cmp_key');
323+ } else {
324+ usort($this->threads, 'cmp_no');
325+ }
326+ }
327+
328+ if ($reverse) {
329+ $this->threads = array_reverse($this->threads);
330+ }
331+
332+ $GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('sort');
333+ }
271334 }
335+
336+
337+//============================================================
338+// ソート関数 (ThreadList->sortThreads())
339+//============================================================
340+
341+/**
342+ * 新着ソート
343+ *
344+ * @return integer
345+ */
346+function cmp_midoku($a, $b)
347+{
348+ if ($a->new == $b->new) {
349+ if (($a->unum == $b->unum) or ($a->unum < 0) && ($b->unum < 0)) {
350+ return ($a->torder > $b->torder) ? 1 : -1;
351+ } else {
352+ return ($a->unum < $b->unum) ? 1 : -1;
353+ }
354+ } else {
355+ return ($a->new < $b->new) ? 1 : -1;
356+ }
357+}
358+
359+/**
360+ * レス数 ソート
361+ *
362+ * @return integer
363+ */
364+function cmp_res($a, $b)
365+{
366+ if ($a->rescount == $b->rescount) {
367+ return ($a->torder > $b->torder) ? 1 : -1;
368+ } else {
369+ return ($a->rescount < $b->rescount) ? 1 : -1;
370+ }
371+}
372+
373+/**
374+ * タイトル ソート
375+ *
376+ * @return integer
377+ */
378+function cmp_title($a, $b)
379+{
380+ if ($a->ttitle == $b->ttitle) {
381+ return ($a->torder > $b->torder) ? 1 : -1;
382+ } else {
383+ return strcmp($a->ttitle, $b->ttitle);
384+ }
385+}
386+
387+/**
388+ * 板 ソート
389+ *
390+ * @return integer
391+ */
392+function cmp_ita($a, $b)
393+{
394+ if ($a->host != $b->host) {
395+ return strcmp($a->host, $b->host);
396+ } else {
397+ if ($a->itaj != $b->itaj) {
398+ return strcmp($a->itaj, $b->itaj);
399+ } else {
400+ return ($a->torder > $b->torder) ? 1 : -1;
401+ }
402+ }
403+}
404+
405+/**
406+ * お気に ソート
407+ *
408+ * @return integer
409+ */
410+function cmp_fav($a, $b)
411+{
412+ if ($a->fav == $b->fav) {
413+ return ($a->torder > $b->torder) ? 1 : -1;
414+ } else {
415+ return strcmp($b->fav, $a->fav);
416+ }
417+}
418+
419+/**
420+ * 勢いソート(新着レス優先)
421+ *
422+ * @return integer
423+ */
424+function cmp_dayres_midoku($a, $b)
425+{
426+ if ($a->new == $b->new) {
427+ if (($a->unum == $b->unum) or ($a->unum >= 1) && ($b->unum >= 1)) {
428+ return ($a->dayres < $b->dayres) ? 1 : -1;
429+ } else {
430+ return ($a->unum < $b->unum) ? 1 : -1;
431+ }
432+ } else {
433+ return ($a->new < $b->new) ? 1 : -1;
434+ }
435+}
436+
437+/**
438+ * 勢いソート
439+ *
440+ * @return integer
441+ */
442+function cmp_dayres($a, $b)
443+{
444+ if ($a->new == $b->new) {
445+ return ($a->dayres < $b->dayres) ? 1 : -1;
446+ } else {
447+ return ($a->new < $b->new) ? 1 : -1;
448+ }
449+}
450+
451+/**
452+ * key ソート
453+ *
454+ * @return integer
455+ */
456+function cmp_key($a, $b)
457+{
458+ return ($a->key < $b->key) ? 1 : -1;
459+}
460+
461+/**
462+ * No. ソート
463+ *
464+ * @return integer
465+ */
466+function cmp_no($a, $b)
467+{
468+ return ($a->torder > $b->torder) ? 1 : -1;
469+}
470+
471+/**
472+ * 類似性ソート
473+ *
474+ * @return integer
475+ */
476+function cmp_similarity($a, $b)
477+{
478+ if ($a->similarity == $b->similarity) {
479+ return ($a->key < $b->key) ? 1 : -1;
480+ } else {
481+ return ($a->similarity < $b->similarity) ? 1 : -1;
482+ }
483+}
--- p2/trunk/lib/BrdCtl.php (revision 975)
+++ p2/trunk/lib/BrdCtl.php (revision 976)
@@ -10,6 +10,35 @@
1010 class BrdCtl
1111 {
1212 /**
13+ * お気に入り板を読み込む
14+ *
15+ * @static
16+ * @access public
17+ * @return array
18+ */
19+ function readFavItas()
20+ {
21+ global $_conf;
22+
23+ // favita読み込み
24+ $favitas = array();
25+ if (file_exists($_conf['favita_path'])) {
26+ if ($lines = file($_conf['favita_path'])) {
27+ foreach ($lines as $l) {
28+ if (preg_match("/^\t?(.+)\t(.+)\t(.+)\$/", trim($l), $matches)) {
29+ $favitas[] = array(
30+ 'host' => $matches[1],
31+ 'bbs' => $matches[2],
32+ 'itaj' => $matches[3],
33+ );
34+ }
35+ }
36+ }
37+ }
38+ return $favitas;
39+ }
40+
41+ /**
1342 * boardを全て読み込む
1443 *
1544 * @static
--- p2/trunk/lib/P2View.php (revision 975)
+++ p2/trunk/lib/P2View.php (revision 976)
@@ -13,8 +13,8 @@
1313 <?php if (UA::isWindowsPhoneIEMobile()) { ?>
1414 @import "./iui/iui_wpie.css";
1515 <?php } ?>
16-@import "./iui/smartphone.css?20140114";
17-@import "./iui/iui.css?20140114";
16+@import "./iui/smartphone.css?20140423";
17+@import "./iui/iui.css?20140423";
1818 </style>
1919 <?php
2020 }
--- p2/trunk/lib/ShowThreadK.php (revision 975)
+++ p2/trunk/lib/ShowThreadK.php (revision 976)
@@ -286,7 +286,7 @@
286286 // NGID変換
287287 } elseif ($isNgId) {
288288 $date_id = preg_replace(
289- '|ID: ?([0-9A-Za-z/.+]{8,11}).*|',
289+ '|ID: ?([0-9A-Za-z/.+]{8,15}).*|',
290290 "<s><font color=\"{$STYLE['read_ngword']}\">\\0</font></s>",
291291 $date_id
292292 );
@@ -319,7 +319,9 @@
319319
320320 // 名前
321321 if (strlen($name)) {
322- $tores .= $name;
322+ // 2014/04/20 名前が「</b><b>」となっているケースを2ch.scで見かけた。
323+ // http://sweet.2ch.sc/test/read.cgi/patisserie/1397235092/699-701n
324+ $tores .= '<b>' . $name . '</b>';
323325 }
324326
325327 // メール
@@ -342,11 +344,11 @@
342344 // {{ IDフィルタ
343345
344346 if ($_conf['flex_idpopup'] == 1) {
345- if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,11})|', $date_id, $matches)) {
347+ if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,15})|', $date_id, $matches)) {
346348 $idkey = $matches[1];
347349 if ($this->thread->idcount[$idkey] > 1) {
348350 $date_id = preg_replace_callback(
349- '|ID: ?([0-9A-Za-z/.+]{8,11})|',
351+ '|ID: ?([0-9A-Za-z/.+]{8,15})|',
350352 array($this, 'idfilter_callback'), $date_id
351353 );
352354 } else {
@@ -882,12 +884,27 @@
882884 {
883885 global $_conf;
884886
885- if (preg_match('{^http://(\\w+\\.(?:2ch\\.net|bbspink\\.com))/test/read\\.cgi/([^/]+)/([0-9]+)(?:/([^/]+)?)?$}', $url, $m)) {
886- $ls = isset($m[4]) ? $m[4] : null;
887- $read_url = "{$_conf['read_php']}?host={$m[1]}&bbs={$m[2]}&key={$m[3]}&ls={$ls}";
888- return sprintf('<a href="%s%s">%s</a>',
889- hs($read_url), $_conf['k_at_a'], $html
890- );
887+ // http://anchorage.2ch.net/test/read.cgi/occult/1238339367/
888+ // http://orz.2ch.io/p/-/tsushima.2ch.net/newsplus/1240991583/
889+ // http://c.2ch.net/test/-/occult/1229761545/i (未対応)
890+
891+ if (preg_match('{^http://(orz\.2ch\.io/p/-/)?(\\w+\\.(?:2ch\\.net|bbspink\\.com))/(test/read\\.cgi/)?([^/]+)/([1-9]\\d+)(?:/([^/]+)?)?$}', $url, $m)) {
892+
893+ if ($m[1] != '' xor $m[3] != '') {
894+ $ls = (!isset($m[6]) || $m[6] == 'i') ? '' : $m[6];
895+ $host = $m[2];
896+ $bbs = $m[4];
897+ $key = $m[5];
898+ $read_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}";
899+ if ($ls) {
900+ $read_url .= "&ls=$ls";
901+ } else {
902+ $read_url .= '&onlyone=1';
903+ }
904+ return sprintf('<a href="%s%s">%s</a>',
905+ hs($read_url), $_conf['k_at_a'], $html
906+ );
907+ }
891908 }
892909 return false;
893910 }
--- p2/trunk/lib/sb_print.inc.php (revision 975)
+++ p2/trunk/lib/sb_print.inc.php (revision 976)
@@ -60,11 +60,27 @@
6060 $class_sort_ikioi = ''; // 勢い
6161 $class_sort_bd = ''; // スレ立て日
6262 $class_sort_fav = ''; // お気にスレ
63- if ($GLOBALS['now_sort']) {
64- $nowsort_code = sprintf('$class_sort_%s = \' class="now_sort"\';', $GLOBALS['now_sort']);
65- eval($nowsort_code);
63+
64+ if (empty($_REQUEST['rsort'])) {
65+ ${'class_sort_' . $GLOBALS['now_sort']} = ' class="now_sort"';
66+ } else {
67+ ${'class_sort_' . $GLOBALS['now_sort']} = ' class="now_sort rsort"';
6668 }
6769
70+ // 逆順ソート用クエリ
71+ $rsortq_midoku = ''; // 新着
72+ $rsortq_res = ''; // レス
73+ $rsortq_no = ''; // No.
74+ $rsortq_title = ''; // タイトル
75+ $rsortq_ita = ''; // 板
76+ $rsortq_spd = ''; // すばやさ
77+ $rsortq_ikioi = ''; // 勢い
78+ $rsortq_bd = ''; // スレ立て日
79+ $rsortq_fav = ''; // お気に入り
80+ if (empty($_REQUEST['rsort'])) {
81+ ${'rsortq_' . $GLOBALS['now_sort']} = '&amp;rsort=1';
82+ }
83+
6884 $sortq_spmode = '';
6985 $sortq_host = '';
7086 $sortq_ita = '';
@@ -78,7 +94,7 @@
7894 $sortq_ita = "&amp;bbs={$aThreadList->bbs}";
7995 }
8096
81- $midoku_sort_ht = "<td class=\"tu\" nowrap><a{$class_sort_midoku} href=\"{$_conf['subject_php']}?sort=midoku{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\" style=\"white-space:nowrap;\"><nobr>新着</nobr></a></td>";
97+ $midoku_sort_ht = "<td class=\"tu\" nowrap><a{$class_sort_midoku} href=\"{$_conf['subject_php']}?sort=midoku{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_midoku}{$norefresh_q}\" target=\"_self\" style=\"white-space:nowrap;\"><nobr>新着</nobr></a></td>";
8298
8399 //=====================================================
84100 // テーブルヘッダHTML表示
@@ -93,7 +109,7 @@
93109
94110 // レス数
95111 if ($sb_view != "edit") {
96- echo "<td class=\"tn\" nowrap><a{$class_sort_res} href=\"{$_conf['subject_php']}?sort=res{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\">レス</a></td>";
112+ echo "<td class=\"tn\" nowrap><a{$class_sort_res} href=\"{$_conf['subject_php']}?sort=res{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_res}{$norefresh_q}\" target=\"_self\">レス</a></td>";
97113 }
98114
99115 // >>1
@@ -108,32 +124,32 @@
108124
109125 // No.
110126 $title = empty($aThreadList->spmode) ? " title=\"2ch標準の並び順番号\"" : '';
111- echo "<td class=\"to\"><a{$class_sort_no} href=\"{$_conf['subject_php']}?sort=no{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\"{$title}>No.</a></td>";
127+ echo "<td class=\"to\"><a{$class_sort_no} href=\"{$_conf['subject_php']}?sort=no{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_no}{$norefresh_q}\" target=\"_self\"{$title}>No.</a></td>";
112128
113129 // タイトル
114- echo "<td class=\"tl\"><a{$class_sort_title} href=\"{$_conf['subject_php']}?sort=title{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\">タイトル</a></td>";
130+ echo "<td class=\"tl\"><a{$class_sort_title} href=\"{$_conf['subject_php']}?sort=title{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_title}{$norefresh_q}\" target=\"_self\">タイトル</a></td>";
115131
116132 // 板
117133 if ($ita_name_bool) {
118- echo "<td class=\"t\"><a{$class_sort_ita} href=\"{$_conf['subject_php']}?sort=ita{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\">板</a></td>";
134+ echo "<td class=\"t\"><a{$class_sort_ita} href=\"{$_conf['subject_php']}?sort=ita{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_ita}{$norefresh_q}\" target=\"_self\">板</a></td>";
119135 }
120136
121137 // すばやさ
122138 if ($_conf['sb_show_spd']) {
123- echo "<td class=\"ts\"><a{$class_sort_spd} href=\"{$_conf['subject_php']}?sort=spd{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\">すばやさ</a></td>";
139+ echo "<td class=\"ts\"><a{$class_sort_spd} href=\"{$_conf['subject_php']}?sort=spd{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_spd}{$norefresh_q}\" target=\"_self\">すばやさ</a></td>";
124140 }
125141
126142 // 勢い
127143 if ($_conf['sb_show_ikioi']) {
128- echo "<td class=\"ti\"><a{$class_sort_ikioi} href=\"{$_conf['subject_php']}?sort=ikioi{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\" title=\"一日あたりのレス数\">勢い</a></td>";
144+ echo "<td class=\"ti\"><a{$class_sort_ikioi} href=\"{$_conf['subject_php']}?sort=ikioi{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_ikioi}{$norefresh_q}\" target=\"_self\" title=\"一日あたりのレス数\">勢い</a></td>";
129145 }
130146
131147 // スレ立て日
132- echo "<td class=\"t\"><a{$class_sort_bd} href=\"{$_conf['subject_php']}?sort=bd{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\">スレ立て日</a></td>";
148+ echo "<td class=\"t\"><a{$class_sort_bd} href=\"{$_conf['subject_php']}?sort=bd{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_bd}{$norefresh_q}\" target=\"_self\">スレ立て日</a></td>";
133149
134150 // お気に入り
135151 if ($_conf['sb_show_fav'] and $aThreadList->spmode != "taborn") {
136- echo "<td class=\"t\"><a{$class_sort_fav} href=\"{$_conf['subject_php']}?sort=fav{$sortq_spmode}{$sortq_host}{$sortq_ita}{$norefresh_q}\" target=\"_self\" title=\"お気にスレ\">☆</a></td>";
152+ echo "<td class=\"t\"><a{$class_sort_fav} href=\"{$_conf['subject_php']}?sort=fav{$sortq_spmode}{$sortq_host}{$sortq_ita}{$rsortq_fav}{$norefresh_q}\" target=\"_self\" title=\"お気にスレ\">☆</a></td>";
137153 }
138154
139155 echo "\n</tr>\n";
--- p2/trunk/post.php (revision 975)
+++ p2/trunk/post.php (revision 976)
@@ -53,7 +53,7 @@
5353
5454 $_conf['last_post_time_file'] = $_conf['pref_dir'] . '/last_post_time.txt';
5555 if (P2Util::isHost2chs($host)) {
56- $server_id = preg_replace('{\.2ch\.net$}', '', $host);
56+ $server_id = preg_replace('{\\.2ch\\.net$}', '', $host);
5757 $_conf['last_post_time_file'] = P2Util::idxDirOfHost($host, true) . rawurlencode($server_id) . '_' . 'last_post_time.txt';
5858 }
5959
@@ -136,7 +136,7 @@
136136 $submit = '書き込む';
137137
138138 if (!empty($_POST['newthread'])) {
139- $post = array(
139+ $post_to_bbs = array(
140140 $subject_k => $subject,
141141 $FROM_k => $FROM, $mail_k => $mail, $MESSAGE_k => $MESSAGE,
142142 $bbs_k => $bbs,
@@ -144,7 +144,7 @@
144144 $time_k => $time
145145 );
146146 if (P2Util::isHostJbbsShitaraba($host)) {
147- $post[$dir_k] = $dir;
147+ $post_to_bbs[$dir_k] = $dir;
148148 }
149149 $qs_sid = $qs = array(
150150 'host' => $host,
@@ -159,7 +159,7 @@
159159 $location_sid_url = UriUtil::buildQueryUri($_conf['subject_php'], $qs_sid);
160160
161161 } else {
162- $post = array(
162+ $post_to_bbs = array(
163163 $FROM_k => $FROM, $mail_k => $mail, $MESSAGE_k => $MESSAGE,
164164 $bbs_k => $bbs,
165165 $key_k => $key,
@@ -167,7 +167,7 @@
167167 $time_k => $time
168168 );
169169 if (P2Util::isHostJbbsShitaraba($host)) {
170- $post[$dir_k] = $dir;
170+ $post_to_bbs[$dir_k] = $dir;
171171 }
172172 $qs_sid = $qs = array(
173173 'host' => $host,
@@ -205,7 +205,7 @@
205205 }
206206
207207 if ($r = _getSID2ch()) {
208- $post['sid'] = $r;
208+ $post_to_bbs['sid'] = $r;
209209 }
210210 }
211211
@@ -213,8 +213,8 @@
213213
214214 // for hana mogera。クッキー確認画面ではpost、その後はcookieという仕様らしい。
215215 foreach ($_POST as $k => $v) {
216- if (!isset($post[$k]) and !in_array($k, $post_keys)) {
217- $post[$k] = $_POST[$k];
216+ if (!isset($post_to_bbs[$k]) and !in_array($k, $post_keys)) {
217+ $post_to_bbs[$k] = $_POST[$k];
218218 }
219219 }
220220
@@ -230,7 +230,7 @@
230230 //================================================================
231231
232232 // ポスト実行
233-$posted = _postIt($host, $bbs, $key, $post, $bbs_cgi); // @return boolean|string
233+$posted = _postIt($host, $bbs, $key, $post_to_bbs, $bbs_cgi); // @return boolean|string
234234
235235 // 最終投稿時間を記録する 確認処理
236236 if ($posted === true) {
@@ -562,7 +562,7 @@
562562 /**
563563 * @return array array($request, $send_host, $send_port)
564564 */
565-function _buildRequestForPost($host, $bbs, $key, $post, $bbs_cgi)
565+function _buildRequestForPost($host, $bbs, $key, $post_to_bbs, $bbs_cgi)
566566 {
567567 global $_conf, $_login;
568568
@@ -662,7 +662,7 @@
662662
663663 if (strtoupper($method) == 'POST') {
664664 $post_enc = array();
665- while (list($name, $value) = each($post)) {
665+ while (list($name, $value) = each($post_to_bbs)) {
666666
667667 if (!isset($value)) {
668668 continue;
@@ -696,11 +696,11 @@
696696 *
697697 * @return boolean|string 書き込み成功なら true、失敗なら false または失敗理由文字列
698698 */
699-function _postIt($host, $bbs, $key, $post, $bbs_cgi)
699+function _postIt($host, $bbs, $key, $post_to_bbs, $bbs_cgi)
700700 {
701701 global $_conf, $popup, $rescount, $ttitle_en, $STYLE, $post_cache;
702702
703- list($request, $send_host, $send_port) = _buildRequestForPost($host, $bbs, $key, $post, $bbs_cgi);
703+ list($request, $send_host, $send_port) = _buildRequestForPost($host, $bbs, $key, $post_to_bbs, $bbs_cgi);
704704
705705 $maru_kakiko = empty($_POST['maru_kakiko']) ? 0 : 1;
706706 P2Util::setConfUser('maru_kakiko', $maru_kakiko);
@@ -751,14 +751,19 @@
751751 }
752752 }
753753
754- // 転送は書き込み成功と判断
755- } elseif (
756- preg_match('/^Location: /', $l, $matches)
754+ // 転送
755+ } elseif (preg_match('/^Location: /', $l, $matches)) {
757756 // 板移転後だとこうなるみたい → http://www2.2ch.net/live.html(もうずっと人大杉)
758757 // (このエラー詳細を表示するようにした方が親切だが)
759- and !preg_match('{\\.2ch\\.net/live\\.html}', $l, $matches)
760- ) {
761- $post_seikou = true;
758+ if (!preg_match('{\\.2ch\\.(?:sc|net)/live\\.html}', $l, $matches)) {
759+ // 失敗
760+ // キャプチャ?
761+ } elseif (preg_match('/\\.2ch\\.sc/test/jail\\.cgi/', $l)) {
762+ // 失敗
763+ // それ以外の転送は書き込み成功と判断
764+ } else {
765+ $post_seikou = true;
766+ }
762767 }
763768 if ($l == "\r\n") {
764769 break;
@@ -784,16 +789,17 @@
784789 $response = preg_replace("{(<head>.*<META http-equiv=\"Content-Type\" content=\"text/html; charset=)EUC-JP(\">.*</head>)}is", "$1Shift_JIS$2", $response);
785790 }
786791
787- $kakikonda_match = '/<title>.*(書きこみました|書き込みました|書き込み終了 - SubAll BBS).*<\/title>/is';
792+ // 書き込み結果判定
793+ $kakikonda_match = '/<!-- 2ch_X:true -->|<title>[^<]*(?:書きこみました|書き込みました|書き込み終了 - SubAll BBS)[^<]*<\/title>/is';
788794 // 2ch.sc「<li>Cookieをきちんと受け取る設定になっていますか?</li>」
789- $cookie_kakunin_match = '/<!-- 2ch_X:cookie -->|<title>■ 書き込み確認 ■<\/title>|>書き込み確認。<|><li>Cookieをきちんと/';
795+ $cookie_kakunin_match = '/<!-- 2ch_X:cookie -->|<title>[^<]*書き込み確認[^<]*<\/title>|><li>Cookieをきちんと/i';
790796
791797 if (eregi("(<.+>)", $response, $matches)) {
792798 $response = $matches[1];
793799 }
794800
795- // カキコミ成功
796- if (preg_match($kakikonda_match, $response, $matches) or $post_seikou) {
801+ // 書き込み成功なら
802+ if (preg_match($kakikonda_match, $response) or $post_seikou) {
797803
798804 // クッキーの書き込み自動保存を消去する
799805 if (isset($_COOKIE['post_msg'])) {
@@ -815,8 +821,8 @@
815821 //$response_ht = hs($response);
816822 //echo "<pre>{$response_ht}</pre>";
817823
818- // ■cookie確認表示(post再チャレンジしてね)
819- } elseif (preg_match($cookie_kakunin_match, $response, $matches)) {
824+ // cookie確認表示(post再チャレンジしてね)
825+ } elseif (preg_match($cookie_kakunin_match, $response)) {
820826
821827 $htm['more_hidden_post'] = '';
822828 // p2用の追加キー
@@ -879,9 +885,14 @@
879885 //return false;
880886 return 'COOKIE';
881887
882- // その他はレスポンスをそのまま表示(結果はエラーとしてfalseを返す)
888+ // 結果を判別できなかった場合はレスポンスをそのまま表示する(戻り値はエラーとしてfalseを返す)
883889 } else {
884- $response = mb_ereg_replace('こちらでリロードしてください。<a href="\.\./[a-z]+/index\.html"> GO! </a><br>', "", $response);
890+ // p2メッセージを挿入
891+ $response = mb_eregi_replace('<body[^>]*>', '\\0<div style="border:solid 4px #ccc; padding:4px; background-color:#fff">p2 info: 書き込み結果ページを判別できませんでした。</div>', $response);
892+
893+ // 2ch用調整
894+ $response = mb_ereg_replace('こちらでリロードしてください。<a href="\.\./[a-z]+/index\.html"> GO! </a><br>', '', $response);
895+
885896 echo $response;
886897 return false;
887898 }
--- p2/trunk/read_filter_i.php (revision 975)
+++ p2/trunk/read_filter_i.php (revision 976)
@@ -79,8 +79,8 @@
7979 <?php
8080 P2View::printExtraHeadersHtml();
8181 ?>
82- <link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140114">
83- <link rel="stylesheet" type="text/css" href="./iui/read.css?20140114">
82+ <link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140423">
83+ <link rel="stylesheet" type="text/css" href="./iui/read.css?20140423">
8484 <title>スレ内検索</title>
8585 </head>
8686 <body<?php echo $body_at; ?>>
--- p2/trunk/iphone/sb_header_k.inc.php (revision 975)
+++ p2/trunk/iphone/sb_header_k.inc.php (revision 976)
@@ -139,7 +139,7 @@
139139 P2View::printStyleTagImportIuiCss(); ?>
140140 <script type="text/javascript" src="iphone/js/setfavjs.iphone.js?v=20061206"></script>
141141 <script type="text/javascript" src="js/basic.js?2012"></script>
142- <script type="text/javascript" src="iphone/js/iphone.js?2013060918"></script>
142+ <script type="text/javascript" src="iphone/js/iphone.js?20140423"></script>
143143 <script type="text/javascript" src="iphone/js/smartpopup.iPhone.js"></script>
144144 <script type="text/javascript">
145145 <!--
--- p2/trunk/iphone/ShowThreadK.php (revision 975)
+++ p2/trunk/iphone/ShowThreadK.php (revision 976)
@@ -308,7 +308,7 @@
308308 // NGID変換
309309 } elseif ($isNgId) {
310310 $date_id = preg_replace(
311- '|ID: ?([0-9A-Za-z/.+]{8,11}).*|',
311+ '|ID: ?([0-9A-Za-z/.+]{8,15}).*|',
312312 "<s><font color=\"{$STYLE['read_ngword']}\">\\0</font></s>",
313313 $date_id
314314 );
@@ -363,7 +363,7 @@
363363
364364 // 名前
365365 if (strlen($name)) {
366- $tores .= '<span class="tname">' . $name . '</span>';
366+ $tores .= '<span class="tname"><b>' . $name . '</b></span>';
367367 }
368368
369369 // メール
@@ -386,11 +386,11 @@
386386 // {{ IDフィルタ
387387
388388 if ($_conf['flex_idpopup'] == 1) {
389- if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,11})|', $date_id, $matches)) {
389+ if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,15})|', $date_id, $matches)) {
390390 $idkey = $matches[1];
391391 if ($this->thread->idcount[$idkey] > 1) {
392392 $date_id = preg_replace_callback(
393- '|ID: ?([0-9A-Za-z/.+]{8,11})|',
393+ '|ID: ?([0-9A-Za-z/.+]{8,15})|',
394394 array($this, 'idfilter_callback'), $date_id
395395 );
396396 } else {
@@ -593,7 +593,7 @@
593593
594594 // NGID変換
595595 } elseif ($isNgId) {
596- $date_id = preg_replace('|ID: ?([0-9A-Za-z/.+]{8,11}).*|', "<s><font color=\"{$STYLE['read_ngword']}\">\\0</font></s>", $date_id);
596+ $date_id = preg_replace('|ID: ?([0-9A-Za-z/.+]{8,15}).*|', "<s><font color=\"{$STYLE['read_ngword']}\">\\0</font></s>", $date_id);
597597 // $date_id = sprintf('<s><font color="%s">%s</font></s>', $STYLE['read_ngword'], $date_id);
598598 $msg = $kakunin_msg_ht;
599599 }
@@ -602,10 +602,10 @@
602602
603603 // IDフィルタ
604604 if ($_conf['flex_idpopup'] == 1) {
605- if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,11})|', $date_id, $matches)) {
605+ if (preg_match('|ID: ?([0-9a-zA-Z/.+]{8,15})|', $date_id, $matches)) {
606606 $idkey = $matches[1];
607607 if ($this->thread->idcount[$idkey] > 1) {
608- $date_id = preg_replace_callback('|ID: ?([0-9A-Za-z/.+]{8,11})|', array($this, 'idfilter_callback'), $date_id);
608+ $date_id = preg_replace_callback('|ID: ?([0-9A-Za-z/.+]{8,15})|', array($this, 'idfilter_callback'), $date_id);
609609 } else {
610610 if ($_conf['k_clip_unique_id']) {
611611 $date_id = $this->clipId($date_id, $matches[0]);
@@ -1152,8 +1152,12 @@
11521152 $host = $m[2];
11531153 $bbs = $m[4];
11541154 $key = $m[5];
1155- $read_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}&ls={$ls}";
1156-
1155+ $read_url = "{$_conf['read_php']}?host={$host}&bbs={$bbs}&key={$key}";
1156+ if ($ls) {
1157+ $read_url .= "&ls=$ls";
1158+ } else {
1159+ $read_url .= '&onlyone=1';
1160+ }
11571161 return sprintf('<a href="%s%s">%s</a>',
11581162 hs($read_url), $_conf['k_at_a'], $html
11591163 );
--- p2/trunk/iphone/read_header_k.inc.php (revision 975)
+++ p2/trunk/iphone/read_header_k.inc.php (revision 976)
@@ -246,7 +246,7 @@
246246 <script type="text/javascript" src="iphone/js/setfavjs.js?v=20090428"></script>
247247 <script type="text/javascript" src="js/post_form.js?v=20130624"></script>
248248 <script type="text/javascript" src="js/delelog.js?v=20130611"></script>
249- <script type="text/javascript" src="iphone/js/iphone.js?2013060918"></script>
249+ <script type="text/javascript" src="iphone/js/iphone.js?20140423"></script>
250250 <script type="text/javascript">
251251 <!--
252252 window.onload = function() {
@@ -284,8 +284,8 @@
284284 // -->
285285 </script>
286286
287- <link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140114">
288- <link rel="stylesheet" type="text/css" href="./iui/read.css?20140114">
287+ <link rel="stylesheet" type="text/css" href="./iui/smartphone.css?20140423">
288+ <link rel="stylesheet" type="text/css" href="./iui/read.css?20140423">
289289 <title><?php echo $ptitle_ht; ?></title>
290290 <?php
291291
--- p2/trunk/iphone/js/iphone.js (revision 975)
+++ p2/trunk/iphone/js/iphone.js (revision 976)
@@ -1,3 +1,17 @@
1+var gTapObj = null;
2+function startTap(obj)
3+{
4+ gTapObj = obj;
5+}
6+function resetTap()
7+{
8+ gTapObj = null;
9+}
10+function detectTap(obj)
11+{
12+ return (gTapObj == obj);
13+}
14+
115 /* read 次ボタンの横幅を拡張する(body oload後に実行) */
216 function expandLargeNextButton()
317 {
@@ -216,20 +230,20 @@
216230 buttonElements[0] = document.getElementById('searchRes');
217231 buttonElements[1] = document.getElementById('writeButton');
218232 buttonElements[2] = document.getElementById('etcButoon');
219-
233+
220234 for (var i = 0; i <= 2; i++) {
221235 if (i != arrayIdx) {
222236 if (buttonElements[i]) {
223- buttonElements[i].setAttribute('title', 'off'); // titleは条件ステータスの保持っぽい
224- }
237+ buttonElements[i].setAttribute('title', 'off'); // titleは条件ステータスの保持に利用している
238+ }
225239 }
226240 // 一旦全てを非表示にしている
227- if (buttonElements[i]) {
228- buttonElements[i].style.backgroundPositionY = '0'; // 通常状態(光っていない)
229- }
230- if (popElements[i]) {
231- popElements[i].style.display = 'none';
232- }
241+ if (buttonElements[i]) {
242+ buttonElements[i].style.backgroundPositionY = '0'; // 通常状態(光っていない)
243+ }
244+ if (popElements[i]) {
245+ popElements[i].style.display = 'none';
246+ }
233247 }
234248
235249 // 強制オン指定でなく、オフトグルまたはリセット(off)指定ならそのまま終了
--- p2/trunk/iphone/ShowBrdMenuK.php (revision 975)
+++ p2/trunk/iphone/ShowBrdMenuK.php (revision 976)
@@ -281,7 +281,7 @@
281281 }
282282
283283 /**
284- * お気に板をHTML表示する for 携帯
284+ * お気に板をHTML表示する for iPhone
285285 *
286286 * @access public
287287 * @return void
@@ -293,48 +293,47 @@
293293 $csrfid = P2Util::getCsrfId();
294294 $hr = P2View::getHrHtmlK();
295295
296- $show_flag = false;
296+ $favitas = BrdCtl::readFavItas();
297297
298- if (file_exists($_conf['favita_path']) and $lines = file($_conf['favita_path'])) {
298+ if ($favitas) {
299299 echo '<ul id="home"><li class="group">お気に入り一覧</li>';
300300 echo '<a class="tbutton" href="editfavita_i.php">編集</a>';
301301 // echo '<ul><li><a href="editfavita.php?b=k">編集</a></li><li class="group">お気に入り一覧</li>';
302302 $i = 0;
303- foreach ($lines as $l) {
303+ foreach ($favitas as $favita) {
304304 $i++;
305- $l = rtrim($l);
306- if (preg_match("/^\t?(.+)\t(.+)\t(.+)$/", $l, $matches)) {
307- $itaj = rtrim($matches[3]);
308- $attr = array();
309- $key_num_st = '';
310305
311- if ($i <= 9) {
312- $attr[$_conf['accesskey_for_k']] = $i;
313- $key_num_st = "$i.";
314- }
306+ extract($favita); // $host, $bbs, $itaj
307+
308+ $attr = array();
309+ $key_num_st = '';
315310
316- $atag = P2View::tagA(
317- UriUtil::buildQueryUri($_conf['subject_php'],
318- array(
319- 'host' => $matches[1],
320- 'bbs' => $matches[2],
321- 'itaj_en' => base64_encode($itaj),
322- UA::getQueryKey() => UA::getQueryValue()
323- )
324- ),
325- hs($itaj),
326- $attr
327- );
328-
329- if (UA::isIPhoneGroup()) {
330- echo '<li>' . $atag . '</li>';
331- } else {
332- echo $atag . '<br>';
333- }
334-
335- // [<a href="{$_SERVER['SCRIPT_NAME']}?host={$matches[1]}&amp;bbs={$matches[2]}&amp;setfavita=0&amp;csrfid={$csrfid}&amp;view=favita{$_conf['k_at_a']}">削</a>]
336- $show_flag = true;
311+ if ($i <= 9) {
312+ $attr[$_conf['accesskey_for_k']] = $i;
313+ $key_num_st = "$i.";
337314 }
315+
316+ $atag = P2View::tagA(
317+ UriUtil::buildQueryUri($_conf['subject_php'],
318+ array(
319+ 'host' => $host,
320+ 'bbs' => $bbs,
321+ 'itaj_en' => base64_encode($itaj),
322+ UA::getQueryKey() => UA::getQueryValue()
323+ )
324+ ),
325+ hs($itaj),
326+ $attr
327+ );
328+
329+ if (UA::isIPhoneGroup()) {
330+ echo '<li>' . $atag . '</li>';
331+ } else {
332+ echo $atag . '<br>';
333+ }
334+
335+ // [<a href="{$_SERVER['SCRIPT_NAME']}?host={$host}&amp;bbs={$bbs}&amp;setfavita=0&amp;csrfid={$csrfid}&amp;view=favita{$_conf['k_at_a']}">削</a>]
336+
338337 }
339338 if (UA::isIPhoneGroup()) {
340339 ?></ul><?php
@@ -341,7 +340,7 @@
341340 }
342341 }
343342
344- if (!$show_flag) {
343+ if (!$favitas) {
345344 ?><p>お気に板はまだないようだ</p><?php
346345 }
347346 }
--- p2/trunk/subject.php (revision 975)
+++ p2/trunk/subject.php (revision 976)
@@ -246,7 +246,7 @@
246246 if (!$aThreadList->spmode || $aThreadList->spmode == "news" and (strlen($GLOBALS['word_fm']) > 0)) {
247247
248248 $aThread->setThreadPathInfo($aThread->host, $aThread->bbs, $aThread->key);
249-
249+
250250 // マッチしなければスキップ
251251 if (!_matchSbFilter($aThread)) {
252252 unset($aThread);
@@ -360,6 +360,7 @@
360360 // 倉庫はオンラインを含まない
361361 if ($aThreadList->spmode == 'soko') {
362362 unset($aThread);
363+ $GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('subthre_check');
363364 continue;
364365
365366 } elseif ($aThreadList->spmode == 'taborn') {
@@ -470,8 +471,7 @@
470471 }
471472 }
472473
473- // {{{ 新着ソートの便宜上 (未取得スレッドの)unum をセット調整
474-
474+ // 新着ソートの便宜上 (未取得スレッドの)unum をセット調整
475475 if (!isset($aThread->unum)) {
476476 if (in_array($aThreadList->spmode, array('recent', 'res_hist', 'taborn'))) {
477477 $aThread->unum = -0.1;
@@ -480,8 +480,6 @@
480480 }
481481 }
482482
483- // }}}
484-
485483 // 勢いのセット
486484 $aThread->setDayRes();
487485
@@ -512,7 +510,7 @@
512510 }
513511
514512 // ソート
515-_sortThreads($aThreadList);
513+$aThreadList->sortThreads(!empty($_REQUEST['rsort']));
516514
517515 //===============================================================
518516 // HTMLプリント
@@ -529,10 +527,8 @@
529527 foreach ($aThreadList->threads as $at) {
530528 $at->torder = $soko_torder++;
531529 $newthreads[] = $at;
532- unset($at);
533530 }
534- $aThreadList->threads =& $newthreads;
535- unset($newthreads);
531+ $aThreadList->threads = $newthreads;
536532 }
537533 }
538534
@@ -547,11 +543,11 @@
547543 $newthreads = array();
548544 for ($i = $disp_navi['from']; $i <= $disp_navi['end']; $i++) {
549545 if ($aThreadList->threads[$i-1]) {
550- $newthreads[] =& $aThreadList->threads[$i-1];
546+ $newthreads[] = $aThreadList->threads[$i-1];
551547 }
552548 }
553- $aThreadList->threads =& $newthreads;
554- unset($newthreads);
549+ $aThreadList->threads = $newthreads;
550+
555551 $aThreadList->num = sizeof($aThreadList->threads);
556552
557553 // }}}
@@ -641,74 +637,6 @@
641637 }
642638
643639 /**
644- * スレ一覧($aThreadList->threads)をソートする
645- *
646- * @return void
647- */
648-function _sortThreads(&$aThreadList)
649-{
650- global $_conf;
651-
652- $GLOBALS['debug'] && $GLOBALS['profiler']->enterSection('sort');
653-
654- if ($aThreadList->threads) {
655- if (!empty($GLOBALS['wakati_words'])) {
656- $GLOBALS['now_sort'] = 'title';
657- usort($aThreadList->threads, 'cmp_similarity');
658-
659- } elseif ($GLOBALS['now_sort'] == 'midoku') {
660- if ($aThreadList->spmode == 'soko') {
661- usort($aThreadList->threads, 'cmp_key');
662- } else {
663- usort($aThreadList->threads, 'cmp_midoku');
664- }
665-
666- } elseif ($GLOBALS['now_sort'] == 'res') {
667- usort($aThreadList->threads, 'cmp_res');
668-
669- } elseif ($GLOBALS['now_sort'] == 'title') {
670- usort($aThreadList->threads, 'cmp_title');
671-
672- } elseif ($GLOBALS['now_sort'] == 'ita') {
673- usort($aThreadList->threads, 'cmp_ita');
674-
675- } elseif ($GLOBALS['now_sort'] == 'ikioi' || $GLOBALS['now_sort'] == 'spd') {
676- if ($_conf['cmp_dayres_midoku']) {
677- usort($aThreadList->threads, 'cmp_dayres_midoku');
678- } else {
679- usort($aThreadList->threads, 'cmp_dayres');
680- }
681-
682- } elseif ($GLOBALS['now_sort'] == 'bd') {
683- usort($aThreadList->threads, 'cmp_key');
684-
685- } elseif ($GLOBALS['now_sort'] == 'fav') {
686- usort($aThreadList->threads, 'cmp_fav');
687-
688- } if ($GLOBALS['now_sort'] == 'no') {
689- if ($aThreadList->spmode == 'soko') {
690- usort($aThreadList->threads, 'cmp_key');
691- } else {
692- usort($aThreadList->threads, 'cmp_no');
693- }
694- }
695- }
696-
697- // ニュースチェック
698- if ($aThreadList->spmode == 'news') {
699- for ($i = 0; $i < $threads_num ; $i++) {
700- if ($aThreadList->threads) {
701- $newthreads[] = array_shift($aThreadList->threads);
702- }
703- }
704- $aThreadList->threads = $newthreads;
705- $aThreadList->num = sizeof($aThreadList->threads);
706- }
707-
708- $GLOBALS['debug'] && $GLOBALS['profiler']->leaveSection('sort');
709-}
710-
711-/**
712640 * p2_setting 記録する
713641 *
714642 * @return boolean
@@ -1019,154 +947,6 @@
1019947 return false;
1020948 }
1021949
1022-//============================================================
1023-// ソート関数
1024-//============================================================
1025-
1026-/**
1027- * 新着ソート
1028- *
1029- * @return integer
1030- */
1031-function cmp_midoku($a, $b)
1032-{
1033- if ($a->new == $b->new) {
1034- if (($a->unum == $b->unum) or ($a->unum < 0) && ($b->unum < 0)) {
1035- return ($a->torder > $b->torder) ? 1 : -1;
1036- } else {
1037- return ($a->unum < $b->unum) ? 1 : -1;
1038- }
1039- } else {
1040- return ($a->new < $b->new) ? 1 : -1;
1041- }
1042-}
1043-
1044-/**
1045- * レス数 ソート
1046- *
1047- * @return integer
1048- */
1049-function cmp_res($a, $b)
1050-{
1051- if ($a->rescount == $b->rescount) {
1052- return ($a->torder > $b->torder) ? 1 : -1;
1053- } else {
1054- return ($a->rescount < $b->rescount) ? 1 : -1;
1055- }
1056-}
1057-
1058-/**
1059- * タイトル ソート
1060- *
1061- * @return integer
1062- */
1063-function cmp_title($a, $b)
1064-{
1065- if ($a->ttitle == $b->ttitle) {
1066- return ($a->torder > $b->torder) ? 1 : -1;
1067- } else {
1068- return strcmp($a->ttitle, $b->ttitle);
1069- }
1070-}
1071-
1072-/**
1073- * 板 ソート
1074- *
1075- * @return integer
1076- */
1077-function cmp_ita($a, $b)
1078-{
1079- if ($a->host != $b->host) {
1080- return strcmp($a->host, $b->host);
1081- } else {
1082- if ($a->itaj != $b->itaj) {
1083- return strcmp($a->itaj, $b->itaj);
1084- } else {
1085- return ($a->torder > $b->torder) ? 1 : -1;
1086- }
1087- }
1088-}
1089-
1090-/**
1091- * お気に ソート
1092- *
1093- * @return integer
1094- */
1095-function cmp_fav($a, $b)
1096-{
1097- if ($a->fav == $b->fav) {
1098- return ($a->torder > $b->torder) ? 1 : -1;
1099- } else {
1100- return strcmp($b->fav, $a->fav);
1101- }
1102-}
1103-
1104-/**
1105- * 勢いソート(新着レス優先)
1106- *
1107- * @return integer
1108- */
1109-function cmp_dayres_midoku($a, $b)
1110-{
1111- if ($a->new == $b->new) {
1112- if (($a->unum == $b->unum) or ($a->unum >= 1) && ($b->unum >= 1)) {
1113- return ($a->dayres < $b->dayres) ? 1 : -1;
1114- } else {
1115- return ($a->unum < $b->unum) ? 1 : -1;
1116- }
1117- } else {
1118- return ($a->new < $b->new) ? 1 : -1;
1119- }
1120-}
1121-
1122-/**
1123- * 勢いソート
1124- *
1125- * @return integer
1126- */
1127-function cmp_dayres($a, $b)
1128-{
1129- if ($a->new == $b->new) {
1130- return ($a->dayres < $b->dayres) ? 1 : -1;
1131- } else {
1132- return ($a->new < $b->new) ? 1 : -1;
1133- }
1134-}
1135-
1136-/**
1137- * key ソート
1138- *
1139- * @return integer
1140- */
1141-function cmp_key($a, $b)
1142-{
1143- return ($a->key < $b->key) ? 1 : -1;
1144-}
1145-
1146-/**
1147- * No. ソート
1148- *
1149- * @return integer
1150- */
1151-function cmp_no($a, $b)
1152-{
1153- return ($a->torder > $b->torder) ? 1 : -1;
1154-}
1155-
1156-/**
1157- * 類似性ソート
1158- *
1159- * @return integer
1160- */
1161-function cmp_similarity($a, $b)
1162-{
1163- if ($a->similarity == $b->similarity) {
1164- return ($a->key < $b->key) ? 1 : -1;
1165- } else {
1166- return ($a->similarity < $b->similarity) ? 1 : -1;
1167- }
1168-}
1169-
1170950 /*
1171951 * Local Variables:
1172952 * mode: php
--- p2/trunk/iui/read.css (revision 975)
+++ p2/trunk/iui/read.css (revision 976)
@@ -74,11 +74,11 @@
7474 -moz-box-sizing:border-box;
7575 -webkit-box-sizing:border-box;
7676 border-bottom:1px solid #2d3642;
77- border-top:1px solid #333333;/*#6d84a2*/
77+ border-top:1px solid #333;/*#6d84a2*/
7878 padding: 6px;
7979 height:45px;
8080 margin: 0;
81- background: #222; /* url(toolbar.png) #6d84a2 repeat-x; */
81+ background: #333; /* url(toolbar.png) #6d84a2 repeat-x; */
8282 }
8383
8484 /* ツールバーの真ん中の文字 read_new_i */
--- p2/trunk/iui/smartphone.css (revision 975)
+++ p2/trunk/iui/smartphone.css (revision 976)
@@ -19,7 +19,7 @@
1919 text-overflow: ellipsis;
2020 text-decoration: none;
2121 white-space: nowrap;
22- background: #333; border-radius: 5px;
22+ background: #444; border-radius: 5px;
2323 /* background: none;
2424 -webkit-border-image: url(toolButton.png) 0 5 0 5; */
2525 display:block;
@@ -33,7 +33,7 @@
3333 font-family: Helvetica;
3434 border-width: 0 8px 0 14px;
3535 /* background: #333; border-radius: 5px; min-width:46px; text-align:center */
36- background: none;
36+ background: none;
3737 -webkit-border-image: url(backButton.png?14011419) 0 8 0 14;
3838 }
3939
@@ -62,7 +62,8 @@
6262 width: auto; max-width: 88px;
6363 /* font-family: Helvetica; */
6464 border-width:0 8px 0 14px;
65- background: #333; border-radius: 5px; min-width:46px; text-align:center; left: 59px; padding-right: 4px; padding-left: 4px;
65+ /* background: #555; */
66+ border-radius: 5px; min-width:46px; text-align:center; left: 59px; padding-right: 4px; padding-left: 4px;
6667 /* -webkit-border-image:url(backButton.png) 0 8 0 14; */
6768 }
6869
@@ -165,8 +166,8 @@
165166
166167 #footToolbar {
167168 /* background-image: url(footback.png); */
168- background-color:#111;
169- opacity:0.8;
169+ background-color:#333;
170+ /* opacity:0.8; */
170171 width:100%;
171172 padding: 0;
172173 margin:0;
@@ -213,16 +214,16 @@
213214 background-position: -54px 0;
214215 opacity:0.2;
215216 }
216-.footbar > span.new {background-position: -107px 0;}
217-.footbar > span.new:hover {background-position: -107px -50px;}
218-.footbar > span.new_disabled {
217+.footbar > span#newButton {background-position: -107px 0;}
218+/* .footbar > span#newButton:hover {background-position: -107px -50px;} */
219+.footbar > span.newButton_disabled {
219220 background-position: -107px 0;
220221 opacity:0.2;
221222 }
222-.footbar > span.res {background-position: -160px 0;}
223-.footbar > span.res:hover {background-position: -160px -50px;}
224-.footbar > span.other {background-position: -212px 0;}
225-.footbar > span.other:hover {background-position: -212px -50px;}
223+.footbar > span#writeButton {background-position: -160px 0;}
224+.footbar > span#writeButton:hover {background-position: -160px -50px;}
225+.footbar > span#etcButoon {background-position: -212px 0;}
226+.footbar > span#etcButoon:hover {background-position: -212px -50px;}
226227 .footbar > span.next {background-position: -264px 0;}
227228 .footbar > span.next:hover {background-position: -264px -50px;}
228229 .footbar > span.next_disabled {
@@ -241,8 +242,8 @@
241242 .footbar > span.build:hover {background-position: -422px -50px;}
242243
243244 /* 新着まとめ読み */
244-.footbar > span.matome {background-position: -475px 0;}
245-.footbar > span.matome:hover {background-position: -475px -50px;}
245+.footbar > span.matomeButton {background-position: -475px 0;}
246+/* .footbar > span.matomeButton:hover {background-position: -475px -50px;} */
246247
247248 /* フッタツール その他のメニューポップアップ */
248249 #footbarEtc {
--- p2/trunk/iui/iui.css (revision 975)
+++ p2/trunk/iui/iui.css (revision 976)
@@ -63,10 +63,10 @@
6363 -moz-box-sizing: border-box;
6464 -webkit-box-sizing: border-box;
6565 border-bottom: 1px solid #2d3642;
66- border-top: 1px solid #000000; /* 初期値 #6d84a2 */
66+ border-top: 1px solid #333; /* 初期値 #6d84a2 */
6767 padding: 6px;
6868 height: 45px;
69- background: #222; /* url(toolbar.png) #6d84a2 repeat-x; */
69+ background: #333; /* url(toolbar.png) #6d84a2 repeat-x; */
7070 }
7171
7272
Afficher sur ancien navigateur de dépôt.