Merge branch 'stable'

This commit is contained in:
following
2013-03-23 12:47:48 +01:00
15 changed files with 94 additions and 27 deletions

View File

@@ -37,8 +37,9 @@ function __autoload($class_name)
fix_magic_quotes_gpc();
// set options
require($opt['rootpath'] . 'config2/settings-dist.inc.php');
require($opt['rootpath'] . 'config2/settings.inc.php');
require_once($opt['rootpath'] . 'lib2/logic/const.inc.php');
require_once($opt['rootpath'] . 'config2/settings-dist.inc.php');
require_once($opt['rootpath'] . 'config2/settings.inc.php');
set_domain();
@@ -81,7 +82,6 @@ function __autoload($class_name)
$tpl = new OcSmarty();
// include all we need
require_once($opt['rootpath'] . 'lib2/logic/const.inc.php');
require_once($opt['rootpath'] . 'lib2/logic/geomath.class.php');
require_once($opt['rootpath'] . 'lib2/error.inc.php');
require_once($opt['rootpath'] . 'lib2/util.inc.php');

View File

@@ -881,16 +881,24 @@
global $tpl, $opt, $db;
global $bSmartyNoTranslate;
if ($db['error'] == true)
die("sql_error() recursion, aborting!\nCheck if database connect does work.\nMost often, an error mail tried to load translations from database.\nMySQL Error no " . mysql_errno() . "\n");
$db['error'] = true;
$errno = mysql_errno();
$error = mysql_error();
if ($sqlstatement != "")
$error .= "\n\nSQL statement: " . $sqlstatement;
if ($db['error'] == true)
{
// datbase error recursion, because another error occured while trying to
// build the error template (e.g. because connection was lost, or an error mail
// could not load translations from database)
$dberrmsg = 'MySQL error (' . $errno . '): ' . $error;
require("html/dberror.php");
exit;
}
$db['error'] = true;
if ($db['connected'] == false)
$bSmartyNoTranslate = true;
@@ -932,7 +940,7 @@
{
// CLI script, simple text output
if ($opt['db']['error']['display'] == true)
die('MySQL error' . ' (' . $errno . '): ' . $error . "\n");
die('MySQL error (' . $errno . '): ' . $error . "\n");
else
die("A database command could not be performed.\n");
}

View File

@@ -75,7 +75,7 @@ class user
$this->reUser->addBoolean('no_htmledit_flag', false, false);
$this->reUser->addInt('notify_radius', 0, false);
$this->reUser->addInt('admin', 0, false);
$this->reUser->addInt('data_license', $opt['logic']['license'], false);
$this->reUser->addInt('data_license', $opt['logic']['license']['newusers'], false);
$this->reUser->addInt('node', 0, false);
$this->reUserStat = new rowEditor('stat_user');