Skip to content

Commit c3a39ac

Browse files
committed
Changed: Disable page caching (this was messing with users visiting Special:Connect/Debug)
1 parent bcbdd9f commit c3a39ac

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Facebook/SpecialConnect.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,16 @@ private function setReturnTo() {
101101
*/
102102
public function sendPage($function, $arg = NULL) {
103103
global $wgOut;
104+
104105
// Setup the page for rendering
105106
//wfLoadExtensionMessages( 'Facebook' ); // Deprecated since 1.16
106107
$this->setHeaders();
107108
$wgOut->disallowUserJs(); # just in case...
108-
$wgOut->setRobotPolicy( 'noindex,nofollow' );
109+
// Disable page caching (this was messing with users visiting Special:Connect/Debug)
110+
$wgOut->setRobotPolicy( 'index,follow' );
111+
$wgOut->enableClientCache( false );
109112
$wgOut->setArticleRelated( false );
113+
110114
// Call the specified function to continue generating the page
111115
if (is_null($arg)) {
112116
$this->$function();
@@ -330,7 +334,7 @@ public function execute( $subPageName ) {
330334
if ( $fbUser->getMWUser()->getId() ) {
331335
// If $wgFbUserRightsFromGroups is set, this should trigger a group check
332336
$groups = $fbUser->getMWUser()->getEffectiveGroups();
333-
if ( in_array('admin', $groups) || in_array('fb-admin', $groups) ) {
337+
if ( in_array('sysop', $groups) || in_array('fb-admin', $groups) ) {
334338
$this->sendError('facebook-error', 'facebook-error-application'); // roles
335339
} else {
336340
global $wgLang, $wgFbUserRightsFromGroup;
@@ -352,6 +356,8 @@ public function execute( $subPageName ) {
352356
}
353357
}
354358
break;
359+
} else {
360+
die('$wgFbAllowDebug is true. make it false');
355361
}
356362
// no break
357363
/**

0 commit comments

Comments
 (0)