diff --git a/lib/file-control.php b/lib/file-control.php
index 4ca64ef..86ef062 100644
--- a/lib/file-control.php
+++ b/lib/file-control.php
@@ -42,7 +42,7 @@ if ($_GET['action']=="load") {
// If we're due to add a new folder...
if ($_GET['action']=="newFolder") {
- if (is_writable($docRoot.$fileLoc)) {
+ if (!$demoMode && is_writable($docRoot.$fileLoc)) {
mkdir($file, 0705);
// Reload file manager
echo '';
@@ -55,7 +55,7 @@ if ($_GET['action']=="newFolder") {
// If we're due to paste a new file...
if ($_GET['action']=="paste") {
$location = $docRoot.strClean(str_replace("|","/",$_GET['location']));
- if (is_writable($location)) {
+ if (!$demoMode && is_writable($location)) {
copy($file, $location."/".basename($file));
// Reload file manager
echo '';
@@ -67,7 +67,7 @@ if ($_GET['action']=="paste") {
// If we're due to rename a file/folder...
if ($_GET['action']=="rename") {
- if (is_writable($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])))) {
+ if (!$demoMode && is_writable($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])))) {
rename($docRoot.$iceRoot.str_replace("|","/",strClean($_GET['oldFileName'])),$docRoot.$fileLoc."/".$fileName);
// Reload file manager
echo '';
// on the form posting via a reload, save the file
if (isset($_POST['contents'])) {
- if ((file_exists($file) && is_writable($file)) || isset($_POST['newFileName']) && $_POST['newFileName']!="") {
+ if (!$demoMode && ((file_exists($file) && is_writable($file)) || isset($_POST['newFileName']) && $_POST['newFileName']!="")) {
if (filemtime($file)==$_GET['fileMDT']||!(isset($_GET['fileMDT']))) {
$fh = fopen($file, 'w') or die("Sorry, cannot save");
fwrite($fh, $_POST['contents']);