[Fusionforge-commits] FusionForge branch master updated. 6ef9227e7717475ef290c52c9c4b42841048b6d6

Franck Villaume nerville at fusionforge.org
Mon Dec 15 15:17:14 CET 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "FusionForge".

The branch, master has been updated
       via  6ef9227e7717475ef290c52c9c4b42841048b6d6 (commit)
      from  334d4b6de957da3fafaf4d3c82c56acede57a34c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 6ef9227e7717475ef290c52c9c4b42841048b6d6
Author: Franck Villaume <franck.villaume at trivialdev.com>
Date:   Mon Dec 15 15:16:30 2014 +0100

    RSS widget: use placeholder rather than false/wrong url, check if we get a title before firing the SQL query

diff --git a/src/common/widget/Widget_Rss.class.php b/src/common/widget/Widget_Rss.class.php
index 418dbef..911eee5 100644
--- a/src/common/widget/Widget_Rss.class.php
+++ b/src/common/widget/Widget_Rss.class.php
@@ -115,7 +115,7 @@ require_once 'Widget.class.php';
 		$prefs .= 'URL'._(':');
 		$prefs .= '</td>';
 		$prefs .= '<td>';
-		$prefs .= '<input type="url" class="textfield_medium" name="rss[url]" value="http://search.twitter.com/search.atom?q=alcatel-lucent&show_user=1" />';
+		$prefs .= '<input type="url" class="textfield_medium" name="rss[url]" value="" placeholder="'._('Set your RSS URL here.').'" />';
 		$prefs .= '</td>';
 		$prefs .= '</tr>';
 		$prefs .= '</table>';
@@ -156,7 +156,11 @@ require_once 'Widget.class.php';
 					mkdir(forge_get_config('data_path') .'/rss');
 				}
 				$rss_reader = new SimplePie($rss['url'], forge_get_config('data_path') .'/rss', null, forge_get_config('sys_proxy'));
-				$rss['title'] = $rss_reader->get_title();
+				if ($rss_reader) {
+					$rss['title'] = $rss_reader->get_title();
+				} else {
+					return false;
+				}
 			}
 			$sql = 'INSERT INTO widget_rss (owner_id, owner_type, title, url) VALUES ($1,$2,$3,$4)';
 			$res = db_query_params($sql,array($this->owner_id,$this->owner_type,$rss['title'],$rss['url']));

-----------------------------------------------------------------------

Summary of changes:
 src/common/widget/Widget_Rss.class.php |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
FusionForge



More information about the Fusionforge-commits mailing list