Change integer to boolean in name fixing scripts

This commit is contained in:
DariusIII
2016-01-04 14:34:43 +01:00
parent 688f86bb33
commit bcf240d94e
3 changed files with 5 additions and 3 deletions
+1 -1
View File
@@ -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;
@@ -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(
+2
View File
@@ -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 = '')
{