From bcf240d94e9cf3dff0ca79b5bf4cf2001ad9957e Mon Sep 17 00:00:00 2001 From: DariusIII Date: Mon, 4 Jan 2016 14:34:43 +0100 Subject: [PATCH] Change integer to boolean in name fixing scripts --- misc/testing/Releases/fixReleaseNames.php | 2 +- misc/update_scripts/nix_scripts/tmux/bin/groupfixrelnames.php | 4 ++-- newznab/NameFixer.php | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/misc/testing/Releases/fixReleaseNames.php b/misc/testing/Releases/fixReleaseNames.php index da1c499bc..546a75564 100755 --- a/misc/testing/Releases/fixReleaseNames.php +++ b/misc/testing/Releases/fixReleaseNames.php @@ -20,7 +20,7 @@ $namefixer = new NameFixer(['Settings' => $pdo]); $predb = new PreHash(['Echo' => true, 'Settings' => $pdo]); if (isset($argv[1]) && isset($argv[2]) && isset($argv[3]) && isset($argv[4])) { - $update = ($argv[2] == "true") ? 1 : 2; + $update = ($argv[2] == "true") ? true : false; $other = 1; if ($argv[3] === 'all') { $other = 2; diff --git a/misc/update_scripts/nix_scripts/tmux/bin/groupfixrelnames.php b/misc/update_scripts/nix_scripts/tmux/bin/groupfixrelnames.php index e46ea0976..bd7896b23 100644 --- a/misc/update_scripts/nix_scripts/tmux/bin/groupfixrelnames.php +++ b/misc/update_scripts/nix_scripts/tmux/bin/groupfixrelnames.php @@ -58,10 +58,10 @@ if (!isset($argv[1])) { } break; case $pieces[0] === 'filename' && isset($guidChar) && isset($maxperrun) && is_numeric($maxperrun): - $namefixer->fixNamesWithFiles(1, 1, 1, 1, 1, $guidChar, $maxperrun); + $namefixer->fixNamesWithFiles(1, true, 1, 1, 1, $guidChar, $maxperrun); break; case $pieces[0] === 'srr' && isset($guidChar) && isset($maxperrun) && is_numeric($maxperrun): - $namefixer->fixNamesWithSrr(1, 1, 1, 1, 1, $guidChar, $maxperrun); + $namefixer->fixNamesWithSrr(1, true, 1, 1, 1, $guidChar, $maxperrun); break; case $pieces[0] === 'md5' && isset($guidChar) && isset($maxperrun) && is_numeric($maxperrun): $releases = $pdo->queryDirect( diff --git a/newznab/NameFixer.php b/newznab/NameFixer.php index b61b69bca..3db1ed201 100755 --- a/newznab/NameFixer.php +++ b/newznab/NameFixer.php @@ -252,6 +252,8 @@ class NameFixer * @param int $cats 1: other categories, 2: all categories * @param $nameStatus * @param $show + * @param string $guidChar + * @param string $limit */ public function fixNamesWithFiles($time, $echo, $cats, $nameStatus, $show, $guidChar = '', $limit = '') {