Ignore:
Timestamp:
2013/05/02 18:11:36 (13 years ago)
Author:
h_yoshimoto
Message:

#2236 2.12.3リリース以降の2.12-devへのコミット差し戻し

Location:
branches/version-2_12-dev/data/class/pages/admin/design
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design.php

    r22567 r22796  
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_Admin_Design extends LC_Page_Admin_Ex  
    35 { 
     34class LC_Page_Admin_Design extends LC_Page_Admin_Ex { 
    3635 
    3736    // }}} 
     
    4342     * @return void 
    4443     */ 
    45     function init() 
    46     { 
     44    function init() { 
    4745        parent::init(); 
    4846        $this->tpl_mainpage = 'design/index.tpl'; 
     
    6159     * @return void 
    6260     */ 
    63     function process() 
    64     { 
     61    function process() { 
    6562        $this->action(); 
    6663        $this->sendResponse(); 
     
    7269     * @return void 
    7370     */ 
    74     function action() 
    75     { 
     71    function action() { 
    7672 
    7773        $objLayout = new SC_Helper_PageLayout_Ex(); 
     
    152148     * @return void 
    153149     */ 
    154     function destroy() 
    155     { 
     150    function destroy() { 
    156151        parent::destroy(); 
    157152    } 
     
    164159     * @return void 
    165160     */ 
    166     function lfInitParam(&$objFormParam, $bloc_cnt = 0) 
    167     { 
     161    function lfInitParam(&$objFormParam, $bloc_cnt = 0) { 
    168162        $objFormParam->addParam('ページID', 'page_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 
    169163        $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK')); 
     
    187181     * @return array レイアウト情報の配列 
    188182     */ 
    189     function getLayout($device_type_id, $page_id, &$objLayout) 
    190     { 
     183    function getLayout($device_type_id, $page_id, &$objLayout) { 
    191184        $arrResults = array(); 
    192185        $i = 0; 
     
    219212     * @return void 
    220213     */ 
    221     function copyBloc(&$arrDest, $arrFrom, $cnt) 
    222     { 
     214    function copyBloc(&$arrDest, $arrFrom, $cnt) { 
    223215        $arrDest[$cnt]['target_id'] = $this->arrTarget[$arrFrom['target_id']]; 
    224216        $arrDest[$cnt]['bloc_id'] = $arrFrom['bloc_id']; 
     
    235227     * @return bool 存在する場合 true 
    236228     */ 
    237     function existsBloc($arrBloc, $arrToBlocs) 
    238     { 
     229    function existsBloc($arrBloc, $arrToBlocs) { 
    239230        foreach ($arrToBlocs as $arrToBloc) { 
    240231            if ($arrBloc['bloc_id'] === $arrToBloc['bloc_id']) { 
     
    252243     * @return string プレビューを行う tpl_mainpage ファイル名 
    253244     */ 
    254     function savePreviewData($page_id, &$objLayout) 
    255     { 
     245    function savePreviewData($page_id, &$objLayout) { 
    256246        $arrPageData = $objLayout->getPageProperties(DEVICE_TYPE_PC, $page_id); 
    257247        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     
    268258     * @return void 
    269259     */ 
    270     function placingBlocs(&$objFormParam, $is_preview = false) 
    271     { 
     260    function placingBlocs(&$objFormParam, $is_preview = false) { 
    272261        $page_id = $is_preview ? 0 : $objFormParam->getValue('page_id'); 
    273262        $device_type_id = $objFormParam->getValue('device_type_id'); 
  • branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php

    r22610 r22796  
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_Admin_Design_Bloc extends LC_Page_Admin_Ex  
    35 { 
     34class LC_Page_Admin_Design_Bloc extends LC_Page_Admin_Ex { 
    3635 
    3736    // }}} 
     
    4342     * @return void 
    4443     */ 
    45     function init() 
    46     { 
     44    function init() { 
    4745        parent::init(); 
    4846        $this->tpl_mainpage = 'design/bloc.tpl'; 
     
    6260     * @return void 
    6361     */ 
    64     function process() 
    65     { 
     62    function process() { 
    6663        $this->action(); 
    6764        $this->sendResponse(); 
     
    7370     * @return void 
    7471     */ 
    75     function action() 
    76     { 
     72    function action() { 
    7773 
    7874        $objFormParam = new SC_FormParam_Ex(); 
     
    8682        $this->device_type_id = $objFormParam->getValue('device_type_id', DEVICE_TYPE_PC); 
    8783 
    88         $objBloc = new SC_Helper_Bloc_Ex($this->device_type_id); 
    8984        $objLayout = new SC_Helper_PageLayout_Ex(); 
    9085 
     
    9388            case 'confirm': 
    9489                if (!$is_error) { 
    95                     $this->arrErr = $this->lfCheckError($objFormParam, $this->arrErr, $objBloc); 
     90                    $this->arrErr = $this->lfCheckError($objFormParam, $this->arrErr, $objLayout); 
    9691                    if (SC_Utils_Ex::isBlank($this->arrErr)) { 
    97                         $result = $this->doRegister($objFormParam, $objBloc); 
     92                        $result = $this->doRegister($objFormParam, $objLayout); 
    9893                        if ($result !== false) { 
    9994                            $arrPram = array( 
     
    113108            case 'delete': 
    114109                if (!$is_error) { 
    115                     if ($this->doDelete($objFormParam, $objBloc)) { 
     110                    if ($this->doDelete($objFormParam, $objLayout)) { 
    116111                        $arrPram = array( 
    117112                            'device_type_id' => $this->device_type_id, 
     
    135130        if (!$is_error) { 
    136131            // ブロック一覧を取得 
    137             $this->arrBlocList = $objBloc->getList(); 
     132            $this->arrBlocList = $objLayout->getBlocs($this->device_type_id); 
    138133            // bloc_id が指定されている場合にはブロックデータの取得 
    139134            if (!SC_Utils_Ex::isBlank($this->bloc_id)) { 
    140                 $arrBloc = $this->getBlocTemplate($this->bloc_id, $objBloc); 
     135                $arrBloc = $this->getBlocTemplate($this->device_type_id, $this->bloc_id, $objLayout); 
    141136                $objFormParam->setParam($arrBloc); 
    142137            } 
     
    155150     * @return void 
    156151     */ 
    157     function destroy() 
    158     { 
     152    function destroy() { 
    159153        parent::destroy(); 
    160154    } 
     
    166160     * @return void 
    167161     */ 
    168     function lfInitParam(&$objFormParam) 
    169     { 
     162    function lfInitParam(&$objFormParam) { 
    170163        $objFormParam->addParam('ブロックID', 'bloc_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 
    171164        $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 
     
    178171     * ブロックのテンプレートを取得する. 
    179172     * 
     173     * @param integer $device_type_id 端末種別ID 
    180174     * @param integer $bloc_id ブロックID 
    181      * @param SC_Helper_Bloc_Ex $objBloc SC_Helper_Bloc_Ex インスタンス 
     175     * @param SC_Helper_PageLayout $objLayout SC_Helper_PageLayout インスタンス 
    182176     * @return array ブロック情報の配列 
    183177     */ 
    184     function getBlocTemplate($bloc_id, SC_Helper_Bloc_Ex &$objBloc) 
    185     { 
    186         $arrBloc = $objBloc->get($bloc_id); 
    187         return $arrBloc; 
     178    function getBlocTemplate($device_type_id, $bloc_id, &$objLayout) { 
     179        $arrBloc = $objLayout->getBlocs($device_type_id, 'bloc_id = ?', array($bloc_id)); 
     180        if (SC_Utils_Ex::isAbsoluteRealPath($arrBloc[0]['tpl_path'])) { 
     181            $tpl_path = $arrBloc[0]['tpl_path']; 
     182        } else { 
     183            $tpl_path = SC_Helper_PageLayout_Ex::getTemplatePath($device_type_id) . BLOC_DIR . $arrBloc[0]['tpl_path']; 
     184        } 
     185        if (file_exists($tpl_path)) { 
     186            $arrBloc[0]['bloc_html'] = file_get_contents($tpl_path); 
     187        } 
     188        return $arrBloc[0]; 
    188189    } 
    189190 
     
    195196     * 
    196197     * @param SC_FormParam $objFormParam SC_FormParam インスタンス 
    197      * @param SC_Helper_Bloc $objBloc SC_Helper_Bloc インスタンス 
     198     * @param SC_Helper_PageLayout $objLayout SC_Helper_PageLayout インスタンス 
    198199     * @return integer|boolean 登録が成功した場合, 登録したブロックID; 
    199200     *                         失敗した場合 false 
    200201     */ 
    201     function doRegister(&$objFormParam, SC_Helper_Bloc_Ex &$objBloc) 
    202     { 
     202    function doRegister(&$objFormParam, &$objLayout) { 
    203203        $arrParams = $objFormParam->getHashArray(); 
    204         $result = $objBloc->save($arrParams); 
    205  
    206         if (!$result) { 
     204 
     205        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     206        $objQuery->begin(); 
     207 
     208        // blod_id が空の場合は新規登録 
     209        $is_new = SC_Utils_Ex::isBlank($arrParams['bloc_id']); 
     210        $bloc_dir = $objLayout->getTemplatePath($arrParams['device_type_id']) . BLOC_DIR; 
     211        // 既存データの重複チェック 
     212        if (!$is_new) { 
     213            $arrExists = $objLayout->getBlocs($arrParams['device_type_id'], 'bloc_id = ?', array($arrParams['bloc_id'])); 
     214 
     215            // 既存のファイルが存在する場合は削除しておく 
     216            $exists_file = $bloc_dir . $arrExists[0]['filename'] . '.tpl'; 
     217            if (file_exists($exists_file)) { 
     218                unlink($exists_file); 
     219            } 
     220        } 
     221 
     222        $table = 'dtb_bloc'; 
     223        $arrValues = $objQuery->extractOnlyColsOf($table, $arrParams); 
     224        $arrValues['tpl_path'] = $arrParams['filename'] . '.tpl'; 
     225        $arrValues['update_date'] = 'CURRENT_TIMESTAMP'; 
     226 
     227        // 新規登録 
     228        if ($is_new || SC_Utils_Ex::isBlank($arrExists)) { 
     229            $objQuery->setOrder(''); 
     230            $arrValues['bloc_id'] = 1 + $objQuery->max('bloc_id', $table, 'device_type_id = ?', 
     231                                                       array($arrValues['device_type_id'])); 
     232            $arrValues['create_date'] = 'CURRENT_TIMESTAMP'; 
     233            $objQuery->insert($table, $arrValues); 
     234        } 
     235        // 更新 
     236        else { 
     237            $objQuery->update($table, $arrValues, 'bloc_id = ? AND device_type_id = ?', 
     238                              array($arrValues['bloc_id'], $arrValues['device_type_id'])); 
     239        } 
     240 
     241        $bloc_path = $bloc_dir . $arrValues['tpl_path']; 
     242        if (!SC_Helper_FileManager_Ex::sfWriteFile($bloc_path, $arrParams['bloc_html'])) { 
    207243            $this->arrErr['err'] = '※ ブロックの書き込みに失敗しました<br />'; 
    208         } 
    209  
    210         return $result; 
     244            $objQuery->rollback(); 
     245            return false; 
     246        } 
     247 
     248        $objQuery->commit(); 
     249        return $arrValues['bloc_id']; 
    211250    } 
    212251 
     
    215254     * 
    216255     * @param SC_FormParam $objFormParam SC_FormParam インスタンス 
    217      * @param SC_Helper_Bloc $objBloc SC_Helper_Bloc インスタンス 
     256     * @param SC_Helper_PageLayout $objLayout SC_Helper_PageLayout インスタンス 
    218257     * @return boolean 登録が成功した場合 true; 失敗した場合 false 
    219258     */ 
    220     function doDelete(&$objFormParam, SC_Helper_Bloc_Ex &$objBloc) 
    221     { 
     259    function doDelete(&$objFormParam, &$objLayout) { 
    222260        $arrParams = $objFormParam->getHashArray(); 
    223         $result = $objBloc->delete($arrParams['bloc_id']); 
    224  
    225         if (!$result) { 
     261        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     262        $objQuery->begin(); 
     263 
     264        $arrExists = $objLayout->getBlocs($arrParams['device_type_id'], 'bloc_id = ? AND deletable_flg = 1', 
     265                                          array($arrParams['bloc_id'])); 
     266        $is_error = false; 
     267        if (!SC_Utils_Ex::isBlank($arrExists)) { 
     268            $objQuery->delete('dtb_bloc', 'bloc_id = ? AND device_type_id = ?', 
     269                              array($arrExists[0]['bloc_id'], $arrExists[0]['device_type_id'])); 
     270            $objQuery->delete('dtb_blocposition', 'bloc_id = ? AND device_type_id = ?', 
     271                              array($arrExists[0]['bloc_id'], $arrExists[0]['device_type_id'])); 
     272 
     273            $bloc_dir = $objLayout->getTemplatePath($arrParams['device_type_id']) . BLOC_DIR; 
     274            $exists_file = $bloc_dir . $arrExists[0]['filename'] . '.tpl'; 
     275 
     276            // ファイルの削除 
     277            if (file_exists($exists_file)) { 
     278                if (!unlink($exists_file)) { 
     279                    $is_error = true; 
     280                } 
     281            } 
     282        } else { 
     283            $is_error = true; 
     284        } 
     285 
     286        if ($is_error) { 
    226287            $this->arrErr['err'] = '※ ブロックの削除に失敗しました<br />'; 
    227         } 
    228  
    229         return $result; 
     288            $objQuery->rollback(); 
     289            return false; 
     290        } 
     291        $objQuery->commit(); 
     292        return true; 
    230293    } 
    231294 
     
    236299     * @return array エラーメッセージの配列 
    237300     */ 
    238     function lfCheckError(&$objFormParam, &$arrErr, SC_Helper_Bloc_Ex &$objBloc) 
    239     { 
     301    function lfCheckError(&$objFormParam, &$arrErr, &$objLayout) { 
    240302        $arrParams = $objFormParam->getHashArray(); 
    241303        $objErr = new SC_CheckError_Ex($arrParams); 
     
    252314            $arrValues[] = $arrParams['bloc_id']; 
    253315        } 
    254         $arrBloc = $objBloc->getWhere($where, $arrValues); 
     316        $arrBloc = $objLayout->getBlocs($arrParams['device_type_id'], $where, $arrValues); 
    255317        if (!SC_Utils_Ex::isBlank($arrBloc)) { 
    256318            $objErr->arrErr['filename'] = '※ 同じファイル名のデータが存在しています。別のファイル名を入力してください。<br />'; 
  • branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_CSS.php

    r22567 r22796  
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_Admin_Design_CSS extends LC_Page_Admin_Ex  
    35 { 
     34class LC_Page_Admin_Design_CSS extends LC_Page_Admin_Ex { 
    3635 
    3736    // }}} 
     
    4342     * @return void 
    4443     */ 
    45     function init() 
    46     { 
     44    function init() { 
    4745        parent::init(); 
    4846        $this->tpl_mainpage = 'design/css.tpl'; 
     
    6159     * @return void 
    6260     */ 
    63     function process() 
    64     { 
     61    function process() { 
    6562        $this->action(); 
    6663        $this->sendResponse(); 
     
    7269     * @return void 
    7370     */ 
    74     function action() 
    75     { 
     71    function action() { 
    7672 
    7773        $objLayout = new SC_Helper_PageLayout_Ex(); 
     
    146142     * @return void 
    147143     */ 
    148     function destroy() 
    149     { 
     144    function destroy() { 
    150145        parent::destroy(); 
    151146    } 
     
    157152     * @return void 
    158153     */ 
    159     function lfInitParam(&$objFormParam) 
    160     { 
     154    function lfInitParam(&$objFormParam) { 
    161155        $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 
    162156        $objFormParam->addParam('CSSファイル名', 'css_name', STEXT_LEN, 'a', array('MAX_LENGTH_CHECK')); 
     
    178172     * @return boolean 登録が成功した場合 true; 失敗した場合 false 
    179173     */ 
    180     function doRegister($css_dir, $css_name, $old_css_name, $css_path, $css_data) 
    181     { 
     174    function doRegister($css_dir, $css_name, $old_css_name, $css_path, $css_data) { 
    182175        $objFileManager = new SC_Helper_FileManager_Ex(); 
    183176 
     
    203196     * @return boolean 削除が成功した場合 true; 失敗した場合 false 
    204197     */ 
    205     function doDelete($css_path) 
    206     { 
     198    function doDelete($css_path) { 
    207199        if (!unlink($css_path)) { 
    208200            $this->arrErr['err'] = '※ CSSの削除に失敗しました<br />'; 
     
    218210     * @return array ファイルリスト 
    219211     */ 
    220     function getCSSList($css_dir) 
    221     { 
     212    function getCSSList($css_dir) { 
    222213        $objFileManager = new SC_Helper_FileManager_Ex(); 
    223214 
     
    240231     * @return array エラーメッセージの配列 
    241232     */ 
    242     function lfCheckError(&$objFormParam, &$arrErr) 
    243     { 
     233    function lfCheckError(&$objFormParam, &$arrErr) { 
    244234        $arrParams = $objFormParam->getHashArray(); 
    245235        $objErr = new SC_CheckError_Ex($arrParams); 
     
    276266     * @return string CSSディレクトリ 
    277267     */ 
    278     function getCSSDir($device_type_id) 
    279     { 
     268    function getCSSDir($device_type_id) { 
    280269        return SC_Helper_PageLayout_Ex::getTemplatePath($device_type_id, true) . 'css/'; 
    281270    } 
     
    286275     * @return boolean  
    287276     */ 
    288     function checkPath($str) 
    289     { 
     277    function checkPath($str) { 
    290278        // 含む場合はfalse 
    291279        if (preg_match('|\./|', $str)) { 
  • branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Header.php

    r22567 r22796  
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_Admin_Design_Header extends LC_Page_Admin_Ex  
    35 { 
     34class LC_Page_Admin_Design_Header extends LC_Page_Admin_Ex { 
    3635 
    3736    // }}} 
     
    4342     * @return void 
    4443     */ 
    45     function init() 
    46     { 
     44    function init() { 
    4745        parent::init(); 
    4846        $this->tpl_mainpage = 'design/header.tpl'; 
     
    6260     * @return void 
    6361     */ 
    64     function process() 
    65     { 
     62    function process() { 
    6663        $this->action(); 
    6764        $this->sendResponse(); 
     
    7370     * @return void 
    7471     */ 
    75     function action() 
    76     { 
     72    function action() { 
    7773 
    7874        $objFormParam = new SC_FormParam_Ex(); 
     
    125121     * @return void 
    126122     */ 
    127     function destroy() 
    128     { 
     123    function destroy() { 
    129124        parent::destroy(); 
    130125    } 
     
    136131     * @return void 
    137132     */ 
    138     function lfInitParam(&$objFormParam) 
    139     { 
     133    function lfInitParam(&$objFormParam) { 
    140134        $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 
    141135        $objFormParam->addParam('division', 'division', STEXT_LEN, 'a', array('MAX_LENGTH_CHECK')); 
     
    150144     * @return array エラーメッセージの配列 
    151145     */ 
    152     function lfCheckError(&$objFormParam, &$arrErr) 
    153     { 
     146    function lfCheckError(&$objFormParam, &$arrErr) { 
    154147        $arrParams = $objFormParam->getHashArray(); 
    155148        $objErr = new SC_CheckError_Ex($arrParams); 
     
    167160     * @return integer|boolean 登録が成功した場合 true; 失敗した場合 false 
    168161     */ 
    169     function doRegister(&$objFormParam) 
    170     { 
     162    function doRegister(&$objFormParam) { 
    171163        $division = $objFormParam->getValue('division'); 
    172164        $contents = $objFormParam->getValue($division); 
     
    187179     * @return string|boolean 成功した場合, テンプレートのパス; 失敗した場合 false 
    188180     */ 
    189     function getTemplatePath($device_type_id, $division) 
    190     { 
     181    function getTemplatePath($device_type_id, $division) { 
    191182        $tpl_path = SC_Helper_PageLayout_Ex::getTemplatePath($device_type_id) . '/' . $division . '.tpl'; 
    192183        if (file_exists($tpl_path)) { 
  • branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php

    r22567 r22796  
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_Admin_Design_MainEdit extends LC_Page_Admin_Ex  
    35 { 
     34class LC_Page_Admin_Design_MainEdit extends LC_Page_Admin_Ex { 
    3635 
    3736    // }}} 
     
    4342     * @return void 
    4443     */ 
    45     function init() 
    46     { 
     44    function init() { 
    4745        parent::init(); 
    4846        $this->tpl_mainpage = 'design/main_edit.tpl'; 
     
    6159     * @return void 
    6260     */ 
    63     function process() 
    64     { 
     61    function process() { 
    6562        $this->action(); 
    6663        $this->sendResponse(); 
     
    7269     * @return void 
    7370     */ 
    74     function action() 
    75     { 
     71    function action() { 
    7672 
    7773        $objLayout = new SC_Helper_PageLayout_Ex(); 
     
    145141     * @return void 
    146142     */ 
    147     function destroy() 
    148     { 
     143    function destroy() { 
    149144        parent::destroy(); 
    150145    } 
     
    158153     * @return void 
    159154     */ 
    160     function lfInitParam(&$objFormParam) 
    161     { 
     155    function lfInitParam(&$objFormParam) { 
    162156        $objFormParam->addParam('ページID', 'page_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 
    163157        $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 
     
    178172     * @return array ページデータの配列 
    179173     */ 
    180     function getTplMainpage($device_type_id, $page_id, &$objLayout) 
    181     { 
     174    function getTplMainpage($device_type_id, $page_id, &$objLayout) { 
    182175        $arrPageData = $objLayout->getPageProperties($device_type_id, $page_id); 
    183176 
     
    203196     *                         失敗した場合 false 
    204197     */ 
    205     function doRegister(&$objFormParam, &$objLayout) 
    206     { 
     198    function doRegister(&$objFormParam, &$objLayout) { 
    207199        $filename = $objFormParam->getValue('filename'); 
    208200        $arrParams['device_type_id'] = $objFormParam->getValue('device_type_id'); 
     
    259251     * @return integer ページID 
    260252     */ 
    261     function registerPage($arrParams, &$objLayout) 
    262     { 
     253    function registerPage($arrParams, &$objLayout) { 
    263254        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    264255 
     
    304295     * @return array エラーメッセージの配列 
    305296     */ 
    306     function lfCheckError(&$objFormParam, &$arrErr) 
    307     { 
     297    function lfCheckError(&$objFormParam, &$arrErr) { 
    308298        $arrParams = $objFormParam->getHashArray(); 
    309299        $objErr = new SC_CheckError_Ex($arrParams); 
     
    354344     * @return boolean 作成に成功した場合 true 
    355345     */ 
    356     function createPHPFile($filename) 
    357     { 
     346    function createPHPFile($filename) { 
    358347        $path = USER_REALDIR . $filename . '.php'; 
    359348 
  • branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_Template.php

    r22567 r22796  
    3131 * @version $Id$ 
    3232 */ 
    33 class LC_Page_Admin_Design_Template extends LC_Page_Admin_Ex  
    34 { 
     33class LC_Page_Admin_Design_Template extends LC_Page_Admin_Ex { 
    3534 
    3635    // }}} 
     
    4241     * @return void 
    4342     */ 
    44     function init() 
    45     { 
     43    function init() { 
    4644        parent::init(); 
    4745        $this->tpl_mainpage = 'design/template.tpl'; 
     
    6260     * @return void 
    6361     */ 
    64     function process() 
    65     { 
     62    function process() { 
    6663        $this->action(); 
    6764        $this->sendResponse(); 
     
    7370     * @return void 
    7471     */ 
    75     function action() 
    76     { 
     72    function action() { 
    7773 
    7874        $objFormParam = new SC_FormParam_Ex(); 
     
    142138     * @return void 
    143139     */ 
    144     function destroy() 
    145     { 
     140    function destroy() { 
    146141        parent::destroy(); 
    147142    } 
     
    153148     * @return void 
    154149     */ 
    155     function lfInitParam(&$objFormParam) 
    156     { 
     150    function lfInitParam(&$objFormParam) { 
    157151        $objFormParam->addParam('端末種別ID', 'device_type_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 
    158152        $objFormParam->addParam('template_code', 'template_code', STEXT_LEN, 'a', array('EXIST_CHECK', 'SPTAB_CHECK','MAX_LENGTH_CHECK', 'ALNUM_CHECK')); 
     
    168162     * @return void 
    169163     */ 
    170     function doUpdateMasterData($template_code, $device_type_id) 
    171     { 
     164    function doUpdateMasterData($template_code, $device_type_id) { 
    172165        $masterData = new SC_DB_MasterData_Ex(); 
    173166 
     
    204197     * @return void 
    205198     */ 
    206     function updateBloc($filepath) 
    207     { 
     199    function updateBloc($filepath) { 
    208200        $sql = file_get_contents($filepath); 
    209201        if ($sql !== false) { 
     
    227219     * @return boolean 成功した場合 true; 失敗した場合 false 
    228220     */ 
    229     function doDelete($template_code, $device_type_id) 
    230     { 
     221    function doDelete($template_code, $device_type_id) { 
    231222        if ($template_code == $this->getTemplateName($device_type_id) 
    232223                || $template_code == $this->getTemplateName($device_type_id, true)) { 
     
    276267     * @return boolean 成功した場合 true; 失敗した場合 false 
    277268     */ 
    278     function doRegister($template_code, $device_type_id) 
    279     { 
     269    function doRegister($template_code, $device_type_id) { 
    280270 
    281271        $tpl_dir = USER_TEMPLATE_REALDIR . $template_code . '/'; 
     
    307297     * @return boolean 成功した場合 true; 失敗した場合 false 
    308298     */ 
    309     function doDownload($template_code) 
    310     { 
     299    function doDownload($template_code) { 
    311300        $from_dir = USER_TEMPLATE_REALDIR . $template_code . '/'; 
    312301        $to_dir = SMARTY_TEMPLATES_REALDIR . $template_code . '/_packages/'; 
     
    329318     * @return array テンプレート情報の配列 
    330319     */ 
    331     function getAllTemplates($device_type_id) 
    332     { 
     320    function getAllTemplates($device_type_id) { 
    333321        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    334322        return $objQuery->select('*', 'dtb_templates', 'device_type_id = ?', array($device_type_id)); 
     
    342330     * @return string テンプレート名 
    343331     */ 
    344     function getTemplateName($device_type_id, $isDefault = false) 
    345     { 
     332    function getTemplateName($device_type_id, $isDefault = false) { 
    346333        switch ($device_type_id) { 
    347334            case DEVICE_TYPE_MOBILE: 
  • branches/version-2_12-dev/data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php

    r22567 r22796  
    3232 * @version $Id$ 
    3333 */ 
    34 class LC_Page_Admin_Design_UpDown extends LC_Page_Admin_Ex  
    35 { 
     34class LC_Page_Admin_Design_UpDown extends LC_Page_Admin_Ex { 
    3635 
    3736    // }}} 
     
    4342     * @return void 
    4443     */ 
    45     function init() 
    46     { 
     44    function init() { 
    4745        parent::init(); 
    4846        $this->tpl_mainpage = 'design/up_down.tpl'; 
     
    6361     * @return void 
    6462     */ 
    65     function process() 
    66     { 
     63    function process() { 
    6764        $this->action(); 
    6865        $this->sendResponse(); 
     
    7673     * @return void 
    7774     */ 
    78     function action() 
    79     { 
     75    function action() { 
    8076 
    8177        $objFormParam = new SC_FormParam_Ex(); 
     
    114110     * @return void 
    115111     */ 
    116     function destroy() 
    117     { 
     112    function destroy() { 
    118113        parent::destroy(); 
    119114    } 
     
    125120     * @return object SC_UploadFileのインスタンス 
    126121     */ 
    127     function lfInitUploadFile($objForm) 
    128     { 
     122    function lfInitUploadFile($objForm) { 
    129123        $pkg_dir = SMARTY_TEMPLATES_REALDIR . $objForm->getValue('template_code'); 
    130124        $objUpFile = new SC_UploadFile_Ex(TEMPLATE_TEMP_REALDIR, $pkg_dir); 
     
    139133     * @return void 
    140134     */ 
    141     function lfInitParam(&$objFormParam) 
    142     { 
     135    function lfInitParam(&$objFormParam) { 
    143136        $objFormParam->addParam('テンプレートコード', 'template_code', STEXT_LEN, 'a', array('EXIST_CHECK', 'SPTAB_CHECK','MAX_LENGTH_CHECK', 'ALNUM_CHECK')); 
    144137        $objFormParam->addParam('テンプレート名', 'template_name', STEXT_LEN, 'KVa', array('EXIST_CHECK', 'SPTAB_CHECK','MAX_LENGTH_CHECK')); 
     
    153146     * @return array エラー情報を格納した連想配列, エラーが無ければ(多分)nullを返す 
    154147     */ 
    155     function lfCheckError(&$objFormParam, &$objUpFile) 
    156     { 
     148    function lfCheckError(&$objFormParam, &$objUpFile) { 
    157149        $arrErr = $objFormParam->checkError(); 
    158150        $template_code = $objFormParam->getValue('template_code'); 
     
    205197     * @return boolean 成功した場合 true; 失敗した場合 false 
    206198     */ 
    207     function doUpload($objFormParam, $objUpFile) 
    208     { 
     199    function doUpload($objFormParam, $objUpFile) { 
    209200        $template_code = $objFormParam->getValue('template_code'); 
    210201        $template_name = $objFormParam->getValue('template_name'); 
Note: See TracChangeset for help on using the changeset viewer.