mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-10 01:52:22 +03:00
Fix the array-unpack PHP error during installation
This commit is contained in:
parent
58f53b1a66
commit
faa66723f9
1 changed files with 44 additions and 8 deletions
|
@ -26,36 +26,72 @@ class Migration_Add_ldap_rows_to_settings_table extends EA_Migration
|
|||
];
|
||||
|
||||
if (!$this->db->get_where('settings', ['name' => 'ldap_is_active'])->num_rows()) {
|
||||
$this->db->insert('settings', [...$timestamps, 'name' => 'ldap_is_active', 'value' => '0']);
|
||||
$this->db->insert('settings', [
|
||||
'create_datetime' => $timestamps['create_datetime'],
|
||||
'update_datetime' => $timestamps['update_datetime'],
|
||||
'name' => 'ldap_is_active',
|
||||
'value' => '0',
|
||||
]);
|
||||
}
|
||||
|
||||
if (!$this->db->get_where('settings', ['name' => 'ldap_host'])->num_rows()) {
|
||||
$this->db->insert('settings', [...$timestamps, 'name' => 'ldap_host', 'value' => '']);
|
||||
$this->db->insert('settings', [
|
||||
'create_datetime' => $timestamps['create_datetime'],
|
||||
'update_datetime' => $timestamps['update_datetime'],
|
||||
'name' => 'ldap_host',
|
||||
'value' => '',
|
||||
]);
|
||||
}
|
||||
|
||||
if (!$this->db->get_where('settings', ['name' => 'ldap_port'])->num_rows()) {
|
||||
$this->db->insert('settings', [...$timestamps, 'name' => 'ldap_port', 'value' => '']);
|
||||
$this->db->insert('settings', [
|
||||
'create_datetime' => $timestamps['create_datetime'],
|
||||
'update_datetime' => $timestamps['update_datetime'],
|
||||
'name' => 'ldap_port',
|
||||
'value' => '',
|
||||
]);
|
||||
}
|
||||
|
||||
if (!$this->db->get_where('settings', ['name' => 'ldap_user_dn'])->num_rows()) {
|
||||
$this->db->insert('settings', [...$timestamps, 'name' => 'ldap_user_dn', 'value' => '']);
|
||||
$this->db->insert('settings', [
|
||||
'create_datetime' => $timestamps['create_datetime'],
|
||||
'update_datetime' => $timestamps['update_datetime'],
|
||||
'name' => 'ldap_user_dn',
|
||||
'value' => '',
|
||||
]);
|
||||
}
|
||||
|
||||
if (!$this->db->get_where('settings', ['name' => 'ldap_password'])->num_rows()) {
|
||||
$this->db->insert('settings', [...$timestamps, 'name' => 'ldap_password', 'value' => '']);
|
||||
$this->db->insert('settings', [
|
||||
'create_datetime' => $timestamps['create_datetime'],
|
||||
'update_datetime' => $timestamps['update_datetime'],
|
||||
'name' => 'ldap_password',
|
||||
'value' => '',
|
||||
]);
|
||||
}
|
||||
|
||||
if (!$this->db->get_where('settings', ['name' => 'ldap_base_dn'])->num_rows()) {
|
||||
$this->db->insert('settings', [...$timestamps, 'name' => 'ldap_base_dn', 'value' => '']);
|
||||
$this->db->insert('settings', [
|
||||
'create_datetime' => $timestamps['create_datetime'],
|
||||
'update_datetime' => $timestamps['update_datetime'],
|
||||
'name' => 'ldap_base_dn',
|
||||
'value' => '',
|
||||
]);
|
||||
}
|
||||
|
||||
if (!$this->db->get_where('settings', ['name' => 'ldap_filter'])->num_rows()) {
|
||||
$this->db->insert('settings', [...$timestamps, 'name' => 'ldap_filter', 'value' => LDAP_DEFAULT_FILTER]);
|
||||
$this->db->insert('settings', [
|
||||
'create_datetime' => $timestamps['create_datetime'],
|
||||
'update_datetime' => $timestamps['update_datetime'],
|
||||
'name' => 'ldap_filter',
|
||||
'value' => LDAP_DEFAULT_FILTER,
|
||||
]);
|
||||
}
|
||||
|
||||
if (!$this->db->get_where('settings', ['name' => 'ldap_field_mapping'])->num_rows()) {
|
||||
$this->db->insert('settings', [
|
||||
...$timestamps,
|
||||
'create_datetime' => $timestamps['create_datetime'],
|
||||
'update_datetime' => $timestamps['update_datetime'],
|
||||
'name' => 'ldap_field_mapping',
|
||||
'value' => json_encode(LDAP_DEFAULT_FIELD_MAPPING, JSON_PRETTY_PRINT),
|
||||
]);
|
||||
|
|
Loading…
Reference in a new issue