Changeset 20302


Ignore:
Timestamp:
2011/02/21 18:50:54 (13 years ago)
Author:
coelacanth
Message:

#964 リファクタリング 宣言を除き, 引数や返り値が無く, すべて内部のメンバ変数で処理するような関数は極力作成しない

File:
1 edited

Legend:

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

    r20301 r20302  
    8282 
    8383                // エラーチェック 
    84                 $this->arrErr = $this->lfCheckError(); 
     84                $this->arrErr = $objFormParam->checkError(); 
    8585                if(count($this->arrErr) == 0) { 
    86                     $this->lfSiteControlData($_POST['control_id'], $objFormParam->getHashArray()); 
     86                    $this->lfSiteControlData($objFormParam->getHashArray()); 
    8787                    // javascript実行 
    8888                    $this->tpl_onload = "alert('更新が完了しました。');"; 
     
    9494        } 
    9595 
     96        $this->arrControlList = $arrSiteControlList; 
     97    } 
     98 
     99    function lfGetControlList() { 
    96100        // サイト管理情報の取得 
    97101        $arrSiteControlList = $this->lfGetControlList(); 
     
    110114            } 
    111115        } 
    112  
    113         $this->arrControlList = $arrSiteControlList; 
     116        return $arrSiteControlList; 
    114117    } 
    115118 
     
    138141    } 
    139142 
    140     /* 入力内容のチェック */ 
    141     function lfCheckError(&$objFormParam) { 
    142         // 入力データを渡す。 
    143         $arrRet =  $objFormParam->getHashArray(); 
    144         $objErr = new SC_CheckError($arrRet); 
    145         $objErr->arrErr = $objFormParam->checkError(); 
    146  
    147         return $objErr->arrErr; 
    148     } 
    149  
    150143    /* DBへデータを登録する */ 
    151     function lfSiteControlData($control_id = "", $post) { 
     144    function lfSiteControlData($post) { 
    152145        $objQuery =& SC_Query::getSingletonInstance(); 
    153146        $sqlval = $post; 
     
    163156        } else { 
    164157            $where = "control_id = ?"; 
    165             $objQuery->update("dtb_site_control", $sqlval, $where, array($control_id)); 
     158            $objQuery->update("dtb_site_control", $sqlval, $where, array($post['control_id'])); 
    166159        } 
    167160    } 
Note: See TracChangeset for help on using the changeset viewer.