gforge-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gforge-commits] gforge/www/forum/include ForumHTML.class, 1.23, 1.24


From: tom
Subject: [Gforge-commits] gforge/www/forum/include ForumHTML.class, 1.23, 1.24
Date: Thu, 08 Apr 2004 14:44:11 -0500

Update of /cvsroot/gforge/gforge/www/forum/include
In directory db.perdue.net:/tmp/cvs-serv22445/www/forum/include

Modified Files:
        ForumHTML.class 
Log Message:
Minor SQL optimization; using explicit fields vs 'select *'

Index: ForumHTML.class
===================================================================
RCS file: /cvsroot/gforge/gforge/www/forum/include/ForumHTML.class,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- ForumHTML.class     23 Mar 2004 16:08:42 -0000      1.23
+++ ForumHTML.class     8 Apr 2004 19:44:08 -0000       1.24
@@ -39,10 +39,8 @@
        if ($group_id == $sys_news_group) {
                //this is a news item, not a regular forum
                if ($forum_id) {
-                       /*
-                               Show this news item at the top of the page
-                       */
-                       $sql="SELECT * FROM news_bytes WHERE 
forum_id='$forum_id'";
+                       // Show this news item at the top of the page
+                       $sql="SELECT submitted_by, post_date, group_id, 
forum_id, summary, details FROM news_bytes WHERE forum_id='$forum_id'";
                        $result=db_query($sql);
 
                        $params['group']=db_result($result,0,'group_id');
@@ -52,8 +50,7 @@
 
                        echo '<table><tr><td valign="top">';
                        if (!$result || db_numrows($result) < 1) {
-                               echo '
-                                       
<h3>'.$Language->getText('forum_utils','nonewsitem').'</h3>';
+                               echo 
'<h3>'.$Language->getText('forum_utils','nonewsitem').'</h3>';
                        } else {
                                $user = 
user_get_object(db_result($result,0,'submitted_by'));
                                $group =& group_get_object($params['group']);





reply via email to

[Prev in Thread] Current Thread [Next in Thread]