From 1972eded06086a316c9a2880d99170c1f7c353a4 Mon Sep 17 00:00:00 2001 From: Git Date: Tue, 24 Feb 2015 08:00:27 +0000 Subject: [PATCH] Empty commit --- classes/users.class.php | 11 ++++++----- static/functions/autocomplete.js | 2 +- static/functions/comments.js | 2 +- static/functions/form_validate.js | 2 +- static/functions/script_start.js | 2 +- static/functions/user_notifications.js | 2 +- 6 files changed, 11 insertions(+), 10 deletions(-) diff --git a/classes/users.class.php b/classes/users.class.php index 24498346..7fe152ea 100644 --- a/classes/users.class.php +++ b/classes/users.class.php @@ -648,14 +648,15 @@ public static function show_avatar($Avatar, $UserID, $Username, $Setting, $Size switch ($Setting) { case 0: if (!empty($Avatar)) { - $ToReturn = ($ReturnHTML ? "" : $Avatar); + $ToReturn = ($ReturnHTML ? "
" : $Avatar); } else { $URL = STATIC_SERVER.'common/avatars/default.png'; - $ToReturn = ($ReturnHTML ? "" : $URL); + $ToReturn = ($ReturnHTML ? "
" : $URL); } break; case 2: $ShowAvatar = true; + // Fallthrough case 3: switch (G::$LoggedUser['Identicons']) { case 0: @@ -692,14 +693,14 @@ public static function show_avatar($Avatar, $UserID, $Username, $Setting, $Size $URL = 'https://robohash.org/'.md5($Username)."?set=set$Type&size={$Size}x$Size"; } if ($ShowAvatar == true && !empty($Avatar)) { - $ToReturn = ($ReturnHTML ? "" : $Avatar); + $ToReturn = ($ReturnHTML ? "
" : $Avatar); } else { - $ToReturn = ($ReturnHTML ? "" : $URL); + $ToReturn = ($ReturnHTML ? "
" : $URL); } break; default: $URL = STATIC_SERVER.'common/avatars/default.png'; - $ToReturn = ($ReturnHTML ? "" : $URL); + $ToReturn = ($ReturnHTML ? "
" : $URL); } return $ToReturn; } diff --git a/static/functions/autocomplete.js b/static/functions/autocomplete.js index 59927076..f11aa1e8 100644 --- a/static/functions/autocomplete.js +++ b/static/functions/autocomplete.js @@ -2,7 +2,7 @@ var ARTIST_AUTOCOMPLETE_URL = 'artist.php?action=autocomplete'; var TAGS_AUTOCOMPLETE_URL = 'torrents.php?action=autocomplete_tags'; var SELECTOR = '[data-gazelle-autocomplete="true"]'; $(document).ready(function() { - var url = new URL(); + var url = new gazURL(); $('#artistsearch' + SELECTOR).autocomplete({ deferRequestBy: 300, diff --git a/static/functions/comments.js b/static/functions/comments.js index efb0f6a0..e439b0e7 100644 --- a/static/functions/comments.js +++ b/static/functions/comments.js @@ -1,6 +1,6 @@ var username; var postid; -var url = new URL(); +var url = new gazURL(); function QuoteJump(event, post) { var button = event.button; diff --git a/static/functions/form_validate.js b/static/functions/form_validate.js index e92d4aaa..e3cbd9f4 100644 --- a/static/functions/form_validate.js +++ b/static/functions/form_validate.js @@ -1,5 +1,5 @@ $(document).ready(function() { - var url = new URL(); + var url = new gazURL(); var query = url.query; switch (url.path) { case "forums": diff --git a/static/functions/script_start.js b/static/functions/script_start.js index 3d06902d..ac7b76cd 100644 --- a/static/functions/script_start.js +++ b/static/functions/script_start.js @@ -194,7 +194,7 @@ var util = function (selector, context) { return new util.fn.init(selector, context); } -function URL() { +function gazURL() { var path = window.location.pathname.split('/'); var path = path[path.length - 1].split(".")[0]; var splitted = window.location.search.substr(1).split("&"); diff --git a/static/functions/user_notifications.js b/static/functions/user_notifications.js index f0362532..43a343cb 100644 --- a/static/functions/user_notifications.js +++ b/static/functions/user_notifications.js @@ -14,7 +14,7 @@ $(document).ready(function() { }); function getSkippedPage() { - var skip, url = new URL(); + var skip, url = new gazURL(); switch(url.path) { case "inbox": if (url.query.length == 0 || (url.query.length == 1 && url.query.hasOwnProperty('sort'))) {