diff --git a/classes/permissions_form.php b/classes/permissions_form.php index 440ecb32..45346611 100644 --- a/classes/permissions_form.php +++ b/classes/permissions_form.php @@ -31,7 +31,6 @@ 'site_moderate_requests' => 'Request moderation access.', 'site_delete_artist' => 'Can delete artists (must be able to delete torrents+requests).', 'site_moderate_forums' => 'Forum moderation access.', - 'site_admin_forums' => 'Forum administrator access.', 'site_forums_double_post' => 'Can double post in the forums.', 'site_view_flow' => 'Can view stats and data pools.', @@ -45,7 +44,6 @@ 'site_debug' => 'Developer access.', 'site_proxy_images' => 'Image proxy & anti-canary.', 'site_search_many' => 'Can go past low limit of search results.', - 'users_edit_usernames' => 'Can edit usernames.', 'users_edit_ratio' => 'Can edit anyone\'s upload/download amounts.', 'users_edit_own_ratio' => 'Can edit own upload/download amounts.', @@ -72,12 +70,10 @@ 'users_view_keys' => 'Can view passkeys.', 'users_view_ips' => 'Can view IP addresses.', 'users_view_email' => 'Can view email addresses.', - 'users_override_paranoia' => 'Can override paranoia.', 'users_logout' => 'Can log users out (old?).', 'users_make_invisible' => 'Can make users invisible.', 'users_mod' => 'Basic moderator tools.', - 'torrents_edit' => 'Can edit any torrent.', 'torrents_delete' => 'Can delete torrents.', 'torrents_delete_fast' => 'Can delete more than 3 torrents at a time.', @@ -112,10 +108,10 @@ 'torrents_edit_vanityhouse' => 'Can mark groups as part of Vanity House.', 'artist_edit_vanityhouse' => 'Can mark artists as part of Vanity House.', 'site_tag_aliases_read' => 'Can view the list of tag aliases.' - ); -function permissions_form() { ?> +function permissions_form() { +?>
@@ -124,47 +120,49 @@ function permissions_form() { ?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +
@@ -176,36 +174,38 @@ function permissions_form() { ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + *Everything is only applicable to users with the same or lower class level @@ -218,19 +218,19 @@ function permissions_form() { ?> - - - - - - - - - - - - - + @@ -242,28 +242,31 @@ function permissions_form() { ?> - - - - - - - - - - - - - - - - - - +
- + $Status, 'response' => $Message)); @@ -143,4 +142,13 @@ function json_die($Status, $Message) { } die(); } + +/** + * Print the site's URL including the appropriate URI scheme, including the trailing slash + * + * @param bool $SSL - whether the URL should be crafted for HTTPS or regular HTTP + */ +function site_url($SSL = true) { + return $SSL ? 'https://' . SSL_SITE_URL . '/' : 'http://' . NONSSL_SITE_URL . '/'; +} ?> diff --git a/docs/CHANGES.txt b/docs/CHANGES.txt index 9d6cf80c..55aa6334 100644 --- a/docs/CHANGES.txt +++ b/docs/CHANGES.txt @@ -1,5 +1,11 @@ CHANGELOG +2013-09-30 by alderaan +Refactored backend code for staff toolbox + +2013-09-30 by alderaan +Add function site_url() for printing the site's URL + 2013-09-28 by Ajax Added top artists data to top10 page using last.fm chart data diff --git a/sections/requests/takefill.php b/sections/requests/takefill.php index b485457c..384cf991 100644 --- a/sections/requests/takefill.php +++ b/sections/requests/takefill.php @@ -175,7 +175,7 @@ $UserIDs = $DB->to_array(); foreach ($UserIDs as $User) { list($VoterID) = $User; - Misc::send_pm($VoterID, 0, "The request \"$FullName\" has been filled", 'One of your requests — [url=https://'.SSL_SITE_URL.'/requests.php?action=view&id='.$RequestID.']'.$FullName.'[/url] — has been filled. You can view it here: [url]https://'.SSL_SITE_URL.'/torrents.php?torrentid='.$TorrentID.'[/url]'); + Misc::send_pm($VoterID, 0, "The request \"$FullName\" has been filled", 'One of your requests — [url=https://'.SSL_SITE_URL."/requests.php?action=view&id=$RequestID]$FullName".'[/url] — has been filled. You can view it here: [url]https://'.SSL_SITE_URL."/torrents.php?torrentid=$TorrentID".'[/url]'); } $RequestVotes = Requests::get_votes_array($RequestID); diff --git a/sections/tools/managers/permissions_alter.php b/sections/tools/managers/permissions_alter.php index 12acceed..6882ef92 100644 --- a/sections/tools/managers/permissions_alter.php +++ b/sections/tools/managers/permissions_alter.php @@ -1,10 +1,12 @@
'; - echo $Perm; + $Perm = "$Title
"; + echo "$Perm\n"; } View::show_header('Manage Permissions','validate'); diff --git a/sections/tools/tools.php b/sections/tools/tools.php index 03448fe6..8a975f56 100644 --- a/sections/tools/tools.php +++ b/sections/tools/tools.php @@ -2,108 +2,161 @@ if (!check_perms('users_mod')) { error(403); } + +/** + * Used for rendering a single table row in the staff toolbox + * + * @param string $Title - the displayed name of the tool + * @param string $URL - the relative URL of the tool + * @param bool $HasPermission - whether the user has permission to view/use the tool + * @param string $Tooltip - optional tooltip + * + */ +function create_row($Title, $URL, $HasPermission = false, $Tooltip = false) { + $TooltipHTML = $Tooltip !== false ? " class=\"tooltip\" title=\"$Tooltip\"" : ""; + + if ($HasPermission) { + echo "\t\t\t\t$Title\n"; + } +} + View::show_header('Staff Tools'); ?>
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Managers
Permissions
Client whitelist
IP address bans
Login watch
Forums
News
"Do Not Upload" list
Vanity House additions
Email blacklist
Manage freeleech tokens
Official tags manager
Tag aliases
Label aliases
Change log
Global Notification
Calendar
Mass PM
+ +
+ + + +
Announcements
+
+
+ + + +
Community
+
+
+ + + +
Finances
+
+
+ + + +
Administration
+
+
- - - - - - - - - - - - - - - - - - - - - - -
Data
Donation log
Bitcoin donations (balance)
Bitcoin donations (unprocessed)
Registration log
Invite pool
Upscale pool
User flow
Torrent stats
Economic stats
Opcode stats
Service stats
Special users
Donor Rewards
+ +
+ + +?> + +
Queue
+
+
+ + +?> + +
Managers
+
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Misc
Batch tag editor
Manipulate tree
Update GeoIP
Create user
Clear/view a cache key
Duplicate IP addresses
PHP processes
Sandbox (1)
Sandbox (2)
Sandbox (3)
Sandbox (4)
Sandbox (5)
Sandbox (6)
Sandbox (7)
Sandbox (8)
Schedule
Rerender stylesheet gallery images
BBCode Sandbox
Public sandbox
Mod-level sandbox
+ +
+ + + +
Site Information
+
+
+ + + +
Torrents
+
+
+ + + +
Development
+
+
+ + + +
Developer Sandboxes
+
+
diff --git a/sections/user/permissions.php b/sections/user/permissions.php index 4577823b..e7b9f4c7 100644 --- a/sections/user/permissions.php +++ b/sections/user/permissions.php @@ -62,7 +62,7 @@ function display_perm($Key, $Title) { $Perm .= ' checked="checked"'; } $Perm .= " />
"; - echo $Perm; + echo "$Perm\n"; } View::show_header("$Username > Permissions");