summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.scrutinizer.yml8
-rw-r--r--.travis.yml3
-rw-r--r--CHANGELOG.md6
-rw-r--r--README.md19
-rw-r--r--appinfo/app.php6
-rw-r--r--appinfo/application.php20
-rw-r--r--appinfo/autoload.php21
-rw-r--r--appinfo/checksum.json2
-rw-r--r--appinfo/database.xml4
-rw-r--r--appinfo/info.xml6
-rw-r--r--appinfo/register_command.php16
-rw-r--r--articleenhancer/globalarticleenhancer.php8
-rw-r--r--articleenhancer/xpatharticleenhancer.php9
-rw-r--r--command/generatesearchindices.php47
-rw-r--r--config/appconfig.php34
-rw-r--r--config/config.php4
-rw-r--r--controller/itemcontroller.php14
-rw-r--r--controller/pagecontroller.php25
-rw-r--r--cron/updater.php2
-rw-r--r--css/content.css58
-rw-r--r--css/news.min.css2
-rw-r--r--css/news.min.css.map2
-rw-r--r--db/feedmapper.php6
-rw-r--r--db/feedtype.php2
-rw-r--r--db/foldermapper.php12
-rw-r--r--db/item.php15
-rw-r--r--db/itemmapper.php75
-rw-r--r--db/mapperfactory.php4
-rw-r--r--db/mysql/itemmapper.php6
-rw-r--r--db/newsmapper.php10
-rw-r--r--fetcher/feedfetcher.php2
-rw-r--r--fetcher/youtubefetcher.php4
-rw-r--r--img/arrow-white.svg60
-rw-r--r--js/app/Config.js6
-rw-r--r--js/build/app.js165
-rw-r--r--js/build/app.min.js4
-rw-r--r--js/build/app.min.js.map2
-rw-r--r--js/controller/AppController.js3
-rw-r--r--js/controller/ContentController.js15
-rw-r--r--js/controller/ExploreController.js2
-rw-r--r--js/controller/NavigationController.js8
-rw-r--r--js/directive/NewsEnclosure.js53
-rw-r--r--js/directive/NewsPlayOne.js30
-rw-r--r--js/directive/NewsSearch.js43
-rw-r--r--js/directive/NewsStickyMenu.js27
-rw-r--r--js/gui/KeyboardShortcuts.js6
-rw-r--r--js/package.json4
-rw-r--r--js/service/ItemResource.js5
-rw-r--r--js/tests/unit/controller/ContentControllerSpec.js22
-rw-r--r--js/tests/unit/controller/NavigationControllerSpec.js15
-rw-r--r--js/tests/unit/service/ItemResourceSpec.js29
-rw-r--r--js/vendor/angular-animate/.bower.json10
-rw-r--r--js/vendor/angular-animate/angular-animate.js2
-rw-r--r--js/vendor/angular-animate/angular-animate.min.js2
-rw-r--r--js/vendor/angular-animate/bower.json4
-rw-r--r--js/vendor/angular-animate/package.json2
-rw-r--r--js/vendor/angular-mocks/.bower.json10
-rw-r--r--js/vendor/angular-mocks/angular-mocks.js2
-rw-r--r--js/vendor/angular-mocks/bower.json4
-rw-r--r--js/vendor/angular-mocks/package.json2
-rw-r--r--js/vendor/angular-route/.bower.json10
-rw-r--r--js/vendor/angular-route/angular-route.js6
-rw-r--r--js/vendor/angular-route/angular-route.min.js2
-rw-r--r--js/vendor/angular-route/angular-route.min.js.map2
-rw-r--r--js/vendor/angular-route/bower.json4
-rw-r--r--js/vendor/angular-route/package.json2
-rw-r--r--js/vendor/angular-sanitize/.bower.json10
-rw-r--r--js/vendor/angular-sanitize/angular-sanitize.js2
-rw-r--r--js/vendor/angular-sanitize/angular-sanitize.min.js2
-rw-r--r--js/vendor/angular-sanitize/bower.json4
-rw-r--r--js/vendor/angular-sanitize/package.json2
-rw-r--r--js/vendor/angular/.bower.json8
-rw-r--r--js/vendor/angular/angular.js144
-rw-r--r--js/vendor/angular/angular.min.js557
-rw-r--r--js/vendor/angular/angular.min.js.gzipbin50404 -> 50484 bytes
-rw-r--r--js/vendor/angular/angular.min.js.map6
-rw-r--r--js/vendor/angular/bower.json2
-rw-r--r--js/vendor/angular/package.json2
-rw-r--r--service/feedservice.php2
-rw-r--r--service/itemservice.php52
-rw-r--r--templates/index.php13
-rw-r--r--templates/part.content.php28
-rw-r--r--templates/part.content.shortcuts.php4
-rw-r--r--tests/classloader.php2
-rw-r--r--tests/travis/php.ini2
-rw-r--r--tests/unit/articleenhancer/EnhancerTest.php5
-rw-r--r--tests/unit/controller/ItemControllerTest.php48
-rw-r--r--tests/unit/db/FolderMapperTest.php8
-rw-r--r--tests/unit/db/ItemMapperTest.php55
-rw-r--r--tests/unit/db/ItemTest.php12
-rw-r--r--tests/unit/db/mappertestutility.php160
-rw-r--r--tests/unit/fetcher/FeedFetcherTest.php1
-rw-r--r--tests/unit/service/FolderServiceTest.php2
-rw-r--r--tests/unit/service/ItemServiceTest.php40
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
diff --git a/README.md b/README.md
index 137d5d677..1a7527a45 100644
--- a/README.md
+++ b/README.md
@@ -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');
});<