Changeset 21583
- Timestamp:
- 2012/03/04 04:46:21 (12 years ago)
- Location:
- branches/version-2_12-dev
- Files:
-
- 3 deleted
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/SC_Query.php
r21582 r21583 1038 1038 $arrStartInfo = array( 1039 1039 'http_request_id' => $arrInfo['http_request_id'], 1040 'time_start' => SC_Utils_Ex::sfMicrotimeFloat(),1040 'time_start' => microtime(true), 1041 1041 'count' => ++$arrInfo['count'], 1042 1042 ); … … 1068 1068 $msg = "[execute end {$arrStartInfo['http_request_id']}#{$arrStartInfo['count']}]\n"; 1069 1069 1070 $timeEnd = SC_Utils_Ex::sfMicrotimeFloat();1070 $timeEnd = microtime(true); 1071 1071 $timeExecTime = $timeEnd - $arrStartInfo['time_start']; 1072 1072 -
branches/version-2_12-dev/data/class/SC_View.php
r21573 r21583 61 61 62 62 if (ADMIN_MODE == '1') { 63 $this->time_start = SC_Utils_Ex::sfMicrotimeFloat();63 $this->time_start = microtime(true); 64 64 } 65 65 } … … 95 95 $res = $this->_smarty->fetch($template); 96 96 if (ADMIN_MODE == '1') { 97 $time_end = SC_Utils_Ex::sfMicrotimeFloat();97 $time_end = microtime(true); 98 98 $time = $time_end - $this->time_start; 99 99 $res .= '処理時間: ' . sprintf('%.3f', $time) . '秒'; … … 159 159 $this->_smarty->display($template); 160 160 if (ADMIN_MODE == '1') { 161 $time_end = SC_Utils_Ex::sfMicrotimeFloat();161 $time_end = microtime(true); 162 162 $time = $time_end - $this->time_start; 163 163 echo '処理時間: ' . sprintf('%.3f', $time) . '秒'; -
branches/version-2_12-dev/data/class/pages/LC_Page.php
r21582 r21583 86 86 function init() { 87 87 // 開始時刻を設定する。 88 $this->timeStart = SC_Utils_Ex::sfMicrotimeFloat();88 $this->timeStart = microtime(true); 89 89 90 90 $this->tpl_authority = $_SESSION['authority']; … … 166 166 // エラー画面の表示では $this->timeStart が出力されない 167 167 if (defined('PAGE_DISPLAY_TIME_LOG_MODE') && PAGE_DISPLAY_TIME_LOG_MODE == true && isset($this->timeStart)) { 168 $timeEnd = SC_Utils_Ex::sfMicrotimeFloat();168 $timeEnd = microtime(true); 169 169 $timeExecTime = $timeEnd - $this->timeStart; 170 170 if (defined('PAGE_DISPLAY_TIME_LOG_MIN_EXEC_TIME') && $timeExecTime >= (float)PAGE_DISPLAY_TIME_LOG_MIN_EXEC_TIME) { -
branches/version-2_12-dev/data/class/pages/LC_Page_Index.php
r21469 r21583 54 54 parent::process(); 55 55 $this->action(); 56 // class_exists('xxx'); 57 // 0/0; 58 // new xxx; 59 // $objQuery = new SC_Query_Ex(); 60 // $objQuery->select('***'); 61 // trigger_error('試験的なエラー発生です。'); 56 62 $this->sendResponse(); 57 63 } -
branches/version-2_12-dev/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php
r21582 r21583 41 41 function init() { 42 42 // 開始時刻を設定する。 43 $this->timeStart = SC_Utils_Ex::sfMicrotimeFloat();43 $this->timeStart = microtime(true); 44 44 45 45 $this->tpl_authority = $_SESSION['authority']; -
branches/version-2_12-dev/data/class/util/SC_Utils.php
r21582 r21583 1744 1744 1745 1745 /** 1746 * プラグインが配置されているディレクトリ(フルパス)を取得する 1747 * 1748 * @param string $file プラグイン情報ファイル(info.php)のパス 1749 * @return SimpleXMLElement プラグイン XML 1750 */ 1751 function sfGetPluginFullPathByRequireFilePath($file) { 1752 return str_replace('\\', '/', dirname($file)) . '/'; 1753 } 1754 1755 /** 1756 * プラグインのパスを取得する 1757 * 1758 * @param string $pluginFullPath プラグインが配置されているディレクトリ(フルパス) 1759 * @return SimpleXMLElement プラグイン XML 1760 */ 1761 function sfGetPluginPathByPluginFullPath($pluginFullPath) { 1762 return basename(rtrim($pluginFullPath, '/')); 1763 } 1764 1765 /** 1766 * プラグイン情報配列の基本形を作成する 1767 * 1768 * @param string $file プラグイン情報ファイル(info.php)のパス 1769 * @return array プラグイン情報配列 1770 */ 1771 function sfMakePluginInfoArray($file) { 1772 $fullPath = SC_Utils_Ex::sfGetPluginFullPathByRequireFilePath($file); 1773 1774 return 1775 array( 1776 // パス 1777 'path' => SC_Utils_Ex::sfGetPluginPathByPluginFullPath($fullPath), 1778 // プラグイン名 1779 'name' => '未定義', 1780 // フルパス 1781 'fullpath' => $fullPath, 1782 // バージョン 1783 'version' => null, 1784 // 著作者 1785 'auther' => '未定義', 1786 ) 1787 ; 1788 } 1789 1790 /** 1791 * プラグイン情報配列を取得する 1792 * 1793 * TODO include_once を利用することで例外対応をサボタージュしているのを改善する。 1794 * 1795 * @param string $path プラグインのディレクトリ名 1796 * @return array プラグイン情報配列 1797 */ 1798 function sfGetPluginInfoArray($path) { 1799 return (array)include_once PLUGIN_REALDIR . "$path/plugin_info.php"; 1800 } 1801 1802 /** 1803 * プラグイン XML を読み込む 1804 * 1805 * TODO 空だったときを考慮 1806 * 1807 * @return SimpleXMLElement プラグイン XML 1808 * @deprecated 1809 */ 1810 function sfGetPluginsXml() { 1811 return simplexml_load_file(PLUGIN_REALDIR . 'plugins.xml'); 1812 } 1813 1814 /** 1815 * プラグイン XML を書き込む 1816 * 1817 * @param SimpleXMLElement $pluginsXml プラグイン XML 1818 * @return integer ファイルに書き込まれたバイト数を返します。 1819 * @deprecated 1820 */ 1821 function sfPutPluginsXml($pluginsXml) { 1822 if (version_compare(PHP_VERSION, '5.0.0', '>')) { 1823 return; 1824 } 1825 1826 $xml = $pluginsXml->asXML(); 1827 if (strlen($xml) == 0) trigger_error('', E_USER_ERROR); 1828 1829 $return = file_put_contents(PLUGIN_REALDIR . 'plugins.xml', $pluginsXml->asXML()); 1830 if ($return === false) trigger_error('', E_USER_ERROR); 1831 return $return; 1832 } 1833 1834 function sfLoadPluginInfo($filenamePluginInfo) { 1835 return (array)include_once $filenamePluginInfo; 1836 } 1837 1838 /** 1839 * 現在の Unix タイムスタンプを float (秒単位) でマイクロ秒まで返す 1840 * 1841 * PHP4の上位互換用途。 1842 * @param SimpleXMLElement $pluginsXml プラグイン XML 1843 * @return integer ファイルに書き込まれたバイト数を返します。 1746 * 前方互換用 1747 * 1748 * @deprecated 2.12.0 microtime(true) を使用する。 1844 1749 */ 1845 1750 function sfMicrotimeFloat() { 1846 $microtime = microtime(true); 1847 if (is_string($microtime)) { 1848 list($usec, $sec) = explode(' ', microtime()); 1849 return (float)$usec + (float)$sec; 1850 } 1851 return $microtime; 1751 trigger_error('前方互換用メソッドが使用されました。', E_USER_WARNING); 1752 return microtime(true); 1852 1753 } 1853 1754 -
branches/version-2_12-dev/data/mtb_constants_init.php
r21582 r21583 383 383 /** 画像リネーム設定 (商品画像のみ) (true:リネームする、false:リネームしない) */ 384 384 define('IMAGE_RENAME', true); 385 /** プラグインディレクトリ */386 define('PLUGIN_DIR', "plugins/");387 /** プラグイン保存先 */388 define('PLUGIN_REALDIR', USER_REALDIR . PLUGIN_DIR);389 /** プラグイン URL */390 define('PLUGIN_URL', USER_URL . PLUGIN_DIR);391 385 /** プラグイン保存先 */ 392 386 define('PLUGIN_UPLOAD_REALDIR', DATA_REALDIR . "downloads/plugin/"); 393 387 /** プラグイン外部ファイル保存先 */ 394 388 define('PLUGIN_HTML_REALDIR', HTML_REALDIR . "plugin/"); 395 /** プラグイン・ディレクトリパーミッション */396 define('PLUGIN_DIR_PERMISSION', 0777);397 389 /** プラグインファイル一時保存先 */ 398 390 define('PLUGIN_TEMP_REALDIR', HTML_REALDIR . "upload/temp_plugin/"); 399 391 /** アップロード一時ディレクトリ */ 400 392 define('DOWNLOADS_TEMP_DIR', DATA_REALDIR . "downloads/tmp/"); 401 /** プラグイン 外部ファイルURL */402 define('PLUGIN_HTML_URL', USER_URL . PLUGIN_DIR);403 393 /** プラグインファイル登録可能拡張子(カンマ区切り) */ 404 394 define('PLUGIN_EXTENSION', "tar,tar.gz"); -
branches/version-2_12-dev/html/install/sql/insert_data.sql
r21582 r21583 1225 1225 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('OPTION_FAVOFITE_PRODUCT', '1', 523, 'お気に入り商品登録(有効:1 無効:0)'); 1226 1226 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('IMAGE_RENAME', 'true', 525, '画像リネーム設定 (商品画像のみ) (true:リネームする、false:リネームしない)'); 1227 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PLUGIN_DIR', '"plugins/"', 600, 'プラグインディレクトリ');1228 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PLUGIN_REALDIR', 'USER_REALDIR . PLUGIN_DIR', 601, 'プラグイン保存先');1229 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PLUGIN_URL', 'USER_URL . PLUGIN_DIR', 602, 'プラグイン URL');1230 1227 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PLUGIN_UPLOAD_REALDIR', 'DATA_REALDIR . "downloads/plugin/"', 604, 'プラグイン保存先'); 1231 1228 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PLUGIN_HTML_REALDIR', 'HTML_REALDIR . "plugin/"', 605, 'プラグイン外部ファイル保存先'); 1232 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PLUGIN_DIR_PERMISSION', '0777', 607, 'プラグイン・ディレクトリパーミッション');1233 1229 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PLUGIN_TEMP_REALDIR', 'HTML_REALDIR . "upload/temp_plugin/"', 608, 'プラグインファイル一時保存先'); 1234 1230 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('DOWNLOADS_TEMP_DIR', 'DATA_REALDIR . "downloads/tmp/"', 609, 'アップロード一時ディレクトリ'); 1235 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PLUGIN_HTML_URL', 'USER_URL . PLUGIN_DIR', 610, 'プラグイン 外部ファイルURL');1236 1231 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('PLUGIN_EXTENSION', '"tar,tar.gz"', 611, 'プラグインファイル登録可能拡張子(カンマ区切り)'); 1237 1232 INSERT INTO mtb_constants (id, name, rank, remarks) VALUES ('DOWNLOADS_TEMP_PLUGIN_UPDATE_DIR', 'DOWNLOADS_TEMP_DIR . "plugin_update/"', 612, 'プラグイン一時展開用ディレクトリ(アップデート用)');
Note: See TracChangeset
for help on using the changeset viewer.