Index: trunk/extensions/LinkOpenID/LinkOpenID.i18n.php |
— | — | @@ -22,7 +22,8 @@ |
23 | 23 | This allows you to use your userpage as an OpenID as well.', |
24 | 24 | 'linkopenid-prefstext-openid' => 'Your OpenID:', |
25 | 25 | 'linkopenid-prefstext-v1url' => 'Server-URL for OpenID Version 1.1:', |
26 | | - 'linkopenid-prefstext-v2url' => 'Server-URL for OpenID Version 2:' |
| 26 | + 'linkopenid-prefstext-v2url' => 'Server-URL for OpenID Version 2:', |
| 27 | + 'linkopenid-prefstext-xrdsurl' => 'XRDS-URL:', # Only translate this if needed. |
27 | 28 | ); |
28 | 29 | |
29 | 30 | /** German |
— | — | @@ -38,5 +39,5 @@ |
39 | 40 | Dies ermöglicht Ihnen die alternative Nutzung Ihrer Benutzerseite als OpenID.', |
40 | 41 | 'linkopenid-prefstext-openid' => 'Ihre OpenID:', |
41 | 42 | 'linkopenid-prefstext-v1url' => 'Server-URL für OpenID Version 1.1:', |
42 | | - 'linkopenid-prefstext-v2url' => 'Server-URL für OpenID Version 2:' |
| 43 | + 'linkopenid-prefstext-v2url' => 'Server-URL für OpenID Version 2:', |
43 | 44 | ); |
Index: trunk/extensions/LinkOpenID/LinkOpenID.php |
— | — | @@ -48,6 +48,7 @@ |
49 | 49 | if ( $openid != '' ) { |
50 | 50 | $v1url = $user->getOption('wflinkopenid_v1url'); |
51 | 51 | $v2url = $user->getOption('wflinkopenid_v2url'); |
| 52 | + $xrdsurl = $user->getOption('wflinkopenid_xrdsurl'); |
52 | 53 | |
53 | 54 | if ( $v1url != '' ) { |
54 | 55 | $wgOut->addLink( array('rel' => 'openid.server', 'href' => $v1url) ); |
— | — | @@ -58,6 +59,9 @@ |
59 | 60 | $wgOut->addLink( array('rel' => 'openid2.provider', 'href' => $v2url) ); |
60 | 61 | $wgOut->addLink( array('rel' => 'openid2.local_id', 'href' => $openid) ); |
61 | 62 | } |
| 63 | + |
| 64 | + if ( $xrdsurl != '' ) |
| 65 | + $wgOut->addMeta('X-XRDS-Location', $xrdsurl); |
62 | 66 | } |
63 | 67 | } |
64 | 68 | } |
— | — | @@ -70,6 +74,7 @@ |
71 | 75 | $prefs->wfLinkOpenID['openid'] = $request->getVal('wflinkopenid_openid'); |
72 | 76 | $prefs->wfLinkOpenID['v1url'] = $request->getVal('wflinkopenid_v1url'); |
73 | 77 | $prefs->wfLinkOpenID['v2url'] = $request->getVal('wflinkopenid_v2url'); |
| 78 | + $prefs->wfLinkOpenID['xrdsurl'] = $request->getVal('wflinkopenid_xrdsurl'); |
74 | 79 | return TRUE; |
75 | 80 | } |
76 | 81 | |
— | — | @@ -96,6 +101,11 @@ |
97 | 102 | "<tr><td>" . wfMsgHtml( 'linkopenid-prefstext-v2url' ) . "</td><td>" . |
98 | 103 | "<input type='text' name='wflinkopenid_v2url' size='60' value='" . |
99 | 104 | htmlentities($prefs->wfLinkOpenID['v2url']) . "'></td></tr>" . |
| 105 | + |
| 106 | + "<tr><td>" . wfMsgHtml( 'linkopenid-prefstext-xrdsurl' ) . "</td><td>" . |
| 107 | + "<input type='text' name='wflinkopenid_xrdsurl' size='60' value='" . |
| 108 | + htmlentities($prefs->wfLinkOpenID['xrdsurl']) . "'></td></tr>" . |
| 109 | + |
100 | 110 | "</table></fieldset>" |
101 | 111 | ); |
102 | 112 | |
— | — | @@ -106,6 +116,7 @@ |
107 | 117 | $user->setOption('wflinkopenid_openid', $form->wfLinkOpenID['openid'] ); |
108 | 118 | $user->setOption('wflinkopenid_v1url', $form->wfLinkOpenID['v1url'] ); |
109 | 119 | $user->setOption('wflinkopenid_v2url', $form->wfLinkOpenID['v2url'] ); |
| 120 | + $user->setOption('wflinkopenid_xrdsurl', $form->wfLinkOpenID['xrdsurl'] ); |
110 | 121 | return TRUE; |
111 | 122 | } |
112 | 123 | |
— | — | @@ -114,5 +125,6 @@ |
115 | 126 | $prefs->wfLinkOpenID['openid'] = $user->getOption('wflinkopenid_openid'); |
116 | 127 | $prefs->wfLinkOpenID['v1url'] = $user->getOption('wflinkopenid_v1url'); |
117 | 128 | $prefs->wfLinkOpenID['v2url'] = $user->getOption('wflinkopenid_v2url'); |
| 129 | + $prefs->wfLinkOpenID['xrdsurl'] = $user->getOption('wflinkopenid_xrdsurl'); |
118 | 130 | return TRUE; |
119 | 131 | } |