mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 03:40:37 +02:00
Correct News URL to include SEF Url on print page. Hide print button during print. Made debug backtrace info more useful on SQL details.
This commit is contained in:
@@ -155,8 +155,8 @@ class e107_db_debug {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Record Basic query info
|
// Record Basic query info
|
||||||
$sCallingFile = varset($aTrace[1]['file']);
|
$sCallingFile = varset($aTrace[2]['file']);
|
||||||
$sCallingLine = varset($aTrace[1]['line']);
|
$sCallingLine = varset($aTrace[2]['line']);
|
||||||
|
|
||||||
$t = &$this->aSQLdetails[$sql->db_QueryCount()];
|
$t = &$this->aSQLdetails[$sql->db_QueryCount()];
|
||||||
$t['marker'] = $this->curTimeMark;
|
$t['marker'] = $this->curTimeMark;
|
||||||
@@ -270,10 +270,11 @@ class e107_db_debug {
|
|||||||
{
|
{
|
||||||
if ($cQuery['ok']) {
|
if ($cQuery['ok']) {
|
||||||
$text .= "<tr><td class='forumheader3' style='text-align:right'>{$idx} </td>
|
$text .= "<tr><td class='forumheader3' style='text-align:right'>{$idx} </td>
|
||||||
<td class='forumheader3' style='text-align:right'>".number_format($cQuery['time'] * 1000.0, 4)." </td><td class='forumheader3'>".$cQuery['query'].'<br />['.$cQuery['marker']." - ".$cQuery['caller']."]</td></tr>\n";
|
<td class='forumheader3' style='text-align:right'>".number_format($cQuery['time'] * 1000.0, 4)." </td>
|
||||||
|
<td class='forumheader3'>".$cQuery['query'].'<br />['.$cQuery['marker']." - ".$cQuery['caller']."]</td></tr>\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$text .= "\n</table><br />\n";
|
$text .= "\n</table><br />\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -291,7 +292,9 @@ class e107_db_debug {
|
|||||||
$text .= "<tr><td class='forumheader3' ><b>Error in query:</b></td></tr>\n<tr><td class='forumheader3'>".$cQuery['error']."</td></tr>\n";
|
$text .= "<tr><td class='forumheader3' ><b>Error in query:</b></td></tr>\n<tr><td class='forumheader3'>".$cQuery['error']."</td></tr>\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
$text .= "<tr><td class='forumheader3' colspan='".$cQuery['nFields']."'><b>Query time:</b> ".number_format($cQuery['time'] * 1000.0, 4).' (ms)</td></tr></table><br />'."\n";
|
$text .= "<tr><td class='forumheader3' colspan='".$cQuery['nFields']."'><b>Query time:</b> ".number_format($cQuery['time'] * 1000.0, 4).' (ms)</td></tr>';
|
||||||
|
|
||||||
|
$text .= '</table><br />'."\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -59,6 +59,7 @@ else
|
|||||||
$con = new convert;
|
$con = new convert;
|
||||||
$sql->db_Select("news", "*", "news_id='{$parms}'");
|
$sql->db_Select("news", "*", "news_id='{$parms}'");
|
||||||
$row = $sql->db_Fetch();
|
$row = $sql->db_Fetch();
|
||||||
|
$newsUrl = e107::getUrl()->create('news/view/item', $row, 'full=1');
|
||||||
extract($row);
|
extract($row);
|
||||||
define("e_PAGETITLE", $news_title);
|
define("e_PAGETITLE", $news_title);
|
||||||
$news_body = $tp->toHTML($news_body, TRUE, 'BODY');
|
$news_body = $tp->toHTML($news_body, TRUE, 'BODY');
|
||||||
@@ -93,8 +94,11 @@ else
|
|||||||
$print_text .= "<br /><br /></span><hr />".
|
$print_text .= "<br /><br /></span><hr />".
|
||||||
LAN_PRINT_303.SITENAME."
|
LAN_PRINT_303.SITENAME."
|
||||||
<br />
|
<br />
|
||||||
( http://".$_SERVER['HTTP_HOST'].e_HTTP."news.php?extend.".$news_id." )
|
( ".$newsUrl." )
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -119,7 +123,7 @@ else
|
|||||||
<div style='background-color:white'>
|
<div style='background-color:white'>
|
||||||
<div style='text-align:".$align."'>".$tp->parseTemplate("{LOGO}", TRUE)."</div><hr /><br />
|
<div style='text-align:".$align."'>".$tp->parseTemplate("{LOGO}", TRUE)."</div><hr /><br />
|
||||||
<div style='text-align:".$align."'>".$print_text."</div><br /><br />
|
<div style='text-align:".$align."'>".$print_text."</div><br /><br />
|
||||||
<form action=''><div style='text-align:center'><input type='button' value='".LAN_PRINT_307."' onclick='window.print()' /></div></form></div>";
|
<form action=''><div class='hidden-print' style='text-align:center'><input class='btn btn-primary ' type='button' value='".LAN_PRINT_307."' onclick='window.print()' /></div></form></div>";
|
||||||
}
|
}
|
||||||
require_once(FOOTERF);
|
require_once(FOOTERF);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user