outsource sharing and deleted files previews to apps

This commit is contained in:
Georg Ehrke 2013-08-19 13:24:07 +02:00
parent 48f0c54261
commit d9e8ebabdc
5 changed files with 12 additions and 8 deletions

View File

@ -81,6 +81,5 @@ try{
$preview->show(); $preview->show();
} catch (\Exception $e) { } catch (\Exception $e) {
\OC_Response::setStatus(500); \OC_Response::setStatus(500);
\OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR); \OC_Log::write('core', $e->getmessage(), \OC_Log::DEBUG);
exit;
} }

View File

@ -0,0 +1,5 @@
<?php
$this->create('core_ajax_public_preview', '/publicpreview.png')->action(
function() {
require_once __DIR__ . '/../ajax/publicpreview.php';
});

View File

@ -38,6 +38,5 @@ try{
$preview->showPreview(); $preview->showPreview();
}catch(\Exception $e) { }catch(\Exception $e) {
\OC_Response::setStatus(500); \OC_Response::setStatus(500);
\OC_Log::write('core', $e->getmessage(), \OC_Log::ERROR); \OC_Log::write('core', $e->getmessage(), \OC_Log::DEBUG);
exit;
} }

View File

@ -0,0 +1,5 @@
<?php
$this->create('core_ajax_trashbin_preview', '/preview.png')->action(
function() {
require_once __DIR__ . '/../ajax/preview.php';
});

View File

@ -44,10 +44,6 @@ $this->create('core_ajax_routes', '/core/routes.json')
->action('OC_Router', 'JSRoutes'); ->action('OC_Router', 'JSRoutes');
$this->create('core_ajax_preview', '/core/preview.png') $this->create('core_ajax_preview', '/core/preview.png')
->actionInclude('core/ajax/preview.php'); ->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'; OC::$CLASSPATH['OC_Core_LostPassword_Controller'] = 'core/lostpassword/controller.php';
$this->create('core_lostpassword_index', '/lostpassword/') $this->create('core_lostpassword_index', '/lostpassword/')
->get() ->get()