diff options
author | Urban Müller | 2007-10-08 16:14:46 +0000 |
---|---|---|
committer | Urban Müller | 2007-10-08 16:14:46 +0000 |
commit | 900161934f56155c3558496901210ae2ef215d46 (patch) | |
tree | 5941c08c78d173f9698bb49357a9b18b1f3f4fee | |
parent | 46fb3f3c3f803c27a6270f21f33aa180da5ec22a (diff) | |
download | itools-900161934f56155c3558496901210ae2ef215d46.tar.gz itools-900161934f56155c3558496901210ae2ef215d46.tar.bz2 itools-900161934f56155c3558496901210ae2ef215d46.zip |
correct it::error address fallback
-rw-r--r-- | it.class | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -117,7 +117,8 @@ function timerlog($label = '') /** - * Send verbose error report to browser or (if display_errors is off) by email to .diffnotice guys. All params optional. + * Send verbose error report to browser or (if display_errors is off) by email to .diffnotice gods, SERVER_ADMIN or current user + * All params optional. Single string parameter means 'title'. * @parma $p['title'] error title, one line * @param $p['body'] error body, multiline * @param $p['to'] comma separated recipient list @@ -127,7 +128,7 @@ function timerlog($label = '') * @param $p['backtraceskip'] number of stack levels to drop * @param $p['blockmail'] number of seconds to block mails after having sent a mail [3600] */ -function error($p = array(), $body = "", $to = "") +function error($p = array(), $body = null, $to = null) # $body and $to deprecated { if (!is_array($p)) $p = array('title' => $p, 'body' => $body, 'to' => $to); @@ -138,6 +139,8 @@ function error($p = array(), $body = "", $to = "") $url = $_SERVER['SCRIPT_NAME']; $gods = strtr(trim(@file_get_contents($GLOBALS['ULTRAHOME'] . "/.diffnotice")), array("\n"=>', ')); + if (!$p['to']) + unset($p['to']); # allow defaults to kick in $p += array( 'title' => "it::error", 'to' => $gods ? $gods : ($_SERVER['SERVER_ADMIN'] ? $_SERVER['SERVER_ADMIN'] : get_current_user()), |