diff options
author | Robin Appelman <icewind@owncloud.com> | 2012-10-21 02:13:27 +0400 |
---|---|---|
committer | Robin Appelman <icewind@owncloud.com> | 2012-10-21 02:13:27 +0400 |
commit | c14f73d58259f591129e88e8e2ab3ec4248ae0b9 (patch) | |
tree | 4b406c5ed45402ac002772c7a3c922a47092f9aa /files_svgedit | |
parent | d5de7368a32f5eb9bd1173eaec194e4b54152e86 (diff) |
drop depricated is_readable and is_writable
Diffstat (limited to 'files_svgedit')
-rw-r--r-- | files_svgedit/ajax/save.php | 7 | ||||
-rw-r--r-- | files_svgedit/index.php | 8 |
2 files changed, 5 insertions, 10 deletions
diff --git a/files_svgedit/ajax/save.php b/files_svgedit/ajax/save.php index b760c02ae..e299df4c9 100644 --- a/files_svgedit/ajax/save.php +++ b/files_svgedit/ajax/save.php @@ -56,11 +56,8 @@ if($path != '' && $mtime != '') { } } // file should be existing now - if(method_exists('OC_Filesystem', 'is_writable')) { - $writable = \OC\Files\Filesystem::is_writable($path); - } else { - $writable = \OC\Files\Filesystem::is_writeable($path); - } + $writable = \OC\Files\Filesystem::isUpdatable($path); + if($writable) { if($b64encoded) { $b64prefix = 'data:' . $b64type . ';base64,'; diff --git a/files_svgedit/index.php b/files_svgedit/index.php index a63f08474..34237f188 100644 --- a/files_svgedit/index.php +++ b/files_svgedit/index.php @@ -17,11 +17,9 @@ OC_Util::addScript('files_svgedit', 'jsPDF/jspdf.min'); OC_Util::addScript('files_svgedit', 'svgToPdf'); OC_App::setActiveNavigationEntry('files_index'); $path = $_GET['file']; -if(method_exists('OC_Filesystem', 'is_writable')) { - $writable = \OC\Files\Filesystem::is_writable($path); -} else { - $writable = \OC\Files\Filesystem::is_writeable($path); -} + +$writable = \OC\Files\Filesystem::isUpdatable($path); + if(isset($_GET['file']) and $writable) { $filecontents = \OC\Files\Filesystem::file_get_contents($path); $filemtime = \OC\Files\Filesystem::filemtime($path); |