diff --git a/bureau/admin/adm_var_edit.php b/bureau/admin/adm_var_edit.php index 85f084ad..e0ecbbdc 100644 --- a/bureau/admin/adm_var_edit.php +++ b/bureau/admin/adm_var_edit.php @@ -110,56 +110,64 @@ foreach ( $variables->strata_order as $strata) { break; case 'FQDN_CREATOR': echo ""; - foreach ($allvars['FQDN_CREATOR'] as $ttk => $ttv ) { - if ( isset($ttv[$var]) && is_array( $ttv[$var])) { - echo sprintf(_("Overwritted by %s"), $members[$ttk]['login'])." → "; - echo "".$ttv[$var]['value'].""; - edit_var($ttv[$var]); + if (isset($allvars['FQDN_CREATOR']) && is_array($allvars['FQDN_CREATOR'])) { + foreach ($allvars['FQDN_CREATOR'] as $ttk => $ttv ) { + if ( isset($ttv[$var]) && is_array( $ttv[$var])) { + echo sprintf(_("Overwritted by %s"), $members[$ttk]['login'])." → "; + echo "".$ttv[$var]['value'].""; + edit_var($ttv[$var]); + } + echo "
"; } - echo "
"; - } + } // isset echo ""._("Add").""; add_var($strata, $members_list); echo ""; break; case 'FQDN': echo ""; - foreach ($allvars['FQDN'] as $ttk => $ttv ) { - if ( isset($ttv[$var]) && is_array( $ttv[$var])) { - echo sprintf(_("Overwritted by %s"), $panel_url[$ttk])." → "; - echo "".$ttv[$var]['value'].""; - edit_var($ttv[$var]); + if ( isset($allvars['FQDN']) && is_array($allvars['FQDN'])) { + foreach ($allvars['FQDN'] as $ttk => $ttv ) { + if ( isset($ttv[$var]) && is_array( $ttv[$var])) { + echo sprintf(_("Overwritted by %s"), $panel_url[$ttk])." → "; + echo "".$ttv[$var]['value'].""; + edit_var($ttv[$var]); + } + echo "
"; } - echo "
"; - } + } //isset echo ""._("Add").""; add_var($strata, $panel_url); echo ""; break; case 'CREATOR': echo ""; - foreach ($allvars['CREATOR'] as $ttk => $ttv ) { - if ( isset($ttv[$var]) && is_array( $ttv[$var])) { - echo sprintf(_("Overwritted by %s"), $members[$ttk]['login'])." → "; - echo "".$ttv[$var]['value'].""; - edit_var($ttv[$var]); + if (isset($allvars['CREATOR']) && is_array($allvars['CREATOR'])) { + foreach ($allvars['CREATOR'] as $ttk => $ttv ) { + if ( isset($ttv[$var]) && is_array( $ttv[$var])) { + echo sprintf(_("Overwritted by %s"), $members[$ttk]['login'])." → "; + echo "".$ttv[$var]['value'].""; + edit_var($ttv[$var]); + } + echo "
"; } - echo "
"; - } + } //isset echo ""._("Add").""; add_var($strata, $creators_list ); echo ""; break; case 'MEMBER': echo ""; - foreach ($allvars['MEMBER'] as $ttk => $ttv ) { - if ( isset($ttv[$var]) && is_array( $ttv[$var])) { - echo sprintf(_("Overwritted by %s"), $members[$ttk]['login'])." → "; - echo "".$ttv[$var]['value'].""; - edit_var($ttv[$var]); + if (isset($allvars['MEMBER']) && is_array($allvars['MEMBER'])) { + foreach ($allvars['MEMBER'] as $ttk => $ttv ) { + if ( isset($ttv[$var]) && is_array( $ttv[$var])) { + echo sprintf(_("Overwritted by %s"), $members[$ttk]['login'])." → "; + echo "".$ttv[$var]['value'].""; + edit_var($ttv[$var]); + } + echo "
"; } - echo "
"; - } + } //isset echo ""._("Add").""; add_var($strata, $members_list); echo ""; diff --git a/bureau/class/m_variables.php b/bureau/class/m_variables.php index 5e4fb0c9..ae1e684e 100644 --- a/bureau/class/m_variables.php +++ b/bureau/class/m_variables.php @@ -163,7 +163,7 @@ class m_variables { if (isset($conf[$name])) { return $conf[$name]['value']; } elseif (!is_null($createit_comment)) { - $this->variable_update_or_create($name, $default, 'DEFAULT', null, null, $createit_comment); + $this->variable_update_or_create($name, $default, 'DEFAULT', 'null', 'null', $createit_comment); } return $default; }