diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php index fa6fe7913f248086f568b601eb49f9d1cc8af4a6..4840cce4c9df4f5682a2f91c311fa88cbadb8174 100644 --- a/apps/files_sharing/sharedstorage.php +++ b/apps/files_sharing/sharedstorage.php @@ -259,7 +259,7 @@ class OC_Filestorage_Shared extends OC_Filestorage { return true; } - public function is_writeable($path) { + public function is_writable($path) { if($path == "" || $path == "/"){ return false; }elseif (OC_Share::getPermissions($this->datadir.$path) & OC_Share::WRITE) { @@ -340,7 +340,7 @@ class OC_Filestorage_Shared extends OC_Filestorage { } public function file_put_contents($path, $data) { - if ($this->is_writeable($path)) { + if ($this->is_writable($path)) { $source = $this->getSource($path); if ($source) { $storage = OC_Filesystem::getStorage($source); @@ -384,7 +384,7 @@ class OC_Filestorage_Shared extends OC_Filestorage { if ($root1 !== $root2) { return false; // Check if both paths have write permission - } else if ($this->is_writeable($path1) && $this->is_writeable($path2)) { + } else if ($this->is_writable($path1) && $this->is_writable($path2)) { $oldSource = $this->getSource($path1); $newSource = $folders['source'].substr($newTarget, strlen($folders['target'])); if ($oldSource) { @@ -414,7 +414,7 @@ class OC_Filestorage_Shared extends OC_Filestorage { if ($path2 == "" || $path2 == "/") { // TODO Construct new shared item or should this not be allowed? } else { - if ($this->is_writeable($path2)) { + if ($this->is_writable($path2)) { $tmpFile = $this->toTmpFile($path1); $result = $this->fromTmpFile($tmpFile, $path2); if ($result) { @@ -444,7 +444,7 @@ class OC_Filestorage_Shared extends OC_Filestorage { } public function fromTmpFile($tmpFile, $path) { - if ($this->is_writeable($path)) { + if ($this->is_writable($path)) { $source = $this->getSource($path); if ($source) { $storage = OC_Filesystem::getStorage($source); diff --git a/apps/files_texteditor/ajax/loadfile.php b/apps/files_texteditor/ajax/loadfile.php index 64e016be8c277551f261f97ad6608e939c8abc9f..8ece844aa29fdf2d32a8345c45b5a3c3a0b565c4 100644 --- a/apps/files_texteditor/ajax/loadfile.php +++ b/apps/files_texteditor/ajax/loadfile.php @@ -33,7 +33,7 @@ $filename = isset($_GET['file']) ? $_GET['file'] : ''; if(!empty($filename)) { $path = $dir.'/'.$filename; - if(OC_Filesystem::is_writeable($path)) + if(OC_Filesystem::is_writable($path)) { $mtime = OC_Filesystem::filemtime($path); $filecontents = OC_Filesystem::file_get_contents($path); diff --git a/apps/files_texteditor/ajax/savefile.php b/apps/files_texteditor/ajax/savefile.php index 846159c13b70d8fef12d4faea8988dff86acb80e..589428d1862268bdd93e08cac52573f54d5f13e2 100644 --- a/apps/files_texteditor/ajax/savefile.php +++ b/apps/files_texteditor/ajax/savefile.php @@ -46,7 +46,7 @@ if($path != '' && $mtime != '') { // File same as when opened // Save file - if(OC_Filesystem::is_writeable($path)) + if(OC_Filesystem::is_writable($path)) { OC_Filesystem::file_put_contents($path, $filecontents); // Clear statcache diff --git a/files/index.php b/files/index.php index fbf7a4901a1fe35fe5feb3f4f1be9f7ddbd3a4ec..f166790ba9c642a317c249e6d7c11322aed753fa 100644 --- a/files/index.php +++ b/files/index.php @@ -94,7 +94,7 @@ $tmpl = new OC_Template( "files", "index", "user" ); $tmpl->assign( "fileList", $list->fetchPage() ); $tmpl->assign( "breadcrumb", $breadcrumbNav->fetchPage() ); $tmpl->assign( 'dir', $dir); -$tmpl->assign( 'readonly', !OC_Filesystem::is_writeable($dir)); +$tmpl->assign( 'readonly', !OC_Filesystem::is_writable($dir)); $tmpl->assign( "files", $files ); $tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize); $tmpl->assign( 'uploadMaxHumanFilesize', OC_Helper::humanFileSize($maxUploadFilesize)); diff --git a/files/templates/part.list.php b/files/templates/part.list.php index 92b6f37d8e778e57091575a02c43db8b3d7fcf98..b117d81a1a580b7ecbb871bbaebbd23f0313856d 100644 --- a/files/templates/part.list.php +++ b/files/templates/part.list.php @@ -1,5 +1,5 @@ <?php foreach($_['files'] as $file): - $write = ($file['writeable']) ? 'true' : 'false'; + $write = ($file['writable']) ? 'true' : 'false'; $simple_file_size = simple_file_size($file['size']); $simple_size_color = intval(200-$file['size']/(1024*1024)*2); // the bigger the file, the darker the shade of grey; megabytes*2 if($simple_size_color<0) $simple_size_color = 0; diff --git a/lib/filestorage.php b/lib/filestorage.php index 70aaf985b8b6d6a791dec9b5123df2b5e5d61ea2..4523144f6f4230031ca805cfb3322f8a67285f3a 100644 --- a/lib/filestorage.php +++ b/lib/filestorage.php @@ -34,7 +34,7 @@ class OC_Filestorage{ public function filetype($path){} public function filesize($path){} public function is_readable($path){} - public function is_writeable($path){} + public function is_writable($path){} public function file_exists($path){} public function readfile($path){} public function filectime($path){} diff --git a/lib/filestorage/local.php b/lib/filestorage/local.php index 61343652f61b66decfcbb6ebff1c306788182425..2c1f650cb9f1742ca809ee0da740ca2f8d755099 100644 --- a/lib/filestorage/local.php +++ b/lib/filestorage/local.php @@ -50,7 +50,7 @@ class OC_Filestorage_Local extends OC_Filestorage{ public function is_readable($path){ return is_readable($this->datadir.$path); } - public function is_writeable($path){ + public function is_writable($path){ return is_writable($this->datadir.$path); } public function file_exists($path){ diff --git a/lib/filestoragecommon.php b/lib/filestoragecommon.php index 35a926ecb076a07451f2b881d211be3cad1931e9..f522d15c4e9ee9bbd3cdf08e28571f5ef0a3ad2a 100644 --- a/lib/filestoragecommon.php +++ b/lib/filestoragecommon.php @@ -35,7 +35,7 @@ class OC_Filestorage_Common extends OC_Filestorage { return $stat['size']; } public function is_readable($path){} - public function is_writeable($path){} + public function is_writable($path){} public function file_exists($path){} public function readfile($path) { $handle = $this->fopen($path, "r"); diff --git a/lib/filesystem.php b/lib/filesystem.php index 8e55575e6650ec3a4a6b8d7fa134cc6714cae636..a18072ecbc2751f98348501d2aa1caf606e8023b 100644 --- a/lib/filesystem.php +++ b/lib/filesystem.php @@ -333,8 +333,8 @@ class OC_Filesystem{ static public function is_readable($path){ return self::$defaultInstance->is_readable($path); } - static public function is_writeable($path){ - return self::$defaultInstance->is_writeable($path); + static public function is_writable($path){ + return self::$defaultInstance->is_writable($path); } static public function file_exists($path){ return self::$defaultInstance->file_exists($path); diff --git a/lib/filesystemview.php b/lib/filesystemview.php index 6c2ca916310b8972dbeccef473efa322068eff9e..4586507a8112b860cad82fb1c121fb4233955ba9 100644 --- a/lib/filesystemview.php +++ b/lib/filesystemview.php @@ -141,8 +141,8 @@ class OC_FilesystemView { public function is_readable($path){ return $this->basicOperation('is_readable',$path); } - public function is_writeable($path){ - return $this->basicOperation('is_writeable',$path); + public function is_writable($path){ + return $this->basicOperation('is_writable',$path); } public function file_exists($path){ if($path=='/'){ @@ -166,7 +166,7 @@ class OC_FilesystemView { return $this->basicOperation('unlink',$path,array('delete')); } public function rename($path1,$path2){ - if(OC_FileProxy::runPreProxies('rename',$path1,$path2) and $this->is_writeable($path1) and OC_Filesystem::isValidPath($path2)){ + if(OC_FileProxy::runPreProxies('rename',$path1,$path2) and $this->is_writable($path1) and OC_Filesystem::isValidPath($path2)){ $run=true; OC_Hook::emit( OC_Filesystem::CLASSNAME, OC_Filesystem::signal_rename, array( OC_Filesystem::signal_param_oldpath => $path1 , OC_Filesystem::signal_param_newpath=>$path2, OC_Filesystem::signal_param_run => &$run)); if($run){ diff --git a/lib/util.php b/lib/util.php index 6c19c5416a2c55d4d3aee8985538805a194f648d..abd918044b5ef640c9645732c953340c04e43f52 100644 --- a/lib/util.php +++ b/lib/util.php @@ -226,7 +226,7 @@ class OC_Util { $errors[]=array('error'=>'PHP module ctype is not installed.<br/>','hint'=>'Please ask your server administrator to install the module.'); } - if(file_exists(OC::$SERVERROOT."/config/config.php") and !is_writeable(OC::$SERVERROOT."/config/config.php")){ + if(file_exists(OC::$SERVERROOT."/config/config.php") and !is_writable(OC::$SERVERROOT."/config/config.php")){ $errors[]=array('error'=>"Can't write into config directory 'config'",'hint'=>"You can usually fix this by giving the webserver use write access to the config directory in owncloud"); }