r4285 renderAccessDenied(): let calling function decide, if it wants to terminate...
authorDenis Ovsienko <infrastation@yandex.ru>
Fri, 4 Mar 2011 11:21:45 +0000 (11:21 +0000)
committerDenis Ovsienko <infrastation@yandex.ru>
Fri, 4 Mar 2011 11:21:45 +0000 (11:21 +0000)
wwwroot/inc/interface.php

index be0c10416a6bcb3aa6c7556db85596f5dc7ea429..832ab0443d0420fb5d1f93acd144c84b37cea7ec 100644 (file)
@@ -6563,7 +6563,7 @@ function renderMyPreferences ()
 
 
 
-function renderAccessDenied ()
+function renderAccessDenied ($and_exit = TRUE)
 {
        header ('Content-Type: text/html; charset=UTF-8');
        echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">'."\n";
@@ -6598,7 +6598,8 @@ function renderAccessDenied ()
        echo "<tr><td colspan=2 align=center>Click <a href='index.php?logout'>here</a> to logout.</td></tr>\n";
        echo "</table>\n";
        echo "</body></html>";
-       die;
+       if ($and_exit)
+               exit;
 }
 
 function renderMyAccount ()