Index: trunk/extensions/FBConnect/SpecialConnect.php |
— | — | @@ -39,7 +39,6 @@ |
40 | 40 | // Add this special page to the "login" group of special pages |
41 | 41 | $wgSpecialPageGroups['Connect'] = 'login'; |
42 | 42 | |
43 | | - wfLoadExtensionMessages( 'FBConnect' ); |
44 | 43 | $this->userNamePrefix = wfMsg( 'fbconnect-usernameprefix' ); |
45 | 44 | } |
46 | 45 | |
— | — | @@ -73,7 +72,7 @@ |
74 | 73 | global $wgUser, $facebook, $wgRequest; |
75 | 74 | |
76 | 75 | if ( $wgRequest->getVal( 'action', '' ) == 'disconnect' ) { |
77 | | - self::disconnectAction(); |
| 76 | + $this->disconnectAction(); |
78 | 77 | } |
79 | 78 | |
80 | 79 | // Check to see if the user is already logged in |
— | — | @@ -357,7 +356,6 @@ |
358 | 357 | if( !empty( $fbPushEventClasses ) ) { |
359 | 358 | foreach( $fbPushEventClasses as $pushEventClassName ) { |
360 | 359 | $pushObj = new $pushEventClassName; |
361 | | - $className = get_class(); |
362 | 360 | $prefName = $pushObj->getUserPreferenceName(); |
363 | 361 | |
364 | 362 | $user->setOption( $prefName, ( $wgRequest->getCheck( $prefName ) ? '1' : '0' ) ); |
— | — | @@ -518,8 +516,6 @@ |
519 | 517 | |
520 | 518 | public function sendPage( $function, $arg = null ) { |
521 | 519 | global $wgOut; |
522 | | - // Setup the page for rendering |
523 | | - wfLoadExtensionMessages( 'FBConnect' ); |
524 | 520 | $this->setHeaders(); |
525 | 521 | $wgOut->disallowUserJs(); # just in case... |
526 | 522 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
— | — | @@ -546,7 +542,7 @@ |
547 | 543 | } |
548 | 544 | |
549 | 545 | private function displaySuccessLogin() { |
550 | | - global $wgOut, $wgRequest; |
| 546 | + global $wgOut, $wgRequest, $wgUser; |
551 | 547 | $wgOut->setPageTitle(wfMsg('fbconnect-success')); |
552 | 548 | $wgOut->addWikiMsg('fbconnect-successtext'); |
553 | 549 | // Run any hooks for UserLoginComplete |
— | — | @@ -678,7 +674,7 @@ |
679 | 675 | * Displays the main connect form. |
680 | 676 | */ |
681 | 677 | private function connectForm() { |
682 | | - global $facebook, $wgOut, $wgUser, $wgSitename; |
| 678 | + global $wgOut, $wgSitename; |
683 | 679 | //$fbid = $facebook->getUser(); |
684 | 680 | |
685 | 681 | // Outputs the canonical name of the special page at the top of the page |
Index: trunk/extensions/FBConnect/PreferencesExtension.php |
— | — | @@ -159,8 +159,7 @@ |
160 | 160 | } |
161 | 161 | |
162 | 162 | function mainPrefsForm( $status, $message = '' ) { |
163 | | - global $wgOut, $wgRequest, $wgUser; |
164 | | - global $wgExtensionPreferences; |
| 163 | + global $wgOut, $wgUser, $wgExtensionPreferences; |
165 | 164 | wfProfileIn( __METHOD__ ); |
166 | 165 | |
167 | 166 | // first get original form, then hack into it new options |
Index: trunk/extensions/FBConnect/FBConnectPushEvent.php |
— | — | @@ -75,7 +75,6 @@ |
76 | 76 | if( !empty( $fbPushEventClasses ) ) { |
77 | 77 | foreach( $fbPushEventClasses as $pushEventClassName ) { |
78 | 78 | $pushObj = new $pushEventClassName; |
79 | | - $className = get_class(); |
80 | 79 | $prefName = $pushObj->getUserPreferenceName(); |
81 | 80 | |
82 | 81 | $preferences[$prefName] = array( |
— | — | @@ -113,7 +112,6 @@ |
114 | 113 | if( !empty( $fbPushEventClasses ) ) { |
115 | 114 | foreach( $fbPushEventClasses as $pushEventClassName ) { |
116 | 115 | $pushObj = new $pushEventClassName; |
117 | | - $className = get_class(); |
118 | 116 | $prefName = $pushObj->getUserPreferenceName(); |
119 | 117 | |
120 | 118 | $prefText = $wgLang->getUserToggle( $prefName ); |
Index: trunk/extensions/FBConnect/FBConnectHooks.php |
— | — | @@ -30,7 +30,6 @@ |
31 | 31 | * out the Facebook ID of the user that the userpage belongs to. |
32 | 32 | */ |
33 | 33 | public static function ArticleViewHeader( &$article, &$outputDone, &$pcache ) { |
34 | | - global $wgOut; |
35 | 34 | // Get the article title |
36 | 35 | $nt = $article->getTitle(); |
37 | 36 | // If the page being viewed is a user page |
— | — | @@ -85,7 +84,7 @@ |
86 | 85 | */ |
87 | 86 | public static function BeforePageDisplay( &$out, &$sk ) { |
88 | 87 | global $wgVersion, $wgFbLogo, $wgFbScript, $wgFbExtensionScript, $wgFbIncludeJquery, |
89 | | - $wgScriptPath, $wgJsMimeType, $wgStyleVersion; |
| 88 | + $wgJsMimeType, $wgStyleVersion; |
90 | 89 | |
91 | 90 | // Asynchronously load the Facebook Connect JavaScript SDK before the page's content |
92 | 91 | if( !empty( $wgFbScript ) ) { |
— | — | @@ -236,9 +235,8 @@ |
237 | 236 | * TODO: Better 'returnto' code |
238 | 237 | */ |
239 | 238 | public static function PersonalUrls( &$personal_urls, &$wgTitle ) { |
240 | | - global $facebook, $wgUser, $wgLang, $wgShowIPinHeader; |
| 239 | + global $facebook, $wgUser; |
241 | 240 | global $wgFbPersonalUrls, $wgFbConnectOnly; |
242 | | - wfLoadExtensionMessages( 'FBConnect' ); |
243 | 241 | |
244 | 242 | /* |
245 | 243 | * Personal URLs option: remove_user_talk_link |
— | — | @@ -345,12 +343,11 @@ |
346 | 344 | * TODO! |
347 | 345 | */ |
348 | 346 | public static function RenderPreferencesForm( $form, $output ) { |
349 | | - global $facebook, $wgUser; |
| 347 | + //global $facebook, $wgUser; |
350 | 348 | |
351 | 349 | // This hook no longer seems to work... |
352 | | - return true; |
353 | 350 | |
354 | | - if( $facebook->getSession() ) { |
| 351 | + /*if( $facebook->getSession() ) { |
355 | 352 | $html = $output->getHTML(); |
356 | 353 | $name = $wgUser->getName(); |
357 | 354 | $i = strpos( $html, $name ); |
— | — | @@ -371,7 +368,9 @@ |
372 | 369 | } |
373 | 370 | } |
374 | 371 | } |
375 | | - return true; |
| 372 | + */ |
| 373 | + |
| 374 | + return true; |
376 | 375 | } |
377 | 376 | |
378 | 377 | /** |
— | — | @@ -406,7 +405,7 @@ |
407 | 406 | * Special:ListUsers. |
408 | 407 | */ |
409 | 408 | static function SpecialListusersHeaderForm( &$pager, &$out ) { |
410 | | - global $wgFbUserRightsFromGroup, $facebook, $wgFbLogo; |
| 409 | + global $wgFbUserRightsFromGroup, $facebook; |
411 | 410 | if ( empty( $wgFbUserRightsFromGroup ) ) { |
412 | 411 | return true; |
413 | 412 | } |
Index: trunk/extensions/FBConnect/pushEvents/FBPush_OnWatchArticle.php |
— | — | @@ -17,7 +17,6 @@ |
18 | 18 | wfProfileIn( __METHOD__ ); |
19 | 19 | |
20 | 20 | $wgHooks['ArticleSaveComplete'][] = 'FBPush_OnWatchArticle::articleCountPagesAddedInLastHour'; |
21 | | - wfLoadExtensionMessages( 'FBPush_OnWatchArticle' ); |
22 | 21 | |
23 | 22 | wfProfileOut( __METHOD__ ); |
24 | 23 | } |
— | — | @@ -26,7 +25,7 @@ |
27 | 26 | global $wgContentNamespaces; |
28 | 27 | wfProfileIn( __METHOD__ ); |
29 | 28 | if( in_array( $article->getTitle()->getNamespace(), $wgContentNamespaces ) ) { |
30 | | - self::pushEvent( $article->getTitle()->getText(), $article->getTitle()->getFullURL(), 'Read more' ); |
| 29 | + $this->pushEvent( $article->getTitle()->getText(), $article->getTitle()->getFullURL(), 'Read more' ); |
31 | 30 | } |
32 | 31 | wfProfileOut( __METHOD__ ); |
33 | 32 | return true; |
Index: trunk/extensions/FBConnect/pushEvents/FBPush_OnAddImage.php |
— | — | @@ -11,12 +11,4 @@ |
12 | 12 | |
13 | 13 | class FBPush_OnAddImage extends FBConnectPushEvent { |
14 | 14 | protected $isAllowedUserPreferenceName = 'fbconnect-push-allow-OnAddImage'; // must correspond to an i18n message that is 'tog-[the value of the string on this line]'. |
15 | | - |
16 | | - public function init() { |
17 | | - wfProfileIn( __METHOD__ ); |
18 | | - |
19 | | - wfLoadExtensionMessages( 'FBPush_OnAddImage' ); |
20 | | - |
21 | | - wfProfileOut( __METHOD__ ); |
22 | | - } |
23 | 15 | } |
Index: trunk/extensions/FBConnect/pushEvents/FBPush_OnLargeEdit.php |
— | — | @@ -16,12 +16,4 @@ |
17 | 17 | static public function getMinCharsToPush() { |
18 | 18 | return self::$MIN_CHARS_TO_PUSH; |
19 | 19 | } |
20 | | - |
21 | | - public function init() { |
22 | | - wfProfileIn( __METHOD__ ); |
23 | | - |
24 | | - wfLoadExtensionMessages( 'FBPush_OnLargeEdit' ); |
25 | | - |
26 | | - wfProfileOut( __METHOD__ ); |
27 | | - } |
28 | 20 | } |
Index: trunk/extensions/FBConnect/php-sdk/facebook.php |
— | — | @@ -690,7 +690,7 @@ |
691 | 691 | if (isset($READ_ONLY_CALLS[strtolower($method)])) { |
692 | 692 | $name = 'api_read'; |
693 | 693 | } |
694 | | - return self::getUrl($name, 'restserver.php'); |
| 694 | + return $this->getUrl($name, 'restserver.php'); |
695 | 695 | } |
696 | 696 | |
697 | 697 | /** |