aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files_texteditor
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files_texteditor')
-rwxr-xr-x[-rw-r--r--]apps/files_texteditor/ajax/loadfile.php8
-rwxr-xr-x[-rw-r--r--]apps/files_texteditor/ajax/mtime.php8
-rwxr-xr-xapps/files_texteditor/ajax/savefile.php10
3 files changed, 13 insertions, 13 deletions
diff --git a/apps/files_texteditor/ajax/loadfile.php b/apps/files_texteditor/ajax/loadfile.php
index a946e26f210..c263306e719 100644..100755
--- a/apps/files_texteditor/ajax/loadfile.php
+++ b/apps/files_texteditor/ajax/loadfile.php
@@ -25,7 +25,7 @@
// Check if we are a user
-OC_JSON::checkLoggedIn();
+OCP\JSON::checkLoggedIn();
// Set the session key for the file we are about to edit.
$dir = isset($_GET['dir']) ? $_GET['dir'] : '';
@@ -37,14 +37,14 @@ if(!empty($filename))
{
$mtime = OC_Filesystem::filemtime($path);
$filecontents = OC_Filesystem::file_get_contents($path);
- OC_JSON::success(array('data' => array('filecontents' => $filecontents, 'write' => 'true', 'mtime' => $mtime)));
+ OCP\JSON::success(array('data' => array('filecontents' => $filecontents, 'write' => 'true', 'mtime' => $mtime)));
}
else
{
$mtime = OC_Filesystem::filemtime($path);
$filecontents = OC_Filesystem::file_get_contents($path);
- OC_JSON::success(array('data' => array('filecontents' => $filecontents, 'write' => 'false', 'mtime' => $mtime)));
+ OCP\JSON::success(array('data' => array('filecontents' => $filecontents, 'write' => 'false', 'mtime' => $mtime)));
}
} else {
- OC_JSON::error(array('data' => array( 'message' => 'Invalid file path supplied.')));
+ OCP\JSON::error(array('data' => array( 'message' => 'Invalid file path supplied.')));
} \ No newline at end of file
diff --git a/apps/files_texteditor/ajax/mtime.php b/apps/files_texteditor/ajax/mtime.php
index 436592c383f..ee683722add 100644..100755
--- a/apps/files_texteditor/ajax/mtime.php
+++ b/apps/files_texteditor/ajax/mtime.php
@@ -25,7 +25,7 @@
// Check if we are a user
-OC_JSON::checkLoggedIn();
+OCP\JSON::checkLoggedIn();
// Get the path from GET
$path = isset($_GEt['path']) ? $_GET['path'] : '';
@@ -36,14 +36,14 @@ if($path != '')
$mtime = OC_Filesystem::filemtime($path);
if($mtime)
{
- OC_JSON::success(array('data' => array('path' => $path, 'mtime' => $mtime)));
+ OCP\JSON::success(array('data' => array('path' => $path, 'mtime' => $mtime)));
}
else
{
- OC_JSON::error();
+ OCP\JSON::error();
}
}
else
{
- OC_JSON::error();
+ OCP\JSON::error();
} \ No newline at end of file
diff --git a/apps/files_texteditor/ajax/savefile.php b/apps/files_texteditor/ajax/savefile.php
index 7c7fb90e7c6..4c260e237c5 100755
--- a/apps/files_texteditor/ajax/savefile.php
+++ b/apps/files_texteditor/ajax/savefile.php
@@ -25,7 +25,7 @@
// Check if we are a user
-OC_JSON::checkLoggedIn();
+OCP\JSON::checkLoggedIn();
// Get paramteres
$filecontents = $_POST['filecontents'];
@@ -39,7 +39,7 @@ if($path != '' && $mtime != '')
if($mtime != $filemtime)
{
// Then the file has changed since opening
- OC_JSON::error();
+ OCP\JSON::error();
OCP\Util::writeLog('files_texteditor',"File: ".$path." modified since opening.",OCP\Util::ERROR);
}
else
@@ -53,16 +53,16 @@ if($path != '' && $mtime != '')
clearstatcache();
// Get new mtime
$newmtime = OC_Filesystem::filemtime($path);
- OC_JSON::success(array('data' => array('mtime' => $newmtime)));
+ OCP\JSON::success(array('data' => array('mtime' => $newmtime)));
}
else
{
// Not writeable!
- OC_JSON::error(array('data' => array( 'message' => 'Insufficient permissions')));
+ OCP\JSON::error(array('data' => array( 'message' => 'Insufficient permissions')));
OCP\Util::writeLog('files_texteditor',"User does not have permission to write to file: ".$path,OCP\Util::ERROR);
}
}
} else {
- OC_JSON::error(array('data' => array( 'message' => 'File path or mtime not supplied')));
+ OCP\JSON::error(array('data' => array( 'message' => 'File path or mtime not supplied')));
OCP\Util::writeLog('files_texteditor',"Invalid path supplied:".$path,OCP\Util::ERROR);
}