diff options
author | Georg Ehrke <developer@georgehrke.com> | 2013-08-19 13:24:07 +0200 |
---|---|---|
committer | Georg Ehrke <developer@georgehrke.com> | 2013-08-19 13:24:07 +0200 |
commit | d9e8ebabdcd99bade4201d6be82e1841d30c5d65 (patch) | |
tree | 75436f33bada80aa42688b478b750399861993e9 | |
parent | 48f0c54261bfa2d2f20864b0d41db8f1df6f1777 (diff) | |
download | nextcloud-server-d9e8ebabdcd99bade4201d6be82e1841d30c5d65.tar.gz nextcloud-server-d9e8ebabdcd99bade4201d6be82e1841d30c5d65.zip |
outsource sharing and deleted files previews to apps
-rw-r--r-- | apps/files_sharing/ajax/publicpreview.php (renamed from core/ajax/publicpreview.php) | 3 | ||||
-rw-r--r-- | apps/files_sharing/appinfo/routes.php | 5 | ||||
-rw-r--r-- | apps/files_trashbin/ajax/preview.php (renamed from core/ajax/trashbinpreview.php) | 3 | ||||
-rw-r--r-- | apps/files_trashbin/appinfo/routes.php | 5 | ||||
-rw-r--r-- | core/routes.php | 4 |
5 files changed, 12 insertions, 8 deletions
diff --git a/core/ajax/publicpreview.php b/apps/files_sharing/ajax/publicpreview.php index 83194d5349c..41a1c178a48 100644 --- a/core/ajax/publicpreview.php +++ b/apps/files_sharing/ajax/publicpreview.php @@ -81,6 +81,5 @@ try{ $preview->show(); } catch (\Exception $e) { \OC_Response::setStatus(500); - \OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR); - exit; + \OC_Log::write('core', $e->getmessage(), \OC_Log::DEBUG); }
\ No newline at end of file diff --git a/apps/files_sharing/appinfo/routes.php b/apps/files_sharing/appinfo/routes.php new file mode 100644 index 00000000000..02815b5eb42 --- /dev/null +++ b/apps/files_sharing/appinfo/routes.php @@ -0,0 +1,5 @@ +<?php +$this->create('core_ajax_public_preview', '/publicpreview.png')->action( +function() { + require_once __DIR__ . '/../ajax/publicpreview.php'; +});
\ No newline at end of file diff --git a/core/ajax/trashbinpreview.php b/apps/files_trashbin/ajax/preview.php index a916dcf229f..a0846b051c7 100644 --- a/core/ajax/trashbinpreview.php +++ b/apps/files_trashbin/ajax/preview.php @@ -38,6 +38,5 @@ try{ $preview->showPreview(); }catch(\Exception $e) { \OC_Response::setStatus(500); - \OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR); - exit; + \OC_Log::write('core', $e->getmessage(), \OC_Log::DEBUG); }
\ No newline at end of file diff --git a/apps/files_trashbin/appinfo/routes.php b/apps/files_trashbin/appinfo/routes.php new file mode 100644 index 00000000000..b1c3f02741e --- /dev/null +++ b/apps/files_trashbin/appinfo/routes.php @@ -0,0 +1,5 @@ +<?php +$this->create('core_ajax_trashbin_preview', '/preview.png')->action( +function() { + require_once __DIR__ . '/../ajax/preview.php'; +});
\ No newline at end of file diff --git a/core/routes.php b/core/routes.php index ce35be1d583..f0f8ce571e2 100644 --- a/core/routes.php +++ b/core/routes.php @@ -44,10 +44,6 @@ $this->create('core_ajax_routes', '/core/routes.json') ->action('OC_Router', 'JSRoutes'); $this->create('core_ajax_preview', '/core/preview.png') ->actionInclude('core/ajax/preview.php'); -$this->create('core_ajax_trashbin_preview', '/core/trashbinpreview.png') - ->actionInclude('core/ajax/trashbinpreview.php'); -$this->create('core_ajax_public_preview', '/core/publicpreview.png') - ->actionInclude('core/ajax/publicpreview.php'); OC::$CLASSPATH['OC_Core_LostPassword_Controller'] = 'core/lostpassword/controller.php'; $this->create('core_lostpassword_index', '/lostpassword/') ->get() |