remove unneccessary lib in namespace

This commit is contained in:
Jörn Friedrich Dreyer 2013-09-20 16:46:33 +02:00
parent 9e39118b52
commit 4b3e56bcf9
10 changed files with 19 additions and 20 deletions

View File

@ -24,7 +24,7 @@ foreach ($files as $file) {
}
// get array with updated storage stats (e.g. max file size) after upload
$storageStats = \OCA\Files\Lib\Helper::buildFileStorageStatistics($dir);
$storageStats = \OCA\Files\Helper::buildFileStorageStatistics($dir);
if ($success) {
OCP\JSON::success(array("data" => array_merge(array("dir" => $dir, "files" => $files), $storageStats)));

View File

@ -6,4 +6,4 @@ $RUNTIME_APPTYPES = array('filesystem');
OCP\JSON::checkLoggedIn();
// send back json
OCP\JSON::success(array('data' => \OCA\Files\Lib\Helper::buildFileStorageStatistics('/')));
OCP\JSON::success(array('data' => \OCA\Files\Helper::buildFileStorageStatistics('/')));

View File

@ -20,11 +20,11 @@ $doBreadcrumb = isset($_GET['breadcrumb']);
$data = array();
$baseUrl = OCP\Util::linkTo('files', 'index.php') . '?dir=';
$permissions = \OCA\Files\Lib\Helper::getDirPermissions($dir);
$permissions = \OCA\Files\Helper::getDirPermissions($dir);
// Make breadcrumb
if($doBreadcrumb) {
$breadcrumb = \OCA\Files\Lib\Helper::makeBreadcrumb($dir);
$breadcrumb = \OCA\Files\Helper::makeBreadcrumb($dir);
$breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
$breadcrumbNav->assign('breadcrumb', $breadcrumb, false);
@ -34,7 +34,7 @@ if($doBreadcrumb) {
}
// make filelist
$files = \OCA\Files\Lib\Helper::getFiles($dir);
$files = \OCA\Files\Helper::getFiles($dir);
$list = new OCP\Template("files", "part.list", "");
$list->assign('files', $files, false);

View File

@ -28,7 +28,7 @@ if($mimetypes && !in_array('httpd/unix-directory', $mimetypes)) {
$file['directory'] = $dir;
$file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']);
$file["date"] = OCP\Util::formatDate($file["mtime"]);
$file['mimetype_icon'] = \OCA\Files\Lib\Helper::determineIcon($file);
$file['mimetype_icon'] = \OCA\Files\Helper::determineIcon($file);
$files[] = $file;
}
}
@ -39,7 +39,7 @@ if (is_array($mimetypes) && count($mimetypes)) {
$file['directory'] = $dir;
$file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']);
$file["date"] = OCP\Util::formatDate($file["mtime"]);
$file['mimetype_icon'] = \OCA\Files\Lib\Helper::determineIcon($file);
$file['mimetype_icon'] = \OCA\Files\Helper::determineIcon($file);
$files[] = $file;
}
}
@ -48,7 +48,7 @@ if (is_array($mimetypes) && count($mimetypes)) {
$file['directory'] = $dir;
$file['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($file['mimetype']);
$file["date"] = OCP\Util::formatDate($file["mtime"]);
$file['mimetype_icon'] = \OCA\Files\Lib\Helper::determineIcon($file);
$file['mimetype_icon'] = \OCA\Files\Helper::determineIcon($file);
$files[] = $file;
}
}

View File

@ -53,7 +53,7 @@ OCP\JSON::callCheck();
// get array with current storage stats (e.g. max file size)
$storageStats = \OCA\Files\Lib\Helper::buildFileStorageStatistics($dir);
$storageStats = \OCA\Files\Helper::buildFileStorageStatistics($dir);
if (!isset($_FILES['files'])) {
OCP\JSON::error(array('data' => array_merge(array('message' => $l->t('No file was uploaded. Unknown error')), $storageStats)));
@ -113,7 +113,7 @@ if (strpos($dir, '..') === false) {
if (is_uploaded_file($files['tmp_name'][$i]) and \OC\Files\Filesystem::fromTmpFile($files['tmp_name'][$i], $target)) {
// updated max file size after upload
$storageStats = \OCA\Files\Lib\Helper::buildFileStorageStatistics($dir);
$storageStats = \OCA\Files\Helper::buildFileStorageStatistics($dir);
$meta = \OC\Files\Filesystem::getFileInfo($target);
if ($meta === false) {

View File

@ -1,5 +1,4 @@
<?php
OC::$CLASSPATH['OCA\Files\Capabilities'] = 'apps/files/lib/capabilities.php';
$l = OC_L10N::get('files');

View File

@ -74,14 +74,14 @@ if (\OC\Files\Cache\Upgrade::needUpgrade($user)) { //dont load anything if we ne
$ajaxLoad = true;
}
else{
$files = \OCA\Files\Lib\Helper::getFiles($dir);
$files = \OCA\Files\Helper::getFiles($dir);
}
$freeSpace = \OC\Files\Filesystem::free_space($dir);
$needUpgrade = false;
}
// Make breadcrumb
$breadcrumb = \OCA\Files\Lib\Helper::makeBreadcrumb($dir);
$breadcrumb = \OCA\Files\Helper::makeBreadcrumb($dir);
// make breadcrumb und filelist markup
$list = new OCP\Template('files', 'part.list', '');
@ -93,7 +93,7 @@ $breadcrumbNav = new OCP\Template('files', 'part.breadcrumb', '');
$breadcrumbNav->assign('breadcrumb', $breadcrumb);
$breadcrumbNav->assign('baseURL', OCP\Util::linkTo('files', 'index.php') . '?dir=');
$permissions = \OCA\Files\Lib\Helper::getDirPermissions($dir);
$permissions = \OCA\Files\Helper::getDirPermissions($dir);
if ($needUpgrade) {
OCP\Util::addscript('files', 'upgrade');

View File

@ -1,6 +1,6 @@
<?php
namespace OCA\Files\Lib;
namespace OCA\Files;
class Helper
{
@ -85,11 +85,11 @@ class Helper
}
$i['directory'] = $dir;
$i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($i['mimetype']);
$i['icon'] = \OCA\Files\Lib\Helper::determineIcon($i);
$i['icon'] = \OCA\Files\Helper::determineIcon($i);
$files[] = $i;
}
usort($files, array('\OCA\Files\Lib\Helper', 'fileCmp'));
usort($files, array('\OCA\Files\Helper', 'fileCmp'));
return $files;
}

View File

@ -22,7 +22,7 @@ function fileCmp($a, $b) {
function determineIcon($file, $sharingRoot, $sharingToken) {
// for folders we simply reuse the files logic
if($file['type'] == 'dir') {
return \OCA\Files\Lib\Helper::determineIcon($file);
return \OCA\Files\Helper::determineIcon($file);
}
$relativePath = substr($file['path'], 6);

View File

@ -62,11 +62,11 @@ class Helper
}
$i['permissions'] = \OCP\PERMISSION_READ;
$i['isPreviewAvailable'] = \OCP\Preview::isMimeSupported($r['mime']);
$i['icon'] = \OCA\Files\Lib\Helper::determineIcon($i);
$i['icon'] = \OCA\Files\Helper::determineIcon($i);
$files[] = $i;
}
usort($files, array('\OCA\Files\Lib\Helper', 'fileCmp'));
usort($files, array('\OCA\Files\Helper', 'fileCmp'));
return $files;
}