renamed 'ManiaControlDir' constant to fit naming conventions

This commit is contained in:
Steffen Schröder
2014-08-08 14:41:58 +02:00
parent 96d3f1eaba
commit 35a431e396
11 changed files with 29 additions and 27 deletions

View File

@ -31,7 +31,7 @@ abstract class FileUtil {
* @return \SimpleXMLElement
*/
public static function loadConfig($fileName) {
$fileLocation = ManiaControlDir . 'configs' . DIRECTORY_SEPARATOR . $fileName;
$fileLocation = MANIACONTROL_PATH . 'configs' . DIRECTORY_SEPARATOR . $fileName;
if (!file_exists($fileLocation)) {
Logger::log("Config file doesn't exist! ({$fileName})");
return null;
@ -105,7 +105,7 @@ abstract class FileUtil {
* @return string|bool
*/
public static function getTempFolder() {
$tempFolder = ManiaControlDir . 'temp' . DIRECTORY_SEPARATOR;
$tempFolder = MANIACONTROL_PATH . 'temp' . DIRECTORY_SEPARATOR;
if (!is_dir($tempFolder) && !mkdir($tempFolder)) {
trigger_error("Couldn't create the temp folder!");
return false;
@ -128,7 +128,7 @@ abstract class FileUtil {
$directories = array($directories);
}
foreach ($directories as $directory) {
$dir = new \RecursiveDirectoryIterator(ManiaControlDir . $directory);
$dir = new \RecursiveDirectoryIterator(MANIACONTROL_PATH . $directory);
foreach (new \RecursiveIteratorIterator($dir) as $fileName => $file) {
if (substr($fileName, 0, 1) === '.') {
continue;