mirror of
https://github.com/e107inc/e107.git
synced 2025-04-22 13:41:52 +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:
parent
c9fa22c5a0
commit
bf4649e171
@ -155,8 +155,8 @@ class e107_db_debug {
|
||||
}
|
||||
|
||||
// Record Basic query info
|
||||
$sCallingFile = varset($aTrace[1]['file']);
|
||||
$sCallingLine = varset($aTrace[1]['line']);
|
||||
$sCallingFile = varset($aTrace[2]['file']);
|
||||
$sCallingLine = varset($aTrace[2]['line']);
|
||||
|
||||
$t = &$this->aSQLdetails[$sql->db_QueryCount()];
|
||||
$t['marker'] = $this->curTimeMark;
|
||||
@ -270,10 +270,11 @@ class e107_db_debug {
|
||||
{
|
||||
if ($cQuery['ok']) {
|
||||
$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' 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;
|
||||
$sql->db_Select("news", "*", "news_id='{$parms}'");
|
||||
$row = $sql->db_Fetch();
|
||||
$newsUrl = e107::getUrl()->create('news/view/item', $row, 'full=1');
|
||||
extract($row);
|
||||
define("e_PAGETITLE", $news_title);
|
||||
$news_body = $tp->toHTML($news_body, TRUE, 'BODY');
|
||||
@ -93,8 +94,11 @@ else
|
||||
$print_text .= "<br /><br /></span><hr />".
|
||||
LAN_PRINT_303.SITENAME."
|
||||
<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='text-align:".$align."'>".$tp->parseTemplate("{LOGO}", TRUE)."</div><hr /><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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user