source: extensions/AntiAspi/initadmin.php @ 31952

Revision 31952, 703 bytes checked in by plg, 13 months ago (diff)

cleaner configuration manager on install/update

Line 
1<?php
2//add admin menu
3add_event_handler('get_admin_plugin_menu_links', 'antiaspi_admi_menu');
4
5function antiaspi_admi_menu($menu) {
6    load_language('plugin.lang', ANTIASPI_PATH);
7    $menu[] = array(
8        'NAME' => l10n('AntiAspi'),
9        'URL' => ANTIASPI_ADMIN,
10    );
11     return $menu;
12} 
13 
14function antiaspi_check_old_conf()
15{
16  global $page;
17
18  $conf = array();
19
20  $local_conf_filpath = PHPWG_ROOT_PATH. 'local/config/config.inc.php';
21  if (file_exists($local_conf_filpath))
22  {
23    @include($local_conf_filpath);
24  }
25
26  if (isset($conf['antiaspi']))
27  {
28    $page['errors'][] = 'we have found some antiaspi settings in your local configuration, please remove it, no longer in use.';
29  }
30}
Note: See TracBrowser for help on using the repository browser.