From 818a1cd4c9a5463203a47ee6d211cd4a11faa2f9 Mon Sep 17 00:00:00 2001 From: e107steved Date: Sat, 8 Dec 2007 14:49:56 +0000 Subject: [PATCH] Bugtracker #4244 - trackback caching related - thanks Shirka --- comment.php | 16 +++++++++------- e107_plugins/trackback/trackbackClass.php | 16 ++++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) diff --git a/comment.php b/comment.php index 22f50335c..a811890f3 100644 --- a/comment.php +++ b/comment.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/comment.php,v $ -| $Revision: 1.3 $ -| $Date: 2007-08-17 19:23:26 $ +| $Revision: 1.4 $ +| $Date: 2007-12-08 14:49:44 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -325,11 +325,6 @@ $field = ($field ? $field : ($id ? $id : "")); $width = (isset($width) && $width ? $width : ""); $cobj->compose_comment($table, $action, $field, $width, $subject, $rate=FALSE); -if (!strstr(e_QUERY, "poll")) { - $cache = ob_get_contents(); - $e107cache->set("comment.php?{$table}.{$field}", $cache); -} -if ($comment_ob_start) ob_end_flush(); // dump the buffer we started if(isset($pref['trackbackEnabled']) && $pref['trackbackEnabled'] && $table == "news"){ @@ -372,6 +367,13 @@ if(isset($pref['trackbackEnabled']) && $pref['trackbackEnabled'] && $table == "n } } +if (!strstr(e_QUERY, "poll")) +{ + $cache = ob_get_contents(); + $e107cache->set("comment.php?{$table}.{$field}", $cache); +} +if ($comment_ob_start) ob_end_flush(); // dump the buffer we started + require_once(FOOTERF); diff --git a/e107_plugins/trackback/trackbackClass.php b/e107_plugins/trackback/trackbackClass.php index 31b2daa9d..af3c1fa3e 100644 --- a/e107_plugins/trackback/trackbackClass.php +++ b/e107_plugins/trackback/trackbackClass.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/trackback/trackbackClass.php,v $ -| $Revision: 1.2 $ -| $Date: 2007-01-29 20:23:49 $ +| $Revision: 1.3 $ +| $Date: 2007-12-08 14:49:44 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -152,10 +152,14 @@ class trackbackClass if(!$errorMessage) { - if(!$sql -> db_Insert("trackback", "0, $pid, '$title', '$excerpt', '$permLink', '$blog_name' ")) - { - $errorMessage = "Unable to enter your trackback information into the database -> 0, $pid, '$title', '$excerpt', '$permLink', '$blog_name'"; - } + if(!$sql -> db_Insert("trackback", "0, {$pid}, '{$title}', '{$excerpt}', '{$permLink}', '{$blog_name}' ")) + { + $errorMessage = "Unable to enter your trackback information into the database -> 0, {$pid}, '{$title}', '{$excerpt}', '{$permLink}', '{$blog_name}'"; + } + else + { + e107cache->clear("comment.php?news.{$pid}"); + } } if($errorMessage)