Changeset 18538


Ignore:
Timestamp:
2010/02/02 19:20:24 (11 years ago)
Author:
nanasess
bzr:base-revision:
svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/comu-ver2:18526
bzr:committer:
Kentaro Ohkouchi <ohkouchi@loop-az.jp>
bzr:file-ids:

data/app_initial.php 18500@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_4-dev%2Fdata%2Fapp_initial.php
data/class/SC_DbConn.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Fclass%2FSC_DbConn.php
data/install.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fdata%2Finstall.php
data/require_base.php 17578@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fcomu-ver2%2Fdata%2Frequire_base.php
data/require_classes.php 18500@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_4-dev%2Fdata%2Frequire_classes.php
data/require_safe.php 18500@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_4-dev%2Fdata%2Frequire_safe.php
html/admin/require.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Fadmin%2Frequire.php
html/error.php 18500@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_4-dev%2Fhtml%2Ferror.php
html/handle_error.php 18500@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Fversion-2_4-dev%2Fhtml%2Fhandle_error.php
html/mobile/require.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Fmobile%2Frequire.php
html/require.php 15078@1e3b908f-19a9-db11-a64c-001125224ba8:branches%2Ffeature-module-update%2Fhtml%2Frequire.php
bzr:mapping-version:
v4
bzr:repository-uuid:
1e3b908f-19a9-db11-a64c-001125224ba8
bzr:revision-id:
ohkouchi@loop-az.jp-20100202102020-4gxxa65jdcd55213
bzr:revno:
2152
bzr:revprop:branch-nick:
branches/comu-ver2
bzr:root:
branches/comu-ver2
bzr:text-parents:

data/class/SC_DbConn.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/comu-ver2:18487
data/install.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/comu-ver2:18234
data/require_base.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/comu-ver2:18370
html/admin/require.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/comu-ver2:18360
html/mobile/require.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/comu-ver2:18360
html/require.php svn-v4:1e3b908f-19a9-db11-a64c-001125224ba8:branches/comu-ver2:18318
bzr:timestamp:
2010-02-02 19:20:20.867000103 +0900
bzr:user-agent:
bzr2.0.4+bzr-svn1.0.1
svn:original-date:
2010-02-02T10:20:20.867000Z
Message:

