diff options
author | Andreas Unterkircher <unki@netshadow.at> | 2008-12-29 21:58:40 +0100 |
---|---|---|
committer | Andreas Unterkircher <unki@netshadow.at> | 2008-12-29 21:58:40 +0100 |
commit | aba6c296dfc51ab43844d78bd0377f54311a3b3d (patch) | |
tree | d2257150de3905518ff7588dab9948c79189ee8c /phpfspot.class.php | |
parent | 6d308fdcab044c2798d7c915c8d6fdf5b3fc3245 (diff) |
if _error() is invoked from cmd-line, it should not display html-errors
Signed-off-by: Andreas Unterkircher <unki@netshadow.at>
Diffstat (limited to 'phpfspot.class.php')
-rw-r--r-- | phpfspot.class.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/phpfspot.class.php b/phpfspot.class.php index 4acb647..f3f78a7 100644 --- a/phpfspot.class.php +++ b/phpfspot.class.php @@ -2061,7 +2061,7 @@ class PHPFSPOT { $full_path = $this->translate_path($this->parse_uri($details['uri'], 'fullpath')); if(!file_exists($full_path)) { - $this->_error("File ". $full_path ." does not exist\n"); + $this->_error("File ". $full_path ." does not exist"); return; } @@ -2578,8 +2578,12 @@ class PHPFSPOT { switch($this->cfg->logging) { default: case 'display': - print "<img src=\"resources/green_info.png\" alt=\"warning\" />\n"; - print $text ."<br />\n"; + if(isset($this->fromcmd)) + print $text ."\n"; + else { + print "<img src=\"resources/green_info.png\" alt=\"warning\" />\n"; + print $text ."<br />\n"; + } break; case 'errorlog': error_log($text); |