summaryrefslogtreecommitdiffstats
path: root/apps/files/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib')
-rw-r--r--apps/files/lib/capabilities.php1
-rw-r--r--apps/files/lib/helper.php11
2 files changed, 7 insertions, 5 deletions
diff --git a/apps/files/lib/capabilities.php b/apps/files/lib/capabilities.php
index d4820e931ba..690cc314ccd 100644
--- a/apps/files/lib/capabilities.php
+++ b/apps/files/lib/capabilities.php
@@ -15,7 +15,6 @@ class Capabilities {
'capabilities' => array(
'files' => array(
'bigfilechunking' => true,
- 'undelete' => true,
),
),
));
diff --git a/apps/files/lib/helper.php b/apps/files/lib/helper.php
index 6a6db9276a0..97b9d8e7044 100644
--- a/apps/files/lib/helper.php
+++ b/apps/files/lib/helper.php
@@ -8,6 +8,8 @@
namespace OCA\Files;
+use OCP\Files\FileInfo;
+
/**
* Helper class for manipulating file information
*/
@@ -58,7 +60,7 @@ class Helper
* @param \OCP\Files\FileInfo $b file
* @return int -1 if $a must come before $b, 1 otherwise
*/
- public static function compareFileNames($a, $b) {
+ public static function compareFileNames(FileInfo $a, FileInfo $b) {
$aType = $a->getType();
$bType = $b->getType();
if ($aType === 'dir' and $bType !== 'dir') {
@@ -77,7 +79,7 @@ class Helper
* @param \OCP\Files\FileInfo $b file
* @return int -1 if $a must come before $b, 1 otherwise
*/
- public static function compareTimestamp($a, $b) {
+ public static function compareTimestamp(FileInfo $a, FileInfo $b) {
$aTime = $a->getMTime();
$bTime = $b->getMTime();
return ($aTime < $bTime) ? -1 : 1;
@@ -90,7 +92,7 @@ class Helper
* @param \OCP\Files\FileInfo $b file
* @return int -1 if $a must come before $b, 1 otherwise
*/
- public static function compareSize($a, $b) {
+ public static function compareSize(FileInfo $a, FileInfo $b) {
$aSize = $a->getSize();
$bSize = $b->getSize();
return ($aSize < $bSize) ? -1 : 1;
@@ -102,7 +104,7 @@ class Helper
* @param \OCP\Files\FileInfo $i
* @return array formatted file info
*/
- public static function formatFileInfo($i) {
+ public static function formatFileInfo(FileInfo $i) {
$entry = array();
$entry['id'] = $i['fileid'];
@@ -147,6 +149,7 @@ class Helper
/**
* Format file info for JSON
* @param \OCP\Files\FileInfo[] $fileInfos file infos
+ * @return array
*/
public static function formatFileInfos($fileInfos) {
$files = array();