From 53679811da855acf9bd944a389a48399ca5d5a15 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Mon, 10 Aug 2015 20:20:30 +0200 Subject: serverside full text remove enhancers add full text client side implementation fix bugs and tests for full text feed --- controller/feedcontroller.php | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) (limited to 'controller') diff --git a/controller/feedcontroller.php b/controller/feedcontroller.php index 46c2a5010..4f0ed9fdf 100644 --- a/controller/feedcontroller.php +++ b/controller/feedcontroller.php @@ -13,17 +13,17 @@ namespace OCA\News\Controller; -use \OCP\IRequest; -use \OCP\IConfig; -use \OCP\AppFramework\Controller; -use \OCP\AppFramework\Http; +use OCP\IRequest; +use OCP\IConfig; +use OCP\AppFramework\Controller; +use OCP\AppFramework\Http; -use \OCA\News\Service\ItemService; -use \OCA\News\Service\FeedService; -use \OCA\News\Service\FolderService; -use \OCA\News\Service\ServiceNotFoundException; -use \OCA\News\Service\ServiceConflictException; -use \OCA\News\Db\FeedType; +use OCA\News\Service\ItemService; +use OCA\News\Service\FeedService; +use OCA\News\Service\FolderService; +use OCA\News\Service\ServiceNotFoundException; +use OCA\News\Service\ServiceConflictException; +use OCA\News\Db\FeedType; class FeedController extends Controller { @@ -300,7 +300,7 @@ class FeedController extends Controller { * @param int $feedId * @param int $ordering */ - public function ordering ($feedId, $ordering) { + public function ordering($feedId, $ordering) { try { $this->feedService->setOrdering($feedId, $ordering, $this->userId); } catch(ServiceNotFoundException $ex) { @@ -311,4 +311,21 @@ class FeedController extends Controller { } -} \ No newline at end of file + /** + * @NoAdminRequired + * + * @param int $feedId + * @param bool $fullTextEnabled + */ + public function enableFullText($feedId, $fullTextEnabled=false) { + try { + $this->feedService->enableFullText($feedId, $fullTextEnabled, + $this->userId); + } catch(ServiceNotFoundException $ex) { + return $this->error($ex, Http::STATUS_NOT_FOUND); + } + + return []; + } + +} -- cgit v1.2.3