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() { +?>
- } ?> + +} diff --git a/classes/util.php b/classes/util.php index c08a3132..865a774a 100644 --- a/classes/util.php +++ b/classes/util.php @@ -129,10 +129,9 @@ function check_perms($PermissionName, $MinClass = 0) { return Permissions::check_perms($PermissionName, $MinClass); } -/* - * Print json status result with an optional message and die. +/** + * Print JSON status result with an optional message and die. */ - function json_die($Status, $Message) { if ($Status == 'success' && $Message) { print json_encode(array('status' => $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 @@ -function display_perm($Key,$Title) { +function display_perm($Key, $Title) { global $Values; - $Perm='