summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--businesslayer/feedbusinesslayer.php2
-rw-r--r--controller/foldercontroller.php1
-rw-r--r--db/itemmapper.php2
-rw-r--r--db/mapperfactory.php2
-rw-r--r--fetcher/feedfetcher.php3
-rw-r--r--tests/unit/businesslayer/FeedBusinessLayerTest.php8
6 files changed, 4 insertions, 14 deletions
diff --git a/businesslayer/feedbusinesslayer.php b/businesslayer/feedbusinesslayer.php
index 05792059b..efe763e8d 100644
--- a/businesslayer/feedbusinesslayer.php
+++ b/businesslayer/feedbusinesslayer.php
@@ -171,7 +171,7 @@ class FeedBusinessLayer extends BusinessLayer {
}
try {
- list($feed, $items) = $this->feedFetcher->fetch(
+ list(, $items) = $this->feedFetcher->fetch(
$existingFeed->getUrl(), false);
// update number of articles on every feed update
diff --git a/controller/foldercontroller.php b/controller/foldercontroller.php
index bdea99753..caa07f4d2 100644
--- a/controller/foldercontroller.php
+++ b/controller/foldercontroller.php
@@ -149,7 +149,6 @@ class FolderController extends Controller {
* @NoAdminRequired
*/
public function rename(){
- $userId = $this->userId;
$folderName = $this->params('folderName');
$folderId = (int) $this->params('folderId');
diff --git a/db/itemmapper.php b/db/itemmapper.php
index 884405e6b..c1a341aaa 100644
--- a/db/itemmapper.php
+++ b/db/itemmapper.php
@@ -44,7 +44,7 @@ class ItemMapper extends Mapper implements IMapper {
// prepare for the unexpected
if(!is_numeric($status)) {
- die(); die(); die('If you can read this something is terribly wrong');
+ die('If you can read this something is terribly wrong');
}
// now im gonna slowly stick them in the query, be careful!
diff --git a/db/mapperfactory.php b/db/mapperfactory.php
index 4597714d7..7d7c5d7cc 100644
--- a/db/mapperfactory.php
+++ b/db/mapperfactory.php
@@ -33,10 +33,8 @@ class MapperFactory {
switch($this->dbType) {
case 'pgsql':
return new \OCA\News\Db\Postgres\ItemMapper($this->db);
- break;
default:
return new ItemMapper($this->db);
- break;
}
}
diff --git a/fetcher/feedfetcher.php b/fetcher/feedfetcher.php
index 47cd0924a..52da1f648 100644
--- a/fetcher/feedfetcher.php
+++ b/fetcher/feedfetcher.php
@@ -175,8 +175,7 @@ class FeedFetcher implements IFeedFetcher {
$feed = new Feed();
// unescape content because angularjs helps against XSS
- $title = strip_tags($this->decodeTwice($simplePieFeed->get_title(),
- ENT_COMPAT, 'UTF-8' ));
+ $title = strip_tags($this->decodeTwice($simplePieFeed->get_title()));
// if there is no title use the url
if(!$title) {
diff --git a/tests/unit/businesslayer/FeedBusinessLayerTest.php b/tests/unit/businesslayer/FeedBusinessLayerTest.php
index 1f4f4daa0..4cf0ae399 100644
--- a/tests/unit/businesslayer/FeedBusinessLayerTest.php
+++ b/tests/unit/businesslayer/FeedBusinessLayerTest.php
@@ -77,7 +77,6 @@ class FeedBusinessLayerTest extends \PHPUnit_Framework_TestCase {
$timeFactory, $config,
$this->enhancer, $this->purifier);
$this->user = 'jack';
- $response = 'hi';
}
@@ -317,10 +316,6 @@ class FeedBusinessLayerTest extends \PHPUnit_Framework_TestCase {
$item
);
- $ex = new DoesNotExistException('hi');
-
- $fetchReturn = array($feed, $items);
-
$this->feedMapper->expects($this->any())
->method('find')
->will($this->returnValue($existingFeed));
@@ -425,13 +420,12 @@ class FeedBusinessLayerTest extends \PHPUnit_Framework_TestCase {
->will($this->throwException($ex));
$this->setExpectedException('\OCA\News\BusinessLayer\BusinessLayerException');
- $return = $this->feedBusinessLayer->update($feed->getId(), $this->user);
+ $this->feedBusinessLayer->update($feed->getId(), $this->user);
}
public function testUpdateDoesntUpdateIfFeedIsPrevented() {
$feedId = 3;
- $folderId = 4;
$feed = new Feed();
$feed->setFolderId(16);
$feed->setId($feedId);