[AppDB] Fix up comments when not logged in.

Tony Lambregts tony_lambregts at telusplanet.net
Fri Dec 24 13:10:23 CST 2004


When a person was not logged in the appdb would display the first comment and 
then cry like a baby about trying to use a non member function.

Change log: Fix up displaying comments when not logged in.

Files Changed: include/comments.php
-------------- next part --------------
Index: include/comments.php
===================================================================
RCS file: /home/wine/appdb/include/comments.php,v
retrieving revision 1.13
diff -u -r1.13 comments.php
--- include/comments.php	23 Dec 2004 01:12:03 -0000	1.13
+++ include/comments.php	24 Dec 2004 19:01:58 -0000
@@ -63,7 +63,7 @@
     echo "</td></tr>\n";
 
     // delete message button, for admins
-    if(havepriv("admin") || $_SESSION['current']->is_maintainer($ob->appId, $ob->versionId))
+    if (loggedin() && (havepriv("admin") || $_SESSION['current']->is_maintainer($appId,$versionId) ))
     {
         echo "<tr>";
         echo "<td><form method=\"post\" name=\"message\" action=\"".BASE."deletecomment.php\"><input type=submit value='Delete' class=button>\n";


More information about the wine-patches mailing list