[P2-php-svn] [944] p2/ for version 1.8.86

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2013年 5月 24日 (金) 14:58:33 JST


Revision: 944
          http://sourceforge.jp/projects/p2-php/scm/svn/commits/944
Author:   akid
Date:     2013-05-24 14:58:32 +0900 (Fri, 24 May 2013)
Log Message:
-----------
p2/ for version 1.8.86

Modified Paths:
--------------
    p2/trunk/conf/conf_system.inc.php
    p2/trunk/doc/ChangeLog.txt
    p2/trunk/httpcmd.php
    p2/trunk/info.php
    p2/trunk/info_i.php
    p2/trunk/lib/HostCheck.php
    p2/trunk/lib/downloadDatMachiBbs.func.php
    p2/trunk/lib/global.funcs.php
    p2/trunk/subject.php
    p2/trunk/subject_i.php

-------------- next part --------------
Modified: p2/trunk/conf/conf_system.inc.php
===================================================================
--- p2/trunk/conf/conf_system.inc.php	2013-04-09 17:06:50 UTC (rev 943)
+++ p2/trunk/conf/conf_system.inc.php	2013-05-24 05:58:32 UTC (rev 944)
@@ -3,7 +3,7 @@
 // \x82\xB1\x82̃t\x83@\x83C\x83\x8B\x82́A\x93\xC1\x82ɗ\x9D\x97R\x82̖\xB3\x82\xA2\x8C\xC0\x82\xE8\x95ύX\x82\xB5\x82Ȃ\xA2\x82ʼn\xBA\x82\xB3\x82\xA2\x81B
 // include from conf.inc.php
 
-$_conf['p2version'] = '1.8.85'; // rep2\x82̃o\x81[\x83W\x83\x87\x83\x93
+$_conf['p2version'] = '1.8.86'; // rep2\x82̃o\x81[\x83W\x83\x87\x83\x93
 
 $_conf['p2name'] = 'rep2';    // rep2\x82̖\xBC\x91O\x81B
 

Modified: p2/trunk/doc/ChangeLog.txt
===================================================================
--- p2/trunk/doc/ChangeLog.txt	2013-04-09 17:06:50 UTC (rev 943)
+++ p2/trunk/doc/ChangeLog.txt	2013-05-24 05:58:32 UTC (rev 944)
@@ -1,3 +1,8 @@
+2013/05/24
+	* rep2 version 1.8.86
+
+        [\x8DX\x90V] \x82܂\xBFBBS\x82̎d\x97l\x95ύX\x82ɑΉ\x9E\x82\xB5\x82\xBD\x81B
+
 2013/04/10
 	* rep2 version 1.8.85
 

Modified: p2/trunk/httpcmd.php
===================================================================
--- p2/trunk/httpcmd.php	2013-04-09 17:06:50 UTC (rev 943)
+++ p2/trunk/httpcmd.php	2013-05-24 05:58:32 UTC (rev 944)
@@ -9,23 +9,7 @@
 
 $_login->authorize(); // \x83\x86\x81[\x83U\x94F\x8F\xD8
 
-// {{{ HTTP\x83w\x83b\x83_\x82\xC6XML\x90錾
 
-P2Util::headerNoCache();
-if (UA::isSafariGroup()) {
-    header('Content-Type: application/xml; charset=UTF-8');
-    $xmldecTag = '<' . '?xml version="1.0" encoding="UTF-8" ?' . '>' . "\n";
-} else {
-    header('Content-Type: text/html; charset=Shift_JIS');
-    // \x94\xBC\x8Ap\x82Łu\x81H\x81\x84\x81v\x82\xAA\x93\xFC\x82\xC1\x82Ă镶\x8E\x9A\x97\xF1\x82\xF0\x83R\x83\x81\x83\x93\x83g\x82ɂ\xB7\x82\xE9\x82ƃp\x81[\x83X\x83G\x83\x89\x81[
-    //$xmldecTag = '<' . '?xml version="1.0" encoding="Shift_JIS" ?' . '>' . "\n";
-    $xmldecTag = '';
-}
-
-// }}}
-
-$r_msg_ht = '';
-
 // cmd\x82\xAA\x8Ew\x92肳\x82\xEA\x82Ă\xA2\x82Ȃ\xAF\x82\xEA\x82΁A\x89\xBD\x82\xE0\x95Ԃ\xB3\x82\xB8\x82ɏI\x97\xB9
 if (!isset($_GET['cmd']) && !isset($_POST['cmd'])) {
     die;
@@ -39,6 +23,8 @@
 }
 
 
