Changeset 17925 for extensions/linked_pages/main.inc.php
- Timestamp:
- Sep 15, 2012, 2:39:38 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/linked_pages/main.inc.php
r17888 r17925 16 16 // | Define plugin constants | 17 17 // +-----------------------------------------------------------------------+ 18 define('LINKEDPAGES_PATH' , PHPWG_PLUGINS_PATH . 'linked_pages/'); 18 defined('LINKEDPAGES_ID') or define('LINKEDPAGES_ID', basename(dirname(__FILE__))); 19 define('LINKEDPAGES_PATH' , PHPWG_PLUGINS_PATH . LINKEDPAGES_ID . '/'); 19 20 define('LINKEDPAGES_TABLE', $prefixeTable . 'linked_pages'); 20 define('LINKEDPAGES_ADMIN', get_root_url() . 'admin.php?page=plugin- linked_pages');21 define('LINKEDPAGES_ADMIN', get_root_url() . 'admin.php?page=plugin-' . LINKEDPAGES_ID); 21 22 define('LINKEDPAGES_VERSION', '1.0.0'); 22 23 … … 51 52 52 53 if ( 53 $pwg_loaded_plugins[ 'linked_pages']['version'] == 'auto' or54 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, '<') 55 56 ) 56 57 { … … 58 59 linked_pages_install(); 59 60 60 if ($pwg_loaded_plugins[ 'linked_pages']['version'] != 'auto')61 if ($pwg_loaded_plugins[LINKEDPAGES_ID]['version'] != 'auto') 61 62 { 62 63 $query = ' 63 64 UPDATE '. PLUGINS_TABLE .' 64 65 SET version = "'. LINKEDPAGES_VERSION .'" 65 WHERE id = " linked_pages"';66 WHERE id = "'. LINKEDPAGES_ID .'"'; 66 67 pwg_query($query); 67 68 68 $pwg_loaded_plugins[ 'linked_pages']['version'] = LINKEDPAGES_VERSION;69 $pwg_loaded_plugins[LINKEDPAGES_ID]['version'] = LINKEDPAGES_VERSION; 69 70 70 71 if (defined('IN_ADMIN')) 71 72 { 72 $_SESSION['page_infos'][] = ' Skeletonupdated to version '. LINKEDPAGES_VERSION;73 $_SESSION['page_infos'][] = 'Linked Pages updated to version '. LINKEDPAGES_VERSION; 73 74 } 74 75 }
Note: See TracChangeset
for help on using the changeset viewer.