Changeset 22704


Ignore:
Timestamp:
2013/03/10 10:31:24 (11 years ago)
Author:
Yammy
Message:

フックポイント取得にuse_flg の判定引数追加

refs #2179

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/camp/camp-2_13-plugin/data/class/plugin/SC_Plugin_Util.php

    r22664 r22704  
    141141     * 
    142142     * @param integer $plugin_id 
     143     * @param integer $use_type 1=有効のみ 2=無効のみ 3=全て 
    143144     * @return array フックポイントの一覧 
    144145     */ 
    145     function getPluginHookPoint($plugin_id) 
     146    function getPluginHookPoint($plugin_id, $use_type = 1) 
    146147    { 
    147148        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    148149        $cols = '*'; 
    149150        $from = 'dtb_plugin_hookpoint'; 
    150         $where = 'plugin_id = ? AND use_flg = true'; 
     151        $where = 'plugin_id = ?'; 
     152        switch ($use_type) { 
     153            case 1: 
     154                $where .= ' AND use_flg = true'; 
     155            break; 
     156 
     157            case 2: 
     158                $where .= ' AND use_flg = false'; 
     159            break; 
     160 
     161            case 3: 
     162            default: 
     163            break; 
     164        } 
    151165        return $objQuery->select($cols, $from, $where, array($plugin_id)); 
    152166    } 
     
    236250        $where = 'T1.hook_point = ? AND NOT T1.plugin_id = ? AND T2.enable = ?'; 
    237251        if ($plugin_id > 0) { 
    238             $hookPoints = SC_Plugin_Util::getPluginHookPoint($plugin_id); 
     252            $hookPoints = SC_Plugin_Util::getPluginHookPoint($plugin_id, ''); 
    239253        } else { 
    240254            $hookPoints = SC_Plugin_Util::getPluginHookPointList(1); 
Note: See TracChangeset for help on using the changeset viewer.