Skip to content

Commit

Permalink
Fixed deprecated Kohana config file load calls
Browse files Browse the repository at this point in the history
  • Loading branch information
anroots committed Dec 29, 2011
1 parent 6a154b1 commit fe4fa0f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions classes/controller/twitter.php
Expand Up @@ -19,7 +19,7 @@ public function check_for_login()
else
{
return new TwitterOAuth(
Kohana::config('twitteroauth.consumer_key'), Kohana::config('twitteroauth.consumer_secret'),
Kohana::$config->load('twitteroauth.consumer_key'), Kohana::$config->load('twitteroauth.consumer_secret'),
$this->access_token['oauth_token'], $this->access_token['oauth_token_secret']
);
}
Expand All @@ -33,7 +33,7 @@ public function action_registered()
$this->request->redirect('twitter/logout');
}
$twitter = new TwitterOAuth(
Kohana::config('twitteroauth.consumer_key'), Kohana::config('twitteroauth.consumer_secret'),
Kohana::$config->load('twitteroauth.consumer_key'), Kohana::$config->load('twitteroauth.consumer_secret'),
$_SESSION['oauth_token'], $_SESSION['oauth_token_secret']
);

Expand All @@ -60,8 +60,8 @@ public function action_registered()

public function action_login()
{
$twitter = new TwitterOAuth(Kohana::config('twitteroauth.consumer_key'), Kohana::config('twitteroauth.consumer_secret'));
$request_token = $twitter->getRequestToken(Kohana::config('twitteroauth.oauth_callback'));
$twitter = new TwitterOAuth(Kohana::$config->load('twitteroauth.consumer_key'), Kohana::$config->load('twitteroauth.consumer_secret'));
$request_token = $twitter->getRequestToken(Kohana::$config->load('twitteroauth.oauth_callback'));

/* Save request token to session */
$_SESSION['oauth_token'] = $token = $request_token['oauth_token'];
Expand Down
8 changes: 4 additions & 4 deletions twitteroauth/classes/controller/twitter.php
Expand Up @@ -19,7 +19,7 @@ public function check_for_login()
else
{
return new TwitterOAuth(
Kohana::config('twitteroauth.consumer_key'), Kohana::config('twitteroauth.consumer_secret'),
Kohana::$config->load('twitteroauth.consumer_key'), Kohana::$config->load('twitteroauth.consumer_secret'),
$this->access_token['oauth_token'], $this->access_token['oauth_token_secret']
);
}
Expand All @@ -33,7 +33,7 @@ public function action_registered()
$this->request->redirect('twitter/logout');
}
$twitter = new TwitterOAuth(
Kohana::config('twitteroauth.consumer_key'), Kohana::config('twitteroauth.consumer_secret'),
Kohana::$config->load('twitteroauth.consumer_key'), Kohana::$config->load('twitteroauth.consumer_secret'),
$_SESSION['oauth_token'], $_SESSION['oauth_token_secret']
);

Expand All @@ -60,8 +60,8 @@ public function action_registered()

public function action_login()
{
$twitter = new TwitterOAuth(Kohana::config('twitteroauth.consumer_key'), Kohana::config('twitteroauth.consumer_secret'));
$request_token = $twitter->getRequestToken(Kohana::config('twitteroauth.oauth_callback'));
$twitter = new TwitterOAuth(Kohana::$config->load('twitteroauth.consumer_key'), Kohana::$config->load('twitteroauth.consumer_secret'));
$request_token = $twitter->getRequestToken(Kohana::$config->load('twitteroauth.oauth_callback'));

/* Save request token to session */
$_SESSION['oauth_token'] = $token = $request_token['oauth_token'];
Expand Down

0 comments on commit fe4fa0f

Please sign in to comment.