From 137982187601bdba858bcd5aedea9274d5726f72 Mon Sep 17 00:00:00 2001 From: snipe Date: Wed, 21 Oct 2020 12:02:25 -0700 Subject: [PATCH] =?UTF-8?q?Removed=20accompanying=20method,=20since=20we?= =?UTF-8?q?=20don=E2=80=99t=20use=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- upgrade.php | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/upgrade.php b/upgrade.php index 47edadeae1..4878748701 100644 --- a/upgrade.php +++ b/upgrade.php @@ -194,34 +194,3 @@ echo "your upgraded Snipe-IT.\n"; echo "--------------------------------------------------------\n\n"; -/** - * Recursively move files from one directory to another - * - * @param String $src - Source of files being moved - * @param String $dest - Destination of files being moved - */ -function rmove($src, $dest){ - - // If source is not a directory stop processing - if(!is_dir($src)) return false; - - // If the destination directory does not exist create it - if(!is_dir($dest)) { - if(!mkdir($dest)) { - // If the destination directory could not be created stop processing - return false; - } - } - - // Open the source directory to read in files - $i = new DirectoryIterator($src); - foreach($i as $f) { - if($f->isFile()) { - rename($f->getRealPath(), "$dest/" . $f->getFilename()); - } else if(!$f->isDot() && $f->isDir()) { - rmove($f->getRealPath(), "$dest/$f"); - unlink($f->getRealPath()); - } - } - unlink($src); -}