summaryrefslogtreecommitdiffstats
path: root/controller
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2015-08-10 20:20:30 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2015-08-12 17:05:18 +0200
commit53679811da855acf9bd944a389a48399ca5d5a15 (patch)
treefa75e06a965fb5751017288a5c135bc179574210 /controller
parentc77a6705d34c81cb933f3d4b83eb18e2b586035a (diff)
serverside full text
remove enhancers add full text client side implementation fix bugs and tests for full text feed
Diffstat (limited to 'controller')
-rw-r--r--controller/feedcontroller.php41
1 files changed, 29 insertions, 12 deletions
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 [];
+ }
+
+}