Skip to content

Commit

Permalink
fixing UTF-8 probs & minor root issues
Browse files Browse the repository at this point in the history
  • Loading branch information
d3nj3ll committed Jan 17, 2012
1 parent 09d2c62 commit 8af4689
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions system/functions.php
Expand Up @@ -78,7 +78,7 @@ function getFileDetails($path, $filename, $entities = true){

$source = file_get_contents($path . $filename);
if ($entities) {
$source = htmlentities($source);
$source = htmlentities($source, "UTF-8");
}

if (strpos($source, "%protect%")) {
Expand Down Expand Up @@ -174,7 +174,7 @@ function createFolder(){
if (!mkdir($target_path.$_POST['newfoldername'], 0755)) {
$message = "Cannot create folder ".$_POST['newfoldername']." — make sure permissions for this folder are at least octal 755.";
} else {
header ("Location: index.php?path=".$target_path."&foldered=true".$root);
header ("Location: index.php?path=".$target_path."&foldered=true".root());
exit;
}

Expand Down Expand Up @@ -202,7 +202,7 @@ function createFile(){
return $message;
}
fclose($handle);
header ("Location: index.php?path=".$target_path."&file=".$_POST['newfilename']."&saved=true".$root);
header ("Location: index.php?path=".$target_path."&file=".$_POST['newfilename']."&saved=true".root());
exit;
}

Expand All @@ -213,7 +213,7 @@ function deleteFile(){
$filename = $_GET['path'] . $_GET['file'];
if (is_writable($filename)) {
unlink($filename);
header ("Location: index.php?path=".$_GET['path']."&deleted=true".$root);
header ("Location: index.php?path=".$_GET['path']."&deleted=true".root());
exit;
} else {
$message = "$filename can't be deleted — make sure permissions for this folder are at least octal 755.";
Expand Down Expand Up @@ -288,7 +288,7 @@ function saveFile(){
exit;
}
fclose($handle);
header ("Location: index.php?path=".$_GET['path']."&file=".$_GET['file']."&saved=true".$root);
header ("Location: index.php?path=".$_GET['path']."&file=".$_GET['file']."&saved=true".root());
exit;
} else {
$message = "Could not save the file $filename — make sure permissions for this folder are at least octal 755.";
Expand Down

0 comments on commit 8af4689

Please sign in to comment.