Skip to content
Snippets Groups Projects
Commit cff8db8d authored by Jared Hancock's avatar Jared Hancock
Browse files

Don't refer to class Misc in deploy scripts

parent a7f4b811
No related branches found
No related tags found
No related merge requests found
...@@ -35,7 +35,7 @@ class Deployment extends Unpacker { ...@@ -35,7 +35,7 @@ class Deployment extends Unpacker {
if (is_file($start . '/main.inc.php')) break; if (is_file($start . '/main.inc.php')) break;
$start .= '/..'; $start .= '/..';
} }
return Misc::realpath($start); return self::realpath($start);
} }
/** /**
...@@ -92,7 +92,7 @@ class Deployment extends Unpacker { ...@@ -92,7 +92,7 @@ class Deployment extends Unpacker {
if (!is_dir($this->destination)) if (!is_dir($this->destination))
if (!@mkdir($this->destination, 0751, true)) if (!@mkdir($this->destination, 0751, true))
die("Destination path does not exist and cannot be created"); die("Destination path does not exist and cannot be created");
$this->destination = Misc::realpath($this->destination).'/'; $this->destination = self::realpath($this->destination).'/';
# Determine if this is an upgrade, and if so, where the include/ # Determine if this is an upgrade, and if so, where the include/
# folder is currently located # folder is currently located
......
...@@ -34,6 +34,10 @@ class Unpacker extends Module { ...@@ -34,6 +34,10 @@ class Unpacker extends Module {
main installation path.", main installation path.",
); );
function realpath($path) {
return ($p = realpath($path)) ? $p : $path;
}
function find_upload_folder() { function find_upload_folder() {
# Hop up to the root folder # Hop up to the root folder
$start = dirname(__file__); $start = dirname(__file__);
...@@ -41,7 +45,7 @@ class Unpacker extends Module { ...@@ -41,7 +45,7 @@ class Unpacker extends Module {
if (is_dir($start . '/upload')) break; if (is_dir($start . '/upload')) break;
$start .= '/..'; $start .= '/..';
} }
return Misc::realpath($start.'/upload'); return self::realpath($start.'/upload');
} }
function change_include_dir($include_path) { function change_include_dir($include_path) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment