Fixed spelling unifyDirSeperator -> unifyDirSeparator
authorAlexander Ebert <ebert@woltlab.com>
Wed, 3 Jul 2013 14:18:06 +0000 (16:18 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Wed, 3 Jul 2013 14:18:06 +0000 (16:18 +0200)
wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php
wcfsetup/install/files/lib/acp/page/CacheListPage.class.php
wcfsetup/install/files/lib/data/style/StyleEditor.class.php
wcfsetup/install/files/lib/system/WCFSetup.class.php
wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php
wcfsetup/install/files/lib/system/io/TarWriter.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php
wcfsetup/install/files/lib/util/DirectoryUtil.class.php
wcfsetup/install/files/lib/util/FileUtil.class.php
wcfsetup/install/files/lib/util/UserUtil.class.php

index 06612555b788420256c0d473ac6e86dd3856bfb7..d5614cc740ca56608f6c151f2e2dfa85d3d88390 100644 (file)
@@ -275,7 +275,7 @@ class StyleAddForm extends AbstractForm {
                
                // ensure image path is below WCF_DIR/images/
                if ($this->imagePath) {
-                       $relativePath = FileUtil::unifyDirSeperator(FileUtil::getRelativePath(WCF_DIR.'images/', WCF_DIR.$this->imagePath));
+                       $relativePath = FileUtil::unifyDirSeparator(FileUtil::getRelativePath(WCF_DIR.'images/', WCF_DIR.$this->imagePath));
                        if (strpos($relativePath, '../') !== false) {
                                throw new UserInputException('imagePath', 'notValid');
                        }
index 502fc1ef106db96599d30b04b5612901b9b0cc56..cca15b050681af2668705c1e5c1aa367e2d08372 100755 (executable)
@@ -115,11 +115,11 @@ class CacheListPage extends AbstractPage {
                        break;
                }
                
-               $this->readCacheFiles('language', FileUtil::unifyDirSeperator(WCF_DIR.'language'));
-               $this->readCacheFiles('template', FileUtil::unifyDirSeperator(WCF_DIR.'templates/compiled'), new Regex('\.meta\.php$'));
-               $this->readCacheFiles('template', FileUtil::unifyDirSeperator(WCF_DIR.'acp/templates/compiled'), new Regex('\.meta\.php$'));
-               $this->readCacheFiles('style', FileUtil::unifyDirSeperator(WCF_DIR.'style'), null, 'css');
-               $this->readCacheFiles('style', FileUtil::unifyDirSeperator(WCF_DIR.'acp/style'), new Regex('WCFSetup.css$'), 'css');
+               $this->readCacheFiles('language', FileUtil::unifyDirSeparator(WCF_DIR.'language'));
+               $this->readCacheFiles('template', FileUtil::unifyDirSeparator(WCF_DIR.'templates/compiled'), new Regex('\.meta\.php$'));
+               $this->readCacheFiles('template', FileUtil::unifyDirSeparator(WCF_DIR.'acp/templates/compiled'), new Regex('\.meta\.php$'));
+               $this->readCacheFiles('style', FileUtil::unifyDirSeparator(WCF_DIR.'style'), null, 'css');
+               $this->readCacheFiles('style', FileUtil::unifyDirSeparator(WCF_DIR.'acp/style'), new Regex('WCFSetup.css$'), 'css');
        }
        
        /**
index eca37ce980401c34a624403a69a657e2447913ee..d8ae826e5d0d5a273a372dbde7cf9e74b7931055 100644 (file)
@@ -714,7 +714,7 @@ class StyleEditor extends DatabaseObjectEditor implements IEditableCachedObject
                        $packageTar = new TarWriter($packageTarName, true);
                        
                        // append style tar
-                       $styleTarName = FileUtil::unifyDirSeperator($styleTarName);
+                       $styleTarName = FileUtil::unifyDirSeparator($styleTarName);
                        $packageTar->add($styleTarName, '', FileUtil::addTrailingSlash(dirname($styleTarName)));
                        
                        // create package.xml
index 53c5caafdd9568165230b0054c1f9492cf3d6c77..33488831efd2e8a0a37e8ff7423b67bd13533a86 100644 (file)
@@ -162,7 +162,7 @@ class WCFSetup extends WCF {
         */
        protected static function getWCFDir() {
                if (isset($_REQUEST['wcfDir']) && $_REQUEST['wcfDir'] != '') {
-                       self::$wcfDir = FileUtil::addTrailingSlash(FileUtil::unifyDirSeperator($_REQUEST['wcfDir']));
+                       self::$wcfDir = FileUtil::addTrailingSlash(FileUtil::unifyDirSeparator($_REQUEST['wcfDir']));
                        if (@file_exists(self::$wcfDir)) {
                                define('RELATIVE_WCF_DIR', FileUtil::getRelativePath(INSTALL_SCRIPT_DIR, self::$wcfDir));
                        }
@@ -455,7 +455,7 @@ class WCFSetup extends WCF {
                        $wcfDir = self::$wcfDir;
                }
                else {
-                       $wcfDir = FileUtil::unifyDirSeperator(INSTALL_SCRIPT_DIR).'wcf/';
+                       $wcfDir = FileUtil::unifyDirSeparator(INSTALL_SCRIPT_DIR).'wcf/';
                }
                
                $invalidDirectory = false;
@@ -470,7 +470,7 @@ class WCFSetup extends WCF {
                if (!empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] != 80) $domainName .= ':' . $_SERVER['SERVER_PORT'];
                // script url
                $installScriptUrl = '';
-               if (!empty($_SERVER['REQUEST_URI'])) $installScriptUrl = FileUtil::removeLeadingSlash(FileUtil::removeTrailingSlash(FileUtil::unifyDirSeperator(dirname($_SERVER['REQUEST_URI']))));
+               if (!empty($_SERVER['REQUEST_URI'])) $installScriptUrl = FileUtil::removeLeadingSlash(FileUtil::removeTrailingSlash(FileUtil::unifyDirSeparator(dirname($_SERVER['REQUEST_URI']))));
                
                WCF::getTPL()->assign(array(
                        'nextStep' => 'unzipFiles',
@@ -478,7 +478,7 @@ class WCFSetup extends WCF {
                        'wcfDir' => $wcfDir,
                        'domainName' => $domainName,
                        'installScriptUrl' => $installScriptUrl,
-                       'installScriptDir' => FileUtil::unifyDirSeperator(INSTALL_SCRIPT_DIR)
+                       'installScriptDir' => FileUtil::unifyDirSeparator(INSTALL_SCRIPT_DIR)
                ));
                
                WCF::getTPL()->display('stepSearchWcfDir');
@@ -869,7 +869,7 @@ class WCFSetup extends WCF {
                                        $this->getInstalledFiles(FileUtil::addTrailingSlash($file));
                                }
                                else {
-                                       self::$installedFiles[] = FileUtil::unifyDirSeperator($file);
+                                       self::$installedFiles[] = FileUtil::unifyDirSeparator($file);
                                }
                        }
                }
index 7c08f503d67425bf789be26bd74dd8957ffb9c5f..f1467e8fe32914ebf577c3f79f5ded4f677c72fe 100644 (file)
@@ -91,7 +91,7 @@ class DiskCacheSource implements ICacheSource {
         * @param       string          $pattern
         */
        protected function removeFiles($pattern) {
-               $directory = FileUtil::unifyDirSeperator(WCF_DIR.'cache/');
+               $directory = FileUtil::unifyDirSeparator(WCF_DIR.'cache/');
                $pattern = str_replace('*', '.*', str_replace('.', '\.', $pattern));
                
                $this->getDirectoryUtil()->executeCallback(new Callback(function ($filename) {
index bbb62b36b19586aff4810131065f80d9e9d04098..44110a6d0d74cff208a6087a306a7475963c344e 100644 (file)
@@ -64,7 +64,7 @@ class TarWriter extends Tar {
        public function addString($filename, $string) {
                if (empty($filename)) return false;
                
-               $filename = FileUtil::unifyDirSeperator($filename);
+               $filename = FileUtil::unifyDirSeparator($filename);
                
                if (!$this->writeHeaderBlock($filename, strlen($string), TIME_NOW, 33279)) {
                        return false;
@@ -92,9 +92,9 @@ class TarWriter extends Tar {
                
                $result = true;
                
-               // unify dir seperator
-               $addDir = FileUtil::unifyDirSeperator($addDir);
-               $removeDir = FileUtil::unifyDirSeperator($removeDir);
+               // unify dir separator
+               $addDir = FileUtil::unifyDirSeparator($addDir);
+               $removeDir = FileUtil::unifyDirSeparator($removeDir);
                
                foreach ($files as $filename) {
                        if (!$result) {
@@ -141,7 +141,7 @@ class TarWriter extends Tar {
         * @return      boolean         result
         */
        protected function addFile($filename, $addDir, $removeDir) {
-               $filename = FileUtil::unifyDirSeperator($filename);
+               $filename = FileUtil::unifyDirSeparator($filename);
                $storedFilename = $filename;
                if (!empty($removeDir)) $storedFilename = StringUtil::replaceIgnoreCase($removeDir, '', $filename);
                if (!empty($addDir)) $storedFilename = $addDir . $storedFilename;
index 8c36137c7171c03ca69e40c397980ed0b41c6345..d4726a2b88fa0eae66d5366c5ff2908802b8a76f 100644 (file)
@@ -620,7 +620,7 @@ class PackageInstallationDispatcher {
                        $packageDir->setName('packageDir');
                        $packageDir->setLabel(WCF::getLanguage()->get('wcf.acp.package.packageDir.input'));
                        
-                       $defaultPath = FileUtil::addTrailingSlash(FileUtil::unifyDirSeperator(StringUtil::substring(WCF_DIR, 0, -4)));
+                       $defaultPath = FileUtil::addTrailingSlash(FileUtil::unifyDirSeparator(StringUtil::substring(WCF_DIR, 0, -4)));
                        $packageDir->setValue($defaultPath);
                        $container->appendChild($packageDir);
                        
@@ -633,7 +633,7 @@ class PackageInstallationDispatcher {
                else {
                        $document = PackageInstallationFormManager::getForm($this->queue, 'packageDir');
                        $document->handleRequest();
-                       $packageDir = FileUtil::addTrailingSlash(FileUtil::unifyDirSeperator($document->getValue('packageDir')));
+                       $packageDir = FileUtil::addTrailingSlash(FileUtil::unifyDirSeparator($document->getValue('packageDir')));
                        
                        if ($packageDir !== null) {
                                // validate package dir
@@ -664,7 +664,7 @@ class PackageInstallationDispatcher {
                                        $wcfDomainPath = $row['domainPath'];
                                }
                                
-                               $documentRoot = str_replace($wcfDomainPath, '', FileUtil::unifyDirSeperator(WCF_DIR));
+                               $documentRoot = str_replace($wcfDomainPath, '', FileUtil::unifyDirSeparator(WCF_DIR));
                                $domainPath = str_replace($documentRoot, '', $packageDir);
                                
                                // update application path
index a6de357016ca8df221bd79ddd8948acd8d02d598..8d0fa3986afc189a935cc8860ebe15b25d048f65 100644 (file)
@@ -93,7 +93,7 @@ final class DirectoryUtil {
         * @return      wcf\util\DirectoryUtil
         */
        public static function getInstance($tmpDirectory, $recursive = true) {
-               $directory = realpath(FileUtil::unifyDirSeperator($tmpDirectory));
+               $directory = realpath(FileUtil::unifyDirSeparator($tmpDirectory));
                // realpath returns false if the directory does not exist
                if ($directory === false) {
                        throw new SystemException("Unknown directory '".$tmpDirectory."'");
@@ -200,7 +200,7 @@ final class DirectoryUtil {
                                // ignore . and ..
                                if ($it->isDot()) continue;
                                
-                               $this->files[FileUtil::unifyDirSeperator($filename)] = FileUtil::unifyDirSeperator($filename);
+                               $this->files[FileUtil::unifyDirSeparator($filename)] = FileUtil::unifyDirSeparator($filename);
                        }
                }
                else {
@@ -208,7 +208,7 @@ final class DirectoryUtil {
                                // ignore . and ..
                                if ($this->obj->isDot()) continue;
                                
-                               $this->files[FileUtil::unifyDirSeperator($obj->getFilename())] = FileUtil::unifyDirSeperator($obj->getFilename());
+                               $this->files[FileUtil::unifyDirSeparator($obj->getFilename())] = FileUtil::unifyDirSeparator($obj->getFilename());
                        }
                }
                
@@ -230,7 +230,7 @@ final class DirectoryUtil {
                                // ignore . and ..
                                if ($it->isDot()) continue;
                                
-                               $this->fileObjects[FileUtil::unifyDirSeperator($filename)] = $obj;
+                               $this->fileObjects[FileUtil::unifyDirSeparator($filename)] = $obj;
                        }
                }
                else {
@@ -238,7 +238,7 @@ final class DirectoryUtil {
                                // ignore . and ..
                                if ($this->obj->isDot()) continue;
                                
-                               $this->fileObjects[FileUtil::unifyDirSeperator($obj->getFilename())] = $obj;
+                               $this->fileObjects[FileUtil::unifyDirSeparator($obj->getFilename())] = $obj;
                        }
                }
                
index c4f7de9012dbb0bc88ca8145a10f63b456c9a9af..e0e69618fe68f09c9e4752f74fdca499d571ab9f 100644 (file)
@@ -144,8 +144,8 @@ final class FileUtil {
         */
        public static function getRelativePath($currentDir, $targetDir) {
                // remove trailing slashes
-               $currentDir = self::removeTrailingSlash(self::unifyDirSeperator($currentDir));
-               $targetDir = self::removeTrailingSlash(self::unifyDirSeperator($targetDir));
+               $currentDir = self::removeTrailingSlash(self::unifyDirSeparator($currentDir));
+               $targetDir = self::removeTrailingSlash(self::unifyDirSeparator($targetDir));
                
                if ($currentDir == $targetDir) {
                        return './';
@@ -223,12 +223,12 @@ final class FileUtil {
        }
        
        /**
-        * Unifies windows and unix directory seperators.
+        * Unifies windows and unix directory separators.
         * 
         * @param       string          $path
         * @return      string
         */
-       public static function unifyDirSeperator($path) {
+       public static function unifyDirSeparator($path) {
                $path = str_replace('\\\\', '/', $path);
                $path = str_replace('\\', '/', $path);
                return $path;
@@ -289,7 +289,7 @@ final class FileUtil {
         * @return      string          path
         */
        public static function getRealPath($path) {
-               $path = self::unifyDirSeperator($path);
+               $path = self::unifyDirSeparator($path);
                
                $result = array();
                $pathA = explode('/', $path);
index ebcb8e438869eedcdc04e01c2d3f8a22b4175096..c05a05a31dabd831b2810ef28d563b2ea9b973d2 100644 (file)
@@ -230,7 +230,7 @@ final class UserUtil {
                        $REQUEST_URI = StringUtil::convertEncoding('ISO-8859-1', 'UTF-8', $REQUEST_URI);
                }
                
-               return StringUtil::substring(FileUtil::unifyDirSeperator($REQUEST_URI), 0, 255);
+               return StringUtil::substring(FileUtil::unifyDirSeparator($REQUEST_URI), 0, 255);
        }
        
        private function __construct() { }