Changeset 28836
- Timestamp:
- Jun 29, 2014, 4:18:10 PM (10 years ago)
- Location:
- extensions/comments_blacklist
- Files:
-
- 1 added
- 1 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/comments_blacklist/admin.php
r26113 r28836 14 14 15 15 file_put_contents(COMM_BLACKLIST_FILE, $_POST['content']); 16 conf_update_param('comments_blacklist', serialize($conf['comments_blacklist']));16 conf_update_param('comments_blacklist', $conf['comments_blacklist']); 17 17 $page['infos'][] = l10n('Information data registered in database'); 18 18 } -
extensions/comments_blacklist/main.inc.php
r26113 r28836 11 11 defined('PHPWG_ROOT_PATH') or die('Hacking attempt!'); 12 12 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'); 13 global $conf; 14 15 define('COMM_BLACKLIST_ID', basename(dirname(__FILE__))); 16 define('COMM_BLACKLIST_PATH' , PHPWG_PLUGINS_PATH . COMM_BLACKLIST_ID . '/'); 17 define('COMM_BLACKLIST_ADMIN', get_root_url() . 'admin.php?page=plugin-' . COMM_BLACKLIST_ID); 18 define('COMM_BLACKLIST_FILE', PHPWG_ROOT_PATH . PWG_LOCAL_DIR . 'comments_blacklist.txt'); 18 19 19 20 20 add_event_handler('init', 'comm_blacklist_init'); 21 $conf['comments_blacklist'] = safe_unserialize($conf['comments_blacklist']); 22 21 23 22 24 if (defined('IN_ADMIN')) … … 29 31 } 30 32 31 32 /**33 * plugin initialization34 */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 }45 33 46 34 /**
Note: See TracChangeset
for help on using the changeset viewer.