[geeklog-hg] geeklog: fixed SQL error when receiving a Pingback

geeklog-cvs at lists.geeklog.net geeklog-cvs at lists.geeklog.net
Sun Dec 30 12:15:56 EST 2012


changeset 8905:61bae85ccbfb
url:  http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/61bae85ccbfb
user: Dirk Haun <dirk at haun-online.de>
date: Sun Dec 30 18:15:50 2012 +0100
description:
fixed SQL error when receiving a Pingback

diffstat:

 public_html/pingback.php |  2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diffs (12 lines):

diff -r 8e1ad894aefe -r 61bae85ccbfb public_html/pingback.php
--- a/public_html/pingback.php	Sun Dec 30 11:45:40 2012 +0100
+++ b/public_html/pingback.php	Sun Dec 30 18:15:50 2012 +0100
@@ -312,7 +312,7 @@
     // okay, so we have a SID - but are they allowed to access the story?
     if (!empty ($sid)) {
         $testsid = addslashes ($sid);
-        $result = DB_query ("SELECT trackbackcode FROM {$_TABLES['stories']} WHERE sid = '$testsid'" . COM_getPermSql ('AND') . COM_getTopicSql ('AND'));
+        $result = DB_query ("SELECT trackbackcode FROM {$_TABLES['stories']}, {$_TABLES['topic_assignments']} ta WHERE ta.type = 'article' AND ta.id = sid AND sid = '$testsid'" . COM_getPermSql ('AND') . COM_getTopicSql ('AND', 0, ta));
         if (DB_numRows ($result) == 1) {
             $A = DB_fetchArray ($result);
             if ($A['trackbackcode'] == 0) {



More information about the geeklog-cvs mailing list