| @@ -8,68 +8,70 @@ | ||
| 8 | 8 | * |
| 9 | 9 | * @category UserAccessManager |
| 10 | 10 | * @package UserAccessManager |
| 11 | 11 | * @author Alexander Schneider <alexanderschneider85@googlemail.com> |
| 12 | - * @copyright 2008-2010 Alexander Schneider | |
| 12 | + * @copyright 2008-2013 Alexander Schneider | |
| 13 | 13 | * @license http://www.gnu.org/licenses/gpl-2.0.html GNU General Public License, version 2 |
| 14 | 14 | * @version SVN: $Id$ |
| 15 | 15 | * @link http://wordpress.org/extend/plugins/user-access-manager/ |
| 16 | 16 | */ |
| 17 | 17 | |
| 18 | -global $userAccessManager; | |
| 19 | -$uamUserGroups | |
| 20 | - = &$userAccessManager->getAccessHandler()->getUserGroups(); | |
| 18 | +global $oUserAccessManager; | |
| 19 | +$aUamUserGroups = $oUserAccessManager->getAccessHandler()->getUserGroups(); | |
| 21 | 20 | |
| 22 | -$objectId = null; | |
| 21 | +$iObjectId = null; | |
| 22 | +$sObjectType = 'category'; | |
| 23 | 23 | |
| 24 | 24 | if (isset($_GET['tag_ID'])) { |
| 25 | - $objectId = $_GET['tag_ID']; | |
| 25 | + $iObjectId = $_GET['tag_ID']; | |
| 26 | 26 | |
| 27 | - $userGroupsForObject | |
| 28 | - = &$userAccessManager->getAccessHandler()->getUserGroupsForCategory($objectId); | |
| 27 | + $aUserGroupsForObject = $oUserAccessManager->getAccessHandler()->getUserGroupsForObject( | |
| 28 | + $sObjectType, | |
| 29 | + $iObjectId | |
| 30 | + ); | |
| 29 | 31 | } else { |
| 30 | - $userGroupsForObject = array(); | |
| 32 | + $aUserGroupsForObject = array(); | |
| 31 | 33 | } |
| 32 | 34 | |
| 33 | 35 | ?> |
| 34 | 36 | <table class="form-table"> |
| 35 | - <tbody> | |
| 36 | - <tr> | |
| 37 | - <th> | |
| 38 | - <label for="description"><?php echo TXT_SET_UP_USERGROUPS; ?></label> | |
| 39 | - </th> | |
| 40 | - <td> | |
| 37 | + <tbody> | |
| 38 | + <tr> | |
| 39 | + <th> | |
| 40 | + <label for="description"><?php echo TXT_UAM_SET_UP_USERGROUPS; ?></label> | |
| 41 | + </th> | |
| 42 | + <td> | |
| 41 | 43 | <?php |
| 42 | -if (count($uamUserGroups) > 0) { | |
| 43 | - include 'groupSelectionForm.php'; | |
| 44 | -} elseif ($userAccessManager->getAccessHandler()->checkUserAccess()) { | |
| 44 | +if (count($aUamUserGroups) > 0) { | |
| 45 | + include 'groupSelectionForm.php'; | |
| 46 | +} elseif ($oUserAccessManager->getAccessHandler()->checkUserAccess()) { | |
| 45 | 47 | ?> |
| 46 | - <a href='admin.php?page=uam_usergroup'><?php echo TXT_CREATE_GROUP_FIRST; ?></a> | |
| 47 | - <?php | |
| 48 | + <a href='admin.php?page=uam_usergroup'><?php echo TXT_UAM_CREATE_GROUP_FIRST; ?></a> | |
| 49 | + <?php | |
| 48 | 50 | } else { |
| 49 | - echo TXT_NO_GROUP_AVAILABLE; | |
| 51 | + echo TXT_UAM_NO_GROUP_AVAILABLE; | |
| 50 | 52 | } |
| 51 | 53 | ?> |
| 52 | - </td> | |
| 53 | - </tr> | |
| 54 | - </tbody> | |
| 54 | + </td> | |
| 55 | + </tr> | |
| 56 | + </tbody> | |
| 55 | 57 | </table> |
| 56 | 58 | <?php |
| 57 | 59 | if (isset($_GET['action'])) { |
| 58 | - $action = $_GET['action']; | |
| 60 | + $sAction = $_GET['action']; | |
| 59 | 61 | } else { |
| 60 | - $action = null; | |
| 62 | + $sAction = null; | |
| 61 | 63 | } |
| 62 | 64 | |
| 63 | -if ($action != 'edit') { | |
| 64 | - ?> | |
| 65 | - <style type="text/css"> | |
| 65 | +if ($sAction != 'edit') { | |
| 66 | + ?> | |
| 67 | + <style type="text/css"> | |
| 66 | 68 | .submit { |
| 67 | - display: none; | |
| 68 | - position: relative; | |
| 69 | + display: none; | |
| 70 | + position: relative; | |
| 69 | 71 | } |
| 70 | 72 | </style> |
| 71 | 73 | <p class="submit" style="display: block; position: relative;"> |
| 72 | - <input class="button" type="submit" value="Add New Category" name="submit" /> | |
| 73 | - </p> | |
| 74 | - <?php | |
| 74 | + <input class="button" type="submit" value="Add New Category" name="submit" /> | |
| 75 | + </p> | |
| 76 | + <?php | |
| 75 | 77 | } |