Ignore:
Timestamp:
Sep 15, 2012, 2:39:38 PM (12 years ago)
Author:
mistic100
Message:

check AP restrictions and user.forbidden_cetegories

File:
1 edited

Legend:

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

    r17888 r17925  
    1616// | Define plugin constants                                               |
    1717// +-----------------------------------------------------------------------+
    18 define('LINKEDPAGES_PATH' ,   PHPWG_PLUGINS_PATH . 'linked_pages/');
     18defined('LINKEDPAGES_ID') or define('LINKEDPAGES_ID', basename(dirname(__FILE__)));
     19define('LINKEDPAGES_PATH' ,   PHPWG_PLUGINS_PATH . LINKEDPAGES_ID . '/');
    1920define('LINKEDPAGES_TABLE',   $prefixeTable . 'linked_pages');
    20 define('LINKEDPAGES_ADMIN',   get_root_url() . 'admin.php?page=plugin-linked_pages');
     21define('LINKEDPAGES_ADMIN',   get_root_url() . 'admin.php?page=plugin-' . LINKEDPAGES_ID);
    2122define('LINKEDPAGES_VERSION', '1.0.0');
    2223
     
    5152 
    5253  if (
    53     $pwg_loaded_plugins['linked_pages']['version'] == 'auto' or
    54     version_compare($pwg_loaded_plugins['linked_pages']['version'], LINKEDPAGES_VERSION, '<')
     54    $pwg_loaded_plugins[LINKEDPAGES_ID]['version'] == 'auto' or
     55    version_compare($pwg_loaded_plugins[LINKEDPAGES_ID]['version'], LINKEDPAGES_VERSION, '<')
    5556  )
    5657  {
     
    5859    linked_pages_install();
    5960   
    60     if ($pwg_loaded_plugins['linked_pages']['version'] != 'auto')
     61    if ($pwg_loaded_plugins[LINKEDPAGES_ID]['version'] != 'auto')
    6162    {
    6263      $query = '
    6364UPDATE '. PLUGINS_TABLE .'
    6465SET version = "'. LINKEDPAGES_VERSION .'"
    65 WHERE id = "linked_pages"';
     66WHERE id = "'. LINKEDPAGES_ID .'"';
    6667      pwg_query($query);
    6768     
    68       $pwg_loaded_plugins['linked_pages']['version'] = LINKEDPAGES_VERSION;
     69      $pwg_loaded_plugins[LINKEDPAGES_ID]['version'] = LINKEDPAGES_VERSION;
    6970     
    7071      if (defined('IN_ADMIN'))
    7172      {
    72         $_SESSION['page_infos'][] = 'Skeleton updated to version '. LINKEDPAGES_VERSION;
     73        $_SESSION['page_infos'][] = 'Linked Pages updated to version '. LINKEDPAGES_VERSION;
    7374      }
    7475    }
Note: See TracChangeset for help on using the changeset viewer.