From: sakamocchi Date: Mon, 21 Mar 2011 02:55:14 +0000 (+0000) Subject: Fix benchmark processing. X-Git-Tag: release-3-64~19 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=1a65bf4f0a9c6734b6570429131f352452a0bc5a;p=nucleus-jp%2Fnucleus-jp-ancient.git Fix benchmark processing. git-svn-id: https://svn.sourceforge.jp/svnroot/nucleus-jp/nucleus-jp/trunk@1176 1ca29b6e-896d-4ea0-84a5-967f57386b96 --- diff --git a/utf8/nucleus/documentation/tips.html b/utf8/nucleus/documentation/tips.html index 57a8e1c..5755329 100755 --- a/utf8/nucleus/documentation/tips.html +++ b/utf8/nucleus/documentation/tips.html @@ -332,6 +332,8 @@ mysql -u username -p -h hostname databasename < アクセス専用のphpファイルを作成する:
<?php
+include('./benchmark.inc');
+$CONF = array();
 $CONF['Self'] = 'copy.php';
 include('./config.php');
 selectBlog('shortblogname');
diff --git a/utf8/nucleus/libs/ADMIN.php b/utf8/nucleus/libs/ADMIN.php
index 9a562f6..faa9c49 100755
--- a/utf8/nucleus/libs/ADMIN.php
+++ b/utf8/nucleus/libs/ADMIN.php
@@ -3391,7 +3391,8 @@ class ADMIN {
 
 		

<?php
-
+include('./benchmark.inc');
+$CONF = array();
 $CONF['Self'] = '.php';
 
 include('./config.php');
diff --git a/utf8/nucleus/libs/BaseActions.php b/utf8/nucleus/libs/BaseActions.php
index dd89f74..660e3d0 100644
--- a/utf8/nucleus/libs/BaseActions.php
+++ b/utf8/nucleus/libs/BaseActions.php
@@ -75,16 +75,34 @@ class BaseActions {
 	// parsed include
 	function parse_parsedinclude($filename) {
 		// check current level
-		if ($this->level > 3) return;	// max. depth reached (avoid endless loop)
+		if ($this->level > 3)
+		{
+			return;	// max. depth reached (avoid endless loop)
+		}
+		global $skinid;
+		$skin = new SKIN($skinid);
 		$file = $this->getIncludeFileName($filename);
-		if (!file_exists($file)) return;
-		$contents = file_get_contents($file);
-		if (empty($contents)) return;
-		
+		if (!$skin->isValid && !file_exists($file))
+		{
+			return;
+		}
+		$contents = $skin->getContent($filename);
+		if (!$contents)
+		{
+			if (!file_exists($file))
+			{
+				return;
+			}
+			$contents = file_get_contents($file);
+			if (empty($contents))
+			{
+				return;
+			}
+		}
 		$this->level = $this->level + 1;
 		// parse file contents
 		$this->parser->parse($contents);
-		
+
 		$this->level = $this->level - 1;
 	}
 
diff --git a/utf8/skins/default/inc/show_benchmark.inc b/utf8/skins/default/inc/show_benchmark.inc
index 5a991c4..ecd2bf5 100644
--- a/utf8/skins/default/inc/show_benchmark.inc
+++ b/utf8/skins/default/inc/show_benchmark.inc
@@ -10,6 +10,5 @@ if (!function_exists('getmtime'))
 
   global $StartTime, $SQLCount;
   $loadtime = getmtime() - $StartTime;
-  $var = mb_convert_encoding("%.3f 秒/%d クエリ", _CHARSET, 'UTF-8');
-  printf($var, $loadtime, $SQLCount);
+  printf("%.3f sec/%d queries", $loadtime, $SQLCount);
 ?>
diff --git a/utf8/skins/default/skinbackup.xml b/utf8/skins/default/skinbackup.xml
index 1162e4e..129b634 100644
--- a/utf8/skins/default/skinbackup.xml
+++ b/utf8/skins/default/skinbackup.xml
@@ -166,7 +166,7 @@
 ]]>
 
 		" />
-<%phpinclude(benchmark)%>
+<%phpinclude(inc/benchmark.inc)%>