r34288 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r34287‎ | r34288 | r34289 >
Date:01:01, 6 May 2008
Author:aaron
Status:old
Tags:
Comment:
* Tweak key user
* Tweak CSS
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/flaggedrevs.css (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php
@@ -112,7 +112,7 @@
113113 # Please set these as something different. Any text will do, though it probably
114114 # shouldn't be very short (less secure) or very long (waste of resources).
115115 # There must be four codes, and only the first four are checked.
116 -$wgReviewCodes = array( 'first one', 'second code', 'yet another', 'the last' );
 116+$wgReviewCodes = array();
117117
118118 # Lets some users access the review UI and set some flags
119119 $wgAvailableRights[] = 'review';
@@ -177,7 +177,7 @@
178178 #########
179179
180180 # Bump this number every time you change flaggedrevs.css/flaggedrevs.js
181 -$wgFlaggedRevStyleVersion = 13;
 181+$wgFlaggedRevStyleVersion = 14;
182182
183183 $wgExtensionFunctions[] = 'efLoadFlaggedRevs';
184184
@@ -596,7 +596,14 @@
597597 */
598598 public static function getValidationKey( $tmpP, $imgP, $uid, $rid ) {
599599 global $wgReviewCodes;
600 - $p = MD5($uid.$imgP.$wgReviewCodes[0]).sha1($wgReviewCodes[1].$rid.$wgReviewCodes[3]).MD5($uid.$tmpP.$wgReviewCodes[2]);
 600+ # Fall back to $wgSecretKey/$wgProxyKey
 601+ if( empty($wgReviewCodes) ) {
 602+ global $wgSecretKey, $wgProxyKey;
 603+ $key = $wgSecretKey ? $wgSecretKey : $wgProxyKey;
 604+ $p = MD5($key.$uid.$imgP.$tmpP.$rid);
 605+ } else {
 606+ $p = MD5($wgReviewCodes[0].$uid.$imgP.$rid.$tmpP.$wgReviewCodes[1]);
 607+ }
601608 return $p;
602609 }
603610
Index: trunk/extensions/FlaggedRevs/flaggedrevs.css
@@ -9,7 +9,6 @@
1010 .flaggedrevs_preview {
1111 border: 1px solid #aaa;
1212 padding: 5px;
13 - font-size: 80%;
1413 font-weight: normal;
1514 line-height: 1.5em;
1615 margin: .5em 1em 0em 0em;
@@ -42,7 +41,7 @@
4342 border: 1px solid #aaa;
4443 background-color: #f9f9f9;
4544 padding: 5px;
46 - font-size: 80%;
 45+ font-size: 85%;
4746 margin-left: 50px;
4847 margin-right: 50px;
4948 text-align: center;

Status & tagging log