From 13b30d96c83f3854888739dc9cc04acaf92335f0 Mon Sep 17 00:00:00 2001 From: Git Date: Sun, 24 Feb 2013 08:00:18 +0000 Subject: [PATCH] Empty commit --- classes/util.php | 17 +++++++++++------ sections/torrents/browse2.php | 14 +++++--------- sections/user/edit.php | 18 ++++++++++++------ sections/user/takeedit.php | 2 +- sections/wiki/article.php | 15 +++++++++------ static/functions/comments.js | 9 ++++++--- static/functions/push_settings.js | 3 +++ static/styles/anorex/style.css | 6 ++++++ static/styles/dark_ambient/style.css | 15 +++++++++------ static/styles/kuro/style.css | 6 ++++++ static/styles/layer_cake/style.css | 6 ++++++ static/styles/minimal/style.css | 1 + static/styles/minimal/style2.css | 1 + static/styles/postmod/style.css | 6 ++++++ static/styles/proton/style.css | 15 +++++++++------ static/styles/white.cd/style.css | 3 +++ 16 files changed, 94 insertions(+), 43 deletions(-) diff --git a/classes/util.php b/classes/util.php index c4f2051c..1934a270 100644 --- a/classes/util.php +++ b/classes/util.php @@ -8,12 +8,17 @@ * @param string $Str * @return true if $Str numeric */ -function is_number($Str) { - $Return = true; - if ($Str < 0) { $Return = false; } - // We're converting input to a int, then string and comparing to original - $Return = ($Str == strval(intval($Str)) ? true : false); - return $Return; +if (PHP_INT_SIZE === 4) { + function is_number($Str) { + if ($Str[0] == '-' || $Str[0] == '+') { // Leading plus/minus signs are ok + $Str[0] = 0; + } + return ltrim($Str, "0..9") === ''; + } +} else { + function is_number($Str) { + return $Str == strval(intval($Str)); + } } diff --git a/sections/torrents/browse2.php b/sections/torrents/browse2.php index dea2a80e..4df16363 100644 --- a/sections/torrents/browse2.php +++ b/sections/torrents/browse2.php @@ -535,18 +535,17 @@ function header_link($SortKey,$DefaultWay="desc") { } /** End run search query and collect results **/ +$HideFilter = isset($LoggedUser['ShowTorFilter']) && $LoggedUser['ShowTorFilter'] == 0; // This is kinda ugly, but the enormous if paragraph was really hard to read $AdvancedSearch = !empty($_GET['action']) && $_GET['action'] == "advanced"; $AdvancedSearch |= !empty($LoggedUser['SearchType']) && (empty($_GET['action']) || $_GET['action'] == "advanced"); $AdvancedSearch &= check_perms('site_advanced_search'); if ($AdvancedSearch) { - $Debug->log_var(1, 'Advanced search'); $Action = 'action=advanced'; $HideBasic = ' hidden'; $HideAdvanced = ''; } else { - $Debug->log_var(1, 'Basic search'); $Action = 'action=basic'; $HideBasic = ''; $HideAdvanced = ' hidden'; @@ -561,7 +560,7 @@ function header_link($SortKey,$DefaultWay="desc") {

Torrents

-
+
Basic / @@ -571,16 +570,16 @@ function header_link($SortKey,$DefaultWay="desc") { search - Hide +
-
+
@@ -829,10 +828,7 @@ function header_link($SortKey,$DefaultWay="desc") { - query("SELECT tags.Name, diff --git a/sections/user/edit.php b/sections/user/edit.php index 7287fd7e..e5da25d0 100644 --- a/sections/user/edit.php +++ b/sections/user/edit.php @@ -78,7 +78,7 @@ function checked($Checked) { -
Artist name: - + />
+
- + diff --git a/sections/user/takeedit.php b/sections/user/takeedit.php index 0bb7fce5..36a1cefa 100644 --- a/sections/user/takeedit.php +++ b/sections/user/takeedit.php @@ -27,7 +27,6 @@ $Val->SetFields('postsperpage',1,"number","You forgot to select your posts per page option.",array('inarray'=>array(25,50,100))); //$Val->SetFields('hidecollage',1,"number","You forgot to select your collage option.",array('minlength'=>0,'maxlength'=>1)); $Val->SetFields('collagecovers',1,"number","You forgot to select your collage option."); -$Val->SetFields('showtags',1,"number","You forgot to select your show tags option.",array('minlength'=>0,'maxlength'=>1)); $Val->SetFields('avatar',0,"regex","You did not enter a valid avatar url.",array('regex'=>"/^".IMAGE_REGEX."$/i")); $Val->SetFields('email',1,"email","You did not enter a valid email address."); $Val->SetFields('irckey',0,"string","You did not enter a valid IRCKey, must be between 6 and 32 characters long.",array('minlength'=>6,'maxlength'=>32)); @@ -187,6 +186,7 @@ $Options['PostsPerPage'] = (int) $_POST['postsperpage']; //$Options['HideCollage'] = (!empty($_POST['hidecollage']) ? 1 : 0); $Options['CollageCovers'] = empty($_POST['collagecovers']) ? 0 : $_POST['collagecovers']; +$Options['ShowTorFilter'] = empty($_POST['showtfilter']) ? 0 : 1; $Options['ShowTags'] = (!empty($_POST['showtags']) ? 1 : 0); $Options['AutoSubscribe'] = (!empty($_POST['autosubscribe']) ? 1 : 0); $Options['DisableSmileys'] = (!empty($_POST['disablesmileys']) ? 1 : 0); diff --git a/sections/wiki/article.php b/sections/wiki/article.php index 621547b4..ae0ff658 100644 --- a/sections/wiki/article.php +++ b/sections/wiki/article.php @@ -55,12 +55,8 @@
Site preferences @@ -187,12 +187,18 @@ function checked($Checked) {
Browse page tag listTorrent search - +
    +
  • + /> + +
  • +
  • + /> + +
  • +