Changeset 21441 for extensions/Subscribe_to_comments/main.inc.php
- Timestamp:
- Mar 10, 2013, 5:12:50 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Subscribe_to_comments/main.inc.php
r21340 r21441 9 9 */ 10 10 11 /* 12 * potential problem : if the permissions of a user change, he receives notifications 13 * about photos and albums he can't see anymore 14 */ 15 11 16 if (!defined('PHPWG_ROOT_PATH')) die('Hacking attempt!'); 12 17 13 18 global $prefixeTable; 14 19 15 define('SUBSCRIBE_TO_PATH' , PHPWG_PLUGINS_PATH . 'Subscribe_to_Comments/'); 20 defined('SUBSCRIBE_TO_ID') or define('SUBSCRIBE_TO_ID', basename(dirname(__FILE__))); 21 define('SUBSCRIBE_TO_PATH' , PHPWG_PLUGINS_PATH . SUBSCRIBE_TO_ID . '/'); 16 22 define('SUBSCRIBE_TO_TABLE', $prefixeTable . 'subscribe_to_comments'); 17 23 define('SUBSCRIBE_TO_VERSION', 'auto'); … … 31 37 if ( 32 38 SUBSCRIBE_TO_VERSION == 'auto' or 33 $pwg_loaded_plugins[ 'Subscribe_to_Comments']['version'] == 'auto' or34 version_compare($pwg_loaded_plugins[ 'Subscribe_to_Comments']['version'], SUBSCRIBE_TO_VERSION, '<')39 $pwg_loaded_plugins[SUBSCRIBE_TO_ID]['version'] == 'auto' or 40 version_compare($pwg_loaded_plugins[SUBSCRIBE_TO_ID]['version'], SUBSCRIBE_TO_VERSION, '<') 35 41 ) 36 42 { … … 38 44 stc_install(); 39 45 40 if ( $pwg_loaded_plugins[ 'Subscribe_to_Comments']['version'] != 'auto' and SUBSCRIBE_TO_VERSION != 'auto' )46 if ( $pwg_loaded_plugins[SUBSCRIBE_TO_ID]['version'] != 'auto' and SUBSCRIBE_TO_VERSION != 'auto' ) 41 47 { 42 48 $query = ' 43 49 UPDATE '. PLUGINS_TABLE .' 44 50 SET version = "'. SUBSCRIBE_TO_VERSION .'" 45 WHERE id = " Subscribe_to_Comments"';51 WHERE id = "'. SUBSCRIBE_TO_ID .'"'; 46 52 pwg_query($query); 47 53 48 $pwg_loaded_plugins[ 'Subscribe_to_Comments']['version'] = SUBSCRIBE_TO_VERSION;54 $pwg_loaded_plugins[SUBSCRIBE_TO_ID]['version'] = SUBSCRIBE_TO_VERSION; 49 55 50 56 if (defined('IN_ADMIN')) … … 92 98 array_push($menu, array( 93 99 'NAME' => 'Subscribe to Comments', 94 'URL' => get_root_url().'admin.php?page=plugin-' . basename(dirname(__FILE__))100 'URL' => get_root_url().'admin.php?page=plugin-' . SUBSCRIBE_TO_ID, 95 101 )); 96 102 return $menu;
Note: See TracChangeset
for help on using the changeset viewer.