/**
* Class to hold various commonly used functions
*
- * $Id: Misc.php,v 1.98.2.1 2005/03/01 10:34:12 jollytoad Exp $
+ * $Id: Misc.php,v 1.98.2.2 2005/03/02 09:19:34 jollytoad Exp $
*/
class Misc {
*/
function checkExtraSecurity() {
global $conf;
-
- // Disallowed logins if extra_login_security is enabled. These must be lowercase.
- $bad_usernames = array('pgsql', 'postgres', 'root', 'administrator');
// If extra security is off, return true
if (!$conf['extra_login_security']) return true;
+ // Disallowed logins if extra_login_security is enabled. These must be lowercase.
+ $bad_usernames = array('pgsql', 'postgres', 'root', 'administrator');
+
$server_info = $this->getServerInfo();
if ($server_info['password'] == '') return false;
/**
* Function library read in upon startup
*
- * $Id: lib.inc.php,v 1.92.2.1 2005/03/01 10:42:28 jollytoad Exp $
+ * $Id: lib.inc.php,v 1.92.2.2 2005/03/02 09:19:35 jollytoad Exp $
*/
include_once('decorator.inc.php');
if (isset($_SESSION['webdbLanguage']))
include("./lang/recoded/{$_SESSION['webdbLanguage']}.php");
- // If extra login check fails, back to the login screen
- $_allowed = $misc->checkExtraSecurity();
- if (!$_allowed) {
- include('./login.php');
- exit;
- }
-
// Check database support is properly compiled in
if (!function_exists('pg_connect')) {
echo $lang['strnotloaded'];
# TODO: nice error
}
+ // If extra login check fails, back to the login screen
+ $_allowed = $misc->checkExtraSecurity();
+ if (!$_allowed) {
+ include('./login.php');
+ exit;
+ }
+
$_server_info = $misc->getServerInfo();
// Redirect to the login form if not logged in