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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_12-dev/data/class/helper/SC_Helper_PageLayout.php

    r22610 r22796  
    2929 * @version $Id:SC_Helper_PageLayout.php 15532 2007-08-31 14:39:46Z nanasess $ 
    3030 */ 
    31 class SC_Helper_PageLayout  
    32 { 
     31class SC_Helper_PageLayout { 
    3332 
    3433    // }}} 
     
    4847     * @return void 
    4948     */ 
    50     function sfGetPageLayout(&$objPage, $preview = false, $url = '', $device_type_id = DEVICE_TYPE_PC) 
    51     { 
     49    function sfGetPageLayout(&$objPage, $preview = false, $url = '', $device_type_id = DEVICE_TYPE_PC) { 
    5250 
    5351        // URLを元にページ情報を取得 
     
    8987                        . 'tpl_path: ' . $arrBloc['tpl_path'] . "\n" 
    9088                        . 'php_path: ' . $arrBloc['php_path']; 
    91                     trigger_error($error, E_USER_WARNING); 
     89                    GC_Utils_Ex::gfPrintLog($error); 
    9290                } 
    9391            } 
     
    111109     * @return array ページ属性の配列 
    112110     */ 
    113     function getPageProperties($device_type_id = DEVICE_TYPE_PC, $page_id = null, $where = '', $arrParams = array()) 
    114     { 
     111    function getPageProperties($device_type_id = DEVICE_TYPE_PC, $page_id = null, $where = '', $arrParams = array()) { 
    115112        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    116113        $where = 'device_type_id = ? ' . (SC_Utils_Ex::isBlank($where) ? $where : 'AND ' . $where); 
     
    136133     * @return array ブロック情報の配列 
    137134     */ 
    138     function getBlocs($device_type_id = DEVICE_TYPE_PC, $where = '', $arrParams = array(), $has_realpath = true) 
    139     { 
    140         $objBloc = new SC_Helper_Bloc_Ex($device_type_id); 
    141         $arrBlocs = $objBloc->getWhere($where, $arrParams); 
     135    function getBlocs($device_type_id = DEVICE_TYPE_PC, $where = '', $arrParams = array(), $has_realpath = true) { 
     136        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     137        $where = 'device_type_id = ? ' . (SC_Utils_Ex::isBlank($where) ? $where : 'AND ' . $where); 
     138        $arrParams = array_merge(array($device_type_id), $arrParams); 
     139        $objQuery->setOrder('bloc_id'); 
     140        $arrBlocs = $objQuery->select('*', 'dtb_bloc', $where, $arrParams); 
    142141        if ($has_realpath) { 
    143142            $this->setBlocPathTo($device_type_id, $arrBlocs); 
     
    155154     * @return array 配置情報を含めたブロックの配列 
    156155     */ 
    157     function getBlocPositions($device_type_id, $page_id, $has_realpath = true) 
    158     { 
     156    function getBlocPositions($device_type_id, $page_id, $has_realpath = true) { 
    159157        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    160158        $table = <<< __EOF__ 
     
    170168            $this->setBlocPathTo($device_type_id, $arrBlocs); 
    171169        } 
    172          
    173         //全ページ設定と各ページのブロックの重複を削除 
    174         foreach ($arrBlocs as $index => $arrBloc) { 
    175             if($arrBloc['anywhere'] == 1){ 
    176                 $arrUniqBlocIds[] = $arrBloc['bloc_id']; 
    177             } 
    178         } 
    179         foreach ($arrBlocs as $bloc_index => $arrBlocData) { 
    180             if(in_array($arrBlocData['bloc_id'], $arrUniqBlocIds) && $arrBlocData['anywhere'] == 0){ 
    181                 unset($arrBlocs[$bloc_index]); 
    182             } 
    183         } 
    184170        return $arrBlocs; 
    185171    } 
     
    195181     * @return integer 削除数 
    196182     */ 
    197     function lfDelPageData($page_id, $device_type_id = DEVICE_TYPE_PC) 
    198     { 
     183    function lfDelPageData($page_id, $device_type_id = DEVICE_TYPE_PC) { 
    199184        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    200185        // page_id が空でない場合にはdeleteを実行 
     
    218203     * @return void // TODO boolean にするべき? 
    219204     */ 
    220     function lfDelFile($filename, $device_type_id) 
    221     { 
     205    function lfDelFile($filename, $device_type_id) { 
    222206        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    223207 
     
    251235     * @return 編集可能ページの場合 true 
    252236     */ 
    253     function isEditablePage($device_type_id, $page_id) 
    254     { 
     237    function isEditablePage($device_type_id, $page_id) { 
    255238        if ($page_id == 0) { 
    256239            return false; 
     
    271254     * @return string テンプレートのパス 
    272255     */ 
    273     function getTemplatePath($device_type_id = DEVICE_TYPE_PC, $isUser = false) 
    274     { 
     256    function getTemplatePath($device_type_id = DEVICE_TYPE_PC, $isUser = false) { 
    275257        $templateName = ''; 
    276258        switch ($device_type_id) { 
     
    309291     * @return string 端末に応じた DocumentRoot から user_data までのパス 
    310292     */ 
    311     function getUserDir($device_type_id = DEVICE_TYPE_PC, $hasPackage = false) 
    312     { 
     293    function getUserDir($device_type_id = DEVICE_TYPE_PC, $hasPackage = false) { 
    313294        switch ($device_type_id) { 
    314295        case DEVICE_TYPE_MOBILE: 
     
    342323     * @return void 
    343324     */ 
    344     function setBlocPathTo($device_type_id = DEVICE_TYPE_PC, &$arrBlocs = array()) 
    345     { 
     325    function setBlocPathTo($device_type_id = DEVICE_TYPE_PC, &$arrBlocs = array()) { 
    346326        foreach ($arrBlocs as $key => $value) { 
    347327            $arrBloc =& $arrBlocs[$key]; 
     
    359339     * @return integer $col_num カラム数 
    360340     */ 
    361     function getColumnNum($arrPageLayout) 
    362     { 
     341    function getColumnNum($arrPageLayout) { 
    363342        // メインは確定 
    364343        $col_num = 1; 
Note: See TracChangeset for help on using the changeset viewer.