diff options
94 files changed, 1454 insertions, 734 deletions
diff --git a/.scrutinizer.yml b/.scrutinizer.yml index b6946f8cb..765700a18 100644 --- a/.scrutinizer.yml +++ b/.scrutinizer.yml @@ -9,16 +9,18 @@ filter: - 'css/*' - 'bin/*' - 'tmp/*' + - 'appinfo/routes.php' - 'appinfo/application.php' + - 'tests/*' imports: #- javascript disabled because of es6 producing tons of errors - php - javascript -tools: - external_code_coverage: - timeout: 600 +#tools: +# external_code_coverage: +# timeout: 600 checks: php: diff --git a/.travis.yml b/.travis.yml index 870f44ffc..db08fb591 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,10 +30,11 @@ install: - sudo easy_install3 requests - sudo easy_install3 ocdev # clone core - - ocdev setup core --dir owncloud --branch stable8 --no-history + - ocdev setup core --dir owncloud --branch master --no-history - mv news owncloud/apps/ before_script: + - phpenv config-add owncloud/apps/news/tests/travis/php.ini # set up databases and users for postgres and mysql - createuser -U travis -s oc_autotest - mysql -e 'create database oc_autotest;' diff --git a/CHANGELOG.md b/CHANGELOG.md index 7d682b493..5c7c85403 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +owncloud-news (5.3.0) +* **Enhancement**: Make it possible to search articles in the search field. To migrate older articles to this functionality, check the README section "Updating from versions prior to 5.3.0", #185 +* **Enhancement**: Stop video and audio playback if a new video or audio file is being played +* **Enhancement**: Do not stop playing podcasts when the feed is being reloaded or changed, #156 +* **New dependency**: Bump required ownCloud version to 8.1 + owncloud-news (5.2.8) * **Bugfix**: Fix feed subscribe to URL * **Enhancement**: Provide checksums for all files @@ -1,6 +1,8 @@ # README [![Build Status](https://travis-ci.org/owncloud/news.svg?branch=master)](https://travis-ci.org/owncloud/news) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/owncloud/news/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/owncloud/news/?branch=master) + The News app is an RSS/Atom feed aggregator. It offers a [RESTful API](https://github.com/owncloud/news/wiki/API-1.2) for app developers. The source code is [available on GitHub](https://github.com/owncloud/news) @@ -15,7 +17,7 @@ For further developer and user documentation please visit [the wiki](https://git are listed on the [ownCloud apps overview](https://github.com/owncloud/core/wiki/Apps) ## Dependencies -* ownCloud >= 8.0.0 +* ownCloud >= 8.1 * PHP >= 5.4 * libxml >= 2.7.8 (2.9 recommended) * php-curl @@ -123,6 +125,12 @@ You need to do the following: ### After updating from a version prior to 4 all my read articles reappear as unread and there are duplicates We switched to a different feed parsing library which creates article ids differently than before. This means that the same article is not found in the database because it was generated with a different id and is thus readded. This should happen only once for each feed after the upgrade and there is no data loss. Unfortunately there is no fix for this since the id is a hash which can not be reversed, so a smooth transition is not possible. +### Updating from versions prior to 5.3.0 + +5.3.0 adds the possibility to search your articles. To do this efficiently however, the News app needs to generate an index. This is done automatically for new articles, but older articles need to be migrated. Because large installations have millions of articles, generating the search index has been offloaded to a separate command to prevent timeouts when upgrading the app. To make your old articles searchable run this command in your ownCloud top directory: + + php -f console.php news:create-search-indices + ## FAQ ### How do I reset the News app @@ -180,6 +188,15 @@ exploreUrl = * **useCronUpdates**: To use a custom update/cron script you need to disable the cronjob which is run by ownCloud by default by setting this to false * **exploreUrl**: If given that url will be contacted for fetching content for the explore feed + +Commands +-------- +The following commands are available when calling php -f console.php in the top directory: + +* **Generate search indices**: + + php -f console.php news:create-search-indices + Translations ------------ For translations in other languages than English, we rely on the [Transifex](https://www.transifex.com/) platform. diff --git a/appinfo/app.php b/appinfo/app.php index 66c0ef166..d1a84a292 100644 --- a/appinfo/app.php +++ b/appinfo/app.php @@ -13,13 +13,15 @@ namespace OCA\News\AppInfo; -use \OCA\News\Config\DependencyException; +use Exception; + +require_once __DIR__ . '/../vendor/autoload.php'; // Turn all errors into exceptions to combat shitty library behavior set_error_handler(function ($code, $message) { if ($code === E_ERROR || $code === E_USER_ERROR) { - throw new \Exception($message, $code); + throw new Exception($message, $code); } }); diff --git a/appinfo/application.php b/appinfo/application.php index dfbd81be4..106e8062f 100644 --- a/appinfo/application.php +++ b/appinfo/application.php @@ -13,8 +13,6 @@ namespace OCA\News\AppInfo; -require_once __DIR__ . '/autoload.php'; - use HTMLPurifier; use HTMLPurifier_Config; @@ -52,7 +50,7 @@ class Application extends App { */ $container->registerService('OCA\News\Db\ItemMapper', function($c) { return $c->query('OCA\News\Db\MapperFactory')->getItemMapper( - $c->query('OCP\IDb') + $c->query('OCP\IDBConnection') ); }); @@ -86,7 +84,7 @@ class Application extends App { /** * Utility */ - $container->registerService('ConfigPath', function($c) { + $container->registerService('ConfigPath', function() { return 'config.ini'; }); @@ -130,7 +128,8 @@ class Application extends App { return new HTMLPurifier($config); }); - $container->registerService('OCA\News\ArticleEnhancer\Enhancer', function($c) { + $container->registerService('OCA\News\ArticleEnhancer\Enhancer', + function($c) { $enhancer = new Enhancer(); // register simple enhancers from config json file @@ -216,13 +215,18 @@ class Application extends App { // register fetchers in order // the most generic fetcher should be the last one - $fetcher->registerFetcher($c->query('OCA\News\Fetcher\YoutubeFetcher')); - $fetcher->registerFetcher($c->query('OCA\News\Fetcher\FeedFetcher')); + $fetcher->registerFetcher( + $c->query('OCA\News\Fetcher\YoutubeFetcher') + ); + $fetcher->registerFetcher( + $c->query('OCA\News\Fetcher\FeedFetcher') + ); return $fetcher; }); - $container->registerService('OCA\News\Explore\RecommendedSites', function($c) { + $container->registerService('OCA\News\Explore\RecommendedSites', + function() { return new RecommendedSites(__DIR__ . '/../explore'); }); } diff --git a/appinfo/autoload.php b/appinfo/autoload.php deleted file mode 100644 index 784f4740d..000000000 --- a/appinfo/autoload.php +++ /dev/null @@ -1,21 +0,0 @@ -<?php -/** - * ownCloud - News - * - * This file is licensed under the Affero General Public License version 3 or - * l |