Changeset 12333 for extensions/community/add_photos.php
- Timestamp:
- Oct 3, 2011, 2:18:46 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/community/add_photos.php
r10756 r12333 32 32 define('PHOTOS_ADD_BASE_URL', make_index_url(array('section' => 'add_photos'))); 33 33 34 prepare_upload_configuration();35 36 34 $user_permissions = community_get_user_permissions($user['id']); 37 35 … … 47 45 $page['errors'] = array(); 48 46 $page['infos'] = array(); 47 48 // this is for "browser uploader", for Flash Uploader the problem is solved 49 // with function community_uploadify_privacy_level (see main.inc.php) 49 50 $_POST['level'] = 16; 50 51 … … 53 54 $hacking_attempt = false; 54 55 55 if ('existing' == $_POST['category_type']) 56 { 57 // is the user authorized to upload in this album? 58 if (!in_array($_POST['category'], $user_permissions['upload_categories'])) 59 { 60 echo 'Hacking attempt, you have no permission to upload in this album'; 61 $hacking_attempt = true; 62 } 63 } 64 elseif ('new' == $_POST['category_type']) 65 { 66 if (!in_array($_POST['category_parent'], $user_permissions['create_categories'])) 67 { 68 echo 'Hacking attempt, you have no permission to create this album'; 69 $hacking_attempt = true; 70 } 56 // is the user authorized to upload in this album? 57 if (!in_array($_POST['category'], $user_permissions['upload_categories'])) 58 { 59 echo 'Hacking attempt, you have no permission to upload in this album'; 60 $hacking_attempt = true; 71 61 } 72 62 … … 88 78 $page['infos'] = array(); 89 79 90 if (isset($ conf['community_ask_for_properties']) and $conf['community_ask_for_properties'])80 if (isset($_POST['name'])) 91 81 { 92 82 $data = array();
Note: See TracChangeset
for help on using the changeset viewer.