Ignore:
Timestamp:
2011/03/20 14:45:13 (13 years ago)
Author:
kotani
Message:

#862 (テンプレート上のエスケープを簡単に)実装漏れ箇所

File:
1 edited

Legend:

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

    r20560 r20741  
    7676        $this->objLayout = new SC_Helper_PageLayout_Ex(); 
    7777 
     78        $objFormParam = new SC_FormParam_Ex(); 
     79        $this->lfInitParam($objFormParam, $_REQUEST); 
     80 
    7881        // CSSファイル名を取得 
    79         if (isset($_POST['css_name'])) { 
    80             $css_name = $_POST['css_name']; 
    81         }else if (isset($_GET['css_name'])){ 
    82             $css_name = $_GET['css_name']; 
    83         }else{ 
    84             $css_name = ''; 
    85         } 
     82        $css_name = $objFormParam->getValue('css_name'); 
    8683        $this->css_name = $css_name; 
    87  
    88         if (isset($_POST['old_css_name'])) { 
    89             $old_css_name = $_POST['old_css_name']; 
    90         }else if (isset($_GET['css_name'])) { 
    91             $old_css_name = $_GET['css_name']; 
    92         }else{ 
    93             $old_css_name = ''; 
    94         } 
     84        $old_css_name = $objFormParam->getValue('old_css_name'); 
    9585        $this->old_css_name = $old_css_name; 
    9686 
    9787        // 端末種別IDを取得 
    98         if (isset($_REQUEST['device_type_id']) 
    99             && is_numeric($_REQUEST['device_type_id'])) { 
    100             $device_type_id = $_REQUEST['device_type_id']; 
    101         } else { 
    102             $device_type_id = DEVICE_TYPE_PC; 
    103         } 
     88        $device_type_id = $objFormParam->getValue('device_type_id'); 
    10489 
    10590        //サブタイトルの追加 
     
    122107                break; 
    123108            case 'delete': 
    124                 $this->lfExecuteDelete($css_path); 
     109                $this->lfExecuteDelete($css_path, $device_type_id); 
    125110                break; 
    126111            default: 
    127                 GC_Utils_Ex::gfPrintLog("MODEエラー:".$this->getMode()); 
    128112                break; 
    129113        } 
     
    141125    function destroy() { 
    142126        parent::destroy(); 
     127    } 
     128 
     129 
     130    /** 
     131     * パラメータ情報の初期化 
     132     * 
     133     * @param object $objFormParam SC_FormParamインスタンス 
     134     * @param array $arrPost $_POSTデータ 
     135     * @return void 
     136     */ 
     137    function lfInitParam(&$objFormParam, $arrPost) { 
     138        $objFormParam->addParam("端末種別ID", "device_type_id", INT_LEN, 'n', array("NUM_CHECK", "MAX_LENGTH_CHECK"), DEVICE_TYPE_PC); 
     139        $objFormParam->addParam("CSSファイル名", "css_name", MTEXT_LEN, 'a', array("MAX_LENGTH_CHECK")); 
     140        $objFormParam->addParam("旧CSSファイル名", "old_css_name", MTEXT_LEN, 'a', array("MAX_LENGTH_CHECK")); 
     141        $objFormParam->setParam($arrPost); 
     142        $objFormParam->convParam(); 
    143143    } 
    144144 
     
    164164    } 
    165165 
    166     function lfExecuteDelete($css_path) { 
     166    function lfExecuteDelete($css_path, $device_type_id) { 
    167167        $objFileManager = new SC_Helper_FileManager_Ex(); 
    168168 
     
    171171            $objFileManager->sfDeleteDir($css_path); 
    172172        } 
    173         $this->objDisplay->reload(array(), true); 
     173        $this->objDisplay->reload(array('device_type_id' => $device_type_id), true); 
    174174    } 
    175175 
Note: See TracChangeset for help on using the changeset viewer.