1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-20 12:41:51 +02:00

BC fixes for admin-log detail rendering.

This commit is contained in:
Cameron 2014-01-12 05:34:48 -08:00
parent 3b65f464a0
commit 3d78256104
2 changed files with 14 additions and 1 deletions

View File

@ -680,6 +680,8 @@ if (isset($pref['modules']) && $pref['modules']) {
}
*/
$sql->db_Mark_Time('Start: Load Plugin Modules');
$js_body_onload = array(); // Initialise this array in case a module wants to add to it
// Load e_modules after all the constants, but before the themes, so they can be put to use.

View File

@ -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("&#092;","/",$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>";