mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-11-25 17:33:19 +03:00
Do not use start_session directly as the required options from app config are not being used (#334).
This commit is contained in:
parent
2777be03da
commit
f67d4768bb
2 changed files with 3 additions and 11 deletions
|
@ -24,7 +24,8 @@ class Google extends CI_Controller {
|
|||
*/
|
||||
public function __construct() {
|
||||
parent::__construct();
|
||||
}
|
||||
$this->load->library('session');
|
||||
}
|
||||
|
||||
/**
|
||||
* Authorize Google Calendar API usage for a specific provider.
|
||||
|
@ -37,9 +38,6 @@ class Google extends CI_Controller {
|
|||
*/
|
||||
public function oauth($provider_id) {
|
||||
// Store the provider id for use on the callback function.
|
||||
if (!isset($_SESSION)) {
|
||||
@session_start();
|
||||
}
|
||||
$_SESSION['oauth_provider_id'] = $provider_id;
|
||||
|
||||
// Redirect browser to google user content page.
|
||||
|
@ -67,10 +65,6 @@ class Google extends CI_Controller {
|
|||
$token = $this->google_sync->authenticate($_GET['code']);
|
||||
|
||||
// Store the token into the database for future reference.
|
||||
if (!isset($_SESSION)) {
|
||||
@session_start();
|
||||
}
|
||||
|
||||
if (isset($_SESSION['oauth_provider_id'])) {
|
||||
$this->load->model('providers_model');
|
||||
$this->providers_model->set_setting('google_sync', TRUE,
|
||||
|
|
|
@ -55,9 +55,7 @@ class Google_Sync {
|
|||
public function __construct() {
|
||||
$this->CI =& get_instance();
|
||||
|
||||
if (!isset($_SESSION)) {
|
||||
@session_start();
|
||||
}
|
||||
$this->CI->load->library('session');
|
||||
|
||||
// Initialize google client and calendar service.
|
||||
$this->client = new Google_Client();
|
||||
|
|
Loading…
Reference in a new issue