Skip to content

Commit

Permalink
Removed DS for #60
Browse files Browse the repository at this point in the history
  • Loading branch information
g105b committed Apr 25, 2013
1 parent 3c9e23a commit d287528
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions Framework/Component/PageToolWrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public function offsetGet($offset) {
// Attempt to find and load the required tool.

$pathArray = array(
APPROOT . DS . "PageTool" . DS . $offset . DS,
GTROOT . DS . "PageTool" . DS . $offset . DS
APPROOT . "/PageTool/$offset/",
GTROOT . "/PageTool/$offset/",
);
$fileName = $offset . ".tool.php";
$className = $offset . "_PageTool";
Expand Down
8 changes: 4 additions & 4 deletions Framework/Error/HttpError.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ private function sendHeaders() {
private function displayError($code, $message = "") {
$fileName = $code . ".html";
$pathArray = array(
APPROOT . DS . "PageView" . DS . DIR . DS,
APPROOT . DS . "PageView" . DS,
GTROOT . DS . "Framework" . DS . "Error" . DS
APPROOT . "/PageView/" . DIR . "/",
APPROOT . "/PageView/",
GTROOT . "/Framework/Error/",
);

foreach ($pathArray as $path) {
Expand Down Expand Up @@ -164,7 +164,7 @@ private function checkDirFile() {
* ends early, sending 301 headers.
*/
private function checkCase() {
$pvPath = APPROOT . DS . "PageView" . DS;
$pvPath = APPROOT . "/PageView/";
// Obtain array of each directory name.
$dirList = explode("/", DIR);
$origDirList = $dirList;
Expand Down
18 changes: 9 additions & 9 deletions Framework/FileOrganiser.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ private function changedFiles($dir = "/www") {
"Style",
);
foreach ($searchDirArray as $searchDir) {
$searchDir = APPROOT . DS . $searchDir;
$searchDir = APPROOT . "/$searchDir";
$dirMTime = $this->recursiveMTime($searchDir);
if($dirMTime > $wwwMTime) {
$sourceChanged = true;
Expand Down Expand Up @@ -83,7 +83,7 @@ private function recursiveMTime($dir) {
* This function is recursive, so will remove all Assets and files within Style.
*/
private function removePublicFiles() {
$dir = APPROOT . DS . "www" . DS;
$dir = APPROOT . "/www/";
if(!is_dir($dir)) {
// TODO: Throw proper error here.
die("ERROR: Public web root is not a directory.");
Expand Down Expand Up @@ -112,7 +112,7 @@ private function copyFilesToPublic($config) {
// files supplied by GT with their own, in whicch case the application's
// version of the file will be preferred.

$wwwDir = APPROOT . DS . "www";
$wwwDir = APPROOT "/www";
$copyDirArray = array(
GTROOT . "/Style/Img/" => $wwwDir . "/Style/Img/",
GTROOT . "/Style/Font/" => $wwwDir . "/Font/",
Expand Down Expand Up @@ -177,22 +177,22 @@ private function copyFiles($source, $dest, $recursive = true) {
continue;
}

if(is_dir($source . DS . $name)) {
if(is_dir("$source/$name")) {
if(!$recursive) {
continue;
}
if(is_dir($dest . DS . $name)) {
if(is_dir("$dest/$name")) {
continue;
}
mkdir($dest . DS . $name, 0775, true);
mkdir("$dest/$name", 0775, true);
$this->copyFiles(
$source . DS . $name,
$dest . DS . $name,
"$source/$name",
"$dest/$name",
$skipWc,
true);
}
else {
copy($source . DS . $name, $dest . DS . $name);
copy("$source/$name", "$dest/$name");
}
}
}
Expand Down

0 comments on commit d287528

Please sign in to comment.