Created
June 12, 2012 10:04
-
-
Save Asenar/2916695 to your computer and use it in GitHub Desktop.
afficher les sauts de ligne dans AdminLogs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ svn diff | |
Index: classes/AdminTab.php | |
=================================================================== | |
--- classes/AdminTab.php (revision 15980) | |
+++ classes/AdminTab.php (working copy) | |
@@ -1524,6 +1524,8 @@ | |
echo Tools::displayDate($tr[$key], (int)$cookie->id_lang); | |
elseif (isset($params['type']) AND $params['type'] == 'datetime') | |
echo Tools::displayDate($tr[$key], (int)$cookie->id_lang, true); | |
+ elseif (isset($params['type']) AND $params['type'] == 'log') | |
+ echo nl2br(str_replace('\n', "\n", $tr[$key])); | |
elseif (isset($tr[$key])) | |
{ | |
$echo = ($key == 'price' ? round($tr[$key], 2) : isset($params['maxlength']) ? Tools::substr($tr[$key], 0, $params['maxlength']).'...' : $tr[$key]); | |
Index: admin-dev/tabs/AdminLogs.php | |
=================================================================== | |
--- admin-dev/tabs/AdminLogs.php (revision 15980) | |
+++ admin-dev/tabs/AdminLogs.php (working copy) | |
@@ -42,7 +42,7 @@ | |
$this->fieldsDisplay = array( | |
'id_log' => array('title' => $this->l('ID'), 'align' => 'center', 'width' => 25), | |
'severity' => array('title' => $this->l('Severity (1-4)'), 'align' => 'center', 'width' => 50), | |
- 'message' => array('title' => $this->l('Message'), 'width' => 377), | |
+ 'message' => array('title' => $this->l('Message'), 'width' => 377, 'type' => 'log'), | |
'object_type' => array('title' => $this->l('Object type'), 'width' => 75), | |
'object_id' => array('title' => $this->l('Object ID'), 'width' => 50), | |
'error_code' => array('title' => $this->l('Error code'), 'width' => 75, 'prefix' => '0x'), |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment