diff options
69 files changed, 1507 insertions, 232 deletions
@@ -2,8 +2,9 @@ owncloud-news (2.001) * Delete folders, feeds and articles if a user is deleted * Also remember collapsed folders on postgres * Fix bug that would prevent articles from being deleted if a folder is marked as deleted on sqlite and postgres -* Require ownCloud 6.0.2 +* Require ownCloud 6.0.3 * Remove html tags from feed titles +* Port to built in core App Framework and thus removing the need to install the App Framework owncloud-news (1.808) * Also focus article area when clicking on all unread link diff --git a/README.rst b/README.rst index b057a6cdb..5859fb436 100644 --- a/README.rst +++ b/README.rst @@ -22,7 +22,7 @@ Minimum PHP Version Minimum ownCloud Version ------------------- -* >= 6.0.2 +* >= 6.0.3 Supported Webservers -------------------- @@ -40,7 +40,6 @@ Bugs Before reporting bugs: * We do not support Internet Explorer and Safari (Patches accepted though, except for IE < 10) -* get the newest version of the App Framework * get the newest version of the News app * `check if they have already been reported <https://github.com/owncloud/news/issues?state=open>`_ @@ -65,7 +64,7 @@ Before you install the app check that the following requirements are met: - You can use a cron or webcron to call Background Jobs in ownCloud - Your **data/** directory is owned by your webserver user and write/readable - You have installed **php-curl** and activated it in the **php.ini** -- Install ownCloud **5.0.6+** (important!) +- Install ownCloud **6.0.3+** (important!) Should you have upgraded from a prior version, disable the CSS and JavaScript caching by adding this to :file:`owncloud/config/config.php`:: @@ -81,12 +80,12 @@ Installation ~~~~~~~~~~~~ - Go to the ownCloud apps page -- Activate the **App Framework** App first, then activate the **News** app in the apps menu +- Activate the **News** app in the apps menu - `Set up ownCloud Background Jobs <http://doc.owncloud.org/server/5.0/admin_manual/configuration/background_jobs.html>`_ to enable feed updates. A recommended timespan for feed updates is 15-30 Minutes. Keep up to date ~~~~~~~~~~~~~~~ -Both the **News** and **App Framework** App can be updated through the ownCloud apps page. +The **News** App can be updated through the ownCloud apps page. Git (development version) @@ -95,33 +94,16 @@ Git (development version) Installation ~~~~~~~~~~~~ -- Clone the **App Framework** app into the **/var/www** directory:: - - git clone https://github.com/owncloud/appframework.git - -- Clone the **News** app into the **/var/www** directory:: +- Clone the **News** app into the **/var/www/owncloud/apps** directory:: git clone https://github.com/owncloud/news.git - -- Link both into ownCloud's apps folder:: - - ln -s /var/www/appframework /var/www/owncloud/apps - ln -s /var/www/news /var/www/owncloud/apps - -- Activate the **App Framework** App first, then activate the **News** app in the apps menu +- Activate the **News** app in the apps menu - `Set up ownCloud Background Jobs <http://doc.owncloud.org/server/5.0/admin_manual/configuration/background_jobs.html>`_ to enable feed updates. A recommended timespan for feed updates is 15-30 Minutes. Keep up to date ~~~~~~~~~~~~~~~ - -To get the newest update you can use git. To update the appframework use:: - - cd /var/www/appframework - git pull --rebase origin master - - To update the News app use:: cd /var/www/news diff --git a/api/feedapi.php b/api/feedapi.php index 0880434d8..e77efef2e 100644 --- a/api/feedapi.php +++ b/api/feedapi.php @@ -25,12 +25,12 @@ namespace OCA\News\API; -use \OCA\AppFramework\Core\API; -use \OCA\AppFramework\Controller\Controller; -use \OCA\AppFramework\Http\Request; -use \OCA\AppFramework\Http\JSONResponse; -use \OCA\AppFramework\Http\Http; +use \OCP\IRequest; +use \OCP\AppFramework\Controller; +use \OCP\AppFramework\Http; +use \OCP\AppFramework\Http\JSONResponse; +use \OCA\News\Core\API; use \OCA\News\BusinessLayer\FeedBusinessLayer; use \OCA\News\BusinessLayer\FolderBusinessLayer; use \OCA\News\BusinessLayer\ItemBusinessLayer; @@ -43,16 +43,18 @@ class FeedAPI extends Controller { private $itemBusinessLayer; private $feedBusinessLayer; private $folderBusinessLayer; + private $api; public function __construct(API $api, - Request $request, + IRequest $request, FolderBusinessLayer $folderBusinessLayer, FeedBusinessLayer $feedBusinessLayer, ItemBusinessLayer $itemBusinessLayer){ - parent::__construct($api, $request); + parent::__construct($api->getAppName(), $request); $this->folderBusinessLayer = $folderBusinessLayer; $this->feedBusinessLayer = $feedBusinessLayer; $this->itemBusinessLayer = $itemBusinessLayer; + $this->api = $api; } diff --git a/api/folderapi.php b/api/folderapi.php index 12e400a76..67efa59ea 100644 --- a/api/folderapi.php +++ b/api/folderapi.php @@ -25,12 +25,12 @@ namespace OCA\News\API; -use \OCA\AppFramework\Core\API; -use \OCA\AppFramework\Controller\Controller; -use \OCA\AppFramework\Http\Request; -use \OCA\AppFramework\Http\JSONResponse; -use \OCA\AppFramework\Http\Http; +use \OCP\IRequest; +use \OCP\AppFramework\Controller; +use \OCP\AppFramework\Http; +use \OCP\AppFramework\Http\JSONResponse; +use \OCA\News\Core\API; use \OCA\News\BusinessLayer\FolderBusinessLayer; use \OCA\News\BusinessLayer\ItemBusinessLayer; use \OCA\News\BusinessLayer\BusinessLayerException; @@ -42,14 +42,16 @@ class FolderAPI extends Controller { private $folderBusinessLayer; private $itemBusinessLayer; + private $api; public function __construct(API $api, - Request $request, + IRequest $request, FolderBusinessLayer $folderBusinessLayer, ItemBusinessLayer $itemBusinessLayer){ - parent::__construct($api, $request); + parent::__construct($api->getAppName(), $request); $this->folderBusinessLayer = $folderBusinessLayer; $this->itemBusinessLayer = $itemBusinessLayer; + $this->api = $api; } diff --git a/api/itemapi.php b/api/itemapi.php index 335132d60..821fdd382 100644 --- a/api/itemapi.php +++ b/api/itemapi.php @@ -25,25 +25,26 @@ namespace OCA\News\API; -use \OCA\AppFramework\Core\API; -use \OCA\AppFramework\Controller\Controller; -use \OCA\AppFramework\Http\Request; -use \OCA\AppFramework\Http\JSONResponse; -use \OCA\AppFramework\Http\Http; +use \OCP\IRequest; +use \OCP\AppFramework\Controller; +use \OCP\AppFramework\Http; +use \OCP\AppFramework\Http\JSONResponse; use \OCA\News\BusinessLayer\ItemBusinessLayer; use \OCA\News\BusinessLayer\BusinessLayerException; - +use \OCA\News\Core\API; class ItemAPI extends Controller { private $itemBusinessLayer; + private $api; public function __construct(API $api, - Request $request, + IRequest $request, ItemBusinessLayer $itemBusinessLayer){ - parent::__construct($api, $request); + parent::__construct($api->getAppName(), $request); $this->itemBusinessLayer = $itemBusinessLayer; + $this->api = $api; } diff --git a/api/newsapi.php b/api/newsapi.php index aaed92926..322defead 100644 --- a/api/newsapi.php +++ b/api/newsapi.php @@ -25,23 +25,24 @@ namespace OCA\News\API; -use \OCA\AppFramework\Core\API; -use \OCA\AppFramework\Controller\Controller; -use \OCA\AppFramework\Http\Request; -use \OCA\AppFramework\Http\JSONResponse; -use \OCA\AppFramework\Http\Response; -use \OCA\AppFramework\Http\Http; +use \OCP\IRequest; +use \OCP\AppFramework\Controller; +use \OCP\AppFramework\Http; +use \OCP\AppFramework\Http\JSONResponse; +use \OCP\AppFramework\Http\Response; use \OCA\News\Utility\Updater; - +use \OCA\News\Core\API; class NewsAPI extends Controller { private $updater; + private $api; - public function __construct(API $api, Request $request, Updater $updater){ - parent::__construct($api, $request); + public function __construct(API $api, IRequest $request, Updater $updater){ + parent::__construct($api->getAppName(), $request); $this->updater = $updater; + $this->api = $api; } diff --git a/appinfo/app.php b/appinfo/app.php index 6e9d0396d..b68ed51f0 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -24,7 +24,7 @@ namespace OCA\News; -use \OCA\AppFramework\Core\API; +use \OCA\News\Core\API; // dont break owncloud when the appframework is not enabled diff --git a/appinfo/info.xml b/appinfo/info.xml index 6b8dbb08a..76cbb4521 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -2,7 +2,7 @@ <info> <id>news</id> <name>News</name> - <description>An RSS/Atom feed reader. Requires the App Framework app and backgroundjobs need to be enabled. See the README.rst in the apps top directory</description> + <description>An RSS/Atom feed reader. Requires ownCloud backgroundjobs or an updater script to be enabled to update your feeds. See the README.rst in the apps top directory</description> <licence>AGPL</licence> <author>Alessandro Cosentino, Bernhard Posselt, Jan-Christoph Borchardt. Powered by SimplePie (Ryan Parman, Geoffrey Sneddon, Ryan McCue and contributors).</author> <version>1.809</version> diff --git a/appinfo/routes.php b/appinfo/routes.php index fc60a717c..1eb0af953 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -25,7 +25,7 @@ namespace OCA\News; -use \OCA\AppFramework\App; +use \OCP\AppFramework\App; use \OCA\News\DependencyInjection\DIContainer; diff --git a/businesslayer/feedbusinesslayer.php b/businesslayer/feedbusinesslayer.php index 72f16d6b4..76763aae7 100644 --- a/businesslayer/feedbusinesslayer.php +++ b/businesslayer/feedbusinesslayer.php @@ -25,8 +25,7 @@ namespace OCA\News\BusinessLayer; -use \OCA\AppFramework\Core\API; - +use \OCA\News\Core\API; use \OCA\News\Db\DoesNotExistException; use \OCA\News\Db\Feed; use \OCA\News\Db\Item; diff --git a/businesslayer/folderbusinesslayer.php b/businesslayer/folderbusinesslayer.php index 64ddac4a3..c8611917a 100644 --- a/businesslayer/folderbusinesslayer.php +++ b/businesslayer/folderbusinesslayer.php @@ -25,8 +25,7 @@ namespace OCA\News\BusinessLayer; -use \OCA\AppFramework\Core\API; - +use \OCA\News\Core\API; use \OCA\News\Db\Folder; use \OCA\News\Db\FolderMapper; use \OCA\News\Utility\TimeFactory; diff --git a/controller/exportcontroller.php b/controller/exportcontroller.php index 357c54d54..e16a5b513 100644 --- a/controller/exportcontroller.php +++ b/controller/exportcontroller.php @@ -25,12 +25,14 @@ namespace OCA\News\Controller; -use \OCA\AppFramework\Controller\Controller; -use \OCA\AppFramework\Core\API; -use \OCA\AppFramework\Http\Request; -use \OCA\AppFramework\Http\TextDownloadResponse; -use \OCA\AppFramework\Http\JSONResponse; +use \OCP\IRequest; +use \OCP\AppFramework\Controller; +use \OCP\AppFramework\Http; +use \OCP\AppFramework\Http\JSONResponse; +use \OCP\AppFramework\Http\Response; +use \OCA\News\Http\TextDownloadResponse; +use \OCA\News\Core\API; use \OCA\News\BusinessLayer\FeedBusinessLayer; use \OCA\News\BusinessLayer\FolderBusinessLayer; use \OCA\News\BusinessLayer\ItemBusinessLayer; @@ -42,17 +44,19 @@ class ExportController extends Controller { private $folderBusinessLayer; private $feedBusinessLayer; private $itemBusinessLayer; + private $api; - public function __construct(API $api, Request $request, + public function __construct(API $api, IRequest $request, FeedBusinessLayer $feedBusinessLayer, FolderBusinessLayer $folderBusinessLayer, ItemBusinessLayer $itemBusinessLayer, OPMLExporter $opmlExporter){ - parent::__construct($api, $request); + parent::__construct($api->getAppName(), $request); $this->feedBusinessLayer = $feedBusinessLayer; $this->folderBusinessLayer = $folderBusinessLayer; |