Changeset 16495 for extensions/Icy_Picture_Modify/main.inc.php
- Timestamp:
- Jul 8, 2012, 5:02:01 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/Icy_Picture_Modify/main.inc.php
r16356 r16495 2 2 /* 3 3 Plugin Name: Icy Modify Picture 4 Version: 1.1.24 Version: 2.0.0 5 5 Description: Allow users to modify pictures they uploaded 6 6 Plugin URI: http://piwigo.org/ext/extension_view.php?eid=563 … … 14 14 } 15 15 16 # Should be ./plugins/icy_picture_modify/17 16 define('ICY_PICTURE_MODIFY_PATH' , PHPWG_PLUGINS_PATH.basename(dirname(__FILE__)).'/'); 18 include_once(ICY_PICTURE_MODIFY_PATH.'include/functions_icy_picture_modify.inc.php');17 require_once(ICY_PICTURE_MODIFY_PATH.'include/functions_icy_picture_modify.inc.php'); 19 18 20 # Hooks declaration 19 # Variable declarations ################################################ 20 21 global $ICY_ACL; 22 23 # Hooks declarations ################################################### 21 24 22 25 add_event_handler('loc_end_section_init', 'icy_picture_modify_section_init'); 23 add_event_handler('loc_end_index', 'icy_picture_modify_index'); 26 remove_event_handler('loc_end_index', 'community_index'); 27 add_event_handler('loc_end_index', 'icy_picture_modify_index', 40); 28 24 29 add_event_handler('loc_begin_picture', 'icy_picture_modify_loc_begin_picture'); 30 add_event_handler('init','icy_picture_modify_fix_community_acl', 40); 31 # add_event_handler('login_success', ); 25 32 26 # Hooks definitions 33 add_event_handler('blockmanager_apply', 'icy_picture_modify_fix_community_acl', 40); 34 add_event_handler('ws_invoke_allowed', 'icy_picture_modify_fix_community_acl', 40); 35 add_event_handler('ws_add_methods', 'icy_picture_modify_fix_community_acl', 40); 36 add_event_handler('community_ws_categories_getList', 'icy_picture_modify_fix_community_acl', 40); 37 add_event_handler('sendResponse', 'icy_picture_modify_fix_community_acl', 40); 38 39 # Hooks definitions #################################################### 40 41 function icy_picture_modify_fix_community_acl() 42 { 43 icy_acl_fix_community(icy_acl_load_configuration()); 44 } 27 45 28 46 function icy_picture_modify_section_init() … … 40 58 global $page; 41 59 42 if (isset($page['section']) and $page['section'] == 'icy_picture_modify') 60 if (! isset($page['section'])) { 61 return TRUE; 62 } 63 64 if ($page['section'] == 'icy_picture_modify') 43 65 { 44 66 include(ICY_PICTURE_MODIFY_PATH.'icy_picture_modify.php'); 67 } 68 elseif ($page['section'] == 'add_photos') { 69 icy_picture_modify_fix_community_acl(TRUE); 70 include(ICY_PICTURE_MODIFY_PATH.'add_photos.php'); 45 71 } 46 72 } … … 51 77 { 52 78 global $conf, $template, $page, $user; 53 if ((!is_admin()) and icy_check_image_owner($page['image_id'], $user['id'])) 79 80 icy_acl_load_configuration(); 81 82 if (icy_image_editable($page['image_id'])) 54 83 { 55 84 $url_admin =
Note: See TracChangeset
for help on using the changeset viewer.