Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | # Please set these as something different. Any text will do, though it probably |
114 | 114 | # shouldn't be very short (less secure) or very long (waste of resources). |
115 | 115 | # 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(); |
117 | 117 | |
118 | 118 | # Lets some users access the review UI and set some flags |
119 | 119 | $wgAvailableRights[] = 'review'; |
— | — | @@ -177,7 +177,7 @@ |
178 | 178 | ######### |
179 | 179 | |
180 | 180 | # Bump this number every time you change flaggedrevs.css/flaggedrevs.js |
181 | | -$wgFlaggedRevStyleVersion = 13; |
| 181 | +$wgFlaggedRevStyleVersion = 14; |
182 | 182 | |
183 | 183 | $wgExtensionFunctions[] = 'efLoadFlaggedRevs'; |
184 | 184 | |
— | — | @@ -596,7 +596,14 @@ |
597 | 597 | */ |
598 | 598 | public static function getValidationKey( $tmpP, $imgP, $uid, $rid ) { |
599 | 599 | 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 | + } |
601 | 608 | return $p; |
602 | 609 | } |
603 | 610 | |
Index: trunk/extensions/FlaggedRevs/flaggedrevs.css |
— | — | @@ -9,7 +9,6 @@ |
10 | 10 | .flaggedrevs_preview { |
11 | 11 | border: 1px solid #aaa; |
12 | 12 | padding: 5px; |
13 | | - font-size: 80%; |
14 | 13 | font-weight: normal; |
15 | 14 | line-height: 1.5em; |
16 | 15 | margin: .5em 1em 0em 0em; |
— | — | @@ -42,7 +41,7 @@ |
43 | 42 | border: 1px solid #aaa; |
44 | 43 | background-color: #f9f9f9; |
45 | 44 | padding: 5px; |
46 | | - font-size: 80%; |
| 45 | + font-size: 85%; |
47 | 46 | margin-left: 50px; |
48 | 47 | margin-right: 50px; |
49 | 48 | text-align: center; |