From f29881d554a0cbda997d8dcb12b7c0fd1e59be14 Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Thu, 2 May 2013 20:01:35 +0200 Subject: force links to open in new tabs, fix #146 --- controller/foldercontroller.php | 3 +-- tests/unit/controller/FolderControllerTest.php | 2 ++ tests/unit/utility/FeedFetcherTest.php | 5 +++-- utility/feedfetcher.php | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/controller/foldercontroller.php b/controller/foldercontroller.php index f8d99410d..a2e0d028b 100644 --- a/controller/foldercontroller.php +++ b/controller/foldercontroller.php @@ -65,6 +65,7 @@ class FolderController extends Controller { $this->folderBusinessLayer->open($folderId, $isOpened, $userId); } + /** * @IsAdminExemption * @IsSubAdminExemption @@ -113,7 +114,6 @@ class FolderController extends Controller { return $this->renderJSON($params); } catch (BusinessLayerException $ex){ - return $this->renderJSON(array(), $ex->getMessage()); } @@ -157,7 +157,6 @@ class FolderController extends Controller { return $this->renderJSON($params); } catch (BusinessLayerException $ex){ - return $this->renderJSON(array(), $ex->getMessage()); } } diff --git a/tests/unit/controller/FolderControllerTest.php b/tests/unit/controller/FolderControllerTest.php index 4b070a0bb..67529edbc 100644 --- a/tests/unit/controller/FolderControllerTest.php +++ b/tests/unit/controller/FolderControllerTest.php @@ -323,4 +323,6 @@ class FolderControllerTest extends ControllerTestUtility { $this->assertEquals($msg, $params['msg']); $this->assertTrue($response instanceof JSONResponse); } + + } \ No newline at end of file diff --git a/tests/unit/utility/FeedFetcherTest.php b/tests/unit/utility/FeedFetcherTest.php index 3794eb1da..9ddd9d593 100644 --- a/tests/unit/utility/FeedFetcherTest.php +++ b/tests/unit/utility/FeedFetcherTest.php @@ -100,7 +100,8 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { $this->permalink = 'http://permalink'; $this->title = 'my title<'; $this->guid = 'hey guid here'; - $this->body = 'let the bodies hit the floor'; + $this->body = 'let the bodies hit the floor test'; + $this->body2 = 'let the bodies hit the floor test'; $this->pub = 23111; $this->author = '<boogieman'; $this->enclosureLink = 'http://enclosure.you'; @@ -177,7 +178,7 @@ class FeedFetcherTest extends \OCA\AppFramework\Utility\TestUtility { $item->setTitle(html_entity_decode($this->title)); $item->setGuid($this->guid); $item->setGuidHash(md5($this->guid)); - $item->setBody($this->body); + $item->setBody($this->body2); $item->setPubDate($this->pub); $item->setLastModified($this->time); if($author) { diff --git a/utility/feedfetcher.php b/utility/feedfetcher.php index a8964db3b..e153669ac 100644 --- a/utility/feedfetcher.php +++ b/utility/feedfetcher.php @@ -115,7 +115,8 @@ class FeedFetcher implements IFeedFetcher { $guid = $simplePieItem->get_id(); $item->setGuid($guid); $item->setGuidHash(md5($guid)); - $item->setBody($simplePieItem->get_content()); + $item->setBody(str_replace('get_content())); $item->setPubDate($simplePieItem->get_date('U')); $item->setLastModified($this->time->getTime()); -- cgit v1.2.3