mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-21 23:42:21 +03:00
* Changed php array definition from "$var = [];" to "$var = array();".
* Added php error display in the CodeIgniter "development" environment. * Added "$google_sync_feature" setting in the configuration file.
This commit is contained in:
parent
991551a4d7
commit
dc72bcbf35
8 changed files with 21 additions and 6 deletions
|
@ -19,8 +19,19 @@ include dirname(dirname(dirname(__FILE__))) . '/configuration.php';
|
|||
*/
|
||||
require_once dirname(dirname(dirname(__FILE__))) . '/configuration.php';
|
||||
$config['base_url'] = SystemConfiguration::$base_url;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Easy!Appointments Configuration
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| Declare some of the global config values of Easy!Appointments.
|
||||
| the global "config" variable.
|
||||
|
|
||||
*/
|
||||
$config['ea_version'] = '0.6'; // This must be changed manually.
|
||||
$config['ea_release_title'] = 'Alpha'; // Leave empty for no title or add BETA, TEST etc ...
|
||||
$config['ea_google_sync_feature'] = SystemConfiguration::$google_sync_feature;
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
|
@ -293,7 +293,7 @@ class Unit_tests_admins_model extends CI_Driver {
|
|||
$model_batch = $this->ci->admins_model->get_batch(array('id' => $admin['id']));
|
||||
$db_batch = $this->ci->db->get_where('ea_users', array('id' => $admin['id']))->result_array();
|
||||
foreach($db_batch as &$admin) {
|
||||
$admin['settings'] = [];
|
||||
$admin['settings'] = array();
|
||||
}
|
||||
|
||||
$this->ci->unit->run($model_batch, $db_batch, 'Test if get_batch() with where clause '
|
||||
|
@ -311,7 +311,7 @@ class Unit_tests_admins_model extends CI_Driver {
|
|||
$admin = $this->default_admin;
|
||||
$this->ci->db->insert('ea_users', $admin);
|
||||
$admin['id'] = intval($this->ci->db->insert_id());
|
||||
$admin['settings'] = [];
|
||||
$admin['settings'] = array();
|
||||
|
||||
$model_admin = $this->ci->admins_model->get_row($admin['id']);
|
||||
$this->ci->unit->run($model_admin, $admin, 'Test if get_row() has successfully '
|
||||
|
|
|
@ -99,7 +99,7 @@ class Notifications {
|
|||
$mail->Body = $email_html;
|
||||
|
||||
if (!$mail->Send()) {
|
||||
throw new Exception('Email could not been sent. ' . 'Mailer Error (Line '
|
||||
throw new Exception('Email could not been sent. Mailer Error (Line '
|
||||
. __LINE__ . '): ' . $mail->ErrorInfo);
|
||||
}
|
||||
|
||||
|
|
|
@ -179,7 +179,7 @@
|
|||
}
|
||||
|
||||
if ($has_category) {
|
||||
$grouped_services = [];
|
||||
$grouped_services = array();
|
||||
|
||||
foreach($available_services as $service) {
|
||||
if ($service['category_id'] != NULL) {
|
||||
|
@ -193,7 +193,7 @@
|
|||
|
||||
// We need the uncategorized services at the end of the list so
|
||||
// we will use another iteration only for the uncategorized services.
|
||||
$grouped_services['uncategorized'] = [];
|
||||
$grouped_services['uncategorized'] = array();
|
||||
foreach($available_services as $service) {
|
||||
if ($service['category_id'] == NULL) {
|
||||
$grouped_services['uncategorized'][] = $service;
|
||||
|
|
|
@ -186,10 +186,12 @@
|
|||
<h3>Your appointment has been successfully registered!</h3>
|
||||
<p>An email with the appointment details has been sent to you.</p>
|
||||
|
||||
<?php if ($this->config->item('ea_google_sync_feature')) { ?>
|
||||
<button id="add-to-google-calendar" class="btn btn-primary">
|
||||
<i class="icon-plus icon-white"></i>
|
||||
Add to Google Calendar
|
||||
</button>
|
||||
<?php } ?>
|
||||
|
||||
<?php
|
||||
// Display exceptions (if any).
|
||||
|
|
|
@ -358,7 +358,7 @@ UserSettings.prototype.save = function(settings) {
|
|||
Backend.displayNotification('Settings saved successfully!');
|
||||
|
||||
// Update footer greetings.
|
||||
$('#footer-user-display-name').text('Hello, ' + $('#first-name').val() + ' ' + $('#last-name').val());
|
||||
$('#footer-user-display-name').text('Hello, ' + $('#first-name').val() + ' ' + $('#last-name').val() + '!');
|
||||
|
||||
}, 'json');
|
||||
};
|
||||
|
|
|
@ -10,6 +10,7 @@ class SystemConfiguration {
|
|||
public static $db_password = '';
|
||||
|
||||
// Google Calendar API Settings
|
||||
public static $google_sync_feature = FALSE; // Enter TRUE or FALSE;
|
||||
public static $google_product_name = 'Easy!Appointments';
|
||||
public static $google_client_id = '396094740598-l9ohhdgs0hr6qi89628p3chf9lm59mkc.apps.googleusercontent.com';
|
||||
public static $google_client_secret = '3kKEgx3mgxfFInrWf3jTUn4D';
|
||||
|
|
|
@ -34,6 +34,7 @@ if (defined('ENVIRONMENT'))
|
|||
{
|
||||
case 'development':
|
||||
error_reporting(E_ALL);
|
||||
ini_set('display_errors', 1);
|
||||
break;
|
||||
|
||||
case 'testing':
|
||||
|
|
Loading…
Reference in a new issue