diff options
Diffstat (limited to 'inc/common.php')
-rw-r--r-- | inc/common.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/inc/common.php b/inc/common.php index c321bce82..636b26f0b 100644 --- a/inc/common.php +++ b/inc/common.php @@ -140,12 +140,14 @@ function buildAttributes($params){ * @author Andreas Gohr <andi@splitbrain.org> * @see html_msgarea */ -function msg($message,$lvl=0){ +function msg($message,$lvl=0,$line='',$file=''){ global $MSG; $errors[-1] = 'error'; $errors[0] = 'info'; $errors[1] = 'success'; + if($line || $file) $message.=' ['.basename($file).':'.$line.']'; + if(!headers_sent()){ if(!isset($MSG)) $MSG = array(); $MSG[]=array('lvl' => $errors[$lvl], 'msg' => $message); |