Ejemplo n.º 1
0
 protected function exportSQLIfNeed($aConf = array())
 {
     foreach ($aConf as $aSQLConf) {
         if (!PluginLib_ModulePlugin::IsDBObjectExist($aSQLConf['table'], $aSQLConf['field'])) {
             $this->ExportSQL($aSQLConf['file']);
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * Активация плагина
  * Создание дополнительной колонки в таблицe _topic в базе.
  */
 public function Activate()
 {
     if (!PluginLib_ModulePlugin::IsDBObjectExist(Config::Get('db.table.blog'), 'blog_cat')) {
         $this->ExportSQL(dirname(__FILE__) . '/sql.sql');
     }
     $this->Cache_Clean();
     return true;
 }