[Fusionforge-commits] r10388 - trunk/src/www/forum

Franck VILLAUME nerville at libremir.placard.fr.eu.org
Thu Sep 2 11:27:23 CEST 2010


Author: nerville
Date: 2010-09-02 11:27:23 +0200 (Thu, 02 Sep 2010)
New Revision: 10388

Modified:
   trunk/src/www/forum/myforums.php
Log:
fix when no forums monitored

Modified: trunk/src/www/forum/myforums.php
===================================================================
--- trunk/src/www/forum/myforums.php	2010-09-02 09:26:53 UTC (rev 10387)
+++ trunk/src/www/forum/myforums.php	2010-09-02 09:27:23 UTC (rev 10388)
@@ -1,22 +1,21 @@
 <?php
 
 /**
- * GForge Monitored Forums Track Page
+ * FusionForge Monitored Forums Track Page
  *
  * Portions Copyright 1999-2001 (c) VA Linux Systems
  * The rest Copyright 2002-2004 (c) GForge Team
- * http://gforge.org/
+ * Copyright 2005 (c) - Daniel Perez
+ * http://fusionforge.org/
  *
- * @version   
+ * This file is part of FusionForge.
  *
- * This file is part of GForge.
- *
- * GForge is free software; you can redistribute it and/or modify
+ * FusionForge is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2 of the License, or
  * (at your option) any later version.
  *
- * GForge is distributed in the hope that it will be useful,
+ * FusionForge is distributed in the hope that it will be useful,
  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  * GNU General Public License for more details.
@@ -26,10 +25,6 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
-/* my monitored forums
-	by Daniel Perez - 2005
-*/
-
 require_once('../env.inc.php');
 require_once $gfcommon.'include/pre.php';
 require_once $gfwww.'forum/include/ForumHTML.class.php';
@@ -59,9 +54,14 @@
 //get the user monitored forums
 $result = db_query_params ('SELECT mon.forum_id, fg.group_id FROM forum_monitored_forums mon,forum_group_list fg where mon.user_id=$1 and fg.group_forum_id=mon.forum_id',
 			   array ($user_id));
-if (!$result || db_numrows($result) < 1) {
-	exit_error(_('You have no monitored forums'),_('You are not monitoring any forums.').' '.db_error(), 'forums');
+if (!$result) {
+    echo '<div class="error">Database error :'.db_error().'</div>';
+    exit;
 }
+if ( db_numrows($result) < 1) {
+    echo '<div class="feedback">'._('You have no monitored forums').'</div>';
+    exit;
+}
 
 //now, i need to create a forum object per each forum that the user is monitoring
 




More information about the Fusionforge-commits mailing list