Changeset 23808 for extensions/oAuth
- Timestamp:
- Jul 6, 2013, 4:32:05 PM (11 years ago)
- Location:
- extensions/oAuth
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/oAuth/admin/providers.php
r21584 r23808 23 23 } 24 24 25 if ( ($id=='Wordpress' or $id=='Flickr' ) and $data['enabled'] and !@$providers['OpenID']['enabled'] ) // in the template, OpenID must be before other OpenID based providers25 if ( ($id=='Wordpress' or $id=='Flickr' or $id=='Steam') and $data['enabled'] and !@$providers['OpenID']['enabled'] ) // in the template, OpenID must be before other OpenID based providers 26 26 { 27 27 array_push($page['errors'], sprintf(l10n('OpenID must be enabled in order to use %s authentication'), $id)); -
extensions/oAuth/admin/template/style.css
r20620 r23808 9 9 } 10 10 11 h4 { 12 text-align:left !important; 11 .content h4 { 12 text-align:left; 13 margin:5px 0 0 0; 13 14 } 14 15 … … 35 36 background:rgba(256,0,0,0.1); 36 37 } 37 .provider table tr td :first-child{38 .provider table tr td { 38 39 vertical-align:top; 40 } 41 .provider table tr td:nth-child(2) { 42 padding-top:8px; 39 43 } 40 44 .provider table tr td.keys { … … 54 58 margin:5px; 55 59 } 56 .Wordpress, .OpenID, .Flickr {60 .Wordpress, .OpenID, .Flickr, .Steam { 57 61 display:inline-block; 58 62 } -
extensions/oAuth/auth.php
r21296 r23808 19 19 or !$hybridauth_conf['providers'][$provider]['enabled'] 20 20 ) { 21 throw new Exception(' Hacking attempt!', 1002);21 throw new Exception('Invalid provider!', 1002); 22 22 } 23 23 -
extensions/oAuth/include/functions.inc.php
r20368 r23808 27 27 global $hybridauth_conf; 28 28 29 $out = array(); 30 31 foreach ($hybridauth_conf['providers'] as $id => $data) 32 { 33 if ($data['enabled']) 34 { 35 $out[$id] = $data; 36 } 37 } 38 39 return $out; 29 return array_filter($hybridauth_conf['providers'], create_function('$p', 'return $p["enabled"];')); 40 30 } 41 31 32 function oauth_assign_template_vars() 33 { 34 global $template, $conf; 35 36 if ($template->get_template_vars('OAUTH_URL') == null) 37 { 38 $template->assign(array( 39 'oauth' => $conf['oauth'], 40 'OAUTH_URL' => get_root_url() . OAUTH_PATH . 'auth.php?provider=', 41 'OAUTH_PATH' => OAUTH_PATH, 42 'OAUTH_ABS_PATH' => realpath(OAUTH_PATH) . '/', 43 'PROVIDERS' => get_activated_providers(), 44 'ABS_ROOT_URL' => rtrim(get_gallery_home_url(), '/') . '/', 45 )); 46 } 47 } 42 48 43 49 ?> -
extensions/oAuth/include/providers_stats.inc.php
r21584 r23808 61 61 'new_app_link' => null, 62 62 ), 63 'Steam' => array( 64 'label' => 'Steam', 65 'provider_name' => 'Steam', 66 'new_app_link' => null, 67 ), 63 68 'Wordpress' => array( 64 69 'label' => 'Wordpress', -
extensions/oAuth/include/public_events.inc.php
r21584 r23808 35 35 $_SESSION['page_errors'][] = sprintf(l10n('You registered with a %s account, please sign in with the same account.'), $provider); 36 36 37 $redirect_to = get_root_url().'identification.php'; 37 $redirect_to = get_root_url().'identification.php'; // variable used by identification.php 38 38 return true; 39 39 } … … 50 50 global $conf, $template, $hybridauth_conf, $page; 51 51 52 // com ming from identification page52 // coming from identification page 53 53 if (pwg_get_session_var('oauth_new_user') != null) 54 54 { … … 66 66 { 67 67 pwg_unset_session_var('oauth_new_user'); 68 throw new Exception('Hacking attempt!' );68 throw new Exception('Hacking attempt!', 403); 69 69 } 70 70 … … 142 142 function oauth_begin_profile() 143 143 { 144 global $template, $user, $conf, $hybridauth_conf ;144 global $template, $user, $conf, $hybridauth_conf, $page; 145 145 146 146 $query = ' … … 254 254 $add = 'disabled="disabled" '; 255 255 $script = ' 256 {footer_script }257 jQuery("input[type=\'password\'], input[name=\'send_password_by_mail\']").parent( "li").css("display", "none");256 {footer_script require="jquery"} 257 jQuery("input[type=\'password\'], input[name=\'send_password_by_mail\']").parent().css("display", "none"); 258 258 {/footer_script}'; 259 259 … … 276 276 } 277 277 278 279 function oauth_assign_template_vars()280 {281 global $template, $conf;282 283 if ($template->get_template_vars('OAUTH_URL') == null)284 {285 $template->assign(array(286 'oauth' => $conf['oauth'],287 'OAUTH_URL' => get_root_url() . OAUTH_PATH . 'auth.php?provider=',288 'OAUTH_PATH' => OAUTH_PATH,289 'OAUTH_ABS_PATH' => realpath(OAUTH_PATH) . '/',290 'PROVIDERS' => get_activated_providers(),291 'ABS_ROOT_URL' => rtrim(get_gallery_home_url(), '/') . '/',292 ));293 }294 }295 278 ?> -
extensions/oAuth/main.inc.php
r21303 r23808 108 108 if ( empty($hybridauth_conf) and strpos(@$_GET['page'],'plugin-'.OAUTH_ID)===false ) 109 109 { 110 array_push($page['warnings'], l10n('OAuth: You need to configure the credentials'));110 array_push($page['warnings'], '<a href="'.OAUTH_ADMIN.'">'.l10n('OAuth: You need to configure the credentials').'</a>'); 111 111 } 112 112 if (!function_exists('curl_init')) -
extensions/oAuth/template/auth.tpl
r20301 r23808 25 25 26 26 <script type="text/javascript"> 27 setTimeout('window.location.href = "{$SELF_URL}{$LOADING}";', 200);27 setTimeout('window.location.href = "{$SELF_URL}{$LOADING}";', 500); 28 28 </script> 29 29 -
extensions/oAuth/template/identification_common.tpl
r21584 r23808 45 45 46 46 switch(idp) { 47 case 'OpenID': case 'Wordpress': case 'Flickr': 47 case 'OpenID': case 'Wordpress': case 'Flickr': case 'Steam': 48 48 switch(idp) { 49 49 {/literal} 50 50 case 'OpenID': 51 51 jQuery("#openid_label").html('{'Please enter your OpenID URL'|@translate|escape:javascript}'); break; 52 case 'Wordpress': case 'Flickr': 52 case 'Wordpress': case 'Flickr': case 'Steam': 53 53 jQuery("#openid_label").html('{'Please enter your username'|@translate|escape:javascript}'); break; 54 54 } … … 91 91 case 'Wordpress': oi = "http://" + oi + ".wordpress.com"; break; 92 92 case 'Flickr': oi = "http://www.flickr.com/photos/" + oi + "/"; break; 93 case 'Steam': oi = "http://steamcommunity.com/openid/" + oi; break; 93 94 } 94 95 {/literal} -
extensions/oAuth/template/oauth_sprites.css
r20620 r23808 16 16 .oauth_16px.wordpress { background-position: -144px 0px; } 17 17 .oauth_16px.yahoo { background-position: -160px 0px; } 18 .oauth_16px.steam { background-position: -176px 0px; } 18 19 19 20 .oauth_26px { … … 34 35 .oauth_26px.wordpress { background-position: -234px 0px; } 35 36 .oauth_26px.yahoo { background-position: -260px 0px; } 37 .oauth_26px.steam { background-position: -286px 0px; } 36 38 37 39 .oauth_38px { … … 52 54 .oauth_38px.wordpress { background-position: -342px 0px; } 53 55 .oauth_38px.yahoo { background-position: -380px 0px; } 56 .oauth_38px.steam { background-position: -418px 0px; }
Note: See TracChangeset
for help on using the changeset viewer.