summaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
authorFrank Karlitschek <frank@owncloud.org>2012-05-02 00:20:45 +0200
committerFrank Karlitschek <frank@owncloud.org>2012-05-02 00:20:45 +0200
commit93b63cf3755d3f1295c976c308b81c6340883abb (patch)
tree8e8a7413ea75723b7d21e18661a10842d1970bf1 /apps/files
parente48f511606a1ef64aa39099055dd6ae437f45d03 (diff)
downloadnextcloud-server-93b63cf3755d3f1295c976c308b81c6340883abb.tar.gz
nextcloud-server-93b63cf3755d3f1295c976c308b81c6340883abb.zip
ported the rest of the OC_Helper calls
Diffstat (limited to 'apps/files')
-rwxr-xr-xapps/files/admin.php16
-rwxr-xr-x[-rw-r--r--]apps/files/ajax/upload.php2
-rwxr-xr-xapps/files/appinfo/app.php2
-rwxr-xr-xapps/files/index.php6
4 files changed, 13 insertions, 13 deletions
diff --git a/apps/files/admin.php b/apps/files/admin.php
index ae7ea0436a0..120e245fd42 100755
--- a/apps/files/admin.php
+++ b/apps/files/admin.php
@@ -29,24 +29,24 @@ OCP\User::checkAdminUser();
$htaccessWorking=(getenv('htaccessWorking')=='true');
-$upload_max_filesize = OC_Helper::computerFileSize(ini_get('upload_max_filesize'));
-$post_max_size = OC_Helper::computerFileSize(ini_get('post_max_size'));
-$maxUploadFilesize = OC_Helper::humanFileSize(min($upload_max_filesize, $post_max_size));
+$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
+$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
+$maxUploadFilesize = OCP\Util::humanFileSize(min($upload_max_filesize, $post_max_size));
if($_POST) {
if(isset($_POST['maxUploadSize'])){
- if(($setMaxSize = OC_Files::setUploadLimit(OC_Helper::computerFileSize($_POST['maxUploadSize']))) !== false) {
- $maxUploadFilesize = OC_Helper::humanFileSize($setMaxSize);
+ if(($setMaxSize = OC_Files::setUploadLimit(OCP\Util::computerFileSize($_POST['maxUploadSize']))) !== false) {
+ $maxUploadFilesize = OCP\Util::humanFileSize($setMaxSize);
}
}
if(isset($_POST['maxZipInputSize'])) {
$maxZipInputSize=$_POST['maxZipInputSize'];
- OC_Config::setValue('maxZipInputSize', OC_Helper::computerFileSize($maxZipInputSize));
+ OC_Config::setValue('maxZipInputSize', OCP\Util::computerFileSize($maxZipInputSize));
}
if(isset($_POST['submitFilesAdminSettings'])) {
OC_Config::setValue('allowZipDownload', isset($_POST['allowZipDownload']));
}
}
-$maxZipInputSize = OC_Helper::humanFileSize(OC_Config::getValue('maxZipInputSize', OC_Helper::computerFileSize('800 MB')));
+$maxZipInputSize = OCP\Util::humanFileSize(OC_Config::getValue('maxZipInputSize', OCP\Util::computerFileSize('800 MB')));
$allowZipDownload = intval(OC_Config::getValue('allowZipDownload', true));
OC_App::setActiveNavigationEntry( "files_administration" );
@@ -54,7 +54,7 @@ OC_App::setActiveNavigationEntry( "files_administration" );
$tmpl = new OC_Template( 'files', 'admin' );
$tmpl->assign( 'htaccessWorking', $htaccessWorking );
$tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize);
-$tmpl->assign( 'maxPossibleUploadSize', OC_Helper::humanFileSize(PHP_INT_MAX));
+$tmpl->assign( 'maxPossibleUploadSize', OCP\Util::humanFileSize(PHP_INT_MAX));
$tmpl->assign( 'allowZipDownload', $allowZipDownload);
$tmpl->assign( 'maxZipInputSize', $maxZipInputSize);
return $tmpl->fetchPage(); \ No newline at end of file
diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php
index 3ac8ef59560..c50f6233a46 100644..100755
--- a/apps/files/ajax/upload.php
+++ b/apps/files/ajax/upload.php
@@ -46,7 +46,7 @@ $result=array();
if(strpos($dir,'..') === false){
$fileCount=count($files['name']);
for($i=0;$i<$fileCount;$i++){
- $target = OC_Helper::buildNotExistingFileName(stripslashes($dir), $files['name'][$i]);
+ $target = OCP\Util::buildNotExistingFileName(stripslashes($dir), $files['name'][$i]);
if(is_uploaded_file($files['tmp_name'][$i]) and OC_Filesystem::fromTmpFile($files['tmp_name'][$i],$target)){
$meta=OC_FileCache::getCached($target);
$result[]=array( "status" => "success", 'mime'=>$meta['mimetype'],'size'=>$meta['size'],'name'=>basename($target));
diff --git a/apps/files/appinfo/app.php b/apps/files/appinfo/app.php
index 40523521d9c..0e82713fe5c 100755
--- a/apps/files/appinfo/app.php
+++ b/apps/files/appinfo/app.php
@@ -5,6 +5,6 @@ $l=OC_L10N::get('files');
OC_App::register( array( "order" => 2, "id" => "files", "name" => "Files" ));
-OC_App::addNavigationEntry( array( "id" => "files_index", "order" => 0, "href" => OCP\Util::linkTo( "files", "index.php" ), "icon" => OC_Helper::imagePath( "core", "places/home.svg" ), "name" => $l->t("Files") ));
+OC_App::addNavigationEntry( array( "id" => "files_index", "order" => 0, "href" => OCP\Util::linkTo( "files", "index.php" ), "icon" => OCP\Util::imagePath( "core", "places/home.svg" ), "name" => $l->t("Files") ));
OC_Search::registerProvider('OC_Search_Provider_File');
diff --git a/apps/files/index.php b/apps/files/index.php
index 9634a725866..3f97317fc5f 100755
--- a/apps/files/index.php
+++ b/apps/files/index.php
@@ -80,8 +80,8 @@ $breadcrumbNav = new OC_Template( "files", "part.breadcrumb", "" );
$breadcrumbNav->assign( "breadcrumb", $breadcrumb );
$breadcrumbNav->assign( "baseURL", OCP\Util::linkTo("files", "index.php")."?dir=");
-$upload_max_filesize = OC_Helper::computerFileSize(ini_get('upload_max_filesize'));
-$post_max_size = OC_Helper::computerFileSize(ini_get('post_max_size'));
+$upload_max_filesize = OCP\Util::computerFileSize(ini_get('upload_max_filesize'));
+$post_max_size = OCP\Util::computerFileSize(ini_get('post_max_size'));
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
$freeSpace=OC_Filesystem::free_space('/');
@@ -95,7 +95,7 @@ $tmpl->assign( 'dir', $dir);
$tmpl->assign( 'readonly', !OC_Filesystem::is_writable($dir));
$tmpl->assign( "files", $files );
$tmpl->assign( 'uploadMaxFilesize', $maxUploadFilesize);
-$tmpl->assign( 'uploadMaxHumanFilesize', OC_Helper::humanFileSize($maxUploadFilesize));
+$tmpl->assign( 'uploadMaxHumanFilesize', OCP\Util::humanFileSize($maxUploadFilesize));
$tmpl->assign( 'allowZipDownload', intval(OC_Config::getValue('allowZipDownload', true)));
$tmpl->printPage();