[P2-php-svn] [925] p2/ for version 1.8.73

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 10月 1日 (土) 07:24:33 JST


Revision: 925
          http://sourceforge.jp/projects/p2-php/svn/view?view=rev&revision=925
Author:   akid
Date:     2011-10-01 07:24:32 +0900 (Sat, 01 Oct 2011)

Log Message:
-----------
p2/ for version 1.8.73
[修正] したらばのログ表示時にエラーとなることがあったのを修正した。
[更新] Windows Phoneでの表示をより最適化した。

Modified Paths:
--------------
    p2/trunk/conf/conf_system.inc.php
    p2/trunk/doc/ChangeLog.txt
    p2/trunk/iui/iui.css
    p2/trunk/lib/FileCtl.php
    p2/trunk/lib/UA.php
    p2/trunk/lib/downloadDatShitaraba.func.php


-------------- next part --------------
Modified: p2/trunk/conf/conf_system.inc.php
===================================================================
--- p2/trunk/conf/conf_system.inc.php	2011-09-29 16:53:45 UTC (rev 924)
+++ p2/trunk/conf/conf_system.inc.php	2011-09-30 22:24:32 UTC (rev 925)
@@ -3,7 +3,7 @@
 // ‚±‚̃tƒ@ƒCƒ‹‚́A“Á‚É——R‚Ì–³‚¢ŒÀ‚è•ÏX‚µ‚È‚¢‚ʼnº‚³‚¢B
 // include from conf.inc.php
 
-$_conf['p2version'] = '1.8.72'; // rep2‚̃o[ƒWƒ‡ƒ“
+$_conf['p2version'] = '1.8.73'; // rep2‚̃o[ƒWƒ‡ƒ“
 
 $_conf['p2name'] = 'rep2';    // rep2‚Ì–¼‘OB
 

Modified: p2/trunk/doc/ChangeLog.txt
===================================================================
--- p2/trunk/doc/ChangeLog.txt	2011-09-29 16:53:45 UTC (rev 924)
+++ p2/trunk/doc/ChangeLog.txt	2011-09-30 22:24:32 UTC (rev 925)
@@ -1,3 +1,9 @@
+2011/10/01
+	* rep2 version 1.8.73
+
+	[C³] ‚µ‚½‚ç‚΂̃ƒO•\Ž¦Žž‚ɃGƒ‰[‚ƂȂ邱‚Æ‚ª‚ ‚Á‚½‚Ì‚ðC³‚µ‚½B
+	[XV] Windows Phone‚Å‚Ì•\Ž¦‚ð‚æ‚èÅ“K‰»‚µ‚½B
+
 2011/09/30
 	* rep2 version 1.8.72
 

Modified: p2/trunk/iui/iui.css
===================================================================
--- p2/trunk/iui/iui.css	2011-09-29 16:53:45 UTC (rev 924)
+++ p2/trunk/iui/iui.css	2011-09-30 22:24:32 UTC (rev 925)
@@ -5,6 +5,14 @@
 ‘S‘̂̃tƒHƒ“ƒgÝ’è
 ‰¡ƒuƒŒ–hŽ~AƒtƒH[ƒ€ƒ{ƒ^ƒ“—p
 */
+
+/* for Windows Phone IE Mobile */
+* {
+    margin: 0;
+    padding: 0;
+    border: 0;
+}
+
 body {
 	margin: 0;
 	font-family: Helvetica;

Modified: p2/trunk/lib/FileCtl.php
===================================================================
--- p2/trunk/lib/FileCtl.php	2011-09-29 16:53:45 UTC (rev 924)
+++ p2/trunk/lib/FileCtl.php	2011-09-30 22:24:32 UTC (rev 925)
@@ -316,8 +316,10 @@
         if (!ftruncate($fp, 0)) {
             return false;
         }
-        if (!fwrite($fp, $cont)) {
-            return false;
+        if (strlen($cont)) {
+            if (!fwrite($fp, $cont)) {
+                return false;
+            }
         }
         //ftruncate($fp, ftell($fp));
 

Modified: p2/trunk/lib/UA.php
===================================================================
--- p2/trunk/lib/UA.php	2011-09-29 16:53:45 UTC (rev 924)
+++ p2/trunk/lib/UA.php	2011-09-30 22:24:32 UTC (rev 925)
@@ -543,6 +543,26 @@
         
         return (boolean)preg_match('/Safari|AppleWebKit|Konqueror/', $ua);
     }
+    
+    /**
+     * UA‚ªWindows Phone‚ÌIE Mobile‚È‚ç true ‚ð•Ô‚·
+     *
+     * @static
+     * @access  public
+     * @param   string   $ua  UA‚ðŽw’è‚·‚é‚È‚ç
+     * @return  boolean
+     */
+    function isWindowsPhoneIEMobile($ua)
+    {
+        if (is_null($ua) and isset($_SERVER['HTTP_USER_AGENT'])) {
+            $ua = $_SERVER['HTTP_USER_AGENT'];
+        }
+        
+        if (false !== strpos($ua, 'Windows Phone OS') && false !== strpos($ua, 'IEMobile')) {
+            return true;
+        }
+        return false;
+    }
 }
 
 /*

Modified: p2/trunk/lib/downloadDatShitaraba.func.php
===================================================================
--- p2/trunk/lib/downloadDatShitaraba.func.php	2011-09-29 16:53:45 UTC (rev 924)
+++ p2/trunk/lib/downloadDatShitaraba.func.php	2011-09-30 22:24:32 UTC (rev 925)
@@ -45,7 +45,7 @@
     
     FileCtl::mkdirFor($tempfile);
     $machiurl_res = P2Util::fileDownload($machiurl, $tempfile);
-    
+    ;
     if (!$machiurl_res or !$machiurl_res->is_success()) {
         $ThreadRead->diedat = true;
         return false;
@@ -69,7 +69,7 @@
     /*
     // iJBBSjERROR!: ƒXƒŒƒbƒh‚ª‚ ‚è‚Ü‚¹‚ñB‰ß‹ŽƒƒO‘qŒÉ‚É‚à‚ ‚è‚Ü‚¹‚ñB
     if (preg_match("/^ERROR.*$/i", $mlines[0], $matches)) {
-        $ThreadRead->pushDownloadDatErrorMsgHtml($matches[0]);
+        $ThreadRead->pushDownloadDatErrorMsgHtml($matches[0]. '<br>');
         $ThreadRead->diedat = true;
         return false;
     }
@@ -88,7 +88,7 @@
                 $cont .= "‚ ‚ځ[‚ñ<>‚ ‚ځ[‚ñ<>‚ ‚ځ[‚ñ<>‚ ‚ځ[‚ñ<>\n";
             }
         }
-        
+
         $done = false;
         if ($fp = fopen($ThreadRead->keydat, 'ab+')) {
             flock($fp, LOCK_EX);



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