Changeset 18609 for tmp/version-2_5-test/data/class/SC_Initial.php
- Timestamp:
- 2010/03/11 10:35:11 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
tmp/version-2_5-test/data/class/SC_Initial.php
r18562 r18609 38 38 39 39 /** EC-CUBEのバージョン */ 40 define('ECCUBE_VERSION', "2.4.3"); 40 // XXX SVNのリビジョンを付加できたら良いと思う。(方法が分からない。) 41 define('ECCUBE_VERSION', "2.4.2-comu"); 41 42 } 42 43 … … 54 55 $this->defineDSN(); 55 56 $this->setErrorReporting(); 57 $this->defineDirectoryIndex(); 58 $this->defineErrorType(); 56 59 $this->defineConstants(); 57 60 $this->mbstringInit(); 58 61 $this->createCacheDir(); 62 $this->resetSuperglobalsRequest(); 59 63 } 60 64 … … 101 105 function setErrorReporting() { 102 106 error_reporting(E_ALL & ~E_NOTICE); 107 // PHP 5.3.0対応 108 if (error_reporting() > 6143) { 109 error_reporting(E_ALL & ~E_NOTICE & ~E_DEPRECATED); 110 } 103 111 } 104 112 … … 119 127 ini_set("mbstring.detect_order", "auto"); 120 128 ini_set("mbstring.substitute_character", "none"); 129 130 mb_language('ja'); // mb_internal_encoding() より前に 131 // TODO 他に mb_language() している箇所の削除を検討 132 // TODO .htaccess の mbstring.language を削除できないか検討 133 134 mb_internal_encoding(CHAR_CODE); // mb_language() より後で 135 // TODO 上の「ini_set("mbstring.internal_encoding", CHAR_CODE);」を削除できないか検討 136 // TODO .htaccess の mbstring.internal_encoding を削除できないか検討 137 121 138 //ロケールを明示的に設定 122 139 setlocale(LC_ALL, LOCALE); 140 } 141 142 /** 143 * 定数 DIR_INDEX_URL を設定する. 144 * 145 * @access protected 146 * @return void 147 */ 148 function defineDirectoryIndex() { 149 150 // DirectoryIndex の実ファイル名 151 if (!defined('DIR_INDEX_FILE')) { 152 define('DIR_INDEX_FILE', 'index.php'); 153 } 154 155 // DIR_INDEX_FILE にアクセスする時の URL のファイル名部を定義する 156 if (USE_FILENAME_DIR_INDEX === true) { 157 // ファイル名を使用する 158 define('DIR_INDEX_URL', DIR_INDEX_FILE); 159 } else { 160 // ファイル名を使用しない 161 define('DIR_INDEX_URL', ''); 162 } 123 163 } 124 164 … … 177 217 if (defined("HTML_PATH")) { 178 218 umask(0); 179 219 if (!file_exists(COMPILE_DIR)) { 180 220 mkdir(COMPILE_DIR); 181 221 } … … 194 234 } 195 235 } 236 237 /** 238 * エラー種別を定数定義 239 * 240 * @access protected 241 * @return void 242 */ 243 function defineErrorType() { 244 // LC_Page_Error用 245 /** 指定商品ページがない */ 246 define('PRODUCT_NOT_FOUND', 1); 247 /** カート内が空 */ 248 define('CART_EMPTY', 2); 249 /** ページ推移エラー */ 250 define('PAGE_ERROR', 3); 251 /** 購入処理中のカート商品追加エラー */ 252 define('CART_ADD_ERROR', 4); 253 /** 他にも購入手続きが行われた場合 */ 254 define('CANCEL_PURCHASE', 5); 255 /** 指定カテゴリページがない */ 256 define('CATEGORY_NOT_FOUND', 6); 257 /** ログインに失敗 */ 258 define('SITE_LOGIN_ERROR', 7); 259 /** 会員専用ページへのアクセスエラー */ 260 define('CUSTOMER_ERROR', 8); 261 /** 購入時の売り切れエラー */ 262 define('SOLD_OUT', 9); 263 /** カート内商品の読込エラー */ 264 define('CART_NOT_FOUND', 10); 265 /** ポイントの不足 */ 266 define('LACK_POINT', 11); 267 /** 仮登録者がログインに失敗 */ 268 define('TEMP_LOGIN_ERROR', 12); 269 /** URLエラー */ 270 define('URL_ERROR', 13); 271 /** ファイル解凍エラー */ 272 define('EXTRACT_ERROR', 14); 273 /** FTPダウンロードエラー */ 274 define('FTP_DOWNLOAD_ERROR', 15); 275 /** FTPログインエラー */ 276 define('FTP_LOGIN_ERROR', 16); 277 /** FTP接続エラー */ 278 define('FTP_CONNECT_ERROR', 17); 279 /** DB作成エラー */ 280 define('CREATE_DB_ERROR', 18); 281 /** DBインポートエラー */ 282 define('DB_IMPORT_ERROR', 19); 283 /** 設定ファイル存在エラー */ 284 define('FILE_NOT_FOUND', 20); 285 /** 書き込みエラー */ 286 define('WRITE_FILE_ERROR', 21); 287 /** DB接続エラー */ 288 define('DB_CONNECT_ERROR', 22); 289 /** フリーメッセージ */ 290 define('FREE_ERROR_MSG', 999); 291 292 // LC_Page_Error_DispError用 293 /** ログイン失敗 */ 294 define('LOGIN_ERROR', 1); 295 /** アクセス失敗(タイムアウト等) */ 296 define('ACCESS_ERROR', 2); 297 /** アクセス権限違反 */ 298 define('AUTH_ERROR', 3); 299 /** 不正な遷移エラー */ 300 define('INVALID_MOVE_ERRORR', 4); 301 } 302 303 /** 304 * スーパーグローバル変数「$_REQUEST」を再セット 305 * 306 * variables_order ディレクティブによる差を吸収する。 307 * 308 * @access protected 309 * @return void 310 */ 311 function resetSuperglobalsRequest() { 312 $_REQUEST = array_merge($_GET, $_POST); 313 } 196 314 } 197 315 ?>
Note: See TracChangeset
for help on using the changeset viewer.