Ignore:
Timestamp:
Jun 29, 2014, 4:18:10 PM (10 years ago)
Author:
mistic100
Message:

use new maintain class

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/comments_blacklist/main.inc.php

    r26113 r28836  
    1111defined('PHPWG_ROOT_PATH') or die('Hacking attempt!');
    1212
    13 define('COMM_BLACKLIST_ID',      basename(dirname(__FILE__)));
    14 define('COMM_BLACKLIST_PATH' ,   PHPWG_PLUGINS_PATH . COMM_BLACKLIST_ID . '/');
    15 define('COMM_BLACKLIST_ADMIN',   get_root_url() . 'admin.php?page=plugin-' . COMM_BLACKLIST_ID);
    16 define('COMM_BLACKLIST_FILE',    PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'comments_blacklist.txt');
    17 define('COMM_BLACKLIST_VERSION', 'auto');
     13global $conf;
     14
     15define('COMM_BLACKLIST_ID',    basename(dirname(__FILE__)));
     16define('COMM_BLACKLIST_PATH' , PHPWG_PLUGINS_PATH . COMM_BLACKLIST_ID . '/');
     17define('COMM_BLACKLIST_ADMIN', get_root_url() . 'admin.php?page=plugin-' . COMM_BLACKLIST_ID);
     18define('COMM_BLACKLIST_FILE',  PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'comments_blacklist.txt');
    1819
    1920
    20 add_event_handler('init', 'comm_blacklist_init');
     21$conf['comments_blacklist'] = safe_unserialize($conf['comments_blacklist']);
     22
    2123
    2224if (defined('IN_ADMIN'))
     
    2931}
    3032
    31 
    32 /**
    33  * plugin initialization
    34  */
    35 function comm_blacklist_init()
    36 {
    37   global $conf;
    38  
    39   include_once(COMM_BLACKLIST_PATH . 'maintain.inc.php');
    40   $maintain = new comments_blacklist_maintain(COMM_BLACKLIST_ID);
    41   $maintain->autoUpdate(COMM_BLACKLIST_VERSION, 'install');
    42  
    43   $conf['comments_blacklist'] = unserialize($conf['comments_blacklist']);
    44 }
    4533
    4634/**
Note: See TracChangeset for help on using the changeset viewer.