Changeset 16768


Ignore:
Timestamp:
2007/11/08 23:44:51 (16 years ago)
Author:
adachi
Message:

未定義関数修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/class/pages/admin/design/LC_Page_Admin_Design_Template.php

    r16716 r16768  
    8282        $objSession = new SC_Session(); 
    8383        SC_Utils::sfIsSuccess($objSession); 
    84          
     84 
    8585        // uniqidをテンプレートへ埋め込み 
    8686        $this->uniqid = $objSession->getUniqId(); 
    87          
     87 
    8888        $objView = new SC_AdminView(); 
    89          
     89 
    9090        switch($this->lfGetMode()) { 
    91          
     91 
    9292        // 登録ボタン押下時 
    9393        case 'register': 
     
    101101                sfDispError(''); 
    102102            } 
    103          
     103 
    104104            $template_code = $objForm->getValue('template_code'); 
    105105            $this->tpl_select = $template_code; 
    106              
     106 
    107107            if($template_code == "") { 
    108108                $template_code = "default"; 
    109109            } 
    110              
     110 
    111111            // DBへ使用するテンプレートを登録 
    112112            $this->lfRegisterTemplate($template_code); 
    113          
     113 
    114114            // テンプレートの上書き 
    115115            $this->lfChangeTemplate($template_code); 
    116          
     116 
    117117            // XXX コンパイルファイルのクリア処理を行う 
    118118            $objView->_smarty->clear_compiled_tpl(); 
    119              
     119 
    120120            // 完了メッセージ 
    121121            $this->tpl_onload="alert('登録が完了しました。');"; 
    122122            break; 
    123          
     123 
    124124        // 削除ボタン押下時 
    125125        case 'delete': 
     
    133133                SC_Utils::sfDispError(''); 
    134134            } 
    135          
     135 
    136136            $template_code = $objForm->getValue('template_code_temp'); 
    137137            if ($template_code == $this->lfGetNowTemplate()) { 
     
    139139                break; 
    140140            } 
    141          
     141 
    142142            $this->lfDeleteTemplate($template_code); 
    143143            break; 
    144          
     144 
    145145        // downloadボタン押下時 
    146146        case 'download': 
     
    159159            SC_Helper_FileManager::downloadArchiveFiles(SMARTY_TEMPLATES_DIR . $template_code); 
    160160            break; 
    161              
     161 
    162162        // プレビューボタン押下時 
    163163        case 'preview': 
    164164            break; 
    165          
     165 
    166166        default: 
    167167            break; 
    168168        } 
    169          
     169 
    170170        // defaultパラメータのセット 
    171171        $this->templates = $this->lfGetAllTemplates(); 
    172172        $this->now_template = $this->lfGetNowtemplate(); 
    173          
     173 
    174174        // 画面の表示 
    175175        $objView->assignobj($this); 
     
    189189        if (isset($_POST['mode'])) return $_POST['mode']; 
    190190    } 
    191      
     191 
    192192    function lfInitRegister() { 
    193193        $objForm = new SC_FormParam(); 
     
    197197        ); 
    198198        $objForm->setParam($_POST); 
    199      
     199 
    200200        return $objForm; 
    201201    } 
    202      
     202 
    203203    function lfInitDelete() { 
    204204        $objForm = new SC_FormParam(); 
     
    208208        ); 
    209209        $objForm->setParam($_POST); 
    210          
     210 
    211211        return $objForm; 
    212212    } 
    213      
     213 
    214214    function lfInitDownload() { 
    215215        $objForm = new SC_FormParam(); 
     
    219219        ); 
    220220        $objForm->setParam($_POST); 
    221          
     221 
    222222        return $objForm; 
    223223    } 
    224      
     224 
    225225    /** 
    226226     * 現在適用しているテンプレートパッケージ名を取得する. 
     
    237237        return null; 
    238238    } 
    239      
     239 
    240240    /** 
    241241     * 使用するテンプレートをDBへ登録する 
     
    258258    function lfChangeTemplate($template_code){ 
    259259        $from = TPL_PKG_PATH . $template_code . '/user_edit/'; 
    260      
     260 
    261261        if (!file_exists($from)) { 
    262262            $mess = $from . 'は存在しません'; 
     
    267267        return $mess; 
    268268    } 
    269      
     269 
    270270    function lfGetAllTemplates() { 
    271271        $objQuery = new SC_Query(); 
    272272        $arrRet = $objQuery->select('*', 'dtb_templates'); 
    273273        if (empty($arrRet)) return array(); 
    274      
     274 
    275275        return $arrRet; 
    276276    } 
    277      
     277 
    278278    function lfDeleteTemplate($template_code) { 
    279279        $objQuery = new SC_Query(); 
    280280        $objQuery->delete('dtb_templates', 'template_code = ?', array($template_code)); 
    281      
    282         sfDelFile(TPL_PKG_PATH . $template_code); 
     281 
     282        SC_Utils_Ex::sfDelFile(TPL_PKG_PATH . $template_code); 
    283283    } 
    284284} 
Note: See TracChangeset for help on using the changeset viewer.