diff options
Diffstat (limited to 'files/ajax')
-rw-r--r-- | files/ajax/download.php | 3 | ||||
-rw-r--r-- | files/ajax/list.php | 3 | ||||
-rw-r--r-- | files/ajax/mimeicon.php | 3 | ||||
-rw-r--r-- | files/ajax/rawlist.php | 26 | ||||
-rw-r--r-- | files/ajax/scan.php | 1 | ||||
-rw-r--r-- | files/ajax/upload.php | 2 |
6 files changed, 37 insertions, 1 deletions
diff --git a/files/ajax/download.php b/files/ajax/download.php index 198069f3fa1..39852613ab9 100644 --- a/files/ajax/download.php +++ b/files/ajax/download.php @@ -21,6 +21,9 @@ * */ +// only need filesystem apps +$RUNTIME_APPTYPES=array('filesystem'); + // Init owncloud require_once('../../lib/base.php'); diff --git a/files/ajax/list.php b/files/ajax/list.php index 8a414827e1c..ec9ab7342dd 100644 --- a/files/ajax/list.php +++ b/files/ajax/list.php @@ -1,5 +1,8 @@ <?php +// only need filesystem apps +$RUNTIME_APPTYPES=array('filesystem'); + // Init owncloud require_once('../../lib/base.php'); diff --git a/files/ajax/mimeicon.php b/files/ajax/mimeicon.php index 8724016b3a1..ff72ba0f5b7 100644 --- a/files/ajax/mimeicon.php +++ b/files/ajax/mimeicon.php @@ -1,5 +1,8 @@ <?php +// no need for apps +$RUNTIME_NOAPPS=false; + // Init owncloud require_once('../../lib/base.php'); diff --git a/files/ajax/rawlist.php b/files/ajax/rawlist.php new file mode 100644 index 00000000000..e02c5b62733 --- /dev/null +++ b/files/ajax/rawlist.php @@ -0,0 +1,26 @@ +<?php + +// only need filesystem apps +$RUNTIME_APPTYPES=array('filesystem'); + +// Init owncloud +require_once('../../lib/base.php'); +require_once('../../lib/template.php'); + +OC_JSON::checkLoggedIn(); + +// Load the files +$dir = isset( $_GET['dir'] ) ? $_GET['dir'] : ''; +$mimetype = isset($_GET['mimetype']) ? $_GET['mimetype'] : ''; + +// make filelist +$files = array(); +foreach( OC_Files::getdirectorycontent( $dir, $mimetype ) as $i ){ + $i["date"] = OC_Util::formatDate($i["mtime"] ); + $i['mimetype_icon'] = $i['type'] == 'dir' ? mimetype_icon('dir'): mimetype_icon($i['mimetype']); + $files[] = $i; +} + +OC_JSON::success(array('data' => $files)); + +?> diff --git a/files/ajax/scan.php b/files/ajax/scan.php index 565275911b4..db09b7d5c64 100644 --- a/files/ajax/scan.php +++ b/files/ajax/scan.php @@ -17,6 +17,7 @@ if($force or !OC_FileCache::inCache('')){ if(!$checkOnly){ OC_DB::beginTransaction(); OC_FileCache::scan('',$eventSource); + OC_FileCache::clean(); OC_DB::commit(); $eventSource->send('success',true); }else{ diff --git a/files/ajax/upload.php b/files/ajax/upload.php index f8b8f0e2e5f..af7a7acf702 100644 --- a/files/ajax/upload.php +++ b/files/ajax/upload.php @@ -14,7 +14,7 @@ if (!isset($_FILES['files'])) { } foreach ($_FILES['files']['error'] as $error) { if ($error != 0) { - $l=new OC_L10N('files'); + $l=OC_L10N::get('files'); $errors = array( UPLOAD_ERR_OK=>$l->t("There is no error, the file uploaded with success"), UPLOAD_ERR_INI_SIZE=>$l->t("The uploaded file exceeds the upload_max_filesize directive in php.ini").ini_get('upload_max_filesize'), |