1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

Bugtracker #4137 (trackback on extended news) hopefully resolved

This commit is contained in:
e107steved
2007-11-08 21:06:03 +00:00
parent 2daa724efc
commit 25404b692e
2 changed files with 18 additions and 12 deletions

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/news_shortcodes.php,v $ | $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/news_shortcodes.php,v $
| $Revision: 1.5 $ | $Revision: 1.6 $
| $Date: 2007-11-08 20:48:48 $ | $Date: 2007-11-08 21:06:03 $
| $Author: e107steved $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -269,7 +269,7 @@ SC_END
SC_BEGIN TRACKBACK SC_BEGIN TRACKBACK
global $pref; global $pref;
if(varsettrue($pref['trackbackEnabled'])) return ''; if(!varsettrue($pref['trackbackEnabled'])) return '';
$news_item = getcachedvars('current_news_item'); $news_item = getcachedvars('current_news_item');
$param = getcachedvars('current_news_param'); $param = getcachedvars('current_news_param');
return ($param['trackbackbeforestring'] ? $param['trackbackbeforestring'] : "")."<a href='".e_BASE."comment.php?comment.news.".$news_item['news_id']."#track'>".$param['trackbackstring'].$news_item['tb_count']."</a>".($param['trackbackafterstring'] ? $param['trackbackafterstring'] : ""); return ($param['trackbackbeforestring'] ? $param['trackbackbeforestring'] : "")."<a href='".e_BASE."comment.php?comment.news.".$news_item['news_id']."#track'>".$param['trackbackstring'].$news_item['tb_count']."</a>".($param['trackbackafterstring'] ? $param['trackbackafterstring'] : "");

View File

@@ -11,8 +11,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/news.php,v $ | $Source: /cvs_backup/e107_0.8/news.php,v $
| $Revision: 1.8 $ | $Revision: 1.9 $
| $Date: 2007-10-15 19:16:04 $ | $Date: 2007-11-08 21:06:03 $
| $Author: e107steved $ | $Author: e107steved $
+----------------------------------------------------------------------------+ +----------------------------------------------------------------------------+
*/ */
@@ -145,7 +145,7 @@ if ($action == 'cat' || $action == 'all')
<td style='vertical-align:top;padding:3px;width:20px'> <td style='vertical-align:top;padding:3px;width:20px'>
{NEWSCATICON} {NEWSCATICON}
</td><td style='text-align:left;padding:3px'> </td><td style='text-align:left;padding:3px'>
{NEWSTITLELINK} {NEWSTITLELINK=extend}
<br /> <br />
{NEWSSUMMARY} {NEWSSUMMARY}
<span class='smalltext'> <span class='smalltext'>
@@ -179,6 +179,10 @@ if ($action == 'cat' || $action == 'all')
{ {
$NEWSLISTTITLE = LAN_NEWS_82." '".$tp->toHTML($category_name,FALSE,"TITLE")."'"; $NEWSLISTTITLE = LAN_NEWS_82." '".$tp->toHTML($category_name,FALSE,"TITLE")."'";
} }
else
{
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,"TITLE"),$NEWSLISTTITLE);
}
ob_start(); ob_start();
$ns->tablerender($NEWSLISTTITLE, $text); $ns->tablerender($NEWSLISTTITLE, $text);
@@ -195,7 +199,8 @@ if ($action == 'cat' || $action == 'all')
//------------------------------------------------------ //------------------------------------------------------
if ($action == "extend") if ($action == "extend")
{ // --> Cache { // --> Cache
if($tmp = checkCache($cacheString)){ if($tmp = checkCache($cacheString))
{
require_once(HEADERF); require_once(HEADERF);
renderCache($tmp, TRUE); renderCache($tmp, TRUE);
} }
@@ -209,7 +214,8 @@ if ($action == "extend")
LEFT JOIN #trackback AS tb ON tb.trackback_pid = n.news_id LEFT JOIN #trackback AS tb ON tb.trackback_pid = n.news_id
WHERE n.news_id=".intval($sub_action)." AND n.news_class REGEXP '".e_CLASS_REGEXP."' WHERE n.news_id=".intval($sub_action)." AND n.news_class REGEXP '".e_CLASS_REGEXP."'
AND NOT (n.news_class REGEXP ".$nobody_regexp.") AND NOT (n.news_class REGEXP ".$nobody_regexp.")
AND n.news_start < ".time()." AND (n.news_end=0 || n.news_end>".time().") "; AND n.news_start < ".time()." AND (n.news_end=0 || n.news_end>".time().")
GROUP by n.news_id";
} }
else else
{ {