| @@ -8,27 +8,29 @@ | ||
| 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"> |
| @@ -34,20 +36,20 @@ | ||
| 34 | 36 | <table class="form-table"> |
| 35 | 37 | <tbody> |
| 36 | 38 | <tr> |
| 37 | 39 | <th> |
| 38 | - <label for="description"><?php echo TXT_SET_UP_USERGROUPS; ?></label> | |
| 40 | + <label for="description"><?php echo TXT_UAM_SET_UP_USERGROUPS; ?></label> | |
| 39 | 41 | </th> |
| 40 | 42 | <td> |
| 41 | 43 | <?php |
| 42 | -if (count($uamUserGroups) > 0) { | |
| 44 | +if (count($aUamUserGroups) > 0) { | |
| 43 | 45 | include 'groupSelectionForm.php'; |
| 44 | -} elseif ($userAccessManager->getAccessHandler()->checkUserAccess()) { | |
| 46 | +} elseif ($oUserAccessManager->getAccessHandler()->checkUserAccess()) { | |
| 45 | 47 | ?> |
| 46 | - <a href='admin.php?page=uam_usergroup'><?php echo TXT_CREATE_GROUP_FIRST; ?></a> | |
| 48 | + <a href='admin.php?page=uam_usergroup'><?php echo TXT_UAM_CREATE_GROUP_FIRST; ?></a> | |
| 47 | 49 | <?php |
| 48 | 50 | } else { |
| 49 | - echo TXT_NO_GROUP_AVAILABLE; | |
| 51 | + echo TXT_UAM_NO_GROUP_AVAILABLE; | |
| 50 | 52 | } |
| 51 | 53 | ?> |
| 52 | 54 | </td> |
| 53 | 55 | </tr> |
| @@ -54,14 +56,14 @@ | ||
| 54 | 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') { | |
| 65 | +if ($sAction != 'edit') { | |
| 64 | 66 | ?> |
| 65 | 67 | <style type="text/css"> |
| 66 | 68 | .submit { |
| 67 | 69 | display: none; |