-
Notifications
You must be signed in to change notification settings - Fork 1
/
PluginBlacklist.class.php
49 lines (43 loc) · 1.31 KB
/
PluginBlacklist.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
<?php
/**
* Blacklist - проверка E-Mail пользователей на наличие в базах спамеров.
*
* Версия: 1.1.0
* Автор: Александр Вереник
* Профиль: http://livestreet.ru/profile/Wasja/
* GitHub: https://github.com/wasja1982/livestreet_blacklist
*
**/
/**
* Запрещаем напрямую через браузер обращение к этому файлу.
*/
if (!class_exists('Plugin')) {
die('Hacking attemp!');
}
class PluginBlacklist extends Plugin {
protected $aInherits = array(
'entity' => array('ModuleUser_EntityUser'),
'module' => array('ModuleUser'),
);
/**
* Активация плагина
*/
public function Activate() {
if (!$this->isTableExists('prefix_blacklist')) {
$this->ExportSQL(dirname(__FILE__) . '/dump.sql');
} elseif (!$this->isFieldExists('prefix_blacklist', 'service')) {
$this->ExportSQL(dirname(__FILE__) . '/dump2.sql');
}
return true;
}
/**
* Инициализация плагина
*/
public function Init() {
}
static function blackMail($sMail) {
$oEngine = Engine::getInstance ();
return $oEngine->PluginBlacklist_ModuleBlacklist_blackMail($sMail);
}
}
?>