Ignore:
Timestamp:
2013/03/09 18:57:53 (8 years ago)
Author:
Yammy
Message:

フックポイントのON/OFF機能実装

refs #2179

File:
1 edited

Legend:

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

    r22629 r22641  
    155155    { 
    156156        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
    157         $objQuery->setOrder('priority DESC'); 
     157        $objQuery->setOrder('hook_point ASC, priority DESC'); 
    158158        $cols = 'dtb_plugin_hookpoint.*, dtb_plugin.priority, dtb_plugin.plugin_name'; 
    159159        $from = 'dtb_plugin_hookpoint LEFT JOIN dtb_plugin USING(plugin_id)'; 
    160         $arrRet = $objQuery->select($cols, $from); 
     160        $where = 'enable = 1'; 
     161        $arrRet = $objQuery->select($cols, $from, $where); 
    161162        $arrList = array(); 
    162163        foreach ($arrRet AS $key=>$val) { 
    163             $arrList[$val['plugin_hookpoint_id']][$val['plugin_id']] = $val; 
     164            $arrList[$val['hook_point']][$val['plugin_id']] = $val; 
    164165        } 
    165166        return $arrList; 
     
    192193        return $arrErr; 
    193194    } 
     195 
     196    /** 
     197     * フックポイントのON/OFF変更 
     198     * 
     199     * @param intger $plugin_hookpoint_id  フックポイントID 
     200     * @return bolean $use_flg:ture=ON、false=OFF 
     201     */ 
     202    function setPluginHookPointChangeUse($plugin_hookpoint_id, $use_flg = false) { 
     203        $objQuery =& SC_Query_Ex::getSingletonInstance(); 
     204        $sqlval['use_flg'] = $use_flg; 
     205        $objQuery->update('dtb_plugin_hookpoint', $sqlval, 'plugin_hookpoint_id = ?', array($plugin_hookpoint_id)); 
     206    } 
    194207} 
Note: See TracChangeset for help on using the changeset viewer.