Index: trunk/phase3/skins/common/shared.css |
— | — | @@ -106,7 +106,7 @@ |
107 | 107 | |
108 | 108 | div.searchresult { |
109 | 109 | font-size: 95%; |
110 | | - width:38em; |
| 110 | + width:38em; |
111 | 111 | } |
112 | 112 | |
113 | 113 | .mw-search-results { |
— | — | @@ -133,7 +133,7 @@ |
134 | 134 | border: 1px solid silver; |
135 | 135 | } |
136 | 136 | .mw-search-formheader div.search-types { |
137 | | - float:left; |
| 137 | + float:left; |
138 | 138 | padding-left: 0.25em; |
139 | 139 | } |
140 | 140 | .mw-search-formheader div.search-types > ul { |
— | — | @@ -261,7 +261,7 @@ |
262 | 262 | padding-right: 0.15em; |
263 | 263 | padding-bottom: 0.2em; |
264 | 264 | padding-top: 0.15em; |
265 | | - background-color:#ececec; |
| 265 | + background-color:#ececec; |
266 | 266 | border-top:1px solid #BBBBBB; |
267 | 267 | } |
268 | 268 | |
— | — | @@ -318,29 +318,29 @@ |
319 | 319 | padding-right: 1.5em; |
320 | 320 | } |
321 | 321 | |
322 | | -/* |
| 322 | +/* |
323 | 323 | * OpenSearch ajax suggestions |
324 | 324 | */ |
325 | 325 | .os-suggest { |
326 | | - overflow: auto; |
327 | | - overflow-x: hidden; |
| 326 | + overflow: auto; |
| 327 | + overflow-x: hidden; |
328 | 328 | position: absolute; |
329 | 329 | top: 0px; |
330 | 330 | left: 0px; |
331 | 331 | width: 0px; |
332 | | - background-color: white; |
| 332 | + background-color: white; |
333 | 333 | background-color: Window; |
334 | 334 | border-style: solid; |
335 | 335 | border-color: #AAAAAA; |
336 | 336 | border-width: 1px; |
337 | | - z-index:99; |
338 | | - visibility:hidden; |
339 | | - font-size:95%; |
| 337 | + z-index:99; |
| 338 | + visibility:hidden; |
| 339 | + font-size:95%; |
340 | 340 | } |
341 | 341 | |
342 | 342 | table.os-suggest-results { |
343 | 343 | font-size: 95%; |
344 | | - cursor: pointer; |
| 344 | + cursor: pointer; |
345 | 345 | border: 0; |
346 | 346 | border-collapse: collapse; |
347 | 347 | width: 100%; |
— | — | @@ -348,7 +348,7 @@ |
349 | 349 | |
350 | 350 | td.os-suggest-result, td.os-suggest-result-hl { |
351 | 351 | white-space: nowrap; |
352 | | - background-color: white; |
| 352 | + background-color: white; |
353 | 353 | background-color: Window; |
354 | 354 | color: black; |
355 | 355 | color: WindowText; |
— | — | @@ -356,7 +356,7 @@ |
357 | 357 | } |
358 | 358 | td.os-suggest-result-hl, |
359 | 359 | td.os-suggest-result-hl-webkit { |
360 | | - background-color: #4C59A6; |
| 360 | + background-color: #4C59A6; |
361 | 361 | color: white; |
362 | 362 | } |
363 | 363 | td.os-suggest-result-hl { |
— | — | @@ -367,7 +367,7 @@ |
368 | 368 | } |
369 | 369 | |
370 | 370 | .os-suggest-toggle { |
371 | | - position: relative; |
| 371 | + position: relative; |
372 | 372 | left: 1ex; |
373 | 373 | font-size: 65%; |
374 | 374 | } |
— | — | @@ -402,6 +402,7 @@ |
403 | 403 | table.mw-listgrouprights-table tr { |
404 | 404 | vertical-align: top; |
405 | 405 | } |
| 406 | +.listgrouprights-revoked { text-decoration: line-through; } |
406 | 407 | |
407 | 408 | /* Special:Statistics styling */ |
408 | 409 | td.mw-statistics-numbers { |
Index: trunk/phase3/includes/ProtectionForm.php |
— | — | @@ -38,9 +38,9 @@ |
39 | 39 | /** Map of action to "other" expiry time. Used in preference to mExpirySelection. */ |
40 | 40 | var $mExpiry = array(); |
41 | 41 | |
42 | | - /** |
43 | | - * Map of action to value selected in expiry drop-down list. |
44 | | - * Will be set to 'othertime' whenever mExpiry is set. |
| 42 | + /** |
| 43 | + * Map of action to value selected in expiry drop-down list. |
| 44 | + * Will be set to 'othertime' whenever mExpiry is set. |
45 | 45 | */ |
46 | 46 | var $mExpirySelection = array(); |
47 | 47 | |
— | — | @@ -127,7 +127,7 @@ |
128 | 128 | } |
129 | 129 | } |
130 | 130 | |
131 | | - /** |
| 131 | + /** |
132 | 132 | * Get the expiry time for a given action, by combining the relevant inputs. |
133 | 133 | * Returns a 14-char timestamp or "infinity", or false if the input was invalid |
134 | 134 | */ |
— | — | @@ -230,7 +230,7 @@ |
231 | 231 | $this->show( wfMsg( 'sessionfailure' ) ); |
232 | 232 | return false; |
233 | 233 | } |
234 | | - |
| 234 | + |
235 | 235 | # Create reason string. Use list and/or custom string. |
236 | 236 | $reasonstr = $this->mReasonSelection; |
237 | 237 | if ( $reasonstr != 'other' && $this->mReason != '' ) { |
— | — | @@ -296,8 +296,8 @@ |
297 | 297 | $out = ''; |
298 | 298 | if( !$this->disabled ) { |
299 | 299 | $out .= $this->buildScript(); |
300 | | - $out .= Xml::openElement( 'form', array( 'method' => 'post', |
301 | | - 'action' => $this->mTitle->getLocalUrl( 'action=protect' ), |
| 300 | + $out .= Xml::openElement( 'form', array( 'method' => 'post', |
| 301 | + 'action' => $this->mTitle->getLocalUrl( 'action=protect' ), |
302 | 302 | 'id' => 'mw-Protect-Form', 'onsubmit' => 'ProtectionForm.enableUnchainedInputs(true)' ) ); |
303 | 303 | $out .= Xml::hidden( 'wpEditToken',$wgUser->editToken() ); |
304 | 304 | } |
— | — | @@ -321,7 +321,7 @@ |
322 | 322 | |
323 | 323 | $reasonDropDown = Xml::listDropDown( 'wpProtectReasonSelection', |
324 | 324 | wfMsgForContent( 'protect-dropdown' ), |
325 | | - wfMsgForContent( 'protect-otherreason-op' ), |
| 325 | + wfMsgForContent( 'protect-otherreason-op' ), |
326 | 326 | $this->mReasonSelection, |
327 | 327 | 'mwProtect-reason', 4 ); |
328 | 328 | $scExpiryOptions = wfMsgForContent( 'protect-expiry-options' ); |
— | — | @@ -336,14 +336,14 @@ |
337 | 337 | $timestamp = $wgLang->timeanddate( $this->mExistingExpiry[$action] ); |
338 | 338 | $d = $wgLang->date( $this->mExistingExpiry[$action] ); |
339 | 339 | $t = $wgLang->time( $this->mExistingExpiry[$action] ); |
340 | | - $expiryFormOptions .= |
341 | | - Xml::option( |
| 340 | + $expiryFormOptions .= |
| 341 | + Xml::option( |
342 | 342 | wfMsg( 'protect-existing-expiry', $timestamp, $d, $t ), |
343 | 343 | 'existing', |
344 | 344 | $this->mExpirySelection[$action] == 'existing' |
345 | 345 | ) . "\n"; |
346 | 346 | } |
347 | | - |
| 347 | + |
348 | 348 | $expiryFormOptions .= Xml::option( wfMsg( 'protect-othertime-op' ), "othertime" ) . "\n"; |
349 | 349 | foreach( explode(',', $scExpiryOptions) as $option ) { |
350 | 350 | if ( strpos($option, ":") === false ) { |
— | — | @@ -399,13 +399,13 @@ |
400 | 400 | $out .= '<tr> |
401 | 401 | <td></td> |
402 | 402 | <td class="mw-input">' . |
403 | | - Xml::checkLabel( wfMsg( 'protect-cascade' ), 'mwProtect-cascade', 'mwProtect-cascade', |
| 403 | + Xml::checkLabel( wfMsg( 'protect-cascade' ), 'mwProtect-cascade', 'mwProtect-cascade', |
404 | 404 | $this->mCascade, $this->disabledAttrib ) . |
405 | 405 | "</td> |
406 | 406 | </tr>\n"; |
407 | 407 | $out .= Xml::closeElement( 'tbody' ) . Xml::closeElement( 'table' ); |
408 | 408 | } |
409 | | - |
| 409 | + |
410 | 410 | # Add manual and custom reason field/selects as well as submit |
411 | 411 | if( !$this->disabled ) { |
412 | 412 | $out .= Xml::openElement( 'table', array( 'id' => 'mw-protect-table3' ) ) . |
— | — | @@ -424,7 +424,7 @@ |
425 | 425 | {$mProtectreason} |
426 | 426 | </td> |
427 | 427 | <td class='mw-input'>" . |
428 | | - Xml::input( 'mwProtect-reason', 60, $this->mReason, array( 'type' => 'text', |
| 428 | + Xml::input( 'mwProtect-reason', 60, $this->mReason, array( 'type' => 'text', |
429 | 429 | 'id' => 'mwProtect-reason', 'maxlength' => 255 ) ) . |
430 | 430 | "</td> |
431 | 431 | </tr> |
Index: trunk/phase3/includes/Defines.php |
— | — | @@ -228,3 +228,4 @@ |
229 | 229 | define( 'APCOND_ISIP', 5 ); |
230 | 230 | define( 'APCOND_IPINRANGE', 6 ); |
231 | 231 | define( 'APCOND_AGE_FROM_EDIT', 7 ); |
| 232 | +define( 'APCOND_BLOCKED', 8 ); |
Index: trunk/phase3/includes/User.php |
— | — | @@ -43,7 +43,7 @@ |
44 | 44 | class User { |
45 | 45 | |
46 | 46 | /** |
47 | | - * \type{\arrayof{\string}} A list of default user toggles, i.e., boolean user |
| 47 | + * \type{\arrayof{\string}} A list of default user toggles, i.e., boolean user |
48 | 48 | * preferences that are displayed by Special:Preferences as checkboxes. |
49 | 49 | * This list can be extended via the UserToggles hook or by |
50 | 50 | * $wgContLang::getExtraUserToggles(). |
— | — | @@ -95,8 +95,8 @@ |
96 | 96 | ); |
97 | 97 | |
98 | 98 | /** |
99 | | - * \type{\arrayof{\string}} List of member variables which are saved to the |
100 | | - * shared cache (memcached). Any operation which changes the |
| 99 | + * \type{\arrayof{\string}} List of member variables which are saved to the |
| 100 | + * shared cache (memcached). Any operation which changes the |
101 | 101 | * corresponding database fields must call a cache-clearing function. |
102 | 102 | * @showinitializer |
103 | 103 | */ |
— | — | @@ -124,7 +124,7 @@ |
125 | 125 | |
126 | 126 | /** |
127 | 127 | * \type{\arrayof{\string}} Core rights. |
128 | | - * Each of these should have a corresponding message of the form |
| 128 | + * Each of these should have a corresponding message of the form |
129 | 129 | * "right-$right". |
130 | 130 | * @showinitializer |
131 | 131 | */ |
— | — | @@ -211,14 +211,14 @@ |
212 | 212 | /** @name Lazy-initialized variables, invalidated with clearInstanceCache */ |
213 | 213 | //@{ |
214 | 214 | var $mNewtalk, $mDatePreference, $mBlockedby, $mHash, $mSkin, $mRights, |
215 | | - $mBlockreason, $mBlock, $mEffectiveGroups, $mBlockedGlobally, |
| 215 | + $mBlockreason, $mBlock, $mEffectiveGroups, $mBlockedGlobally, |
216 | 216 | $mLocked, $mHideName, $mOptions; |
217 | 217 | //@} |
218 | 218 | |
219 | 219 | /** |
220 | 220 | * Lightweight constructor for an anonymous user. |
221 | 221 | * Use the User::newFrom* factory functions for other kinds of users. |
222 | | - * |
| 222 | + * |
223 | 223 | * @see newFromName() |
224 | 224 | * @see newFromId() |
225 | 225 | * @see newFromConfirmationCode() |
— | — | @@ -325,8 +325,8 @@ |
326 | 326 | global $wgMemc; |
327 | 327 | $wgMemc->set( $key, $data ); |
328 | 328 | } |
329 | | - |
330 | | - |
| 329 | + |
| 330 | + |
331 | 331 | /** @name newFrom*() static factory methods */ |
332 | 332 | //@{ |
333 | 333 | |
— | — | @@ -341,8 +341,8 @@ |
342 | 342 | * User::getCanonicalName(), except that true is accepted as an alias |
343 | 343 | * for 'valid', for BC. |
344 | 344 | * |
345 | | - * @return \type{User} The User object, or null if the username is invalid. If the |
346 | | - * username is not present in the database, the result will be a user object |
| 345 | + * @return \type{User} The User object, or null if the username is invalid. If the |
| 346 | + * username is not present in the database, the result will be a user object |
347 | 347 | * with a name, zero user ID and default settings. |
348 | 348 | */ |
349 | 349 | static function newFromName( $name, $validate = 'valid' ) { |
— | — | @@ -420,10 +420,10 @@ |
421 | 421 | $user->loadFromRow( $row ); |
422 | 422 | return $user; |
423 | 423 | } |
424 | | - |
| 424 | + |
425 | 425 | //@} |
426 | | - |
427 | 426 | |
| 427 | + |
428 | 428 | /** |
429 | 429 | * Get the username corresponding to a given user ID |
430 | 430 | * @param $id \int User ID |
— | — | @@ -661,7 +661,7 @@ |
662 | 662 | return false; |
663 | 663 | |
664 | 664 | # Clean up name according to title rules |
665 | | - $t = ($validate === 'valid') ? |
| 665 | + $t = ($validate === 'valid') ? |
666 | 666 | Title::newFromText( $name ) : Title::makeTitle( NS_USER, $name ); |
667 | 667 | # Check for invalid titles |
668 | 668 | if( is_null( $t ) ) { |
— | — | @@ -755,9 +755,9 @@ |
756 | 756 | } |
757 | 757 | |
758 | 758 | /** |
759 | | - * Set cached properties to default. |
| 759 | + * Set cached properties to default. |
760 | 760 | * |
761 | | - * @note This no longer clears uncached lazy-initialised properties; |
| 761 | + * @note This no longer clears uncached lazy-initialised properties; |
762 | 762 | * the constructor does that instead. |
763 | 763 | * @private |
764 | 764 | */ |
— | — | @@ -819,7 +819,7 @@ |
820 | 820 | $sId = intval( $_COOKIE["{$wgCookiePrefix}UserID"] ); |
821 | 821 | if( isset( $_SESSION['wsUserID'] ) && $sId != $_SESSION['wsUserID'] ) { |
822 | 822 | $this->loadDefaults(); // Possible collision! |
823 | | - wfDebugLog( 'loginSessions', "Session user ID ({$_SESSION['wsUserID']}) and |
| 823 | + wfDebugLog( 'loginSessions', "Session user ID ({$_SESSION['wsUserID']}) and |
824 | 824 | cookie user ID ($sId) don't match!" ); |
825 | 825 | return false; |
826 | 826 | } |
— | — | @@ -937,7 +937,7 @@ |
938 | 938 | $this->mEmailToken = $row->user_email_token; |
939 | 939 | $this->mEmailTokenExpires = wfTimestampOrNull( TS_MW, $row->user_email_token_expires ); |
940 | 940 | $this->mRegistration = wfTimestampOrNull( TS_MW, $row->user_registration ); |
941 | | - $this->mEditCount = $row->user_editcount; |
| 941 | + $this->mEditCount = $row->user_editcount; |
942 | 942 | } |
943 | 943 | |
944 | 944 | /** |
— | — | @@ -1065,7 +1065,7 @@ |
1066 | 1066 | // due to -1 !== 0. Probably session-related... Nothing should be |
1067 | 1067 | // overwriting mBlockedby, surely? |
1068 | 1068 | $this->load(); |
1069 | | - |
| 1069 | + |
1070 | 1070 | $this->mBlockedby = 0; |
1071 | 1071 | $this->mHideName = 0; |
1072 | 1072 | $this->mAllowUsertalk = 0; |
— | — | @@ -1089,8 +1089,8 @@ |
1090 | 1090 | $this->spreadBlock(); |
1091 | 1091 | } |
1092 | 1092 | } else { |
1093 | | - // Bug 13611: don't remove mBlock here, to allow account creation blocks to |
1094 | | - // apply to users. Note that the existence of $this->mBlock is not used to |
| 1093 | + // Bug 13611: don't remove mBlock here, to allow account creation blocks to |
| 1094 | + // apply to users. Note that the existence of $this->mBlock is not used to |
1095 | 1095 | // check for edit blocks, $this->mBlockedby is instead. |
1096 | 1096 | } |
1097 | 1097 | |
— | — | @@ -1275,7 +1275,7 @@ |
1276 | 1276 | |
1277 | 1277 | /** |
1278 | 1278 | * Check if user is blocked |
1279 | | - * |
| 1279 | + * |
1280 | 1280 | * @param $bFromSlave \bool Whether to check the slave database instead of the master |
1281 | 1281 | * @return \bool True if blocked, false otherwise |
1282 | 1282 | */ |
— | — | @@ -1287,7 +1287,7 @@ |
1288 | 1288 | |
1289 | 1289 | /** |
1290 | 1290 | * Check if user is blocked from editing a particular article |
1291 | | - * |
| 1291 | + * |
1292 | 1292 | * @param $title \string Title to check |
1293 | 1293 | * @param $bFromSlave \bool Whether to check the slave database instead of the master |
1294 | 1294 | * @return \bool True if blocked, false otherwise |
— | — | @@ -1327,7 +1327,7 @@ |
1328 | 1328 | $this->getBlockedStatus(); |
1329 | 1329 | return $this->mBlockreason; |
1330 | 1330 | } |
1331 | | - |
| 1331 | + |
1332 | 1332 | /** |
1333 | 1333 | * If user is blocked, return the ID for the block |
1334 | 1334 | * @return \int Block ID |
— | — | @@ -1336,12 +1336,12 @@ |
1337 | 1337 | $this->getBlockedStatus(); |
1338 | 1338 | return ($this->mBlock ? $this->mBlock->mId : false); |
1339 | 1339 | } |
1340 | | - |
| 1340 | + |
1341 | 1341 | /** |
1342 | 1342 | * Check if user is blocked on all wikis. |
1343 | 1343 | * Do not use for actual edit permission checks! |
1344 | 1344 | * This is intented for quick UI checks. |
1345 | | - * |
| 1345 | + * |
1346 | 1346 | * @param $ip \type{\string} IP address, uses current client if none given |
1347 | 1347 | * @return \type{\bool} True if blocked, false otherwise |
1348 | 1348 | */ |
— | — | @@ -1360,10 +1360,10 @@ |
1361 | 1361 | $this->mBlockedGlobally = (bool)$blocked; |
1362 | 1362 | return $this->mBlockedGlobally; |
1363 | 1363 | } |
1364 | | - |
| 1364 | + |
1365 | 1365 | /** |
1366 | 1366 | * Check if user account is locked |
1367 | | - * |
| 1367 | + * |
1368 | 1368 | * @return \type{\bool} True if locked, false otherwise |
1369 | 1369 | */ |
1370 | 1370 | function isLocked() { |
— | — | @@ -1375,10 +1375,10 @@ |
1376 | 1376 | $this->mLocked = (bool)$authUser->isLocked(); |
1377 | 1377 | return $this->mLocked; |
1378 | 1378 | } |
1379 | | - |
| 1379 | + |
1380 | 1380 | /** |
1381 | 1381 | * Check if user account is hidden |
1382 | | - * |
| 1382 | + * |
1383 | 1383 | * @return \type{\bool} True if hidden, false otherwise |
1384 | 1384 | */ |
1385 | 1385 | function isHidden() { |
— | — | @@ -1733,7 +1733,7 @@ |
1734 | 1734 | $this->mNewpassword = ''; |
1735 | 1735 | $this->mNewpassTime = null; |
1736 | 1736 | } |
1737 | | - |
| 1737 | + |
1738 | 1738 | /** |
1739 | 1739 | * Get the user's current token. |
1740 | 1740 | * @return \string Token |
— | — | @@ -1742,7 +1742,7 @@ |
1743 | 1743 | $this->load(); |
1744 | 1744 | return $this->mToken; |
1745 | 1745 | } |
1746 | | - |
| 1746 | + |
1747 | 1747 | /** |
1748 | 1748 | * Set the random token (used for persistent authentication) |
1749 | 1749 | * Called from loadDefaults() among other places. |
— | — | @@ -1766,7 +1766,7 @@ |
1767 | 1767 | $this->mToken = $token; |
1768 | 1768 | } |
1769 | 1769 | } |
1770 | | - |
| 1770 | + |
1771 | 1771 | /** |
1772 | 1772 | * Set the cookie password |
1773 | 1773 | * |
— | — | @@ -1793,7 +1793,7 @@ |
1794 | 1794 | } |
1795 | 1795 | |
1796 | 1796 | /** |
1797 | | - * Has password reminder email been sent within the last |
| 1797 | + * Has password reminder email been sent within the last |
1798 | 1798 | * $wgPasswordReminderResendTime hours? |
1799 | 1799 | * @return \bool True or false |
1800 | 1800 | */ |
— | — | @@ -1880,7 +1880,7 @@ |
1881 | 1881 | return $defaultOverride; |
1882 | 1882 | } |
1883 | 1883 | } |
1884 | | - |
| 1884 | + |
1885 | 1885 | /** |
1886 | 1886 | * Get the user's current setting for a given option, as a boolean value. |
1887 | 1887 | * |
— | — | @@ -1892,7 +1892,7 @@ |
1893 | 1893 | return (bool)$this->getOption( $oname ); |
1894 | 1894 | } |
1895 | 1895 | |
1896 | | - |
| 1896 | + |
1897 | 1897 | /** |
1898 | 1898 | * Get the user's current setting for a given option, as a boolean value. |
1899 | 1899 | * |
— | — | @@ -1932,10 +1932,10 @@ |
1933 | 1933 | |
1934 | 1934 | $this->mOptions[$oname] = $val; |
1935 | 1935 | } |
1936 | | - |
| 1936 | + |
1937 | 1937 | /** |
1938 | 1938 | * Reset all options to the site defaults |
1939 | | - */ |
| 1939 | + */ |
1940 | 1940 | function resetOptions() { |
1941 | 1941 | $this->mOptions = User::getDefaultOptions(); |
1942 | 1942 | } |
— | — | @@ -2112,7 +2112,7 @@ |
2113 | 2113 | if( !$wgUseRCPatrol && !$wgUseNPPatrol ) |
2114 | 2114 | return false; |
2115 | 2115 | } |
2116 | | - # Use strict parameter to avoid matching numeric 0 accidentally inserted |
| 2116 | + # Use strict parameter to avoid matching numeric 0 accidentally inserted |
2117 | 2117 | # by misconfiguration: 0 == 'foo' |
2118 | 2118 | return in_array( $action, $this->getRights(), true ); |
2119 | 2119 | } |
— | — | @@ -2156,7 +2156,7 @@ |
2157 | 2157 | global $wgDefaultSkin; |
2158 | 2158 | $userSkin = $wgDefaultSkin; |
2159 | 2159 | } |
2160 | | - |
| 2160 | + |
2161 | 2161 | $this->mSkin =& Skin::newFromKey( $userSkin ); |
2162 | 2162 | wfProfileOut( __METHOD__ ); |
2163 | 2163 | } |
— | — | @@ -2309,20 +2309,20 @@ |
2310 | 2310 | } |
2311 | 2311 | } |
2312 | 2312 | } |
2313 | | - |
| 2313 | + |
2314 | 2314 | /** |
2315 | | - * Set a cookie on the user's client. Wrapper for |
| 2315 | + * Set a cookie on the user's client. Wrapper for |
2316 | 2316 | * WebResponse::setCookie |
2317 | 2317 | * @param $name \string Name of the cookie to set |
2318 | 2318 | * @param $value \string Value to set |
2319 | | - * @param $exp \int Expiration time, as a UNIX time value; |
| 2319 | + * @param $exp \int Expiration time, as a UNIX time value; |
2320 | 2320 | * if 0 or not specified, use the default $wgCookieExpiration |
2321 | 2321 | */ |
2322 | 2322 | protected function setCookie( $name, $value, $exp=0 ) { |
2323 | 2323 | global $wgRequest; |
2324 | 2324 | $wgRequest->response()->setcookie( $name, $value, $exp ); |
2325 | 2325 | } |
2326 | | - |
| 2326 | + |
2327 | 2327 | /** |
2328 | 2328 | * Clear a cookie on the user's client |
2329 | 2329 | * @param $name \string Name of the cookie to clear |
— | — | @@ -2337,7 +2337,7 @@ |
2338 | 2338 | function setCookies() { |
2339 | 2339 | $this->load(); |
2340 | 2340 | if ( 0 == $this->mId ) return; |
2341 | | - $session = array( |
| 2341 | + $session = array( |
2342 | 2342 | 'wsUserID' => $this->mId, |
2343 | 2343 | 'wsToken' => $this->mToken, |
2344 | 2344 | 'wsUserName' => $this->getName() |
— | — | @@ -2351,9 +2351,9 @@ |
2352 | 2352 | } else { |
2353 | 2353 | $cookies['Token'] = false; |
2354 | 2354 | } |
2355 | | - |
| 2355 | + |
2356 | 2356 | wfRunHooks( 'UserSetCookies', array( $this, &$session, &$cookies ) ); |
2357 | | - #check for null, since the hook could cause a null value |
| 2357 | + #check for null, since the hook could cause a null value |
2358 | 2358 | if ( !is_null( $session ) && isset( $_SESSION ) ){ |
2359 | 2359 | $_SESSION = $session + $_SESSION; |
2360 | 2360 | } |
— | — | @@ -2669,27 +2669,27 @@ |
2670 | 2670 | function isNewbie() { |
2671 | 2671 | return !$this->isAllowed( 'autoconfirmed' ); |
2672 | 2672 | } |
2673 | | - |
| 2673 | + |
2674 | 2674 | /** |
2675 | 2675 | * Is the user active? We check to see if they've made at least |
2676 | 2676 | * X number of edits in the last Y days. |
2677 | | - * |
| 2677 | + * |
2678 | 2678 | * @return \bool True if the user is active, false if not. |
2679 | 2679 | */ |
2680 | 2680 | public function isActiveEditor() { |
2681 | 2681 | global $wgActiveUserEditCount, $wgActiveUserDays; |
2682 | 2682 | $dbr = wfGetDB( DB_SLAVE ); |
2683 | | - |
| 2683 | + |
2684 | 2684 | // Stolen without shame from RC |
2685 | 2685 | $cutoff_unixtime = time() - ( $wgActiveUserDays * 86400 ); |
2686 | 2686 | $cutoff_unixtime = $cutoff_unixtime - ( $cutoff_unixtime % 86400 ); |
2687 | 2687 | $oldTime = $dbr->addQuotes( $dbr->timestamp( $cutoff_unixtime ) ); |
2688 | | - |
| 2688 | + |
2689 | 2689 | $res = $dbr->select( 'revision', '1', |
2690 | 2690 | array( 'rev_user_text' => $this->getName(), "rev_timestamp > $oldTime"), |
2691 | 2691 | __METHOD__, |
2692 | 2692 | array('LIMIT' => $wgActiveUserEditCount ) ); |
2693 | | - |
| 2693 | + |
2694 | 2694 | $count = $dbr->numRows($res); |
2695 | 2695 | $dbr->freeResult($res); |
2696 | 2696 | |
— | — | @@ -2833,7 +2833,7 @@ |
2834 | 2834 | $url = $this->confirmationTokenUrl( $token ); |
2835 | 2835 | $invalidateURL = $this->invalidationTokenUrl( $token ); |
2836 | 2836 | $this->saveSettings(); |
2837 | | - |
| 2837 | + |
2838 | 2838 | return $this->sendMail( wfMsg( 'confirmemail_subject' ), |
2839 | 2839 | wfMsg( 'confirmemail_body', |
2840 | 2840 | wfGetIP(), |
— | — | @@ -2907,7 +2907,7 @@ |
2908 | 2908 | function invalidationTokenUrl( $token ) { |
2909 | 2909 | return $this->getTokenUrl( 'Invalidateemail', $token ); |
2910 | 2910 | } |
2911 | | - |
| 2911 | + |
2912 | 2912 | /** |
2913 | 2913 | * Internal function to format the e-mail validation/invalidation URLs. |
2914 | 2914 | * This uses $wgArticlePath directly as a quickie hack to use the |
— | — | @@ -3039,7 +3039,7 @@ |
3040 | 3040 | ? $this->mRegistration |
3041 | 3041 | : false; |
3042 | 3042 | } |
3043 | | - |
| 3043 | + |
3044 | 3044 | /** |
3045 | 3045 | * Get the timestamp of the first edit |
3046 | 3046 | * |
— | — | @@ -3056,7 +3056,7 @@ |
3057 | 3057 | ); |
3058 | 3058 | if( !$time ) return false; // no edits |
3059 | 3059 | return wfTimestamp( TS_MW, $time ); |
3060 | | - } |
| 3060 | + } |
3061 | 3061 | |
3062 | 3062 | /** |
3063 | 3063 | * Get the permissions associated with a given list of groups |
— | — | @@ -3065,7 +3065,7 @@ |
3066 | 3066 | * @return \type{\arrayof{\string}} List of permission key names for given groups combined |
3067 | 3067 | */ |
3068 | 3068 | static function getGroupPermissions( $groups ) { |
3069 | | - global $wgGroupPermissions; |
| 3069 | + global $wgGroupPermissions, $wgRevokePermissions; |
3070 | 3070 | $rights = array(); |
3071 | 3071 | foreach( $groups as $group ) { |
3072 | 3072 | if( isset( $wgGroupPermissions[$group] ) ) { |
— | — | @@ -3073,13 +3073,17 @@ |
3074 | 3074 | // array_filter removes empty items |
3075 | 3075 | array_keys( array_filter( $wgGroupPermissions[$group] ) ) ); |
3076 | 3076 | } |
| 3077 | + if( isset( $wgRevokePermissions[$group] ) ) { |
| 3078 | + $rights = array_diff( $rights, |
| 3079 | + array_keys( array_filter( $wgRevokePermissions[$group] ) ) ); |
| 3080 | + } |
3077 | 3081 | } |
3078 | 3082 | return array_unique($rights); |
3079 | 3083 | } |
3080 | | - |
| 3084 | + |
3081 | 3085 | /** |
3082 | 3086 | * Get all the groups who have a given permission |
3083 | | - * |
| 3087 | + * |
3084 | 3088 | * @param $role \string Role to check |
3085 | 3089 | * @return \type{\arrayof{\string}} List of internal group names with the given permission |
3086 | 3090 | */ |
— | — | @@ -3133,9 +3137,9 @@ |
3134 | 3138 | * @return \type{\arrayof{\string}} Array of internal group names |
3135 | 3139 | */ |
3136 | 3140 | static function getAllGroups() { |
3137 | | - global $wgGroupPermissions; |
| 3141 | + global $wgGroupPermissions, $wgRevokePermissions; |
3138 | 3142 | return array_diff( |
3139 | | - array_keys( $wgGroupPermissions ), |
| 3143 | + array_merge( array_keys( $wgGroupPermissions ), array_keys( $wgRevokePermissions ) ), |
3140 | 3144 | self::getImplicitGroups() |
3141 | 3145 | ); |
3142 | 3146 | } |
— | — | @@ -3187,7 +3191,7 @@ |
3188 | 3192 | } |
3189 | 3193 | |
3190 | 3194 | /** |
3191 | | - * Create a link to the group in HTML, if available; |
| 3195 | + * Create a link to the group in HTML, if available; |
3192 | 3196 | * else return the group name. |
3193 | 3197 | * |
3194 | 3198 | * @param $group \string Internal name of the group |
— | — | @@ -3209,7 +3213,7 @@ |
3210 | 3214 | } |
3211 | 3215 | |
3212 | 3216 | /** |
3213 | | - * Create a link to the group in Wikitext, if available; |
| 3217 | + * Create a link to the group in Wikitext, if available; |
3214 | 3218 | * else return the group name. |
3215 | 3219 | * |
3216 | 3220 | * @param $group \string Internal name of the group |
— | — | @@ -3228,7 +3232,7 @@ |
3229 | 3233 | return $text; |
3230 | 3234 | } |
3231 | 3235 | } |
3232 | | - |
| 3236 | + |
3233 | 3237 | /** |
3234 | 3238 | * Returns an array of the groups that a particular group can add/remove. |
3235 | 3239 | * |
— | — | @@ -3258,7 +3262,7 @@ |
3259 | 3263 | } elseif( is_array($wgRemoveGroups[$group]) ) { |
3260 | 3264 | $groups['remove'] = $wgRemoveGroups[$group]; |
3261 | 3265 | } |
3262 | | - |
| 3266 | + |
3263 | 3267 | // Re-map numeric keys of AddToSelf/RemoveFromSelf to the 'user' key for backwards compatibility |
3264 | 3268 | if( empty($wgGroupsAddToSelf['user']) || $wgGroupsAddToSelf['user'] !== true ) { |
3265 | 3269 | foreach($wgGroupsAddToSelf as $key => $value) { |
— | — | @@ -3267,7 +3271,7 @@ |
3268 | 3272 | } |
3269 | 3273 | } |
3270 | 3274 | } |
3271 | | - |
| 3275 | + |
3272 | 3276 | if( empty($wgGroupsRemoveFromSelf['user']) || $wgGroupsRemoveFromSelf['user'] !== true ) { |
3273 | 3277 | foreach($wgGroupsRemoveFromSelf as $key => $value) { |
3274 | 3278 | if( is_int($key) ) { |
— | — | @@ -3275,7 +3279,7 @@ |
3276 | 3280 | } |
3277 | 3281 | } |
3278 | 3282 | } |
3279 | | - |
| 3283 | + |
3280 | 3284 | // Now figure out what groups the user can add to him/herself |
3281 | 3285 | if( empty($wgGroupsAddToSelf[$group]) ) { |
3282 | 3286 | } elseif( $wgGroupsAddToSelf[$group] === true ) { |
— | — | @@ -3284,17 +3288,17 @@ |
3285 | 3289 | } elseif( is_array($wgGroupsAddToSelf[$group]) ) { |
3286 | 3290 | $groups['add-self'] = $wgGroupsAddToSelf[$group]; |
3287 | 3291 | } |
3288 | | - |
| 3292 | + |
3289 | 3293 | if( empty($wgGroupsRemoveFromSelf[$group]) ) { |
3290 | 3294 | } elseif( $wgGroupsRemoveFromSelf[$group] === true ) { |
3291 | 3295 | $groups['remove-self'] = User::getAllGroups(); |
3292 | 3296 | } elseif( is_array($wgGroupsRemoveFromSelf[$group]) ) { |
3293 | 3297 | $groups['remove-self'] = $wgGroupsRemoveFromSelf[$group]; |
3294 | 3298 | } |
3295 | | - |
| 3299 | + |
3296 | 3300 | return $groups; |
3297 | 3301 | } |
3298 | | - |
| 3302 | + |
3299 | 3303 | /** |
3300 | 3304 | * Returns an array of groups that this user can add and remove |
3301 | 3305 | * @return Array array( 'add' => array( addablegroups ), |
— | — | @@ -3380,7 +3384,7 @@ |
3381 | 3385 | // edit count in user cache too |
3382 | 3386 | $this->invalidateCache(); |
3383 | 3387 | } |
3384 | | - |
| 3388 | + |
3385 | 3389 | /** |
3386 | 3390 | * Get the description of a given right |
3387 | 3391 | * |
— | — | @@ -3417,7 +3421,7 @@ |
3418 | 3422 | * Make a new-style password hash |
3419 | 3423 | * |
3420 | 3424 | * @param $password \string Plain-text password |
3421 | | - * @param $salt \string Optional salt, may be random or the user ID. |
| 3425 | + * @param $salt \string Optional salt, may be random or the user ID. |
3422 | 3426 | * If unspecified or false, will generate one automatically |
3423 | 3427 | * @return \string Password hash |
3424 | 3428 | */ |
— | — | @@ -3428,7 +3432,7 @@ |
3429 | 3433 | if( !wfRunHooks( 'UserCryptPassword', array( &$password, &$salt, &$wgPasswordSalt, &$hash ) ) ) { |
3430 | 3434 | return $hash; |
3431 | 3435 | } |
3432 | | - |
| 3436 | + |
3433 | 3437 | if( $wgPasswordSalt ) { |
3434 | 3438 | if ( $salt === false ) { |
3435 | 3439 | $salt = substr( wfGenerateToken(), 0, 8 ); |
— | — | @@ -3451,12 +3455,12 @@ |
3452 | 3456 | static function comparePasswords( $hash, $password, $userId = false ) { |
3453 | 3457 | $m = false; |
3454 | 3458 | $type = substr( $hash, 0, 3 ); |
3455 | | - |
| 3459 | + |
3456 | 3460 | $result = false; |
3457 | 3461 | if( !wfRunHooks( 'UserComparePasswords', array( &$hash, &$password, &$userId, &$result ) ) ) { |
3458 | 3462 | return $result; |
3459 | 3463 | } |
3460 | | - |
| 3464 | + |
3461 | 3465 | if ( $type == ':A:' ) { |
3462 | 3466 | # Unsalted |
3463 | 3467 | return md5( $password ) === substr( $hash, 3 ); |
— | — | @@ -3469,7 +3473,7 @@ |
3470 | 3474 | return self::oldCrypt( $password, $userId ) === $hash; |
3471 | 3475 | } |
3472 | 3476 | } |
3473 | | - |
| 3477 | + |
3474 | 3478 | /** |
3475 | 3479 | * Add a newuser log entry for this user |
3476 | 3480 | * @param $byEmail Boolean: account made by email? |
Index: trunk/phase3/includes/Article.php |
— | — | @@ -108,7 +108,7 @@ |
109 | 109 | return null; |
110 | 110 | } |
111 | 111 | $dbw = wfGetDB( DB_MASTER ); |
112 | | - $dbw->replace( 'redirect', array('rd_from'), |
| 112 | + $dbw->replace( 'redirect', array('rd_from'), |
113 | 113 | array( |
114 | 114 | 'rd_from' => $this->getID(), |
115 | 115 | 'rd_namespace' => $retval->getNamespace(), |
— | — | @@ -228,7 +228,7 @@ |
229 | 229 | return $this->mContent; |
230 | 230 | } |
231 | 231 | } |
232 | | - |
| 232 | + |
233 | 233 | /** |
234 | 234 | * Get the text of the current revision. No side-effects... |
235 | 235 | * |
— | — | @@ -260,12 +260,12 @@ |
261 | 261 | global $wgParser; |
262 | 262 | return $wgParser->getSection( $text, $section ); |
263 | 263 | } |
264 | | - |
| 264 | + |
265 | 265 | /** |
266 | 266 | * Get the text that needs to be saved in order to undo all revisions |
267 | 267 | * between $undo and $undoafter. Revisions must belong to the same page, |
268 | 268 | * must exist and must not be deleted |
269 | | - * @param $undo Revision |
| 269 | + * @param $undo Revision |
270 | 270 | * @param $undoafter Revision Must be an earlier revision than $undo |
271 | 271 | * @return mixed string on success, false on failure |
272 | 272 | */ |
— | — | @@ -545,7 +545,7 @@ |
546 | 546 | public function exists() { |
547 | 547 | return $this->getId() > 0; |
548 | 548 | } |
549 | | - |
| 549 | + |
550 | 550 | /** |
551 | 551 | * Check if this page is something we're going to be showing |
552 | 552 | * some sort of sensible content for. If we return false, page |
— | — | @@ -568,10 +568,10 @@ |
569 | 569 | $this->mCounter = 0; |
570 | 570 | } else { |
571 | 571 | $dbr = wfGetDB( DB_SLAVE ); |
572 | | - $this->mCounter = $dbr->selectField( 'page', |
573 | | - 'page_counter', |
574 | | - array( 'page_id' => $id ), |
575 | | - __METHOD__, |
| 572 | + $this->mCounter = $dbr->selectField( 'page', |
| 573 | + 'page_counter', |
| 574 | + array( 'page_id' => $id ), |
| 575 | + __METHOD__, |
576 | 576 | $this->getSelectOptions() |
577 | 577 | ); |
578 | 578 | } |
— | — | @@ -731,7 +731,7 @@ |
732 | 732 | if( $wgOut->isPrintable() ) { |
733 | 733 | $wgOut->parserOptions()->setIsPrintable( true ); |
734 | 734 | } |
735 | | - |
| 735 | + |
736 | 736 | wfProfileIn( __METHOD__ ); |
737 | 737 | |
738 | 738 | # Get variables from query string |
— | — | @@ -813,7 +813,7 @@ |
814 | 814 | wfProfileOut( __METHOD__ ); |
815 | 815 | return; |
816 | 816 | } |
817 | | - |
| 817 | + |
818 | 818 | if( $ns == NS_USER || $ns == NS_USER_TALK ) { |
819 | 819 | # User/User_talk subpages are not modified. (bug 11443) |
820 | 820 | if( !$this->mTitle->isSubpage() ) { |
— | — | @@ -907,7 +907,7 @@ |
908 | 908 | $text = wfMsgExt( 'noarticletext', 'parsemag' ); |
909 | 909 | } |
910 | 910 | } |
911 | | - |
| 911 | + |
912 | 912 | # Non-existent pages |
913 | 913 | if( $this->getID() === 0 ) { |
914 | 914 | $wgOut->setRobotPolicy( 'noindex,nofollow' ); |
— | — | @@ -931,7 +931,7 @@ |
932 | 932 | wfProfileOut( __METHOD__ ); |
933 | 933 | return; |
934 | 934 | } |
935 | | - |
| 935 | + |
936 | 936 | # For ?curid=x urls, disallow indexing |
937 | 937 | if( $wgRequest->getInt('curid') ) |
938 | 938 | $wgOut->setRobotPolicy( 'noindex,follow' ); |
— | — | @@ -1074,7 +1074,7 @@ |
1075 | 1075 | $this->viewUpdates(); |
1076 | 1076 | wfProfileOut( __METHOD__ ); |
1077 | 1077 | } |
1078 | | - |
| 1078 | + |
1079 | 1079 | protected function showLogs() { |
1080 | 1080 | global $wgUser, $wgOut; |
1081 | 1081 | $loglist = new LogEventsList( $wgUser->getSkin(), $wgOut ); |
— | — | @@ -1094,7 +1094,7 @@ |
1095 | 1095 | SpecialPage::getTitleFor( 'Log' ), |
1096 | 1096 | wfMsgHtml( 'log-fulllog' ), |
1097 | 1097 | array(), |
1098 | | - array( 'page' => $this->mTitle->getPrefixedText() ) |
| 1098 | + array( 'page' => $this->mTitle->getPrefixedText() ) |
1099 | 1099 | ) ); |
1100 | 1100 | } |
1101 | 1101 | $wgOut->addHTML( '</div>' ); |
— | — | @@ -1131,7 +1131,7 @@ |
1132 | 1132 | $imageUrl = $wgStylePath . '/common/images/redirect' . $imageDir . '.png'; |
1133 | 1133 | $imageUrl2 = $wgStylePath . '/common/images/nextredirect' . $imageDir . '.png'; |
1134 | 1134 | $alt2 = $wgContLang->isRTL() ? '←' : '→'; // should -> and <- be used instead of entities? |
1135 | | - |
| 1135 | + |
1136 | 1136 | if( $appendSubtitle ) { |
1137 | 1137 | $wgOut->appendSubtitle( wfMsgHtml( 'redirectpagesub' ) ); |
1138 | 1138 | } |
— | — | @@ -1570,9 +1570,9 @@ |
1571 | 1571 | * Fill in blank summaries with generated text where possible |
1572 | 1572 | * |
1573 | 1573 | * If neither EDIT_NEW nor EDIT_UPDATE is specified, the status of the article will be detected. |
1574 | | - * If EDIT_UPDATE is specified and the article doesn't exist, the function will an |
1575 | | - * edit-gone-missing error. If EDIT_NEW is specified and the article does exist, an |
1576 | | - * edit-already-exists error will be returned. These two conditions are also possible with |
| 1574 | + * If EDIT_UPDATE is specified and the article doesn't exist, the function will an |
| 1575 | + * edit-gone-missing error. If EDIT_NEW is specified and the article does exist, an |
| 1576 | + * edit-already-exists error will be returned. These two conditions are also possible with |
1577 | 1577 | * auto-detection due to MediaWiki's performance-optimised locking strategy. |
1578 | 1578 | * |
1579 | 1579 | * @param $baseRevId the revision ID this edit was based off, if any |
— | — | @@ -1607,7 +1607,7 @@ |
1608 | 1608 | $status = Status::newGood( array() ); |
1609 | 1609 | |
1610 | 1610 | # Load $this->mTitle->getArticleID() and $this->mLatest if it's not already |
1611 | | - $this->loadPageData(); |
| 1611 | + $this->loadPageData(); |
1612 | 1612 | |
1613 | 1613 | if( !($flags & EDIT_NEW) && !($flags & EDIT_UPDATE) ) { |
1614 | 1614 | $aid = $this->mTitle->getArticleID(); |
— | — | @@ -1688,9 +1688,9 @@ |
1689 | 1689 | |
1690 | 1690 | # Update page |
1691 | 1691 | # |
1692 | | - # Note that we use $this->mLatest instead of fetching a value from the master DB |
1693 | | - # during the course of this function. This makes sure that EditPage can detect |
1694 | | - # edit conflicts reliably, either by $ok here, or by $article->getTimestamp() |
| 1692 | + # Note that we use $this->mLatest instead of fetching a value from the master DB |
| 1693 | + # during the course of this function. This makes sure that EditPage can detect |
| 1694 | + # edit conflicts reliably, either by $ok here, or by $article->getTimestamp() |
1695 | 1695 | # before this function is called. A previous function used a separate query, this |
1696 | 1696 | # creates a window where concurrent edits can cause an ignored edit conflict. |
1697 | 1697 | $ok = $this->updateRevisionOn( $dbw, $revision, $this->mLatest ); |
— | — | @@ -1883,12 +1883,12 @@ |
1884 | 1884 | $wgOut->showErrorPage( 'rcpatroldisabled', 'rcpatroldisabledtext' ); |
1885 | 1885 | return; |
1886 | 1886 | } |
1887 | | - |
| 1887 | + |
1888 | 1888 | if( in_array(array('hookaborted'), $errors) ) { |
1889 | 1889 | // The hook itself has handled any output |
1890 | 1890 | return; |
1891 | 1891 | } |
1892 | | - |
| 1892 | + |
1893 | 1893 | if( in_array(array('markedaspatrollederror-noautopatrol'), $errors) ) { |
1894 | 1894 | $wgOut->setPageTitle( wfMsg( 'markedaspatrollederror' ) ); |
1895 | 1895 | $wgOut->addWikiMsg( 'markedaspatrollederror-noautopatrol' ); |
— | — | @@ -2014,12 +2014,12 @@ |
2015 | 2015 | wfDebug( "updateRestrictions failed: $id <= 0\n" ); |
2016 | 2016 | return false; |
2017 | 2017 | } |
2018 | | - |
| 2018 | + |
2019 | 2019 | if ( wfReadOnly() ) { |
2020 | 2020 | wfDebug( "updateRestrictions failed: read-only\n" ); |
2021 | 2021 | return false; |
2022 | 2022 | } |
2023 | | - |
| 2023 | + |
2024 | 2024 | if ( !$this->mTitle->userCan( 'protect' ) ) { |
2025 | 2025 | wfDebug( "updateRestrictions failed: insufficient permissions\n" ); |
2026 | 2026 | return false; |
— | — | @@ -2064,7 +2064,7 @@ |
2065 | 2065 | if( wfRunHooks( 'ArticleProtect', array( &$this, &$wgUser, $limit, $reason ) ) ) { |
2066 | 2066 | |
2067 | 2067 | $dbw = wfGetDB( DB_MASTER ); |
2068 | | - |
| 2068 | + |
2069 | 2069 | # Prepare a null revision to be added to the history |
2070 | 2070 | $modified = $current != '' && $protect; |
2071 | 2071 | if( $protect ) { |
— | — | @@ -2080,9 +2080,9 @@ |
2081 | 2081 | # The schema allows multiple restrictions |
2082 | 2082 | if(!in_array('protect', $editrestriction) && !in_array('sysop', $editrestriction)) |
2083 | 2083 | $cascade = false; |
2084 | | - $cascade_description = ''; |
| 2084 | + $cascade_description = ''; |
2085 | 2085 | if( $cascade ) { |
2086 | | - $cascade_description = ' ['.wfMsgForContent('protect-summary-cascade').']'; |
| 2086 | + $cascade_description = ' ['.wfMsgForContent('protect-summary-cascade').']'; |
2087 | 2087 | } |
2088 | 2088 | |
2089 | 2089 | if( $reason ) |
— | — | @@ -2094,15 +2094,15 @@ |
2095 | 2095 | foreach( $limit as $action => $restrictions ) { |
2096 | 2096 | if ( !isset($expiry[$action]) ) |
2097 | 2097 | $expiry[$action] = 'infinite'; |
2098 | | - |
| 2098 | + |
2099 | 2099 | $encodedExpiry[$action] = Block::encodeExpiry($expiry[$action], $dbw ); |
2100 | 2100 | if( $restrictions != '' ) { |
2101 | 2101 | $protect_description .= "[$action=$restrictions] ("; |
2102 | 2102 | if( $encodedExpiry[$action] != 'infinity' ) { |
2103 | | - $protect_description .= wfMsgForContent( 'protect-expiring', |
| 2103 | + $protect_description .= wfMsgForContent( 'protect-expiring', |
2104 | 2104 | $wgContLang->timeanddate( $expiry[$action], false, false ) , |
2105 | 2105 | $wgContLang->date( $expiry[$action], false, false ) , |
2106 | | - $wgContLang->time( $expiry[$action], false, false ) ); |
| 2106 | + $wgContLang->time( $expiry[$action], false, false ) ); |
2107 | 2107 | } else { |
2108 | 2108 | $protect_description .= wfMsgForContent( 'protect-expiry-indefinite' ); |
2109 | 2109 | } |
— | — | @@ -2110,7 +2110,7 @@ |
2111 | 2111 | } |
2112 | 2112 | } |
2113 | 2113 | $protect_description = trim($protect_description); |
2114 | | - |
| 2114 | + |
2115 | 2115 | if( $protect_description && $protect ) |
2116 | 2116 | $editComment .= " ($protect_description)"; |
2117 | 2117 | if( $cascade ) |
— | — | @@ -2119,9 +2119,9 @@ |
2120 | 2120 | foreach( $limit as $action => $restrictions ) { |
2121 | 2121 | if($restrictions != '' ) { |
2122 | 2122 | $dbw->replace( 'page_restrictions', array(array('pr_page', 'pr_type')), |
2123 | | - array( 'pr_page' => $id, |
2124 | | - 'pr_type' => $action, |
2125 | | - 'pr_level' => $restrictions, |
| 2123 | + array( 'pr_page' => $id, |
| 2124 | + 'pr_type' => $action, |
| 2125 | + 'pr_level' => $restrictions, |
2126 | 2126 | 'pr_cascade' => ($cascade && $action == 'edit') ? 1 : 0, |
2127 | 2127 | 'pr_expiry' => $encodedExpiry[$action] ), __METHOD__ ); |
2128 | 2128 | } else { |
— | — | @@ -2219,7 +2219,7 @@ |
2220 | 2220 | if( $res === false ) |
2221 | 2221 | // This page has no revisions, which is very weird |
2222 | 2222 | return false; |
2223 | | - |
| 2223 | + |
2224 | 2224 | $hasHistory = ( $res->numRows() > 1 ); |
2225 | 2225 | $row = $dbw->fetchObject( $res ); |
2226 | 2226 | $onlyAuthor = $row->rev_user_text; |
— | — | @@ -2243,7 +2243,7 @@ |
2244 | 2244 | else |
2245 | 2245 | $reason = wfMsgForContent( 'excontent', '$1' ); |
2246 | 2246 | } |
2247 | | - |
| 2247 | + |
2248 | 2248 | if( $reason == '-' ) { |
2249 | 2249 | // Allow these UI messages to be blanked out cleanly |
2250 | 2250 | return ''; |
— | — | @@ -2454,7 +2454,7 @@ |
2455 | 2455 | } |
2456 | 2456 | $checkWatch = $wgUser->getBoolOption( 'watchdeletion' ) || $this->mTitle->userIsWatching(); |
2457 | 2457 | |
2458 | | - $form = Xml::openElement( 'form', array( 'method' => 'post', |
| 2458 | + $form = Xml::openElement( 'form', array( 'method' => 'post', |
2459 | 2459 | 'action' => $this->mTitle->getLocalURL( 'action=delete' ), 'id' => 'deleteconfirm' ) ) . |
2460 | 2460 | Xml::openElement( 'fieldset', array( 'id' => 'mw-delete-table' ) ) . |
2461 | 2461 | Xml::tags( 'legend', null, wfMsgExt( 'delete-legend', array( 'parsemag', 'escapenoentities' ) ) ) . |
— | — | @@ -2474,7 +2474,7 @@ |
2475 | 2475 | Xml::label( wfMsg( 'deleteotherreason' ), 'wpReason' ) . |
2476 | 2476 | "</td> |
2477 | 2477 | <td class='mw-input'>" . |
2478 | | - Xml::input( 'wpReason', 60, $reason, array( 'type' => 'text', 'maxlength' => '255', |
| 2478 | + Xml::input( 'wpReason', 60, $reason, array( 'type' => 'text', 'maxlength' => '255', |
2479 | 2479 | 'tabindex' => '2', 'id' => 'wpReason' ) ) . |
2480 | 2480 | "</td> |
2481 | 2481 | </tr> |
— | — | @@ -2624,7 +2624,7 @@ |
2625 | 2625 | $dbw->rollback(); |
2626 | 2626 | return false; |
2627 | 2627 | } |
2628 | | - |
| 2628 | + |
2629 | 2629 | # Fix category table counts |
2630 | 2630 | $cats = array(); |
2631 | 2631 | $res = $dbw->select( 'categorylinks', 'cl_to', array( 'cl_from' => $id ), __METHOD__ ); |
— | — | @@ -2654,7 +2654,7 @@ |
2655 | 2655 | if( !$dbw->cleanupTriggers() ) { |
2656 | 2656 | # Clean up recentchanges entries... |
2657 | 2657 | $dbw->delete( 'recentchanges', |
2658 | | - array( 'rc_type != '.RC_LOG, |
| 2658 | + array( 'rc_type != '.RC_LOG, |
2659 | 2659 | 'rc_namespace' => $this->mTitle->getNamespace(), |
2660 | 2660 | 'rc_title' => $this->mTitle->getDBkey() ), |
2661 | 2661 | __METHOD__ ); |
— | — | @@ -2865,7 +2865,7 @@ |
2866 | 2866 | if( isset( $details['current'] ) ){ |
2867 | 2867 | $current = $details['current']; |
2868 | 2868 | if( $current->getComment() != '' ) { |
2869 | | - $wgOut->addWikiMsgArray( 'editcomment', array( |
| 2869 | + $wgOut->addWikiMsgArray( 'editcomment', array( |
2870 | 2870 | $wgUser->getSkin()->formatComment( $current->getComment() ) ), array( 'replaceafter' ) ); |
2871 | 2871 | } |
2872 | 2872 | } |
— | — | @@ -2989,7 +2989,7 @@ |
2990 | 2990 | # Update the links tables |
2991 | 2991 | $u = new LinksUpdate( $this->mTitle, $editInfo->output ); |
2992 | 2992 | $u->doUpdate(); |
2993 | | - |
| 2993 | + |
2994 | 2994 | wfRunHooks( 'ArticleEditUpdates', array( &$this, &$editInfo, $changed ) ); |
2995 | 2995 | |
2996 | 2996 | if( wfRunHooks( 'ArticleEditUpdatesDeleteFromRecentchanges', array( &$this ) ) ) { |
Index: trunk/phase3/includes/DefaultSettings.php |
— | — | @@ -226,7 +226,7 @@ |
227 | 227 | * equivalent to the corresponding member of $wgDBservers |
228 | 228 | * tablePrefix Table prefix, the foreign wiki's $wgDBprefix |
229 | 229 | * hasSharedCache True if the wiki's shared cache is accessible via the local $wgMemc |
230 | | - * |
| 230 | + * |
231 | 231 | * ForeignAPIRepo: |
232 | 232 | * apibase Use for the foreign API's URL |
233 | 233 | * apiThumbCacheExpiry How long to locally cache thumbs for |
— | — | @@ -739,7 +739,7 @@ |
740 | 740 | $wgSessionsInMemcached = false; |
741 | 741 | |
742 | 742 | /** This is used for setting php's session.save_handler. In practice, you will |
743 | | - * almost never need to change this ever. Other options might be 'user' or |
| 743 | + * almost never need to change this ever. Other options might be 'user' or |
744 | 744 | * 'session_mysql.' Setting to null skips setting this entirely (which might be |
745 | 745 | * useful if you're doing cross-application sessions, see bug 11381) */ |
746 | 746 | $wgSessionHandler = 'files'; |
— | — | @@ -793,7 +793,7 @@ |
794 | 794 | |
795 | 795 | /** |
796 | 796 | * Locale for LC_CTYPE, to work around http://bugs.php.net/bug.php?id=45132 |
797 | | - * For Unix-like operating systems, set this to to a locale that has a UTF-8 |
| 797 | + * For Unix-like operating systems, set this to to a locale that has a UTF-8 |
798 | 798 | * character set. Only the character set is relevant. |
799 | 799 | */ |
800 | 800 | $wgShellLocale = 'en_US.utf8'; |
— | — | @@ -980,11 +980,11 @@ |
981 | 981 | $wgSiteSupportPage = ''; # A page where you users can receive donations |
982 | 982 | |
983 | 983 | /** |
984 | | - * Set this to a string to put the wiki into read-only mode. The text will be |
985 | | - * used as an explanation to users. |
| 984 | + * Set this to a string to put the wiki into read-only mode. The text will be |
| 985 | + * used as an explanation to users. |
986 | 986 | * |
987 | | - * This prevents most write operations via the web interface. Cache updates may |
988 | | - * still be possible. To prevent database writes completely, use the read_only |
| 987 | + * This prevents most write operations via the web interface. Cache updates may |
| 988 | + * still be possible. To prevent database writes completely, use the read_only |
989 | 989 | * option in MySQL. |
990 | 990 | */ |
991 | 991 | $wgReadOnly = null; |
— | — | @@ -999,7 +999,7 @@ |
1000 | 1000 | /** |
1001 | 1001 | * Filename for debug logging. See http://www.mediawiki.org/wiki/How_to_debug |
1002 | 1002 | * The debug log file should be not be publicly accessible if it is used, as it |
1003 | | - * may contain private data. |
| 1003 | + * may contain private data. |
1004 | 1004 | */ |
1005 | 1005 | $wgDebugLogFile = ''; |
1006 | 1006 | |
— | — | @@ -1009,14 +1009,14 @@ |
1010 | 1010 | $wgDebugLogPrefix = ''; |
1011 | 1011 | |
1012 | 1012 | /** |
1013 | | - * If true, instead of redirecting, show a page with a link to the redirect |
| 1013 | + * If true, instead of redirecting, show a page with a link to the redirect |
1014 | 1014 | * destination. This allows for the inspection of PHP error messages, and easy |
1015 | 1015 | * resubmission of form data. For developer use only. |
1016 | 1016 | */ |
1017 | 1017 | $wgDebugRedirects = false; |
1018 | 1018 | |
1019 | 1019 | /** |
1020 | | - * If true, log debugging data from action=raw. |
| 1020 | + * If true, log debugging data from action=raw. |
1021 | 1021 | * This is normally false to avoid overlapping debug entries due to gen=css and |
1022 | 1022 | * gen=js requests. |
1023 | 1023 | */ |
— | — | @@ -1027,7 +1027,7 @@ |
1028 | 1028 | * |
1029 | 1029 | * This may occasionally be useful when supporting a non-technical end-user. It's |
1030 | 1030 | * more secure than exposing the debug log file to the web, since the output only |
1031 | | - * contains private data for the current user. But it's not ideal for development |
| 1031 | + * contains private data for the current user. But it's not ideal for development |
1032 | 1032 | * use since data is lost on fatal errors and redirects. |
1033 | 1033 | */ |
1034 | 1034 | $wgDebugComments = false; |
— | — | @@ -1104,7 +1104,7 @@ |
1105 | 1105 | * same options. |
1106 | 1106 | * |
1107 | 1107 | * This can provide a significant speedup for medium to large pages, |
1108 | | - * so you probably want to keep it on. Extensions that conflict with the |
| 1108 | + * so you probably want to keep it on. Extensions that conflict with the |
1109 | 1109 | * parser cache should disable the cache on a per-page basis instead. |
1110 | 1110 | */ |
1111 | 1111 | $wgEnableParserCache = true; |
— | — | @@ -1293,6 +1293,15 @@ |
1294 | 1294 | */ |
1295 | 1295 | # $wgGroupPermissions['developer']['siteadmin'] = true; |
1296 | 1296 | |
| 1297 | +/** |
| 1298 | + * Permission keys revoked from users in each group. |
| 1299 | + * This acts the same way as wgGroupPermissions above, except that |
| 1300 | + * if the user is in a group here, the permission will be removed from them. |
| 1301 | + * |
| 1302 | + * Improperly setting this could mean that your users will be unable to perform |
| 1303 | + * certain essential tasks, so use at your own risk! |
| 1304 | + */ |
| 1305 | +$wgRevokePermissions = array(); |
1297 | 1306 | |
1298 | 1307 | /** |
1299 | 1308 | * Implicit groups, aren't shown on Special:Listusers or somewhere else |
— | — | @@ -1304,7 +1313,7 @@ |
1305 | 1314 | * are allowed to add or revoke. |
1306 | 1315 | * |
1307 | 1316 | * Setting the list of groups to add or revoke to true is equivalent to "any group". |
1308 | | - * |
| 1317 | + * |
1309 | 1318 | * For example, to allow sysops to add themselves to the "bot" group: |
1310 | 1319 | * |
1311 | 1320 | * $wgGroupsAddToSelf = array( 'sysop' => array( 'bot' ) ); |
— | — | @@ -1315,7 +1324,7 @@ |
1316 | 1325 | * |
1317 | 1326 | * This allows users in the '*' group (i.e. any user) to remove themselves from |
1318 | 1327 | * any group that they happen to be in. |
1319 | | - * |
| 1328 | + * |
1320 | 1329 | */ |
1321 | 1330 | $wgGroupsAddToSelf = array(); |
1322 | 1331 | $wgGroupsRemoveFromSelf = array(); |
— | — | @@ -1389,6 +1398,7 @@ |
1390 | 1399 | * array( APCOND_ISIP, ip ), *OR* |
1391 | 1400 | * array( APCOND_IPINRANGE, range ), *OR* |
1392 | 1401 | * array( APCOND_AGE_FROM_EDIT, seconds since first edit ), *OR* |
| 1402 | + * array( APCOND_BLOCKED ), *OR* |
1393 | 1403 | * similar constructs defined by extensions. |
1394 | 1404 | * |
1395 | 1405 | * If $wgEmailAuthentication is off, APCOND_EMAILCONFIRMED will be true for any |
— | — | @@ -1486,7 +1496,7 @@ |
1487 | 1497 | * to ensure that client-side caches do not keep obsolete copies of global |
1488 | 1498 | * styles. |
1489 | 1499 | */ |
1490 | | -$wgStyleVersion = '226'; |
| 1500 | +$wgStyleVersion = '227'; |
1491 | 1501 | |
1492 | 1502 | |
1493 | 1503 | # Server-side caching: |
— | — | @@ -1709,7 +1719,7 @@ |
1710 | 1720 | * Or false to disable it |
1711 | 1721 | */ |
1712 | 1722 | $wgEnableImageWhitelist = true; |
1713 | | - |
| 1723 | + |
1714 | 1724 | /** Allows to move images and other media files */ |
1715 | 1725 | $wgAllowImageMoving = true; |
1716 | 1726 | |
— | — | @@ -1986,13 +1996,13 @@ |
1987 | 1997 | ); |
1988 | 1998 | |
1989 | 1999 | /** |
1990 | | - * Namespaces to be searched when user clicks the "Help" tab |
| 2000 | + * Namespaces to be searched when user clicks the "Help" tab |
1991 | 2001 | * on Special:Search |
1992 | | - * |
| 2002 | + * |
1993 | 2003 | * Same format as $wgNamespacesToBeSearchedDefault |
1994 | | - */ |
| 2004 | + */ |
1995 | 2005 | $wgNamespacesToBeSearchedHelp = array( |
1996 | | - NS_PROJECT => true, |
| 2006 | + NS_PROJECT => true, |
1997 | 2007 | NS_HELP => true, |
1998 | 2008 | ); |
1999 | 2009 | |
— | — | @@ -2055,8 +2065,8 @@ |
2056 | 2066 | /** Reduction in linear dimensions below which sharpening will be enabled */ |
2057 | 2067 | $wgSharpenReductionThreshold = 0.85; |
2058 | 2068 | |
2059 | | -/** |
2060 | | - * Temporary directory used for ImageMagick. The directory must exist. Leave |
| 2069 | +/** |
| 2070 | + * Temporary directory used for ImageMagick. The directory must exist. Leave |
2061 | 2071 | * this set to false to let ImageMagick decide for itself. |
2062 | 2072 | */ |
2063 | 2073 | $wgImageMagickTempDir = false; |
— | — | @@ -2196,19 +2206,19 @@ |
2197 | 2207 | /** |
2198 | 2208 | * Prefix to prepend to each UDP packet. |
2199 | 2209 | * This can be used to identify the wiki. A script is available called |
2200 | | - * mxircecho.py which listens on a UDP port, and uses a prefix ending in a |
| 2210 | + * mxircecho.py which listens on a UDP port, and uses a prefix ending in a |
2201 | 2211 | * tab to identify the IRC channel to send the log line to. |
2202 | 2212 | */ |
2203 | 2213 | $wgRC2UDPPrefix = ''; |
2204 | 2214 | |
2205 | 2215 | /** |
2206 | | - * If this is set to true, $wgLocalInterwiki will be prepended to links in the |
| 2216 | + * If this is set to true, $wgLocalInterwiki will be prepended to links in the |
2207 | 2217 | * IRC feed. If this is set to a string, that string will be used as the prefix. |
2208 | 2218 | */ |
2209 | 2219 | $wgRC2UDPInterwikiPrefix = false; |
2210 | 2220 | |
2211 | 2221 | /** |
2212 | | - * Set to true to omit "bot" edits (by users with the bot permission) from the |
| 2222 | + * Set to true to omit "bot" edits (by users with the bot permission) from the |
2213 | 2223 | * UDP feed. |
2214 | 2224 | */ |
2215 | 2225 | $wgRC2UDPOmitBots = false; |
— | — | @@ -2514,8 +2524,8 @@ |
2515 | 2525 | 'disablemail' => 0, |
2516 | 2526 | ); |
2517 | 2527 | |
2518 | | -/** |
2519 | | - * Whether or not to allow and use real name fields. |
| 2528 | +/** |
| 2529 | + * Whether or not to allow and use real name fields. |
2520 | 2530 | * @deprecated in 1.16, use $wgHiddenPrefs[] = 'realname' below to disable real |
2521 | 2531 | * names |
2522 | 2532 | */ |
— | — | @@ -2926,7 +2936,7 @@ |
2927 | 2937 | * |
2928 | 2938 | * This is associative array of log type => boolean "hide by default" |
2929 | 2939 | * |
2930 | | - * See $wgLogTypes for a list of available log types. |
| 2940 | + * See $wgLogTypes for a list of available log types. |
2931 | 2941 | * |
2932 | 2942 | * For example: |
2933 | 2943 | * $wgFilterLogTypes => array( |
— | — | @@ -2935,7 +2945,7 @@ |
2936 | 2946 | * ); |
2937 | 2947 | * |
2938 | 2948 | * Will display show/hide links for the move and import logs. Move logs will be |
2939 | | - * hidden by default unless the link is clicked. Import logs will be shown by |
| 2949 | + * hidden by default unless the link is clicked. Import logs will be shown by |
2940 | 2950 | * default, and hidden when the link is clicked. |
2941 | 2951 | * |
2942 | 2952 | * A message of the form log-show-hide-<type> should be added, and will be used |
— | — | @@ -3733,7 +3743,7 @@ |
3734 | 3744 | |
3735 | 3745 | /** |
3736 | 3746 | * Fix double redirects after a page move. |
3737 | | - * Tends to conflict with page move vandalism, use only on a private wiki. |
| 3747 | + * Tends to conflict with page move vandalism, use only on a private wiki. |
3738 | 3748 | */ |
3739 | 3749 | $wgFixDoubleRedirects = false; |
3740 | 3750 | |
— | — | @@ -3755,7 +3765,7 @@ |
3756 | 3766 | * other namespaces cannot be invalidated by this variable. |
3757 | 3767 | */ |
3758 | 3768 | $wgInvalidRedirectTargets = array( 'Filepath', 'Mypage', 'Mytalk' ); |
3759 | | - |
| 3769 | + |
3760 | 3770 | /** |
3761 | 3771 | * Array of namespaces to generate a sitemap for when the |
3762 | 3772 | * maintenance/generateSitemap.php script is run, or false if one is to be ge- |
Index: trunk/phase3/includes/specials/SpecialListgrouprights.php |
— | — | @@ -25,7 +25,7 @@ |
26 | 26 | */ |
27 | 27 | public function execute( $par ) { |
28 | 28 | global $wgOut, $wgImplicitGroups, $wgMessageCache; |
29 | | - global $wgGroupPermissions, $wgAddGroups, $wgRemoveGroups; |
| 29 | + global $wgGroupPermissions, $wgRevokePermissions, $wgAddGroups, $wgRemoveGroups; |
30 | 30 | global $wgGroupsAddToSelf, $wgGroupsRemoveFromSelf; |
31 | 31 | $wgMessageCache->loadAllMessages(); |
32 | 32 | |
— | — | @@ -89,9 +89,9 @@ |
90 | 90 | $grouplink = ''; |
91 | 91 | } |
92 | 92 | |
| 93 | + $revoke = isset( $wgRevokePermissions[$group] ) ? $wgRevokePermissions[$group] : array(); |
93 | 94 | $addgroups = isset( $wgAddGroups[$group] ) ? $wgAddGroups[$group] : array(); |
94 | 95 | $removegroups = isset( $wgRemoveGroups[$group] ) ? $wgRemoveGroups[$group] : array(); |
95 | | - |
96 | 96 | $addgroupsSelf = isset( $wgGroupsAddToSelf[$group] ) ? $wgGroupsAddToSelf[$group] : array(); |
97 | 97 | $removegroupsSelf = isset( $wgGroupsRemoveFromSelf[$group] ) ? $wgGroupsRemoveFromSelf[$group] : array(); |
98 | 98 | |
— | — | @@ -101,27 +101,33 @@ |
102 | 102 | $grouppage . $grouplink . |
103 | 103 | '</td> |
104 | 104 | <td>' . |
105 | | - self::formatPermissions( $permissions, $addgroups, $removegroups, $addgroupsSelf, $removegroupsSelf ) . |
| 105 | + self::formatPermissions( $permissions, $revoke, $addgroups, $removegroups, $addgroupsSelf, $removegroupsSelf ) . |
106 | 106 | '</td> |
107 | 107 | </tr>' |
108 | 108 | ); |
109 | 109 | } |
110 | 110 | $wgOut->addHTML( |
111 | | - Xml::closeElement( 'table' ) . "\n" |
| 111 | + Xml::closeElement( 'table' ) . "\n<br /><hr />\n" |
112 | 112 | ); |
| 113 | + $wgOut->addWikiMsg( 'listgrouprights-key' ); |
113 | 114 | } |
114 | 115 | |
115 | 116 | /** |
116 | 117 | * Create a user-readable list of permissions from the given array. |
117 | 118 | * |
118 | 119 | * @param $permissions Array of permission => bool (from $wgGroupPermissions items) |
| 120 | + * @param $revoke Array of permission => bool (from $wgRevokePermissions items) |
| 121 | + * @param $add Array of groups this group is allowed to add or true |
| 122 | + * @param $remove Array of groups this group is allowed to remove or true |
| 123 | + * @param $addSelf Array of groups this group is allowed to add to self or true |
| 124 | + * @param $removeSelf Array of group this group is allowed to remove from self or true |
119 | 125 | * @return string List of all granted permissions, separated by comma separator |
120 | 126 | */ |
121 | | - private static function formatPermissions( $permissions, $add, $remove, $addSelf, $removeSelf ) { |
| 127 | + private static function formatPermissions( $permissions, $revoke, $add, $remove, $addSelf, $removeSelf ) { |
122 | 128 | global $wgLang; |
123 | 129 | $r = array(); |
124 | 130 | foreach( $permissions as $permission => $granted ) { |
125 | | - if ( $granted ) { |
| 131 | + if( $granted ) { |
126 | 132 | $description = wfMsgExt( 'listgrouprights-right-display', array( 'parseinline' ), |
127 | 133 | User::getRightDescription( $permission ), |
128 | 134 | $permission |
— | — | @@ -129,6 +135,15 @@ |
130 | 136 | $r[] = $description; |
131 | 137 | } |
132 | 138 | } |
| 139 | + foreach( $revoke as $permission => $revoked ) { |
| 140 | + if( $revoked ) { |
| 141 | + $description = wfMsgExt( 'lisgrouprights-right-revoked', array( 'parseinline' ), |
| 142 | + User::getRightDescription( $permission ), |
| 143 | + $permission |
| 144 | + ); |
| 145 | + $r[] = $description; |
| 146 | + } |
| 147 | + } |
133 | 148 | sort( $r ); |
134 | 149 | if( $add === true ){ |
135 | 150 | $r[] = wfMsgExt( 'listgrouprights-addgroup-all', array( 'escape' ) ); |
Index: trunk/phase3/includes/Autopromote.php |
— | — | @@ -18,9 +18,9 @@ |
19 | 19 | if( self::recCheckCondition( $cond, $user ) ) |
20 | 20 | $promote[] = $group; |
21 | 21 | } |
22 | | - |
| 22 | + |
23 | 23 | wfRunHooks( 'GetAutoPromoteGroups', array( $user, &$promote ) ); |
24 | | - |
| 24 | + |
25 | 25 | return $promote; |
26 | 26 | } |
27 | 27 | |
— | — | @@ -116,6 +116,8 @@ |
117 | 117 | return $cond[1] == wfGetIP(); |
118 | 118 | case APCOND_IPINRANGE: |
119 | 119 | return IP::isInRange( wfGetIP(), $cond[1] ); |
| 120 | + case APCOND_BLOCKED: |
| 121 | + return $user->isBlocked(); |
120 | 122 | default: |
121 | 123 | $result = null; |
122 | 124 | wfRunHooks( 'AutopromoteCondition', array( $cond[0], array_slice( $cond, 1 ), $user, &$result ) ); |
Index: trunk/phase3/languages/messages/MessagesQqq.php |
— | — | @@ -57,6 +57,7 @@ |
58 | 58 | * @author Platonides |
59 | 59 | * @author Purodha |
60 | 60 | * @author Raymond |
| 61 | + * @author Ryan Schmidt |
61 | 62 | * @author SPQRobin |
62 | 63 | * @author Sanbec |
63 | 64 | * @author Sborsody |
— | — | @@ -298,7 +299,7 @@ |
299 | 300 | {{Identical|Error}}', |
300 | 301 | 'returnto' => '{{Identical|Return to $1}}', |
301 | 302 | 'tagline' => 'Used to idenify the source of copied information. Do not change <nowiki>{{SITENAME}}</nowiki>.', |
302 | | -'help' => 'General text (noun) used in the sidebar (by default). |
| 303 | +'help' => 'General text (noun) used in the sidebar (by default). |
303 | 304 | |
304 | 305 | See also [[MediaWiki:Helppage/{{SUBPAGENAME}}|{{int:helppage}}]] and [[MediaWiki:Edithelp/{{SUBPAGENAME}}|{{int:edithelp}}]]. |
305 | 306 | |
— | — | @@ -387,12 +388,12 @@ |
388 | 389 | 'currentevents-url' => "Target page of ''{{Mediawiki:currentevents}}'' in the sidebar. See also {{msg|currentevents}}. |
389 | 390 | {{doc-important|Do not translate <tt>Project:</tt> part.}}", |
390 | 391 | 'disclaimers' => 'Used as display name for the link to [[{{MediaWiki:Disclaimerpage}}]] shown at the bottom of every page on the wiki. Example [[{{MediaWiki:Disclaimerpage}}|{{MediaWiki:Disclaimers}}]].', |
391 | | -'disclaimerpage' => 'Used as page for that contains the site disclaimer. Used at the bottom of every page on the wiki. Example: [[{{MediaWiki:Disclaimerpage}}|{{MediaWiki:Disclaimers}}]]. |
| 392 | +'disclaimerpage' => 'Used as page for that contains the site disclaimer. Used at the bottom of every page on the wiki. Example: [[{{MediaWiki:Disclaimerpage}}|{{MediaWiki:Disclaimers}}]]. |
392 | 393 | {{doc-important|Do not change <tt>Project:</tt> part.}}', |
393 | 394 | 'edithelp' => 'This is the text that appears on the editing help link that is near the bottom of the editing page', |
394 | | -'edithelppage' => 'The help page displayed when a user clicks on editing help link which is present on the right of Show changes button. |
| 395 | +'edithelppage' => 'The help page displayed when a user clicks on editing help link which is present on the right of Show changes button. |
395 | 396 | {{doc-important|Do not change <tt>Help:</tt> part.}}', |
396 | | -'helppage' => 'The link destination used by default in the sidebar, and in {{msg|noarticletext}}. |
| 397 | +'helppage' => 'The link destination used by default in the sidebar, and in {{msg|noarticletext}}. |
397 | 398 | {{doc-important|Do not change <tt>Help:</tt> part.}} |
398 | 399 | {{Identical|HelpContent}}', |
399 | 400 | 'mainpage' => 'Defines the link and display name of the main page of the wiki. Shown as the top link in the navigation part of the interface. Please do not change it too often, that could break things! |
— | — | @@ -454,7 +455,7 @@ |
455 | 456 | |
456 | 457 | {{Identical|Hide}}', |
457 | 458 | 'restorelink' => "This text is always displayed in conjunction with the {{msg-mw|thisisdeleted}} message (View or restore $1?). The user will see |
458 | | -View or restore <nowiki>{{PLURAL:$1|one deleted edit|$1 deleted edits}}</nowiki>? i.e ''View or restore one deleted edit?'' or |
| 459 | +View or restore <nowiki>{{PLURAL:$1|one deleted edit|$1 deleted edits}}</nowiki>? i.e ''View or restore one deleted edit?'' or |
459 | 460 | ''View or restore n deleted edits?''", |
460 | 461 | 'feed-unavailable' => 'This message is displayed when a user tries to use an RSS or Atom feed on a wiki where such feeds have been disabled.', |
461 | 462 | 'site-rss-feed' => "Used in the HTML header of a wiki's RSS feed. |
— | — | @@ -493,7 +494,7 @@ |
494 | 495 | # Main script and global functions |
495 | 496 | 'nosuchspecialpage' => 'The title of the error you get when trying to open a special page which does not exist. The text of the warning is the message {{msg-mw|nospecialpagetext}}. Example: [[Special:Nosuchpage]]', |
496 | 497 | 'nospecialpagetext' => 'This error is shown when trying to open a special page which does not exist, e.g. [[Special:Nosuchpage]]. |
497 | | -* The title of this error is the message {{msg-mw|nosuchspecialpage}}. |
| 498 | +* The title of this error is the message {{msg-mw|nosuchspecialpage}}. |
498 | 499 | * Link <code><nowiki>[[Special:SpecialPages|{{int:specialpages}}]]</nowiki></code> should remain untranslated.', |
499 | 500 | |
500 | 501 | # General errors |
— | — | @@ -506,7 +507,7 @@ |
507 | 508 | |
508 | 509 | '''Parameters''' |
509 | 510 | * $1: Pagename |
510 | | -* $2: Content of |
| 511 | +* $2: Content of |
511 | 512 | *# {{msg|Missingarticle-rev}} - Permalink with invalid revision# |
512 | 513 | *# {{msg|Missingarticle-diff}} - Diff with invalid revision#", |
513 | 514 | 'missingarticle-rev' => 'Parameter $2 of {{msg|Missing-article}}: It is shown after the articlename. |
— | — | @@ -692,7 +693,7 @@ |
693 | 694 | * <tt>$8</tt> is the timestamp when the block started', |
694 | 695 | 'blockednoreason' => '{{Identical|No reason given}}', |
695 | 696 | 'whitelistedittext' => '* $1 is a link to [[Special:UserLogin]] with {{msg-mw|loginreqlink}} as link description', |
696 | | -'nosuchsectiontext' => 'This message is displayed when a user tries to edit a section that does not exist. |
| 697 | +'nosuchsectiontext' => 'This message is displayed when a user tries to edit a section that does not exist. |
697 | 698 | |
698 | 699 | Parameter $1 is the content of section parameter in the URL (for example 1234 in the URL http://translatewiki.net/w/i.php?title=Sandbox&action=edit§ion=1234)', |
699 | 700 | 'loginreqlink' => 'Take a look on inflection. Used as parameter in {{msg-mw|loginreqpagetext}}, {{msg-mw|whitelistedittext}}, {{msg-mw|watchlistanontext}} and {{msg-mw|Confirmemail needlogin}}. |
— | — | @@ -860,7 +861,7 @@ |
861 | 862 | *Parameter $2 is the number of revisions for which the restrictions are changed. |
862 | 863 | |
863 | 864 | Please note that the parameters in a log entry will appear in the log only in the default language of the wiki. View [[Special:Log]] for examples on translatewiki.net with English default language.', |
864 | | -'logdelete-log-message' => 'This log message appears in brackets after the message {{msg|logdelete-logentry}} in the deletion or suppression logs when changing the visibility of a log entry for events. For a brief description of the process of changing the visibility of events and their log entries see this [http://www.mediawiki.org/wiki/RevisionDelete mediawiki explanation]. |
| 865 | +'logdelete-log-message' => 'This log message appears in brackets after the message {{msg|logdelete-logentry}} in the deletion or suppression logs when changing the visibility of a log entry for events. For a brief description of the process of changing the visibility of events and their log entries see this [http://www.mediawiki.org/wiki/RevisionDelete mediawiki explanation]. |
865 | 866 | |
866 | 867 | *Parameter $1 is either {{msg|revdelete-hid}} (when hiding data), {{msg|revdelete-unhid}} (when unhiding data), {{msg|revdelete-restricted}} (when applying restrictions for sysops), {{msg|revdelete-unrestricted}} (when removing restrictions for sysops), or a combination of those messages. |
867 | 868 | *Parameter $2 is the number of events for which the restrictions are changed. |
— | — | @@ -985,7 +986,7 @@ |
986 | 987 | 'searchall' => '{{Identical|All}}', |
987 | 988 | 'showingresults' => "This message is used on some special pages such as 'Wanted categories'. $1 is the total number of results in the batch shown and $2 is the number of the first item listed.", |
988 | 989 | 'showingresultsnum' => '$3 is the number of results on the page and $2 is the first number in the batch of results.', |
989 | | -'showingresultstotal' => 'Text above list of search results on special page of search results. |
| 990 | +'showingresultstotal' => 'Text above list of search results on special page of search results. |
990 | 991 | * $1–$2 is the range of results shown on the page |
991 | 992 | * $3 is the total number of results from the search |
992 | 993 | * $4 is the number of results shown on the page (equal to the size of the $1–$2 interval)', |
— | — | @@ -1222,7 +1223,7 @@ |
1223 | 1224 | * {{msg|right-suppressionlog|pl=yes}} |
1224 | 1225 | * {{msg|right-suppressrevision|pl=yes}} |
1225 | 1226 | * {{msg|right-deleterevision|pl=yes}}', |
1226 | | -'right-ipblock-exempt' => 'This user automatically |
| 1227 | +'right-ipblock-exempt' => 'This user automatically |
1227 | 1228 | bypasses IP blocks, auto-blocks and range blocks - so I presume - but I am uncertain', |
1228 | 1229 | 'right-rollback' => '{{Identical|Rollback}}', |
1229 | 1230 | 'right-markbotedits' => '{{doc-right}} |
— | — | @@ -1943,8 +1944,8 @@ |
1944 | 1945 | <tt><nowiki>* Groupname</nowiki></tt> - defines a new group<br /> |
1945 | 1946 | <tt><nowiki>** Reason</nowiki></tt> - defines a reason in this group', |
1946 | 1947 | 'protect-edit-reasonlist' => 'Shown beneath the page protection form on the right side. It is a link to [[MediaWiki:Protect-dropdown]]. See also {{msg|Delete-edit-reasonlist}} and {{msg|Ipb-edit-dropdown}}.', |
1947 | | -'protect-expiry-options' => "* Description: Options for the duration of the block. |
1948 | | -* <font color=\"red\">Be careful:</font> '''1 translation:1 english''', so the first part is the translation and the second part should stay in English. |
| 1948 | +'protect-expiry-options' => "* Description: Options for the duration of the block. |
| 1949 | +* <font color=\"red\">Be careful:</font> '''1 translation:1 english''', so the first part is the translation and the second part should stay in English. |
1949 | 1950 | * Example: See e.g. [[MediaWiki:Protect-expiry-options/nl]] if you still don't know how to do it. |
1950 | 1951 | |
1951 | 1952 | {{Identical|Infinite}}", |
— | — | @@ -2087,8 +2088,8 @@ |
2088 | 2089 | 'ipbenableautoblock' => '{{Identical|Automatically block ...}}', |
2089 | 2090 | 'ipbsubmit' => '{{Identical|Block this user}}', |
2090 | 2091 | 'ipbother' => '{{Identical|Other time}}', |
2091 | | -'ipboptions' => "* Description: Options for the duration of the block. |
2092 | | -* <font color=\"red\">Be careful:</font> '''1 translation:1 english''', so the first part is the translation and the second part should stay in English. |
| 2092 | +'ipboptions' => "* Description: Options for the duration of the block. |
| 2093 | +* <font color=\"red\">Be careful:</font> '''1 translation:1 english''', so the first part is the translation and the second part should stay in English. |
2093 | 2094 | * Example: See e.g. [[MediaWiki:Ipboptions/nl]] if you still don't know how to do it. |
2094 | 2095 | |
2095 | 2096 | {{Identical|Infinite}}", |
— | — | @@ -2117,8 +2118,8 @@ |
2118 | 2119 | * $1 - word "{{msg|Hide}}" or "{{msg|Show}}"', |
2119 | 2120 | 'ipblocklist-submit' => '{{Identical|Search}}', |
2120 | 2121 | 'blocklistline' => 'This is the text of an entry in the Special:IPBlockList. |
2121 | | -* $1 is the hour and date of the block. |
2122 | | -* $2 is the sysop. |
| 2122 | +* $1 is the hour and date of the block. |
| 2123 | +* $2 is the sysop. |
2123 | 2124 | * $3 is the blocked user or IP (with link to contributions and talk) |
2124 | 2125 | * $4 contains "hour and date of expiry, details (\'\'reason\'\')" |
2125 | 2126 | |
— | — | @@ -2137,7 +2138,7 @@ |
2138 | 2139 | |
2139 | 2140 | {{Identical|Block log}}', |
2140 | 2141 | 'blocklog-fulllog' => 'Shown at Special:BlockIP at the end of the block log if there are more than 10 entries for this user, see [[Special:BlockIP/Raymond]] as example (visible for sysops only).', |
2141 | | -'blocklogentry' => 'This is the text of an entry in the Block log (and RC), after hour (and date, only in the Block log) and sysop name: |
| 2142 | +'blocklogentry' => 'This is the text of an entry in the Block log (and RC), after hour (and date, only in the Block log) and sysop name: |
2142 | 2143 | * $1 is the blocked user or IP (with link to contributions and talk) |
2143 | 2144 | * $2 is the duration of the block (hours, days etc.) or the specified expiry date |
2144 | 2145 | * $3 contains "(details) (\'\'reason\'\')" |
— | — | @@ -2355,7 +2356,7 @@ |
2356 | 2357 | This message appears at the very end of the list of names in the message [[MediaWiki:Othercontribs/{{SUBPAGENAME}}|othercontribs]]. If there are no anonymous users in the credits list then this message does not appear at all. |
2357 | 2358 | |
2358 | 2359 | * $1 is the number of anonymous users in the message', |
2359 | | -'siteuser' => "This message is shown when viewing the credits of a page (example: {{fullurl:Main Page|action=credits}}). Note that this action is disabled by default (currently enabled on translatewiki.net). |
| 2360 | +'siteuser' => "This message is shown when viewing the credits of a page (example: {{fullurl:Main Page|action=credits}}). Note that this action is disabled by default (currently enabled on translatewiki.net). |
2360 | 2361 | |
2361 | 2362 | This message is the variable $3 in the message {{msg-mw|lastmodifiedatby}}. This message only appears if the user has not entered his 'real name' in his preferences. The variable $1 in this message is a user name. |
2362 | 2363 | |
— | — | @@ -2369,7 +2370,7 @@ |
2370 | 2371 | See also [[MediaWiki:Lastmodifiedat/{{SUBPAGENAME}}]].", |
2371 | 2372 | 'othercontribs' => 'This message is shown when viewing the credits of a page (example: {{fullurl:Main Page|action=credits}}). Note that this action is disabled by default (currently enabled on translatewiki.net - to use type <nowiki>&action=credits</nowiki> at the end of any URL in the address bar). |
2372 | 2373 | * $1: the list of author(s) of the revisions preceding the current revision. It appears after the message [[Mediawiki:lastmodifiedatby/{{SUBPAGENAME}}]]. If there are no previous authors this message does not appear at all. If needed the messages [[Mediawiki:siteusers/{{SUBPAGENAME}}]], [[Mediawiki:anonymous/{{SUBPAGENAME}}]] and [[Mediawiki:and/{{SUBPAGENAME}}]] are part of the list of names.', |
2373 | | -'others' => 'The following explanation is guesswork. This message is shown when viewing the credits of a page (example: {{fullurl:Main Page|action=credits}}). Note that this action is disabled by default (currently enabled on translatewiki.net - to use type <nowiki>&action=credits</nowiki> at the end of any URL in the address bar). |
| 2374 | +'others' => 'The following explanation is guesswork. This message is shown when viewing the credits of a page (example: {{fullurl:Main Page|action=credits}}). Note that this action is disabled by default (currently enabled on translatewiki.net - to use type <nowiki>&action=credits</nowiki> at the end of any URL in the address bar). |
2374 | 2375 | |
2375 | 2376 | The message appears at the end of the list of credits given in the message [[Mediawiki:Othercontribs/{{SUBPAGENAME}}]] if the number of contributors is above a certain level.', |
2376 | 2377 | 'siteusers' => 'This message is shown when viewing the credits of a page (example: {{fullurl:Main Page|action=credits}}). Note that this action is disabled by default (currently enabled on translatewiki.net). |
— | — | @@ -2813,7 +2814,7 @@ |
2814 | 2815 | *$3 is a URL to [[Special:ConfirmEmail]] |
2815 | 2816 | *$4 is a time and date (duplicated by $6 and $7) |
2816 | 2817 | *$5 is a URL to [[Special:InvalidateEmail]] |
2817 | | -*$6 is a date |
| 2818 | +*$6 is a date |
2818 | 2819 | *$7 is a time', |
2819 | 2820 | 'confirmemail_invalidated' => 'This is the text of the special page [[Special:InvalidateEmail|InvalidateEmail]] (with the title in [[Mediawiki:Invalidateemail]]) where user goes if he chooses the cancel e-mail confirmation link from the confirmation e-mail.', |
2820 | 2821 | 'invalidateemail' => "This is the '''name of the special page''' where user goes if he chooses the cancel e-mail confirmation link from the confirmation e-mail.", |
— | — | @@ -3009,14 +3010,14 @@ |
3010 | 3011 | |
3011 | 3012 | * $1: width of the file |
3012 | 3013 | * $2: height of the file |
3013 | | -* $3: File size |
| 3014 | +* $3: File size |
3014 | 3015 | * $4: MIME type', |
3015 | 3016 | 'fileduplicatesearch-result-1' => 'Result line after the list of files of [[Special:FileDuplicateSearch]] |
3016 | 3017 | |
3017 | 3018 | $1 is the name of the requested file.', |
3018 | 3019 | 'fileduplicatesearch-result-n' => 'Result line after the list of files of [[Special:FileDuplicateSearch]] |
3019 | 3020 | |
3020 | | -* $1 is the name of the requested file. |
| 3021 | +* $1 is the name of the requested file. |
3021 | 3022 | * $2 is the number of identical duplicates of the requested file', |
3022 | 3023 | |
3023 | 3024 | # Special:SpecialPages |
— | — | @@ -3077,4 +3078,7 @@ |
3078 | 3079 | |
3079 | 3080 | {{Identical|Other}}', |
3080 | 3081 | |
| 3082 | +# Special:ListGroupRights |
| 3083 | +'listgrouprights-key' => 'Footer note for the [[Special:ListGroupRights]] page' |
| 3084 | + |
3081 | 3085 | ); |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2340,11 +2340,14 @@ |
2341 | 2341 | 'listgrouprights' => 'User group rights', |
2342 | 2342 | 'listgrouprights-summary' => 'The following is a list of user groups defined on this wiki, with their associated access rights. |
2343 | 2343 | There may be [[{{MediaWiki:Listgrouprights-helppage}}|additional information]] about individual rights.', |
| 2344 | +'listgrouprights-key' => '* <span class="listgrouprights-granted">Granted right</span> |
| 2345 | +* <span class="listgrouprights-revoked">Revoked right</span>', |
2344 | 2346 | 'listgrouprights-group' => 'Group', |
2345 | 2347 | 'listgrouprights-rights' => 'Rights', |
2346 | 2348 | 'listgrouprights-helppage' => 'Help:Group rights', |
2347 | 2349 | 'listgrouprights-members' => '(list of members)', |
2348 | | -'listgrouprights-right-display' => '$1 ($2)', # only translate this message to other languages if you have to change it |
| 2350 | +'listgrouprights-right-display' => '<span class="listgrouprights-granted">$1 ($2)</span>', # only translate this message to other languages if you have to change it |
| 2351 | +'listgrouprights-right-revoked' => '<span class="listgrouprights-revoked">$1 ($2)</span>', # only translate this message to other languages if you have to change it |
2349 | 2352 | 'listgrouprights-addgroup' => 'Add {{PLURAL:$2|group|groups}}: $1', |
2350 | 2353 | 'listgrouprights-removegroup' => 'Remove {{PLURAL:$2|group|groups}}: $1', |
2351 | 2354 | 'listgrouprights-addgroup-all' => 'Add all groups', |
— | — | @@ -3103,7 +3106,7 @@ |
3104 | 3107 | 'tooltip-recreate' => 'Recreate the page even though it has been deleted', |
3105 | 3108 | 'tooltip-upload' => 'Start upload', |
3106 | 3109 | 'tooltip-rollback' => '"Rollback" reverts edit(s) to this page of the last contributor in one click', |
3107 | | -'tooltip-undo' => '"Undo" reverts this edit and opens the edit form in preview mode. |
| 3110 | +'tooltip-undo' => '"Undo" reverts this edit and opens the edit form in preview mode. |
3108 | 3111 | It allows adding a reason in the summary.', |
3109 | 3112 | |
3110 | 3113 | # Stylesheets |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -87,6 +87,11 @@ |
88 | 88 | the arrangement of checkboxes on the Special:UserRights form |
89 | 89 | * Add hook 'UserrightsSaveUserGroups' to give extensions the ability to modify |
90 | 90 | the groups being added and removed last-minute. |
| 91 | +* Add autopromote condition APCOND_BLOCKED to autopromote blocked users to various |
| 92 | + user groups. |
| 93 | +* Add $wgRemoveGroups as a means of restricting a group's rights. The syntax is |
| 94 | + identical to $wgGroupPermissions, but users in these groups will have these rights |
| 95 | + stripped from them. |
91 | 96 | |
92 | 97 | === Bug fixes in 1.16 === |
93 | 98 | |