diff options
author | Jakob Sack <kde@jakobsack.de> | 2011-07-29 21:36:03 +0200 |
---|---|---|
committer | Jakob Sack <kde@jakobsack.de> | 2011-07-29 21:36:03 +0200 |
commit | bafd684eb694ed0bd86b46ff7cd36382c1cebc34 (patch) | |
tree | c3bb1e013d563263002d052eb41032076a36a5f9 /files/ajax | |
parent | 220132ca237f5077f5145bf327e8528a652ad559 (diff) | |
download | nextcloud-server-bafd684eb694ed0bd86b46ff7cd36382c1cebc34.tar.gz nextcloud-server-bafd684eb694ed0bd86b46ff7cd36382c1cebc34.zip |
Renaming classes :-)
Diffstat (limited to 'files/ajax')
-rw-r--r-- | files/ajax/autocomplete.php | 8 | ||||
-rw-r--r-- | files/ajax/delete.php | 4 | ||||
-rw-r--r-- | files/ajax/download.php | 6 | ||||
-rw-r--r-- | files/ajax/list.php | 10 | ||||
-rw-r--r-- | files/ajax/move.php | 4 | ||||
-rw-r--r-- | files/ajax/newfolder.php | 4 | ||||
-rw-r--r-- | files/ajax/rename.php | 4 | ||||
-rw-r--r-- | files/ajax/upload.php | 6 |
8 files changed, 23 insertions, 23 deletions
diff --git a/files/ajax/autocomplete.php b/files/ajax/autocomplete.php index 2c2f665fd6c..183ee86c788 100644 --- a/files/ajax/autocomplete.php +++ b/files/ajax/autocomplete.php @@ -9,7 +9,7 @@ require_once('../../lib/base.php'); // header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -40,8 +40,8 @@ $query=strtolower($query); $files=array(); -if(OC_FILESYSTEM::file_exists($base) and OC_FILESYSTEM::is_dir($base)){ - $dh = OC_FILESYSTEM::opendir($base); +if(OC_Filesystem::file_exists($base) and OC_Filesystem::is_dir($base)){ + $dh = OC_Filesystem::opendir($base); if($dh){ if(substr($base,-1,1)!='/'){ $base=$base.'/'; @@ -50,7 +50,7 @@ if(OC_FILESYSTEM::file_exists($base) and OC_FILESYSTEM::is_dir($base)){ if ($file != "." && $file != ".."){ if(substr(strtolower($file),0,$queryLen)==$query){ $item=$base.$file; - if((!$dirOnly or OC_FILESYSTEM::is_dir($item))){ + if((!$dirOnly or OC_Filesystem::is_dir($item))){ $files[]=(object)array('id'=>$item,'label'=>$item,'name'=>$item); } } diff --git a/files/ajax/delete.php b/files/ajax/delete.php index 79caf4d0bb2..782db215dfc 100644 --- a/files/ajax/delete.php +++ b/files/ajax/delete.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -21,7 +21,7 @@ $filesWithError = ''; $status = 'success'; //Now delete foreach($files as $file) { - if( !OC_FILES::delete( $dir, $file )){ + if( !OC_Files::delete( $dir, $file )){ $filesWithError .= $file . "\n"; $status = 'error'; } diff --git a/files/ajax/download.php b/files/ajax/download.php index 0b2f894a11b..2bbf1df4eca 100644 --- a/files/ajax/download.php +++ b/files/ajax/download.php @@ -25,13 +25,13 @@ require_once('../../lib/base.php'); // Check if we are a user -if( !OC_USER::isLoggedIn()){ - header( "Location: ".OC_HELPER::linkTo( "index.php" )); +if( !OC_User::isLoggedIn()){ + header( "Location: ".OC_Helper::linkTo( "index.php" )); exit(); } $files = $_GET["files"]; $dir = $_GET["dir"]; -OC_FILES::get($dir,$files); +OC_Files::get($dir,$files); ?> diff --git a/files/ajax/list.php b/files/ajax/list.php index 26462eb5ab9..547bc91fb05 100644 --- a/files/ajax/list.php +++ b/files/ajax/list.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -28,7 +28,7 @@ if($doBreadcrumb){ } } - $breadcrumbNav = new OC_TEMPLATE( "files", "part.breadcrumb", "" ); + $breadcrumbNav = new OC_Template( "files", "part.breadcrumb", "" ); $breadcrumbNav->assign( "breadcrumb", $breadcrumb ); $data['breadcrumb'] = $breadcrumbNav->fetchPage(); @@ -36,12 +36,12 @@ if($doBreadcrumb){ // make filelist $files = array(); -foreach( OC_FILES::getdirectorycontent( $dir ) as $i ){ - $i["date"] = OC_UTIL::formatDate($i["mtime"] ); +foreach( OC_Files::getdirectorycontent( $dir ) as $i ){ + $i["date"] = OC_Util::formatDate($i["mtime"] ); $files[] = $i; } -$list = new OC_TEMPLATE( "files", "part.list", "" ); +$list = new OC_Template( "files", "part.list", "" ); $list->assign( "files", $files ); $data = array('files' => $list->fetchPage()); diff --git a/files/ajax/move.php b/files/ajax/move.php index b1ba641c5b1..4224cbce6d0 100644 --- a/files/ajax/move.php +++ b/files/ajax/move.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -18,7 +18,7 @@ $file = $_GET["file"]; $target = $_GET["target"]; -if(OC_FILES::move($dir,$file,$target,$file)){ +if(OC_Files::move($dir,$file,$target,$file)){ echo json_encode( array( "status" => 'success', "data" => array( "dir" => $dir, "files" => $file ))); }else{ echo json_encode( array( "status" => 'error', "data" => array( "message" => "Could move $file" ))); diff --git a/files/ajax/newfolder.php b/files/ajax/newfolder.php index 988e7f04012..610418583bd 100644 --- a/files/ajax/newfolder.php +++ b/files/ajax/newfolder.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -21,7 +21,7 @@ if($foldername == '') { exit(); } error_log('try to create ' . $foldername . ' in ' . $dir); -if(OC_FILES::newFile($dir, $foldername, 'dir')) { +if(OC_Files::newFile($dir, $foldername, 'dir')) { echo json_encode( array( "status" => "success", "data" => array())); exit(); } diff --git a/files/ajax/rename.php b/files/ajax/rename.php index 7554aa0dd62..516077f6fda 100644 --- a/files/ajax/rename.php +++ b/files/ajax/rename.php @@ -7,7 +7,7 @@ require_once('../../lib/base.php'); header( "Content-Type: application/jsonrequest" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -18,7 +18,7 @@ $file = $_GET["file"]; $newname = $_GET["newname"]; // Delete -if( OC_FILES::move( $dir, $file, $dir, $newname )) { +if( OC_Files::move( $dir, $file, $dir, $newname )) { echo json_encode( array( "status" => "success", "data" => array( "dir" => $dir, "file" => $file, "newname" => $newname ))); } else{ diff --git a/files/ajax/upload.php b/files/ajax/upload.php index f47f9b3d282..5dcd2f2b6af 100644 --- a/files/ajax/upload.php +++ b/files/ajax/upload.php @@ -9,7 +9,7 @@ require_once('../../lib/base.php'); header( "Content-Type: text/plain" ); // Check if we are a user -if( !OC_USER::isLoggedIn()){ +if( !OC_User::isLoggedIn()){ echo json_encode( array( "status" => "error", "data" => array( "message" => "Authentication error" ))); exit(); } @@ -24,8 +24,8 @@ if(strpos($dir,'..') === false){ $fileCount=count($files['name']); for($i=0;$i<$fileCount;$i++){ $target='/' . stripslashes($dir) . $files['name'][$i]; - if(OC_FILESYSTEM::fromUploadedFile($files['tmp_name'][$i],$target)){ - $result[]=array( "status" => "success", 'mime'=>OC_FILESYSTEM::getMimeType($target),'size'=>OC_FILESYSTEM::filesize($target),'name'=>$files['name'][$i]); + if(OC_Filesystem::fromUploadedFile($files['tmp_name'][$i],$target)){ + $result[]=array( "status" => "success", 'mime'=>OC_Filesystem::getMimeType($target),'size'=>OC_Filesystem::filesize($target),'name'=>$files['name'][$i]); } } echo json_encode($result); |