rpicms

A CMS for the Raspberry Pi
git clone git://archive.git.mtrnord.blog/RpicmsTeam/rpicms.git
Log | Files | Refs | README | LICENSE

commit 96aef3a1734163f5f815ca05532c72d5c07b5ce2
parent 708814ce841d2efd42b81a0051244f4f11107c61
Author: MTRNord <mtrnord1@gmail.com>
Date:   Fri, 16 Jan 2015 20:25:54 +0100

new try

Diffstat:
Mthemes/jumbotron/admin.php | 30+++++++++++++++---------------
1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/themes/jumbotron/admin.php b/themes/jumbotron/admin.php @@ -1,19 +1,4 @@ <?php - -include($root.'/core/libs/OAuth2/vendor/autoload.php'); -use fkooman\OAuth\Client\Api; -use fkooman\OAuth\Client\Context; -use fkooman\OAuth\Client\GoogleClientConfig; -use fkooman\OAuth\Client\SessionStorage; - -$googleClientConfig = new GoogleClientConfig( - json_decode(file_get_contents($root.'/core/backend/admin/modules/modul_g-plus-login/client_secrets.json'), true) -); -$api = new Api("foo", $googleClientConfig, new SessionStorage(), new \Guzzle\Http\Client()); -$context = new Context("mtrnord1@gmail.com", array("https://www.googleapis.com/auth/plus.login")); -$accessToken = $api->getAccessToken($context); - -if(isset($_COOKIE['PHPSESSID']) || $_COOKIE['PHPSESSID'] == $accessToken) { /** * Jumbotron Theme for RPICMS * @@ -33,6 +18,21 @@ if ($root_3[1] == 'core') { }else{ $root = $root_1 . '/' . $root_3[1]; } + +include($root . '/core/libs/OAuth2/vendor/autoload.php'); +use fkooman\OAuth\Client\Api; +use fkooman\OAuth\Client\Context; +use fkooman\OAuth\Client\GoogleClientConfig; +use fkooman\OAuth\Client\SessionStorage; + +$googleClientConfig = new GoogleClientConfig( + json_decode(file_get_contents($root.'/core/backend/admin/modules/modul_g-plus-login/client_secrets.json'), true) +); +$api = new Api("foo", $googleClientConfig, new SessionStorage(), new \Guzzle\Http\Client()); +$context = new Context("mtrnord1@gmail.com", array("https://www.googleapis.com/auth/plus.login")); +$accessToken = $api->getAccessToken($context); + +if(isset($_COOKIE['PHPSESSID']) || $_COOKIE['PHPSESSID'] == $accessToken) { ####################### # flush browser cache # #######################