-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathPluginMagicrule.class.php
69 lines (63 loc) · 1.63 KB
/
PluginMagicrule.class.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
<?php
/*-------------------------------------------------------
*
* LiveStreet Engine Social Networking
* Copyright © 2008 Mzhelskiy Maxim
*
*--------------------------------------------------------
*
* Official site: www.livestreet.ru
* Contact e-mail: [email protected]
*
* GNU General Public License, version 2:
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
---------------------------------------------------------
*/
/**
* Запрещаем напрямую через браузер обращение к этому файлу.
*/
if (!class_exists('Plugin')) {
die('Hacking attempt!');
}
class PluginMagicrule extends Plugin {
protected $aInherits=array(
'action' => array(
'ActionAjax'=>'_ActionAjax',
'ActionBlog'=>'_ActionBlog',
'ActionTopic'=>'_ActionTopic',
'ActionQuestion'=>'_ActionQuestion',
'ActionLink'=>'_ActionLink',
'ActionPhotoset'=>'_ActionPhotoset',
'ActionProfile'=>'_ActionProfile',
),
'module' => array(
'ModuleVote'=>'_ModuleVote',
)
);
/**
* Активация плагина
*/
public function Activate() {
if (!$this->isTableExists('prefix_magicrule_block')) {
/**
* При активации выполняем SQL дамп
*/
$this->ExportSQL(dirname(__FILE__).'/dump.sql');
} else {
/**
* Таблица уже есть, но возможно требуется обновление
*/
if (!$this->isFieldExists('prefix_magicrule_block','data')) {
$this->ExportSQL(dirname(__FILE__).'/patch_1.0_to_1.1.sql');
}
}
return true;
}
/**
* Инициализация плагина
*/
public function Init() {
}
}
?>