
nad at svn
Aug 27, 2008, 8:36 PM
Post #1 of 1
(19 views)
Permalink
|
|
SVN: [40119] trunk/extensions/SimpleSecurity/SimpleSecurity.php
|
|
Revision: 40119 Author: nad Date: 2008-08-28 03:36:15 +0000 (Thu, 28 Aug 2008) Log Message: ----------- Die if MediaWiki version < 1.11 Modified Paths: -------------- trunk/extensions/SimpleSecurity/SimpleSecurity.php Modified: trunk/extensions/SimpleSecurity/SimpleSecurity.php =================================================================== --- trunk/extensions/SimpleSecurity/SimpleSecurity.php 2008-08-28 01:09:40 UTC (rev 40118) +++ trunk/extensions/SimpleSecurity/SimpleSecurity.php 2008-08-28 03:36:15 UTC (rev 40119) @@ -16,9 +16,10 @@ * @licence GNU General Public Licence 2.0 or later */ -if (!defined('MEDIAWIKI')) die('Not an entry point.'); +if (!defined('MEDIAWIKI')) die('Not an entry point.'); +if (version_compare($wgVersion, '1.11.0') < 0) die('Sorry, this extension requires at least MediaWiki version 1.11.0'); -define('SIMPLESECURITY_VERSION', '4.2.6, 2008-08-28'); +define('SIMPLESECURITY_VERSION', '4.2.7, 2008-08-28'); # Global security settings $wgSecurityMagicIf = "ifusercan"; # the name for doing a permission-based conditional @@ -70,8 +71,8 @@ $wgSecurityRenderInfo, $wgSecurityAllowUnreadableLinks; # $wgGroupPermissions has to have its default read entry removed because Title::userCanRead checks it directly - if ($this->default_read = (isset($wgGroupPermissions['*']['read']) && $wgGroupPermissions['*']['read'])) - $wgGroupPermissions['*']['read'] = false; + #if ($this->default_read = (isset($wgGroupPermissions['*']['read']) && $wgGroupPermissions['*']['read'])) + # $wgGroupPermissions['*']['read'] = false; # Add our parser-hooks $wgParser->setFunctionHook($wgSecurityMagicIf, array($this, 'ifUserCan')); @@ -217,6 +218,7 @@ # Put the anon read right back in $wgGroupPermissions if it was there initially # - it had to be removed because Title::userCanRead short-circuits with it + print_r($rights); if ($this->default_read) { $wgGroupPermissions['*']['read'] = true; $rights[] = 'read'; _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS[at]lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
|