svnno****@sourc*****
svnno****@sourc*****
2010年 1月 25日 (月) 23:10:16 JST
Revision: 805 http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=805 Author: rsk Date: 2010-01-25 23:10:15 +0900 (Mon, 25 Jan 2010) Log Message: ----------- expack: - ã³ãã³ãã©ã¤ã³ã§ã®ä¸¦åãã¦ã³ãã¼ãã§ãããã·è¨å®ã ç¡å¹ã«ãªã£ã¦ããã®ãä¿®æ£ã - E_NOTICEåæ¸ä¸ã Modified Paths: -------------- p2ex/trunk/conf/conf.inc.php p2ex/trunk/ic2.php p2ex/trunk/lib/bootstrap.php p2ex/trunk/lib/sb_footer.inc.php p2ex/trunk/post.php p2ex/trunk/read.php -------------- next part -------------- Modified: p2ex/trunk/conf/conf.inc.php =================================================================== --- p2ex/trunk/conf/conf.inc.php 2010-01-25 12:33:41 UTC (rev 804) +++ p2ex/trunk/conf/conf.inc.php 2010-01-25 14:10:15 UTC (rev 805) @@ -301,11 +301,6 @@ } } - // R}hC[hÅͱ±ÜÅ - if (defined('P2_CLI_RUN')) { - return; - } - // }}} include P2_LIB_DIR . '/bootstrap.php'; Modified: p2ex/trunk/ic2.php =================================================================== --- p2ex/trunk/ic2.php 2010-01-25 12:33:41 UTC (rev 804) +++ p2ex/trunk/ic2.php 2010-01-25 14:10:15 UTC (rev 805) @@ -459,8 +459,7 @@ ic2_finish($filepath, $thumb, $params, false); } -$params = array('uri' => $uri, 'host' => $host, 'name' => $name, 'size' => $size, 'md5' => $md5, - 'width' => $width, 'height' => $height, 'mime' => $mime, 'memo' => $memo); +$params = compact('uri', 'host', 'name', 'size', 'md5', 'width', 'height', 'mime', 'memo'); // t@CTCYªãÀðz¦Ä¢È¢©mF ic2_checkSizeOvered($tmpfile, $params); @@ -623,7 +622,7 @@ } else { $maxsize = (int)$maxsize; } - if (0 < $maxsize && $maxsize < $conent_length) { + if (0 < $maxsize) { $isError = true; $errmsg = "t@CTCYªå«·¬Ü·B(file:{$size}; max:{$maxsize};)"; } Modified: p2ex/trunk/lib/bootstrap.php =================================================================== --- p2ex/trunk/lib/bootstrap.php 2010-01-25 12:33:41 UTC (rev 804) +++ p2ex/trunk/lib/bootstrap.php 2010-01-25 14:10:15 UTC (rev 805) @@ -18,7 +18,9 @@ // ½ç©ÌRÅ[U[Ýèt@CªóêÄ¢½ç if (!is_array($conf_user)) { - if (unlink($_conf['conf_user_file'])) { + if (defined('P2_CLI_RUN')) { + p2die("[U[Ýèt@C {$dispname} ªÇÝßÈ©Á½©AóêĢܷB"); + } elseif (unlink($_conf['conf_user_file'])) { P2Util::pushInfoHtml('<p>[U[Ýèt@CªóêÄ¢½ÌÅíµÜµ½B</p>'); $conf_user = array(); } else { @@ -36,7 +38,7 @@ $config_version = '000000.0000'; } - if ($config_version !== $_conf['p2expack']) { + if ($config_version !== $_conf['p2expack'] && !defined('P2_CLI_RUN')) { // ÝèÌXV if ($migrators = p2_check_migration($config_version)) { $conf_user = p2_invoke_migrators($migrators, $conf_user); @@ -58,6 +60,11 @@ $save_conf_user = true; } +// R}hC[hÅͱ±ÜÅ +if (defined('P2_CLI_RUN')) { + return; +} + // Vµ¢[U[ÝèðVACYµÄÛ¶ if ($save_conf_user) { $conf_save = array('.' => $_conf['p2expack']); Modified: p2ex/trunk/lib/sb_footer.inc.php =================================================================== --- p2ex/trunk/lib/sb_footer.inc.php 2010-01-25 12:33:41 UTC (rev 804) +++ p2ex/trunk/lib/sb_footer.inc.php 2010-01-25 14:10:15 UTC (rev 805) @@ -82,7 +82,7 @@ // XyV[hÅȯêÎtH[üÍâ®======================== $ini_url_text = ''; if (!$aThreadList->spmode) { - if (P2Util::isHostJbbsShitaraba($aThread->host)) { // µ½çÎ + if (P2Util::isHostJbbsShitaraba($aThreadList->host)) { // µ½çÎ $ini_url_text = "http://{$aThreadList->host}/bbs/read.cgi?BBS={$aThreadList->bbs}&KEY="; } elseif (P2Util::isHostMachiBbs($aThreadList->host)) { // Ü¿BBS $ini_url_text = "http://{$aThreadList->host}/bbs/read.pl?BBS={$aThreadList->bbs}&KEY="; Modified: p2ex/trunk/post.php =================================================================== --- p2ex/trunk/post.php 2010-01-25 12:33:41 UTC (rev 804) +++ p2ex/trunk/post.php 2010-01-25 14:10:15 UTC (rev 805) @@ -377,7 +377,7 @@ $send_path = $bbs_cgi_url; } else { $send_host = $URL['host']; - $send_port = $URL['port']; + $send_port = isset($URL['port']) ? $URL['port'] : 80; $send_path = $URL['path'] . $URL['query']; } @@ -446,10 +446,13 @@ //echo '<h4>$request</h4><p>' . $request . "</p>"; //for debug fputs($fp, $request); + $start_here = false; + $post_seikou = false; + while (!p2_stream_eof($fp, $timed_out)) { if ($start_here) { - + $wr = ''; while (!p2_stream_eof($fp, $timed_out)) { $wr .= fread($fp, 164000); } @@ -459,7 +462,6 @@ } else { $l = fgets($fp, 164000); //echo $l .'<br>'; // for debug - $response_header_ht .= $l . '<br>'; // NbL[L^ if (preg_match('/Set-Cookie: (.+?)\\r\\n/', $l, $matches)) { //echo '<p>' . $matches[0] . '</p>'; // @@ -478,7 +480,7 @@ } } if ($p2cookies) { - unset($cookies_to_send); + $cookies_to_send = ''; foreach ($p2cookies as $cname => $cvalue) { if ($cname != 'expires') { $cookies_to_send .= " {$cname}={$cvalue};"; @@ -610,6 +612,7 @@ EOJS; } else { + $popup_ht = ''; $_conf['extra_headers_ht'] .= <<<EOP <meta http-equiv="refresh" content="1;URL={$location_noenc}"> EOP; @@ -651,6 +654,7 @@ if ($reload) { echo $popup_ht; } + $kakunin_ht = ''; } else { $kakunin_ht = <<<EOP <p><a href="{$location_ht}">mF</a></p> Modified: p2ex/trunk/read.php =================================================================== --- p2ex/trunk/read.php 2010-01-25 12:33:41 UTC (rev 804) +++ p2ex/trunk/read.php 2010-01-25 14:10:15 UTC (rev 805) @@ -70,7 +70,7 @@ if ($res_filter) { $res_filter_cont = serialize($res_filter); } - if ($res_filter_cont && !$popup_filter) { + if ($res_filter_cont && empty($popup_filter)) { if (FileCtl::file_write_contents($cachefile, $res_filter_cont) === false) { p2die('cannot write file.'); }