Changeset 17657 for extensions/UserCollections/main.inc.php
- Timestamp:
- Aug 29, 2012, 5:23:25 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserCollections/main.inc.php
r17519 r17657 13 13 global $conf, $prefixeTable; 14 14 15 define('USER_COLLEC_PATH', PHPWG_PLUGINS_PATH . basename(dirname(__FILE__)) . '/');15 define('USER_COLLEC_PATH', PHPWG_PLUGINS_PATH . 'UserCollections/'); 16 16 define('COLLECTIONS_TABLE', $prefixeTable.'collections'); 17 17 define('COLLECTION_IMAGES_TABLE',$prefixeTable.'collection_images'); 18 define('USER_COLLEC_ADMIN', get_root_url() . 'admin.php?page=plugin- ' . basename(dirname(__FILE__)));18 define('USER_COLLEC_ADMIN', get_root_url() . 'admin.php?page=plugin-UserCollections'); 19 19 define('USER_COLLEC_PUBLIC', get_absolute_root_url() . make_index_url(array('section' => 'collections')) . '/'); 20 define('USER_COLLEC_VERSION', '1.0.3'); 21 20 22 21 23 add_event_handler('init', 'user_collections_init'); … … 36 38 require(USER_COLLEC_PATH . 'include/events.inc.php'); 37 39 40 41 /** 42 * update plugin & load language 43 */ 44 function user_collections_init() 45 { 46 global $pwg_loaded_plugins; 47 48 if ( 49 $pwg_loaded_plugins['UserCollections']['version'] == 'auto' or 50 version_compare($pwg_loaded_plugins['UserCollections']['version'], USER_COLLEC_VERSION, '<') 51 ) 52 { 53 include_once(USER_COLLEC_PATH . 'include/install.inc.php'); 54 user_collections_install(); 55 56 if ($pwg_loaded_plugins['UserCollections']['version'] != 'auto') 57 { 58 $query = ' 59 UPDATE '. PLUGINS_TABLE .' 60 SET version = "'. USER_COLLEC_VERSION .'" 61 WHERE id = "UserCollections"'; 62 pwg_query($query); 63 64 $pwg_loaded_plugins['UserCollections']['version'] = USER_COLLEC_VERSION; 65 66 if (defined('IN_ADMIN')) 67 { 68 $_SESSION['page_infos'][] = 'UserCollections updated to version '. USER_COLLEC_VERSION; 69 } 70 } 71 } 72 73 load_language('plugin.lang', USER_COLLEC_PATH); 74 } 75 38 76 ?>
Note: See TracChangeset
for help on using the changeset viewer.