+$r_msg_ht = '';
+
 // {{{ \x83\x8D\x83O\x8D폜
 
 if ($cmd == 'delelog') { 
@@ -86,7 +72,25 @@
     $r_msg_ht = mb_convert_encoding($r_msg_ht, 'UTF-8', 'SJIS-win');
 }
 
+
+// ====
+
 // \x8C\x8B\x89ʏo\x97\xCD
+
+// {{{ HTTP\x83w\x83b\x83_\x82\xC6XML\x90錾
+
+P2Util::headerNoCache();
+if (UA::isSafariGroup()) {
+    header('Content-Type: application/xml; charset=UTF-8');
+    echo '<' . '?xml version="1.0" encoding="UTF-8" ?' . '>' . "\n";
+} else {
+    header('Content-Type: text/html; charset=Shift_JIS');
+    // \x94\xBC\x8Ap\x82Łu\x81H\x81\x84\x81v\x82\xAA\x93\xFC\x82\xC1\x82Ă镶\x8E\x9A\x97\xF1\x82\xF0\x83R\x83\x81\x83\x93\x83g\x82ɂ\xB7\x82\xE9\x82ƃp\x81[\x83X\x83G\x83\x89\x81[\x82ƂȂ\xE9
+    // echo '<' . '?xml version="1.0" encoding="Shift_JIS" ?' . '>' . "\n";
+}
+
+// }}}
+
 echo $xmldecTag;
 echo $r_msg_ht;
 

Modified: p2/trunk/info.php
===================================================================
--- p2/trunk/info.php	2013-04-09 17:06:50 UTC (rev 943)
+++ p2/trunk/info.php	2013-05-24 05:58:32 UTC (rev 944)
@@ -77,22 +77,22 @@
 // }}}
 
 // \x82\xA8\x8BC\x82ɓ\xFC\x82\xE8\x83X\x83\x8C\x83b\x83h
-} elseif (isset($_GET['setfav'])) {
+} elseif (isset($_GET['setfav']) && strlen($_GET['setfav'])) {
     require_once P2_LIB_DIR . '/setFav.func.php';
     setFav($host, $bbs, $key, $_GET['setfav']);
 
 // \x93a\x93\xB0\x93\xFC\x82\xE8
-} elseif (isset($_GET['setpal'])) {
+} elseif (isset($_GET['setpal']) && strlen($_GET['setpal'])) {
     require_once P2_LIB_DIR . '/setPalace.func.php';
     setPalace($host, $bbs, $key, $_GET['setpal']);
 
 // \x83X\x83\x8C\x83b\x83h\x82\xA0\x82ځ[\x82\xF1
-} elseif (isset($_GET['taborn'])) {
+} elseif (isset($_GET['taborn']) && strlen($_GET['taborn'])) {
     require_once P2_LIB_DIR . '/settaborn.func.php';
     settaborn($host, $bbs, $key, $_GET['taborn']);
     
 // \x83N\x83b\x83L\x81[\x8D폜
-} elseif (isset($_GET['clearbbscookie'])) {
+} elseif (!empty($_GET['clearbbscookie'])) {
     P2Util::deleteBbsCookieFilePathByHost($host);
 }
 

Modified: p2/trunk/info_i.php
===================================================================
--- p2/trunk/info_i.php	2013-04-09 17:06:50 UTC (rev 943)
+++ p2/trunk/info_i.php	2013-05-24 05:58:32 UTC (rev 944)
@@ -79,22 +79,22 @@
 // }}}
 
 // \x82\xA8\x8BC\x82ɓ\xFC\x82\xE8\x83X\x83\x8C\x83b\x83h
-} elseif (isset($_GET['setfav'])) {
+} elseif (isset($_GET['setfav']) && strlen($_GET['setfav'])) {
     require_once P2_LIB_DIR . '/setFav.func.php';
     setFav($host, $bbs, $key, $_GET['setfav']);
 
 // \x93a\x93\xB0\x93\xFC\x82\xE8
-} elseif (isset($_GET['setpal'])) {
+} elseif (isset($_GET['setpal']) && strlen($_GET['setpal'])) {
     require_once P2_LIB_DIR . '/setPalace.func.php';
     setPalace($host, $bbs, $key, $_GET['setpal']);
 
 // \x83X\x83\x8C\x83b\x83h\x82\xA0\x82ځ[\x82\xF1
-} elseif (isset($_GET['taborn'])) {
+} elseif (isset($_GET['taborn']) && strlen($_GET['taborn'])) {
     require_once P2_LIB_DIR . '/settaborn.func.php';
     settaborn($host, $bbs, $key, $_GET['taborn']);
     
 // \x83N\x83b\x83L\x81[\x8D폜
-} elseif (isset($_GET['clearbbscookie'])) {
+} elseif (!empty($_GET['clearbbscookie'])) {
     P2Util::deleteBbsCookieFilePathByHost($host);
 }
 

