mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 03:01:34 +00:00
Fix couple of issues related to constants changes
This commit is contained in:
@@ -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.
|
||||
|
||||
+1
-1
@@ -75,7 +75,7 @@ class Nfo
|
||||
|
||||
$this->tmpPath = (string) Settings::settingValue('..tmpunrarpath');
|
||||
if (! preg_match('/[\/\\\\]$/', $this->tmpPath)) {
|
||||
$this->tmpPath .= DS;
|
||||
$this->tmpPath .= '/';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user