[P2-php-svn] [826] expack:

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2010年 1月 30日 (土) 22:00:09 JST


Revision: 826
          http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=826
Author:   rsk
Date:     2010-01-30 22:00:07 +0900 (Sat, 30 Jan 2010)

Log Message:
-----------
expack:
- rev.100130.2200.
- まちBBSのdat取得で、あぼーんレスの扱いを考慮していなかった不具合を修正。

Modified Paths:
--------------
    p2ex/trunk/conf/conf.inc.php
    p2ex/trunk/lib/DownloadDatMachiBbs.php


-------------- next part --------------
Modified: p2ex/trunk/conf/conf.inc.php
===================================================================
--- p2ex/trunk/conf/conf.inc.php	2010-01-30 11:01:56 UTC (rev 825)
+++ p2ex/trunk/conf/conf.inc.php	2010-01-30 13:00:07 UTC (rev 826)
@@ -7,7 +7,7 @@
 // ƒo[ƒWƒ‡ƒ“î•ñ
 $_conf = array(
     'p2version' => '1.7.29+1.8.x',  // rep2‚̃o[ƒWƒ‡ƒ“
-    'p2expack'  => '100130.2000',   // Šg’£ƒpƒbƒN‚̃o[ƒWƒ‡ƒ“
+    'p2expack'  => '100130.2200',   // Šg’£ƒpƒbƒN‚̃o[ƒWƒ‡ƒ“
     'p2name'    => 'expack',        // rep2‚Ì–¼‘O
 );
 

Modified: p2ex/trunk/lib/DownloadDatMachiBbs.php
===================================================================
--- p2ex/trunk/lib/DownloadDatMachiBbs.php	2010-01-30 11:01:56 UTC (rev 825)
+++ p2ex/trunk/lib/DownloadDatMachiBbs.php	2010-01-30 13:00:07 UTC (rev 826)
@@ -88,10 +88,25 @@
         flock($fp, LOCK_EX);
 
         foreach ($lines as $i => $line) {
-            if (substr_count($line, '<>') >= 4) { // Œµ–§‚É‚Í "=== 5"
-                // s“ª‚Ì "ƒŒƒX”ԍ†<>" ‚Í•Û‘¶‚µ‚È‚¢
-                fwrite($fp, substr($line, strpos($line, '<>') + 2));
-                $thread->gotnum++;
+            // Žæ“¾Ï‚݃ŒƒX”‚ðƒCƒ“ƒNƒŠƒƒ“ƒg
+            $thread->gotnum++;
+            // s‚𕪉ðA—v‘f”ƒ`ƒFƒbƒN (Œµ–§‚É‚Í === 6)
+            $lar = explode('<>', rtrim($line));
+            if (count($lar) >= 5) {
+                // ƒŒƒX”ԍ†‚Í•Û‘¶‚µ‚È‚¢‚Ì‚ÅŽæ‚èo‚·
+                $resnum = (int)array_shift($lar);
+                // ƒŒƒX”ԍ†‚Ǝ擾Ï‚݃ŒƒX”‚ªˆÙ‚È‚Á‚Ä‚¢‚½‚ç‚ ‚ځ[‚ñˆµ‚¢
+                while ($thread->gotnum < $resnum) {
+                    $abn = "‚ ‚ځ[‚ñ<>‚ ‚ځ[‚ñ<>‚ ‚ځ[‚ñ<>‚ ‚ځ[‚ñ<>";
+                    if ($thread->gotnum == 1) {
+                        $abn .= $lar[4];
+                    }
+                    $abn .= "\n";
+                    fwrite($fp, $abn);
+                    $thread->gotnum++;
+                }
+                // s‚ð‘‚«ž‚Þ
+                fwrite($fp, implode('<>', $lar) . "\n");
             } else {
                 $lineno = $i + 1;
                 P2Util::pushInfoHtml("<p>rep2 info: dat‘Ž®ƒGƒ‰[: line {$lineno} of {$url}.</p>");



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