Changeset 20135


Ignore:
Timestamp:
2011/02/11 15:16:08 (13 years ago)
Author:
yomoro
Message:

#985 リファクタリング

Location:
branches/version-2_5-dev/data/class/pages/error
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/error/LC_Page_Error_DispError.php

    r20116 r20135  
    4545    function init() { 
    4646        parent::init(); 
    47         $this->tpl_mainpage = 'login_error.tpl'; 
     47        $this->tpl_mainpage = 'error.tpl'; 
     48        $this->tpl_title = 'ログインエラー'; 
    4849    } 
    4950 
     
    5455     */ 
    5556    function process() { 
    56         $objView = new SC_AdminView(); 
    57  
     57        $this->action(); 
     58        $this->sendResponse(); 
     59    } 
     60     
     61    /** 
     62     * Page のプロセス。 
     63     * 
     64     * @return void 
     65     */ 
     66    function action(){ 
    5867        switch ($this->type) { 
    5968            case LOGIN_ERROR: 
     
    7382                break; 
    7483        } 
    75  
    76         $objView->assignobj($this); 
    77         $objView->display(LOGIN_FRAME); 
    7884    } 
    7985 
  • branches/version-2_5-dev/data/class/pages/error/LC_Page_Error_SystemError.php

    r19987 r20135  
    5353     */ 
    5454    function init() { 
    55         parent::init(); 
    56  
    57         $this->tpl_title = 'システムエラー'; 
    58         $this->adminPage = SC_Utils_Ex::sfIsAdminFunction(); 
    59  
    60         if ($this->adminPage) { 
    61             $this->tpl_mainpage = 'login_error.tpl'; 
    62             $this->frame = LOGIN_FRAME; 
    63         } else { 
    64             $this->frame = SITE_FRAME; 
    65         } 
     55        parent::init(); 
     56        $this->tpl_mainpage = 'error.tpl'; 
     57         $this->tpl_title = 'システムエラー'; 
    6658    } 
    6759 
     
    7264     */ 
    7365    function process() { 
    74         require_once CLASS_REALDIR . 'SC_MobileUserAgent.php'; 
     66        $this->action(); 
     67        $this->sendResponse(); 
     68    } 
    7569 
     70    /** 
     71     * Page のプロセス。 
     72     * 
     73     * @return void 
     74     */ 
     75    function action(){ 
     76        $this->adminPage = SC_Utils_Ex::sfIsAdminFunction(); 
     77 
     78        if ($this->adminPage) { 
     79            $this->tpl_mainpage = 'login_error.tpl'; 
     80            $this->frame = LOGIN_FRAME; 
     81        } else { 
     82            $this->frame = SITE_FRAME; 
     83        } 
     84         
    7685        $objView = null; 
    77         if (SC_MobileUserAgent::isMobile() && $this->adminPage == false) { 
     86        if (SC_Display::detectDevice() == DEVICE_TYPE_MOBILE && $this->adminPage == false) { 
    7887            $objView = new SC_InstallView(MOBILE_TEMPLATE_REALDIR, MOBILE_COMPILE_REALDIR); 
    7988        } elseif($this->adminPage) { 
Note: See TracChangeset for help on using the changeset viewer.