]> git.mjollnir.org Git - s9y.git/commitdiff
No longer accept trackbacks to draft entries.Thanks to j_b_poquelin
authorgarvinhicking <garvinhicking>
Thu, 15 Feb 2007 08:46:23 +0000 (08:46 +0000)
committergarvinhicking <garvinhicking>
Thu, 15 Feb 2007 08:46:23 +0000 (08:46 +0000)
docs/NEWS
include/functions_comments.inc.php

index 61bbd515d8aeb26acfd95063b56222021e921f04..02c59bd0d9f5abbb0fad5798a7ce2b7b2bbc0103 100644 (file)
--- a/docs/NEWS
+++ b/docs/NEWS
@@ -3,6 +3,9 @@
 Version 1.2 ()
 ------------------------------------------------------------------------
 
+    * No longer accept trackbacks to draft entries.Thanks to j_b_poquelin 
+      (garvinhicking)
+
     * Do not store an unnecessary config value for check_password
       and password user properties. Thanks to jenzo from the forums!
       (garvinhicking)
index f09e8355a0e68030f4ff3905915fba4a7587fc44..0d0a982ba25a2adb6e1470d7034d680abc3c0734 100644 (file)
@@ -561,7 +561,9 @@ function serendipity_saveComment($id, $commentInfo, $type = 'NORMAL', $source =
         $query = "SELECT a.email, e.title, a.mail_comments, a.mail_trackbacks
                  FROM {$serendipity['dbPrefix']}entries e, {$serendipity['dbPrefix']}authors a
                  WHERE e.id  = '". (int)$id ."'
-                 AND e.authorid = a.authorid";
+                   AND e.isdraft = 'false'
+                   AND e.timestamp <= " . time() . "
+                   AND e.authorid = a.authorid";
         $row = serendipity_db_query($query, true); // Get info on author/entry
         if (!is_array($row) || empty($id)) {
             // No associated entry found.