summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2012-08-15 18:31:03 +0200
committerBernhard Posselt <nukeawhale@gmail.com>2012-08-15 18:31:03 +0200
commit66f2c55cc00cd62e40fc95fb2f864e45fef70c2f (patch)
tree23d69ad81f0141151d9df15fb485c144a772d3cd /lib
parent04ee5ea0dd96dda87c62da13c8f160044ecc5348 (diff)
parentc193d2447d1e4e6407088d52f623fc5e68ad6161 (diff)
merged
Diffstat (limited to 'lib')
-rw-r--r--lib/foldermapper.php10
-rw-r--r--lib/utils.php4
2 files changed, 13 insertions, 1 deletions
diff --git a/lib/foldermapper.php b/lib/foldermapper.php
index 8b948842c..abc89b5af 100644
--- a/lib/foldermapper.php
+++ b/lib/foldermapper.php
@@ -128,11 +128,21 @@ class FolderMapper {
return $folderid;
}
+ /**
+ * @brief Delete the folder and all its feeds from the database
+ * @param folder the folder to be deleted (an instance of OCA\News\Folder)
+ * @returns true if the folder has been deleted, false if an error occurred
+ */
public function delete(Folder $folder){
$folderid = $folder->getId();
return deleteById(folderid);
}
+ /**
+ * @brief Delete the folder and all its feeds from the database
+ * @param folder the folder to be deleted (an instance of OCA\News\Folder)
+ * @returns true if the folder has been deleted, false if an error occurred
+ */
public function deleteById($folderid){
if ($folderid == null){
return false;
diff --git a/lib/utils.php b/lib/utils.php
index 5def91e4a..7ad9f1929 100644
--- a/lib/utils.php
+++ b/lib/utils.php
@@ -46,7 +46,9 @@ class Utils {
$itemBody = $spitem->get_content();
$itemAuthor = $spitem->get_author();
$item = new Item($itemUrl, $itemTitle, $itemGUID, $itemBody);
- $item->setAuthor($itemAuthor->get_name());
+ if ($itemAuthor !== null) {
+ $item->setAuthor($itemAuthor->get_name());
+ }
$items[] = $item;
}
}