summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2012-02-05 14:00:49 +0100
committerRobin Appelman <icewind@owncloud.com>2012-02-05 14:03:44 +0100
commit30673e478672af316c057f562a8a02babdbd3160 (patch)
tree90c5156def04dee80e9f96ce41ad2e49c34bb3df
parent25e777ef5e9c68ac45d32b71a0174febf74d47ef (diff)
downloadnextcloud-server-30673e478672af316c057f562a8a02babdbd3160.tar.gz
nextcloud-server-30673e478672af316c057f562a8a02babdbd3160.zip
writable not writeable
-rw-r--r--apps/files_sharing/sharedstorage.php10
-rw-r--r--apps/files_texteditor/ajax/loadfile.php2
-rw-r--r--apps/files_texteditor/ajax/savefile.php2
-rw-r--r--files/index.php2
-rw-r--r--files/templates/part.list.php2
-rw-r--r--lib/filestorage.php2
-rw-r--r--lib/filestorage/local.php2
-rw-r--r--lib/filestoragecommon.php2
-rw-r--r--lib/filesystem.php4
-rw-r--r--lib/filesystemview.php6
-rw-r--r--lib/util.php2
11 files changed, 18 insertions, 18 deletions
diff --git a/apps/files_sharing/sharedstorage.php b/apps/files_sharing/sharedstorage.php
index fa6fe7913f2..4840cce4c9d 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 64e016be8c2..8ece844aa29 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 846159c13b7..589428d1862 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 fbf7a4901a1..f166790ba9c 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 92b6f37d8e7..b117d81a1a5 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 70aaf985b8b..4523144f6f4 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 61343652f61..2c1f650cb9f 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 35a926ecb07..f522d15c4e9 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 8e55575e665..a18072ecbc2 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 6c2ca916310..4586507a811 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 6c19c5416a2..abd918044b5 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");
}