refactoring
This commit is contained in:
parent
93e69bfb4c
commit
6ec7fb87f3
|
@ -532,10 +532,12 @@ function buildUploadAccounts($type, $data, $ids, $selectedModules) {
|
|||
}
|
||||
}
|
||||
if (sizeof($errors) > 0) {
|
||||
for ($i = 0; (($i < sizeof($errors)) || ($i > 49)); $i++) call_user_func_array("StatusMessage", $errors[$i]);
|
||||
for ($i = 0; (($i < sizeof($errors)) || ($i > 49)); $i++) {
|
||||
call_user_func_array("StatusMessage", $errors[$i]);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
else return $partialAccounts;
|
||||
return $partialAccounts;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -475,7 +475,7 @@ class courierMailAccount extends baseModule {
|
|||
'description' => _('Home directory'),
|
||||
'help' => 'homeDirectory',
|
||||
'example' => _('/home/smiller'),
|
||||
'required' => 'true'
|
||||
'required' => true
|
||||
);
|
||||
}
|
||||
return $return;
|
||||
|
|
|
@ -248,7 +248,7 @@ By default, the nodes are configured as H-Nodes which fits for small networks. I
|
|||
'help' => 'subnet',
|
||||
'example' => '192.168.10.0',
|
||||
'required' => true,
|
||||
'unique' => 'true'
|
||||
'unique' => true
|
||||
),
|
||||
array(
|
||||
'name' => 'dhcp_settings_domainName',
|
||||
|
|
|
@ -161,7 +161,7 @@ class eduPerson extends baseModule {
|
|||
'description' => _('Principal name'),
|
||||
'help' => 'eduPersonPrincipalName',
|
||||
'example' => _('user@company.com'),
|
||||
'unique' => 'true'
|
||||
'unique' => true
|
||||
),
|
||||
array(
|
||||
'name' => 'eduPerson_primaryAffiliation',
|
||||
|
|
|
@ -140,7 +140,7 @@ if ($_FILES['inputfile'] && ($_FILES['inputfile']['size'] > 0)) {
|
|||
$checkcolumns = array();
|
||||
$columns = call_user_func_array('array_merge', $columns);
|
||||
for ($i = 0; $i < sizeof($columns); $i++) {
|
||||
if (isset($columns[$i]['required']) && ($columns[$i]['required'] == true)) {
|
||||
if (isset($columns[$i]['required']) && ($columns[$i]['required'] === true)) {
|
||||
if (isset($ids[$columns[$i]['name']])) $checkcolumns[] = $ids[$columns[$i]['name']];
|
||||
else $errors[] = array(_("A required column is missing in your CSV file."), $columns[$i]['name']);
|
||||
}
|
||||
|
@ -201,7 +201,7 @@ if ($_FILES['inputfile'] && ($_FILES['inputfile']['size'] > 0)) {
|
|||
// let modules build accounts
|
||||
else {
|
||||
$accounts = buildUploadAccounts($type, $data, $ids, $selectedModules);
|
||||
if ($accounts != false) {
|
||||
if ($accounts !== false) {
|
||||
$rdnList = getRDNAttributes($type->getId(), $selectedModules);
|
||||
$suffix = $type->getSuffix();
|
||||
// set DN
|
||||
|
|
|
@ -382,7 +382,7 @@ function showMainPage(\LAM\TYPES\ConfiguredType $type, $selectedModules) {
|
|||
$columnContainer->addElement(new htmlSpacer(null, '10px'), true);
|
||||
$module = moduleCache::getModule($modules[$m], $scope);
|
||||
$icon = $module->getIcon();
|
||||
if (($icon != null) && !(strpos($icon, 'http') === 0) && !(strpos($icon, '/') === 0)) {
|
||||
if (!empty($icon) && !(strpos($icon, 'http') === 0) && !(strpos($icon, '/') === 0)) {
|
||||
$icon = '../../graphics/' . $icon;
|
||||
}
|
||||
$moduleTitle = new htmlSubTitle(getModuleAlias($modules[$m], $scope), $icon);
|
||||
|
@ -413,7 +413,7 @@ function showMainPage(\LAM\TYPES\ConfiguredType $type, $selectedModules) {
|
|||
$odd = true;
|
||||
for ($i = 0; $i < sizeof($columns[$modules[$m]]); $i++) {
|
||||
$required = false;
|
||||
if (isset($columns[$modules[$m]][$i]['required']) && ($columns[$modules[$m]][$i]['required'] == true)) {
|
||||
if (isset($columns[$modules[$m]][$i]['required']) && ($columns[$modules[$m]][$i]['required'] === true)) {
|
||||
$required = true;
|
||||
}
|
||||
$rowCells = array();
|
||||
|
|
Loading…
Reference in New Issue