Minor - fix php notices

pull/3308/head
Julio Montoya 5 years ago
parent 319ffb64cd
commit 4e7efd94c5
  1. 6
      plugin/add_cas_login_button/plugin.php
  2. 8
      plugin/add_cas_logout_button/plugin.php
  3. 3
      plugin/add_facebook_login_button/plugin.php
  4. 9
      plugin/add_shibboleth_login_button/plugin.php
  5. 12
      plugin/ext_auth_chamilo_logout_button_behaviour/plugin.php
  6. 3
      plugin/formLogin_hide_unhide/plugin.php

@ -32,9 +32,15 @@ $tab_default_add_cas_login_button_cas_button_label = api_get_setting('add_cas_lo
$tab_default_add_cas_login_button_cas_button_comment = api_get_setting('add_cas_login_button_cas_button_comment');
$tab_default_add_cas_login_button_cas_image_url = api_get_setting('add_cas_login_button_cas_image_url');
$defaults = [];
if ($tab_default_add_cas_login_button_cas_button_label) {
$defaults['cas_button_label'] = $tab_default_add_cas_login_button_cas_button_label['add_cas_login_button'];
}
if ($tab_default_add_cas_login_button_cas_button_comment) {
$defaults['cas_button_comment'] = $tab_default_add_cas_login_button_cas_button_comment['add_cas_login_button'];
}
if ($tab_default_add_cas_login_button_cas_image_url) {
$defaults['cas_image_url'] = $tab_default_add_cas_login_button_cas_image_url['add_cas_login_button'];
}
$form->setDefaults($defaults);
//display form
$plugin_info['settings_form'] = $form;

@ -30,9 +30,17 @@ $form->addButtonSave(get_lang('Save'), 'submit_button');
$tab_default_add_cas_logout_button_cas_logout_label = api_get_setting('add_cas_logout_button_cas_logout_label');
$tab_default_add_cas_logout_button_cas_logout_comment = api_get_setting('add_cas_logout_button_cas_logout_comment');
$tab_default_add_cas_logout_button_cas_logout_image_url = api_get_setting('add_cas_logout_button_cas_logout_image_url');
if ($tab_default_add_cas_logout_button_cas_logout_label) {
$defaults['cas_logout_label'] = $tab_default_add_cas_logout_button_cas_logout_label['add_cas_logout_button'];
}
if ($tab_default_add_cas_logout_button_cas_logout_comment) {
$defaults['cas_logout_comment'] = $tab_default_add_cas_logout_button_cas_logout_comment['add_cas_logout_button'];
}
if ($tab_default_add_cas_logout_button_cas_logout_image_url) {
$defaults['cas_logout_image_url'] = $tab_default_add_cas_logout_button_cas_logout_image_url['add_cas_logout_button'];
}
$form->setDefaults($defaults);
//display form
$plugin_info['settings_form'] = $form;

@ -33,7 +33,10 @@ $form->addButtonSave(get_lang('Save'), 'submit_button');
$tab_default_add_facebook_login_button_facebook_button_url = api_get_setting(
'add_facebook_login_button_facebook_button_url'
);
if ($tab_default_add_facebook_login_button_facebook_button_url) {
$defaults['facebook_button_url'] = $tab_default_add_facebook_login_button_facebook_button_url['add_facebook_login_button'];
}
$form->setDefaults($defaults);
//display form
$plugin_info['settings_form'] = $form;

@ -52,9 +52,18 @@ $tab_default_add_shibboleth_login_button_shibboleth_image_url = api_get_setting(
'add_shibboleth_login_button_shibboleth_image_url'
);
$defaults = [];
if ($tab_default_add_shibboleth_login_button_shibboleth_button_label) {
$defaults['shibboleth_button_label'] = $tab_default_add_shibboleth_login_button_shibboleth_button_label['add_shibboleth_login_button'];
}
if ($tab_default_add_shibboleth_login_button_shibboleth_button_comment) {
$defaults['shibboleth_button_comment'] = $tab_default_add_shibboleth_login_button_shibboleth_button_comment['add_shibboleth_login_button'];
}
if ($tab_default_add_shibboleth_login_button_shibboleth_image_url) {
$defaults['shibboleth_image_url'] = $tab_default_add_shibboleth_login_button_shibboleth_image_url['add_shibboleth_login_button'];
}
$form->setDefaults($defaults);
//display form
$plugin_info['settings_form'] = $form;

@ -36,11 +36,23 @@ $tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_infobulle
$tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_image = api_get_setting('ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_image');
$tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_alert_onoff = api_get_setting('ext_auth_chamilo_logout_button_behaviour_eaclbb_form_alert_onoff');
$tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_alert_text = api_get_setting('ext_auth_chamilo_logout_button_behaviour_eaclbb_form_alert_text');
if ($tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_url) {
$defaults['eaclbb_form_link_url'] = $tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_url['eaclbb_form_link_url'];
}
if ($tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_infobulle) {
$defaults['eaclbb_form_link_infobulle'] = $tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_infobulle['eaclbb_form_link_infobulle'];
}
if ($tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_image) {
$defaults['eaclbb_form_link_image'] = $tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_image['eaclbb_form_link_image'];
}
if ($tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_alert_onoff) {
$defaults['eaclbb_form_alert_onoff'] = $tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_alert_onoff['eaclbb_form_alert_onoff'];
}
if ($tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_alert_text) {
$defaults['eaclbb_form_alert_text'] = $tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_alert_text['eaclbb_form_alert_text'];
}
$form->setDefaults($defaults);
//display form
$plugin_info['settings_form'] = $form;

@ -27,7 +27,10 @@ $form->addElement('text', 'label', 'Text label', '');
//get default value
$tab_default_formLogin_hide_unhide_label = api_get_setting('formLogin_hide_unhide_label');
$defaults = [];
if ($tab_default_formLogin_hide_unhide_label) {
$defaults['label'] = $tab_default_formLogin_hide_unhide_label['formLogin_hide_unhide'];
}
$form->setDefaults($defaults);
//display form
$plugin_info['settings_form'] = $form;

Loading…
Cancel
Save