Changeset 23085 for extensions/community/main.inc.php
- Timestamp:
- Jun 7, 2013, 2:41:14 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/community/main.inc.php
r23037 r23085 38 38 function community_init() 39 39 { 40 global $conf, $ pwg_loaded_plugins;40 global $conf, $user, $pwg_loaded_plugins; 41 41 42 42 // apply upgrade if needed … … 63 63 } 64 64 } 65 66 // prepare plugin configuration 67 $conf['community'] = unserialize($conf['community']); 68 69 // TODO: generate permissions in $user['community_permissions'] if ws.php 70 // + remove all calls of community_get_user_permissions related to webservices 71 if (!defined('IN_ADMIN') or !IN_ADMIN) 72 { 73 $user['community_permissions'] = community_get_user_permissions($user['id']); 74 } 65 75 } 66 76 … … 88 98 $style.= '-moz-border-radius:10px;'; 89 99 $style.= '-webkit-border-radius:10px;'; 90 $style.= ' -border-radius:10px;';100 $style.= 'border-radius:10px;'; 91 101 $style.= 'margin-left:5px;'; 92 102 … … 169 179 // conditional : depending on community permissions, display the "Add 170 180 // photos" link in the gallery menu 171 $user_permissions = community_get_user_permissions($user['id']);172 173 if ( count($user_permissions['upload_categories']) == 0 and !$user_permissions ['create_whole_gallery'])181 $user_permissions = $user['community_permissions']; 182 183 if (!$user_permissions['community_enabled']) 174 184 { 175 185 return;
Note: See TracChangeset
for help on using the changeset viewer.