projects
/
racktables
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
33bcd1c
)
r2102 + showError(): don't reveal the full path to the file
author
Denis Ovsienko
<infrastation@yandex.ru>
Sat, 2 Aug 2008 22:50:55 +0000
(22:50 +0000)
committer
Denis Ovsienko
<infrastation@yandex.ru>
Sat, 2 Aug 2008 22:50:55 +0000
(22:50 +0000)
inc/interface.php
patch
|
blob
|
blame
|
history
diff --git
a/inc/interface.php
b/inc/interface.php
index bdf263e2e659586cc356764774c460f5e50ab016..798eec631e578717c341b611a79e6f83015b5ca9 100644
(file)
--- a/
inc/interface.php
+++ b/
inc/interface.php
@@
-171,10
+171,14
@@
function renderRow ($row_id = 0)
echo "</td></tr></table>";
}
echo "</td></tr></table>";
}
-function showError ($info = '', $
funcname
= 'N/A')
+function showError ($info = '', $
location
= 'N/A')
{
global $root;
{
global $root;
- echo "<div class=msg_error>An error has occured in [${funcname}]. ";
+ if (preg_match ('/\.php$/', $location))
+ $location = basename ($location);
+ elseif ($location != 'N/A')
+ $location = $location . '()';
+ echo "<div class=msg_error>An error has occured in [${location}]. ";
if (empty ($info))
echo 'No additional information is available.';
else
if (empty ($info))
echo 'No additional information is available.';
else