Modified: p2/trunk/lib/HostCheck.php
===================================================================
--- p2/trunk/lib/HostCheck.php	2013-04-09 17:06:50 UTC (rev 943)
+++ p2/trunk/lib/HostCheck.php	2013-05-24 05:58:32 UTC (rev 944)
@@ -973,7 +973,7 @@
         // http://qb5.2ch.net/test/read.cgi/operate/1235553306/974
         // http://developer.emnet.ne.jp/ipaddress.html
         $bands = array(
-            '60.254.209.99/32',
+            '60.254.209.99/32', // EMnet \x83v\x83\x8D\x83L\x83V\x82Ȃ\xB5 http://takagi-hiromitsu.jp/diary/20080722.html
             '117.55.1.224/27'
         );
         return HostCheck::isAddrInBand($addr, $bands);

Modified: p2/trunk/lib/downloadDatMachiBbs.func.php
===================================================================
--- p2/trunk/lib/downloadDatMachiBbs.func.php	2013-04-09 17:06:50 UTC (rev 943)
+++ p2/trunk/lib/downloadDatMachiBbs.func.php	2013-05-24 05:58:32 UTC (rev 944)
@@ -97,9 +97,9 @@
     return true;
 }
 
-
+//require_once 'Var_Dump.php';
 /**
- * \x82܂\xBFBBS\x82\xCCread.cgi\x82œǂݍ\x9E\x82\xF1\x82\xBEHTML\x82\xF0dat\x82ɕϊ\xB7\x82\xB7\x82\xE9
+ * \x82܂\xBFBBS\x82\xCCread.cgi(Shift_JIS)\x82œǂݍ\x9E\x82\xF1\x82\xBEHTML\x82\xF0dat\x82ɕϊ\xB7\x82\xB7\x82\xE9
  *
  * @access  private
  * @return  array|false
@@ -131,20 +131,20 @@
                 continue;
             }
             
-        } elseif (preg_match('~^<dt>(?:<a[^>]+?>)?(\d+)(?:</a>)? \x96\xBC\x91O\x81F(<font color="#.+?">|<a href="mailto:(.*)">)<b> (.+) </b>(</font>|</a>) \x93\x8A\x8De\x93\xFA\x81F (.+)<br><dd>(.*) <br><br>$~i', $ml, $matches)) {
+        } elseif (preg_match('~^<dt>(?:<a[^>]+?>)?(\d+)(?:</a>)? \x96\xBC\x91O\x81F(?:<font color="#.+?">)?(?:<a href="mailto:(.*)">)?<b> (.+) </b>(?:</a>)?(?:</font>)? ?\x93\x8A\x8De\x93\xFA\x81F (.+)<br><dd>(.*) <br><br>$~i', $ml, $matches)) {
             $order = $matches[1];
-            $mail  = $matches[3];
-            $name  = preg_replace('~<font color="?#.+?"?>(.+)</font>~i', '$1', $matches[4]);
-            $date  = $matches[6];
-            $body  = $matches[7];
+            $mail  = $matches[2];
+            $name  = preg_replace('~<font color="?#.+?"?>(.+)</font>~i', '$1', $matches[3]);
+            $date  = $matches[4];
+            $body  = $matches[5];
             
         // IP\x95t\x82̏ꍇ\x82\xCD2\x8Ds\x82ɓn\x82\xE9
-        } elseif (preg_match('~^<dt>(?:<a[^>]+?>)?(\d+)(?:</a>)? \x96\xBC\x91O\x81F(<font color="#.+?">|<a href="mailto:(.*)">)<b> (.+) </b>(</font>|</a>) \x93\x8A\x8De\x93\xFA\x81F (.+) <font size=1>\[(.*)$~i', $ml, $matches)) {
+        } elseif (preg_match('~^<dt>(?:<a[^>]+?>)?(\d+)(?:</a>)? \x96\xBC\x91O\x81F(?<font color="#.+?">)?(?:<a href="mailto:(.*)">)?<b> (.+) </b>(?:</a>)?(?:</font>)? ?\x93\x8A\x8De\x93\xFA\x81F (.+) <font size=1>\[(.*)$~i', $ml, $matches)) {
             $order = $matches[1];
-            $mail  = $matches[3];
-            $name  = preg_replace('~<font color="?#.+?"?>(.+)</font>~i', '$1', $matches[4]);
-            $date  = $matches[6];
-            $ip    = trim($matches[7]);
+            $mail  = $matches[2];
+            $name  = preg_replace('~<font color="?#.+?"?>(.+)</font>~i', '$1', $matches[3]);
+            $date  = $matches[4];
+            $ip    = trim($matches[5]);
             $tuduku = true;
             continue;
             

Modified: p2/trunk/lib/global.funcs.php
===================================================================
--- p2/trunk/lib/global.funcs.php	2013-04-09 17:06:50 UTC (rev 943)
+++ p2/trunk/lib/global.funcs.php	2013-05-24 05:58:32 UTC (rev 944)
@@ -9,7 +9,8 @@
  */
 function hs($str, $alt = '', $quoteStyle = ENT_QUOTES)
 {
-    return (isset($str) && strlen($str)) ? htmlspecialchars($str, $quoteStyle, 'Shift_JIS') : $alt;
+    // 'ISO-8859-1'
+    return strlen($str) ? htmlspecialchars($str, $quoteStyle, 'Shift_JIS') : $alt;
 }
 
 /**

Modified: p2/trunk/subject.php
===================================================================
--- p2/trunk/subject.php	2013-04-09 17:06:50 UTC (rev 943)
+++ p2/trunk/subject.php	2013-05-24 05:58:32 UTC (rev 944)
@@ -111,12 +111,12 @@
     }
 
 // \x82\xA8\x8BC\x82ɓ\xFC\x82\xE8\x83X\x83\x8C\x83b\x83h
-} elseif (isset($_GET['setfav']) && $_GET['key'] && $host && $bbs) {
+} elseif (isset($_GET['setfav']) && strlen($_GET['setfav']) && $_GET['key'] && $host && $bbs) {
     require_once P2_LIB_DIR . '/setFav.func.php';
     setFav($host, $bbs, $_GET['key'], $_GET['setfav']);
 
 // \x93a\x93\xB0\x93\xFC\x82\xE8
-} elseif (isset($_GET['setpal']) && $_GET['key'] && $host && $bbs) {
+} elseif (isset($_GET['setpal']) && strlen($_GET['setpal']) && $_GET['key'] && $host && $bbs) {
     require_once P2_LIB_DIR . '/setPalace.func.php';
     setPalace($host, $bbs, $_GET['key'], $_GET['setpal']);
 
@@ -126,7 +126,7 @@
     settaborn_off($host, $bbs, $_POST['checkedkeys']);
 
 // \x83X\x83\x8C\x83b\x83h\x82\xA0\x82ځ[\x82\xF1
-} elseif (isset($_GET['taborn']) && !is_null($_GET['key']) && $host && $bbs) {
+} elseif (isset($_GET['taborn']) && strlen($_GET['taborn']) && !is_null($_GET['key']) && $host && $bbs) {
     require_once P2_LIB_DIR . '/settaborn.func.php';
     settaborn($host, $bbs, $_GET['key'], $_GET['taborn']);
 }

Modified: p2/trunk/subject_i.php
===================================================================
--- p2/trunk/subject_i.php	2013-04-09 17:06:50 UTC (rev 943)
+++ p2/trunk/subject_i.php	2013-05-24 05:58:32 UTC (rev 944)
@@ -112,12 +112,12 @@
     }
 
 // \x82\xA8\x8BC\x82ɓ\xFC\x82\xE8\x83X\x83\x8C\x83b\x83h
-} elseif (isset($_GET['setfav']) && $_GET['key'] && $host && $bbs) {
+} elseif (isset($_GET['setfav']) && strlen($_GET['setfav']) && $_GET['key'] && $host && $bbs) {
     require_once P2_LIB_DIR . '/setFav.func.php';
     setFav($host, $bbs, $_GET['key'], $_GET['setfav']);
 
 // \x93a\x93\xB0\x93\xFC\x82\xE8
-} elseif (isset($_GET['setpal']) && $_GET['key'] && $host && $bbs) {
+} elseif (isset($_GET['setpal']) && strlen($_GET['setpal']) && $_GET['key'] && $host && $bbs) {
     require_once P2_LIB_DIR . '/setPalace.func.php';
     setPalace($host, $bbs, $_GET['key'], $_GET['setpal']);
 



P2-php-svn メーリングリストの案内
Back to archive index