Changeset 25678 for extensions/UserCollections/main.inc.php
- Timestamp:
- Nov 24, 2013, 6:09:57 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/UserCollections/main.inc.php
r24421 r25678 1 <?php 1 <?php 2 2 /* 3 3 Plugin Name: User Collections … … 18 18 global $conf, $prefixeTable; 19 19 20 define d('USER_COLLEC_ID') or define('USER_COLLEC_ID',basename(dirname(__FILE__)));20 define('USER_COLLEC_ID', basename(dirname(__FILE__))); 21 21 define('USER_COLLEC_PATH', PHPWG_PLUGINS_PATH . USER_COLLEC_ID . '/'); 22 22 define('COLLECTIONS_TABLE', $prefixeTable.'collections'); … … 43 43 // thumbnails actions 44 44 add_event_handler('loc_end_index_thumbnails', 'user_collections_thumbnails_list', EVENT_HANDLER_PRIORITY_NEUTRAL-10, 2); 45 add_event_handler('loc_end_index_thumbnails', 'uc_anti_lightbox', 41);46 45 47 46 // picture action … … 64 63 function user_collections_init() 65 64 { 66 global $pwg_loaded_plugins, $conf; 67 68 if ( 69 USER_COLLEC_VERSION == 'auto' or 70 $pwg_loaded_plugins[USER_COLLEC_ID]['version'] == 'auto' or 71 version_compare($pwg_loaded_plugins[USER_COLLEC_ID]['version'], USER_COLLEC_VERSION, '<') 72 ) 73 { 74 include_once(USER_COLLEC_PATH . 'include/install.inc.php'); 75 user_collections_install(); 76 77 if ( $pwg_loaded_plugins[USER_COLLEC_ID]['version'] != 'auto' and USER_COLLEC_VERSION != 'auto' ) 78 { 79 $query = ' 80 UPDATE '. PLUGINS_TABLE .' 81 SET version = "'. USER_COLLEC_VERSION .'" 82 WHERE id = "'. USER_COLLEC_ID .'"'; 83 pwg_query($query); 84 85 $pwg_loaded_plugins[USER_COLLEC_ID]['version'] = USER_COLLEC_VERSION; 86 87 if (defined('IN_ADMIN')) 88 { 89 $_SESSION['page_infos'][] = 'UserCollections updated to version '. USER_COLLEC_VERSION; 90 } 91 } 92 } 93 65 global $conf; 66 67 include_once(USER_COLLEC_PATH . 'maintain.inc.php'); 68 $maintain = new UserCollections_maintain(USER_COLLEC_ID); 69 $maintain->autoUpdate(USER_COLLEC_VERSION, 'install'); 70 94 71 load_language('plugin.lang', USER_COLLEC_PATH); 95 72 96 73 $conf['user_collections'] = unserialize($conf['user_collections']); 97 74 } … … 100 77 * admin plugins menu 101 78 */ 102 function user_collections_admin_menu($menu) 79 function user_collections_admin_menu($menu) 103 80 { 104 array_push($menu,array(81 $menu[] = array( 105 82 'NAME' => 'User Collections', 106 83 'URL' => USER_COLLEC_ADMIN, 107 )); 84 ); 85 108 86 return $menu; 109 87 } 110 111 ?>
Note: See TracChangeset
for help on using the changeset viewer.