From: Alexander Ebert Date: Wed, 3 Jul 2013 14:18:06 +0000 (+0200) Subject: Fixed spelling unifyDirSeperator -> unifyDirSeparator X-Git-Tag: 2.0.0_Beta_5~106^2 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f20240365b63a2b19778198cfae468660dbf5032;p=GitHub%2FWoltLab%2FWCF.git Fixed spelling unifyDirSeperator -> unifyDirSeparator --- diff --git a/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php b/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php index 06612555b7..d5614cc740 100644 --- a/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php @@ -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'); } diff --git a/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php b/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php index 502fc1ef10..cca15b0506 100755 --- a/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php +++ b/wcfsetup/install/files/lib/acp/page/CacheListPage.class.php @@ -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'); } /** diff --git a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php index eca37ce980..d8ae826e5d 100644 --- a/wcfsetup/install/files/lib/data/style/StyleEditor.class.php +++ b/wcfsetup/install/files/lib/data/style/StyleEditor.class.php @@ -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 diff --git a/wcfsetup/install/files/lib/system/WCFSetup.class.php b/wcfsetup/install/files/lib/system/WCFSetup.class.php index 53c5caafdd..33488831ef 100644 --- a/wcfsetup/install/files/lib/system/WCFSetup.class.php +++ b/wcfsetup/install/files/lib/system/WCFSetup.class.php @@ -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); } } } diff --git a/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php b/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php index 7c08f503d6..f1467e8fe3 100644 --- a/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php +++ b/wcfsetup/install/files/lib/system/cache/source/DiskCacheSource.class.php @@ -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) { diff --git a/wcfsetup/install/files/lib/system/io/TarWriter.class.php b/wcfsetup/install/files/lib/system/io/TarWriter.class.php index bbb62b36b1..44110a6d0d 100644 --- a/wcfsetup/install/files/lib/system/io/TarWriter.class.php +++ b/wcfsetup/install/files/lib/system/io/TarWriter.class.php @@ -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; diff --git a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php index 8c36137c71..d4726a2b88 100644 --- a/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php +++ b/wcfsetup/install/files/lib/system/package/PackageInstallationDispatcher.class.php @@ -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 diff --git a/wcfsetup/install/files/lib/util/DirectoryUtil.class.php b/wcfsetup/install/files/lib/util/DirectoryUtil.class.php index a6de357016..8d0fa3986a 100644 --- a/wcfsetup/install/files/lib/util/DirectoryUtil.class.php +++ b/wcfsetup/install/files/lib/util/DirectoryUtil.class.php @@ -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; } } diff --git a/wcfsetup/install/files/lib/util/FileUtil.class.php b/wcfsetup/install/files/lib/util/FileUtil.class.php index c4f7de9012..e0e69618fe 100644 --- a/wcfsetup/install/files/lib/util/FileUtil.class.php +++ b/wcfsetup/install/files/lib/util/FileUtil.class.php @@ -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); diff --git a/wcfsetup/install/files/lib/util/UserUtil.class.php b/wcfsetup/install/files/lib/util/UserUtil.class.php index ebcb8e4388..c05a05a31d 100644 --- a/wcfsetup/install/files/lib/util/UserUtil.class.php +++ b/wcfsetup/install/files/lib/util/UserUtil.class.php @@ -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() { }