mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 06:38:00 +02:00
BC fixes for admin-log detail rendering.
This commit is contained in:
@@ -548,13 +548,24 @@ class admin_log_form_ui extends e_admin_form_ui
|
||||
$text = preg_replace_callback("#\[!(\w+?)(=.+?){0,1}!]#", 'log_process', $curVal);
|
||||
$text = $tp->toHtml($text);
|
||||
|
||||
if(strpos($text,'Array')!==false)
|
||||
if(strpos($text,'Array')!==false || strlen($text)>300)
|
||||
{
|
||||
$id = $this->getController()->getListModel()->get('dblog_id');
|
||||
$ret ="<a class='e-expandit' href='#".$id."'>Details</a>";
|
||||
$ret .= "<div class='hide' id='".$id."'>";
|
||||
$text = str_replace("<br />","\n",$text);
|
||||
$text = str_replace("\","/",$text);
|
||||
|
||||
if(substr($text,0,2) == '\n') // cleanup (not sure of the cause)
|
||||
{
|
||||
$text = substr($text,2);
|
||||
}
|
||||
|
||||
if(substr($text,-2) == '\n') // cleanup (not sure of the cause)
|
||||
{
|
||||
$text = substr($text,0,-2);
|
||||
}
|
||||
|
||||
$text = print_a($text,true);
|
||||
$ret .= $text;
|
||||
$ret .= "</div>";
|
||||
|
Reference in New Issue
Block a user