From cfa9891c64c8d3959e6ca8a43c43cc5a53afec94 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 13 Apr 2015 20:01:00 +0200 Subject: [PATCH] changed google sync credentials to app - new config uses constants --- src/application/config/config.php | 2 +- src/application/libraries/google_sync.php | 8 ++++---- .../views/appointments/book_success.php | 4 ++-- .../views/emails/appointment_details.php | 15 +++++++++------ 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/application/config/config.php b/src/application/config/config.php index cc61eacf..6220c4e1 100644 --- a/src/application/config/config.php +++ b/src/application/config/config.php @@ -16,7 +16,7 @@ $config['easyappointments'] = array( $config['ea_version'] = '1.1.0'; // This must be changed manually. $config['ea_release_title'] = 'Develop'; // Leave empty for no title or add BETA, TEST etc ... -$config['ea_google_sync_feature'] = Config::$google_sync_feature; +$config['ea_google_sync_feature'] = Config::GOOGLE_SYNC_FEATURE; /* diff --git a/src/application/libraries/google_sync.php b/src/application/libraries/google_sync.php index 14b181bf..0b024e76 100644 --- a/src/application/libraries/google_sync.php +++ b/src/application/libraries/google_sync.php @@ -33,10 +33,10 @@ class Google_Sync { $this->client = new Google_Client(); $this->client->setUseObjects(true); - $this->client->setApplicationName(Config::$google_product_name); - $this->client->setClientId(Config::$google_client_id); - $this->client->setClientSecret(Config::$google_client_secret); - $this->client->setDeveloperKey(Config::$google_api_key); + $this->client->setApplicationName(Config::GOOGLE_PRODUCT_NAME); + $this->client->setClientId(Config::GOOGLE_CLIENT_ID); + $this->client->setClientSecret(Config::GOOGLE_CLIENT_SECRET); + $this->client->setDeveloperKey(Config::GOOGLE_API_KEY); $this->client->setRedirectUri($this->CI->config->item('base_url') . '/google/oauth_callback'); $this->service = new Google_CalendarService($this->client); diff --git a/src/application/views/appointments/book_success.php b/src/application/views/appointments/book_success.php index d25bf1d4..8c94e521 100644 --- a/src/application/views/appointments/book_success.php +++ b/src/application/views/appointments/book_success.php @@ -55,8 +55,8 @@ 'providerData' : , 'serviceData' : , 'companyName' : , - 'googleApiKey' : , - 'googleClientId' : , + 'googleApiKey' : , + 'googleClientId' : , 'googleApiScope' : 'https://www.googleapis.com/auth/calendar' }; diff --git a/src/application/views/emails/appointment_details.php b/src/application/views/emails/appointment_details.php index 82d80d2d..cfc6c6de 100644 --- a/src/application/views/emails/appointment_details.php +++ b/src/application/views/emails/appointment_details.php @@ -5,9 +5,9 @@