merged r18500

  • エラーハンドリングの変更(#573, #567)
    • data/require_base.php で行っていた処理を data/app_initial.php, data/require_classes.php に分散
    • アプリケーション初期化時に, DBアクセスを伴わない data/require_safe.php を追加
    • システムエラー表示用の html/error.php を追加
    • エラーハンドリング処理を行う html/handle_error.php を追加
    • data/class/SC_DbConn.php でのエラーハンドリングを trigger_error に変更
    • エラーハンドリングの変更に伴い, html/require.php, html/mobile/require.php, html/admin/require.php を修正
Location:
branches/comu-ver2
Files:
5 added
6 edited

Legend:

Unmodified
Added
Removed
  • branches/comu-ver2/data/class/SC_DbConn.php

    r18487 r18538  
    221221 
    222222    function send_err_mail($pearResult, $sql){ 
    223         require_once(CLASS_EX_PATH . "page_extends/error/LC_Page_Error_SystemError_Ex.php"); 
    224          
    225         $objPage = new LC_Page_Error_SystemError_Ex(); 
    226         register_shutdown_function(array($objPage, "destroy")); 
    227         $objPage->init(); 
    228         $objPage->addDebugMsg($sql); 
    229         $objPage->pearResult = $pearResult; 
    230         GC_Utils_Ex::gfPrintLog($objPage->sfGetErrMsg()); 
    231         $objPage->process(); 
    232          
     223 
     224        $errmsg = $sql . "\n\n"; 
     225 
     226        // PEAR エラーを伴う場合 
     227        if (!is_null($pearResult)) { 
     228            $errmsg .= $pearResult->message . "\n\n"; 
     229            $errmsg .= $pearResult->userinfo . "\n\n"; 
     230            $errmsg .= SC_Utils_Ex::sfBacktraceToString($pearResult->backtrace); 
     231        } 
     232        // (上に該当せず)バックトレースを生成できる環境(一般的には PHP 4 >= 4.3.0, PHP 5)の場合 
     233        else if (function_exists("debug_backtrace")) { 
     234            $errmsg .= SC_Utils_Ex::sfBacktraceToString(array_slice(debug_backtrace(), 2)); 
     235        } 
     236 
     237        GC_Utils_Ex::gfPrintLog($errmsg); 
     238        trigger_error($errmsg, E_USER_ERROR); 
    233239        exit(); 
    234240    } 
     
    248254    } 
    249255} 
    250  
    251256?> 
  • branches/comu-ver2/data/install.php

    r18234 r18538  
    11<?php 
     2    define ('ECCUBE_INSTALL', 'ON'); 
     3    define ('SITE_URL', 'http://k-1.comu-ver2.ec-cube.net/'); 
     4    define ('SSL_URL', 'http://k-1.comu-ver2.ec-cube.net/'); 
     5    define ('URL_DIR', '/'); 
     6    define ('DOMAIN_NAME', ''); 
     7    define ('DB_TYPE', 'pgsql'); 
     8    define ('DB_USER', 'nanasess'); 
     9    define ('DB_PASSWORD', 'nanasess'); 
     10    define ('DB_SERVER', '127.0.0.1'); 
     11    define ('DB_NAME', 'eccube_db_comu_ver2'); 
     12    define ('DB_PORT', ''); 
     13    define ('MOBILE_HTML_PATH', HTML_PATH . 'mobile/'); 
     14    define ('MOBILE_SITE_URL', SITE_URL . 'mobile/'); 
     15    define ('MOBILE_SSL_URL', SSL_URL . 'mobile/'); 
     16    define ('MOBILE_URL_DIR', URL_DIR . 'mobile/'); 
    217?> 
  • branches/comu-ver2/data/require_base.php

    r18370 r18538  
    2626} 
    2727 
    28 if (!defined("CLASS_PATH")) { 
    29     /** クラスパス */ 
    30     define("CLASS_PATH", DATA_PATH . "class/"); 
    31 } 
     28// アプリケーション初期化処理 
     29require_once(DATA_PATH . "app_initial.php"); 
    3230 
    33 if (!defined("CLASS_EX_PATH")) { 
    34     /** クラスパス */ 
    35     define("CLASS_EX_PATH", DATA_PATH . "class_extends/"); 
    36 } 
     31// 各種クラス読み込み 
     32require_once(DATA_PATH . "require_classes.php"); 
    3733 
    38 if (!defined("CACHE_PATH")) { 
    39     /** キャッシュ生成ディレクトリ */ 
    40     define("CACHE_PATH", DATA_PATH . "cache/"); 
    41 } 
    42  
    43 require_once(CLASS_EX_PATH . "SC_Initial_Ex.php"); 
    44 // アプリケーション初期化処理 
    45 $objInit = new SC_Initial_Ex(); 
    46 $objInit->init(); 
    47  
    48 require_once(CLASS_EX_PATH . "util_extends/GC_Utils_Ex.php"); 
    49 require_once(CLASS_EX_PATH . "util_extends/SC_Utils_Ex.php"); 
    50 require_once(CLASS_EX_PATH . "db_extends/SC_DB_MasterData_Ex.php"); 
    51 require_once(CLASS_EX_PATH . "db_extends/SC_DB_DBFactory_Ex.php"); 
    52 require_once(CLASS_PATH . "SC_View.php"); 
    53 require_once(CLASS_PATH . "SC_DbConn.php"); 
    54 require_once(CLASS_PATH . "SC_Session.php"); 
    55 require_once(CLASS_PATH . "SC_Query.php"); 
    56 require_once(CLASS_PATH . "SC_SelectSql.php"); 
    57 require_once(CLASS_PATH . "SC_CheckError.php"); 
    58 require_once(CLASS_PATH . "SC_PageNavi.php"); 
    59 require_once(CLASS_PATH . "SC_Date.php"); 
    60 require_once(CLASS_PATH . "SC_Image.php"); 
    61 require_once(CLASS_PATH . "SC_UploadFile.php"); 
    62 require_once(CLASS_PATH . "SC_SiteInfo.php"); 
    63 require_once(CLASS_EX_PATH . "SC_SendMail_Ex.php"); 
    64 require_once(CLASS_PATH . "SC_FormParam.php"); 
    65 require_once(CLASS_PATH . "SC_CartSession.php"); 
    66 require_once(CLASS_PATH . "SC_SiteSession.php"); 
    67 require_once(CLASS_PATH . "SC_CampaignSession.php"); 
    68 require_once(CLASS_PATH . "SC_Customer.php"); 
    69 require_once(CLASS_PATH . "SC_CustomerList.php"); 
    70 require_once(CLASS_PATH . "SC_Cookie.php"); 
    71 require_once(CLASS_PATH . "SC_Pdf.php"); 
    72 require_once(CLASS_PATH . "SC_MobileUserAgent.php"); 
    73 require_once(CLASS_PATH . "SC_MobileEmoji.php"); 
    74 require_once(CLASS_PATH . "SC_MobileImage.php"); 
    75 require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_PageLayout_Ex.php"); 
    76 require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_DB_Ex.php"); 
    77 require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Mail_Ex.php"); 
    78 require_once(CLASS_EX_PATH . "helper_extends/SC_Helper_Mobile_Ex.php"); 
     34// モジュールの読み込み 
    7935require_once(DATA_PATH . "include/module.inc"); 
    8036 
  • branches/comu-ver2/html/admin/require.php

    r18360 r18538  
    2424// rtrim は PHP バージョン依存対策 
    2525define('HTML_PATH', rtrim(realpath(rtrim(realpath(dirname(__FILE__)), '/\\') . '/../'), '/\\') . '/'); 
     26define('ADMIN_FUNCTION', true); 
    2627 
     28require_once HTML_PATH . 'handle_error.php'; 
    2729require_once HTML_PATH . 'define.php'; 
    28 define('ADMIN_FUNCTION', true); 
     30 
    2931require_once HTML_PATH . HTML2DATA_DIR . 'require_base.php'; 
    3032 
  • branches/comu-ver2/html/mobile/require.php

    r18360 r18538  
    2525define("HTML_PATH", rtrim(realpath(rtrim(realpath(dirname(__FILE__)), '/\\') . '/../'), '/\\') . '/'); 
    2626 
     27require_once HTML_PATH . 'handle_error.php'; 
    2728require_once HTML_PATH . 'define.php'; 
    2829define('MOBILE_SITE', true); 
  • branches/comu-ver2/html/require.php

    r18318 r18538  
    2525define("HTML_PATH", rtrim(realpath(rtrim(realpath(dirname(__FILE__)), '/\\') . '/'), '/\\') . '/'); 
    2626 
     27require_once HTML_PATH . 'handle_error.php'; 
    2728require_once HTML_PATH . 'define.php'; 
    2829define('FRONT_FUNCTION_PC_SITE', true); 
Note: See TracChangeset for help on using the changeset viewer.