Changeset 19517


Ignore:
Timestamp:
2010/11/07 04:01:44 (14 years ago)
Author:
kim
Message:

【開発合宿】 SC_Display用のfetchとしてgetResponseに作成

Location:
branches/camp/camp-2_5-E/data/class
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/camp/camp-2_5-E/data/class/SC_Display.php

    r19491 r19517  
    1313     */ 
    1414    var $view; 
    15  
    1615         
    1716    var $deviceSeted = false; 
     
    5150        } 
    5251        $this->assignobj($page); 
    53         $this->response->setResposeBody($this->view->fetch($page->getTemplate())); 
     52        $this->response->setResposeBody($this->view->getResponse($page->getTemplate())); 
    5453    } 
    5554     
  • branches/camp/camp-2_5-E/data/class/SC_View.php

    r19080 r19517  
    118118 
    119119    // テンプレートの処理結果を取得 
    120     function fetch($template) { 
     120    function fetch($template, $no_error=false) { 
    121121        return $this->_smarty->fetch($template); 
     122    } 
     123 
     124    /** 
     125     * SC_Display用にレスポンスを返す 
     126     * @global string $GLOBAL_ERR 
     127     * @param array $template 
     128     * @param boolean $no_error 
     129     * @return string 
     130     */ 
     131    function getResponse($template, $no_error = false) { 
     132        if(!$no_error) { 
     133            global $GLOBAL_ERR; 
     134            if(!defined('OUTPUT_ERR')) { 
     135                // GLOBAL_ERR を割り当て 
     136                $this->assign("GLOBAL_ERR", $GLOBAL_ERR); 
     137                define('OUTPUT_ERR','ON'); 
     138            } 
     139        } 
     140        $res =  $this->_smarty->fetch($template); 
     141        if(ADMIN_MODE == '1' || true) { 
     142            $time_end = SC_Utils_Ex::sfMicrotimeFloat(); 
     143            $time = $time_end - $this->time_start; 
     144            $res .= '処理時間: ' . sprintf('%.3f', $time) . '秒'; 
     145        } 
     146        return $res; 
    122147    } 
    123148 
     
    172197        $this->_smarty->debugging = $var; 
    173198    } 
    174  
    175  
    176199} 
    177200 
Note: See TracChangeset for help on using the changeset viewer.