From 5bca7d97e390fac0b776ed180ad8a4eefd8cca63 Mon Sep 17 00:00:00 2001 From: DariusIII Date: Sun, 22 Mar 2020 22:31:12 +0100 Subject: [PATCH] Fix couple of issues related to constants changes --- Blacklight/NZBExport.php | 4 ++-- Blacklight/Nfo.php | 2 +- Blacklight/processing/post/ProcessAdditional.php | 2 +- app/Http/Controllers/Admin/NzbController.php | 4 ++-- misc/testing/nzb-import.php | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Blacklight/NZBExport.php b/Blacklight/NZBExport.php index d9e3db895..381be786d 100755 --- a/Blacklight/NZBExport.php +++ b/Blacklight/NZBExport.php @@ -76,8 +76,8 @@ class NZBExport $path = $params[0]; // Check if the path ends with dir separator. - if (substr($path, -1) !== DS) { - $path .= DS; + if (substr($path, -1) !== '/') { + $path .= '/'; } // Check if it's a directory. diff --git a/Blacklight/Nfo.php b/Blacklight/Nfo.php index 1fb58cffa..5ac734a1d 100755 --- a/Blacklight/Nfo.php +++ b/Blacklight/Nfo.php @@ -75,7 +75,7 @@ class Nfo $this->tmpPath = (string) Settings::settingValue('..tmpunrarpath'); if (! preg_match('/[\/\\\\]$/', $this->tmpPath)) { - $this->tmpPath .= DS; + $this->tmpPath .= '/'; } } diff --git a/Blacklight/processing/post/ProcessAdditional.php b/Blacklight/processing/post/ProcessAdditional.php index 0d2ae3ed0..5ef8cd35f 100755 --- a/Blacklight/processing/post/ProcessAdditional.php +++ b/Blacklight/processing/post/ProcessAdditional.php @@ -573,7 +573,7 @@ class ProcessAdditional // Check if it ends with a dir separator. if (! preg_match('/[\/\\\\]$/', $this->_mainTmpPath)) { - $this->_mainTmpPath .= DS; + $this->_mainTmpPath .= '/'; } // If we are doing per group, use the groupID has a inner path, so other scripts don't delete the files we are working on. diff --git a/app/Http/Controllers/Admin/NzbController.php b/app/Http/Controllers/Admin/NzbController.php index 499b95976..7474fc32d 100644 --- a/app/Http/Controllers/Admin/NzbController.php +++ b/app/Http/Controllers/Admin/NzbController.php @@ -43,8 +43,8 @@ class NzbController extends BasePageController // Get the path the user set in the browser if he put one. $path = ($request->has('folder') ? $request->input('folder') : ''); - if (substr($path, \strlen($path) - 1) !== DS) { - $path .= DS; + if (substr($path, \strlen($path) - 1) !== '/') { + $path .= '/'; } // Get the files from the user specified path. diff --git a/misc/testing/nzb-import.php b/misc/testing/nzb-import.php index ea34208f1..3fd6c7cc0 100644 --- a/misc/testing/nzb-import.php +++ b/misc/testing/nzb-import.php @@ -44,8 +44,8 @@ if ($argv[5] < 0) { $path = $argv[1]; // Check if path ends with dir separator. -if (substr($path, -1) !== DS) { - $path .= DS; +if (substr($path, -1) !== '/') { + $path .= '/'; } $files = new \RegexIterator(