From cff8db8d53e2c7c623f43bc30e5e70ebcdb1636c Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Mon, 20 Jan 2014 11:14:52 -0600
Subject: [PATCH] Don't refer to class Misc in deploy scripts

---
 setup/cli/modules/deploy.php | 4 ++--
 setup/cli/modules/unpack.php | 6 +++++-
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/setup/cli/modules/deploy.php b/setup/cli/modules/deploy.php
index 8fc0e142b..d307e51f2 100644
--- a/setup/cli/modules/deploy.php
+++ b/setup/cli/modules/deploy.php
@@ -35,7 +35,7 @@ class Deployment extends Unpacker {
             if (is_file($start . '/main.inc.php')) break;
             $start .= '/..';
         }
-        return Misc::realpath($start);
+        return self::realpath($start);
     }
 
     /**
@@ -92,7 +92,7 @@ class Deployment extends Unpacker {
         if (!is_dir($this->destination))
             if (!@mkdir($this->destination, 0751, true))
                 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/
         # folder is currently located
diff --git a/setup/cli/modules/unpack.php b/setup/cli/modules/unpack.php
index 3411c94eb..af5cfd624 100644
--- a/setup/cli/modules/unpack.php
+++ b/setup/cli/modules/unpack.php
@@ -34,6 +34,10 @@ class Unpacker extends Module {
              main installation path.",
     );
 
+    function realpath($path) {
+        return ($p = realpath($path)) ? $p : $path;
+    }
+
     function find_upload_folder() {
         # Hop up to the root folder
         $start = dirname(__file__);
@@ -41,7 +45,7 @@ class Unpacker extends Module {
             if (is_dir($start . '/upload')) break;
             $start .= '/..';
         }
-        return Misc::realpath($start.'/upload');
+        return self::realpath($start.'/upload');
     }
 
     function change_include_dir($include_path) {
-- 
GitLab