diff options
author | Alessandro Cosentino <cosenal@gmail.com> | 2012-07-17 21:49:38 -0400 |
---|---|---|
committer | Alessandro Cosentino <cosenal@gmail.com> | 2012-07-17 21:49:38 -0400 |
commit | 4ce35659094ed4df43ad41a198a2944aeced9784 (patch) | |
tree | 13be6588a7aa99a5a35700f4552bffb71e2e7a1d /ajax/feedlist.php | |
parent | c378e972a12ba41d252d74e509f88ea7bec2544d (diff) |
update feeds works; need to be polished
Diffstat (limited to 'ajax/feedlist.php')
-rw-r--r-- | ajax/feedlist.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ajax/feedlist.php b/ajax/feedlist.php index e5a37ef2b..92d1e0f20 100644 --- a/ajax/feedlist.php +++ b/ajax/feedlist.php @@ -18,15 +18,15 @@ OCP\JSON::callCheck(); $userid = OCP\USER::getUser(); $feedmapper = new OC_News_FeedMapper(); +$feeds = $feedmapper->findAll($userid); $l = OC_L10N::get('news'); -if(!$feedid) { +if($feeds == null) { OCP\JSON::error(array('data' => array('message' => $l->t('Error adding folder.')))); - OCP\Util::writeLog('news','ajax/feedlist.php: Error adding feed: '.$_POST['feedurl'], OCP\Util::ERROR); + OCP\Util::writeLog('news','ajax/feedlist.php: Error updating feeds: '.$_POST['feedurl'], OCP\Util::ERROR); exit(); } -//TODO: replace the following with a real success case. see contact/ajax/createaddressbook.php for inspirations -OCP\JSON::success(array('data' => array('message' => $l->t('Feed added!')))); +OCP\JSON::success(array('data' => $feeds)); |