migrated a few functions to new Settings class and removed unused function createAWStatsVhost(), refs #1325

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-12-15 13:05:19 +01:00
parent 558108008a
commit 52aaedd33a
15 changed files with 85 additions and 177 deletions

View File

@@ -17,20 +17,20 @@
*
*/
function checkUsername($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues)
{
global $settings, $theme;
if(!isset($allnewfieldvalues['customer_mysqlprefix']))
{
$allnewfieldvalues['customer_mysqlprefix'] = $settings['customer']['mysqlprefix'];
function checkUsername($fieldname, $fielddata, $newfieldvalue, $allnewfieldvalues) {
if (!isset($allnewfieldvalues['customer_mysqlprefix'])) {
$allnewfieldvalues['customer_mysqlprefix'] = Settings::Get('customer.mysqlprefix');
}
$returnvalue = array();
if(validateUsername($newfieldvalue, $settings['panel']['unix_names'], 14 - strlen($allnewfieldvalues['customer_mysqlprefix'])) === true)
{
if (validateUsername(
$newfieldvalue,
Settings::Get('panel.unix_names'),
14 - strlen($allnewfieldvalues['customer_mysqlprefix'])) === true
) {
$returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_OK);
}
else
{
} else {
$returnvalue = array(FORMFIELDS_PLAUSIBILITY_CHECK_ERROR, 'accountprefixiswrong');
}
return $returnvalue;