Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/forms/RevisionReviewForm.php |
— | — | @@ -0,0 +1,702 @@ |
| 2 | +<?php |
| 3 | +# (c) Aaron Schulz 2010 GPL |
| 4 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 5 | + echo "FlaggedRevs extension\n"; |
| 6 | + exit( 1 ); |
| 7 | +} |
| 8 | +/** |
| 9 | + * Class containing revision review form business logic |
| 10 | + * Note: edit tokens are the responsibility of caller |
| 11 | + * Usage: (a) set ALL form params before doing anything else |
| 12 | + * (b) call ready() when all params are set |
| 13 | + * (c) call submit() as needed |
| 14 | + */ |
| 15 | +class RevisionReviewForm |
| 16 | +{ |
| 17 | + /* Form parameters which can be user given */ |
| 18 | + protected $page = null; |
| 19 | + protected $rcid = 0; |
| 20 | + protected $approve = false; |
| 21 | + protected $unapprove = false; |
| 22 | + protected $oldid = 0; |
| 23 | + protected $templateParams = ''; |
| 24 | + protected $imageParams = ''; |
| 25 | + protected $fileVersion = ''; |
| 26 | + protected $validatedParams = ''; |
| 27 | + protected $notes = ''; |
| 28 | + protected $comment = ''; |
| 29 | + protected $dims = array(); |
| 30 | + |
| 31 | + protected $unapprovedTags = 0; |
| 32 | + protected $oflags = array(); |
| 33 | + protected $inputLock = 0; # Disallow bad submissions |
| 34 | + |
| 35 | + protected $skin = null; |
| 36 | + |
| 37 | + public function __construct() { |
| 38 | + global $wgUser; |
| 39 | + $this->skin = $wgUser->getSkin(); |
| 40 | + foreach ( FlaggedRevs::getTags() as $tag ) { |
| 41 | + $this->dims[$tag] = 0; |
| 42 | + } |
| 43 | + } |
| 44 | + |
| 45 | + public function getPage() { |
| 46 | + return $this->page; |
| 47 | + } |
| 48 | + |
| 49 | + public function setPage( Title $value ) { |
| 50 | + $this->trySet( $this->page, $value ); |
| 51 | + } |
| 52 | + |
| 53 | + public function getRCId() { |
| 54 | + return $this->page; |
| 55 | + } |
| 56 | + |
| 57 | + public function setRCId( $value ) { |
| 58 | + $this->trySet( $this->rcid, (int)$value ); |
| 59 | + } |
| 60 | + |
| 61 | + public function setApprove( $value ) { |
| 62 | + $this->trySet( $this->approve, $value ); |
| 63 | + } |
| 64 | + |
| 65 | + public function setUnapprove( $value ) { |
| 66 | + $this->trySet( $this->unapprove, $value ); |
| 67 | + } |
| 68 | + |
| 69 | + public function getOldId() { |
| 70 | + return $this->oldid; |
| 71 | + } |
| 72 | + |
| 73 | + public function setOldId( $value ) { |
| 74 | + $this->trySet( $this->oldid, (int)$value ); |
| 75 | + } |
| 76 | + |
| 77 | + public function getTemplateParams() { |
| 78 | + return $this->templateParams; |
| 79 | + } |
| 80 | + |
| 81 | + public function setTemplateParams( $value ) { |
| 82 | + $this->trySet( $this->templateParams, $value ); |
| 83 | + } |
| 84 | + |
| 85 | + public function getFileParams() { |
| 86 | + return $this->imageParams; |
| 87 | + } |
| 88 | + |
| 89 | + public function setFileParams( $value ) { |
| 90 | + $this->trySet( $this->imageParams, $value ); |
| 91 | + } |
| 92 | + |
| 93 | + public function getFileVersion() { |
| 94 | + return $this->fileVersion; |
| 95 | + } |
| 96 | + |
| 97 | + public function setFileVersion( $value ) { |
| 98 | + $this->trySet( $this->fileVersion, $value ); |
| 99 | + } |
| 100 | + |
| 101 | + public function getValidatedParams() { |
| 102 | + return $this->validatedParams; |
| 103 | + } |
| 104 | + |
| 105 | + public function setValidatedParams( $value ) { |
| 106 | + $this->trySet( $this->validatedParams, $value ); |
| 107 | + } |
| 108 | + |
| 109 | + public function getComment() { |
| 110 | + return $this->comment; |
| 111 | + } |
| 112 | + |
| 113 | + public function setComment( $value ) { |
| 114 | + $this->trySet( $this->comment, $value ); |
| 115 | + } |
| 116 | + |
| 117 | + public function getNotes() { |
| 118 | + return $this->notes; |
| 119 | + } |
| 120 | + |
| 121 | + public function setNotes( $value ) { |
| 122 | + global $wgUser; |
| 123 | + if ( !FlaggedRevs::allowComments() || !$wgUser->isAllowed( 'validate' ) ) { |
| 124 | + $value = ''; |
| 125 | + } |
| 126 | + $this->trySet( $this->notes, $value ); |
| 127 | + } |
| 128 | + |
| 129 | + public function getDims() { |
| 130 | + return $this->dims; |
| 131 | + } |
| 132 | + |
| 133 | + public function setDim( $tag, $value ) { |
| 134 | + if ( !in_array( $tag, FlaggedRevs::getTags() ) ) { |
| 135 | + throw new MWException( "FlaggedRevs tag $tag does not exist.\n" ); |
| 136 | + } |
| 137 | + $this->trySet( $this->dims[$tag], (int)$value ); |
| 138 | + } |
| 139 | + |
| 140 | + /** |
| 141 | + * Set a member field to a value if the fields are unlocked |
| 142 | + */ |
| 143 | + protected function trySet( &$field, $value ) { |
| 144 | + if ( $this->inputLock ) { |
| 145 | + throw new MWException( __CLASS__ . " fields cannot be set anymore.\n"); |
| 146 | + } else { |
| 147 | + $field = $value; // still allowing input |
| 148 | + } |
| 149 | + } |
| 150 | + |
| 151 | + /** |
| 152 | + * Signal that inputs are starting |
| 153 | + */ |
| 154 | + public function start() { |
| 155 | + $this->inputLock = 0; |
| 156 | + } |
| 157 | + |
| 158 | + /** |
| 159 | + * Signal that inputs are done and load old config |
| 160 | + * @return mixed (true on success, error string on target failure) |
| 161 | + */ |
| 162 | + public function ready() { |
| 163 | + $this->inputLock = 1; |
| 164 | + $status = $this->checkTarget(); |
| 165 | + if ( $status !== true ) { |
| 166 | + return $status; // bad target |
| 167 | + } |
| 168 | + # Get the revision's current flags, if any |
| 169 | + $this->oflags = FlaggedRevs::getRevisionTags( $this->page, $this->oldid ); |
| 170 | + return $status; |
| 171 | + } |
| 172 | + |
| 173 | + /* |
| 174 | + * Check that the target page is valid |
| 175 | + * @return mixed (true on success, error string on failure) |
| 176 | + */ |
| 177 | + protected function checkTarget() { |
| 178 | + if ( is_null( $this->page ) ) { |
| 179 | + return 'review_page_invalid'; |
| 180 | + } elseif ( !$this->page->exists() ) { |
| 181 | + return 'review_page_notexists'; |
| 182 | + } |
| 183 | + $fa = FlaggedArticle::getTitleInstance( $this->page ); |
| 184 | + if ( !$fa->isReviewable() ) { |
| 185 | + return 'review_page_unreviewable'; |
| 186 | + } |
| 187 | + return true; |
| 188 | + } |
| 189 | + |
| 190 | + /* |
| 191 | + * Verify and clean up parameters (e.g. from POST request). |
| 192 | + * @return mixed (true on success, error string on failure) |
| 193 | + */ |
| 194 | + protected function checkSettings() { |
| 195 | + $status = $this->checkTarget(); |
| 196 | + if ( $status !== true ) { |
| 197 | + return $status; // bad target |
| 198 | + } |
| 199 | + if ( !$this->oldid ) { |
| 200 | + return 'review_no_oldid'; |
| 201 | + } |
| 202 | + # Check that this is an approval or de-approval |
| 203 | + if ( $this->isApproval() === null ) { |
| 204 | + return 'review_param_missing'; // user didn't say |
| 205 | + } |
| 206 | + # Fill in implicit tag data for binary flag case |
| 207 | + if ( $iDims = $this->implicitDims() ) { |
| 208 | + $this->dims = $iDims; |
| 209 | + } else { |
| 210 | + foreach ( FlaggedRevs::getDimensions() as $tag => $levels ) { |
| 211 | + if ( $this->dims[$tag] === 0 ) { |
| 212 | + $this->unapprovedTags++; |
| 213 | + } |
| 214 | + } |
| 215 | + } |
| 216 | + # We must at least rate each category as 1, the minimum |
| 217 | + # Exception: we can rate ALL as unapproved to depreciate a revision |
| 218 | + if ( $this->unapprovedTags |
| 219 | + && $this->unapprovedTags < count( FlaggedRevs::getDimensions() ) ) |
| 220 | + { |
| 221 | + return 'review_too_low'; |
| 222 | + } |
| 223 | + # Special token to discourage fiddling... |
| 224 | + $k = self::validationKey( |
| 225 | + $this->templateParams, $this->imageParams, $this->fileVersion, $this->oldid ); |
| 226 | + if ( $this->validatedParams !== $k ) { |
| 227 | + return 'review_bad_key'; |
| 228 | + } |
| 229 | + # Check permissions and validate |
| 230 | + # FIXME: invalid vs denied |
| 231 | + if ( !FlaggedRevs::userCanSetFlags( $this->dims, $this->oflags ) ) { |
| 232 | + return 'review_denied'; |
| 233 | + } |
| 234 | + return true; |
| 235 | + } |
| 236 | + |
| 237 | + public function isAllowed() { |
| 238 | + // Basic permission check |
| 239 | + return ( $this->page |
| 240 | + && $this->page->userCan( 'review' ) |
| 241 | + && $this->page->userCan( 'edit' ) |
| 242 | + ); |
| 243 | + } |
| 244 | + |
| 245 | + // implicit dims for binary flag case |
| 246 | + private function implicitDims() { |
| 247 | + $tag = FlaggedRevs::binaryTagName(); |
| 248 | + if ( $tag ) { |
| 249 | + if ( $this->approve ) { |
| 250 | + return array( $tag => 1 ); |
| 251 | + } else if ( $this->unapprove ) { |
| 252 | + return array( $tag => 0 ); |
| 253 | + } |
| 254 | + } |
| 255 | + return null; |
| 256 | + } |
| 257 | + |
| 258 | + public function isApproval() { |
| 259 | + # If all values are set to zero, this has been unapproved |
| 260 | + if ( FlaggedRevs::dimensionsEmpty() ) { |
| 261 | + if ( $this->approve && !$this->unapprove ) { |
| 262 | + return true; // no tags & approve param given |
| 263 | + } elseif ( $this->unapprove && !$this->approve ) { |
| 264 | + return false; |
| 265 | + } |
| 266 | + return null; // nothing valid asserted |
| 267 | + } else { |
| 268 | + foreach ( $this->dims as $quality => $value ) { |
| 269 | + if ( $value ) return true; |
| 270 | + } |
| 271 | + return false; |
| 272 | + } |
| 273 | + } |
| 274 | + |
| 275 | + /** |
| 276 | + * Submit the form parameters for the page config to the DB. |
| 277 | + * |
| 278 | + * @return mixed (true on success, error string on failure) |
| 279 | + */ |
| 280 | + public function submit() { |
| 281 | + global $wgUser; |
| 282 | + if ( !$this->inputLock ) { |
| 283 | + throw new MWException( __CLASS__ . " input fields not set yet.\n"); |
| 284 | + } |
| 285 | + $status = $this->checkSettings(); |
| 286 | + if ( $status !== true ) { |
| 287 | + return $status; // cannot submit - broken params |
| 288 | + } |
| 289 | + # Double-check permissions |
| 290 | + if ( !$this->isAllowed() ) { |
| 291 | + return 'review_denied'; |
| 292 | + } |
| 293 | + # We can only approve actual revisions... |
| 294 | + if ( $this->isApproval() ) { |
| 295 | + $rev = Revision::newFromTitle( $this->page, $this->oldid ); |
| 296 | + # Do not mess with archived/deleted revisions |
| 297 | + if ( is_null( $rev ) || $rev->mDeleted ) { |
| 298 | + return 'review_bad_oldid'; |
| 299 | + } |
| 300 | + $status = $this->approveRevision( $rev ); |
| 301 | + # We can only unapprove approved revisions... |
| 302 | + } else { |
| 303 | + $frev = FlaggedRevision::newFromTitle( $this->page, $this->oldid ); |
| 304 | + # If we can't find this flagged rev, return to page??? |
| 305 | + if ( is_null( $frev ) ) { |
| 306 | + return 'review_bad_oldid'; |
| 307 | + } |
| 308 | + $status = $this->unapproveRevision( $frev ); |
| 309 | + } |
| 310 | + # Watch page if set to do so |
| 311 | + if ( $status === true ) { |
| 312 | + if ( $wgUser->getOption( 'flaggedrevswatch' ) && !$this->page->userIsWatching() ) { |
| 313 | + $wgUser->addWatch( $this->page ); |
| 314 | + } |
| 315 | + } |
| 316 | + return $status; |
| 317 | + } |
| 318 | + |
| 319 | + /** |
| 320 | + * Adds or updates the flagged revision table for this page/id set |
| 321 | + * @param Revision $rev |
| 322 | + * @returns true on success, array of errors on failure |
| 323 | + */ |
| 324 | + private function approveRevision( $rev ) { |
| 325 | + global $wgUser, $wgMemc, $wgParser, $wgEnableParserCache; |
| 326 | + wfProfileIn( __METHOD__ ); |
| 327 | + |
| 328 | + $article = new Article( $this->page ); |
| 329 | + |
| 330 | + $quality = 0; |
| 331 | + if ( FlaggedRevs::isQuality( $this->dims ) ) { |
| 332 | + $quality = FlaggedRevs::isPristine( $this->dims ) ? 2 : 1; |
| 333 | + } |
| 334 | + # Our flags |
| 335 | + $flags = $this->dims; |
| 336 | + # Some validation vars to make sure nothing changed during |
| 337 | + $lastTempId = 0; |
| 338 | + $lastImgTime = "0"; |
| 339 | + # Our template version pointers |
| 340 | + $tmpset = $tmpParams = array(); |
| 341 | + $templateMap = explode( '#', trim( $this->templateParams ) ); |
| 342 | + foreach ( $templateMap as $template ) { |
| 343 | + if ( !$template ) |
| 344 | + continue; |
| 345 | + |
| 346 | + $m = explode( '|', $template, 2 ); |
| 347 | + if ( !isset( $m[0] ) || !isset( $m[1] ) || !$m[0] ) |
| 348 | + continue; |
| 349 | + |
| 350 | + list( $prefixed_text, $rev_id ) = $m; |
| 351 | + |
| 352 | + $tmp_title = Title::newFromText( $prefixed_text ); // Normalize this to be sure... |
| 353 | + if ( is_null( $tmp_title ) ) |
| 354 | + continue; // Page must be valid! |
| 355 | + |
| 356 | + if ( $rev_id > $lastTempId ) |
| 357 | + $lastTempId = $rev_id; |
| 358 | + |
| 359 | + $tmpset[] = array( |
| 360 | + 'ft_rev_id' => $rev->getId(), |
| 361 | + 'ft_namespace' => $tmp_title->getNamespace(), |
| 362 | + 'ft_title' => $tmp_title->getDBkey(), |
| 363 | + 'ft_tmp_rev_id' => $rev_id |
| 364 | + ); |
| 365 | + if ( !isset( $tmpParams[$tmp_title->getNamespace()] ) ) { |
| 366 | + $tmpParams[$tmp_title->getNamespace()] = array(); |
| 367 | + } |
| 368 | + $tmpParams[$tmp_title->getNamespace()][$tmp_title->getDBkey()] = $rev_id; |
| 369 | + } |
| 370 | + # Our image version pointers |
| 371 | + $imgset = $imgParams = array(); |
| 372 | + $imageMap = explode( '#', trim( $this->imageParams ) ); |
| 373 | + foreach ( $imageMap as $image ) { |
| 374 | + if ( !$image ) |
| 375 | + continue; |
| 376 | + $m = explode( '|', $image, 3 ); |
| 377 | + # Expand our parameters ... <name>#<timestamp>#<key> |
| 378 | + if ( !isset( $m[0] ) || !isset( $m[1] ) || !isset( $m[2] ) || !$m[0] ) |
| 379 | + continue; |
| 380 | + |
| 381 | + list( $dbkey, $timestamp, $key ) = $m; |
| 382 | + |
| 383 | + $img_title = Title::makeTitle( NS_IMAGE, $dbkey ); // Normalize |
| 384 | + if ( is_null( $img_title ) ) |
| 385 | + continue; // Page must be valid! |
| 386 | + |
| 387 | + if ( $timestamp > $lastImgTime ) |
| 388 | + $lastImgTime = $timestamp; |
| 389 | + |
| 390 | + $imgset[] = array( |
| 391 | + 'fi_rev_id' => $rev->getId(), |
| 392 | + 'fi_name' => $img_title->getDBkey(), |
| 393 | + 'fi_img_timestamp' => $timestamp, |
| 394 | + 'fi_img_sha1' => $key |
| 395 | + ); |
| 396 | + if ( !isset( $imgParams[$img_title->getDBkey()] ) ) { |
| 397 | + $imgParams[$img_title->getDBkey()] = array(); |
| 398 | + } |
| 399 | + $imgParams[$img_title->getDBkey()][$timestamp] = $key; |
| 400 | + } |
| 401 | + # If this is an image page, store corresponding file info |
| 402 | + $fileData = array(); |
| 403 | + if ( $this->page->getNamespace() == NS_IMAGE && $this->fileVersion ) { |
| 404 | + $data = explode( '#', $this->fileVersion, 2 ); |
| 405 | + if ( count( $data ) == 2 ) { |
| 406 | + $fileData['name'] = $this->page->getDBkey(); |
| 407 | + $fileData['timestamp'] = $data[0]; |
| 408 | + $fileData['sha1'] = $data[1]; |
| 409 | + } |
| 410 | + } |
| 411 | + |
| 412 | + # Get current stable version ID (for logging) |
| 413 | + $oldSv = FlaggedRevision::newFromStable( $this->page, FR_MASTER ); |
| 414 | + $oldSvId = $oldSv ? $oldSv->getRevId() : 0; |
| 415 | + |
| 416 | + # Is this rev already flagged? |
| 417 | + $flaggedOutput = false; |
| 418 | + $oldfrev = FlaggedRevision::newFromTitle( $this->page, $rev->getId(), FR_MASTER ); |
| 419 | + if ( $oldfrev ) { |
| 420 | + $flaggedOutput = FlaggedRevs::parseStableText( $article, |
| 421 | + $oldfrev->getRevText(), $oldfrev->getRevId() ); |
| 422 | + } |
| 423 | + |
| 424 | + # Be loose on templates that includes other files/templates dynamically. |
| 425 | + # Strict checking breaks randomized images/metatemplates...(bug 14580) |
| 426 | + global $wgUseCurrentTemplates, $wgUseCurrentImages; |
| 427 | + $mustMatch = !( $wgUseCurrentTemplates && $wgUseCurrentImages ); |
| 428 | + |
| 429 | + # Set our versioning params cache |
| 430 | + FlaggedRevs::setIncludeVersionCache( $rev->getId(), $tmpParams, $imgParams ); |
| 431 | + # Parse the text and check if all templates/files match up |
| 432 | + $text = $rev->getText(); |
| 433 | + $stableOutput = FlaggedRevs::parseStableText( $article, $text, $rev->getId() ); |
| 434 | + $err =& $stableOutput->fr_includeErrors; |
| 435 | + if ( $mustMatch ) { // if template/files must all be specified... |
| 436 | + if ( !empty( $err ) |
| 437 | + || $stableOutput->fr_newestImageTime > $lastImgTime |
| 438 | + || $stableOutput->fr_newestTemplateID > $lastTempId ) |
| 439 | + { |
| 440 | + wfProfileOut( __METHOD__ ); |
| 441 | + return $err; // return templates/files with no version specified |
| 442 | + } |
| 443 | + } |
| 444 | + # Clear our versioning params cache |
| 445 | + FlaggedRevs::clearIncludeVersionCache( $rev->getId() ); |
| 446 | + |
| 447 | + # Is this a duplicate review? |
| 448 | + if ( $oldfrev && $flaggedOutput ) { |
| 449 | + $synced = true; |
| 450 | + if ( $stableOutput->fr_newestImageTime != $flaggedOutput->fr_newestImageTime ) |
| 451 | + $synced = false; |
| 452 | + elseif ( $stableOutput->fr_newestTemplateID != $flaggedOutput->fr_newestTemplateID ) |
| 453 | + $synced = false; |
| 454 | + elseif ( $oldfrev->getTags() != $flags ) |
| 455 | + $synced = false; |
| 456 | + elseif ( $oldfrev->getFileSha1() != @$fileData['sha1'] ) |
| 457 | + $synced = false; |
| 458 | + elseif ( $oldfrev->getComment() != $this->notes ) |
| 459 | + $synced = false; |
| 460 | + elseif ( $oldfrev->getQuality() != $quality ) |
| 461 | + $synced = false; |
| 462 | + # Don't review if the same |
| 463 | + if ( $synced ) { |
| 464 | + wfProfileOut( __METHOD__ ); |
| 465 | + return true; |
| 466 | + } |
| 467 | + } |
| 468 | + |
| 469 | + $dbw = wfGetDB( DB_MASTER ); |
| 470 | + # Our review entry |
| 471 | + $flaggedRevision = new FlaggedRevision( array( |
| 472 | + 'fr_rev_id' => $rev->getId(), |
| 473 | + 'fr_page_id' => $rev->getPage(), |
| 474 | + 'fr_user' => $wgUser->getId(), |
| 475 | + 'fr_timestamp' => wfTimestampNow(), |
| 476 | + 'fr_comment' => $this->notes, |
| 477 | + 'fr_quality' => $quality, |
| 478 | + 'fr_tags' => FlaggedRevision::flattenRevisionTags( $flags ), |
| 479 | + 'fr_img_name' => $fileData ? $fileData['name'] : null, |
| 480 | + 'fr_img_timestamp' => $fileData ? $fileData['timestamp'] : null, |
| 481 | + 'fr_img_sha1' => $fileData ? $fileData['sha1'] : null |
| 482 | + ) ); |
| 483 | + |
| 484 | + $dbw->begin(); |
| 485 | + $flaggedRevision->insertOn( $tmpset, $imgset ); |
| 486 | + # Avoid any lag issues |
| 487 | + $this->page->resetArticleId( $rev->getPage() ); |
| 488 | + # Update recent changes |
| 489 | + self::updateRecentChanges( $this->page, $rev->getId(), $this->rcid, true ); |
| 490 | + # Update the article review log |
| 491 | + FlaggedRevsLogs::updateLog( $this->page, $this->dims, $this->oflags, |
| 492 | + $this->comment, $this->oldid, $oldSvId, true ); |
| 493 | + |
| 494 | + # Update the links tables as the stable version may now be the default page. |
| 495 | + # Try using the parser cache first since we didn't actually edit the current version. |
| 496 | + $parserCache = ParserCache::singleton(); |
| 497 | + $poutput = $parserCache->get( $article, $wgUser ); |
| 498 | + if ( !$poutput |
| 499 | + || !isset( $poutput->fr_newestTemplateID ) |
| 500 | + || !isset( $poutput->fr_newestImageTime ) ) |
| 501 | + { |
| 502 | + $options = FlaggedRevs::makeParserOptions(); |
| 503 | + $poutput = $wgParser->parse( $article->getContent(), $article->mTitle, $options ); |
| 504 | + } |
| 505 | + # Prepare for a link tracking update |
| 506 | + $u = new LinksUpdate( $this->page, $poutput ); |
| 507 | + # If we know that this is now the new stable version |
| 508 | + # (which it probably is), save it to the stable cache... |
| 509 | + $sv = FlaggedRevision::newFromStable( $this->page, FR_MASTER/*consistent*/ ); |
| 510 | + if ( $sv && $sv->getRevId() == $rev->getId() ) { |
| 511 | + global $wgParserCacheExpireTime; |
| 512 | + $this->page->invalidateCache(); |
| 513 | + # Update stable cache with the revision we reviewed. |
| 514 | + # Don't cache redirects; it would go unused and complicate things. |
| 515 | + if ( !Title::newFromRedirect( $text ) ) { |
| 516 | + FlaggedRevs::updatePageCache( $article, $wgUser, $stableOutput ); |
| 517 | + } |
| 518 | + # We can set the sync cache key already |
| 519 | + $includesSynced = true; |
| 520 | + if ( $poutput->fr_newestImageTime > $stableOutput->fr_newestImageTime ) { |
| 521 | + $includesSynced = false; |
| 522 | + } elseif ( $poutput->fr_newestTemplateID > $stableOutput->fr_newestTemplateID ) { |
| 523 | + $includesSynced = false; |
| 524 | + } |
| 525 | + $u->fr_stableRev = $sv; // no need to re-fetch this! |
| 526 | + $u->fr_stableParserOut = $stableOutput; // no need to re-fetch this! |
| 527 | + # We can set the sync cache key already. |
| 528 | + $key = wfMemcKey( 'flaggedrevs', 'includesSynced', $article->getId() ); |
| 529 | + $data = FlaggedRevs::makeMemcObj( $includesSynced ? "true" : "false" ); |
| 530 | + $wgMemc->set( $key, $data, $wgParserCacheExpireTime ); |
| 531 | + } else { |
| 532 | + # Get the old stable cache |
| 533 | + $stableOutput = FlaggedRevs::getPageCache( $article, $wgUser ); |
| 534 | + # Clear the cache...(for page histories) |
| 535 | + $this->page->invalidateCache(); |
| 536 | + if ( $stableOutput !== false ) { |
| 537 | + # Reset stable cache if it existed, since we know it is the same. |
| 538 | + FlaggedRevs::updatePageCache( $article, $wgUser, $stableOutput ); |
| 539 | + } |
| 540 | + } |
| 541 | + # Update link tracking. This will trigger extraLinksUpdate()... |
| 542 | + $u->doUpdate(); |
| 543 | + |
| 544 | + $dbw->commit(); |
| 545 | + # Purge cache/squids for this page and any page that uses it |
| 546 | + Article::onArticleEdit( $this->page ); |
| 547 | + |
| 548 | + wfProfileOut( __METHOD__ ); |
| 549 | + return true; |
| 550 | + } |
| 551 | + |
| 552 | + /** |
| 553 | + * @param FlaggedRevision $frev |
| 554 | + * Removes flagged revision data for this page/id set |
| 555 | + */ |
| 556 | + private function unapproveRevision( $frev ) { |
| 557 | + global $wgUser, $wgParser, $wgMemc; |
| 558 | + wfProfileIn( __METHOD__ ); |
| 559 | + |
| 560 | + $dbw = wfGetDB( DB_MASTER ); |
| 561 | + $dbw->begin(); |
| 562 | + # Delete from flaggedrevs table |
| 563 | + $dbw->delete( 'flaggedrevs', |
| 564 | + array( 'fr_page_id' => $frev->getPage(), 'fr_rev_id' => $frev->getRevId() ) ); |
| 565 | + # Wipe versioning params |
| 566 | + $dbw->delete( 'flaggedtemplates', array( 'ft_rev_id' => $frev->getRevId() ) ); |
| 567 | + $dbw->delete( 'flaggedimages', array( 'fi_rev_id' => $frev->getRevId() ) ); |
| 568 | + # Update recent changes |
| 569 | + self::updateRecentChanges( $this->page, $frev->getRevId(), false, false ); |
| 570 | + |
| 571 | + # Get current stable version ID (for logging) |
| 572 | + $oldSv = FlaggedRevision::newFromStable( $this->page, FR_MASTER ); |
| 573 | + $oldSvId = $oldSv ? $oldSv->getRevId() : 0; |
| 574 | + |
| 575 | + # Update the article review log |
| 576 | + FlaggedRevsLogs::updateLog( $this->page, $this->dims, $this->oflags, |
| 577 | + $this->comment, $this->oldid, $oldSvId, false ); |
| 578 | + |
| 579 | + $article = new Article( $this->page ); |
| 580 | + # Update the links tables as a new stable version |
| 581 | + # may now be the default page. |
| 582 | + $parserCache = ParserCache::singleton(); |
| 583 | + $poutput = $parserCache->get( $article, $wgUser ); |
| 584 | + if ( $poutput == false ) { |
| 585 | + $text = $article->getContent(); |
| 586 | + $options = FlaggedRevs::makeParserOptions(); |
| 587 | + $poutput = $wgParser->parse( $text, $article->mTitle, $options ); |
| 588 | + } |
| 589 | + $u = new LinksUpdate( $this->page, $poutput ); |
| 590 | + $u->doUpdate(); |
| 591 | + |
| 592 | + # Clear the cache... |
| 593 | + $this->page->invalidateCache(); |
| 594 | + # Purge cache/squids for this page and any page that uses it |
| 595 | + $dbw->commit(); |
| 596 | + Article::onArticleEdit( $article->getTitle() ); |
| 597 | + |
| 598 | + wfProfileOut( __METHOD__ ); |
| 599 | + return true; |
| 600 | + } |
| 601 | + |
| 602 | + /** |
| 603 | + * Get a validation key from versioning metadata |
| 604 | + * @param string $tmpP |
| 605 | + * @param string $imgP |
| 606 | + * @param string $imgV |
| 607 | + * @param integer $rid rev ID |
| 608 | + * @return string |
| 609 | + */ |
| 610 | + public static function validationKey( $tmpP, $imgP, $imgV, $rid ) { |
| 611 | + global $wgReviewCodes; |
| 612 | + # Fall back to $wgSecretKey/$wgProxyKey |
| 613 | + if ( empty( $wgReviewCodes ) ) { |
| 614 | + global $wgSecretKey, $wgProxyKey; |
| 615 | + $key = $wgSecretKey ? $wgSecretKey : $wgProxyKey; |
| 616 | + $p = md5( $key . $imgP . $tmpP . $rid . $imgV ); |
| 617 | + } else { |
| 618 | + $p = md5( $wgReviewCodes[0] . $imgP . $rid . $tmpP . $imgV . $wgReviewCodes[1] ); |
| 619 | + } |
| 620 | + return $p; |
| 621 | + } |
| 622 | + |
| 623 | + public static function updateRecentChanges( $title, $revId, $rcId = false, $patrol = true ) { |
| 624 | + wfProfileIn( __METHOD__ ); |
| 625 | + $revId = intval( $revId ); |
| 626 | + $dbw = wfGetDB( DB_MASTER ); |
| 627 | + # Olders edits be marked as patrolled now... |
| 628 | + $dbw->update( 'recentchanges', |
| 629 | + array( 'rc_patrolled' => $patrol ? 1 : 0 ), |
| 630 | + array( 'rc_cur_id' => $title->getArticleId(), |
| 631 | + $patrol ? "rc_this_oldid <= $revId" : "rc_this_oldid = $revId" ), |
| 632 | + __METHOD__, |
| 633 | + // Performance |
| 634 | + array( 'USE INDEX' => 'rc_cur_id', 'LIMIT' => 50 ) |
| 635 | + ); |
| 636 | + # New page patrol may be enabled. If so, the rc_id may be the first |
| 637 | + # edit and not this one. If it is different, mark it too. |
| 638 | + if ( $rcId && $rcId != $revId ) { |
| 639 | + $dbw->update( 'recentchanges', |
| 640 | + array( 'rc_patrolled' => 1 ), |
| 641 | + array( 'rc_id' => $rcId, |
| 642 | + 'rc_type' => RC_NEW ), |
| 643 | + __METHOD__ |
| 644 | + ); |
| 645 | + } |
| 646 | + wfProfileOut( __METHOD__ ); |
| 647 | + } |
| 648 | + |
| 649 | + ########## Common form elements ########## |
| 650 | + |
| 651 | + public function approvalSuccessHTML( $showlinks = false ) { |
| 652 | + global $wgUser; |
| 653 | + # Show success message |
| 654 | + $form = "<div class='plainlinks'>"; |
| 655 | + $form .= wfMsgExt( 'revreview-successful', 'parse', |
| 656 | + $this->page->getPrefixedText(), $this->page->getPrefixedUrl() ); |
| 657 | + $form .= wfMsgExt( 'revreview-stable1', 'parse', |
| 658 | + $this->page->getPrefixedUrl(), $this->getOldId() ); |
| 659 | + $form .= "</div>"; |
| 660 | + # Handy links to special pages |
| 661 | + if ( $showlinks && $wgUser->isAllowed( 'unreviewedpages' ) ) { |
| 662 | + $form .= $this->getSpecialLinks(); |
| 663 | + } |
| 664 | + return $form; |
| 665 | + } |
| 666 | + |
| 667 | + public function deapprovalSuccessHTML( $showlinks = false ) { |
| 668 | + global $wgUser; |
| 669 | + # Show success message |
| 670 | + $form = "<div class='plainlinks'>"; |
| 671 | + $form .= wfMsgExt( 'revreview-successful2', 'parse', |
| 672 | + $this->page->getPrefixedText(), $this->page->getPrefixedUrl() ); |
| 673 | + $form .= wfMsgExt( 'revreview-stable2', 'parse', |
| 674 | + $this->page->getPrefixedUrl(), $this->getOldId() ); |
| 675 | + $form .= "</div>"; |
| 676 | + # Handy links to special pages |
| 677 | + if ( $showlinks && $wgUser->isAllowed( 'unreviewedpages' ) ) { |
| 678 | + $form .= $this->getSpecialLinks(); |
| 679 | + } |
| 680 | + return $form; |
| 681 | + } |
| 682 | + |
| 683 | + public function syncFailureHTML( array $status, $showlinks = false ) { |
| 684 | + $form = wfMsgExt( 'revreview-changed', 'parse', $this->page->getPrefixedText() ); |
| 685 | + $form .= "<ul>"; |
| 686 | + foreach ( $status as $n => $text ) { |
| 687 | + $form .= "<li><i>$text</i></li>\n"; |
| 688 | + } |
| 689 | + $form .= "</ul>"; |
| 690 | + if ( $showlinks ) { |
| 691 | + $form .= wfMsg( 'returnto', $this->skin->makeLinkObj( $this->page ) ); |
| 692 | + } |
| 693 | + return $form; |
| 694 | + } |
| 695 | + |
| 696 | + private function getSpecialLinks() { |
| 697 | + $s = '<p>' . wfMsg( 'returnto', |
| 698 | + $this->skin->makeLinkObj( SpecialPage::getTitleFor( 'UnreviewedPages' ) ) ) . '</p>'; |
| 699 | + $s .= '<p>' . wfMsg( 'returnto', |
| 700 | + $this->skin->makeLinkObj( SpecialPage::getTitleFor( 'OldReviewedPages' ) ) ) . '</p>'; |
| 701 | + return $s; |
| 702 | + } |
| 703 | +} |
Property changes on: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/forms/RevisionReviewForm.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 704 | + native |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/forms/PageStabilityForm.php |
— | — | @@ -0,0 +1,661 @@ |
| 2 | +<?php |
| 3 | +# (c) Aaron Schulz 2010 GPL |
| 4 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 5 | + echo "FlaggedRevs extension\n"; |
| 6 | + exit( 1 ); |
| 7 | +} |
| 8 | +/** |
| 9 | + * Class containing stability settings form business logic |
| 10 | + * Note: edit tokens are the responsibility of caller |
| 11 | + * Usage: (a) set ALL form params before doing anything else |
| 12 | + * (b) call ready() when all params are set |
| 13 | + * (c) call preloadSettings() or submit() as needed |
| 14 | + */ |
| 15 | +abstract class PageStabilityForm |
| 16 | +{ |
| 17 | + /* Form parameters which can be user given */ |
| 18 | + protected $page = false; # Target page obj |
| 19 | + protected $watchThis = null; # Watch checkbox |
| 20 | + protected $reviewThis = null; # Auto-review option... |
| 21 | + protected $reason = ''; # Custom/extra reason |
| 22 | + protected $reasonSelection = ''; # Reason dropdown key |
| 23 | + protected $expiry = ''; # Custom expiry |
| 24 | + protected $expirySelection = ''; # Expiry dropdown key |
| 25 | + protected $override = -1; # Default version |
| 26 | + protected $autoreview = ''; # Autoreview restrictions... |
| 27 | + |
| 28 | + protected $oldConfig = array(); # Old page config |
| 29 | + protected $oldExpiry = ''; # Old page config expiry (GMT) |
| 30 | + protected $inputLock = 0; # Disallow bad submissions |
| 31 | + |
| 32 | + protected $skin = null; |
| 33 | + |
| 34 | + public function __construct() { |
| 35 | + global $wgUser; |
| 36 | + $this->skin = $wgUser->getSkin(); |
| 37 | + } |
| 38 | + |
| 39 | + public function getPage() { |
| 40 | + return $this->page; |
| 41 | + } |
| 42 | + |
| 43 | + public function setPage( Title $value ) { |
| 44 | + $this->trySet( $this->page, $value ); |
| 45 | + } |
| 46 | + |
| 47 | + public function getWatchThis() { |
| 48 | + return $this->watchThis; |
| 49 | + } |
| 50 | + |
| 51 | + public function setWatchThis( $value ) { |
| 52 | + $this->trySet( $this->watchThis, $value ); |
| 53 | + } |
| 54 | + |
| 55 | + public function getReason() { |
| 56 | + return $this->reason; |
| 57 | + } |
| 58 | + |
| 59 | + public function setReason( $value ) { |
| 60 | + $this->trySet( $this->reason, $value ); |
| 61 | + } |
| 62 | + |
| 63 | + public function getReasonSelection() { |
| 64 | + return $this->reasonSelection; |
| 65 | + } |
| 66 | + |
| 67 | + public function setReasonSelection( $value ) { |
| 68 | + $this->trySet( $this->reasonSelection, $value ); |
| 69 | + } |
| 70 | + |
| 71 | + public function getExpiry() { |
| 72 | + return $this->expiry; |
| 73 | + } |
| 74 | + |
| 75 | + public function setExpiry( $value ) { |
| 76 | + $this->trySet( $this->expiry, $value ); |
| 77 | + } |
| 78 | + |
| 79 | + public function getExpirySelection() { |
| 80 | + return $this->expirySelection; |
| 81 | + } |
| 82 | + |
| 83 | + public function setExpirySelection( $value ) { |
| 84 | + $this->trySet( $this->expirySelection, $value ); |
| 85 | + } |
| 86 | + |
| 87 | + public function getAutoreview() { |
| 88 | + return $this->autoreview; |
| 89 | + } |
| 90 | + |
| 91 | + public function setAutoreview( $value ) { |
| 92 | + $this->trySet( $this->autoreview, $value ); |
| 93 | + } |
| 94 | + |
| 95 | + /** |
| 96 | + * Set a member field to a value if the fields are unlocked |
| 97 | + */ |
| 98 | + protected function trySet( &$field, $value ) { |
| 99 | + if ( $this->inputLock ) { |
| 100 | + throw new MWException( __CLASS__ . " fields cannot be set anymore.\n"); |
| 101 | + } else { |
| 102 | + $field = $value; // still allowing input |
| 103 | + } |
| 104 | + } |
| 105 | + |
| 106 | + /** |
| 107 | + * Signal that inputs are starting |
| 108 | + */ |
| 109 | + public function start() { |
| 110 | + $this->inputLock = 0; |
| 111 | + } |
| 112 | + |
| 113 | + /** |
| 114 | + * Signal that inputs are done and load old config |
| 115 | + * @return mixed (true on success, error string on target failure) |
| 116 | + */ |
| 117 | + public function ready() { |
| 118 | + $this->inputLock = 1; |
| 119 | + $status = $this->checkTarget(); |
| 120 | + if ( $status !== true ) { |
| 121 | + return $status; // bad target |
| 122 | + } |
| 123 | + $this->loadOldConfig(); // current settings from DB |
| 124 | + return $status; |
| 125 | + } |
| 126 | + |
| 127 | + /* |
| 128 | + * Preload existing page settings (e.g. from GET request). |
| 129 | + * @return mixed (true on success, error string on failure) |
| 130 | + */ |
| 131 | + public function preloadSettings() { |
| 132 | + if ( !$this->inputLock ) { |
| 133 | + throw new MWException( __CLASS__ . " input fields not set yet.\n"); |
| 134 | + } |
| 135 | + $status = $this->checkTarget(); |
| 136 | + if ( $status !== true ) { |
| 137 | + return $status; // bad target |
| 138 | + } |
| 139 | + return $this->reallyPreloadSettings(); // load the params... |
| 140 | + } |
| 141 | + |
| 142 | + /* |
| 143 | + * @return mixed (true on success, error string on failure) |
| 144 | + */ |
| 145 | + protected function reallyPreloadSettings() { |
| 146 | + return true; |
| 147 | + } |
| 148 | + |
| 149 | + /* |
| 150 | + * Verify and clean up parameters (e.g. from POST request). |
| 151 | + * @return mixed (true on success, error string on failure) |
| 152 | + */ |
| 153 | + protected function checkSettings() { |
| 154 | + $status = $this->checkTarget(); |
| 155 | + if ( $status !== true ) { |
| 156 | + return $status; // bad target |
| 157 | + } |
| 158 | + $status = $this->reallyCheckSettings(); // check other params... |
| 159 | + return $status; |
| 160 | + } |
| 161 | + |
| 162 | + /* |
| 163 | + * @return mixed (true on success, error string on failure) |
| 164 | + */ |
| 165 | + protected function reallyCheckSettings() { |
| 166 | + return true; |
| 167 | + } |
| 168 | + |
| 169 | + /* |
| 170 | + * Check that the target page is valid |
| 171 | + * @return mixed (true on success, error string on failure) |
| 172 | + */ |
| 173 | + protected function checkTarget() { |
| 174 | + if ( is_null( $this->page ) ) { |
| 175 | + return 'stabilize_page_invalid'; |
| 176 | + } elseif ( !$this->page->exists() ) { |
| 177 | + return 'stabilize_page_notexists'; |
| 178 | + } elseif ( !FlaggedRevs::inReviewNamespace( $this->page ) ) { |
| 179 | + return 'stabilize_page_unreviewable'; |
| 180 | + } |
| 181 | + return true; |
| 182 | + } |
| 183 | + |
| 184 | + protected function loadOldConfig() { |
| 185 | + # Get the current page config and GMT expiry |
| 186 | + $this->oldConfig = FlaggedRevs::getPageVisibilitySettings( $this->page, FR_MASTER ); |
| 187 | + $this->oldExpiry = $this->oldConfig['expiry'] === 'infinity' |
| 188 | + ? 'infinite' |
| 189 | + : wfTimestamp( TS_RFC2822, $this->oldConfig['expiry'] ); |
| 190 | + } |
| 191 | + |
| 192 | + /* |
| 193 | + * Gets the current config expiry in GMT (or 'infinite') |
| 194 | + * @return string |
| 195 | + */ |
| 196 | + public function getOldExpiryGMT() { |
| 197 | + if ( !$this->inputLock ) { |
| 198 | + throw new MWException( __CLASS__ . " input fields not set yet.\n"); |
| 199 | + } |
| 200 | + return $this->oldExpiry; |
| 201 | + } |
| 202 | + |
| 203 | + /* |
| 204 | + * Can the user change the settings for this page? |
| 205 | + * Note: if the current autoreview restriction is too high for this user |
| 206 | + * then this will return false. Useful for form selectors. |
| 207 | + * @return bool |
| 208 | + */ |
| 209 | + public function isAllowed() { |
| 210 | + # Users who cannot edit or review the page cannot set this |
| 211 | + return ( $this->page |
| 212 | + && $this->page->userCan( 'stablesettings' ) |
| 213 | + && $this->page->userCan( 'edit' ) |
| 214 | + && $this->page->userCan( 'review' ) |
| 215 | + ); |
| 216 | + } |
| 217 | + |
| 218 | + /** |
| 219 | + * Submit the form parameters for the page config to the DB. |
| 220 | + * |
| 221 | + * @return mixed (true on success, error string on failure) |
| 222 | + */ |
| 223 | + public function submit() { |
| 224 | + global $wgUser; |
| 225 | + if ( !$this->inputLock ) { |
| 226 | + throw new MWException( __CLASS__ . " input fields not set yet.\n"); |
| 227 | + } |
| 228 | + $status = $this->checkSettings(); |
| 229 | + if ( $status !== true ) { |
| 230 | + return $status; // cannot submit - broken params |
| 231 | + } |
| 232 | + # Double-check permissions |
| 233 | + if ( !$this->isAllowed() ) { |
| 234 | + return 'stablize_denied'; |
| 235 | + } |
| 236 | + # Are we are going back to site defaults? |
| 237 | + $reset = $this->newConfigIsReset(); |
| 238 | + # Parse and cleanup the expiry time given... |
| 239 | + if ( $reset || $this->expiry == 'infinite' || $this->expiry == 'indefinite' ) { |
| 240 | + $this->expiry = Block::infinity(); // normalize to 'infinity' |
| 241 | + } else { |
| 242 | + # Convert GNU-style date, on error returns -1 for PHP <5.1 and false for PHP >=5.1 |
| 243 | + $this->expiry = strtotime( $this->expiry ); |
| 244 | + if ( $this->expiry < 0 || $this->expiry === false ) { |
| 245 | + return 'stabilize_expiry_invalid'; |
| 246 | + } |
| 247 | + # Convert date to MW timestamp format |
| 248 | + $this->expiry = wfTimestamp( TS_MW, $this->expiry ); |
| 249 | + if ( $this->expiry < wfTimestampNow() ) { |
| 250 | + return 'stabilize_expiry_old'; |
| 251 | + } |
| 252 | + } |
| 253 | + # Update the DB row with the new config... |
| 254 | + $changed = $this->updateConfigRow( $reset ); |
| 255 | + # Log if this actually changed anything... |
| 256 | + if ( $changed ) { |
| 257 | + # Update logs and make a null edit |
| 258 | + $nullRev = $this->updateLogsAndHistory( $reset ); |
| 259 | + # Null edit may have been autoreviewed already |
| 260 | + $frev = FlaggedRevision::newFromTitle( $this->page, $nullRev->getId(), FR_MASTER ); |
| 261 | + # We may need to invalidate the page links after changing the stable version. |
| 262 | + # Only do so if not already done, such as by an auto-review of the null edit. |
| 263 | + $invalidate = !$frev; |
| 264 | + # Check if this null edit is to be reviewed... |
| 265 | + if ( !$frev && $this->reviewThis ) { |
| 266 | + $flags = null; |
| 267 | + $article = new Article( $this->page ); |
| 268 | + # Review this revision of the page... |
| 269 | + $ok = FlaggedRevs::autoReviewEdit( |
| 270 | + $article, $wgUser, $nullRev->getText(), $nullRev, $flags, true ); |
| 271 | + if( $ok ) { |
| 272 | + FlaggedRevs::markRevisionPatrolled( $nullRev ); // reviewed -> patrolled |
| 273 | + $invalidate = false; // links invalidated (with auto-reviewed) |
| 274 | + } |
| 275 | + } |
| 276 | + # Update the links tables as the stable version may now be the default page... |
| 277 | + if ( $invalidate ) { |
| 278 | + FlaggedRevs::titleLinksUpdate( $this->page ); |
| 279 | + } |
| 280 | + } |
| 281 | + # Apply watchlist checkbox value (may be NULL) |
| 282 | + $this->updateWatchlist(); |
| 283 | + # Take this opportunity to purge out expired configurations |
| 284 | + FlaggedRevs::purgeExpiredConfigurations(); |
| 285 | + return true; |
| 286 | + } |
| 287 | + |
| 288 | + /* |
| 289 | + * Do history & log updates: |
| 290 | + * (a) Add a new stability log entry |
| 291 | + * (b) Add a null edit like the log entry |
| 292 | + * @return Revision |
| 293 | + */ |
| 294 | + protected function updateLogsAndHistory( $reset ) { |
| 295 | + global $wgContLang; |
| 296 | + $article = new Article( $this->page ); |
| 297 | + $latest = $this->page->getLatestRevID( GAID_FOR_UPDATE ); |
| 298 | + # Config may have changed to allow stable versions. |
| 299 | + # Refresh tracking to account for any hidden reviewed versions... |
| 300 | + $frev = FlaggedRevision::newFromStable( $this->page, FR_MASTER ); |
| 301 | + if ( $frev ) { |
| 302 | + FlaggedRevs::updateStableVersion( $article, $frev->getRevision(), $latest ); |
| 303 | + } else { |
| 304 | + FlaggedRevs::clearTrackingRows( $article->getId() ); |
| 305 | + } |
| 306 | + # Insert stability log entry... |
| 307 | + $log = new LogPage( 'stable' ); |
| 308 | + if ( $reset ) { |
| 309 | + $log->addEntry( 'reset', $this->page, $this->reason ); |
| 310 | + $type = "stable-logentry-reset"; |
| 311 | + $settings = ''; // no level, expiry info |
| 312 | + } else { |
| 313 | + $params = $this->getLogParams(); |
| 314 | + $action = ( $this->oldConfig === FlaggedRevs::getDefaultVisibilitySettings() ) |
| 315 | + ? 'config' // set a custom configuration |
| 316 | + : 'modify'; // modified an existing custom configuration |
| 317 | + $log->addEntry( $action, $this->page, $this->reason, |
| 318 | + FlaggedRevsLogs::collapseParams( $params ) ); |
| 319 | + $type = "stable-logentry-config"; |
| 320 | + // Settings message in text form (e.g. [x=a,y=b,z]) |
| 321 | + $settings = FlaggedRevsLogs::stabilitySettings( $params, true /*content*/ ); |
| 322 | + } |
| 323 | + # Build null-edit comment...<action: reason [settings] (expiry)> |
| 324 | + $comment = $wgContLang->ucfirst( |
| 325 | + wfMsgForContent( $type, $this->page->getPrefixedText() ) ); // action |
| 326 | + if ( $this->reason != '' ) { |
| 327 | + $comment .= wfMsgForContent( 'colon-separator' ) . $this->reason; // add reason |
| 328 | + } |
| 329 | + if ( $settings != '' ) { |
| 330 | + $comment .= " {$settings}"; // add settings |
| 331 | + } |
| 332 | + # Insert a null revision... |
| 333 | + $dbw = wfGetDB( DB_MASTER ); |
| 334 | + $nullRev = Revision::newNullRevision( $dbw, $article->getId(), $comment, true ); |
| 335 | + $nullRevId = $nullRev->insertOn( $dbw ); |
| 336 | + # Update page record and touch page |
| 337 | + $article->updateRevisionOn( $dbw, $nullRev, $latest ); |
| 338 | + wfRunHooks( 'NewRevisionFromEditComplete', array( $article, $nullRev, $latest ) ); |
| 339 | + # Return null Revision object for autoreview check |
| 340 | + return $nullRev; |
| 341 | + } |
| 342 | + |
| 343 | + /* |
| 344 | + * Checks if new config is the same as the site default |
| 345 | + * @return bool |
| 346 | + */ |
| 347 | + protected function newConfigIsReset() { |
| 348 | + return false; |
| 349 | + } |
| 350 | + |
| 351 | + /* |
| 352 | + * Get assoc. array of log params |
| 353 | + * @return array |
| 354 | + */ |
| 355 | + protected function getLogParams() { |
| 356 | + return array(); |
| 357 | + } |
| 358 | + |
| 359 | + /* |
| 360 | + * (a) Watch page if $watchThis is true |
| 361 | + * (b) Unwatch if $watchThis is false |
| 362 | + */ |
| 363 | + protected function updateWatchlist() { |
| 364 | + global $wgUser; |
| 365 | + # Apply watchlist checkbox value (may be NULL) |
| 366 | + if ( $this->watchThis === true ) { |
| 367 | + $wgUser->addWatch( $this->page ); |
| 368 | + } elseif ( $this->watchThis === false ) { |
| 369 | + $wgUser->removeWatch( $this->page ); |
| 370 | + } |
| 371 | + } |
| 372 | + |
| 373 | + protected function loadExpiry() { |
| 374 | + # Custom expiry takes precedence |
| 375 | + if ( $this->expiry == '' ) { |
| 376 | + $this->expiry = $this->expirySelection; |
| 377 | + if ( $this->expiry == 'existing' ) { |
| 378 | + $this->expiry = $this->oldExpiry; |
| 379 | + } |
| 380 | + } |
| 381 | + } |
| 382 | + |
| 383 | + protected function loadReason() { |
| 384 | + # Custom reason takes precedence |
| 385 | + if ( $this->reasonSelection != 'other' ) { |
| 386 | + $comment = $this->reasonSelection; // start with dropdown reason |
| 387 | + if ( $this->reason != '' ) { |
| 388 | + # Append custom reason |
| 389 | + $comment .= wfMsgForContent( 'colon-separator' ) . $this->reason; |
| 390 | + } |
| 391 | + } else { |
| 392 | + $comment = $this->reason; // just use custom reason |
| 393 | + } |
| 394 | + $this->reason = $comment; |
| 395 | + } |
| 396 | + |
| 397 | + // Same JS used for expiry for either $wgFlaggedRevsProtection case |
| 398 | + public static function addProtectionJS() { |
| 399 | + global $wgOut; |
| 400 | + $wgOut->addScript( |
| 401 | + "<script type=\"text/javascript\"> |
| 402 | + function onFRChangeExpiryDropdown() { |
| 403 | + document.getElementById('mwStabilizeExpiryOther').value = ''; |
| 404 | + } |
| 405 | + function onFRChangeExpiryField() { |
| 406 | + document.getElementById('mwStabilizeExpirySelection').value = 'othertime'; |
| 407 | + } |
| 408 | + </script>" |
| 409 | + ); |
| 410 | + } |
| 411 | +} |
| 412 | + |
| 413 | +// Assumes $wgFlaggedRevsProtection is off |
| 414 | +class PageStabilityGeneralForm extends PageStabilityForm { |
| 415 | + /* Form parameters which can be user given */ |
| 416 | + public $select = -1; # Precedence |
| 417 | + |
| 418 | + public function getReviewThis() { |
| 419 | + return $this->reviewThis; |
| 420 | + } |
| 421 | + |
| 422 | + public function setReviewThis( $value ) { |
| 423 | + $this->trySet( $this->reviewThis, $value ); |
| 424 | + } |
| 425 | + |
| 426 | + public function getPrecedence() { |
| 427 | + return $this->select; |
| 428 | + } |
| 429 | + |
| 430 | + public function setPrecedence( $value ) { |
| 431 | + $this->trySet( $this->select, $value ); |
| 432 | + } |
| 433 | + |
| 434 | + public function getOverride() { |
| 435 | + return $this->override; |
| 436 | + } |
| 437 | + |
| 438 | + public function setOverride( $value ) { |
| 439 | + $this->trySet( $this->override, $value ); |
| 440 | + } |
| 441 | + |
| 442 | + protected function reallyPreloadSettings() { |
| 443 | + $this->select = $this->oldConfig['select']; |
| 444 | + $this->override = $this->oldConfig['override']; |
| 445 | + $this->autoreview = $this->oldConfig['autoreview']; |
| 446 | + $this->expiry = $this->oldExpiry; |
| 447 | + $this->expirySelection = 'existing'; |
| 448 | + $this->watchThis = $this->page->userIsWatching(); |
| 449 | + return true; |
| 450 | + } |
| 451 | + |
| 452 | + protected function reallyCheckSettings() { |
| 453 | + $this->loadReason(); |
| 454 | + $this->loadExpiry(); |
| 455 | + $this->override = $this->override ? 1 : 0; // default version settings is 0 or 1 |
| 456 | + if ( !FlaggedRevs::isValidPrecedence( $this->select ) ) { |
| 457 | + return 'stabilize_invalid_precedence'; // invalid precedence value |
| 458 | + } |
| 459 | + // Check autoreview restriction setting |
| 460 | + if ( $this->autoreview != '' // restriction other than 'none' |
| 461 | + && !in_array( $this->autoreview, FlaggedRevs::getRestrictionLevels() ) ) |
| 462 | + { |
| 463 | + return 'stabilize_invalid_autoreview'; // invalid value |
| 464 | + } |
| 465 | + if ( !FlaggedRevs::userCanSetAutoreviewLevel( $this->autoreview ) ) { |
| 466 | + return 'stabilize_denied'; // invalid value |
| 467 | + } |
| 468 | + return true; |
| 469 | + } |
| 470 | + |
| 471 | + protected function getLogParams() { |
| 472 | + return array( |
| 473 | + 'override' => $this->override, |
| 474 | + 'autoreview' => $this->autoreview, |
| 475 | + 'expiry' => $this->expiry, // TS_MW/infinity |
| 476 | + 'precedence' => $this->select |
| 477 | + ); |
| 478 | + } |
| 479 | + |
| 480 | + // Return current config array |
| 481 | + public function getOldConfig() { |
| 482 | + if ( !$this->inputLock ) { |
| 483 | + throw new MWException( __CLASS__ . " input fields not set yet.\n"); |
| 484 | + } |
| 485 | + return $this->oldConfig; |
| 486 | + } |
| 487 | + |
| 488 | + // returns whether row changed |
| 489 | + protected function updateConfigRow( $reset ) { |
| 490 | + $changed = false; |
| 491 | + $dbw = wfGetDB( DB_MASTER ); |
| 492 | + # If setting to site default values and there is a row then erase it |
| 493 | + if ( $reset ) { |
| 494 | + $dbw->delete( 'flaggedpage_config', |
| 495 | + array( 'fpc_page_id' => $this->page->getArticleID() ), |
| 496 | + __METHOD__ |
| 497 | + ); |
| 498 | + $changed = ( $dbw->affectedRows() != 0 ); // did this do anything? |
| 499 | + # Otherwise, add/replace row if we are not just setting it to the site default |
| 500 | + } elseif ( !$reset ) { |
| 501 | + $dbExpiry = Block::encodeExpiry( $this->expiry, $dbw ); |
| 502 | + # Get current config... |
| 503 | + $oldRow = $dbw->selectRow( 'flaggedpage_config', |
| 504 | + array( 'fpc_select', 'fpc_override', 'fpc_level', 'fpc_expiry' ), |
| 505 | + array( 'fpc_page_id' => $this->page->getArticleID() ), |
| 506 | + __METHOD__, |
| 507 | + 'FOR UPDATE' |
| 508 | + ); |
| 509 | + # Check if this is not the same config as the existing row (if any) |
| 510 | + $changed = self::configIsDifferent( $oldRow, |
| 511 | + $this->select, $this->override, $this->autoreview, $dbExpiry ); |
| 512 | + # If the new config is different, replace the old row... |
| 513 | + if ( $changed ) { |
| 514 | + $dbw->replace( 'flaggedpage_config', |
| 515 | + array( 'PRIMARY' ), |
| 516 | + array( |
| 517 | + 'fpc_page_id' => $this->page->getArticleID(), |
| 518 | + 'fpc_select' => (int)$this->select, |
| 519 | + 'fpc_override' => (int)$this->override, |
| 520 | + 'fpc_level' => $this->autoreview, |
| 521 | + 'fpc_expiry' => $dbExpiry |
| 522 | + ), |
| 523 | + __METHOD__ |
| 524 | + ); |
| 525 | + } |
| 526 | + } |
| 527 | + return $changed; |
| 528 | + } |
| 529 | + |
| 530 | + protected function newConfigIsReset() { |
| 531 | + return ( $this->select == FlaggedRevs::getPrecedence() |
| 532 | + && $this->override == FlaggedRevs::isStableShownByDefault() |
| 533 | + && $this->autoreview == '' ); |
| 534 | + } |
| 535 | + |
| 536 | + // Checks if new config is different than the existing row |
| 537 | + protected function configIsDifferent( $oldRow, $select, $override, $autoreview, $dbExpiry ) { |
| 538 | + if( !$oldRow ) { |
| 539 | + return true; // no previous config |
| 540 | + } |
| 541 | + return ( $oldRow->fpc_select != $select // ...precedence changed, or... |
| 542 | + || $oldRow->fpc_override != $override // ...override changed, or... |
| 543 | + || $oldRow->fpc_level != $autoreview // ...autoreview level changed, or... |
| 544 | + || $oldRow->fpc_expiry != $dbExpiry // ...expiry changed |
| 545 | + ); |
| 546 | + } |
| 547 | +} |
| 548 | + |
| 549 | +// Assumes $wgFlaggedRevsProtection is on |
| 550 | +class PageStabilityProtectForm extends PageStabilityForm { |
| 551 | + protected function reallyPreloadSettings() { |
| 552 | + $this->autoreview = $this->oldConfig['autoreview']; // protect level |
| 553 | + $this->expiry = $this->oldExpiry; |
| 554 | + $this->expirySelection = 'existing'; |
| 555 | + $this->watchThis = $this->page->userIsWatching(); |
| 556 | + return true; |
| 557 | + } |
| 558 | + |
| 559 | + protected function reallyCheckSettings() { |
| 560 | + # WMF temp hack...protection limit quota |
| 561 | + global $wgFlaggedRevsProtectQuota; |
| 562 | + if ( isset( $wgFlaggedRevsProtectQuota ) // quota exists |
| 563 | + && $this->autoreview != '' // and we are protecting |
| 564 | + && FlaggedRevs::getProtectionLevel( $this->oldConfig ) == 'none' ) // and page is unprotected |
| 565 | + { |
| 566 | + $dbw = wfGetDB( DB_MASTER ); |
| 567 | + $count = $dbw->selectField( 'flaggedpage_config', 'COUNT(*)', '', __METHOD__ ); |
| 568 | + if ( $count >= $wgFlaggedRevsProtectQuota ) { |
| 569 | + return 'stabilize_protect_quota'; |
| 570 | + } |
| 571 | + } |
| 572 | + $this->loadReason(); |
| 573 | + $this->loadExpiry(); |
| 574 | + # Autoreview only when protecting currently unprotected pages |
| 575 | + $this->reviewThis = ( FlaggedRevs::getProtectionLevel( $this->oldConfig ) == 'none' ); |
| 576 | + # Autoreview restriction => use stable |
| 577 | + # No autoreview restriction => site default |
| 578 | + $this->override = ( $this->autoreview != '' ) |
| 579 | + ? 1 // edits require review before being published |
| 580 | + : (int)FlaggedRevs::isStableShownByDefault(); // site default |
| 581 | + # Check that settings are a valid protection level... |
| 582 | + $newConfig = array( |
| 583 | + 'override' => $this->override, |
| 584 | + 'autoreview' => $this->autoreview |
| 585 | + ); |
| 586 | + if ( FlaggedRevs::getProtectionLevel( $newConfig ) == 'invalid' ) { |
| 587 | + return 'stabilize_invalid_level'; // double-check configuration |
| 588 | + } |
| 589 | + # Check autoreview restriction setting |
| 590 | + if ( !FlaggedRevs::userCanSetAutoreviewLevel( $this->autoreview ) ) { |
| 591 | + return 'stabilize_denied'; // invalid value |
| 592 | + } |
| 593 | + return true; |
| 594 | + } |
| 595 | + |
| 596 | + // Doesn't include 'precedence'; checked in FlaggedRevsLogs |
| 597 | + protected function getLogParams() { |
| 598 | + return array( |
| 599 | + 'override' => $this->override, // in case of site changes |
| 600 | + 'autoreview' => $this->autoreview, |
| 601 | + 'expiry' => $this->expiry // TS_MW/infinity |
| 602 | + ); |
| 603 | + } |
| 604 | + |
| 605 | + protected function updateConfigRow( $reset ) { |
| 606 | + $changed = false; |
| 607 | + $dbw = wfGetDB( DB_MASTER ); |
| 608 | + # If setting to site default values and there is a row then erase it |
| 609 | + if ( $reset ) { |
| 610 | + $dbw->delete( 'flaggedpage_config', |
| 611 | + array( 'fpc_page_id' => $this->page->getArticleID() ), |
| 612 | + __METHOD__ |
| 613 | + ); |
| 614 | + $changed = ( $dbw->affectedRows() != 0 ); // did this do anything? |
| 615 | + # Otherwise, add/replace row if we are not just setting it to the site default |
| 616 | + } elseif ( !$reset ) { |
| 617 | + $dbExpiry = Block::encodeExpiry( $this->expiry, $dbw ); |
| 618 | + # Get current config... |
| 619 | + $oldRow = $dbw->selectRow( 'flaggedpage_config', |
| 620 | + array( 'fpc_override', 'fpc_level', 'fpc_expiry' ), |
| 621 | + array( 'fpc_page_id' => $this->page->getArticleID() ), |
| 622 | + __METHOD__, |
| 623 | + 'FOR UPDATE' |
| 624 | + ); |
| 625 | + # Check if this is not the same config as the existing row (if any) |
| 626 | + $changed = self::configIsDifferent( $oldRow, |
| 627 | + $this->override, $this->autoreview, $dbExpiry ); |
| 628 | + # If the new config is different, replace the old row... |
| 629 | + if ( $changed ) { |
| 630 | + $dbw->replace( 'flaggedpage_config', |
| 631 | + array( 'PRIMARY' ), |
| 632 | + array( |
| 633 | + 'fpc_page_id' => $this->page->getArticleID(), |
| 634 | + 'fpc_select' => -1, // ignored |
| 635 | + 'fpc_override' => (int)$this->override, |
| 636 | + 'fpc_level' => $this->autoreview, |
| 637 | + 'fpc_expiry' => $dbExpiry |
| 638 | + ), |
| 639 | + __METHOD__ |
| 640 | + ); |
| 641 | + } |
| 642 | + } |
| 643 | + return $changed; |
| 644 | + } |
| 645 | + |
| 646 | + protected function newConfigIsReset() { |
| 647 | + # For protection config, just ignore the fpc_select column |
| 648 | + return ( $this->autoreview == '' ); |
| 649 | + } |
| 650 | + |
| 651 | + // Checks if new config is different than the existing row |
| 652 | + protected function configIsDifferent( $oldRow, $override, $autoreview, $dbExpiry ) { |
| 653 | + if ( !$oldRow ) { |
| 654 | + return true; // no previous config |
| 655 | + } |
| 656 | + # For protection config, just ignore the fpc_select column |
| 657 | + return ( $oldRow->fpc_override != $override // ...override changed, or... |
| 658 | + || $oldRow->fpc_level != $autoreview // ...autoreview level changed, or... |
| 659 | + || $oldRow->fpc_expiry != $dbExpiry // ...expiry changed |
| 660 | + ); |
| 661 | + } |
| 662 | +} |
\ No newline at end of file |
Property changes on: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/forms/PageStabilityForm.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 663 | + native |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/FlaggedRevision.php |
— | — | @@ -380,7 +380,7 @@ |
381 | 381 | * @returns bool |
382 | 382 | */ |
383 | 383 | public function userCanSetFlags() { |
384 | | - return RevisionReview::userCanSetFlags( $this->mTags ); |
| 384 | + return FlaggedRevs::userCanSetFlags( $this->mTags ); |
385 | 385 | } |
386 | 386 | |
387 | 387 | /** |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/FlaggedRevsXML.php |
— | — | @@ -292,15 +292,14 @@ |
293 | 293 | $frev->getRevId(), $time, $revsSince ); |
294 | 294 | } |
295 | 295 | # Make fancy box... |
296 | | - $box = '<div class="flaggedrevs_short_basic">' . $shtml . |
297 | | - ' ' . self::ratingArrow() . "</div>\n"; |
298 | | - $box .= '<div style="position: relative;">'; // for rel-absolute child div |
| 296 | + $box = '<div class="flaggedrevs_short_basic">'; |
| 297 | + $box .= $shtml . self::ratingArrow(); |
| 298 | + $box .= "</div>\n"; |
| 299 | + $box .= '<div style="position:relative;">'; // for rel-absolute child div |
299 | 300 | $box .= Xml::openElement( 'div', |
300 | 301 | array( |
301 | | - 'id' => 'mw-fr-revisionratings', |
302 | | - 'class' => 'flaggedrevs_short_details', |
303 | | - 'onMouseOver' => 'FlaggedRevs.showBoxDetails()', |
304 | | - 'onMouseOut' => 'FlaggedRevs.hideBoxDetails()' |
| 302 | + 'id' => 'mw-fr-revisiondetails', |
| 303 | + 'class' => 'flaggedrevs_short_details', |
305 | 304 | ) |
306 | 305 | ); |
307 | 306 | $box .= $html; // details text |
— | — | @@ -311,7 +310,7 @@ |
312 | 311 | $box .= '<p>' . self::addTagRatings( $flags, true, $color ) . '</p>'; |
313 | 312 | } |
314 | 313 | } |
315 | | - $box .= Xml::closeElement( 'div' ); |
| 314 | + $box .= Xml::closeElement( 'div' ) . "\n"; |
316 | 315 | $box .= "</div>\n"; |
317 | 316 | return $box; |
318 | 317 | } |
— | — | @@ -325,7 +324,6 @@ |
326 | 325 | $img = '<img id="mw-fr-revisiontoggle" class="fr-toggle-arrow"'; |
327 | 326 | $img .= " src=\"{$encPath}/arrow-down.png\" style=\"display:none;\""; |
328 | 327 | $img .= ' onMouseOver="FlaggedRevs.showBoxDetails()"'; |
329 | | - $img .= ' onMouseOut="FlaggedRevs.hideBoxDetails()"'; |
330 | 328 | $img .= ' title="' . wfMsgHtml( 'revreview-toggle-title' ) . '"'; |
331 | 329 | $img .= ' alt="' . wfMsgHtml( 'revreview-toggle-show' ) . '" />'; |
332 | 330 | return $img; |
— | — | @@ -361,7 +359,7 @@ |
362 | 360 | public static function logToggle() { |
363 | 361 | $toggle = '<a id="mw-fr-logtoggle" class="fr-toggle-text" style="display:none;"' . |
364 | 362 | ' onclick="FlaggedRevs.toggleLog()" title="' . |
365 | | - wfMsgHtml( 'revreview-log-toggle-show' ) . '" >' . |
| 363 | + wfMsgHtml( 'revreview-log-toggle-title' ) . '" >' . |
366 | 364 | wfMsgHtml( 'revreview-log-toggle-show' ) . '</a>'; |
367 | 365 | return wfMsgHtml( 'parentheses', $toggle ); |
368 | 366 | } |
— | — | @@ -373,23 +371,22 @@ |
374 | 372 | public static function logDetailsToggle() { |
375 | 373 | $toggle = '<a id="mw-fr-logtoggle" class="fr-toggle-text" style="display:none;"' . |
376 | 374 | ' onclick="FlaggedRevs.toggleLogDetails()" title="' . |
377 | | - wfMsgHtml( 'revreview-log-details-show' ) . '" >' . |
| 375 | + wfMsgHtml( 'revreview-log-details-title' ) . '" >' . |
378 | 376 | wfMsgHtml( 'revreview-log-details-show' ) . '</a>'; |
379 | 377 | return wfMsgHtml( 'parentheses', $toggle ); |
380 | 378 | } |
381 | 379 | |
382 | 380 | /** |
383 | 381 | * @param array $flags, selected flags |
384 | | - * @param array $config, page config |
385 | 382 | * @param bool $disabled, form disabled |
386 | 383 | * @param bool $reviewed, rev already reviewed |
387 | 384 | * @returns string |
388 | 385 | * Generates a main tag inputs (checkboxes/radios/selects) for review form |
389 | 386 | */ |
390 | | - public static function ratingInputs( $flags, $config, $disabled, $reviewed ) { |
| 387 | + public static function ratingInputs( $flags, $disabled, $reviewed ) { |
391 | 388 | $form = ''; |
392 | 389 | # Get all available tags for this page/user |
393 | | - list( $labels, $minLevels ) = self::ratingFormTags( $flags, $config ); |
| 390 | + list( $labels, $minLevels ) = self::ratingFormTags( $flags ); |
394 | 391 | if ( $labels === false ) { |
395 | 392 | $disabled = true; // a tag is unsettable |
396 | 393 | } |
— | — | @@ -464,13 +461,13 @@ |
465 | 462 | return $form; |
466 | 463 | } |
467 | 464 | |
468 | | - protected static function ratingFormTags( $selected, $config ) { |
| 465 | + protected static function ratingFormTags( $selected ) { |
469 | 466 | $labels = array(); |
470 | 467 | $minLevels = array(); |
471 | 468 | # Build up all levels available to user |
472 | 469 | foreach ( FlaggedRevs::getDimensions() as $tag => $levels ) { |
473 | 470 | if ( isset( $selected[$tag] ) && |
474 | | - !RevisionReview::userCan( $tag, $selected[$tag], $config ) ) |
| 471 | + !FlaggedRevs::userCanSetTag( $tag, $selected[$tag] ) ) |
475 | 472 | { |
476 | 473 | return array( false, false ); // form will have to be disabled |
477 | 474 | } |
— | — | @@ -478,7 +475,7 @@ |
479 | 476 | $minLevels[$tag] = false; // first non-zero level number |
480 | 477 | foreach ( $levels as $i => $msg ) { |
481 | 478 | # Some levels may be restricted or not applicable... |
482 | | - if ( !RevisionReview::userCan( $tag, $i, $config ) ) { |
| 479 | + if ( !FlaggedRevs::userCanSetTag( $tag, $i ) ) { |
483 | 480 | continue; // skip this level |
484 | 481 | } else if ( $i > 0 && !$minLevels[$tag] ) { |
485 | 482 | $minLevels[$tag] = $i; // first non-zero level number |
— | — | @@ -632,7 +629,6 @@ |
633 | 630 | # Do we need to get inclusion IDs from parser output? |
634 | 631 | $getPOut = ( $templateIDs && $imageSHA1Keys ); |
635 | 632 | |
636 | | - $config = $article->getVisibilitySettings(); |
637 | 633 | # Variable for sites with no flags, otherwise discarded |
638 | 634 | $approve = $wgRequest->getBool( 'wpApprove' ); |
639 | 635 | # See if the version being displayed is flagged... |
— | — | @@ -647,7 +643,7 @@ |
648 | 644 | $flags = $srev->getTags(); |
649 | 645 | # Check if user is allowed to renew the stable version. |
650 | 646 | # If not, then get the flags for the new revision itself. |
651 | | - if ( !RevisionReview::userCanSetFlags( $oldFlags ) ) { |
| 647 | + if ( !FlaggedRevs::userCanSetFlags( $oldFlags ) ) { |
652 | 648 | $flags = $oldFlags; |
653 | 649 | } |
654 | 650 | $reviewNotes = $srev->getComment(); |
— | — | @@ -682,7 +678,7 @@ |
683 | 679 | |
684 | 680 | # Disable form for unprivileged users |
685 | 681 | $uneditable = !$article->getTitle()->quickUserCan( 'edit' ); |
686 | | - $disabled = !RevisionReview::userCanSetFlags( $flags ) || $uneditable; |
| 682 | + $disabled = !FlaggedRevs::userCanSetFlags( $flags ) || $uneditable; |
687 | 683 | if ( $disabled ) { |
688 | 684 | $form .= Xml::openElement( 'div', array( 'class' => 'fr-rating-controls-disabled', |
689 | 685 | 'id' => 'fr-rating-controls-disabled' ) ); |
— | — | @@ -695,7 +691,7 @@ |
696 | 692 | |
697 | 693 | # Add main checkboxes/selects |
698 | 694 | $form .= Xml::openElement( 'span', array( 'id' => 'mw-fr-ratingselects' ) ); |
699 | | - $form .= FlaggedRevsXML::ratingInputs( $flags, $config, $disabled, (bool)$frev ); |
| 695 | + $form .= FlaggedRevsXML::ratingInputs( $flags, $disabled, (bool)$frev ); |
700 | 696 | $form .= Xml::closeElement( 'span' ); |
701 | 697 | # Add review notes input |
702 | 698 | if ( FlaggedRevs::allowComments() && $wgUser->isAllowed( 'validate' ) ) { |
— | — | @@ -771,7 +767,7 @@ |
772 | 768 | # Pass this in if given; useful for new page patrol |
773 | 769 | $form .= Xml::hidden( 'rcid', $wgRequest->getVal( 'rcid' ) ) . "\n"; |
774 | 770 | # Special token to discourage fiddling... |
775 | | - $checkCode = RevisionReview::validationKey( |
| 771 | + $checkCode = RevisionReviewForm::validationKey( |
776 | 772 | $templateParams, $imageParams, $fileVersion, $id |
777 | 773 | ); |
778 | 774 | $form .= Xml::hidden( 'validatedParams', $checkCode ) . "\n"; |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/specialpages/OldReviewedPages_body.php |
— | — | @@ -213,8 +213,9 @@ |
214 | 214 | 'diff=cur&oldid='.intval($row->stable).'&diffonly=0' ); |
215 | 215 | # Show quality level if there are several |
216 | 216 | if ( FlaggedRevs::qualityVersions() ) { |
217 | | - $quality = $row->quality ? |
218 | | - wfMsgHtml( 'revreview-lev-quality' ) : wfMsgHtml( 'revreview-lev-basic' ); |
| 217 | + $quality = $row->quality |
| 218 | + ? wfMsgHtml( 'revreview-lev-quality' ) |
| 219 | + : wfMsgHtml( 'revreview-lev-basic' ); |
219 | 220 | $quality = " <b>[{$quality}]</b>"; |
220 | 221 | } |
221 | 222 | # Is anybody watching? |
— | — | @@ -253,33 +254,15 @@ |
254 | 255 | } |
255 | 256 | $key = wfMemcKey( 'stableDiffs', 'underReview', $row->stable, $row->page_latest ); |
256 | 257 | # Show if a user is looking at this page |
257 | | - if ( ( $val = $wgMemc->get( $key ) ) ) { |
258 | | - $underReview = " <b class='fr-under-review'>" . |
259 | | - wfMsgHtml( 'oldreviewedpages-viewing' ) . '</b>'; |
| 258 | + if ( $wgMemc->get( $key ) ) { |
| 259 | + $underReview = ' <span class="fr-under-review">' . |
| 260 | + wfMsgHtml( 'oldreviewedpages-viewing' ) . '</span>'; |
260 | 261 | } |
261 | 262 | |
262 | 263 | return( "<li{$css}>{$link} ({$hist}) {$stxt} ({$review}) <i>{$age}</i>" . |
263 | 264 | "{$quality}{$watching}{$underReview}</li>" ); |
264 | 265 | } |
265 | 266 | |
266 | | - /** |
267 | | - * Get the timestamp of the next revision |
268 | | - * |
269 | | - * @param integer $revision Revision ID. Get the revision that was after this one. |
270 | | - * @param integer $page, page ID |
271 | | - */ |
272 | | - protected function getNextRevisionTimestamp( $revision, $page ) { |
273 | | - $dbr = wfGetDB( DB_SLAVE ); |
274 | | - return $dbr->selectField( 'revision', 'rev_timestamp', |
275 | | - array( |
276 | | - 'rev_page' => $page, |
277 | | - 'rev_id > ' . intval( $revision ) |
278 | | - ), |
279 | | - __METHOD__, |
280 | | - array( 'ORDER BY' => 'rev_id' ) |
281 | | - ); |
282 | | - } |
283 | | - |
284 | 267 | protected static function getLineClass( $hours, $uw ) { |
285 | 268 | if ( $uw == 0 ) |
286 | 269 | return 'fr-unreviewed-unwatched'; |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/specialpages/ProblemChanges_body.php |
— | — | @@ -173,19 +173,26 @@ |
174 | 174 | |
175 | 175 | public function formatRow( $row ) { |
176 | 176 | global $wgLang, $wgUser, $wgMemc; |
177 | | - |
178 | | - $css = $stxt = $quality = $underReview = ''; |
179 | | - $title = Title::makeTitle( $row->page_namespace, $row->page_title ); |
| 177 | + $css = $quality = $tags = $underReview = ''; |
| 178 | + |
| 179 | + $title = Title::newFromRow( $row ); |
180 | 180 | $link = $this->skin->makeKnownLinkObj( $title ); |
181 | 181 | $review = $this->skin->makeKnownLinkObj( $title, |
182 | 182 | wfMsg( 'oldreviewed-diff' ), |
183 | | - 'diff=cur&oldid='.intval($row->stable).'&diffonly=0' ); |
| 183 | + 'diff=cur&oldid=' . intval($row->stable) . '&diffonly=0' ); |
184 | 184 | # Show quality level if there are several |
185 | 185 | if ( FlaggedRevs::qualityVersions() ) { |
186 | | - $quality = $row->quality ? |
187 | | - wfMsgHtml( 'revreview-lev-quality' ) : wfMsgHtml( 'revreview-lev-basic' ); |
| 186 | + $quality = $row->quality |
| 187 | + ? wfMsgHtml( 'revreview-lev-quality' ) |
| 188 | + : wfMsgHtml( 'revreview-lev-basic' ); |
188 | 189 | $quality = " <b>[{$quality}]</b>"; |
189 | 190 | } |
| 191 | + # What are the tags? |
| 192 | + $dbTags = self::getRevisionTags( $title->getArticleID(), $row->stable ); |
| 193 | + if ( $dbTags ) { |
| 194 | + $tags = htmlspecialchars( implode( ', ', $dbTags ) ); |
| 195 | + $tags = ' <b>' . wfMsgHtml( 'parentheses', $tags ) . '</b>'; |
| 196 | + } |
190 | 197 | # Is anybody watching? |
191 | 198 | if ( !$this->including() && $wgUser->isAllowed( 'unreviewedpages' ) ) { |
192 | 199 | $uw = UnreviewedPages::usersWatching( $title ); |
— | — | @@ -222,32 +229,34 @@ |
223 | 230 | } |
224 | 231 | $key = wfMemcKey( 'stableDiffs', 'underReview', $row->stable, $row->page_latest ); |
225 | 232 | # Show if a user is looking at this page |
226 | | - if ( ( $val = $wgMemc->get( $key ) ) ) { |
227 | | - $underReview = " <b class='fr-under-review'>" . |
228 | | - wfMsgHtml( 'oldreviewedpages-viewing' ) . '</b>'; |
| 233 | + if ( $wgMemc->get( $key ) ) { |
| 234 | + $underReview = ' <span class="fr-under-review">' . |
| 235 | + wfMsgHtml( 'oldreviewedpages-viewing' ) . '</span>'; |
229 | 236 | } |
230 | 237 | |
231 | | - return( "<li{$css}>{$link} {$stxt} ({$review}) <i>{$age}</i>" . |
232 | | - "{$quality}{$watching}{$underReview}</li>" ); |
| 238 | + return( "<li{$css}>{$link} ({$review}) <i>{$age}</i>" . |
| 239 | + "{$quality}{$tags}{$watching}{$underReview}</li>" ); |
233 | 240 | } |
234 | 241 | |
235 | 242 | /** |
236 | | - * Get the timestamp of the next revision |
237 | | - * |
238 | | - * @param integer $revision Revision ID. Get the revision that was after this one. |
239 | | - * @param integer $page, page ID |
| 243 | + * Get the tags of the revisions of a page after a certain rev |
| 244 | + * @param integer $pageId, page ID |
| 245 | + * @param integer $revId, rev ID |
240 | 246 | */ |
241 | | - protected function getNextRevisionTimestamp( $revision, $page ) { |
| 247 | + protected static function getRevisionTags( $pageId, $revId ) { |
| 248 | + $tags = array(); |
242 | 249 | $dbr = wfGetDB( DB_SLAVE ); |
243 | | - |
244 | | - return $dbr->selectField( 'revision', 'rev_timestamp', |
245 | | - array( |
246 | | - 'rev_page' => $page, |
247 | | - 'rev_id > ' . intval( $revision ) |
248 | | - ), |
249 | | - __METHOD__, |
250 | | - array( 'ORDER BY' => 'rev_id' ) |
| 250 | + $res = $dbr->select( |
| 251 | + array( 'revision', 'change_tag' ), |
| 252 | + 'DISTINCT(ct_tag)', // unique tags |
| 253 | + array( 'rev_page' => $pageId, 'rev_id > ' . intval($revId), |
| 254 | + 'rev_id = ct_rev_id' ), |
| 255 | + __METHOD__ |
251 | 256 | ); |
| 257 | + foreach( $res as $row ) { |
| 258 | + $tags[] = $row->ct_tag; |
| 259 | + } |
| 260 | + return $tags; |
252 | 261 | } |
253 | 262 | |
254 | 263 | protected static function getLineClass( $hours, $uw ) { |
— | — | @@ -293,7 +302,8 @@ |
294 | 303 | $conds = $this->mConds; |
295 | 304 | $tables = array( 'revision', 'change_tag', 'page' ); |
296 | 305 | $fields = array( 'page_namespace' , 'page_title', 'page_latest' ); |
297 | | - $ctIndex = $wgOldChangeTagsIndex ? 'ct_rev_id' : 'change_tag_rev_tag'; |
| 306 | + $ctIndex = $wgOldChangeTagsIndex ? |
| 307 | + 'ct_rev_id' : 'change_tag_rev_tag'; |
298 | 308 | # Show outdated "stable" pages |
299 | 309 | if ( $this->level < 0 ) { |
300 | 310 | $fields[] = 'fp_stable AS stable'; |
— | — | @@ -308,7 +318,8 @@ |
309 | 319 | $conds['ct_tag'] = $this->tag; |
310 | 320 | } |
311 | 321 | $conds[] = 'page_id = fp_page_id'; |
312 | | - $useIndex = array( 'flaggedpages' => 'fp_pending_since', 'change_tag' => $ctIndex ); |
| 322 | + $useIndex = array( |
| 323 | + 'flaggedpages' => 'fp_pending_since', 'change_tag' => $ctIndex ); |
313 | 324 | # Filter by category |
314 | 325 | if ( $this->category != '' ) { |
315 | 326 | array_unshift( $tables, 'categorylinks' ); // order matters |
— | — | @@ -331,8 +342,8 @@ |
332 | 343 | $conds[] = 'rev_id > fpp_rev_id'; |
333 | 344 | $conds[] = 'rev_id = ct_rev_id'; |
334 | 345 | $conds['ct_tag'] = $this->tag; |
335 | | - $useIndex = array( 'flaggedpage_pending' => 'fpp_quality_pending', |
336 | | - 'change_tag' => $ctIndex ); |
| 346 | + $useIndex = array( |
| 347 | + 'flaggedpage_pending' => 'fpp_quality_pending', 'change_tag' => $ctIndex ); |
337 | 348 | # Filter by review level |
338 | 349 | $conds['fpp_quality'] = $this->level; |
339 | 350 | # Filter by category |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/specialpages/Stabilization_body.php |
— | — | @@ -4,25 +4,30 @@ |
5 | 5 | exit( 1 ); |
6 | 6 | } |
7 | 7 | |
| 8 | +// Assumes $wgFlaggedRevsProtection is off |
8 | 9 | class Stabilization extends UnlistedSpecialPage |
9 | 10 | { |
| 11 | + protected $form = null; |
| 12 | + protected $skin; |
| 13 | + |
10 | 14 | public function __construct() { |
| 15 | + global $wgUser; |
11 | 16 | parent::__construct( 'Stabilization', 'stablesettings' ); |
| 17 | + $this->skin = $wgUser->getSkin(); |
12 | 18 | } |
13 | 19 | |
14 | 20 | public function execute( $par ) { |
15 | 21 | global $wgRequest, $wgUser, $wgOut; |
16 | 22 | # Check user token |
17 | | - $confirm = $wgRequest->wasPosted() && |
18 | | - $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ); |
19 | | - # Allow unprivileged users to at least view the settings |
20 | | - $this->isAllowed = $wgUser->isAllowed( 'stablesettings' ); |
| 23 | + $confirmed = false; |
21 | 24 | # Let anyone view, but not submit... |
22 | 25 | if ( $wgRequest->wasPosted() ) { |
23 | | - if ( $wgUser->isBlocked( !$confirm ) ) { |
| 26 | + # Check user token |
| 27 | + $confirmed = $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ); |
| 28 | + if ( $wgUser->isBlocked( !$confirmed ) ) { |
24 | 29 | $wgOut->blockedPage(); |
25 | 30 | return; |
26 | | - } elseif ( !$this->isAllowed ) { |
| 31 | + } elseif ( !$wgUser->isAllowed( 'stablesettings' ) ) { |
27 | 32 | $wgOut->permissionRequired( 'stablesettings' ); |
28 | 33 | return; |
29 | 34 | } elseif ( wfReadOnly() ) { |
— | — | @@ -32,216 +37,95 @@ |
33 | 38 | } |
34 | 39 | # Set page title |
35 | 40 | $this->setHeaders(); |
36 | | - |
37 | | - $this->skin = $wgUser->getSkin(); |
38 | | - # Our target page |
39 | | - $this->target = $wgRequest->getVal( 'page', $par ); |
| 41 | + |
| 42 | + $this->form = new PageStabilityGeneralForm(); |
| 43 | + $form = $this->form; // convenience |
| 44 | + # Target page |
| 45 | + $title = Title::newFromURL( $wgRequest->getVal( 'page', $par ) ); |
| 46 | + if ( !$title ) { |
| 47 | + $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); |
| 48 | + return; |
| 49 | + } |
| 50 | + $form->setPage( $title ); |
40 | 51 | # Watch checkbox |
41 | | - $this->watchThis = (bool)$wgRequest->getCheck( 'wpWatchthis' ); |
| 52 | + $form->setWatchThis( (bool)$wgRequest->getCheck( 'wpWatchthis' ) ); |
| 53 | + # Get auto-review option... |
| 54 | + $form->setReviewThis( $wgRequest->getBool( 'wpReviewthis', true ) ); |
42 | 55 | # Reason |
43 | | - $this->reason = $wgRequest->getText( 'wpReason' ); |
44 | | - $this->reasonSelection = $wgRequest->getVal( 'wpReasonSelection' ); |
| 56 | + $form->setReason( $wgRequest->getText( 'wpReason' ) ); |
| 57 | + $form->setReasonSelection( $wgRequest->getVal( 'wpReasonSelection' ) ); |
45 | 58 | # Expiry |
46 | | - $this->expiry = $wgRequest->getText( 'mwStabilize-expiry' ); |
47 | | - $this->expirySelection = $wgRequest->getVal( 'wpExpirySelection' ); |
| 59 | + $form->setExpiry( $wgRequest->getText( 'mwStabilize-expiry' ) ); |
| 60 | + $form->setExpirySelection( $wgRequest->getVal( 'wpExpirySelection' ) ); |
48 | 61 | # Precedence |
49 | | - $this->select = $wgRequest->getInt( 'wpStableconfig-select' ); |
50 | | - $this->override = (int)$wgRequest->getBool( 'wpStableconfig-override' ); |
| 62 | + $form->setPrecedence( $wgRequest->getInt( 'wpStableconfig-select' ) ); |
| 63 | + $form->setOverride( (int)$wgRequest->getBool( 'wpStableconfig-override' ) ); |
51 | 64 | # Get autoreview restrictions... |
52 | | - $this->autoreview = $wgRequest->getVal( 'mwProtect-level-autoreview' ); |
53 | | - # Get auto-review option... |
54 | | - $this->reviewThis = $wgRequest->getBool( 'wpReviewthis', true ); |
55 | | - $this->wasPosted = $wgRequest->wasPosted(); |
| 65 | + $form->setAutoreview( $wgRequest->getVal( 'mwProtect-level-autoreview' ) ); |
56 | 66 | |
57 | | - # Fill in & validate some parameters |
58 | | - $isValid = $this->handleParams(); |
59 | | - |
60 | | - # We need a page... |
61 | | - if ( is_null( $this->page ) ) { |
62 | | - $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); |
63 | | - return; |
64 | | - } elseif ( !$this->page->exists() ) { |
| 67 | + $status = $form->ready(); // params all set |
| 68 | + if ( $status === 'stabilize_page_notexists' ) { |
65 | 69 | $wgOut->addWikiText( |
66 | | - wfMsg( 'stabilization-notexists', $this->page->getPrefixedText() ) ); |
| 70 | + wfMsg( 'stabilization-notexists', $title->getPrefixedText() ) ); |
67 | 71 | return; |
68 | | - } elseif ( !FlaggedRevs::inReviewNamespace( $this->page ) ) { |
| 72 | + } elseif ( $status === 'stabilize_page_unreviewable' ) { |
69 | 73 | $wgOut->addWikiText( |
70 | | - wfMsg( 'stabilization-notcontent', $this->page->getPrefixedText() ) ); |
| 74 | + wfMsg( 'stabilization-notcontent', $title->getPrefixedText() ) ); |
71 | 75 | return; |
72 | 76 | } |
73 | | - # Users who cannot edit or review the page cannot set this |
74 | | - if ( !$this->page->userCan( 'edit' ) || !$this->page->userCan( 'review' ) ) { |
75 | | - $this->isAllowed = false; |
76 | | - } |
77 | | - |
78 | | - # Disable some elements as needed |
79 | | - $this->disabledAttrib = $this->isAllowed ? |
80 | | - array() : array( 'disabled' => 'disabled' ); |
81 | | - # Show form or submit... |
82 | | - if ( $this->isAllowed && $isValid && $confirm ) { |
83 | | - $status = $this->submit(); |
| 77 | + # Form POST request... |
| 78 | + if ( $confirmed && $form->isAllowed() ) { |
| 79 | + $status = $form->submit(); |
84 | 80 | if ( $status === true ) { |
85 | | - $wgOut->redirect( $this->page->getFullUrl() ); |
| 81 | + $wgOut->redirect( $title->getFullUrl() ); |
86 | 82 | } else { |
87 | | - $this->showSettings( wfMsg( $status ) ); |
| 83 | + $this->showForm( wfMsg( $status ) ); |
88 | 84 | } |
| 85 | + # Form GET request... |
89 | 86 | } else { |
90 | | - $this->showSettings(); |
| 87 | + $form->preloadSettings(); |
| 88 | + $this->showForm(); |
91 | 89 | } |
92 | 90 | } |
93 | 91 | |
94 | | - /** |
95 | | - * Verify and clean up parameters and preload data from DB. |
96 | | - * Note: if false is returned items may not all be set. |
97 | | - * TODO: return error keywords? |
98 | | - * @return bool success |
99 | | - */ |
100 | | - public function handleParams() { |
101 | | - $this->page = Title::newFromURL( $this->target ); |
102 | | - if ( is_null( $this->page ) ) { |
103 | | - return false; // page title is invalid |
104 | | - } |
105 | | - # Get the current page config and GMT expiry |
106 | | - $this->config = FlaggedRevs::getPageVisibilitySettings( $this->page, FR_MASTER ); |
107 | | - $this->oldExpiry = $this->config['expiry'] === 'infinity' |
108 | | - ? 'infinite' |
109 | | - : wfTimestamp( TS_RFC2822, $this->config['expiry'] ); |
110 | | - # Handle views (GET) |
111 | | - if ( !$this->wasPosted ) { |
112 | | - # Fill in existing settings |
113 | | - $this->preloadSettings( $this->config ); |
114 | | - # Handle submission data (POST) |
115 | | - } else { |
116 | | - $this->loadReason(); |
117 | | - $this->loadExpiry(); |
118 | | - // Protection level case... |
119 | | - if ( FlaggedRevs::useProtectionLevels() ) { |
120 | | - # Autoreview restriction => use stable |
121 | | - # No autoreview restriction => site default |
122 | | - $this->override = ( $this->autoreview != '' ) |
123 | | - ? 1 // edits require review before being published |
124 | | - : (int)FlaggedRevs::isStableShownByDefault(); |
125 | | - # Leave the selection precedence to the site default |
126 | | - $this->select = FlaggedRevs::getPrecedence(); |
127 | | - # Autoreview only when protecting currently unprotected pages |
128 | | - $this->reviewThis = ( FlaggedRevs::getProtectionLevel( $this->config ) == 'none' ); |
129 | | - # Check that settings are a valid protection level... |
130 | | - $newConfig = array( |
131 | | - 'override' => $this->override, |
132 | | - 'autoreview' => $this->autoreview |
133 | | - ); |
134 | | - if ( FlaggedRevs::getProtectionLevel( $newConfig ) == 'invalid' ) { |
135 | | - return false; // this is not a valid configuration |
136 | | - } |
137 | | - // General case... |
138 | | - } else { |
139 | | - if ( $this->override !== 0 && $this->override !== 1 ) { |
140 | | - return false; // default version settings is 0 or 1 |
141 | | - } |
142 | | - if ( !FlaggedRevs::isValidPrecedence( $this->select ) ) { |
143 | | - return false; // invalid precedence value |
144 | | - } |
145 | | - // Check autoreview restriction setting |
146 | | - if ( !self::userCanSetAutoreviewLevel( $this->autoreview ) ) { |
147 | | - return false; // invalid value |
148 | | - } |
149 | | - } |
150 | | - } |
151 | | - return true; |
152 | | - } |
153 | | - |
154 | | - private function preloadSettings( $config ) { |
155 | | - # Get visiblity settings... |
156 | | - $this->select = $config['select']; |
157 | | - $this->override = $config['override']; |
158 | | - # Get autoreview restrictions... |
159 | | - $this->autoreview = $config['autoreview']; |
160 | | - } |
161 | | - |
162 | | - private function loadExpiry() { |
163 | | - // Custom expiry takes precedence |
164 | | - if ( $this->expiry == '' ) { |
165 | | - $this->expiry = $this->expirySelection; |
166 | | - if ( $this->expiry == 'existing' ) { |
167 | | - $this->expiry = $this->oldExpiry; |
168 | | - } |
169 | | - } |
170 | | - } |
171 | | - |
172 | | - private function loadReason() { |
173 | | - // Custom reason takes precedence |
174 | | - if ( $this->reasonSelection != 'other' ) { |
175 | | - $comment = $this->reasonSelection; // start with dropdown reason |
176 | | - if ( $this->reason != '' ) { |
177 | | - // Append custom reason |
178 | | - $comment .= wfMsgForContent( 'colon-separator' ) . $this->reason; |
179 | | - } |
180 | | - } else { |
181 | | - $comment = $this->reason; // just use custom reason |
182 | | - } |
183 | | - $this->reason = $comment; |
184 | | - } |
185 | | - |
186 | | - /** |
187 | | - * Check if a user can set the autoreview restiction level to $right |
188 | | - * @param string $right the level |
189 | | - * @returns bool |
190 | | - */ |
191 | | - public static function userCanSetAutoreviewLevel( $right ) { |
192 | | - global $wgUser; |
193 | | - if ( $right == '' ) { |
194 | | - return true; // no restrictions (none) |
195 | | - } |
196 | | - if ( !in_array( $right, FlaggedRevs::getRestrictionLevels() ) ) { |
197 | | - return false; // invalid restriction level |
198 | | - } |
199 | | - # Don't let them choose levels above their own rights |
200 | | - if ( $right == 'sysop' ) { |
201 | | - // special case, rewrite sysop to protect and editprotected |
202 | | - if ( !$wgUser->isAllowed( 'protect' ) && !$wgUser->isAllowed( 'editprotected' ) ) { |
203 | | - return false; |
204 | | - } |
205 | | - } else if ( !$wgUser->isAllowed( $right ) ) { |
206 | | - return false; |
207 | | - } |
208 | | - return true; |
209 | | - } |
210 | | - |
211 | | - protected function showSettings( $err = null ) { |
| 92 | + public function showForm( $err = null ) { |
212 | 93 | global $wgOut, $wgLang, $wgUser; |
| 94 | + $form = $this->form; // convenience |
| 95 | + $title = $this->form->getPage(); |
| 96 | + $oldConfig = $form->getOldConfig(); |
| 97 | + |
| 98 | + $s = ''; // form HTML string |
213 | 99 | # Add any error messages |
214 | 100 | if ( "" != $err ) { |
215 | 101 | $wgOut->setSubtitle( wfMsgHtml( 'formerror' ) ); |
216 | 102 | $wgOut->addHTML( "<p class='error'>{$err}</p>\n" ); |
217 | 103 | } |
218 | 104 | # Add header text |
219 | | - if ( !$this->isAllowed ) { |
220 | | - $form = wfMsgExt( 'stabilization-perm', array( 'parse' ), |
221 | | - $this->page->getPrefixedText() ); |
| 105 | + if ( !$form->isAllowed() ) { |
| 106 | + $s .= wfMsgExt( 'stabilization-perm', 'parse', $title->getPrefixedText() ); |
222 | 107 | } else { |
223 | | - $form = wfMsgExt( 'stabilization-text', array( 'parse' ), |
224 | | - $this->page->getPrefixedText() ); |
| 108 | + $s .= wfMsgExt( 'stabilization-text', 'parse', $title->getPrefixedText() ); |
225 | 109 | } |
226 | 110 | # Borrow some protection messages for dropdowns |
227 | 111 | $reasonDropDown = Xml::listDropDown( 'wpReasonSelection', |
228 | 112 | wfMsgForContent( 'protect-dropdown' ), |
229 | 113 | wfMsgForContent( 'protect-otherreason-op' ), |
230 | | - $this->reasonSelection, |
| 114 | + $form->getReasonSelection(), |
231 | 115 | 'mwStabilize-reason', 4 |
232 | 116 | ); |
233 | 117 | $scExpiryOptions = wfMsgForContent( 'protect-expiry-options' ); |
234 | | - $showProtectOptions = ( $scExpiryOptions !== '-' && $this->isAllowed ); |
| 118 | + $showProtectOptions = ( $scExpiryOptions !== '-' && $form->isAllowed() ); |
235 | 119 | # Add the current expiry as an option |
236 | 120 | $expiryFormOptions = ''; |
237 | | - if ( $this->config['expiry'] && $this->config['expiry'] != 'infinity' ) { |
238 | | - $timestamp = $wgLang->timeanddate( $this->config['expiry'] ); |
239 | | - $d = $wgLang->date( $this->config['expiry'] ); |
240 | | - $t = $wgLang->time( $this->config['expiry'] ); |
| 121 | + if ( $oldConfig['expiry'] && $oldConfig['expiry'] != 'infinity' ) { |
| 122 | + $timestamp = $wgLang->timeanddate( $oldConfig['expiry'] ); |
| 123 | + $d = $wgLang->date( $oldConfig['expiry'] ); |
| 124 | + $t = $wgLang->time( $oldConfig['expiry'] ); |
241 | 125 | $expiryFormOptions .= |
242 | 126 | Xml::option( |
243 | 127 | wfMsg( 'protect-existing-expiry', $timestamp, $d, $t ), |
244 | 128 | 'existing', |
245 | | - $this->config['expiry'] == 'existing' |
| 129 | + $oldConfig['expiry'] == 'existing' |
246 | 130 | ) . "\n"; |
247 | 131 | } |
248 | 132 | $expiryFormOptions .= Xml::option( wfMsg( 'protect-othertime-op' ), "othertime" ) . "\n"; |
— | — | @@ -254,41 +138,46 @@ |
255 | 139 | } |
256 | 140 | $show = htmlspecialchars( $show ); |
257 | 141 | $value = htmlspecialchars( $value ); |
258 | | - $expiryFormOptions .= Xml::option( $show, $value, |
259 | | - $this->config['expiry'] === $value ) . "\n"; |
| 142 | + $expiryFormOptions .= Xml::option( $show, $value, $oldConfig['expiry'] === $value ); |
| 143 | + $expiryFormOptions .= "\n"; |
260 | 144 | } |
261 | 145 | # Add stable version override and selection options |
262 | 146 | $special = SpecialPage::getTitleFor( 'Stabilization' ); |
263 | | - $form .= Xml::openElement( 'form', array( 'name' => 'stabilization', |
264 | | - 'action' => $special->getLocalUrl(), 'method' => 'post' ) ) . |
| 147 | + $s .= Xml::openElement( 'form', array( 'name' => 'stabilization', |
| 148 | + 'action' => $special->getLocalUrl(), 'method' => 'post' ) ); |
| 149 | + $s .= |
265 | 150 | Xml::fieldset( wfMsg( 'stabilization-def' ), false ) . "\n" . |
266 | 151 | Xml::radioLabel( wfMsg( 'stabilization-def1' ), 'wpStableconfig-override', 1, |
267 | | - 'default-stable', 1 == $this->override, $this->disabledAttrib ) . '<br />' . "\n" . |
| 152 | + 'default-stable', 1 == $form->getOverride(), $this->disabledAttr() ) . |
| 153 | + '<br />' . "\n" . |
268 | 154 | Xml::radioLabel( wfMsg( 'stabilization-def2' ), 'wpStableconfig-override', 0, |
269 | | - 'default-current', 0 == $this->override, $this->disabledAttrib ) . "\n" . |
| 155 | + 'default-current', 0 == $form->getOverride(), $this->disabledAttr() ) . "\n" . |
270 | 156 | Xml::closeElement( 'fieldset' ) . |
271 | 157 | |
272 | 158 | Xml::fieldset( wfMsg( 'stabilization-select' ), false ) . |
273 | 159 | Xml::radioLabel( wfMsg( 'stabilization-select3' ), 'wpStableconfig-select', |
274 | | - FLAGGED_VIS_PRISTINE, 'stable-select3', FLAGGED_VIS_PRISTINE == $this->select, |
275 | | - $this->disabledAttrib ) . '<br />' . "\n" . |
| 160 | + FLAGGED_VIS_PRISTINE, 'stable-select3', |
| 161 | + FLAGGED_VIS_PRISTINE == $form->getPrecedence(), |
| 162 | + $this->disabledAttr() ) . '<br />' . "\n" . |
276 | 163 | Xml::radioLabel( wfMsg( 'stabilization-select1' ), 'wpStableconfig-select', |
277 | | - FLAGGED_VIS_QUALITY, 'stable-select1', FLAGGED_VIS_QUALITY == $this->select, |
278 | | - $this->disabledAttrib ) . '<br />' . "\n" . |
| 164 | + FLAGGED_VIS_QUALITY, 'stable-select1', |
| 165 | + FLAGGED_VIS_QUALITY == $form->getPrecedence(), |
| 166 | + $this->disabledAttr() ) . '<br />' . "\n" . |
279 | 167 | Xml::radioLabel( wfMsg( 'stabilization-select2' ), 'wpStableconfig-select', |
280 | | - FLAGGED_VIS_LATEST, 'stable-select2', FLAGGED_VIS_LATEST == $this->select, |
281 | | - $this->disabledAttrib ) . '<br />' . "\n" . |
| 168 | + FLAGGED_VIS_LATEST, 'stable-select2', |
| 169 | + FLAGGED_VIS_LATEST == $form->getPrecedence(), |
| 170 | + $this->disabledAttr() ) . '<br />' . "\n" . |
282 | 171 | Xml::closeElement( 'fieldset' ); |
283 | 172 | # Add autoreview restriction select |
284 | | - $form .= Xml::fieldset( wfMsg( 'stabilization-restrict' ), false ) . |
285 | | - $this->buildSelector( $this->autoreview ) . |
| 173 | + $s .= Xml::fieldset( wfMsg( 'stabilization-restrict' ), false ) . |
| 174 | + $this->buildSelector( $form->getAutoreview() ) . |
286 | 175 | Xml::closeElement( 'fieldset' ) . |
287 | 176 | |
288 | 177 | Xml::fieldset( wfMsg( 'stabilization-leg' ), false ) . |
289 | 178 | Xml::openElement( 'table' ); |
290 | 179 | # Add expiry dropdown |
291 | | - if ( $showProtectOptions && $this->isAllowed ) { |
292 | | - $form .= " |
| 180 | + if ( $showProtectOptions && $form->isAllowed() ) { |
| 181 | + $s .= " |
293 | 182 | <tr> |
294 | 183 | <td class='mw-label'>" . |
295 | 184 | Xml::label( wfMsg( 'stabilization-expiry' ), 'mwStabilizeExpirySelection' ) . |
— | — | @@ -299,34 +188,35 @@ |
300 | 189 | 'id' => 'mwStabilizeExpirySelection', |
301 | 190 | 'name' => 'wpExpirySelection', |
302 | 191 | 'onchange' => 'onFRChangeExpiryDropdown()', |
303 | | - ) + $this->disabledAttrib, |
| 192 | + ) + $this->disabledAttr(), |
304 | 193 | $expiryFormOptions ) . |
305 | 194 | "</td> |
306 | 195 | </tr>"; |
307 | 196 | } |
308 | 197 | # Add custom expiry field |
309 | 198 | $attribs = array( 'id' => "mwStabilizeExpiryOther", |
310 | | - 'onkeyup' => 'onFRChangeExpiryField()' ) + $this->disabledAttrib; |
311 | | - $form .= " |
| 199 | + 'onkeyup' => 'onFRChangeExpiryField()' ) + $this->disabledAttr(); |
| 200 | + $formExpiry = $form->getExpiry() ? |
| 201 | + $form->getExpiry() : $form->getOldExpiryGMT(); |
| 202 | + $s .= " |
312 | 203 | <tr> |
313 | 204 | <td class='mw-label'>" . |
314 | 205 | Xml::label( wfMsg( 'stabilization-othertime' ), 'mwStabilizeExpiryOther' ) . |
315 | 206 | '</td> |
316 | 207 | <td class="mw-input">' . |
317 | | - Xml::input( "mwStabilize-expiry", 50, |
318 | | - $this->expiry ? $this->expiry : $this->oldExpiry, $attribs ) . |
| 208 | + Xml::input( "mwStabilize-expiry", 50, $formExpiry, $attribs ) . |
319 | 209 | '</td> |
320 | 210 | </tr>'; |
321 | 211 | # Add comment input and submit button |
322 | | - if ( $this->isAllowed ) { |
| 212 | + if ( $form->isAllowed() ) { |
323 | 213 | $watchLabel = wfMsgExt( 'watchthis', array( 'parseinline' ) ); |
324 | 214 | $watchAttribs = array( 'accesskey' => wfMsg( 'accesskey-watch' ), |
325 | 215 | 'id' => 'wpWatchthis' ); |
326 | 216 | $watchChecked = ( $wgUser->getOption( 'watchdefault' ) |
327 | | - || $this->page->userIsWatching() ); |
| 217 | + || $title->userIsWatching() ); |
328 | 218 | $reviewLabel = wfMsgExt( 'stabilization-review', array( 'parseinline' ) ); |
329 | 219 | |
330 | | - $form .= ' <tr> |
| 220 | + $s .= ' <tr> |
331 | 221 | <td class="mw-label">' . |
332 | 222 | xml::label( wfMsg( 'stabilization-comment' ), 'wpReasonSelection' ) . |
333 | 223 | '</td> |
— | — | @@ -339,13 +229,13 @@ |
340 | 230 | Xml::label( wfMsg( 'stabilization-otherreason' ), 'wpReason' ) . |
341 | 231 | '</td> |
342 | 232 | <td class="mw-input">' . |
343 | | - Xml::input( 'wpReason', 70, $this->reason, array( 'id' => 'wpReason' ) ) . |
| 233 | + Xml::input( 'wpReason', 70, $form->getReason(), array( 'id' => 'wpReason' ) ) . |
344 | 234 | '</td> |
345 | 235 | </tr> |
346 | 236 | <tr> |
347 | 237 | <td></td> |
348 | 238 | <td class="mw-input">' . |
349 | | - Xml::check( 'wpReviewthis', $this->reviewThis, |
| 239 | + Xml::check( 'wpReviewthis', $form->getReviewThis(), |
350 | 240 | array( 'id' => 'wpReviewthis' ) ) . |
351 | 241 | "<label for='wpReviewthis'>{$reviewLabel}</label>" . |
352 | 242 | ' ' . |
— | — | @@ -361,46 +251,33 @@ |
362 | 252 | '</td> |
363 | 253 | </tr>' . Xml::closeElement( 'table' ) . |
364 | 254 | Xml::hidden( 'title', $this->getTitle()->getPrefixedDBKey() ) . |
365 | | - Xml::hidden( 'page', $this->page->getPrefixedText() ) . |
| 255 | + Xml::hidden( 'page', $title->getPrefixedText() ) . |
366 | 256 | Xml::hidden( 'wpEditToken', $wgUser->editToken() ); |
367 | 257 | } else { |
368 | | - $form .= Xml::closeElement( 'table' ); |
| 258 | + $s .= Xml::closeElement( 'table' ); |
369 | 259 | } |
370 | | - $form .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' ); |
| 260 | + $s .= Xml::closeElement( 'fieldset' ) . Xml::closeElement( 'form' ); |
371 | 261 | |
372 | | - $wgOut->addHTML( $form ); |
| 262 | + $wgOut->addHTML( $s ); |
373 | 263 | |
374 | 264 | $wgOut->addHTML( Xml::element( 'h2', null, |
375 | 265 | htmlspecialchars( LogPage::logName( 'stable' ) ) ) ); |
376 | | - LogEventsList::showLogExtract( $wgOut, 'stable', $this->page->getPrefixedText() ); |
| 266 | + LogEventsList::showLogExtract( $wgOut, 'stable', $title->getPrefixedText() ); |
377 | 267 | |
378 | | - # Add some script for expiry dropdowns |
379 | | - self::addProtectionJS(); |
| 268 | + # Add some javascript for expiry dropdowns |
| 269 | + PageStabilityForm::addProtectionJS(); |
380 | 270 | } |
381 | 271 | |
382 | | - public static function addProtectionJS() { |
383 | | - global $wgOut; |
384 | | - $wgOut->addScript( |
385 | | - "<script type=\"text/javascript\"> |
386 | | - function onFRChangeExpiryDropdown() { |
387 | | - document.getElementById('mwStabilizeExpiryOther').value = ''; |
388 | | - } |
389 | | - function onFRChangeExpiryField() { |
390 | | - document.getElementById('mwStabilizeExpirySelection').value = 'othertime'; |
391 | | - } |
392 | | - </script>" |
393 | | - ); |
394 | | - } |
395 | | - |
396 | 272 | protected function buildSelector( $selected ) { |
397 | | - global $wgUser; |
398 | 273 | $allowedLevels = array(); |
399 | 274 | $levels = FlaggedRevs::getRestrictionLevels(); |
400 | 275 | array_unshift( $levels, '' ); // Add a "none" level |
401 | 276 | foreach ( $levels as $key ) { |
402 | 277 | # Don't let them choose levels they can't set, |
403 | 278 | # but *show* them all when the form is disabled. |
404 | | - if ( $this->isAllowed && !self::userCanSetAutoreviewLevel( $key ) ) { |
| 279 | + if ( $this->form->isAllowed() |
| 280 | + && !FlaggedRevs::userCanSetAutoreviewLevel( $key ) ) |
| 281 | + { |
405 | 282 | continue; |
406 | 283 | } |
407 | 284 | $allowedLevels[] = $key; |
— | — | @@ -410,7 +287,7 @@ |
411 | 288 | 'id' => $id, |
412 | 289 | 'name' => $id, |
413 | 290 | 'size' => count( $allowedLevels ), |
414 | | - ) + $this->disabledAttrib; |
| 291 | + ) + $this->disabledAttr(); |
415 | 292 | |
416 | 293 | $out = Xml::openElement( 'select', $attribs ); |
417 | 294 | foreach ( $allowedLevels as $key ) { |
— | — | @@ -439,183 +316,10 @@ |
440 | 317 | } |
441 | 318 | } |
442 | 319 | |
443 | | - public function submit() { |
444 | | - global $wgUser, $wgContLang; |
445 | | - # Take this opportunity to purge out expired configurations |
446 | | - FlaggedRevs::purgeExpiredConfigurations(); |
447 | | - # Are we are going back to site defaults? |
448 | | - $reset = self::configIsReset( $this->select, $this->override, $this->autoreview ); |
449 | | - # Parse and cleanup the expiry time given... |
450 | | - if ( $reset || $this->expiry == 'infinite' || $this->expiry == 'indefinite' ) { |
451 | | - $this->expiry = Block::infinity(); // normalize to 'infinity' |
452 | | - } else { |
453 | | - # Convert GNU-style date, on error returns -1 for PHP <5.1 and false for PHP >=5.1 |
454 | | - $this->expiry = strtotime( $this->expiry ); |
455 | | - if ( $this->expiry < 0 || $this->expiry === false ) { |
456 | | - return 'stabilize_expiry_invalid'; |
457 | | - } |
458 | | - # Convert date to MW timestamp format |
459 | | - $this->expiry = wfTimestamp( TS_MW, $this->expiry ); |
460 | | - if ( $this->expiry < wfTimestampNow() ) { |
461 | | - return 'stabilize_expiry_old'; |
462 | | - } |
463 | | - } |
464 | | - # Update the DB row with the new config... |
465 | | - $changed = $this->updateConfigRow( $reset ); |
466 | | - # Log if this actually changed anything... |
467 | | - if ( $changed ) { |
468 | | - $article = new Article( $this->page ); |
469 | | - $latest = $this->page->getLatestRevID( GAID_FOR_UPDATE ); |
470 | | - # Config may have changed to allow stable versions. |
471 | | - # Refresh tracking to account for any hidden reviewed versions... |
472 | | - $frev = FlaggedRevision::newFromStable( $this->page, FR_MASTER ); |
473 | | - if ( $frev ) { |
474 | | - FlaggedRevs::updateStableVersion( $article, $frev->getRevision(), $latest ); |
475 | | - } else { |
476 | | - FlaggedRevs::clearTrackingRows( $article->getId() ); |
477 | | - } |
478 | | - # Insert stability log entry... |
479 | | - $log = new LogPage( 'stable' ); |
480 | | - if ( $reset ) { |
481 | | - $log->addEntry( 'reset', $this->page, $this->reason ); |
482 | | - $type = "stable-logentry-reset"; |
483 | | - $settings = ''; // no level, expiry info |
484 | | - } else { |
485 | | - $params = array( |
486 | | - 'override' => $this->override, |
487 | | - 'autoreview' => $this->autoreview, |
488 | | - 'expiry' => $this->expiry // TS_MW/infinity |
489 | | - ); |
490 | | - // Precedence unchanged by protection (stabilityLogLinks checks this) |
491 | | - if( !FlaggedRevs::useProtectionLevels() ) { |
492 | | - $params['precedence'] = $this->select; |
493 | | - } |
494 | | - $log->addEntry( 'config', $this->page, $this->reason, |
495 | | - FlaggedRevsLogs::collapseParams( $params ) ); |
496 | | - $type = "stable-logentry-config"; |
497 | | - $settings = FlaggedRevsLogs::stabilitySettings( $params, true /*content*/ ); |
498 | | - } |
499 | | - # Build null-edit comment...<action: reason [settings] (expiry)> |
500 | | - $comment = $wgContLang->ucfirst( |
501 | | - wfMsgForContent( $type, $this->page->getPrefixedText() ) ); // action |
502 | | - if ( $this->reason != '' ) { |
503 | | - $comment .= wfMsgForContent( 'colon-separator' ) . $this->reason; // add reason |
504 | | - } |
505 | | - if ( $settings != '' ) { |
506 | | - $comment .= " {$settings}"; // add settings |
507 | | - } |
508 | | - # Insert a null revision... |
509 | | - $dbw = wfGetDB( DB_MASTER ); |
510 | | - $nullRev = Revision::newNullRevision( $dbw, $article->getId(), $comment, true ); |
511 | | - $nullRevId = $nullRev->insertOn( $dbw ); |
512 | | - # Update page record and touch page |
513 | | - $article->updateRevisionOn( $dbw, $nullRev, $latest ); |
514 | | - wfRunHooks( 'NewRevisionFromEditComplete', |
515 | | - array( $article, $nullRev, $latest ) ); |
516 | | - |
517 | | - # Null edit may have been autoreviewed already |
518 | | - $frev = FlaggedRevision::newFromTitle( $this->page, $nullRevId, FR_MASTER ); |
519 | | - # We may need to invalidate the page links after changing the stable version. |
520 | | - # Only do so if not already done, such as by an auto-review of the null edit. |
521 | | - $invalidate = !$frev; |
522 | | - # Check if this null edit is to be reviewed... |
523 | | - if ( !$frev && $this->reviewThis ) { |
524 | | - $flags = null; |
525 | | - # Review this revision of the page... |
526 | | - $ok = FlaggedRevs::autoReviewEdit( |
527 | | - $article, $wgUser, $nullRev->getText(), $nullRev, $flags, true ); |
528 | | - if( $ok ) { |
529 | | - FlaggedRevs::markRevisionPatrolled( $nullRev ); // reviewed -> patrolled |
530 | | - $invalidate = false; // links invalidated (with auto-reviewed) |
531 | | - } |
532 | | - } |
533 | | - # Update the links tables as the stable version may now be the default page... |
534 | | - if ( $invalidate ) { |
535 | | - FlaggedRevs::titleLinksUpdate( $this->page ); |
536 | | - } |
537 | | - } |
538 | | - # Apply watchlist checkbox value (may be NULL) |
539 | | - if ( $this->watchThis === true ) { |
540 | | - $wgUser->addWatch( $this->page ); |
541 | | - } else if ( $this->watchThis === false ) { |
542 | | - $wgUser->removeWatch( $this->page ); |
543 | | - } |
544 | | - return true; |
| 320 | + // If the this form is disabled, then return the "disabled" attr array |
| 321 | + protected function disabledAttr() { |
| 322 | + return $this->form->isAllowed() |
| 323 | + ? array() |
| 324 | + : array( 'disabled' => 'disabled' ); |
545 | 325 | } |
546 | | - |
547 | | - protected function updateConfigRow( $reset ) { |
548 | | - $changed = false; |
549 | | - $dbw = wfGetDB( DB_MASTER ); |
550 | | - # If setting to site default values and there is a row then erase it |
551 | | - if ( $reset ) { |
552 | | - $dbw->delete( 'flaggedpage_config', |
553 | | - array( 'fpc_page_id' => $this->page->getArticleID() ), |
554 | | - __METHOD__ |
555 | | - ); |
556 | | - $changed = ( $dbw->affectedRows() != 0 ); // did this do anything? |
557 | | - # Otherwise, add/replace row if we are not just setting it to the site default |
558 | | - } elseif ( !$reset ) { |
559 | | - $dbExpiry = Block::encodeExpiry( $this->expiry, $dbw ); |
560 | | - $precedence = FlaggedRevs::useProtectionLevels() |
561 | | - ? -1 // site default; fpc_select "don't care" |
562 | | - : $this->select; |
563 | | - # Get current config... |
564 | | - $oldRow = $dbw->selectRow( 'flaggedpage_config', |
565 | | - array( 'fpc_select', 'fpc_override', 'fpc_level', 'fpc_expiry' ), |
566 | | - array( 'fpc_page_id' => $this->page->getArticleID() ), |
567 | | - __METHOD__, |
568 | | - 'FOR UPDATE' |
569 | | - ); |
570 | | - # Check if this is not the same config as the existing row (if any) |
571 | | - $changed = self::configIsDifferent( $oldRow, |
572 | | - $precedence, $this->override, $this->autoreview, $dbExpiry ); |
573 | | - # If the new config is different, replace the old row... |
574 | | - if ( $changed ) { |
575 | | - $dbw->replace( 'flaggedpage_config', |
576 | | - array( 'PRIMARY' ), |
577 | | - array( |
578 | | - 'fpc_page_id' => $this->page->getArticleID(), |
579 | | - 'fpc_select' => intval( $precedence ), |
580 | | - 'fpc_override' => intval( $this->override ), |
581 | | - 'fpc_level' => $this->autoreview, |
582 | | - 'fpc_expiry' => $dbExpiry |
583 | | - ), |
584 | | - __METHOD__ |
585 | | - ); |
586 | | - } |
587 | | - } |
588 | | - return $changed; |
589 | | - } |
590 | | - |
591 | | - // Checks if new config is the same as the site default |
592 | | - protected function configIsReset( $select, $override, $autoreview ) { |
593 | | - # For protection config, just ignore the fpc_select column |
594 | | - if( FlaggedRevs::useProtectionLevels() ) { |
595 | | - return ( $autoreview == '' ); |
596 | | - } else { |
597 | | - return ( $select == FlaggedRevs::getPrecedence() |
598 | | - && $override == FlaggedRevs::isStableShownByDefault() |
599 | | - && $autoreview == '' ); |
600 | | - } |
601 | | - } |
602 | | - |
603 | | - // Checks if new config is different than the existing row |
604 | | - protected function configIsDifferent( $oldRow, $select, $override, $autoreview, $dbExpiry ) { |
605 | | - if( !$oldRow ) { |
606 | | - return true; // no previous config |
607 | | - } |
608 | | - # For protection config, just ignore the fpc_select column |
609 | | - if( FlaggedRevs::useProtectionLevels() ) { |
610 | | - return ( $oldRow->fpc_override != $override // ...override changed, or... |
611 | | - || $oldRow->fpc_level != $autoreview // ...autoreview level changed, or... |
612 | | - || $oldRow->fpc_expiry != $dbExpiry // ...expiry changed |
613 | | - ); |
614 | | - } else { |
615 | | - return ( $oldRow->fpc_select != $select // ...precedence changed, or... |
616 | | - || $oldRow->fpc_override != $override // ...override changed, or... |
617 | | - || $oldRow->fpc_level != $autoreview // ...autoreview level changed, or... |
618 | | - || $oldRow->fpc_expiry != $dbExpiry // ...expiry changed |
619 | | - ); |
620 | | - } |
621 | | - } |
622 | | -} |
| 326 | +} |
\ No newline at end of file |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/specialpages/RevisionReview_body.php |
— | — | @@ -8,34 +8,18 @@ |
9 | 9 | |
10 | 10 | class RevisionReview extends UnlistedSpecialPage |
11 | 11 | { |
12 | | - // Initialize vars in case of broken AJAX input |
13 | | - var $patrolonly = false; |
14 | | - var $page = null; |
15 | | - var $rcid = 0; |
16 | | - var $approve = false; |
17 | | - var $unapprove = false; |
18 | | - var $oldid = 0; |
19 | | - var $templateParams = ''; |
20 | | - var $imageParams = ''; |
21 | | - var $fileVersion = ''; |
22 | | - var $validatedParams = ''; |
23 | | - var $notes = ''; |
24 | | - var $comment = ''; |
25 | | - var $dims = array(); |
26 | | - var $unapprovedTags = 0; |
27 | | - |
| 12 | + private $form; |
| 13 | + private $page; |
| 14 | + |
28 | 15 | public function __construct() { |
29 | | - global $wgUser; |
30 | 16 | parent::__construct( 'RevisionReview', 'review' ); |
31 | | - $this->skin = $wgUser->getSkin(); |
32 | 17 | } |
33 | 18 | |
34 | 19 | public function execute( $par ) { |
35 | 20 | global $wgRequest, $wgUser, $wgOut; |
36 | | - $confirm = $wgRequest->wasPosted() |
37 | | - && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ); |
| 21 | + $confirmed = $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ); |
38 | 22 | if ( $wgUser->isAllowed( 'review' ) ) { |
39 | | - if ( $wgUser->isBlocked( !$confirm ) ) { |
| 23 | + if ( $wgUser->isBlocked( !$confirmed ) ) { |
40 | 24 | $wgOut->blockedPage(); |
41 | 25 | return; |
42 | 26 | } |
— | — | @@ -48,143 +32,114 @@ |
49 | 33 | return; |
50 | 34 | } |
51 | 35 | $this->setHeaders(); |
| 36 | + |
| 37 | + $this->form = new RevisionReviewForm(); |
| 38 | + $form = $this->form; // convenience |
52 | 39 | # Our target page |
53 | 40 | $this->page = Title::newFromURL( $wgRequest->getVal( 'target' ) ); |
54 | | - if ( is_null( $this->page ) ) { |
| 41 | + if ( !$this->page ) { |
55 | 42 | $wgOut->showErrorPage( 'notargettitle', 'notargettext' ); |
56 | 43 | return; |
57 | 44 | } |
| 45 | + $form->setPage( $this->page ); |
58 | 46 | # Param for sites with binary flagging |
59 | | - $this->approve = $wgRequest->getCheck( 'wpApprove' ); |
60 | | - $this->unapprove = $wgRequest->getCheck( 'wpUnapprove' ); |
61 | | - # Patrol the edit if requested... |
62 | | - $this->markReviewed(); |
63 | | - } |
64 | | - |
65 | | - // implicit dims for binary flag case |
66 | | - public function implicitDims() { |
67 | | - $tag = FlaggedRevs::binaryTagName(); |
68 | | - if ( $tag ) { |
69 | | - if ( $this->approve ) { |
70 | | - return array( $tag => 1 ); |
71 | | - } else if ( $this->unapprove ) { |
72 | | - return array( $tag => 0 ); |
73 | | - } |
74 | | - } |
75 | | - return null; |
76 | | - } |
77 | | - |
78 | | - // non-JS submission code... |
79 | | - private function markReviewed() { |
80 | | - global $wgRequest, $wgOut, $wgUser; |
81 | | - # Must be in reviewable namespace |
82 | | - if ( !FlaggedRevs::inReviewNamespace( $this->page ) ) { |
83 | | - $wgOut->addHTML( wfMsgExt( 'revreview-main', array( 'parse' ) ) ); |
84 | | - return; |
85 | | - } |
86 | | - # Get revision ID |
87 | | - $this->oldid = $wgRequest->getIntOrNull( 'oldid' ); |
88 | | - if ( !$this->oldid ) { |
89 | | - $wgOut->showErrorPage( 'internalerror', 'revreview-revnotfound' ); |
90 | | - return; |
91 | | - } |
92 | | - # Check if page is protected |
93 | | - if ( !$this->page->quickUserCan( 'edit' ) ) { |
94 | | - $wgOut->permissionRequired( 'badaccess-group0' ); |
95 | | - return; |
96 | | - } |
| 47 | + $form->setApprove( $wgRequest->getCheck( 'wpApprove' ) ); |
| 48 | + $form->setUnapprove( $wgRequest->getCheck( 'wpUnapprove' ) ); |
| 49 | + # Rev ID |
| 50 | + $oldid = $wgRequest->getInt( 'oldid' ); |
| 51 | + $form->setOldId( $oldid ); |
97 | 52 | # Special parameter mapping |
98 | | - $this->templateParams = $wgRequest->getVal( 'templateParams' ); |
99 | | - $this->imageParams = $wgRequest->getVal( 'imageParams' ); |
100 | | - $this->fileVersion = $wgRequest->getVal( 'fileVersion' ); |
101 | | - $this->validatedParams = $wgRequest->getVal( 'validatedParams' ); |
| 53 | + $form->setTemplateParams( $wgRequest->getVal( 'templateParams' ) ); |
| 54 | + $form->setFileParams( $wgRequest->getVal( 'imageParams' ) ); |
| 55 | + $form->setFileVersion( $wgRequest->getVal( 'fileVersion' ) ); |
102 | 56 | # Special token to discourage fiddling... |
103 | | - $k = self::validationKey( $this->templateParams, $this->imageParams, |
104 | | - $this->fileVersion, $this->oldid ); |
105 | | - if ( $this->validatedParams !== $k ) { |
106 | | - $wgOut->permissionRequired( 'badaccess-group0' ); |
107 | | - return; |
| 57 | + $form->setValidatedParams( $wgRequest->getVal( 'validatedParams' ) ); |
| 58 | + # Tag values |
| 59 | + foreach ( FlaggedRevs::getDimensions() as $tag => $levels ) { |
| 60 | + # This can be NULL if we uncheck a checkbox |
| 61 | + $val = $wgRequest->getInt( "wp$tag" ); |
| 62 | + $form->setDim( $tag, $val ); |
108 | 63 | } |
109 | 64 | # Log comment |
110 | | - $this->comment = $wgRequest->getText( 'wpReason' ); |
| 65 | + $form->setComment( $wgRequest->getText( 'wpReason' ) ); |
111 | 66 | # Additional notes (displayed at bottom of page) |
112 | | - $this->retrieveNotes( $wgRequest->getText( 'wpNotes' ) ); |
113 | | - # Get the revision's current flags, if any |
114 | | - $this->oflags = FlaggedRevs::getRevisionTags( $this->page, $this->oldid ); |
115 | | - # Get our accuracy/quality dimensions |
116 | | - $this->dims = array(); |
117 | | - $this->unapprovedTags = 0; |
118 | | - # Fill in implicit tag data for binary flag case |
119 | | - if ( $iDims = $this->implicitDims() ) { |
120 | | - $this->dims = $iDims; |
121 | | - } else { |
122 | | - foreach ( FlaggedRevs::getDimensions() as $tag => $levels ) { |
123 | | - $this->dims[$tag] = $wgRequest->getIntOrNull( "wp$tag" ); |
124 | | - if ( $this->dims[$tag] === 0 ) { |
125 | | - $this->unapprovedTags++; |
126 | | - } elseif ( is_null( $this->dims[$tag] ) ) { |
127 | | - # This happens if we uncheck a checkbox |
128 | | - $this->unapprovedTags++; |
129 | | - $this->dims[$tag] = 0; |
130 | | - } |
131 | | - } |
132 | | - } |
133 | | - $fa = FlaggedArticle::getTitleInstance( $this->page ); |
134 | | - $this->config = $fa->getVisibilitySettings(); |
135 | | - # Check permissions and validate |
136 | | - if ( !self::userCanSetFlags( $this->dims, $this->oflags, $this->config ) ) { |
137 | | - $wgOut->permissionRequired( 'badaccess-group0' ); |
| 67 | + $form->setNotes( $wgRequest->getText( 'wpNotes' ) ); |
| 68 | + |
| 69 | + $status = $form->ready(); |
| 70 | + # Page must exist and be in reviewable namespace |
| 71 | + if ( $status === 'review_page_unreviewable' ) { |
| 72 | + $wgOut->addWikiText( wfMsg( 'revreview-main' ) ); |
138 | 73 | return; |
| 74 | + } elseif ( $status === 'review_page_notexists' ) { |
| 75 | + $wgOut->showErrorPage( 'internalerror', 'nopagetext' ); |
| 76 | + return; |
139 | 77 | } |
140 | | - # We must at least rate each category as 1, the minimum |
141 | | - # Exception: we can rate ALL as unapproved to depreciate a revision |
142 | | - if ( $this->unapprovedTags && $this->unapprovedTags < count( FlaggedRevs::getDimensions() ) ) { |
143 | | - $wgOut->addWikiText( wfMsg( 'revreview-toolow' ) ); |
144 | | - $wgOut->returnToMain( false, $this->page ); |
| 78 | + # Basic page permission checks... |
| 79 | + $permErrors = $this->page->getUserPermissionsErrors( 'review', $wgUser, false ); |
| 80 | + if ( !$permErrors ) { |
| 81 | + $permErrors = $this->page->getUserPermissionsErrors( 'edit', $wgUser, false ); |
| 82 | + } |
| 83 | + if ( $permErrors ) { |
| 84 | + $wgOut->showPermissionsErrorPage( $permErrors, 'review' ); |
145 | 85 | return; |
146 | | - } elseif ( !$wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) ) { |
147 | | - $wgOut->addWikiText( wfMsg( 'sessionfailure' ) ); |
148 | | - $wgOut->returnToMain( false, $this->page ); |
149 | | - return; |
150 | 86 | } |
151 | | - # Submit or display info on failure |
| 87 | + |
| 88 | + # Review the edit if requested (POST)... |
152 | 89 | if ( $wgRequest->wasPosted() ) { |
153 | | - list( $approved, $status ) = $this->submit(); |
| 90 | + // Check the edit token... |
| 91 | + if ( !$confirmed ) { |
| 92 | + $wgOut->addWikiText( wfMsg( 'sessionfailure' ) ); |
| 93 | + $wgOut->returnToMain( false, $this->page ); |
| 94 | + return; |
| 95 | + } |
| 96 | + $status = $form->submit(); |
154 | 97 | // Success for either flagging or unflagging |
155 | 98 | if ( $status === true ) { |
156 | 99 | $wgOut->setPageTitle( wfMsgHtml( 'actioncomplete' ) ); |
157 | | - $wgOut->addHTML( $this->showSuccess( $approved, true ) ); |
| 100 | + if ( $form->isApproval() ) { |
| 101 | + $wgOut->addHTML( $form->approvalSuccessHTML( true ) ); |
| 102 | + } else { |
| 103 | + $wgOut->addHTML( $form->deapprovalSuccessHTML( true ) ); |
| 104 | + } |
| 105 | + // Failure for unflagging |
| 106 | + } elseif ( !$form->isApproval() ) { |
| 107 | + $wgOut->redirect( $this->page->getFullUrl() ); // already unflagged |
158 | 108 | // Sync failure for flagging |
159 | | - } elseif ( is_array( $status ) && $approved ) { |
| 109 | + } elseif ( is_array( $status ) ) { |
160 | 110 | $wgOut->setPageTitle( wfMsgHtml( 'internalerror' ) ); |
161 | | - $wgOut->addHTML( $this->showSyncFailure( $status, true ) ); |
162 | | - // Failure for unflagging |
163 | | - } elseif ( $status === false && !$approved ) { |
164 | | - $wgOut->redirect( $this->page->getFullUrl() ); |
165 | | - // Any other fail... |
| 111 | + $wgOut->addHTML( $form->syncFailureHTML( $status, true ) ); |
| 112 | + // Any other fails for flagging... |
166 | 113 | } else { |
167 | | - $wgOut->setPageTitle( wfMsgHtml( 'internalerror' ) ); |
168 | | - $wgOut->showErrorPage( 'internalerror', 'revreview-revnotfound' ); |
| 114 | + if ( $status === 'review_denied' ) { |
| 115 | + $wgOut->permissionRequired( 'badaccess-group0' ); // protected? |
| 116 | + } elseif ( $status === 'review_bad_key' ) { |
| 117 | + $wgOut->permissionRequired( 'badaccess-group0' ); // fiddling |
| 118 | + } elseif ( $status === 'review_bad_oldid' ) { |
| 119 | + $wgOut->showErrorPage( 'internalerror', 'revreview-revnotfound' ); |
| 120 | + } elseif ( $status === 'review_too_low' ) { |
| 121 | + $wgOut->addWikiText( wfMsg( 'revreview-toolow' ) ); |
| 122 | + } else { |
| 123 | + $wgOut->showErrorPage( 'internalerror', $status ); |
| 124 | + } |
169 | 125 | $wgOut->returnToMain( false, $this->page ); |
170 | 126 | } |
| 127 | + // No form to view (GET) |
| 128 | + } else { |
| 129 | + $wgOut->returnToMain( false, $this->page ); |
171 | 130 | } |
172 | 131 | } |
173 | | - |
174 | | - private function retrieveNotes( $notes = '' ) { |
175 | | - global $wgUser; |
176 | | - $this->notes = ( FlaggedRevs::allowComments() && $wgUser->isAllowed( 'validate' ) ) ? |
177 | | - $notes : ''; |
178 | | - } |
179 | | - |
| 132 | + |
180 | 133 | public static function AjaxReview( /*$args...*/ ) { |
181 | | - global $wgUser; |
| 134 | + global $wgUser, $wgOut; |
182 | 135 | $args = func_get_args(); |
183 | 136 | if ( wfReadOnly() ) { |
184 | 137 | return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
185 | 138 | } |
186 | 139 | $tags = FlaggedRevs::getDimensions(); |
187 | 140 | // Make review interface object |
188 | | - $form = new RevisionReview(); |
| 141 | + $form = new RevisionReviewForm(); |
| 142 | + $title = null; // target page |
| 143 | + $editToken = ''; // edit token |
189 | 144 | // Each ajax url argument is of the form param|val. |
190 | 145 | // This means that there is no ugly order dependance. |
191 | 146 | foreach ( $args as $x => $arg ) { |
— | — | @@ -196,598 +151,95 @@ |
197 | 152 | switch( $par ) |
198 | 153 | { |
199 | 154 | case "target": |
200 | | - $form->page = Title::newFromURL( $val ); |
201 | | - if ( is_null( $form->page ) || !FlaggedRevs::inReviewNamespace( $form->page ) ) { |
202 | | - return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
203 | | - } |
| 155 | + $title = Title::newFromURL( $val ); |
204 | 156 | break; |
205 | 157 | case "oldid": |
206 | | - $form->oldid = intval( $val ); |
207 | | - if ( !$form->oldid ) { |
208 | | - return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
209 | | - } |
| 158 | + $form->setOldId( $val ); |
210 | 159 | break; |
211 | 160 | case "rcid": |
212 | | - $form->rcid = intval( $val ); |
| 161 | + $form->setRCId( $val ); |
213 | 162 | break; |
214 | 163 | case "validatedParams": |
215 | | - $form->validatedParams = $val; |
| 164 | + $form->setValidatedParams( $val ); |
216 | 165 | break; |
217 | 166 | case "templateParams": |
218 | | - $form->templateParams = $val; |
| 167 | + $form->setTemplateParams( $val); |
219 | 168 | break; |
220 | 169 | case "imageParams": |
221 | | - $form->imageParams = $val; |
| 170 | + $form->setFileParams( $val ); |
222 | 171 | break; |
223 | 172 | case "fileVersion": |
224 | | - $form->fileVersion = $val; |
| 173 | + $form->setFileVersion( $val ); |
225 | 174 | break; |
226 | 175 | case "wpApprove": |
227 | | - $form->approve = $val; |
| 176 | + $form->setApprove( $val ); |
228 | 177 | break; |
229 | 178 | case "wpUnapprove": |
230 | | - $form->unapprove = $val; |
| 179 | + $form->setUnapprove( $val ); |
231 | 180 | break; |
232 | 181 | case "wpReason": |
233 | | - $form->comment = $val; |
| 182 | + $form->setComment( $val ); |
234 | 183 | break; |
235 | 184 | case "wpNotes": |
236 | | - $form->retrieveNotes( $val ); |
| 185 | + $form->setNotes( $val ); |
237 | 186 | break; |
238 | 187 | case "wpEditToken": |
239 | | - if ( !$wgUser->matchEditToken( $val ) ) { |
240 | | - return '<err#>' . wfMsgExt( 'sessionfailure', 'parseinline' ); |
241 | | - } |
| 188 | + $editToken = $val; |
242 | 189 | break; |
243 | 190 | default: |
244 | 191 | $p = preg_replace( '/^wp/', '', $par ); // kill any "wp" prefix |
245 | 192 | if ( array_key_exists( $p, $tags ) ) { |
246 | | - $form->dims[$p] = intval( $val ); |
247 | | - if ( $form->dims[$p] === 0 ) { |
248 | | - $form->unapprovedTags++; |
249 | | - } |
| 193 | + $form->setDim( $p, $val ); |
250 | 194 | } |
251 | 195 | break; |
252 | 196 | } |
253 | 197 | } |
254 | | - // No page? |
255 | | - if ( !$form->page ) { |
256 | | - return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
| 198 | + # Valid target title? |
| 199 | + if ( !$title ) { |
| 200 | + return '<err#>' . wfMsgExt( 'notargettext', 'parseinline' ); |
257 | 201 | } |
258 | | - // Basic permission check |
259 | | - $permErrors = $form->page->getUserPermissionsErrors( 'review', $wgUser ); |
| 202 | + $form->setPage( $title ); |
| 203 | + |
| 204 | + $status = $form->ready(); // all params loaded |
| 205 | + # Page must exist and be in reviewable namespace |
| 206 | + if ( $status === 'review_page_unreviewable' ) { |
| 207 | + return '<err#>' . wfMsgExt( 'revreview-main', 'parseinline' ); |
| 208 | + } elseif ( $status === 'review_page_notexists' ) { |
| 209 | + return '<err#>' . wfMsgExt( 'nopagetext', 'parseinline' ); |
| 210 | + } |
| 211 | + # Check session via user token |
| 212 | + if ( !$wgUser->matchEditToken( $editToken ) ) { |
| 213 | + return '<err#>' . wfMsgExt( 'sessionfailure', 'parseinline' ); |
| 214 | + } |
| 215 | + # Basic permission checks... |
| 216 | + $permErrors = $title->getUserPermissionsErrors( 'review', $wgUser, false ); |
260 | 217 | if ( !$permErrors ) { |
261 | | - // User must be able to edit this page |
262 | | - $permErrors = $form->page->getUserPermissionsErrors( 'edit', $wgUser ); |
| 218 | + $permErrors = $title->getUserPermissionsErrors( 'edit', $wgUser, false ); |
263 | 219 | } |
264 | 220 | if ( $permErrors ) { |
265 | | - global $wgOut; |
266 | 221 | return '<err#>' . $wgOut->parse( |
267 | 222 | $wgOut->formatPermissionsErrorMessage( $permErrors, 'review' ) |
268 | 223 | ); |
269 | 224 | } |
270 | | - # Fill in implicit tag data for binary flag case |
271 | | - if ( $iDims = $form->implicitDims() ) { |
272 | | - $form->dims = $iDims; |
273 | | - } |
274 | | - // Missing params? |
275 | | - if ( count( $form->dims ) != count( $tags ) ) { |
276 | | - return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
277 | | - } |
278 | | - // Incomplete review? |
279 | | - if ( !$form->oldid || is_null( $form->page ) ) { |
280 | | - return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
281 | | - } |
282 | | - if ( $form->unapprovedTags |
283 | | - && $form->unapprovedTags < count( FlaggedRevs::getDimensions() ) ) |
284 | | - { |
285 | | - return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
286 | | - } |
287 | | - // Doesn't match up? |
288 | | - $k = self::validationKey( $form->templateParams, $form->imageParams, |
289 | | - $form->fileVersion, $form->oldid ); |
290 | | - if ( $form->validatedParams !== $k ) { |
291 | | - return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
292 | | - } |
293 | | - $fa = FlaggedArticle::getTitleInstance( $form->page ); |
294 | | - $form->config = $fa->getVisibilitySettings(); |
295 | | - # Get the revision's current flags, if any |
296 | | - $form->oflags = FlaggedRevs::getRevisionTags( $form->page, $form->oldid ); |
297 | | - # Check tag permissions |
298 | | - if ( !self::userCanSetFlags( $form->dims, $form->oflags, $form->config ) ) { |
299 | | - return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
300 | | - } |
301 | | - list( $approved, $status ) = $form->submit(); |
| 225 | + # Try submission... |
| 226 | + $status = $form->submit(); |
| 227 | + # Approve/de-approve success |
302 | 228 | if ( $status === true ) { |
303 | | - $tier = FlaggedRevs::getLevelTier( $form->dims ) + 1; // shift to 0-3 |
304 | | - return "<suc#><t#$tier>" . $form->showSuccess( $approved ); |
305 | | - } elseif ( $approved && is_array( $status ) ) { |
306 | | - return '<err#>' . $form->showSyncFailure( $status ); |
307 | | - } elseif ( $approved ) { |
308 | | - return '<err#>' . wfMsg( 'revreview-revnotfound' ); |
| 229 | + $tier = FlaggedRevs::getLevelTier( $form->getDims() ) + 1; // shift to 0-3 |
| 230 | + if ( $form->isApproval() ) { |
| 231 | + return "<suc#><t#$tier>" . $form->approvalSuccessHTML( false ); |
| 232 | + } else { |
| 233 | + return "<suc#><t#$tier>" . $form->deapprovalSuccessHTML( false ); |
| 234 | + } |
| 235 | + # De-approve failure |
| 236 | + } elseif ( !$form->isApproval() ) { |
| 237 | + return "<suc#><t#0>"; // failure -> already unflagged |
| 238 | + # Approve sync failure |
| 239 | + } elseif ( is_array( $status ) ) { |
| 240 | + return '<err#>' . $form->syncFailureHTML( $status, false ); |
| 241 | + # Other approval failures |
309 | 242 | } else { // hmmm? |
310 | 243 | return '<err#>' . wfMsgExt( 'revreview-failed', 'parseinline' ); |
311 | 244 | } |
312 | 245 | } |
313 | | - |
314 | | - public function isApproval() { |
315 | | - # If all values are set to zero, this has been unapproved |
316 | | - if ( FlaggedRevs::dimensionsEmpty() ) { |
317 | | - if ( $this->approve && !$this->unapprove ) |
318 | | - return true; // no tags & approve param given |
319 | | - if ( $this->unapprove && !$this->approve ) |
320 | | - return false; |
321 | | - else |
322 | | - return null; // nothing valid asserted |
323 | | - } |
324 | | - foreach ( $this->dims as $quality => $value ) { |
325 | | - if ( $value ) return true; |
326 | | - } |
327 | | - return false; |
328 | | - } |
329 | | - |
330 | | - public function submit() { |
331 | | - global $wgUser; |
332 | | - # If all values are set to zero, this has been unapproved |
333 | | - $approved = $this->isApproval(); |
334 | | - if ( $approved === null ) { |
335 | | - return array( true, false ); // user didn't say |
336 | | - } |
337 | | - # Double-check permissions |
338 | | - if ( !$this->page->quickUserCan( 'edit' ) |
339 | | - || !self::userCanSetFlags( $this->dims, $this->oflags, $this->config ) ) |
340 | | - { |
341 | | - return array( $approved, false ); |
342 | | - } |
343 | | - # We can only approve actual revisions... |
344 | | - if ( $approved ) { |
345 | | - $rev = Revision::newFromTitle( $this->page, $this->oldid ); |
346 | | - # Do not mess with archived/deleted revisions |
347 | | - if ( is_null( $rev ) || $rev->mDeleted ) { |
348 | | - return array( $approved, false ); |
349 | | - } |
350 | | - $status = $this->approveRevision( $rev ); |
351 | | - # We can only unapprove approved revisions... |
352 | | - } else { |
353 | | - $frev = FlaggedRevision::newFromTitle( $this->page, $this->oldid ); |
354 | | - # If we can't find this flagged rev, return to page??? |
355 | | - if ( is_null( $frev ) ) { |
356 | | - return array( $approved, true ); |
357 | | - } |
358 | | - $status = $this->unapproveRevision( $frev ); |
359 | | - } |
360 | | - # Watch page if set to do so |
361 | | - if ( $status === true ) { |
362 | | - if ( $wgUser->getOption( 'flaggedrevswatch' ) && !$this->page->userIsWatching() ) { |
363 | | - $dbw = wfGetDB( DB_MASTER ); |
364 | | - $dbw->begin(); |
365 | | - $wgUser->addWatch( $this->page ); |
366 | | - $dbw->commit(); |
367 | | - } |
368 | | - } |
369 | | - return array( $approved, $status ); |
370 | | - } |
371 | | - |
372 | | - private function showSuccess( $approved, $showlinks = false ) { |
373 | | - global $wgUser; |
374 | | - # Show success message |
375 | | - $msg = $approved ? 'revreview-successful' : 'revreview-successful2'; |
376 | | - $form = "<div class='plainlinks'>" . wfMsgExt( $msg, array( 'parseinline' ), |
377 | | - $this->page->getPrefixedText(), $this->page->getPrefixedUrl() ); |
378 | | - $msg = $approved ? 'revreview-stable1' : 'revreview-stable2'; |
379 | | - $form .= wfMsgExt( $msg, array( 'parse' ), $this->page->getPrefixedUrl(), $this->oldid ); |
380 | | - $form .= "</div>"; |
381 | | - # Handy links to special pages |
382 | | - if ( $showlinks && $wgUser->isAllowed( 'unreviewedpages' ) ) { |
383 | | - $form .= '<p>' . wfMsg( 'returnto', |
384 | | - $this->skin->makeLinkObj( SpecialPage::getTitleFor( 'UnreviewedPages' ) ) ) . '</p>'; |
385 | | - $form .= '<p>' . wfMsg( 'returnto', |
386 | | - $this->skin->makeLinkObj( SpecialPage::getTitleFor( 'OldReviewedPages' ) ) ) . '</p>'; |
387 | | - } |
388 | | - return $form; |
389 | | - } |
390 | | - |
391 | | - private function showSyncFailure( $status, $showlinks = false ) { |
392 | | - $form = wfMsgExt( 'revreview-changed', array( 'parse' ), $this->page->getPrefixedText() ); |
393 | | - $form .= "<ul>"; |
394 | | - foreach ( $status as $n => $text ) { |
395 | | - $form .= "<li><i>$text</i></li>\n"; |
396 | | - } |
397 | | - $form .= "</ul>"; |
398 | | - if ( $showlinks ) { |
399 | | - $form .= wfMsg( 'returnto', $this->skin->makeLinkObj( $this->page ) ); |
400 | | - } |
401 | | - return $form; |
402 | | - } |
403 | | - |
404 | | - /** |
405 | | - * Adds or updates the flagged revision table for this page/id set |
406 | | - * @param Revision $rev |
407 | | - * @returns true on success, array of errors on failure |
408 | | - */ |
409 | | - private function approveRevision( $rev ) { |
410 | | - global $wgUser, $wgMemc, $wgParser, $wgEnableParserCache; |
411 | | - wfProfileIn( __METHOD__ ); |
412 | | - |
413 | | - $article = new Article( $this->page ); |
414 | | - |
415 | | - $quality = 0; |
416 | | - if ( FlaggedRevs::isQuality( $this->dims ) ) { |
417 | | - $quality = FlaggedRevs::isPristine( $this->dims ) ? 2 : 1; |
418 | | - } |
419 | | - # Our flags |
420 | | - $flags = $this->dims; |
421 | | - # Some validation vars to make sure nothing changed during |
422 | | - $lastTempId = 0; |
423 | | - $lastImgTime = "0"; |
424 | | - # Our template version pointers |
425 | | - $tmpset = $tmpParams = array(); |
426 | | - $templateMap = explode( '#', trim( $this->templateParams ) ); |
427 | | - foreach ( $templateMap as $template ) { |
428 | | - if ( !$template ) |
429 | | - continue; |
430 | | - |
431 | | - $m = explode( '|', $template, 2 ); |
432 | | - if ( !isset( $m[0] ) || !isset( $m[1] ) || !$m[0] ) |
433 | | - continue; |
434 | | - |
435 | | - list( $prefixed_text, $rev_id ) = $m; |
436 | | - |
437 | | - $tmp_title = Title::newFromText( $prefixed_text ); // Normalize this to be sure... |
438 | | - if ( is_null( $tmp_title ) ) |
439 | | - continue; // Page must be valid! |
440 | | - |
441 | | - if ( $rev_id > $lastTempId ) |
442 | | - $lastTempId = $rev_id; |
443 | | - |
444 | | - $tmpset[] = array( |
445 | | - 'ft_rev_id' => $rev->getId(), |
446 | | - 'ft_namespace' => $tmp_title->getNamespace(), |
447 | | - 'ft_title' => $tmp_title->getDBkey(), |
448 | | - 'ft_tmp_rev_id' => $rev_id |
449 | | - ); |
450 | | - if ( !isset( $tmpParams[$tmp_title->getNamespace()] ) ) { |
451 | | - $tmpParams[$tmp_title->getNamespace()] = array(); |
452 | | - } |
453 | | - $tmpParams[$tmp_title->getNamespace()][$tmp_title->getDBkey()] = $rev_id; |
454 | | - } |
455 | | - # Our image version pointers |
456 | | - $imgset = $imgParams = array(); |
457 | | - $imageMap = explode( '#', trim( $this->imageParams ) ); |
458 | | - foreach ( $imageMap as $image ) { |
459 | | - if ( !$image ) |
460 | | - continue; |
461 | | - $m = explode( '|', $image, 3 ); |
462 | | - # Expand our parameters ... <name>#<timestamp>#<key> |
463 | | - if ( !isset( $m[0] ) || !isset( $m[1] ) || !isset( $m[2] ) || !$m[0] ) |
464 | | - continue; |
465 | | - |
466 | | - list( $dbkey, $timestamp, $key ) = $m; |
467 | | - |
468 | | - $img_title = Title::makeTitle( NS_IMAGE, $dbkey ); // Normalize |
469 | | - if ( is_null( $img_title ) ) |
470 | | - continue; // Page must be valid! |
471 | | - |
472 | | - if ( $timestamp > $lastImgTime ) |
473 | | - $lastImgTime = $timestamp; |
474 | | - |
475 | | - $imgset[] = array( |
476 | | - 'fi_rev_id' => $rev->getId(), |
477 | | - 'fi_name' => $img_title->getDBkey(), |
478 | | - 'fi_img_timestamp' => $timestamp, |
479 | | - 'fi_img_sha1' => $key |
480 | | - ); |
481 | | - if ( !isset( $imgParams[$img_title->getDBkey()] ) ) { |
482 | | - $imgParams[$img_title->getDBkey()] = array(); |
483 | | - } |
484 | | - $imgParams[$img_title->getDBkey()][$timestamp] = $key; |
485 | | - } |
486 | | - # If this is an image page, store corresponding file info |
487 | | - $fileData = array(); |
488 | | - if ( $this->page->getNamespace() == NS_IMAGE && $this->fileVersion ) { |
489 | | - $data = explode( '#', $this->fileVersion, 2 ); |
490 | | - if ( count( $data ) == 2 ) { |
491 | | - $fileData['name'] = $this->page->getDBkey(); |
492 | | - $fileData['timestamp'] = $data[0]; |
493 | | - $fileData['sha1'] = $data[1]; |
494 | | - } |
495 | | - } |
496 | | - |
497 | | - # Get current stable version ID (for logging) |
498 | | - $oldSv = FlaggedRevision::newFromStable( $this->page, FR_MASTER ); |
499 | | - $oldSvId = $oldSv ? $oldSv->getRevId() : 0; |
500 | | - |
501 | | - # Is this rev already flagged? |
502 | | - $flaggedOutput = false; |
503 | | - $oldfrev = FlaggedRevision::newFromTitle( $this->page, $rev->getId(), FR_MASTER ); |
504 | | - if ( $oldfrev ) { |
505 | | - $flaggedOutput = FlaggedRevs::parseStableText( $article, |
506 | | - $oldfrev->getRevText(), $oldfrev->getRevId() ); |
507 | | - } |
508 | | - |
509 | | - # Be loose on templates that includes other files/templates dynamically. |
510 | | - # Strict checking breaks randomized images/metatemplates...(bug 14580) |
511 | | - global $wgUseCurrentTemplates, $wgUseCurrentImages; |
512 | | - $mustMatch = !( $wgUseCurrentTemplates && $wgUseCurrentImages ); |
513 | | - |
514 | | - # Set our versioning params cache |
515 | | - FlaggedRevs::setIncludeVersionCache( $rev->getId(), $tmpParams, $imgParams ); |
516 | | - # Parse the text and check if all templates/files match up |
517 | | - $text = $rev->getText(); |
518 | | - $stableOutput = FlaggedRevs::parseStableText( $article, $text, $rev->getId() ); |
519 | | - $err =& $stableOutput->fr_includeErrors; |
520 | | - if ( $mustMatch ) { // if template/files must all be specified... |
521 | | - if ( !empty( $err ) |
522 | | - || $stableOutput->fr_newestImageTime > $lastImgTime |
523 | | - || $stableOutput->fr_newestTemplateID > $lastTempId ) |
524 | | - { |
525 | | - wfProfileOut( __METHOD__ ); |
526 | | - return $err; // return templates/files with no version specified |
527 | | - } |
528 | | - } |
529 | | - # Clear our versioning params cache |
530 | | - FlaggedRevs::clearIncludeVersionCache( $rev->getId() ); |
531 | | - |
532 | | - # Is this a duplicate review? |
533 | | - if ( $oldfrev && $flaggedOutput ) { |
534 | | - $synced = true; |
535 | | - if ( $stableOutput->fr_newestImageTime != $flaggedOutput->fr_newestImageTime ) |
536 | | - $synced = false; |
537 | | - elseif ( $stableOutput->fr_newestTemplateID != $flaggedOutput->fr_newestTemplateID ) |
538 | | - $synced = false; |
539 | | - elseif ( $oldfrev->getTags() != $flags ) |
540 | | - $synced = false; |
541 | | - elseif ( $oldfrev->getFileSha1() != @$fileData['sha1'] ) |
542 | | - $synced = false; |
543 | | - elseif ( $oldfrev->getComment() != $this->notes ) |
544 | | - $synced = false; |
545 | | - elseif ( $oldfrev->getQuality() != $quality ) |
546 | | - $synced = false; |
547 | | - # Don't review if the same |
548 | | - if ( $synced ) { |
549 | | - wfProfileOut( __METHOD__ ); |
550 | | - return true; |
551 | | - } |
552 | | - } |
553 | | - |
554 | | - $dbw = wfGetDB( DB_MASTER ); |
555 | | - # Our review entry |
556 | | - $flaggedRevision = new FlaggedRevision( array( |
557 | | - 'fr_rev_id' => $rev->getId(), |
558 | | - 'fr_page_id' => $rev->getPage(), |
559 | | - 'fr_user' => $wgUser->getId(), |
560 | | - 'fr_timestamp' => wfTimestampNow(), |
561 | | - 'fr_comment' => $this->notes, |
562 | | - 'fr_quality' => $quality, |
563 | | - 'fr_tags' => FlaggedRevision::flattenRevisionTags( $flags ), |
564 | | - 'fr_img_name' => $fileData ? $fileData['name'] : null, |
565 | | - 'fr_img_timestamp' => $fileData ? $fileData['timestamp'] : null, |
566 | | - 'fr_img_sha1' => $fileData ? $fileData['sha1'] : null |
567 | | - ) ); |
568 | | - |
569 | | - $dbw->begin(); |
570 | | - $flaggedRevision->insertOn( $tmpset, $imgset ); |
571 | | - # Avoid any lag issues |
572 | | - $this->page->resetArticleId( $rev->getPage() ); |
573 | | - # Update recent changes |
574 | | - self::updateRecentChanges( $this->page, $rev->getId(), $this->rcid, true ); |
575 | | - # Update the article review log |
576 | | - FlaggedRevsLogs::updateLog( $this->page, $this->dims, $this->oflags, |
577 | | - $this->comment, $this->oldid, $oldSvId, true ); |
578 | | - |
579 | | - # Update the links tables as the stable version may now be the default page. |
580 | | - # Try using the parser cache first since we didn't actually edit the current version. |
581 | | - $parserCache = ParserCache::singleton(); |
582 | | - $poutput = $parserCache->get( $article, $wgUser ); |
583 | | - if ( !$poutput |
584 | | - || !isset( $poutput->fr_newestTemplateID ) |
585 | | - || !isset( $poutput->fr_newestImageTime ) ) |
586 | | - { |
587 | | - $options = FlaggedRevs::makeParserOptions(); |
588 | | - $poutput = $wgParser->parse( $article->getContent(), $article->mTitle, $options ); |
589 | | - } |
590 | | - # Prepare for a link tracking update |
591 | | - $u = new LinksUpdate( $this->page, $poutput ); |
592 | | - # If we know that this is now the new stable version |
593 | | - # (which it probably is), save it to the stable cache... |
594 | | - $sv = FlaggedRevision::newFromStable( $this->page, FR_MASTER/*consistent*/ ); |
595 | | - if ( $sv && $sv->getRevId() == $rev->getId() ) { |
596 | | - global $wgParserCacheExpireTime; |
597 | | - $this->page->invalidateCache(); |
598 | | - # Update stable cache with the revision we reviewed. |
599 | | - # Don't cache redirects; it would go unused and complicate things. |
600 | | - if ( !Title::newFromRedirect( $text ) ) { |
601 | | - FlaggedRevs::updatePageCache( $article, $wgUser, $stableOutput ); |
602 | | - } |
603 | | - # We can set the sync cache key already |
604 | | - $includesSynced = true; |
605 | | - if ( $poutput->fr_newestImageTime > $stableOutput->fr_newestImageTime ) { |
606 | | - $includesSynced = false; |
607 | | - } elseif ( $poutput->fr_newestTemplateID > $stableOutput->fr_newestTemplateID ) { |
608 | | - $includesSynced = false; |
609 | | - } |
610 | | - $u->fr_stableRev = $sv; // no need to re-fetch this! |
611 | | - $u->fr_stableParserOut = $stableOutput; // no need to re-fetch this! |
612 | | - # We can set the sync cache key already. |
613 | | - $key = wfMemcKey( 'flaggedrevs', 'includesSynced', $article->getId() ); |
614 | | - $data = FlaggedRevs::makeMemcObj( $includesSynced ? "true" : "false" ); |
615 | | - $wgMemc->set( $key, $data, $wgParserCacheExpireTime ); |
616 | | - } else { |
617 | | - # Get the old stable cache |
618 | | - $stableOutput = FlaggedRevs::getPageCache( $article, $wgUser ); |
619 | | - # Clear the cache...(for page histories) |
620 | | - $this->page->invalidateCache(); |
621 | | - if ( $stableOutput !== false ) { |
622 | | - # Reset stable cache if it existed, since we know it is the same. |
623 | | - FlaggedRevs::updatePageCache( $article, $wgUser, $stableOutput ); |
624 | | - } |
625 | | - } |
626 | | - # Update link tracking. This will trigger extraLinksUpdate()... |
627 | | - $u->doUpdate(); |
628 | | - |
629 | | - $dbw->commit(); |
630 | | - # Purge cache/squids for this page and any page that uses it |
631 | | - Article::onArticleEdit( $this->page ); |
632 | | - |
633 | | - wfProfileOut( __METHOD__ ); |
634 | | - return true; |
635 | | - } |
636 | | - |
637 | | - /** |
638 | | - * @param FlaggedRevision $frev |
639 | | - * Removes flagged revision data for this page/id set |
640 | | - */ |
641 | | - private function unapproveRevision( $frev ) { |
642 | | - global $wgUser, $wgParser, $wgMemc; |
643 | | - wfProfileIn( __METHOD__ ); |
644 | | - |
645 | | - $dbw = wfGetDB( DB_MASTER ); |
646 | | - $dbw->begin(); |
647 | | - # Delete from flaggedrevs table |
648 | | - $dbw->delete( 'flaggedrevs', |
649 | | - array( 'fr_page_id' => $frev->getPage(), 'fr_rev_id' => $frev->getRevId() ) ); |
650 | | - # Wipe versioning params |
651 | | - $dbw->delete( 'flaggedtemplates', array( 'ft_rev_id' => $frev->getRevId() ) ); |
652 | | - $dbw->delete( 'flaggedimages', array( 'fi_rev_id' => $frev->getRevId() ) ); |
653 | | - # Update recent changes |
654 | | - self::updateRecentChanges( $this->page, $frev->getRevId(), false, false ); |
655 | | - |
656 | | - # Get current stable version ID (for logging) |
657 | | - $oldSv = FlaggedRevision::newFromStable( $this->page, FR_MASTER ); |
658 | | - $oldSvId = $oldSv ? $oldSv->getRevId() : 0; |
659 | | - |
660 | | - # Update the article review log |
661 | | - FlaggedRevsLogs::updateLog( $this->page, $this->dims, $this->oflags, |
662 | | - $this->comment, $this->oldid, $oldSvId, false ); |
663 | | - |
664 | | - $article = new Article( $this->page ); |
665 | | - # Update the links tables as a new stable version |
666 | | - # may now be the default page. |
667 | | - $parserCache = ParserCache::singleton(); |
668 | | - $poutput = $parserCache->get( $article, $wgUser ); |
669 | | - if ( $poutput == false ) { |
670 | | - $text = $article->getContent(); |
671 | | - $options = FlaggedRevs::makeParserOptions(); |
672 | | - $poutput = $wgParser->parse( $text, $article->mTitle, $options ); |
673 | | - } |
674 | | - $u = new LinksUpdate( $this->page, $poutput ); |
675 | | - $u->doUpdate(); |
676 | | - |
677 | | - # Clear the cache... |
678 | | - $this->page->invalidateCache(); |
679 | | - # Purge cache/squids for this page and any page that uses it |
680 | | - $dbw->commit(); |
681 | | - Article::onArticleEdit( $article->getTitle() ); |
682 | | - |
683 | | - wfProfileOut( __METHOD__ ); |
684 | | - return true; |
685 | | - } |
686 | | - |
687 | | - /** |
688 | | - * Get a validation key from versioning metadata |
689 | | - * @param string $tmpP |
690 | | - * @param string $imgP |
691 | | - * @param string $imgV |
692 | | - * @param integer $rid rev ID |
693 | | - * @return string |
694 | | - */ |
695 | | - public static function validationKey( $tmpP, $imgP, $imgV, $rid ) { |
696 | | - global $wgReviewCodes; |
697 | | - # Fall back to $wgSecretKey/$wgProxyKey |
698 | | - if ( empty( $wgReviewCodes ) ) { |
699 | | - global $wgSecretKey, $wgProxyKey; |
700 | | - $key = $wgSecretKey ? $wgSecretKey : $wgProxyKey; |
701 | | - $p = md5( $key . $imgP . $tmpP . $rid . $imgV ); |
702 | | - } else { |
703 | | - $p = md5( $wgReviewCodes[0] . $imgP . $rid . $tmpP . $imgV . $wgReviewCodes[1] ); |
704 | | - } |
705 | | - return $p; |
706 | | - } |
707 | | - |
708 | | - /** |
709 | | - * Returns true if a user can set $tag to $value. |
710 | | - * @param string $tag |
711 | | - * @param int $value |
712 | | - * @param array $config (optional page config) |
713 | | - * @returns bool |
714 | | - */ |
715 | | - public static function userCan( $tag, $value, $config = null ) { |
716 | | - global $wgUser; |
717 | | - # Sanity check tag and value |
718 | | - $levels = FlaggedRevs::getTagLevels( $tag ); |
719 | | - $highest = count( $levels ) - 1; |
720 | | - if( !$levels || $value < 0 || $value > $highest ) { |
721 | | - return false; // flag range is invalid |
722 | | - } |
723 | | - $restrictions = FlaggedRevs::getTagRestrictions(); |
724 | | - # No restrictions -> full access |
725 | | - if ( !isset( $restrictions[$tag] ) ) { |
726 | | - return true; |
727 | | - } |
728 | | - # Validators always have full access |
729 | | - if ( $wgUser->isAllowed( 'validate' ) ) { |
730 | | - return true; |
731 | | - } |
732 | | - # Check if this user has any right that lets him/her set |
733 | | - # up to this particular value |
734 | | - foreach ( $restrictions[$tag] as $right => $level ) { |
735 | | - if ( $value <= $level && $level > 0 && $wgUser->isAllowed( $right ) ) { |
736 | | - return true; |
737 | | - } |
738 | | - } |
739 | | - return false; |
740 | | - } |
741 | | - |
742 | | - /** |
743 | | - * Returns true if a user can set $flags. |
744 | | - * This checks if the user has the right to review |
745 | | - * to the given levels for each tag. |
746 | | - * @param array $flags, suggested flags |
747 | | - * @param array $oldflags, pre-existing flags |
748 | | - * @param array $config, visibility settings |
749 | | - * @returns bool |
750 | | - */ |
751 | | - public static function userCanSetFlags( $flags, $oldflags = array(), $config = null ) { |
752 | | - global $wgUser; |
753 | | - if ( !$wgUser->isAllowed( 'review' ) ) |
754 | | - return false; // User is not able to review pages |
755 | | - # Check if all of the required site flags have a valid value |
756 | | - # that the user is allowed to set. |
757 | | - foreach ( FlaggedRevs::getDimensions() as $qal => $levels ) { |
758 | | - $level = isset( $flags[$qal] ) ? $flags[$qal] : 0; |
759 | | - $highest = count( $levels ) - 1; // highest valid level |
760 | | - if ( !self::userCan( $qal, $level, $config ) ) { |
761 | | - return false; // user cannot set proposed flag |
762 | | - } elseif ( isset( $oldflags[$qal] ) && !self::userCan( $qal, $oldflags[$qal] ) ) { |
763 | | - return false; // user cannot change old flag ($config is ignored here) |
764 | | - } |
765 | | - } |
766 | | - return true; |
767 | | - } |
768 | | - |
769 | | - public static function updateRecentChanges( $title, $revId, $rcId = false, $patrol = true ) { |
770 | | - wfProfileIn( __METHOD__ ); |
771 | | - $revId = intval( $revId ); |
772 | | - $dbw = wfGetDB( DB_MASTER ); |
773 | | - # Olders edits be marked as patrolled now... |
774 | | - $dbw->update( 'recentchanges', |
775 | | - array( 'rc_patrolled' => $patrol ? 1 : 0 ), |
776 | | - array( 'rc_cur_id' => $title->getArticleId(), |
777 | | - $patrol ? "rc_this_oldid <= $revId" : "rc_this_oldid = $revId" ), |
778 | | - __METHOD__, |
779 | | - // Performance |
780 | | - array( 'USE INDEX' => 'rc_cur_id', 'LIMIT' => 50 ) |
781 | | - ); |
782 | | - # New page patrol may be enabled. If so, the rc_id may be the first |
783 | | - # edit and not this one. If it is different, mark it too. |
784 | | - if ( $rcId && $rcId != $revId ) { |
785 | | - $dbw->update( 'recentchanges', |
786 | | - array( 'rc_patrolled' => 1 ), |
787 | | - array( 'rc_id' => $rcId, |
788 | | - 'rc_type' => RC_NEW ), |
789 | | - __METHOD__ |
790 | | - ); |
791 | | - } |
792 | | - wfProfileOut( __METHOD__ ); |
793 | | - } |
794 | 246 | } |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/FlaggedRevs.hooks.php |
— | — | @@ -1,5 +1,11 @@ |
2 | 2 | <?php |
3 | | - |
| 3 | +if ( !defined( 'MEDIAWIKI' ) ) { |
| 4 | + echo "FlaggedRevs extension\n"; |
| 5 | + exit( 1 ); |
| 6 | +} |
| 7 | +/** |
| 8 | + * Class containing hooked functions for a FlaggedRevs environment |
| 9 | + */ |
4 | 10 | class FlaggedRevsHooks { |
5 | 11 | /* |
6 | 12 | * Register FlaggedRevs special pages as needed. |
— | — | @@ -78,7 +84,7 @@ |
79 | 85 | |
80 | 86 | return true; |
81 | 87 | } |
82 | | - |
| 88 | + |
83 | 89 | public static function injectGlobalJSVars( &$globalVars ) { |
84 | 90 | global $wgUser; |
85 | 91 | $fa = FlaggedArticleView::globalArticleInstance(); |
— | — | @@ -112,7 +118,7 @@ |
113 | 119 | } |
114 | 120 | return true; |
115 | 121 | } |
116 | | - |
| 122 | + |
117 | 123 | /** |
118 | 124 | * Add FlaggedRevs css for relevant special pages. |
119 | 125 | */ |
— | — | @@ -121,8 +127,8 @@ |
122 | 128 | if ( empty( $wgTitle ) || $wgTitle->getNamespace() !== NS_SPECIAL ) { |
123 | 129 | return true; |
124 | 130 | } |
125 | | - $spPages = array( 'UnreviewedPages', 'OldReviewedPages', 'Watchlist', |
126 | | - 'Recentchanges', 'Contributions' ); |
| 131 | + $spPages = array( 'UnreviewedPages', 'OldReviewedPages', 'ProblemChanges', |
| 132 | + 'Watchlist', 'Recentchanges', 'Contributions' ); |
127 | 133 | foreach ( $spPages as $n => $key ) { |
128 | 134 | if ( $wgTitle->isSpecial( $key ) ) { |
129 | 135 | global $wgScriptPath, $wgFlaggedRevsStylePath, $wgFlaggedRevStyleVersion; |
— | — | @@ -136,7 +142,7 @@ |
137 | 143 | } |
138 | 144 | return true; |
139 | 145 | } |
140 | | - |
| 146 | + |
141 | 147 | /* |
142 | 148 | * Add tag notice, CSS/JS, and set robots policy |
143 | 149 | */ |
— | — | @@ -225,7 +231,7 @@ |
226 | 232 | |
227 | 233 | return true; |
228 | 234 | } |
229 | | - |
| 235 | + |
230 | 236 | /** |
231 | 237 | * Update flaggedrevs tracking tables |
232 | 238 | */ |
— | — | @@ -233,7 +239,7 @@ |
234 | 240 | FlaggedRevs::clearTrackingRows( $id ); |
235 | 241 | return true; |
236 | 242 | } |
237 | | - |
| 243 | + |
238 | 244 | /** |
239 | 245 | * Update stable version selection |
240 | 246 | */ |
— | — | @@ -241,7 +247,7 @@ |
242 | 248 | FlaggedRevs::titleLinksUpdate( $title ); |
243 | 249 | return true; |
244 | 250 | } |
245 | | - |
| 251 | + |
246 | 252 | /** |
247 | 253 | * Update pending revision table |
248 | 254 | * Autoreview pages moved into content NS |
— | — | @@ -388,7 +394,7 @@ |
389 | 395 | } |
390 | 396 | $links[$ns][$dbKey] = 1; |
391 | 397 | } |
392 | | - |
| 398 | + |
393 | 399 | protected static function getExistingLinks( $pageId ) { |
394 | 400 | $dbr = wfGetDB( DB_SLAVE ); |
395 | 401 | $res = $dbr->select( 'flaggedrevs_tracking', |
— | — | @@ -404,13 +410,13 @@ |
405 | 411 | } |
406 | 412 | return $arr; |
407 | 413 | } |
408 | | - |
| 414 | + |
409 | 415 | protected static function makeWhereFrom2d( &$arr ) { |
410 | 416 | $lb = new LinkBatch(); |
411 | 417 | $lb->setArray( $arr ); |
412 | 418 | return $lb->constructSet( 'ftr', wfGetDB( DB_SLAVE ) ); |
413 | 419 | } |
414 | | - |
| 420 | + |
415 | 421 | protected static function getLinkInsertions( $existing, $new, $pageId ) { |
416 | 422 | $arr = array(); |
417 | 423 | foreach ( $new as $ns => $dbkeys ) { |
— | — | @@ -426,7 +432,7 @@ |
427 | 433 | } |
428 | 434 | return $arr; |
429 | 435 | } |
430 | | - |
| 436 | + |
431 | 437 | protected static function getLinkDeletions( $existing, $new ) { |
432 | 438 | $del = array(); |
433 | 439 | foreach ( $existing as $ns => $dbkeys ) { |
— | — | @@ -438,7 +444,7 @@ |
439 | 445 | } |
440 | 446 | return $del; |
441 | 447 | } |
442 | | - |
| 448 | + |
443 | 449 | /* |
444 | 450 | * Update pages where only the stable version links to a page |
445 | 451 | * that was just changed in some way. |
— | — | @@ -448,7 +454,7 @@ |
449 | 455 | $update->doUpdate(); |
450 | 456 | return true; |
451 | 457 | } |
452 | | - |
| 458 | + |
453 | 459 | /** |
454 | 460 | * Add special fields to parser. |
455 | 461 | */ |
— | — | @@ -706,7 +712,7 @@ |
707 | 713 | } |
708 | 714 | return true; |
709 | 715 | } |
710 | | - |
| 716 | + |
711 | 717 | /** |
712 | 718 | * Insert image timestamps/SHA-1 keys into parser output |
713 | 719 | */ |
— | — | @@ -820,7 +826,7 @@ |
821 | 827 | } |
822 | 828 | return true; |
823 | 829 | } |
824 | | - |
| 830 | + |
825 | 831 | /** |
826 | 832 | * Allow users to view reviewed pages |
827 | 833 | */ |
— | — | @@ -857,7 +863,7 @@ |
858 | 864 | } |
859 | 865 | return true; |
860 | 866 | } |
861 | | - |
| 867 | + |
862 | 868 | /** |
863 | 869 | * When an edit is made by a reviewer, if the base revision the |
864 | 870 | * edit was made from is the stable version, or the edit is a reversion |
— | — | @@ -1013,7 +1019,7 @@ |
1014 | 1020 | # Confirm the text because we can't trust this user. |
1015 | 1021 | return ( $rev->getText() == $srev->getRevText() ); |
1016 | 1022 | } |
1017 | | - |
| 1023 | + |
1018 | 1024 | /** |
1019 | 1025 | * When an user makes a null-edit we sometimes want to review it... |
1020 | 1026 | * (a) Null undo or rollback |
— | — | @@ -1128,7 +1134,7 @@ |
1129 | 1135 | } |
1130 | 1136 | return true; |
1131 | 1137 | } |
1132 | | - |
| 1138 | + |
1133 | 1139 | public static function incrementRollbacks( $this, $user, $target, $current ) { |
1134 | 1140 | # Mark when a user reverts another user, but not self-reverts |
1135 | 1141 | if ( $current->getRawUser() && $user->getId() != $current->getRawUser() ) { |
— | — | @@ -1139,7 +1145,7 @@ |
1140 | 1146 | } |
1141 | 1147 | return true; |
1142 | 1148 | } |
1143 | | - |
| 1149 | + |
1144 | 1150 | public static function incrementReverts( $article, $rev, $baseRevId = false, $user = null ) { |
1145 | 1151 | global $wgRequest; |
1146 | 1152 | # Was this an edit by an auto-sighter that undid another edit? |
— | — | @@ -1156,7 +1162,7 @@ |
1157 | 1163 | } |
1158 | 1164 | return true; |
1159 | 1165 | } |
1160 | | - |
| 1166 | + |
1161 | 1167 | protected static function editSpacingCheck( $spacing, $points, $user ) { |
1162 | 1168 | # Convert days to seconds... |
1163 | 1169 | $spacing = $spacing * 24 * 3600; |
— | — | @@ -1183,7 +1189,7 @@ |
1184 | 1190 | } |
1185 | 1191 | return ( $benchmarks >= $needed ); |
1186 | 1192 | } |
1187 | | - |
| 1193 | + |
1188 | 1194 | /** |
1189 | 1195 | * Checks if $user was previously blocked |
1190 | 1196 | */ |
— | — | @@ -1199,7 +1205,7 @@ |
1200 | 1206 | array( 'USE INDEX' => 'page_time' ) |
1201 | 1207 | ); |
1202 | 1208 | } |
1203 | | - |
| 1209 | + |
1204 | 1210 | /** |
1205 | 1211 | * Check for 'autoreview' permission. This lets people who opt-out as |
1206 | 1212 | * Editors still have their own edits automatically reviewed. Bot |
— | — | @@ -1535,7 +1541,7 @@ |
1536 | 1542 | |
1537 | 1543 | return true; |
1538 | 1544 | } |
1539 | | - |
| 1545 | + |
1540 | 1546 | /** |
1541 | 1547 | * Record demotion so that auto-promote will be disabled |
1542 | 1548 | */ |
— | — | @@ -1555,7 +1561,7 @@ |
1556 | 1562 | } |
1557 | 1563 | return true; |
1558 | 1564 | } |
1559 | | - |
| 1565 | + |
1560 | 1566 | /** Add user preferences */ |
1561 | 1567 | public static function onGetPreferences( $user, &$preferences ) { |
1562 | 1568 | // Box or bar UI |
— | — | @@ -1602,17 +1608,18 @@ |
1603 | 1609 | } |
1604 | 1610 | return true; |
1605 | 1611 | } |
1606 | | - |
| 1612 | + |
1607 | 1613 | public static function logLineLinks( |
1608 | | - $type, $action, $title = null, $params, &$comment, &$rv, $ts |
| 1614 | + $type, $action, $title, $params, &$comment, &$rv, $ts |
1609 | 1615 | ) { |
1610 | 1616 | if ( !$title ) { |
1611 | | - return true; // nothing to do |
| 1617 | + return true; // sanity check |
| 1618 | + } |
1612 | 1619 | // Stability log |
1613 | | - } else if ( $type == 'stable' ) { |
| 1620 | + if ( $type == 'stable' && FlaggedRevsLogs::isStabilityAction( $action ) ) { |
1614 | 1621 | $rv .= FlaggedRevsLogs::stabilityLogLinks( $title, $ts, $params ); |
1615 | 1622 | // Review log |
1616 | | - } else if ( $type == 'review' && FlaggedRevsLogs::isReviewAction( $action ) ) { |
| 1623 | + } elseif ( $type == 'review' && FlaggedRevsLogs::isReviewAction( $action ) ) { |
1617 | 1624 | $rv .= FlaggedRevsLogs::reviewLogLinks( $action, $title, $params ); |
1618 | 1625 | } |
1619 | 1626 | return true; |
— | — | @@ -1651,7 +1658,7 @@ |
1652 | 1659 | $view->setPageContent( $outputDone, $pcache ); |
1653 | 1660 | return true; |
1654 | 1661 | } |
1655 | | - |
| 1662 | + |
1656 | 1663 | public static function overrideRedirect( |
1657 | 1664 | &$title, $request, &$ignoreRedirect, &$target, &$article |
1658 | 1665 | ) { |
— | — | @@ -1690,31 +1697,31 @@ |
1691 | 1698 | } |
1692 | 1699 | return true; |
1693 | 1700 | } |
1694 | | - |
| 1701 | + |
1695 | 1702 | public static function addToEditView( &$editPage ) { |
1696 | 1703 | $view = FlaggedArticleView::singleton(); |
1697 | 1704 | $view->addToEditView( $editPage ); |
1698 | 1705 | return true; |
1699 | 1706 | } |
1700 | | - |
| 1707 | + |
1701 | 1708 | public static function onNoSuchSection( &$editPage, &$s ) { |
1702 | 1709 | $view = FlaggedArticleView::singleton(); |
1703 | 1710 | $view->addToNoSuchSection( $editPage, $s ); |
1704 | 1711 | return true; |
1705 | 1712 | } |
1706 | | - |
| 1713 | + |
1707 | 1714 | public static function addToHistView( &$article ) { |
1708 | 1715 | $view = FlaggedArticleView::singleton(); |
1709 | 1716 | $view->addToHistView(); |
1710 | 1717 | return true; |
1711 | 1718 | } |
1712 | | - |
| 1719 | + |
1713 | 1720 | public static function onCategoryPageView( &$category ) { |
1714 | 1721 | $view = FlaggedArticleView::singleton(); |
1715 | 1722 | $view->addToCategoryView(); |
1716 | 1723 | return true; |
1717 | 1724 | } |
1718 | | - |
| 1725 | + |
1719 | 1726 | public static function onSkinAfterContent( &$data ) { |
1720 | 1727 | global $wgOut; |
1721 | 1728 | if ( $wgOut->isArticleRelated() |
— | — | @@ -1727,7 +1734,7 @@ |
1728 | 1735 | } |
1729 | 1736 | return true; |
1730 | 1737 | } |
1731 | | - |
| 1738 | + |
1732 | 1739 | public static function addToHistQuery( $pager, &$queryInfo ) { |
1733 | 1740 | $flaggedArticle = FlaggedArticle::getArticleInstance( $pager->getArticle() ); |
1734 | 1741 | # Non-content pages cannot be validated. Stable version must exist. |
— | — | @@ -1748,7 +1755,7 @@ |
1749 | 1756 | } |
1750 | 1757 | return true; |
1751 | 1758 | } |
1752 | | - |
| 1759 | + |
1753 | 1760 | public static function addToFileHistQuery( |
1754 | 1761 | $file, &$tables, &$fields, &$conds, &$opts, &$join_conds |
1755 | 1762 | ) { |
— | — | @@ -1767,7 +1774,7 @@ |
1768 | 1775 | } |
1769 | 1776 | return true; |
1770 | 1777 | } |
1771 | | - |
| 1778 | + |
1772 | 1779 | public static function addToContribsQuery( $pager, &$queryInfo ) { |
1773 | 1780 | # Highlight flaggedrevs |
1774 | 1781 | $queryInfo['tables'][] = 'flaggedrevs'; |
— | — | @@ -1780,13 +1787,13 @@ |
1781 | 1788 | $queryInfo['join_conds']['flaggedpages'] = array( 'LEFT JOIN', "fp_page_id = rev_page" ); |
1782 | 1789 | return true; |
1783 | 1790 | } |
1784 | | - |
| 1791 | + |
1785 | 1792 | public static function addToRCQuery( &$conds, &$tables, &$join_conds, $opts ) { |
1786 | 1793 | $tables[] = 'flaggedpages'; |
1787 | 1794 | $join_conds['flaggedpages'] = array( 'LEFT JOIN', 'fp_page_id = rc_cur_id' ); |
1788 | 1795 | return true; |
1789 | 1796 | } |
1790 | | - |
| 1797 | + |
1791 | 1798 | public static function addToWatchlistQuery( &$conds, &$tables, &$join_conds, &$fields ) { |
1792 | 1799 | global $wgUser; |
1793 | 1800 | if ( $wgUser->isAllowed( 'review' ) ) { |
— | — | @@ -1796,7 +1803,7 @@ |
1797 | 1804 | } |
1798 | 1805 | return true; |
1799 | 1806 | } |
1800 | | - |
| 1807 | + |
1801 | 1808 | public static function addToHistLine( $history, $row, &$s, &$liClasses ) { |
1802 | 1809 | $fa = FlaggedArticle::getArticleInstance( $history->getArticle() ); |
1803 | 1810 | if ( !$fa->isReviewable() ) { |
— | — | @@ -1838,8 +1845,7 @@ |
1839 | 1846 | if ( $link ) $s .= " <small>$link</small>"; |
1840 | 1847 | return true; |
1841 | 1848 | } |
1842 | | - |
1843 | | - |
| 1849 | + |
1844 | 1850 | /** |
1845 | 1851 | * Make stable version link and return the css |
1846 | 1852 | * @param Title $title |
— | — | @@ -1873,7 +1879,7 @@ |
1874 | 1880 | $link = "<span class='$css plainlinks'>[$link]</span>"; |
1875 | 1881 | return array( $link, $liCss ); |
1876 | 1882 | } |
1877 | | - |
| 1883 | + |
1878 | 1884 | public static function addToFileHistLine( $hist, $file, &$s, &$rowClass ) { |
1879 | 1885 | if ( !$file->isVisible() ) { |
1880 | 1886 | return true; // Don't bother showing notice for deleted revs |
— | — | @@ -1896,7 +1902,7 @@ |
1897 | 1903 | } |
1898 | 1904 | return true; |
1899 | 1905 | } |
1900 | | - |
| 1906 | + |
1901 | 1907 | public static function addToContribsLine( $contribs, &$ret, $row ) { |
1902 | 1908 | $namespaces = FlaggedRevs::getReviewNamespaces(); |
1903 | 1909 | if ( !in_array( $row->page_namespace, $namespaces ) ) { |
— | — | @@ -1911,7 +1917,7 @@ |
1912 | 1918 | } |
1913 | 1919 | return true; |
1914 | 1920 | } |
1915 | | - |
| 1921 | + |
1916 | 1922 | public static function addToChangeListLine( |
1917 | 1923 | &$list, &$articlelink, &$s, &$rc, $unpatrolled, $watched |
1918 | 1924 | ) { |
— | — | @@ -1944,13 +1950,13 @@ |
1945 | 1951 | } |
1946 | 1952 | return true; |
1947 | 1953 | } |
1948 | | - |
| 1954 | + |
1949 | 1955 | public static function injectPostEditURLParams( $article, &$sectionAnchor, &$extraQuery ) { |
1950 | 1956 | $view = FlaggedArticleView::singleton(); |
1951 | 1957 | $view->injectPostEditURLParams( $sectionAnchor, $extraQuery ); |
1952 | 1958 | return true; |
1953 | 1959 | } |
1954 | | - |
| 1960 | + |
1955 | 1961 | // diff=review param (bug 16923) |
1956 | 1962 | public static function checkDiffUrl( $titleObj, &$mOldid, &$mNewid, $old, $new ) { |
1957 | 1963 | if ( $new === 'review' && isset( $titleObj ) ) { |
— | — | @@ -1976,7 +1982,7 @@ |
1977 | 1983 | $view->addRevisionIDField( $editPage, $out ); |
1978 | 1984 | return true; |
1979 | 1985 | } |
1980 | | - |
| 1986 | + |
1981 | 1987 | public static function addReviewCheck( $editPage, &$checkboxes, &$tabindex ) { |
1982 | 1988 | global $wgUser, $wgRequest; |
1983 | 1989 | if ( !$wgUser->isAllowed( 'review' ) ) { |
— | — | @@ -2001,7 +2007,7 @@ |
2002 | 2008 | } |
2003 | 2009 | return true; |
2004 | 2010 | } |
2005 | | - |
| 2011 | + |
2006 | 2012 | public static function addBacklogNotice( &$notice ) { |
2007 | 2013 | global $wgUser, $wgTitle; |
2008 | 2014 | $namespaces = FlaggedRevs::getReviewNamespaces(); |
— | — | @@ -2054,7 +2060,7 @@ |
2055 | 2061 | } |
2056 | 2062 | return true; |
2057 | 2063 | } |
2058 | | - |
| 2064 | + |
2059 | 2065 | public static function stableDumpQuery( &$tables, &$opts, &$join ) { |
2060 | 2066 | $namespaces = FlaggedRevs::getReviewNamespaces(); |
2061 | 2067 | $tables = array( 'flaggedpages', 'page', 'revision' ); |
— | — | @@ -2066,12 +2072,12 @@ |
2067 | 2073 | $join['revision'] = array( 'INNER JOIN', 'rev_page = fp_page_id AND rev_id = fp_stable' ); |
2068 | 2074 | return false; // final |
2069 | 2075 | } |
2070 | | - |
| 2076 | + |
2071 | 2077 | // Add selector of review "protection" options |
2072 | 2078 | // Code stolen from Stabilization (which was stolen from ProtectionForm) |
2073 | 2079 | public static function onProtectionForm( $article, &$output ) { |
2074 | 2080 | global $wgUser, $wgRequest, $wgLang; |
2075 | | - if ( !FlaggedRevs::useProtectionLevels() || !$article->exists() ) { |
| 2081 | + if ( !$article->exists() ) { |
2076 | 2082 | return true; // nothing to do |
2077 | 2083 | } elseif ( !FlaggedRevs::inReviewNamespace( $article->getTitle() ) ) { |
2078 | 2084 | return true; // not a reviewable page |
— | — | @@ -2086,7 +2092,7 @@ |
2087 | 2093 | $oldExpirySelect = ( $config['expiry'] == 'infinity' ) ? 'infinite' : 'existing'; |
2088 | 2094 | |
2089 | 2095 | # Load requested restriction level, default to current level... |
2090 | | - $restriction = $wgRequest->getVal( 'mwStabilityConfig', |
| 2096 | + $restriction = $wgRequest->getVal( 'mwStabilityLevel', |
2091 | 2097 | FlaggedRevs::getProtectionLevel( $config ) ); |
2092 | 2098 | # Load the requested expiry time (dropdown) |
2093 | 2099 | $expirySelect = $wgRequest->getVal( 'mwStabilizeExpirySelection', $oldExpirySelect ); |
— | — | @@ -2105,8 +2111,8 @@ |
2106 | 2112 | array_unshift( $effectiveLevels, "none" ); |
2107 | 2113 | # Show all restriction levels in a <select>... |
2108 | 2114 | $attribs = array( |
2109 | | - 'id' => 'mwStabilityConfig', |
2110 | | - 'name' => 'mwStabilityConfig', |
| 2115 | + 'id' => 'mwStabilityLevel', |
| 2116 | + 'name' => 'mwStabilityLevel', |
2111 | 2117 | 'size' => count( $effectiveLevels ), |
2112 | 2118 | ) + $disabledAttrib; |
2113 | 2119 | $output .= Xml::openElement( 'select', $attribs ); |
— | — | @@ -2190,15 +2196,15 @@ |
2191 | 2197 | # Close field set and table row |
2192 | 2198 | $output .= Xml::closeElement( 'fieldset' ); |
2193 | 2199 | $output .= "</td></tr>"; |
2194 | | - |
2195 | | - # Add some script for expiry dropdowns |
2196 | | - Stabilization::addProtectionJS(); |
| 2200 | + |
| 2201 | + # Add some javascript for expiry dropdowns |
| 2202 | + PageStabilityProtectForm::addProtectionJS(); |
2197 | 2203 | return true; |
2198 | 2204 | } |
2199 | 2205 | |
2200 | 2206 | // Add stability log extract to protection form |
2201 | 2207 | public static function insertStabilityLog( $article, $out ) { |
2202 | | - if ( !FlaggedRevs::useProtectionLevels() || !$article->exists() ) { |
| 2208 | + if ( !$article->exists() ) { |
2203 | 2209 | return true; // nothing to do |
2204 | 2210 | } else if ( !FlaggedRevs::inReviewNamespace( $article->getTitle() ) ) { |
2205 | 2211 | return true; // not a reviewable page |
— | — | @@ -2212,36 +2218,27 @@ |
2213 | 2219 | // Update stability config from request |
2214 | 2220 | public static function onProtectionSave( $article, &$errorMsg ) { |
2215 | 2221 | global $wgUser, $wgRequest; |
2216 | | - if ( !FlaggedRevs::useProtectionLevels() || !$article->exists() ) { |
| 2222 | + if ( !$article->exists() ) { |
2217 | 2223 | return true; // simple custom levels set for action=protect |
2218 | | - } |
2219 | | - if ( !FlaggedRevs::inReviewNamespace( $article->getTitle() ) ) { |
| 2224 | + } elseif ( !FlaggedRevs::inReviewNamespace( $article->getTitle() ) ) { |
2220 | 2225 | return true; // not a reviewable page |
2221 | | - } |
2222 | | - if ( wfReadOnly() || !$wgUser->isAllowed( 'stablesettings' ) ) { |
| 2226 | + } elseif ( wfReadOnly() || !$wgUser->isAllowed( 'stablesettings' ) ) { |
2223 | 2227 | return true; // user cannot change anything |
2224 | 2228 | } |
2225 | | - $form = new Stabilization(); |
2226 | | - $form->target = $article->getTitle(); # Our target page |
2227 | | - $form->watchThis = null; # protection form already has a watch check |
2228 | | - $form->reason = $wgRequest->getText( 'mwProtect-reason' ); # Reason |
2229 | | - $form->reasonSelection = $wgRequest->getVal( 'wpProtectReasonSelection' ); # Reason dropdown |
2230 | | - $form->expiry = $wgRequest->getVal( 'mwStabilizeExpiryOther' ); # Expiry |
2231 | | - $form->expirySelection = $wgRequest->getVal( 'mwStabilizeExpirySelection' ); # Expiry dropdown |
2232 | | - # Fill in config from the protection level... |
2233 | | - $permission = $wgRequest->getVal( 'mwStabilityConfig' ); |
| 2229 | + $form = new PageStabilityProtectForm(); |
| 2230 | + $form->setPage( $article->getTitle() ); // target page |
| 2231 | + $permission = $wgRequest->getVal( 'mwStabilityLevel' ); |
2234 | 2232 | if ( $permission == "none" ) { |
2235 | | - $form->autoreview = ''; // default |
2236 | | - } else if ( in_array( $permission, FlaggedRevs::getRestrictionLevels() ) ) { |
2237 | | - $form->autoreview = $permission; // autoreview restriction |
2238 | | - } else { |
2239 | | - return false; // bad level, don't save! |
| 2233 | + $permission = ''; // 'none' => '' |
2240 | 2234 | } |
2241 | | - $form->reviewThis = null; // autoreview if not currently protected state |
2242 | | - $form->override = null; // implied by autoreview level |
2243 | | - $form->select = null; // site default |
2244 | | - $form->wasPosted = $wgRequest->wasPosted(); |
2245 | | - if ( $form->handleParams() ) { |
| 2235 | + $form->setAutoreview( $permission ); // protection level (autoreview restriction) |
| 2236 | + $form->setWatchThis( null ); // protection form already has a watch check |
| 2237 | + $form->setReason( $wgRequest->getText( 'mwProtect-reason' ) ); // manual |
| 2238 | + $form->setReasonSelection( $wgRequest->getVal( 'wpProtectReasonSelection' ) ); // dropdown |
| 2239 | + $form->setExpiry( $wgRequest->getVal( 'mwStabilizeExpiryOther' ) ); // manual |
| 2240 | + $form->setExpirySelection( $wgRequest->getVal( 'mwStabilizeExpirySelection' ) ); // dropdown |
| 2241 | + $form->ready(); // params all set |
| 2242 | + if ( $wgRequest->wasPosted() && $form->isAllowed() ) { |
2246 | 2243 | $status = $form->submit(); |
2247 | 2244 | if ( $status !== true ) { |
2248 | 2245 | $errorMsg = wfMsg( $status ); // some error message |
— | — | @@ -2261,7 +2258,7 @@ |
2262 | 2259 | $tables[] = 'flaggedrevs_tracking'; |
2263 | 2260 | return true; |
2264 | 2261 | } |
2265 | | - |
| 2262 | + |
2266 | 2263 | public static function addSchemaUpdates() { |
2267 | 2264 | global $wgDBtype, $wgExtNewFields, $wgExtPGNewFields, $wgExtNewIndexes, $wgExtNewTables; |
2268 | 2265 | $base = dirname( __FILE__ ); |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/FlaggedRevsLogs.php |
— | — | @@ -3,13 +3,21 @@ |
4 | 4 | class FlaggedRevsLogs { |
5 | 5 | /** |
6 | 6 | * $action is a valid review log action |
7 | | - * @returns bool $action is a valid review log action |
| 7 | + * @returns bool |
8 | 8 | */ |
9 | 9 | public static function isReviewAction( $action ) { |
10 | 10 | return preg_match( '/^(approve2?(-i|-a|-ia)?|unapprove2?)$/', $action ); |
11 | 11 | } |
12 | 12 | |
13 | 13 | /** |
| 14 | + * $action is a valid stability log action |
| 15 | + * @returns bool |
| 16 | + */ |
| 17 | + public static function isStabilityAction( $action ) { |
| 18 | + return preg_match( '/^(config|modify|reset)$/', $action ); |
| 19 | + } |
| 20 | + |
| 21 | + /** |
14 | 22 | * $action is a valid review log deprecate action |
15 | 23 | * @returns bool |
16 | 24 | */ |
— | — | @@ -17,9 +25,33 @@ |
18 | 26 | return ( $action == 'unapprove' || $action == 'unapprove2' ); |
19 | 27 | } |
20 | 28 | |
| 29 | + /** |
| 30 | + * Add setting change description to log line |
| 31 | + * @returns string |
| 32 | + */ |
| 33 | + public static function stabilityLogText( |
| 34 | + $type, $action, $title = null, $skin = null, $params = array() |
| 35 | + ) { |
| 36 | + if ( !$title ) { |
| 37 | + return ''; // sanity check |
| 38 | + } |
| 39 | + $text = ''; |
| 40 | + if ( $skin ) { |
| 41 | + $titleLink = $skin->link( $title, $title->getPrefixedText() ); |
| 42 | + $text = wfMsgHtml( "stable-logentry-{$action}", $titleLink ); |
| 43 | + } else { // for content (e.g. IRC...) |
| 44 | + $text = wfMsgExt( "stable-logentry-{$action}", |
| 45 | + array( 'parsemag', 'escape', 'replaceafter', 'content' ), |
| 46 | + $title->getPrefixedText() ); |
| 47 | + } |
| 48 | + $pars = self::expandParams( $params ); // list -> assoc array |
| 49 | + $details = self::stabilitySettings( $pars, !$skin ); // list of setting values |
| 50 | + $text .= " $details"; |
| 51 | + return $text; |
| 52 | + } |
| 53 | + |
21 | 54 | /** |
22 | | - * (a) Add setting change description |
23 | | - * (b) Add history page link |
| 55 | + * Add history page link to log line |
24 | 56 | * |
25 | 57 | * @param Title $title |
26 | 58 | * @param string $timestamp |
— | — | @@ -28,8 +60,6 @@ |
29 | 61 | */ |
30 | 62 | public static function stabilityLogLinks( $title, $timestamp, $params ) { |
31 | 63 | global $wgUser; |
32 | | - $pars = self::expandParams( $params ); // list -> assoc array |
33 | | - $settings = self::stabilitySettings( $pars, false ); // list of setting values |
34 | 64 | # Add history link showing edits right before the config change |
35 | 65 | $hist = $wgUser->getSkin()->link( |
36 | 66 | $title, |
— | — | @@ -38,7 +68,7 @@ |
39 | 69 | array( 'action' => 'history', 'offset' => $timestamp ) |
40 | 70 | ); |
41 | 71 | $hist = wfMsgHtml( 'parentheses', $hist ); |
42 | | - return "$settings $hist"; |
| 72 | + return $hist; |
43 | 73 | } |
44 | 74 | |
45 | 75 | /** |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/api/ApiReview.php |
— | — | @@ -35,51 +35,36 @@ |
36 | 36 | public function execute() { |
37 | 37 | global $wgUser; |
38 | 38 | $params = $this->extractRequestParams(); |
39 | | - |
40 | | - // Check permissions |
41 | | - if ( !$wgUser->isAllowed( 'review' ) ) |
| 39 | + // Check basic permissions |
| 40 | + if ( !$wgUser->isAllowed( 'review' ) ) { |
| 41 | + // FIXME: better msg? |
42 | 42 | $this->dieUsageMsg( array( 'badaccess-group0' ) ); |
43 | | - if ( $wgUser->isBlocked() ) |
| 43 | + } elseif ( $wgUser->isBlocked( false ) ) { |
44 | 44 | $this->dieUsageMsg( array( 'blockedtext' ) ); |
45 | | - |
| 45 | + } |
46 | 46 | // Construct submit form |
47 | | - $form = new RevisionReview(); |
48 | | - $revid = intval( $params['revid'] ); |
| 47 | + $form = new RevisionReviewForm(); |
| 48 | + $revid = (int)$params['revid']; |
49 | 49 | $rev = Revision::newFromId( $revid ); |
50 | | - if ( !$rev ) |
| 50 | + if ( !$rev ) { |
51 | 51 | $this->dieUsage( "Cannot find a revision with the specified ID.", 'notarget' ); |
52 | | - $form->oldid = $revid; |
| 52 | + } |
53 | 53 | $title = $rev->getTitle(); |
54 | | - $form->page = $title; |
55 | | - if ( !FlaggedRevs::inReviewNamespace( $title ) ) |
56 | | - $this->dieUsage( "Provided revision or page can not be reviewed.", 'notreviewable' ); |
57 | | - |
58 | | - if ( isset( $params['unapprove'] ) ) |
59 | | - $form->approve = !$params['unapprove']; |
| 54 | + $form->setPage( $title ); |
| 55 | + $form->setOldId( $revid ); |
| 56 | + if ( FlaggedRevs::dimensionsEmpty() ) { |
| 57 | + $form->setApprove( empty( $params['unapprove'] ) ); |
| 58 | + $form->setUnapprove( !empty( $params['unapprove'] ) ); |
| 59 | + } |
60 | 60 | if ( isset( $params['comment'] ) ) |
61 | | - $form->comment = $params['comment']; |
| 61 | + $form->setComment( $params['comment'] ); |
62 | 62 | if ( isset( $params['notes'] ) ) |
63 | | - $form->notes = $wgUser->isAllowed( 'validate' ) ? $params['notes'] : ''; |
64 | | - |
| 63 | + $form->setNotes( $params['notes'] ); |
65 | 64 | // The flagging parameters have the form 'flag_$name'. |
66 | 65 | // Extract them and put the values into $form->dims |
67 | | - $flags = FlaggedRevs::getDimensions(); |
68 | | - foreach ( $flags as $name => $levels ) { |
69 | | - if ( !( $form->dims[$name] = intval( $params['flag_' . $name] ) ) ) |
70 | | - $form->unapprovedTags++; |
| 66 | + foreach ( FlaggedRevs::getDimensions() as $tag => $levels ) { |
| 67 | + $form->setDim( $tag, intval( $params['flag_' . $tag] ) ); |
71 | 68 | } |
72 | | - |
73 | | - // Check if this is a valid approval/unapproval of the revision |
74 | | - if ( $form->unapprovedTags && $form->unapprovedTags < count( $flags ) ) |
75 | | - $this->dieUsage( "Either all or none of the flags have to be set to zero.", 'mixedapproval' ); |
76 | | - |
77 | | - // Check if user is even allowed to set the flags |
78 | | - $form->oflags = FlaggedRevs::getRevisionTags( $title, $form->oldid ); |
79 | | - $fa = FlaggedArticle::getTitleInstance( $form->page ); |
80 | | - $form->config = $fa->getVisibilitySettings(); |
81 | | - if ( !$title->quickUserCan( 'edit' ) || !RevisionReview::userCanSetFlags( $form->dims, $form->oflags, $form->config ) ) |
82 | | - $this->dieUsage( "You don't have the necessary rights to set the specified flags.", 'permissiondenied' ); |
83 | | - |
84 | 69 | if ( $form->isApproval() ) { |
85 | 70 | // Now get the template and image parameters needed |
86 | 71 | // If it is the current revision, try the parser cache first |
— | — | @@ -96,20 +81,51 @@ |
97 | 82 | $parserOutput = $wgParser->parse( $text, $title, $options ); |
98 | 83 | } |
99 | 84 | // Set version parameters for review submission |
100 | | - list( $form->templateParams, $form->imageParams, $form->fileVersion ) = |
101 | | - FlaggedRevs::getIncludeParams( $article, $parserOutput->mTemplateIds, $parserOutput->fr_ImageSHA1Keys ); |
| 85 | + list( $templateParams, $imageParams, $fileVersion ) = |
| 86 | + FlaggedRevs::getIncludeParams( $article, |
| 87 | + $parserOutput->mTemplateIds, $parserOutput->fr_ImageSHA1Keys ); |
| 88 | + $form->setTemplateParams( $templateParams ); |
| 89 | + $form->setFileParams( $imageParams ); |
| 90 | + $form->setFileVersion( $fileVersion ); |
102 | 91 | } |
103 | | - |
104 | | - // Do the actual review |
105 | | - list( $approved, $status ) = $form->submit(); |
| 92 | + |
| 93 | + $status = $form->ready(); // all params set |
| 94 | + if ( $status === 'review_page_unreviewable' ) { |
| 95 | + $this->dieUsage( "Provided revision or page can not be reviewed.", |
| 96 | + 'notreviewable' ); |
| 97 | + // Check basic page permissions |
| 98 | + } elseif ( !$title->quickUserCan( 'review' ) || !$title->quickUserCan( 'edit' ) ) { |
| 99 | + $this->dieUsage( "You don't have the necessary rights to set the specified flags.", |
| 100 | + 'permissiondenied' ); |
| 101 | + } |
| 102 | + |
| 103 | + # Try to do the actual review |
| 104 | + $status = $form->submit(); |
| 105 | + # Approve/de-approve success |
106 | 106 | if ( $status === true ) { |
107 | | - $this->getResult()->addValue( null, $this->getModuleName(), array( 'result' => 'Success' ) ); |
108 | | - } elseif ( $approved && is_array( $status ) ) { |
109 | | - $this->dieUsage( "A sync failure has occured while reviewing. Please try again.", 'syncfailure' ); |
110 | | - } elseif ( $approved ) { |
111 | | - $this->dieUsage( "Cannot find a revision with the specified ID.", 'notarget' ); |
| 107 | + $this->getResult()->addValue( |
| 108 | + null, $this->getModuleName(), array( 'result' => 'Success' ) ); |
| 109 | + # De-approve failure |
| 110 | + } elseif ( !$form->isApproval() ) { |
| 111 | + $this->dieUsage( "Cannot find a flagged revision with the specified ID.", 'notarget' ); |
| 112 | + # Approval failures |
112 | 113 | } else { |
113 | | - $this->dieUsageMsg( array( 'unknownerror' ) ); |
| 114 | + if ( is_array( $status ) ) { |
| 115 | + $this->dieUsage( "A sync failure has occured while reviewing. Please try again.", |
| 116 | + 'syncfailure' ); |
| 117 | + } elseif ( $status === 'review_too_low' ) { |
| 118 | + $this->dieUsage( "Either all or none of the flags have to be set to zero.", |
| 119 | + 'mixedapproval' ); |
| 120 | + } elseif ( $status === 'review_denied' ) { |
| 121 | + $this->dieUsage( "You don't have the necessary rights to set the specified flags.", |
| 122 | + 'permissiondenied' ); |
| 123 | + } elseif ( $status === 'review_bad_key' ) { |
| 124 | + $this->dieUsage( "You don't have the necessary rights to set the specified flags.", |
| 125 | + 'permissiondenied' ); |
| 126 | + } else { |
| 127 | + // FIXME: review_param_missing? better msg? |
| 128 | + $this->dieUsage( array( 'unknownerror' ) ); |
| 129 | + } |
114 | 130 | } |
115 | 131 | } |
116 | 132 | |
— | — | @@ -123,8 +139,8 @@ |
124 | 140 | |
125 | 141 | public function getAllowedParams() { |
126 | 142 | $pars = array( |
127 | | - 'revid' => null, |
128 | | - 'token' => null, |
| 143 | + 'revid' => null, |
| 144 | + 'token' => null, |
129 | 145 | 'comment' => null, |
130 | 146 | ); |
131 | 147 | if ( FlaggedRevs::allowComments() ) |
— | — | @@ -144,16 +160,19 @@ |
145 | 161 | |
146 | 162 | public function getParamDescription() { |
147 | 163 | $desc = array( |
148 | | - 'revid' => 'The revision ID for which to set the flags', |
149 | | - 'token' => 'An edit token retrieved through prop=info', |
150 | | - 'comment' => 'Comment for the review (optional)', |
151 | | - // Only if FlaggedRevs::allowComments() is true: |
152 | | - 'notes' => "Additional notes for the review. The ``validate'' right is needed to set this parameter.", |
153 | | - // Will only show if FlaggedRevs::dimensionsEmpty() is true: |
154 | | - 'unapprove' => "If set, revision will be unapproved" |
| 164 | + 'revid' => 'The revision ID for which to set the flags', |
| 165 | + 'token' => 'An edit token retrieved through prop=info', |
| 166 | + 'comment' => 'Comment for the review (optional)' |
155 | 167 | ); |
156 | | - foreach ( FlaggedRevs::getDimensions() as $flagname => $levels ) |
157 | | - $desc['flag_' . $flagname] = "Set the flag ''{$flagname}'' to the specified value"; |
| 168 | + if ( FlaggedRevs::allowComments() ) |
| 169 | + $desc['notes'] = "Additional notes for the review. The ''validate'' right is needed to set this parameter."; |
| 170 | + if ( FlaggedRevs::dimensionsEmpty() ) { |
| 171 | + $desc['unapprove'] = "If set, revision will be unapproved rather than approved."; |
| 172 | + } else { |
| 173 | + foreach ( FlaggedRevs::getDimensions() as $flagname => $levels ) { |
| 174 | + $desc['flag_' . $flagname] = "Set the flag ''{$flagname}'' to the specified value"; |
| 175 | + } |
| 176 | + } |
158 | 177 | return $desc; |
159 | 178 | } |
160 | 179 | |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/api/ApiStabilize.php |
— | — | @@ -31,86 +31,68 @@ |
32 | 32 | global $wgUser, $wgContLang; |
33 | 33 | $params = $this->extractRequestParams(); |
34 | 34 | |
35 | | - if ( !isset( $params['title'] ) ) |
| 35 | + if ( !isset( $params['title'] ) ) { |
36 | 36 | $this->dieUsageMsg( array( 'missingparam', 'title' ) ); |
37 | | - if ( !isset( $params['token'] ) ) |
| 37 | + } elseif ( !isset( $params['token'] ) ) { |
38 | 38 | $this->dieUsageMsg( array( 'missingparam', 'token' ) ); |
| 39 | + } |
39 | 40 | |
40 | 41 | $title = Title::newFromText( $params['title'] ); |
41 | 42 | if ( $title == null ) { |
42 | 43 | $this->dieUsage( "Invalid title given.", "invalidtitle" ); |
43 | 44 | } |
44 | | - if ( !FlaggedRevs::inReviewNamespace( $title ) ) { |
45 | | - $this->dieUsage( "Title given does not correspond to a reviewable page.", "invalidtitle" ); |
46 | | - } |
47 | 45 | $errors = $title->getUserPermissionsErrors( 'stablesettings', $wgUser ); |
48 | 46 | if ( $errors ) { |
49 | 47 | // We don't care about multiple errors, just report one of them |
50 | 48 | $this->dieUsageMsg( reset( $errors ) ); |
51 | 49 | } |
52 | | - |
53 | | - $article = new Article( $title ); |
54 | | - if ( !$article->exists() ) { |
55 | | - $this->dieUsage( "Target page does not exist.", "invalidtitle" ); |
56 | | - } |
| 50 | + // TODO: factory function? |
| 51 | + $form = FlaggedRevs::useProtectionLevels() |
| 52 | + ? new PageStabilityProtectForm() |
| 53 | + : new PageStabilityGeneralForm(); |
57 | 54 | |
58 | | - $form = new Stabilization(); |
59 | | - $form->target = $title; # Our target page |
60 | | - $form->watchThis = $params['watch']; # Watch this page |
61 | | - $form->reviewThis = $params['review']; # Auto-review option |
62 | | - $form->reason = $params['reason']; # Reason |
63 | | - $form->reasonSelection = 'other'; # Reason dropdown |
64 | | - $form->expiry = $params['expiry']; # Expiry |
65 | | - $form->expirySelection = 'other'; # Expiry dropdown |
66 | | - |
67 | | - // Check if protection levels are enabled |
| 55 | + $form->setPage( $title ); # Our target page |
| 56 | + $form->setWatchThis( $params['watch'] ); # Watch this page |
| 57 | + $form->setReason( $params['reason'] ); # Reason |
| 58 | + $form->setReasonSelection( 'other' ); # Reason dropdown |
| 59 | + $form->setExpiry( $params['expiry'] ); # Expiry |
| 60 | + $form->setExpirySelection( 'other' ); # Expiry dropdown |
68 | 61 | if ( FlaggedRevs::useProtectionLevels() ) { |
69 | | - $levels = FlaggedRevs::getRestrictionLevels(); |
70 | | - # Fill in config from the protection level... |
71 | | - $selected = $params['protectlevel']; |
72 | | - if ( $selected == "none" ) { |
73 | | - $form->autoreview = ''; // default |
74 | | - } else if ( in_array( $selected, $levels ) ) { |
75 | | - $form->autoreview = $selected; // autoreview restriction |
76 | | - } else { |
77 | | - $this->dieUsage( "Invalid protection level given.", 'badprotectlevel' ); |
78 | | - } |
79 | | - $form->override = null; // implied by autoreview level |
80 | | - $form->select = null; // site default |
| 62 | + $restriction = $params['protectlevel']; |
81 | 63 | } else { |
| 64 | + $restriction = $params['autoreview']; |
82 | 65 | // Fill in config fields from URL params |
83 | | - $form->select = $this->precendenceFromKey( $params['precedence'] ); |
| 66 | + $form->setPrecedence( $this->precendenceFromKey( $params['precedence'] ) ); |
84 | 67 | if ( $params['default'] === null ) { |
| 68 | + // Default version setting not optional |
85 | 69 | $this->dieUsageMsg( array( 'missingparam', 'default' ) ); |
86 | 70 | } else { |
87 | | - $form->override = $this->defaultFromKey( $params['default'] ); |
| 71 | + $form->setOverride( $this->defaultFromKey( $params['default'] ) ); |
88 | 72 | } |
89 | | - if ( $params['autoreview'] == 'none' ) { |
90 | | - $form->autoreview = ''; // 'none' -> '' |
91 | | - } else { |
92 | | - $form->autoreview = $params['autoreview']; |
93 | | - } |
| 73 | + $form->setReviewThis( $params['review'] ); # Auto-review option |
94 | 74 | } |
95 | | - $form->wasPosted = true; // already validated |
96 | | - if ( $form->handleParams() ) { |
97 | | - $status = $form->submit(); // true/error message key |
98 | | - if ( $status !== true ) { |
99 | | - $this->dieUsage( wfMsg( $status ) ); |
100 | | - } |
101 | | - } else { |
102 | | - $this->dieUsage( "Invalid config parameters given. The precendence level may beyond your rights.", 'invalidconfig' ); |
| 75 | + if ( $restriction == 'none' ) { |
| 76 | + $restriction = ''; // 'none' => '' |
103 | 77 | } |
| 78 | + $form->setAutoreview( $restriction ); # Autoreview restriction |
| 79 | + $form->ready(); |
| 80 | + |
| 81 | + $status = $form->submit(); // true/error message key |
| 82 | + if ( $status !== true ) { |
| 83 | + $this->dieUsage( wfMsg( $status ) ); |
| 84 | + } |
| 85 | + |
104 | 86 | # Output success line with the title and config parameters |
105 | 87 | $res = array(); |
106 | 88 | $res['title'] = $title->getPrefixedText(); |
107 | | - if ( count( $levels ) ) { |
| 89 | + if ( FlaggedRevs::useProtectionLevels() ) { |
108 | 90 | $res['protectlevel'] = $params['protectlevel']; |
109 | 91 | } else { |
110 | 92 | $res['default'] = $params['default']; |
111 | 93 | $res['precedence'] = $params['precedence']; |
112 | 94 | $res['autoreview'] = $params['autoreview']; |
113 | 95 | } |
114 | | - $res['expiry'] = $form->expiry; |
| 96 | + $res['expiry'] = $form->getExpiry(); |
115 | 97 | $this->getResult()->addValue( null, $this->getModuleName(), $res ); |
116 | 98 | } |
117 | 99 | |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/FlaggedArticleView.php |
— | — | @@ -159,10 +159,10 @@ |
160 | 160 | $tag = wfMsgExt( $msg, array( 'parseinline' ), $frev->getRevId(), $time ); |
161 | 161 | # Hide clutter |
162 | 162 | if ( !FlaggedRevs::useSimpleUI() && !empty( $flags ) ) { |
163 | | - $tag .= " " . FlaggedRevsXML::ratingToggle() . |
164 | | - "<span id='mw-fr-revisionratings' style='display:block;'><br />" . |
| 163 | + $tag .= FlaggedRevsXML::ratingToggle() . |
| 164 | + "<div id='mw-fr-revisiondetails' style='display:block;'>" . |
165 | 165 | wfMsgHtml( 'revreview-oldrating' ) . |
166 | | - FlaggedRevsXML::addTagRatings( $flags ) . '</span>'; |
| 166 | + FlaggedRevsXML::addTagRatings( $flags ) . '</div>'; |
167 | 167 | } |
168 | 168 | $css = 'flaggedrevs_notice plainlinks noprint'; |
169 | 169 | $tag = "<div id='mw-fr-revisiontag-old' class='$css'>$tag</div>"; |
— | — | @@ -269,17 +269,26 @@ |
270 | 270 | } else { |
271 | 271 | $this->showDraftVersion( $srev, $tag, $prot ); |
272 | 272 | } |
| 273 | + $encJS = ''; // JS events to use |
273 | 274 | # Some checks for which tag CSS to use |
274 | | - if ( FlaggedRevs::useSimpleUI() ) $tagClass = 'flaggedrevs_short'; |
275 | | - elseif ( $simpleTag ) $tagClass = 'flaggedrevs_notice'; |
276 | | - elseif ( $pristine ) $tagClass = 'flaggedrevs_pristine'; |
277 | | - elseif ( $quality ) $tagClass = 'flaggedrevs_quality'; |
278 | | - else $tagClass = 'flaggedrevs_basic'; |
| 275 | + if ( FlaggedRevs::useSimpleUI() ) { |
| 276 | + $tagClass = 'flaggedrevs_short'; |
| 277 | + # Collapse the box details on mouseOut |
| 278 | + $encJS .= ' onMouseOut="FlaggedRevs.onBoxMouseOut(event)"'; |
| 279 | + } elseif ( $simpleTag ) { |
| 280 | + $tagClass = 'flaggedrevs_notice'; |
| 281 | + } elseif ( $pristine ) { |
| 282 | + $tagClass = 'flaggedrevs_pristine'; |
| 283 | + } elseif ( $quality ) { |
| 284 | + $tagClass = 'flaggedrevs_quality'; |
| 285 | + } else { |
| 286 | + $tagClass = 'flaggedrevs_basic'; |
| 287 | + } |
279 | 288 | # Wrap tag contents in a div |
280 | 289 | if ( $tag != '' ) { |
281 | 290 | $rtl = $wgContLang->isRTL() ? " rtl" : ""; // RTL langauges |
282 | 291 | $css = "{$tagClass}{$rtl} plainlinks noprint"; |
283 | | - $notice = "<div id=\"mw-fr-revisiontag\" class=\"$css\">$tag</div>\n"; |
| 292 | + $notice = "<div id=\"mw-fr-revisiontag\" class=\"{$css}\"{$encJS}>{$tag}</div>\n"; |
284 | 293 | $this->reviewNotice .= $notice; |
285 | 294 | } |
286 | 295 | return true; |
— | — | @@ -478,14 +487,14 @@ |
479 | 488 | $msg = $quality |
480 | 489 | ? 'revreview-quality-old' |
481 | 490 | : 'revreview-basic-old'; |
482 | | - $tag = $prot . $icon . |
483 | | - wfMsgExt( $msg, array( 'parseinline' ), $frev->getRevId(), $time ); |
| 491 | + $tag = $prot . $icon; |
| 492 | + $tag .= wfMsgExt( $msg, 'parseinline', $frev->getRevId(), $time ); |
484 | 493 | # Hide clutter |
485 | 494 | if ( !empty( $flags ) ) { |
486 | | - $tag .= " " . FlaggedRevsXML::ratingToggle(); |
487 | | - $tag .= "<span id='mw-fr-revisionratings' style='display:block;'><br />" . |
| 495 | + $tag .= FlaggedRevsXML::ratingToggle(); |
| 496 | + $tag .= "<div id='mw-fr-revisiondetails' style='display:block;'>" . |
488 | 497 | wfMsgHtml( 'revreview-oldrating' ) . |
489 | | - FlaggedRevsXML::addTagRatings( $flags ) . '</span>'; |
| 498 | + FlaggedRevsXML::addTagRatings( $flags ) . '</div>'; |
490 | 499 | } |
491 | 500 | } |
492 | 501 | } |
— | — | @@ -565,12 +574,12 @@ |
566 | 575 | # uses messages 'revreview-quality-i', 'revreview-basic-i' |
567 | 576 | $msg .= '-i'; |
568 | 577 | } |
569 | | - $tag = $prot . $icon . |
570 | | - wfMsgExt( $msg, array( 'parseinline' ), $srev->getRevId(), $time, $revsSince ); |
| 578 | + $tag = $prot . $icon; |
| 579 | + $tag .= wfMsgExt( $msg, 'parseinline', $srev->getRevId(), $time, $revsSince ); |
571 | 580 | if ( !empty( $flags ) ) { |
572 | | - $tag .= " " . FlaggedRevsXML::ratingToggle(); |
573 | | - $tag .= "<span id='mw-fr-revisionratings' style='display:block;'><br />" . |
574 | | - FlaggedRevsXML::addTagRatings( $flags ) . '</span>'; |
| 581 | + $tag .= FlaggedRevsXML::ratingToggle(); |
| 582 | + $tag .= "<div id='mw-fr-revisiondetails' style='display:block;'>" . |
| 583 | + FlaggedRevsXML::addTagRatings( $flags ) . '</div>'; |
575 | 584 | } |
576 | 585 | } |
577 | 586 | } |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/client/flaggedrevs.css |
— | — | @@ -119,9 +119,9 @@ |
120 | 120 | div.flaggedrevs_short_details { |
121 | 121 | border: 1px solid #aaa; |
122 | 122 | background-color: #f9f9f9; |
123 | | - padding: 4px; |
| 123 | + padding: 5px; |
124 | 124 | position: absolute; |
125 | | - top: 0; |
| 125 | + top: -1px; |
126 | 126 | right: 0; |
127 | 127 | width: 25em; |
128 | 128 | } |
— | — | @@ -192,6 +192,7 @@ |
193 | 193 | font-family: monospace; |
194 | 194 | font-weight: bold; |
195 | 195 | cursor: pointer; |
| 196 | + margin: 0 .3em 0 .3em; |
196 | 197 | } |
197 | 198 | |
198 | 199 | a.fr-toggle-text { |
— | — | @@ -260,8 +261,9 @@ |
261 | 262 | background-color: #faebd7; |
262 | 263 | } |
263 | 264 | |
264 | | -.fr-under-review { |
| 265 | +span.fr-under-review { |
265 | 266 | background-color: yellow; |
| 267 | + font-weight: bold; |
266 | 268 | } |
267 | 269 | |
268 | 270 | .mw-fr-reviewlink { |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/client/flaggedrevs.js |
— | — | @@ -19,7 +19,7 @@ |
20 | 20 | var toggle = document.getElementById('mw-fr-revisiontoggle'); |
21 | 21 | if( toggle ) { |
22 | 22 | toggle.style.display = 'inline'; |
23 | | - var ratings = document.getElementById('mw-fr-revisionratings'); |
| 23 | + var ratings = document.getElementById('mw-fr-revisiondetails'); |
24 | 24 | if( ratings ) { |
25 | 25 | ratings.style.display = 'none'; |
26 | 26 | } |
— | — | @@ -44,9 +44,9 @@ |
45 | 45 | } |
46 | 46 | }, |
47 | 47 | |
48 | | - /* Expands ratings */ |
| 48 | + /* Expands flag info box details */ |
49 | 49 | 'showBoxDetails': function() { |
50 | | - var ratings = document.getElementById('mw-fr-revisionratings'); |
| 50 | + var ratings = document.getElementById('mw-fr-revisiondetails'); |
51 | 51 | if( !ratings ) return; |
52 | 52 | var toggle = document.getElementById('mw-fr-revisiontoggle'); |
53 | 53 | if( !toggle ) return; |
— | — | @@ -54,9 +54,9 @@ |
55 | 55 | toggle.innerHTML = this.messages.toggleHide; |
56 | 56 | }, |
57 | 57 | |
58 | | - /* Collapses ratings */ |
59 | | - 'hideBoxDetails': function() { |
60 | | - var ratings = document.getElementById('mw-fr-revisionratings'); |
| 58 | + /* Collapses flag info box details */ |
| 59 | + 'hideBoxDetails': function( event ) { |
| 60 | + var ratings = document.getElementById('mw-fr-revisiondetails'); |
61 | 61 | if( !ratings ) return; |
62 | 62 | var toggle = document.getElementById('mw-fr-revisiontoggle'); |
63 | 63 | if( !toggle ) return; |
— | — | @@ -64,9 +64,9 @@ |
65 | 65 | toggle.innerHTML = this.messages.toggleShow; |
66 | 66 | }, |
67 | 67 | |
68 | | - /* Toggles ratings */ |
| 68 | + /* Toggles flag info box details */ |
69 | 69 | 'toggleBoxDetails': function() { |
70 | | - var ratings = document.getElementById('mw-fr-revisionratings'); |
| 70 | + var ratings = document.getElementById('mw-fr-revisiondetails'); |
71 | 71 | if( !ratings ) return; |
72 | 72 | // Collapsed -> expand |
73 | 73 | if( ratings.style.display == 'none' ) { |
— | — | @@ -77,6 +77,33 @@ |
78 | 78 | } |
79 | 79 | }, |
80 | 80 | |
| 81 | + /* Hides flag info box details on mouseOut *except* for event bubbling */ |
| 82 | + 'onBoxMouseOut': function( event ) { |
| 83 | + if( !this.isMouseOutBubble( event, 'mw-fr-revisiontag' ) ) { |
| 84 | + this.hideBoxDetails(); |
| 85 | + } |
| 86 | + }, |
| 87 | + |
| 88 | + /* Checks is mouseOut event is for a child of parentId */ |
| 89 | + 'isMouseOutBubble': function( event, parentId ) { |
| 90 | + var toNode = null; |
| 91 | + if( event.relatedTarget === undefined ) { |
| 92 | + toNode = event.toElement; // IE |
| 93 | + } else { |
| 94 | + toNode = event.relatedTarget; // FF/Opera/Safari |
| 95 | + } |
| 96 | + if( toNode ) { |
| 97 | + var nextParent = toNode.parentNode; |
| 98 | + while( nextParent ) { |
| 99 | + if( nextParent.id == parentId ) { |
| 100 | + return true; // event bubbling |
| 101 | + } |
| 102 | + nextParent = nextParent.parentNode; // next up |
| 103 | + } |
| 104 | + } |
| 105 | + return false; |
| 106 | + }, |
| 107 | + |
81 | 108 | /* Toggles diffs */ |
82 | 109 | 'toggleDiff': function() { |
83 | 110 | var diff = document.getElementById('mw-fr-stablediff'); |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/FlaggedRevs.php |
— | — | @@ -301,7 +301,7 @@ |
302 | 302 | $wgAvailableRights[] = 'stablesettings'; |
303 | 303 | |
304 | 304 | # Bump this number every time you change flaggedrevs.css/flaggedrevs.js |
305 | | -$wgFlaggedRevStyleVersion = 72; |
| 305 | +$wgFlaggedRevStyleVersion = 73; |
306 | 306 | |
307 | 307 | $wgExtensionFunctions[] = 'efLoadFlaggedRevs'; |
308 | 308 | |
— | — | @@ -332,9 +332,15 @@ |
333 | 333 | # Load FlaggedRevision object class |
334 | 334 | $wgAutoloadClasses['FlaggedRevision'] = $dir . 'FlaggedRevision.php'; |
335 | 335 | |
336 | | -# Load review UI |
| 336 | +# Load review form |
| 337 | +$wgAutoloadClasses['RevisionReviewForm'] = $dir . 'forms/RevisionReviewForm.php'; |
| 338 | +# Load protection/stability form |
| 339 | +$wgAutoloadClasses['PageStabilityForm'] = $dir . 'forms/PageStabilityForm.php'; |
| 340 | +$wgAutoloadClasses['PageStabilityGeneralForm'] = $dir . 'forms/PageStabilityForm.php'; |
| 341 | +$wgAutoloadClasses['PageStabilityProtectForm'] = $dir . 'forms/PageStabilityForm.php'; |
| 342 | + |
| 343 | +# Load revision review UI |
337 | 344 | $wgAutoloadClasses['RevisionReview'] = $dir . 'specialpages/RevisionReview_body.php'; |
338 | | - |
339 | 345 | # Load reviewed versions UI |
340 | 346 | $wgAutoloadClasses['ReviewedVersions'] = $dir . 'specialpages/ReviewedVersions_body.php'; |
341 | 347 | $wgExtensionMessagesFiles['ReviewedVersions'] = $langDir . 'ReviewedVersions.i18n.php'; |
— | — | @@ -373,6 +379,7 @@ |
374 | 380 | $wgAutoloadClasses['ValidationStatistics'] = $dir . 'specialpages/ValidationStatistics_body.php'; |
375 | 381 | $wgExtensionMessagesFiles['ValidationStatistics'] = $langDir . 'ValidationStatistics.i18n.php'; |
376 | 382 | $wgSpecialPageGroups['ValidationStatistics'] = 'quality'; |
| 383 | + |
377 | 384 | # API Modules |
378 | 385 | $wgAutoloadClasses['FlaggedRevsApiHooks'] = $dir . 'api/FlaggedRevsApi.hooks.php'; |
379 | 386 | # OldReviewedPages for API |
— | — | @@ -380,10 +387,8 @@ |
381 | 388 | $wgAPIListModules['oldreviewedpages'] = 'ApiQueryOldreviewedpages'; |
382 | 389 | # UnreviewedPages for API |
383 | 390 | $wgAutoloadClasses['ApiQueryUnreviewedpages'] = $dir . 'api/ApiQueryUnreviewedpages.php'; |
384 | | -$wgAPIListModules['unreviewedpages'] = 'ApiQueryUnreviewedpages'; |
385 | 391 | # ReviewedPages for API |
386 | 392 | $wgAutoloadClasses['ApiQueryReviewedpages'] = $dir . 'api/ApiQueryReviewedpages.php'; |
387 | | -$wgAPIListModules['reviewedpages'] = 'ApiQueryReviewedpages'; |
388 | 393 | # Flag metadata for pages for API |
389 | 394 | $wgAutoloadClasses['ApiQueryFlagged'] = $dir . 'api/ApiQueryFlagged.php'; |
390 | 395 | $wgAPIPropModules['flagged'] = 'ApiQueryFlagged'; |
— | — | @@ -417,9 +422,6 @@ |
418 | 423 | $wgHooks['PageHistoryBeforeList'][] = 'FlaggedRevsHooks::addToHistView'; |
419 | 424 | # Add review form and visiblity settings link |
420 | 425 | $wgHooks['SkinAfterContent'][] = 'FlaggedRevsHooks::onSkinAfterContent'; |
421 | | -# Add protection form field |
422 | | -$wgHooks['ProtectionForm::buildForm'][] = 'FlaggedRevsHooks::onProtectionForm'; |
423 | | -$wgHooks['ProtectionForm::showLogExtract'][] = 'FlaggedRevsHooks::insertStabilityLog'; |
424 | 426 | # Mark items in page history |
425 | 427 | $wgHooks['PageHistoryPager::getQueryInfo'][] = 'FlaggedRevsHooks::addToHistQuery'; |
426 | 428 | $wgHooks['PageHistoryLineEnding'][] = 'FlaggedRevsHooks::addToHistLine'; |
— | — | @@ -481,8 +483,6 @@ |
482 | 484 | # User edit tallies |
483 | 485 | $wgHooks['ArticleRollbackComplete'][] = 'FlaggedRevsHooks::incrementRollbacks'; |
484 | 486 | $wgHooks['NewRevisionFromEditComplete'][] = 'FlaggedRevsHooks::incrementReverts'; |
485 | | -# Save stability settings |
486 | | -$wgHooks['ProtectionForm::save'][] = 'FlaggedRevsHooks::onProtectionSave'; |
487 | 487 | # Extra cache updates for stable versions |
488 | 488 | $wgHooks['HTMLCacheUpdate::doUpdate'][] = 'FlaggedRevsHooks::doCacheUpdate'; |
489 | 489 | # Updates stable version tracking data |
— | — | @@ -529,6 +529,13 @@ |
530 | 530 | if ( !empty( $wgFlaggedRevsVisible ) ) { |
531 | 531 | $wgHooks['getUserPermissionsErrors'][] = 'FlaggedRevsHooks::userCanView'; |
532 | 532 | } |
| 533 | + if ( FlaggedRevs::useProtectionLevels() ) { |
| 534 | + # Add protection form field |
| 535 | + $wgHooks['ProtectionForm::buildForm'][] = 'FlaggedRevsHooks::onProtectionForm'; |
| 536 | + $wgHooks['ProtectionForm::showLogExtract'][] = 'FlaggedRevsHooks::insertStabilityLog'; |
| 537 | + # Save stability settings |
| 538 | + $wgHooks['ProtectionForm::save'][] = 'FlaggedRevsHooks::onProtectionSave'; |
| 539 | + } |
533 | 540 | } |
534 | 541 | |
535 | 542 | # ####### END HOOK TRIGGERED FUNCTIONS ######### |
— | — | @@ -553,6 +560,12 @@ |
554 | 561 | # Don't show autoreview group everywhere |
555 | 562 | global $wgImplicitGroups; |
556 | 563 | $wgImplicitGroups[] = 'autoreview'; |
| 564 | + # Conditional API modules |
| 565 | + global $wgAPIListModules; |
| 566 | + if ( !FlaggedRevs::stableOnlyIfConfigured() ) { |
| 567 | + $wgAPIListModules['reviewedpages'] = 'ApiQueryReviewedpages'; |
| 568 | + $wgAPIListModules['unreviewedpages'] = 'ApiQueryUnreviewedpages'; |
| 569 | + } |
557 | 570 | } |
558 | 571 | |
559 | 572 | # Add review log |
— | — | @@ -576,8 +589,9 @@ |
577 | 590 | $wgLogTypes[] = 'stable'; |
578 | 591 | $wgLogNames['stable'] = 'stable-logpage'; |
579 | 592 | $wgLogHeaders['stable'] = 'stable-logpagetext'; |
580 | | -$wgLogActions['stable/config'] = 'stable-logentry-config'; |
581 | | -$wgLogActions['stable/reset'] = 'stable-logentry-reset'; |
| 593 | +$wgLogActionsHandlers['stable/config'] = 'FlaggedRevsLogs::stabilityLogText'; // customize |
| 594 | +$wgLogActionsHandlers['stable/modify'] = 'FlaggedRevsLogs::stabilityLogText'; // re-customize |
| 595 | +$wgLogActionsHandlers['stable/reset'] = 'FlaggedRevsLogs::stabilityLogText'; // reset |
582 | 596 | |
583 | 597 | # AJAX functions |
584 | 598 | $wgAjaxExportList[] = 'RevisionReview::AjaxReview'; |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/maintenance/pruneRevData.inc |
— | — | @@ -27,8 +27,6 @@ |
28 | 28 | |
29 | 29 | $newerRevs = 50; |
30 | 30 | $cutoff = $db->timestamp( time() - 30*24*3600 ); |
31 | | - // DEV |
32 | | - $newerRevs = 1; |
33 | 31 | $cutoff = $db->timestamp( time() - 3600 ); |
34 | 32 | while( $blockEnd <= $end ) { |
35 | 33 | echo "...doing fp_page_id from $blockStart to $blockEnd\n"; |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/FlaggedRevs.alias.php |
— | — | @@ -26,11 +26,11 @@ |
27 | 27 | |
28 | 28 | /** Aragonese (Aragonés) */ |
29 | 29 | $aliases['an'] = array( |
30 | | - 'OldReviewedPages' => array( 'PachinasSuperbisatasAntigas' ), |
31 | | - 'QualityOversight' => array( 'SuperbisataDeCalidat' ), |
32 | | - 'ReviewedPages' => array( 'PachinasSuberbisatas' ), |
| 30 | + 'OldReviewedPages' => array( 'PachinasSupervisatasAntigas' ), |
| 31 | + 'QualityOversight' => array( 'SupervisataDeCalidat' ), |
| 32 | + 'ReviewedPages' => array( 'PachinasSubervisatas' ), |
33 | 33 | 'StablePages' => array( 'PachinasEstables' ), |
34 | | - 'UnreviewedPages' => array( 'PachinasNoRebisatas' ), |
| 34 | + 'UnreviewedPages' => array( 'PachinasNoRevisatas' ), |
35 | 35 | ); |
36 | 36 | |
37 | 37 | /** Arabic (العربية) */ |
— | — | @@ -50,16 +50,16 @@ |
51 | 51 | |
52 | 52 | /** Egyptian Spoken Arabic (مصرى) */ |
53 | 53 | $aliases['arz'] = array( |
54 | | - 'OldReviewedPages' => array( 'صفحات_مراجعة_قديمة' ), |
| 54 | + 'OldReviewedPages' => array( 'صفح_مراجعه_قديمه' ), |
55 | 55 | 'ProblemChanges' => array( 'تغييرات_المشاكل' ), |
56 | | - 'QualityOversight' => array( 'نظر_الجودة' ), |
57 | | - 'ReviewedPages' => array( 'صفحات_مراجعة' ), |
58 | | - 'RevisionReview' => array( 'مراجعة_نسخة' ), |
| 56 | + 'QualityOversight' => array( 'مراقبة_الجوده' ), |
| 57 | + 'ReviewedPages' => array( 'صفح_مراجعه' ), |
| 58 | + 'RevisionReview' => array( 'مراجعة_نسخه' ), |
59 | 59 | 'Stabilization' => array( 'استقرار' ), |
60 | | - 'StablePages' => array( 'صفحات_مستقرة' ), |
61 | | - 'ReviewedVersions' => array( 'نسخ_مراجعة', 'نسخ_مستقرة' ), |
62 | | - 'UnreviewedPages' => array( 'صفحات_مش_مراجعة' ), |
63 | | - 'ValidationStatistics' => array( 'إحصاءات_التحقق' ), |
| 60 | + 'StablePages' => array( 'صفح_مستقر' ), |
| 61 | + 'ReviewedVersions' => array( 'نسخ_مراجعه', 'نسخ_مستقره' ), |
| 62 | + 'UnreviewedPages' => array( 'صفح_مش_متراجعه' ), |
| 63 | + 'ValidationStatistics' => array( 'احصائيات_الصلاحيه' ), |
64 | 64 | ); |
65 | 65 | |
66 | 66 | /** Southern Balochi (بلوچی مکرانی) */ |
— | — | @@ -114,16 +114,21 @@ |
115 | 115 | |
116 | 116 | /** Esperanto (Esperanto) */ |
117 | 117 | $aliases['eo'] = array( |
118 | | - 'OldReviewedPages' => array( 'MalfreŝeKontrolitajPaĝoj' ), |
119 | | - 'QualityOversight' => array( 'KvalitKontrolo' ), |
120 | | - 'ReviewedPages' => array( 'KontrolitajPaĝoj' ), |
121 | | - 'StablePages' => array( 'StabilajPaĝoj' ), |
122 | | - 'UnreviewedPages' => array( 'NekontrolitajPaĝoj' ), |
| 118 | + 'OldReviewedPages' => array( 'Malfreŝe kontrolitaj paĝoj' ), |
| 119 | + 'QualityOversight' => array( 'Kvalita kontrolo' ), |
| 120 | + 'ReviewedPages' => array( 'Kontrolitaj paĝoj' ), |
| 121 | + 'StablePages' => array( 'Stabilaj paĝoj' ), |
| 122 | + 'UnreviewedPages' => array( 'Nekontrolitaj paĝoj' ), |
123 | 123 | ); |
124 | 124 | |
125 | 125 | /** Spanish (Español) */ |
126 | 126 | $aliases['es'] = array( |
| 127 | + 'OldReviewedPages' => array( 'Páginas revisadas antiguas' ), |
| 128 | + 'Stabilization' => array( 'Estabilización' ), |
| 129 | + 'StablePages' => array( 'Páginas publicadas' ), |
| 130 | + 'ReviewedVersions' => array( 'Versiones revisadas' ), |
127 | 131 | 'UnreviewedPages' => array( 'Páginas_sin_revisar' ), |
| 132 | + 'ValidationStatistics' => array( 'Estadísticas de validación' ), |
128 | 133 | ); |
129 | 134 | |
130 | 135 | /** Persian (فارسی) */ |
— | — | @@ -278,6 +283,8 @@ |
279 | 284 | 'RevisionReview' => array( '特定版の査読' ), |
280 | 285 | 'Stabilization' => array( '固定', '採択', 'ページの採択' ), |
281 | 286 | 'StablePages' => array( '固定ページ', '安定ページ', '採用ページ' ), |
| 287 | + 'ConfiguredPages' => array( '査読設定のあるページ' ), |
| 288 | + 'ReviewedVersions' => array( '固定版', '安定版', '採用版' ), |
282 | 289 | 'UnreviewedPages' => array( '未査読ページ', '査読待ちページ' ), |
283 | 290 | 'ValidationStatistics' => array( '判定統計' ), |
284 | 291 | ); |
— | — | @@ -324,7 +331,8 @@ |
325 | 332 | 'ReviewedPages' => array( 'സംശോധനംചെയ്തതാളുകൾ' ), |
326 | 333 | 'RevisionReview' => array( 'നാൾപ്പതിപ്പ്സംശോധനം' ), |
327 | 334 | 'Stabilization' => array( 'സ്ഥിരപ്പെടുത്തൽ' ), |
328 | | - 'StablePages' => array( 'സ്ഥിരതാളുകള്' ), |
| 335 | + 'StablePages' => array( 'സ്ഥിരതാളുകൾ' ), |
| 336 | + 'ConfiguredPages' => array( 'ക്രമീകരിച്ചതാളുകൾ' ), |
329 | 337 | 'ReviewedVersions' => array( 'സംശോധിതപതിപ്പുകൾ', 'സ്ഥിരതയുള്ള പതിപ്പുകൾ' ), |
330 | 338 | 'UnreviewedPages' => array( 'സംശോധനംചെയ്യാത്തതാളുകൾ' ), |
331 | 339 | 'ValidationStatistics' => array( 'മൂല്യനിർണ്ണയസ്ഥിതിവിവരം' ), |
— | — | @@ -447,6 +455,7 @@ |
448 | 456 | 'RevisionReview' => array( 'Revisão de edições' ), |
449 | 457 | 'Stabilization' => array( 'Estabilização' ), |
450 | 458 | 'StablePages' => array( 'Páginas_estáveis' ), |
| 459 | + 'ConfiguredPages' => array( 'Páginas configuradas' ), |
451 | 460 | 'UnreviewedPages' => array( 'Páginas_a_analisar' ), |
452 | 461 | 'ValidationStatistics' => array( 'Estatísticas de validação' ), |
453 | 462 | ); |
— | — | @@ -519,7 +528,7 @@ |
520 | 529 | 'QualityOversight' => array( 'Maingat na pamamahala ng kalidad' ), |
521 | 530 | 'ReviewedPages' => array( 'Sinuring mga pahina' ), |
522 | 531 | 'RevisionReview' => array( 'Pagsusuri ng pagbabago' ), |
523 | | - 'Stabilization' => array( 'Pagpapatatag', 'pagpapatibay' ), |
| 532 | + 'Stabilization' => array( 'Pagpapatatag', 'Pagpapatibay' ), |
524 | 533 | 'StablePages' => array( 'Matatag na mga pahina' ), |
525 | 534 | 'UnreviewedPages' => array( 'Mga pahina hindi pa nasusuri' ), |
526 | 535 | 'ValidationStatistics' => array( 'Mga estadistika ng pagtitiyak' ), |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/QualityOversight.i18n.php |
— | — | @@ -114,11 +114,12 @@ |
115 | 115 | ); |
116 | 116 | |
117 | 117 | /** German (Deutsch) |
| 118 | + * @author Kghbln |
118 | 119 | * @author Raimond Spekking |
119 | 120 | * @author Umherirrender |
120 | 121 | */ |
121 | 122 | $messages['de'] = array( |
122 | | - 'qualityoversight' => 'Übersicht über markierte Versionen', |
| 123 | + 'qualityoversight' => 'Erweitertes Versionsmarkierungs-Logbuch', |
123 | 124 | 'qualityoversight-list' => 'Diese Seite zeigt die aktuellen Freigaben sowie den Widerruf markierter Versionen.', |
124 | 125 | 'qualityoversight-legend' => 'Suche in Versionsmarkierungen', |
125 | 126 | ); |
— | — | @@ -468,8 +469,8 @@ |
469 | 470 | * @author Mihai |
470 | 471 | */ |
471 | 472 | $messages['ro'] = array( |
472 | | - 'qualityoversight-list' => 'Această pagină afişează cele mai recente aprobări şi deprecieri ale reviziilor.', |
473 | | - 'qualityoversight-legend' => 'Căutaţi jurnalele recente ale revizuirilor', |
| 473 | + 'qualityoversight-list' => 'Această pagină afișează cele mai recente aprobări și deprecieri ale reviziilor.', |
| 474 | + 'qualityoversight-legend' => 'Căutați jurnalele recente ale revizuirilor', |
474 | 475 | ); |
475 | 476 | |
476 | 477 | /** Tarandíne (Tarandíne) |
— | — | @@ -626,11 +627,12 @@ |
627 | 628 | ); |
628 | 629 | |
629 | 630 | /** Traditional Chinese (中文(繁體)) |
| 631 | + * @author Horacewai2 |
630 | 632 | * @author Liangent |
631 | 633 | * @author Shinjiman |
632 | 634 | */ |
633 | 635 | $messages['zh-hant'] = array( |
634 | | - 'qualityoversight' => '品質管理', |
| 636 | + 'qualityoversight' => '品質管理日誌', |
635 | 637 | 'qualityoversight-list' => '這個頁面列示出最近核准修訂以及最近品質修訂之折舊。', |
636 | 638 | 'qualityoversight-legend' => '搜索最近審核記錄', |
637 | 639 | ); |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/ReviewedVersions.i18n.php |
— | — | @@ -871,8 +871,8 @@ |
872 | 872 | * @author Mihai |
873 | 873 | */ |
874 | 874 | $messages['ro'] = array( |
875 | | - 'reviewedversions' => 'Vizualizaţi versiunile stabile', |
876 | | - 'reviewedversions-leg1' => 'Afişează reviziile revizuite pentru o pagină', |
| 875 | + 'reviewedversions' => 'Vizualizați versiunile stabile', |
| 876 | + 'reviewedversions-leg1' => 'Afișează reviziile revizuite pentru o pagină', |
877 | 877 | 'reviewedversions-page' => 'Numele paginii:', |
878 | 878 | 'reviewedversions-none' => '"[[:$1]]" nu are revizii revizuite.', |
879 | 879 | ); |
— | — | @@ -992,12 +992,13 @@ |
993 | 993 | ); |
994 | 994 | |
995 | 995 | /** Swedish (Svenska) |
| 996 | + * @author Dafer45 |
996 | 997 | * @author Lejonel |
997 | 998 | * @author M.M.S. |
998 | 999 | * @author Najami |
999 | 1000 | */ |
1000 | 1001 | $messages['sv'] = array( |
1001 | | - 'reviewedversions' => 'Visa stabila versioner', |
| 1002 | + 'reviewedversions' => 'Granskade versioner', |
1002 | 1003 | 'reviewedversions-leg1' => 'Lista granskade versioner av en sida', |
1003 | 1004 | 'reviewedversions-page' => 'Sidnamn:', |
1004 | 1005 | 'reviewedversions-none' => '"[[:$1]]" har inga granskade versioner.', |
— | — | @@ -1194,14 +1195,15 @@ |
1195 | 1196 | ); |
1196 | 1197 | |
1197 | 1198 | /** Traditional Chinese (中文(繁體)) |
| 1199 | + * @author Horacewai2 |
1198 | 1200 | * @author Liangent |
1199 | 1201 | */ |
1200 | 1202 | $messages['zh-hant'] = array( |
1201 | | - 'reviewedversions' => '穩定版', |
| 1203 | + 'reviewedversions' => '穩定版本', |
1202 | 1204 | 'reviewedversions-leg1' => '列示一版已複審的修訂', |
1203 | 1205 | 'reviewedversions-page' => '頁面名', |
1204 | 1206 | 'reviewedversions-none' => '[[:$1]]沒有已複審過的修訂。', |
1205 | | - 'reviewedversions-list' => '以下是[[:$1]]已複審的修訂列表:', |
| 1207 | + 'reviewedversions-list' => '以下是[[:$1]]的{{PLURAL:$2|此唯一|此}}版本{{PLURAL:$2|已|已}}複審的修訂列表:', |
1206 | 1208 | 'reviewedversions-review' => '由$2於<i>$1</i>進行了複審', |
1207 | 1209 | ); |
1208 | 1210 | |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/ConfiguredPages.i18n.php |
— | — | @@ -116,12 +116,22 @@ |
117 | 117 | 'configuredpages-prec-pristine' => 'čistá přednost', |
118 | 118 | ); |
119 | 119 | |
120 | | -/** German (Deutsch) */ |
| 120 | +/** German (Deutsch) |
| 121 | + * @author Kghbln |
| 122 | + */ |
121 | 123 | $messages['de'] = array( |
| 124 | + 'configuredpages' => 'Seiten die hinsichtlich der Versionsmarkierung konfiguriert wurden', |
| 125 | + 'configuredpages-text' => 'Es folgt eine Liste der Seiten, deren Konfiguration zur Versionsmarkierung vom Standard der Website abweicht. |
| 126 | + |
| 127 | +Einige Einstellungen können eine Abweichung hinsichtlich der Version bewirken, die dem Leser angezeigt wird. Sie können auch den Kreis derjenigen weiter einschränken, deren Bearbeitungen keine weitere Durchsicht erfordert.', |
| 128 | + 'configuredpages-none' => 'Diese Liste enthält keine Seiten.', |
122 | 129 | 'configuredpages-config' => 'Konfiguration', |
| 130 | + 'configuredpages-precedence' => 'Priorität:', |
123 | 131 | 'configuredpages-prec-none' => 'zuletzt überprüft', |
124 | | - 'configuredpages-prec-quality' => 'Qualitätsrangordnung', |
125 | | - 'configuredpages-prec-pristine' => 'ursprüngliche Rangordnung', |
| 132 | + 'configuredpages-prec-quality' => 'aktueller Qualitätsstatus', |
| 133 | + 'configuredpages-prec-pristine' => 'neueste markierte Version', |
| 134 | + 'configuredpages-def-draft' => 'neueste Version', |
| 135 | + 'configuredpages-def-stable' => 'veröffentlichte Version', |
126 | 136 | ); |
127 | 137 | |
128 | 138 | /** Zazaki (Zazaki) */ |
— | — | @@ -593,7 +603,7 @@ |
594 | 604 | /** Romanian (Română) */ |
595 | 605 | $messages['ro'] = array( |
596 | 606 | 'configuredpages-prec-none' => 'nicio prioritate', |
597 | | - 'configuredpages-prec-quality' => 'preferinţă pentru calitate', |
| 607 | + 'configuredpages-prec-quality' => 'preferință pentru calitate', |
598 | 608 | ); |
599 | 609 | |
600 | 610 | /** Tarandíne (Tarandíne) */ |
— | — | @@ -628,8 +638,11 @@ |
629 | 639 | 'configuredpages-prec-pristine' => 'эрдэтээҥҥитэ баһыйыылаах', |
630 | 640 | ); |
631 | 641 | |
632 | | -/** Slovak (Slovenčina) */ |
| 642 | +/** Slovak (Slovenčina) |
| 643 | + * @author Helix84 |
| 644 | + */ |
633 | 645 | $messages['sk'] = array( |
| 646 | + 'configuredpages' => 'Stránky s nastavením kontroly', |
634 | 647 | 'configuredpages-prec-none' => 'bez precedencie', |
635 | 648 | 'configuredpages-prec-quality' => 'precedencia podľa kvality', |
636 | 649 | 'configuredpages-prec-pristine' => 'čistá precedencia', |
— | — | @@ -714,11 +727,17 @@ |
715 | 728 | 'configuredpages-prec-pristine' => 'koskmatomuden tobmuz', |
716 | 729 | ); |
717 | 730 | |
718 | | -/** Vietnamese (Tiếng Việt) */ |
| 731 | +/** Vietnamese (Tiếng Việt) |
| 732 | + * @author Minh Nguyen |
| 733 | + */ |
719 | 734 | $messages['vi'] = array( |
| 735 | + 'configuredpages-none' => 'Danh sách không có trang nào.', |
| 736 | + 'configuredpages-config' => 'Thiết lập', |
720 | 737 | 'configuredpages-prec-none' => 'không có bản trước', |
721 | 738 | 'configuredpages-prec-quality' => 'bản chất lượng trước', |
722 | 739 | 'configuredpages-prec-pristine' => 'bản trong sạch trước', |
| 740 | + 'configuredpages-def-draft' => 'phiên bản mới nhất', |
| 741 | + 'configuredpages-def-stable' => 'phiên bản xuất bản', |
723 | 742 | ); |
724 | 743 | |
725 | 744 | /** Simplified Chinese (中文(简体)) */ |
— | — | @@ -728,10 +747,21 @@ |
729 | 748 | 'configuredpages-prec-pristine' => '原始优先级', |
730 | 749 | ); |
731 | 750 | |
732 | | -/** Traditional Chinese (中文(繁體)) */ |
| 751 | +/** Traditional Chinese (中文(繁體)) |
| 752 | + * @author Horacewai2 |
| 753 | + */ |
733 | 754 | $messages['zh-hant'] = array( |
| 755 | + 'configuredpages' => '頁面已有複審設定', |
| 756 | + 'configuredpages-text' => '下面是已有和站點預設設定不同的審核設定。 |
| 757 | + |
| 758 | +部份設定的更改是向讀者展示的。', |
| 759 | + 'configuredpages-none' => '沒有頁面在這個清單中', |
| 760 | + 'configuredpages-config' => '設定', |
| 761 | + 'configuredpages-precedence' => '優先級:', |
734 | 762 | 'configuredpages-prec-none' => '沒有優先級', |
735 | 763 | 'configuredpages-prec-quality' => '質量優先級', |
736 | 764 | 'configuredpages-prec-pristine' => '原始優先級', |
| 765 | + 'configuredpages-def-draft' => '最新版本', |
| 766 | + 'configuredpages-def-stable' => '已出版的內容', |
737 | 767 | ); |
738 | 768 | |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/ValidationStatistics.i18n.php |
— | — | @@ -1544,10 +1544,10 @@ |
1545 | 1545 | */ |
1546 | 1546 | $messages['ro'] = array( |
1547 | 1547 | 'validationstatistics-users' => "'''{{SITENAME}}''' are în prezent '''[[Special:ListUsers/editor|$1]]''' {{PLURAL:$1|utilizator|utilizatori}} cu drepturi de [[{{MediaWiki:Validationpage}}|editare]] |
1548 | | -şi '''[[Special:ListUsers/reviewer|$2]]''' {{PLURAL:$2|utilizator|utilizatori}} cu drepturi de [[{{MediaWiki:Validationpage}}|recenzie]]. |
| 1548 | +și '''[[Special:ListUsers/reviewer|$2]]''' {{PLURAL:$2|utilizator|utilizatori}} cu drepturi de [[{{MediaWiki:Validationpage}}|recenzie]]. |
1549 | 1549 | |
1550 | | -Editorii şi recenzorii sunt utilizatori stabiliţi care pot verifica modificările din pagini.", |
1551 | | - 'validationstatistics-ns' => 'Spaţiu de nume', |
| 1550 | +Editorii și recenzorii sunt utilizatori stabiliți care pot verifica modificările din pagini.", |
| 1551 | + 'validationstatistics-ns' => 'Spațiu de nume', |
1552 | 1552 | 'validationstatistics-total' => 'Pagini', |
1553 | 1553 | 'validationstatistics-stable' => 'Revizualizată', |
1554 | 1554 | 'validationstatistics-latest' => 'Sincronizată', |
— | — | @@ -1712,12 +1712,13 @@ |
1713 | 1713 | |
1714 | 1714 | /** Swedish (Svenska) |
1715 | 1715 | * @author Boivie |
| 1716 | + * @author Dafer45 |
1716 | 1717 | * @author M.M.S. |
1717 | 1718 | * @author Rotsee |
1718 | 1719 | * @author Skalman |
1719 | 1720 | */ |
1720 | 1721 | $messages['sv'] = array( |
1721 | | - 'validationstatistics' => 'Valideringsstatistik', |
| 1722 | + 'validationstatistics' => 'Statistik över sidgranskning', |
1722 | 1723 | 'validationstatistics-users' => "'''{{SITENAME}}''' har just nu '''[[Special:ListUsers/editor|$1]]''' {{PLURAL:$1|användare|användare}} med [[{{MediaWiki:Validationpage}}|skribenträttigheter]]. |
1723 | 1724 | |
1724 | 1725 | Skribenter är etablerade användare som kan granska sidversioner.", |
— | — | @@ -2026,12 +2027,13 @@ |
2027 | 2028 | |
2028 | 2029 | /** Traditional Chinese (中文(繁體)) |
2029 | 2030 | * @author Gaoxuewei |
| 2031 | + * @author Horacewai2 |
2030 | 2032 | * @author Mark85296341 |
2031 | 2033 | * @author Tomchiukc |
2032 | 2034 | */ |
2033 | 2035 | $messages['zh-hant'] = array( |
2034 | | - 'validationstatistics' => '判定統計', |
2035 | | - 'validationstatistics-users' => "'''{{SITENAME}}'''現時有'''[[Special:ListUsers/editor|$1]]'''個用戶具有[[{{MediaWiki:Validationpage}}|編輯]]的權限,而'''[[Special:ListUsers/reviewer|$2]]'''個用戶有[[{{MediaWiki:Validationpage}}|審定]]的權限。 |
| 2036 | + 'validationstatistics' => '審核統計', |
| 2037 | + 'validationstatistics-users' => "'''{{SITENAME}}'''現時有'''[[Special:ListUsers/editor|$1]]'''{{PLURAL:$1|個|個}}用戶具有[[{{MediaWiki:Validationpage}}|編輯]]的權限。 |
2036 | 2038 | |
2037 | 2039 | 編輯及審定皆為已確認的用戶,並可以檢查各頁面的修定。", |
2038 | 2040 | 'validationstatistics-time' => "''下列資訊於 $5 $6 進行了最後更新。 '' |
— | — | @@ -2041,7 +2043,7 @@ |
2042 | 2044 | ''未登錄用戶''的編輯平均等待審核時間為'''$1''';中值時間為'''$3'''。 |
2043 | 2045 | $4 |
2044 | 2046 | [[Special:OldReviewedPages|未審核的頁面編輯等待]]平均滯後時間為'''$2'''。 |
2045 | | -這些頁面被認為''過期''了。同樣的,如果[[{{MediaWiki:Validationpage}}|完美版本]]是目前的待定版本,這些頁面就被認為''已同步''。 |
| 2047 | +這些頁面被認為''過期''了。同樣的,如果完美版本是目前的待定版本,這些頁面就被認為''已同步''。 |
2046 | 2048 | 頁面的完美版本是被讀者普遍接受的最新版本。", |
2047 | 2049 | 'validationstatistics-table' => "各名稱空間的統計資訊顯示如下,''不包含''轉向頁。", |
2048 | 2050 | 'validationstatistics-ns' => '名稱空間', |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/FlaggedRevs.i18n.php |
— | — | @@ -55,8 +55,10 @@ |
56 | 56 | 'revreview-diff-toggle-title' => 'Toggle display of pending changes to the published version', |
57 | 57 | 'revreview-log-toggle-show' => 'show stability log', |
58 | 58 | 'revreview-log-toggle-hide' => 'hide stability log', |
| 59 | + 'revreview-log-toggle-title' => 'Toggle display of stability settings log', |
59 | 60 | 'revreview-log-details-show' => 'show details', |
60 | 61 | 'revreview-log-details-hide' => 'hide details', |
| 62 | + 'revreview-log-details-title' => 'Toggle display of stability settings log', |
61 | 63 | 'review-diff2stable' => 'View all pending changes', |
62 | 64 | 'review-logentry-app' => 'reviewed a version of [[$1]]', |
63 | 65 | 'review-logentry-dis' => 'deprecated a version of [[$1]]', |
— | — | @@ -89,6 +91,17 @@ |
90 | 92 | A template or file may have been requested when no specific version was specified. |
91 | 93 | This can happen if a dynamic template transcludes another file or template depending on a variable that changed since you started reviewing this page. |
92 | 94 | Refreshing the page and rereviewing can solve this problem.', |
| 95 | + |
| 96 | + 'review_page_invalid' => 'The target page title is invalid.', |
| 97 | + 'review_page_notexists' => 'The target page does not exist.', |
| 98 | + 'review_page_unreviewable' => 'The target page is not reviewable.', |
| 99 | + 'review_no_oldid' => 'No revision ID specified.', |
| 100 | + 'review_bad_oldid' => 'There is no such target revision.', |
| 101 | + 'review_too_low' => 'Revision cannot be reviewed with some fields left unapproved.', |
| 102 | + 'review_bad_key' => 'Invalid inclusion parameter key.', |
| 103 | + 'review_denied' => 'Permission denied.', |
| 104 | + 'review_param_missing' => 'A parameter is missing or invalid.', |
| 105 | + |
93 | 106 | 'revreview-current' => 'Pending changes', |
94 | 107 | 'revreview-depth' => 'Depth', |
95 | 108 | 'revreview-depth-0' => 'Unapproved', |
— | — | @@ -168,6 +181,7 @@ |
169 | 182 | 'revreview-toggle-hide' => '(-)', |
170 | 183 | 'revreview-toggle-title' => 'show/hide details', |
171 | 184 | 'revreview-toolow' => '\'\'\'You must rate each of the attributes higher than "unapproved" in order for a revision to be considered reviewed.\'\'\' |
| 185 | + |
172 | 186 | To remove the review status of a revision, set all fields to "unapproved". |
173 | 187 | |
174 | 188 | Please hit the "back" button in your browser and try again.', |
— | — | @@ -191,8 +205,9 @@ |
192 | 206 | 'rights-editor-autosum' => 'autopromoted', |
193 | 207 | 'rights-editor-revoke' => 'removed editor status from [[$1]]', # B/C |
194 | 208 | 'specialpages-group-quality' => 'Edit approval', |
195 | | - 'stable-logentry-config' => 'configured publication settings for [[$1]]', |
196 | | - 'stable-logentry-reset' => 'reset publication settings for [[$1]]', |
| 209 | + 'stable-logentry-config' => 'set publication settings for $1', |
| 210 | + 'stable-logentry-modify' => 'changed publication settings for $1', |
| 211 | + 'stable-logentry-reset' => 'reset publication settings for $1', |
197 | 212 | 'stable-log-restriction' => 'Publish: require "$1" permission', |
198 | 213 | 'stable-logpage' => 'Stability log', |
199 | 214 | 'stable-logpagetext' => 'This is a log of changes to the [[{{MediaWiki:Validationpage}}|published version]] configuration of content pages.', |
— | — | @@ -1527,8 +1542,10 @@ |
1528 | 1543 | 'revreview-diff-toggle-title' => 'Пераключэньне паказу неравераных зьменаў апублікаванай вэрсіяй', |
1529 | 1544 | 'revreview-log-toggle-show' => 'паказаць журнал стабілізацыяў', |
1530 | 1545 | 'revreview-log-toggle-hide' => 'схаваць журнал стабілізацыяў', |
| 1546 | + 'revreview-log-toggle-title' => 'Уключыць паказ журнала ўстановак стабілізацыі', |
1531 | 1547 | 'revreview-log-details-show' => 'паказаць падрабязнасьці', |
1532 | 1548 | 'revreview-log-details-hide' => 'схаваць падрабязнасьці', |
| 1549 | + 'revreview-log-details-title' => 'Уключыць паказ журнала ўстановак стабілізацыі', |
1533 | 1550 | 'review-diff2stable' => 'Паказаць непрагледжаныя зьмены апублікаванай вэрсіі', |
1534 | 1551 | 'review-logentry-app' => 'праверыў вэрсію старонкі [[$1]]', |
1535 | 1552 | 'review-logentry-dis' => 'састарэлая вэрсія старонкі [[$1]]', |
— | — | @@ -3709,8 +3726,10 @@ |
3710 | 3727 | 'revreview-diff-toggle-title' => 'Muestra u oculta los cambios pendientes en la versión publicada', |
3711 | 3728 | 'revreview-log-toggle-show' => 'mostrar registro de estabilidad', |
3712 | 3729 | 'revreview-log-toggle-hide' => 'ocultar registro de estabilidad', |
| 3730 | + 'revreview-log-toggle-title' => 'Mostrar u ocultar el registro de configuración de estabilidad', |
3713 | 3731 | 'revreview-log-details-show' => 'mostrar detalles', |
3714 | 3732 | 'revreview-log-details-hide' => 'ocultar detalles', |
| 3733 | + 'revreview-log-details-title' => 'Mostrar u ocultar el registro de configuración de estabilidad', |
3715 | 3734 | 'review-diff2stable' => 'Ver los cambios pendientes de la versión publicada', |
3716 | 3735 | 'review-logentry-app' => 'Revisado una versión de [[$1]]', |
3717 | 3736 | 'review-logentry-dis' => 'desaprobada una versión de [[$1]]', |
— | — | @@ -3870,7 +3889,7 @@ |
3871 | 3890 | 'tooltip-ca-current' => 'Ver esta página con los cambios pendientes', |
3872 | 3891 | 'tooltip-ca-stable' => 'Ver la versión publicada de esta página', |
3873 | 3892 | 'tooltip-ca-default' => 'Opciones de control de calidad', |
3874 | | - 'flaggedrevs-protect-legend' => 'Publicar ediciones', |
| 3893 | + 'flaggedrevs-protect-legend' => 'Publicar ediciones ([[{{MediaWiki:Validationpage}}|?]])', |
3875 | 3894 | 'flaggedrevs-protect-none' => 'Permitir todos los usuarios', |
3876 | 3895 | 'flaggedrevs-protect-basic' => 'Configuraciones por defecto', |
3877 | 3896 | 'revreview-locked-title' => 'Las ediciones deben ser revisadas antes de ser mostradas en esta página!', |
— | — | @@ -4406,8 +4425,10 @@ |
4407 | 4426 | 'revreview-diff-toggle-title' => "Basculer l'affichage entre les modifications en attente et la version publiée", |
4408 | 4427 | 'revreview-log-toggle-show' => 'afficher le journal de stabilité', |
4409 | 4428 | 'revreview-log-toggle-hide' => 'cacher le journal de stabilité', |
| 4429 | + 'revreview-log-toggle-title' => "Basculer l'affichage du journal des paramètres de stabilité", |
4410 | 4430 | 'revreview-log-details-show' => 'afficher les détails', |
4411 | 4431 | 'revreview-log-details-hide' => 'masquer les détails', |
| 4432 | + 'revreview-log-details-title' => "Basculer l'affichage du journal des paramètres de stabilité", |
4412 | 4433 | 'review-diff2stable' => 'Voir les modifications en cours par rapport à la version publiée', |
4413 | 4434 | 'review-logentry-app' => 'a relu une version de [[$1]]', |
4414 | 4435 | 'review-logentry-dis' => 'a déprécié une version de [[$1]]', |
— | — | @@ -4872,8 +4893,10 @@ |
4873 | 4894 | 'revreview-diff-toggle-title' => 'Cambiar a visualización de cambios entre os cambios pendentes e a versión publicada', |
4874 | 4895 | 'revreview-log-toggle-show' => 'mostrar o rexistro de estabilidade', |
4875 | 4896 | 'revreview-log-toggle-hide' => 'agochar o rexistro de estabilidade', |
| 4897 | + 'revreview-log-toggle-title' => 'Conmutar a presentación do rexistro de configuración de estabilidade', |
4876 | 4898 | 'revreview-log-details-show' => 'mostrar os detalles', |
4877 | 4899 | 'revreview-log-details-hide' => 'agochar os detalles', |
| 4900 | + 'revreview-log-details-title' => 'Conmutar a presentación do rexistro de configuración de estabilidade', |
4878 | 4901 | 'review-diff2stable' => 'Ver os cambios pendentes feitos á versión publicada', |
4879 | 4902 | 'review-logentry-app' => 'revisou unha versión de "[[$1]]"', |
4880 | 4903 | 'review-logentry-dis' => 'rexeitou unha versión de "[[$1]]"', |
— | — | @@ -4959,7 +4982,7 @@ |
4960 | 4983 | 'revreview-quick-quality-same' => "'''[[{{MediaWiki:Validationpage}}|Calidade]]'''", |
4961 | 4984 | 'revreview-quick-see-basic' => '[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} revisar os cambios pendentes]]', |
4962 | 4985 | 'revreview-quick-see-quality' => '[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} revisar os cambios pendentes]]', |
4963 | | - 'revreview-selected' => "Seleccionada a revisión de '''$1:'''", |
| 4986 | + 'revreview-selected' => "Revisión seleccionada de \"'''\$1'''\":", |
4964 | 4987 | 'revreview-source' => 'Ver o código fonte', |
4965 | 4988 | 'revreview-stable' => 'Páxina publicada', |
4966 | 4989 | 'revreview-basic-title' => 'Esta é unha versión comprobada desta páxina', |
— | — | @@ -5984,8 +6007,10 @@ |
5985 | 6008 | 'revreview-diff-toggle-title' => 'Zwobraznjenje nječinjenych změnow wozjewjeneje wersije přepinyć', |
5986 | 6009 | 'revreview-log-toggle-show' => 'protokol stabilnosće pokazać', |
5987 | 6010 | 'revreview-log-toggle-hide' => 'protokol stabilnosće schować', |
| 6011 | + 'revreview-log-toggle-title' => 'Zwobraznjenje protokola nastajenjow stabilnosće přepinyć', |
5988 | 6012 | 'revreview-log-details-show' => 'podrobnosće pokazać', |
5989 | 6013 | 'revreview-log-details-hide' => 'podrobnosće schować', |
| 6014 | + 'revreview-log-details-title' => 'Zwobraznjenje protokola nastajenjow stabilnosće přepinyć', |
5990 | 6015 | 'review-diff2stable' => 'Nječinjene změny wozjewjeneje wersije wobhladać', |
5991 | 6016 | 'review-logentry-app' => 'je wersiju wot [[$1]] přepruwował', |
5992 | 6017 | 'review-logentry-dis' => 'je wersiju wot [[$1]] wothódnoćił', |
— | — | @@ -6324,7 +6349,7 @@ |
6325 | 6350 | 'revreview-successful2' => "'''A(z) [[:$1|$1]] változatáról sikeresen eltávolítottad a jelölést.'''", |
6326 | 6351 | 'revreview-text' => "''Az [[{{MediaWiki:Validationpage}}|ellenőrzött változatok]] olyan átnézett lapok, amiken a közzétett változat alapul.''", |
6327 | 6352 | 'revreview-toggle-title' => 'részletek megjelenítése/elrejtése', |
6328 | | - 'revreview-toolow' => "'''Ahhoz, hogy egy változat ellenőrzöttnek tekinthető legyen, minden alábbi tulajdonságot magasabbra kell értékelned a „nem ellenőrzött szintnél.''' |
| 6353 | + 'revreview-toolow' => "'''Ahhoz, hogy egy változat ellenőrzöttnek tekinthető legyen, minden tulajdonságot magasabbra kell értékelned a „nem ellenőrzött” szintnél.''' |
6329 | 6354 | Nem ellenőrzöttnek való visszaminősítéshez állítsd az összes mezőt „nem ellenőrzött” értékre. |
6330 | 6355 | |
6331 | 6356 | Kattints a böngésződ „Vissza” gombjára, majd próbáld újra.", |
— | — | @@ -6358,7 +6383,7 @@ |
6359 | 6384 | 'revreview-statusfilter' => 'Állapot változtatás:', |
6360 | 6385 | 'revreview-filter-approved' => 'ellenőrzött', |
6361 | 6386 | 'revreview-filter-reapproved' => 'újraellenőrzött', |
6362 | | - 'revreview-filter-unapproved' => 'ellenőrizetlen', |
| 6387 | + 'revreview-filter-unapproved' => 'ellenőrizetlennek jelölt', |
6363 | 6388 | 'revreview-typefilter' => 'Típus:', |
6364 | 6389 | 'revreview-filter-auto' => 'automatikus', |
6365 | 6390 | 'revreview-filter-manual' => 'kézi', |
— | — | @@ -6377,10 +6402,11 @@ |
6378 | 6403 | 'revreview-restriction-none' => 'egyik sem', |
6379 | 6404 | 'revreview-reviewlink' => 'ellenőrzésre váró szerkesztések', |
6380 | 6405 | 'revreview-reviewlink-title' => 'Változások az összes ellenőrzésre váró szerkesztést figyelembe véve', |
| 6406 | + 'revreview-unreviewedpage' => 'ellenőrizetlen lap', |
6381 | 6407 | 'tooltip-ca-current' => 'Lap megjelenítése az ellenőrzésre váró változtatásokkal együtt', |
6382 | 6408 | 'tooltip-ca-stable' => 'A lap közzétett változatának megjelenítése', |
6383 | 6409 | 'tooltip-ca-default' => 'Minőségbiztosítási beállítások', |
6384 | | - 'flaggedrevs-protect-legend' => 'Szerkesztések közzététele', |
| 6410 | + 'flaggedrevs-protect-legend' => 'Szerkesztések közzététele ([[{{MediaWiki:Validationpage}}|?]])', |
6385 | 6411 | 'flaggedrevs-protect-none' => 'Összes felhasználó engedélyezése', |
6386 | 6412 | 'flaggedrevs-protect-basic' => 'Alapértelmezett beállítások', |
6387 | 6413 | 'revreview-locked-title' => 'A szerkesztéseket ellenőrizni kell, mielőtt megjelennének ezen a lapon.', |
— | — | @@ -6443,8 +6469,10 @@ |
6444 | 6470 | 'revreview-diff-toggle-title' => 'Alternar le presentation de modificationes pendente del version publicate', |
6445 | 6471 | 'revreview-log-toggle-show' => 'monstrar registro de stabilitate', |
6446 | 6472 | 'revreview-log-toggle-hide' => 'celar registro de stabilitate', |
| 6473 | + 'revreview-log-toggle-title' => 'Alternar le presentation del registro de configurationes de stabilitate', |
6447 | 6474 | 'revreview-log-details-show' => 'monstrar detalios', |
6448 | 6475 | 'revreview-log-details-hide' => 'celar detalios', |
| 6476 | + 'revreview-log-details-title' => 'Alternar le presentation del registro de configurationes de stabilitate', |
6449 | 6477 | 'review-diff2stable' => 'Vider modificationes pendente al version publicate', |
6450 | 6478 | 'review-logentry-app' => 'revideva un version de [[$1]]', |
6451 | 6479 | 'review-logentry-dis' => 'depreciava un version de [[$1]]', |
— | — | @@ -7067,8 +7095,10 @@ |
7068 | 7096 | 'revreview-diff-toggle-title' => '採用候補と公開中の版の間の変更の表示を切り替える', |
7069 | 7097 | 'revreview-log-toggle-show' => '安定版のログを表示', |
7070 | 7098 | 'revreview-log-toggle-hide' => '安定版のログを隠す', |
| 7099 | + 'revreview-log-toggle-title' => '安定版の設定ログの表示を切り替える', |
7071 | 7100 | 'revreview-log-details-show' => '詳細を表示', |
7072 | 7101 | 'revreview-log-details-hide' => '詳細を非表示', |
| 7102 | + 'revreview-log-details-title' => '安定版の設定ログの表示を切り替える', |
7073 | 7103 | 'review-diff2stable' => '査読待ちの変更点をすべて見る', |
7074 | 7104 | 'review-logentry-app' => '[[$1]] の特定版を査読承認', |
7075 | 7105 | 'review-logentry-dis' => '[[$1]] の特定版を棄却', |
— | — | @@ -8618,8 +8648,10 @@ |
8619 | 8649 | 'revreview-diff-toggle-title' => 'Префлување од приказ на промените во исчекување на објавената верзија', |
8620 | 8650 | 'revreview-log-toggle-show' => 'прикажи дневник на стабилизација', |
8621 | 8651 | 'revreview-log-toggle-hide' => 'сокриј дневник на стабилност', |
| 8652 | + 'revreview-log-toggle-title' => 'Превклучување на приказ на дневник на поставки за стабилност', |
8622 | 8653 | 'revreview-log-details-show' => 'покажи подробности', |
8623 | 8654 | 'revreview-log-details-hide' => 'сокриј подробности', |
| 8655 | + 'revreview-log-details-title' => 'Превклучување на приказ на дневник на поставки за стабилност', |
8624 | 8656 | 'review-diff2stable' => 'Покажи и сите промени во исчекување', |
8625 | 8657 | 'review-logentry-app' => 'оценета верзија на [[$1]]', |
8626 | 8658 | 'review-logentry-dis' => 'означи како застарена верзија на [[$1]]', |
— | — | @@ -8819,7 +8851,7 @@ |
8820 | 8852 | 'prefs-flaggedrevs' => 'തിരുത്തൽ അംഗീകരണം', |
8821 | 8853 | 'prefs-flaggedrevs-ui' => 'തിരുത്തൽ അംഗീകരണം', |
8822 | 8854 | 'flaggedrevs-prefs-stable' => 'ഉള്ളടക്ക താളിന്റെ പ്രസിദ്ധപ്പെടുത്തിയ പതിപ്പ് എപ്പോഴും സ്വതവേ പ്രദർശിപ്പിക്കുക (ഒന്നുണ്ടെങ്കിൽ)', |
8823 | | - 'flaggedrevs-prefs-watch' => 'ഞാൻ സംശോധം ചെയ്യുന്ന താളുകൾ എന്റെ ശ്രദ്ധിക്കുന്ന താളുകളുടെ പട്ടികയിലേക്ക് ചേർക്കുക', |
| 8855 | + 'flaggedrevs-prefs-watch' => 'ഞാൻ സംശോധം ചെയ്യുന്ന താളുകൾ ശ്രദ്ധിക്കുന്ന താളുകളുടെ പട്ടികയിലേക്ക് ചേർക്കുക', |
8824 | 8856 | 'flaggedrevs-prefs-editdiffs' => 'താളുകൾ തിരുത്തുമ്പോൾ അവശേഷിക്കുന്ന വ്യത്യാസങ്ങൾ പ്രദർശിപ്പിക്കുക', |
8825 | 8857 | 'flaggedrevs-prefs-viewdiffs' => 'സംശോധനം പ്രതീക്ഷിക്കുന്ന ഏറ്റവും പുതിയ നാൾപ്പതിപ്പുകൾ എടുത്തുനോക്കുമ്പോൾ അവശേഷിക്കുന്ന മാറ്റങ്ങളുമായുള്ള വ്യത്യാസം പ്രദർശിപ്പിക്കുക', |
8826 | 8858 | 'group-editor' => 'എഡിറ്റർമാർ', |
— | — | @@ -9456,8 +9488,10 @@ |
9457 | 9489 | 'revreview-diff-toggle-title' => 'Weergevave van verschillen met de gepubliceerde versie weergeven of verbergen', |
9458 | 9490 | 'revreview-log-toggle-show' => 'stabiliteitslogboek weergeven', |
9459 | 9491 | 'revreview-log-toggle-hide' => 'stabiliteitslogboek verbergen', |
| 9492 | + 'revreview-log-toggle-title' => 'Weergave van stabiliteitsinstellingenlogboek in- of uitschakelen', |
9460 | 9493 | 'revreview-log-details-show' => 'details weergeven', |
9461 | 9494 | 'revreview-log-details-hide' => 'details verbergen', |
| 9495 | + 'revreview-log-details-title' => 'Weergave van stabiliteitsinstellingenlogboek in- of uitschakelen', |
9462 | 9496 | 'review-diff2stable' => 'Ongecontroleerde verschillen met de gepubliceerde versie bekijken', |
9463 | 9497 | 'review-logentry-app' => 'heeft een versie van [[$1]] gecontroleerd', |
9464 | 9498 | 'review-logentry-dis' => 'heeft een versie van [[$1]] ongeldig gemaakt', |
— | — | @@ -10755,8 +10789,10 @@ |
10756 | 10790 | 'revreview-depth-1' => 'بنسټيز', |
10757 | 10791 | 'revreview-depth-2' => 'منځوی', |
10758 | 10792 | 'revreview-depth-3' => 'لوړ', |
10759 | | - 'revreview-source' => 'د ګارليک سرچينه', |
| 10793 | + 'revreview-source' => 'سرچينه کتل', |
10760 | 10794 | 'revreview-style-1' => 'د منلو وړ', |
| 10795 | + 'revreview-submit' => 'سپارل', |
| 10796 | + 'revreview-submitting' => 'د سپارلو په حال کې ...', |
10761 | 10797 | 'revreview-filter-all' => 'ټول', |
10762 | 10798 | 'revreview-statusfilter' => 'د دريځ بدلون:', |
10763 | 10799 | 'revreview-reviewlink' => 'مخليدنه', |
— | — | @@ -10813,8 +10849,10 @@ |
10814 | 10850 | 'revreview-diff-toggle-title' => 'Alternar entre a apresentação das alterações pendentes e da versão publicada', |
10815 | 10851 | 'revreview-log-toggle-show' => 'mostrar registo de estabilidade', |
10816 | 10852 | 'revreview-log-toggle-hide' => 'esconder registo de estabilidade', |
| 10853 | + 'revreview-log-toggle-title' => 'Alternar a apresentação do registo das configurações de estabilidade', |
10817 | 10854 | 'revreview-log-details-show' => 'mostrar detalhes', |
10818 | 10855 | 'revreview-log-details-hide' => 'esconder detalhes', |
| 10856 | + 'revreview-log-details-title' => 'Alternar a apresentação do registo das configurações de estabilidade', |
10819 | 10857 | 'review-diff2stable' => 'Ver alterações pendentes à versão publicada', |
10820 | 10858 | 'review-logentry-app' => 'reviu uma versão de [[$1]]', |
10821 | 10859 | 'review-logentry-dis' => 'reprovou uma versão da página [[$1]]', |
— | — | @@ -11109,43 +11147,43 @@ |
11110 | 11148 | 'prefs-flaggedrevs-ui' => 'Revizie marcată', |
11111 | 11149 | 'group-editor' => 'Editori', |
11112 | 11150 | 'group-editor-member' => 'editor', |
11113 | | - 'group-reviewer' => 'Recenzenţi', |
| 11151 | + 'group-reviewer' => 'Recenzenți', |
11114 | 11152 | 'group-reviewer-member' => 'recenzent', |
11115 | 11153 | 'grouppage-editor' => '{{ns:project}}:Editor', |
11116 | 11154 | 'grouppage-reviewer' => '{{ns:project}}:Recenzent', |
11117 | | - 'group-autoreview' => 'Autorecenzenţi', |
| 11155 | + 'group-autoreview' => 'Autorecenzenți', |
11118 | 11156 | 'group-autoreview-member' => 'autorecenzent', |
11119 | 11157 | 'grouppage-autoreview' => '{{ns:project}}:Autorecenzent', |
11120 | | - 'revreview-hist-draft' => 'revizie-schiţă', |
| 11158 | + 'revreview-hist-draft' => 'revizie-schiță', |
11121 | 11159 | 'revreview-hist-quality' => 'revizie de calitate', |
11122 | 11160 | 'revreview-hist-basic' => 'revizie observată', |
11123 | | - 'revreview-diff-toggle-title' => 'Toggle afişează modificări până la versiunea curentă.', |
11124 | | - 'review-diff2stable' => 'Vedeţi schimbări între reviziile stabile şi curente', |
| 11161 | + 'revreview-diff-toggle-title' => 'Toggle afișează modificări până la versiunea curentă.', |
| 11162 | + 'review-diff2stable' => 'Vedeți schimbări între reviziile stabile și curente', |
11125 | 11163 | 'review-logentry-id' => 'vezi: $2', |
11126 | 11164 | 'review-logpage' => 'Jurnal de revizualizări', |
11127 | | - 'revreview-accuracy' => 'Acurateţe', |
| 11165 | + 'revreview-accuracy' => 'Acuratețe', |
11128 | 11166 | 'revreview-accuracy-0' => 'Neaprobat', |
11129 | 11167 | 'revreview-accuracy-1' => 'Văzut', |
11130 | 11168 | 'revreview-accuracy-2' => 'Exact', |
11131 | | - 'revreview-accuracy-3' => 'Bine referenţiat', |
| 11169 | + 'revreview-accuracy-3' => 'Bine referențiat', |
11132 | 11170 | 'revreview-accuracy-4' => 'Remarcabil', |
11133 | 11171 | 'revreview-approved' => 'Aprobat', |
11134 | 11172 | 'revreview-auto' => '(automat)', |
11135 | | - 'revreview-current' => 'Schiţă', |
| 11173 | + 'revreview-current' => 'Schiță', |
11136 | 11174 | 'revreview-depth' => 'Profunzime', |
11137 | 11175 | 'revreview-depth-0' => 'Neaprobat', |
11138 | 11176 | 'revreview-depth-1' => 'De bază', |
11139 | 11177 | 'revreview-depth-2' => 'Moderat', |
11140 | 11178 | 'revreview-depth-3' => 'Înalt', |
11141 | 11179 | 'revreview-depth-4' => 'Remarcabil', |
11142 | | - 'revreview-draft-title' => 'Pagină schiţă', |
11143 | | - 'revreview-edit' => 'Editează schiţa', |
11144 | | - 'revreview-flag' => 'Revizuieşte această revizie', |
11145 | | - 'revreview-legend' => 'Conţinut rată de revizie', |
| 11180 | + 'revreview-draft-title' => 'Pagină schiță', |
| 11181 | + 'revreview-edit' => 'Editează schița', |
| 11182 | + 'revreview-flag' => 'Revizuiește această revizie', |
| 11183 | + 'revreview-legend' => 'Conținut rată de revizie', |
11146 | 11184 | 'revreview-log' => 'Comentariu:', |
11147 | 11185 | 'revreview-oldrating' => 'A fost evaluat:', |
11148 | 11186 | 'revreview-quality-title' => 'Pagină de calitate', |
11149 | | - 'revreview-source' => 'Sursa schiţei', |
| 11187 | + 'revreview-source' => 'Sursa schiței', |
11150 | 11188 | 'revreview-stable' => 'Pagină stabilă', |
11151 | 11189 | 'revreview-style' => 'Lizibilitate', |
11152 | 11190 | 'revreview-style-0' => 'Neaprobat', |
— | — | @@ -11156,7 +11194,7 @@ |
11157 | 11195 | 'revreview-submit' => 'Trimite', |
11158 | 11196 | 'revreview-submitting' => 'Trimit ...', |
11159 | 11197 | 'revreview-toggle-title' => 'arată/ascunde detalii', |
11160 | | - 'revreview-revnotfound' => 'Versiunea mai veche a paginii pe care aţi cerut-o nu a fost găsită. Vă rugăm să verificaţi legătura pe care aţi folosit-o pentru a accesa această pagină.', |
| 11198 | + 'revreview-revnotfound' => 'Versiunea mai veche a paginii pe care ați cerut-o nu a fost găsită. Vă rugăm să verificați legătura pe care ați folosit-o pentru a accesa această pagină.', |
11161 | 11199 | 'rights-editor-autosum' => 'autopromovat', |
11162 | 11200 | 'specialpages-group-quality' => 'Asigurare calitate', |
11163 | 11201 | 'stable-logpage' => 'Jurnal de versiuni stabile', |
— | — | @@ -11175,14 +11213,14 @@ |
11176 | 11214 | 'revreview-lev-quality' => 'calitate', |
11177 | 11215 | 'revreview-lev-pristine' => 'primitiv', |
11178 | 11216 | 'revreview-reviewlink' => 'revizie', |
11179 | | - 'tooltip-ca-current' => 'Vedeţi schiţa curentă a acestei pagini', |
11180 | | - 'tooltip-ca-stable' => 'Vedeţi versiunea stabilă a acestei pagini', |
| 11217 | + 'tooltip-ca-current' => 'Vedeți schița curentă a acestei pagini', |
| 11218 | + 'tooltip-ca-stable' => 'Vedeți versiunea stabilă a acestei pagini', |
11181 | 11219 | 'tooltip-ca-default' => 'Setările asigurării de calitate', |
11182 | | - 'flaggedrevs-protect-legend' => 'Publicaţi editările', |
11183 | | - 'flaggedrevs-protect-none' => 'Permiteţi tuturor utilizatorilor', |
| 11220 | + 'flaggedrevs-protect-legend' => 'Publicați editările', |
| 11221 | + 'flaggedrevs-protect-none' => 'Permiteți tuturor utilizatorilor', |
11184 | 11222 | 'flaggedrevs-protect-basic' => 'Setări implicite', |
11185 | 11223 | 'log-show-hide-review' => 'jurnal de revizualizare $1', |
11186 | | - 'revreview-tt-review' => 'Revizuieşte această pagină', |
| 11224 | + 'revreview-tt-review' => 'Revizuiește această pagină', |
11187 | 11225 | 'validationpage' => '{{ns:help}}:Validare pagină', |
11188 | 11226 | ); |
11189 | 11227 | |
— | — | @@ -11455,8 +11493,10 @@ |
11456 | 11494 | 'revreview-diff-toggle-title' => 'Переключить отображение непроверенных изменений к опубликованной версии', |
11457 | 11495 | 'revreview-log-toggle-show' => 'показать журнал стабилизации', |
11458 | 11496 | 'revreview-log-toggle-hide' => 'скрыть журнал стабильности', |
| 11497 | + 'revreview-log-toggle-title' => 'Включить отображение журнала настроек стабилизации', |
11459 | 11498 | 'revreview-log-details-show' => 'показать подробности', |
11460 | 11499 | 'revreview-log-details-hide' => 'скрыть подробности', |
| 11500 | + 'revreview-log-details-title' => 'Включить отображение журнала настроек стабилизации', |
11461 | 11501 | 'review-diff2stable' => 'Показывать непроверенные изменения опубликованной версии', |
11462 | 11502 | 'review-logentry-app' => 'проверил версию [[$1]]', |
11463 | 11503 | 'review-logentry-dis' => 'отметил устаревшую версию [[$1]]', |
— | — | @@ -12084,11 +12124,11 @@ |
12085 | 12125 | 'revreview-style-3' => 'Jedrnato', |
12086 | 12126 | 'revreview-style-4' => 'Izbrano', |
12087 | 12127 | 'revreview-submit' => 'Potrdi', |
12088 | | - 'revreview-submit-review' => 'Označi kot preverjeno', |
12089 | | - 'revreview-submit-unreview' => 'Označi kot nepreverjeno', |
| 12128 | + 'revreview-submit-review' => 'Potrdi', |
| 12129 | + 'revreview-submit-unreview' => 'Od-potrdi', |
12090 | 12130 | 'revreview-submitting' => 'Potrjevanje ...', |
12091 | | - 'revreview-submit-reviewed' => 'Končano. Preverjeno!', |
12092 | | - 'revreview-submit-unreviewed' => 'Končano. Nepreverjeno!', |
| 12131 | + 'revreview-submit-reviewed' => 'Končano. Potrjeno!', |
| 12132 | + 'revreview-submit-unreviewed' => 'Končano. Od-potrjeno!', |
12093 | 12133 | 'revreview-toggle-title' => 'prikaži/skrij podrobnosti', |
12094 | 12134 | 'revreview-revnotfound' => 'Redakcije strani, ki ste jo poskušali pridobiti, ni mogoče najti. Prosimo, preverite spletni naslov, ki ste ga uporabili za dostop do strani.', |
12095 | 12135 | 'log-show-hide-review' => '$1 dnevnik pregledov', |
— | — | @@ -12500,7 +12540,9 @@ |
12501 | 12541 | 'revreview-hist-basic-auto' => '[{{fullurl:$1|stableis=$2}} automatiskt synad]', |
12502 | 12542 | 'revreview-diff-toggle-show' => '(visa ändringar)', |
12503 | 12543 | 'revreview-diff-toggle-hide' => '(dölj ändringar)', |
12504 | | - 'revreview-log-details-show' => '(visa detaljer)', |
| 12544 | + 'revreview-log-toggle-show' => 'visa stabilitetslogg', |
| 12545 | + 'revreview-log-toggle-hide' => 'dölj stabilitetslogg', |
| 12546 | + 'revreview-log-details-show' => 'visa detaljer', |
12505 | 12547 | 'revreview-log-details-hide' => 'dölj detaljer', |
12506 | 12548 | 'review-diff2stable' => 'Visa ändringar mellan den stabila och den senaste versionen', |
12507 | 12549 | 'review-logentry-app' => 'granskat en version av [[$1]]', |
— | — | @@ -12595,7 +12637,9 @@ |
12596 | 12638 | 'revreview-style-3' => 'Koncis', |
12597 | 12639 | 'revreview-style-4' => 'Utmärkt', |
12598 | 12640 | 'revreview-submit' => 'Spara', |
| 12641 | + 'revreview-submit-review' => 'Godkänn', |
12599 | 12642 | 'revreview-submitting' => 'Levererar...', |
| 12643 | + 'revreview-submit-reviewed' => 'Klar. Godkänd!', |
12600 | 12644 | 'revreview-successful' => "'''Vald sidversion av [[:$1|$1]] har flaggats. ([{{fullurl:{{#Special:ReviewedVersions}}|page=$2}} visa alla stabila sidversioner])'''", |
12601 | 12645 | 'revreview-successful2' => "'''Vald sidversion av [[:$1|$1]] har avflaggats.'''", |
12602 | 12646 | 'revreview-text' => "''[[{{MediaWiki:Validationpage}}|Stabila versioner]] är standardinnehåll i sidor i stället för den nyaste sidversionen.''", |
— | — | @@ -12610,20 +12654,20 @@ |
12611 | 12655 | 'revreview-visibility3' => "'''Den här sidan har inte en [[{{MediaWiki:Validationpage}}|stabil version]]; inställningarna för sidstabilitet kan [{{fullurl:{{#Special:Stabilization}}|page={{FULLPAGENAMEE}}}} konfigureras].'''", |
12612 | 12656 | 'revreview-revnotfound' => 'Den gamla versionen av den sida du frågade efter kan inte hittas. Kontrollera den URL du använde för att nå den här sidan.', |
12613 | 12657 | 'right-autoreview' => 'Automatiskt märka sidversioner som synade', |
12614 | | - 'right-movestable' => 'Flytta stabila sidor', |
| 12658 | + 'right-movestable' => 'Flytta publicerade sidor', |
12615 | 12659 | 'right-review' => 'Markera sidversioner som synade', |
12616 | | - 'right-stablesettings' => 'Ställa in hur stabila versioner väljs och visas', |
| 12660 | + 'right-stablesettings' => 'Ställa in hur den publicerade versionen väljs och visas', |
12617 | 12661 | 'right-validate' => 'Markera sidversioner som validerade', |
12618 | 12662 | 'right-unreviewedpages' => 'Visa [[Special:UnreviewedPages|lista över ogranskade sidor]]', |
12619 | 12663 | 'rights-editor-autosum' => 'autobefodring', |
12620 | 12664 | 'rights-editor-revoke' => 'tog bort redaktörsstatus från [[$1]]', |
12621 | 12665 | 'specialpages-group-quality' => 'Kvalitetsförsäkring', |
12622 | | - 'stable-logentry-config' => 'ändrade inställningar för stabila versioner av [[$1]]', |
12623 | | - 'stable-logentry-reset' => 'återställde inställningar för stabila versioner av [[$1]]', |
| 12666 | + 'stable-logentry-config' => 'konfigurera publikationsinställningar för [[$1]]', |
| 12667 | + 'stable-logentry-reset' => 'återställ publikationsinställningar för [[$1]]', |
12624 | 12668 | 'stable-logpage' => 'Versionsstabiliseringslogg', |
12625 | 12669 | 'stable-logpagetext' => 'Det här är en logg över ändringar av inställningar för [[{{MediaWiki:Validationpage}}|stabila versioner]] av innehållssidor.', |
12626 | 12670 | 'revreview-filter-all' => 'Alla', |
12627 | | - 'revreview-filter-stable' => 'stabil', |
| 12671 | + 'revreview-filter-stable' => 'publicerad', |
12628 | 12672 | 'revreview-statusfilter' => 'Ändring av status:', |
12629 | 12673 | 'revreview-filter-approved' => 'Godkända', |
12630 | 12674 | 'revreview-filter-reapproved' => 'Åter godkända', |
— | — | @@ -12636,12 +12680,16 @@ |
12637 | 12681 | 'revreview-lev-basic' => 'synad', |
12638 | 12682 | 'revreview-lev-quality' => 'kvalitet', |
12639 | 12683 | 'revreview-lev-pristine' => 'orörd', |
| 12684 | + 'revreview-defaultfilter' => 'Standardversion:', |
12640 | 12685 | 'revreview-def-draft' => 'senaste', |
| 12686 | + 'revreview-def-stable' => 'publicerad', |
12641 | 12687 | 'revreview-restriction-none' => 'ingen', |
12642 | 12688 | 'revreview-reviewlink' => 'granska', |
| 12689 | + 'revreview-unreviewedpage' => 'ej kontrollerad sida', |
12643 | 12690 | 'tooltip-ca-current' => 'Visa det senaste utkastet för denna sida', |
12644 | 12691 | 'tooltip-ca-stable' => 'Visa den publicerade versionen av denna sida', |
12645 | 12692 | 'tooltip-ca-default' => 'Inställningar för kvalitetssäkring', |
| 12693 | + 'flaggedrevs-protect-none' => 'Tillåt alla användare', |
12646 | 12694 | 'flaggedrevs-protect-basic' => 'Standardinställning', |
12647 | 12695 | 'revreview-locked-title' => 'Redigeringar måste granskas innan de visas på den här sidan!', |
12648 | 12696 | 'revreview-unlocked-title' => 'Redigeringar behöver inte granskas innan de visas på den här sidan!', |
— | — | @@ -13448,8 +13496,10 @@ |
13449 | 13497 | 'revreview-diff-toggle-title' => 'Yayımlanmış sürüme bekleyen değişikliklerin görüntülenmesini değiştir', |
13450 | 13498 | 'revreview-log-toggle-show' => 'kararlılık günlüğünü göster', |
13451 | 13499 | 'revreview-log-toggle-hide' => 'kararlılık günlüğünü gizle', |
| 13500 | + 'revreview-log-toggle-title' => 'Kararlılık ayarları günlüğünün görünümünü değiştir', |
13452 | 13501 | 'revreview-log-details-show' => 'ayrıntıları göster', |
13453 | 13502 | 'revreview-log-details-hide' => 'detayları gizle', |
| 13503 | + 'revreview-log-details-title' => 'Kararlılık ayarları günlüğünün görünümünü değiştir', |
13454 | 13504 | 'review-diff2stable' => 'Yayımlanmış sürüme bekleyen değişiklikleri göster', |
13455 | 13505 | 'review-logentry-app' => '[[$1]] sayfasının bir sürümü incelendi', |
13456 | 13506 | 'review-logentry-dis' => '[[$1]] sayfasının bir sürümü onaylanmadı', |
— | — | @@ -13469,9 +13519,9 @@ |
13470 | 13520 | 'revreview-approved' => 'Onaylı', |
13471 | 13521 | 'revreview-auto' => '(otomatik)', |
13472 | 13522 | 'revreview-basic' => 'Bu [[{{MediaWiki:Validationpage}}|yayımlanmış sürümdür]], <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} kontrol edilmiştir]. |
13473 | | -[{{fullurl:{{FULLPAGENAMEE}}|stable=0}} Taslak] [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 bekleyen {{PLURAL:$3|değişiklik|değişiklik}}] içermektedir.', |
| 13523 | +Gözden geçirme bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 {{PLURAL:$3|değişiklik|değişiklik}}] bulunmaktadır.', |
13474 | 13524 | 'revreview-basic-i' => 'Bu [[{{MediaWiki:Validationpage}}|yayımlanmış]] sürümdür, <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} kontrol edilmiştir]. |
13475 | | -[{{fullurl:{{FULLPAGENAMEE}}|stable=0}} Taslak] gözden geçirilmeyi bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} şablon/dosya değişikliği] içermektedir.', |
| 13525 | +Gözden geçirilmeyi bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} şablon/dosya değişiklikleri] bulunmaktadır.', |
13476 | 13526 | 'revreview-basic-old' => 'Bu bir [[{{MediaWiki:Validationpage}}|kontrol edilmiş]] revizyondur ([{{fullurl:{{#Special:ReviewedVersions}}|page={{FULLPAGENAMEE}}}} hepsini listele]), <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylanmıştır]. |
13477 | 13527 | Yeni [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} değişiklikler] yapılmış olabilir.', |
13478 | 13528 | 'revreview-basic-same' => 'Bu en son [[{{MediaWiki:Validationpage}}|yayımlanmış sürümdür]], <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} kontrol edilmiştir].', |
— | — | @@ -13491,10 +13541,11 @@ |
13492 | 13542 | 'revreview-depth-4' => 'Özellikli', |
13493 | 13543 | 'revreview-draft-title' => 'Bekleyen değişiklikler bu sayfada görünür', |
13494 | 13544 | 'revreview-edit' => 'Değiştir', |
13495 | | - 'revreview-editnotice' => "'''Değişiklikleriniz, yetkili bir kullanıcı [[{{MediaWiki:Validationpage}}|inceledikten]] sonra [[{{MediaWiki:Validationpage}}|yayınlanacak]].'''", |
| 13545 | + 'revreview-editnotice' => "'''Değişiklikleriniz, yetkili bir kullanıcı inceledikten sonra yayınlanacak. ([[{{MediaWiki:Validationpage}}|?]])'''", |
13496 | 13546 | 'revreview-check-flag' => 'Şuanda bekleyen değişiklikleri yayınla', |
13497 | | - 'revreview-edited' => "'''Değişiklikler, yetkili bir kullanıcı [[{{MediaWiki:Validationpage}}|inceledikten]] sonra [[{{MediaWiki:Validationpage}}|yayınlanacak]].''' |
13498 | | -Aşağıda gösterilen ''taslak'', önerilmiş [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $2 {{PLURAL:$2|değişikliği|değişikliği}}] içermektedir.", |
| 13547 | + 'revreview-edited' => "'''Değişiklikler, yetkili bir kullanıcı inceledikten sonra yayınlanacak. ([[{{MediaWiki:Validationpage}}|?]])''' |
| 13548 | + |
| 13549 | +Gözden geçirme bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $2 {{PLURAL:$2|değişiklik|değişiklik}}] ''(aşağıda gösterilen)'' bulunmaktadır.", |
13499 | 13550 | 'revreview-edited-section' => '"[[#$1|$2]]" adındaki sayfa bölümüne geri dön.', |
13500 | 13551 | 'revreview-flag' => 'Bu revizyonu gözden geçir', |
13501 | 13552 | 'revreview-reflag' => 'Bu revizyonu tekrar gözden geçir', |
— | — | @@ -13504,25 +13555,23 @@ |
13505 | 13556 | 'revreview-main' => 'Gözden geçirmek için, içerik sayfasından belirli bir revizyon seçmelisiniz. |
13506 | 13557 | |
13507 | 13558 | [[Special:Unreviewedpages|Gözden geçirilmemiş sayfalar listesine]] göz atın.', |
13508 | | - 'revreview-newest-basic' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} kontrol edilmiş]. |
13509 | | -Taslak [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 bekleyen {{PLURAL:$3|değişiklik|değişiklik}}] içeriyor.', |
13510 | | - 'revreview-newest-basic-i' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} kontrol edilmiş]. |
13511 | | -Taslak gözden geçirilmeyi bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} Şablon/dosya değişiklikleri] içeriyor.', |
13512 | | - 'revreview-newest-quality' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylanmış]. Taslak |
13513 | | -[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 bekleyen {{PLURAL:$3|değişiklik|değişiklik}}] içeriyor.', |
13514 | | - 'revreview-newest-quality-i' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylanmış]. Taslak gözden geçirilmeyi bekleyen |
13515 | | -[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} şablon/dosya değişikliği] içeriyor.', |
13516 | | - 'revreview-pending-basic' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} kontrol edilmiş]. [{{fullurl:{{FULLPAGENAMEE}}|stable=0}} Taslak] [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 bekleyen {{PLURAL:$3|değişiklik|değişiklik}}] içeriyor.', |
13517 | | - 'revreview-pending-quality' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylanmış]. [{{fullurl:{{FULLPAGENAMEE}}|stable=0}} Taslak] [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 bekleyen {{PLURAL:$3|değişiklik|değişiklik}}] içeriyor.', |
13518 | | - 'revreview-pending-nosection' => 'Bölümün taşındığını veya silindiğini görmek için [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $2 bekleyen {{PLURAL:$2|değişiklik|değişiklik}}] içeren [{{fullurl:{{FULLPAGENAMEE}}|stable=0}} taslağı] görüntülemeyi deneyin.', |
| 13559 | + 'revreview-newest-basic' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} kontrol edilmiş]. Gözden geçirme bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 {{PLURAL:$3|değişiklik|değişiklik}}] bulunmaktadır.', |
| 13560 | + 'revreview-newest-basic-i' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} kontrol edilmiş]. Gözden geçirilmeyi bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} şablon/dosya değişiklikleri] bulunmaktadır.', |
| 13561 | + 'revreview-newest-quality' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylanmış]. Gözden geçirmeyi bekleyen |
| 13562 | +[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 {{PLURAL:$3|değişiklik|değişiklik}}] bulunmaktadır.', |
| 13563 | + 'revreview-newest-quality-i' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylanmış]. Gözden geçirilmeyi bekleyen |
| 13564 | +[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} şablon/dosya değişiklikleri] bulunmaktadır.', |
| 13565 | + 'revreview-pending-basic' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} kontrol edilmiş]. Gözden geçirilmeyi bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 {{PLURAL:$3|değişiklik|değişiklik}}] bulunmaktadır.', |
| 13566 | + 'revreview-pending-quality' => '[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} Yayımlanmış sürüm] <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylanmış]. Gözden geçirilmeyi bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 {{PLURAL:$3|değişiklik|değişiklik}}] bulunmaktadır.', |
| 13567 | + 'revreview-pending-nosection' => 'Bölümün taşındığını veya silindiğini görmek için [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $2 bekleyen {{PLURAL:$2|değişiklik|değişiklik}}] içeren [{{fullurl:{{FULLPAGENAMEE}}|stable=0}} en son revizyonu] görüntülemeyi deneyin.', |
13519 | 13568 | 'revreview-noflagged' => "Bu sayfanın hiç [[{{MediaWiki:Validationpage}}|gözden geçirilmiş]] revizyonu yok, bu yüzden kalite için [[{{MediaWiki:Validationpage}}|'''denetlenmemiş''']] olabilir.", |
13520 | 13569 | 'revreview-note' => '[[User:$1|$1]] bu revizyonu [[{{MediaWiki:Validationpage}}|gözden geçirerek]] şu notu bıraktı:', |
13521 | 13570 | 'revreview-notes' => 'Görüntülenecek gözlem ve notlar:', |
13522 | 13571 | 'revreview-oldrating' => 'Derecelendirme:', |
13523 | 13572 | 'revreview-quality' => 'Bu, <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylanan] [[{{MediaWiki:Validationpage}}|yayımlanmış sürümdür]]. |
13524 | | -[{{fullurl:{{FULLPAGENAMEE}}|stable=0}} Taslak], incelenmeyi bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 bekleyen {{PLURAL:$3|değişiklik|değişiklik}}] içermektedir.', |
| 13573 | +İncelenmeyi bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3 {{PLURAL:$3|değişiklik|değişiklik}}] bulunmaktadır.', |
13525 | 13574 | 'revreview-quality-i' => 'Bu, <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylanan] [[{{MediaWiki:Validationpage}}|yayımlanmış sürümdür]]. |
13526 | | -[{{fullurl:{{FULLPAGENAMEE}}|stable=0}} Taslak], incelenmeyi bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} şablon/dosya değişikliklerine] sahiptir.', |
| 13575 | +İncelenmeyi bekleyen [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} şablon/dosya değişiklikleri] bulunmaktadır.', |
13527 | 13576 | 'revreview-quality-old' => 'Bu bir [[{{MediaWiki:Validationpage}}|kaliteli]] revizyondur ([{{fullurl:{{#Special:ReviewedVersions}}|page={{FULLPAGENAMEE}}}} hepsini listele]), <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylanmıştır]. |
13528 | 13577 | Yeni [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} değişiklikler] yapılmış olabilir.', |
13529 | 13578 | 'revreview-quality-same' => 'Bu, <i>$2</i> tarihinde [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylanan] [[{{MediaWiki:Validationpage}}|yayımlanmış sürümdür]].', |
— | — | @@ -13533,19 +13582,17 @@ |
13534 | 13583 | 'revreview-quick-basic-same' => "'''[[{{MediaWiki:Validationpage}}|Kontrol edilmiş]]'''", |
13535 | 13584 | 'revreview-quick-invalid' => "'''Geçersiz revizyon IDsi'''", |
13536 | 13585 | 'revreview-quick-none' => "'''[[{{MediaWiki:Validationpage}}|Kontrol edilmemiş]]'''", |
13537 | | - 'revreview-quick-quality' => "'''[[{{MediaWiki:Validationpage}}|Kaliteli sayfa]]''' [[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} karalamayı gör]]", |
| 13586 | + 'revreview-quick-quality' => "'''[[{{MediaWiki:Validationpage}}|Kaliteli]]''' [[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} bekleyen değişiklikleri gözden geçir]]", |
13538 | 13587 | 'revreview-quick-quality-old' => "'''[[{{MediaWiki:Validationpage}}|Kaliteli]]'''", |
13539 | 13588 | 'revreview-quick-quality-same' => "'''[[{{MediaWiki:Validationpage}}|Kaliteli]]'''", |
13540 | | - 'revreview-quick-see-basic' => "'''[[{{MediaWiki:Validationpage}}|Taslak]]''' [[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} yayımlanmış sürüm]] |
13541 | | -[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} karşılaştır]]", |
13542 | | - 'revreview-quick-see-quality' => "'''[[{{MediaWiki:Validationpage}}|Taslak]]''' [[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} yayımlanmış sürüm]] |
13543 | | -[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} karşılaştır]]", |
| 13589 | + 'revreview-quick-see-basic' => '[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} bekleyen değişiklikleri gözden geçir]]', |
| 13590 | + 'revreview-quick-see-quality' => '[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} bekleyen değişiklikleri gözden geçir]]', |
13544 | 13591 | 'revreview-selected' => "'''$1 için seçili revizyon:'''", |
13545 | 13592 | 'revreview-source' => 'Kaynağı gör', |
13546 | 13593 | 'revreview-stable' => 'Yayımlanmış sayfa', |
13547 | 13594 | 'revreview-basic-title' => 'Bu, bu sayfanın kontrol edilmiş bir sürümüdür', |
13548 | 13595 | 'revreview-stable1' => '[{{fullurl:$1|stableid=$2}} Bu işaretli sürümü] görüp, şimdi bu sayfanın [{{fullurl:$1|stable=1}} yayımlanmış sürümü] olup olmadığını görmek isteyebilirsiniz.', |
13549 | | - 'revreview-stable2' => 'Bu sayfanın [{{fullurl:$1|stable=1}} yayımlanmış sürümünü] (eğer hala bir tane varsa) görmek isteyebilirsiniz.', |
| 13596 | + 'revreview-stable2' => 'Bu sayfanın [{{fullurl:$1|stable=1}} yayımlanmış sürümünü] görmek isteyebilirsiniz.', |
13550 | 13597 | 'revreview-style' => 'Okunaklılık', |
13551 | 13598 | 'revreview-style-0' => 'Onaylanmamış', |
13552 | 13599 | 'revreview-style-1' => 'Geçerli', |
— | — | @@ -13556,23 +13603,22 @@ |
13557 | 13604 | 'revreview-submit-review' => 'Onayla', |
13558 | 13605 | 'revreview-submit-unreview' => 'Onayı iptal et', |
13559 | 13606 | 'revreview-submitting' => 'Gönderiliyor...', |
13560 | | - 'revreview-submit-reviewed' => 'Tamam. Kontrol edildi!', |
13561 | | - 'revreview-submit-unreviewed' => 'Tamam. Kontrol edilmedi!', |
| 13607 | + 'revreview-submit-reviewed' => 'Tamam. Onaylandı!', |
| 13608 | + 'revreview-submit-unreviewed' => 'Tamam. Onay kaldırıldı!', |
13562 | 13609 | 'revreview-successful' => "'''[[:$1|$1]] için revizyonu başarıyla işaretlendi. ([{{fullurl:{{#Special:ReviewedVersions}}|page=$2}} kararlı sürümleri gör])'''", |
13563 | 13610 | 'revreview-successful2' => "'''[[:$1|$1]] için revizyonun işareti başarıyla kaldırıldı.'''", |
13564 | 13611 | 'revreview-text' => "''[[{{MediaWiki:Validationpage}}|Gözden geçirilmiş sürümler]] yayımlanmış sürümü belirlemek için kullanılan, sayfaların kontrol edilmiş sürümleridir.''", |
13565 | 13612 | 'revreview-toggle-title' => 'detayları göster/gizle', |
13566 | | - 'revreview-toolow' => '\'\'\'Bir revizyonun gözden geçirilmiş sayılabilmesi için aşağıdaki özniteliklerden her birini "onaylanmamış"dan yüksek oylamalısınız.\'\'\' |
13567 | | -Bir revizyonu aşındırmak için, tüm alanları "onaylanmamış" seçin. |
| 13613 | + 'revreview-toolow' => '\'\'\'Bir revizyonun gözden geçirilmiş sayılabilmesi için özniteliklerden her birini "onaylanmamış"dan yüksek oylamalısınız.\'\'\' |
| 13614 | +Bir revizyonun gözden geçirme durumunu çıkarmak için, tüm alanları "onaylanmamış" seçin. |
13568 | 13615 | |
13569 | 13616 | Lütfen tarayıcınızdaki "geri" tuşuna basın ve tekrar deneyin.', |
13570 | | - 'revreview-update' => "Lütfen yayımlanmış sürümün [{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} onaylandığından] beri yapılan her değişikliği ''(aşağıda gösterilmiş)'' [[{{MediaWiki:Validationpage}}|gözden geçirin]].<br /> |
13571 | | -'''Bazı şablonlar/dosyalar güncellenmiş:'''", |
13572 | | - 'revreview-update-edited' => "Bu sayfayı değiştirdiğinizde, bazı ''diğer'' değişiklikler zaten gözden geçirme bekliyordu. |
| 13617 | + 'revreview-update' => "Lütfen yayımlanmış sürüme yapılan bekleyen her değişikliği ''(aşağıda gösterilmiş)'' [[{{MediaWiki:Validationpage}}|gözden geçirin]].", |
| 13618 | + 'revreview-update-edited' => '<span class="flaggedrevs_important">Değişiklikleriniz henüz yayınlanmadı.</span> |
13573 | 13619 | |
13574 | | -Değişikliklerinizi yayınlamak için, lütfen ''(aşağıda gösterilen)'' bekleyen ''tüm'' değişiklikleri ''[[{{MediaWiki:Validationpage}}|gözden geçirin]]''.", |
| 13620 | +Gözden geçirme bekleyen önceki değişiklikler var. Değişikliklerinizi yayınlamak için, lütfen aşağıda gösterilen tüm değişiklikleri gözden geçirin.', |
13575 | 13621 | 'revreview-update-includes' => "'''Bazı şablonlar/dosyalar güncellenmiş:'''", |
13576 | | - 'revreview-update-use' => "'''NOT:''' Eğer bu şablonların/dosyaların herhangi birisinin yayımlanmış sürümü varsa, zaten bu sayfanın yayımlanmış sürümünde kullanılmıştır.", |
| 13622 | + 'revreview-update-use' => "'''NOT:''' Her şablon/dosyanın yayımlanmış sürümleri, bu sayfanın yayımlanmış sürümünde kullanılmıştır.", |
13577 | 13623 | 'revreview-visibility' => "'''Bu sayfanın güncellenmiş bir [[{{MediaWiki:Validationpage}}|yayımlanmış sürümü]] mevcut; sayfa kararlılık ayarları [{{fullurl:{{#Special:Stabilization}}|page={{FULLPAGENAMEE}}}} yapılandırılabilir].'''", |
13578 | 13624 | 'revreview-visibility2' => "'''Bu sayfanın tarihi geçmiş bir [[{{MediaWiki:Validationpage}}|yayımlanmış sürümü]] vardır; sayfa kararlılık ayarları [{{fullurl:{{#Special:Stabilization}}|page={{FULLPAGENAMEE}}}} yapılandırılabilir].'''", |
13579 | 13625 | 'revreview-visibility3' => "'''Bu sayfanın bir [[{{MediaWiki:Validationpage}}|yayımlanmış sürümü]] yoktur; sayfa kararlılık ayarları [{{fullurl:{{#Special:Stabilization}}|page={{FULLPAGENAMEE}}}} yapılandırılabilir].'''", |
— | — | @@ -13619,7 +13665,7 @@ |
13620 | 13666 | 'tooltip-ca-current' => 'Bu sayfanın güncel karalamasını gör', |
13621 | 13667 | 'tooltip-ca-stable' => 'Bu sayfanın yayımlanmış sürümünü gör', |
13622 | 13668 | 'tooltip-ca-default' => 'Kalite güvencesi ayarları', |
13623 | | - 'flaggedrevs-protect-legend' => 'Değişiklikleri yayınla', |
| 13669 | + 'flaggedrevs-protect-legend' => 'Değişiklikleri yayınla ([[{{MediaWiki:Validationpage}}|?]])', |
13624 | 13670 | 'flaggedrevs-protect-none' => 'Tüm kullanıcılara izin ver', |
13625 | 13671 | 'flaggedrevs-protect-basic' => 'Varsayılan ayarlar', |
13626 | 13672 | 'revreview-locked-title' => 'Bu sayfada gösterilmeden önce, değişiklikler gözden geçirilmeli!', |
— | — | @@ -13844,10 +13890,11 @@ |
13845 | 13891 | 'revreview-restriction-any' => 'будь-яка', |
13846 | 13892 | 'revreview-restriction-none' => 'немає', |
13847 | 13893 | 'revreview-reviewlink' => 'нерецензовані редагування', |
| 13894 | + 'revreview-unreviewedpage' => 'неперевірена сторінка', |
13848 | 13895 | 'tooltip-ca-current' => 'Переглянути цю сторінку з нерецензованими змінами', |
13849 | 13896 | 'tooltip-ca-stable' => 'Переглянути опубліковану версію цієї сторінки', |
13850 | 13897 | 'tooltip-ca-default' => 'Налаштування контролю якості', |
13851 | | - 'flaggedrevs-protect-legend' => 'Опублікувати редагування', |
| 13898 | + 'flaggedrevs-protect-legend' => 'Опубліковані редагування ([[{{MediaWiki:Validationpage}}|?]])', |
13852 | 13899 | 'flaggedrevs-protect-none' => 'Дозволено всім користувачам', |
13853 | 13900 | 'flaggedrevs-protect-basic' => 'Установки за умовчанням', |
13854 | 13901 | 'revreview-locked-title' => 'Редагування мають бути перевірені перед тим, як будуть показані на цій сторінці!', |
— | — | @@ -14291,7 +14338,7 @@ |
14292 | 14339 | 'flaggedrevs-backlog' => "Hiện đang lạc hậu về [[Special:OldReviewedPages|trang cần duyệt lại]]. '''Cần bạn chú ý!'''", |
14293 | 14340 | 'flaggedrevs-watched-pending' => "Hiện có [{{fullurl:{{#Special:OldReviewedPages}}|watched=1}} sửa đổi chưa duyệt] tại trang đã duyệt trong danh sách theo dõi của bạn. '''Cần bạn chú ý!'''", |
14294 | 14341 | 'flaggedrevs-desc' => 'Cung cấp cho người viết và người duyệt bài khả năng phê chuẩn phiên bản và ổn định trang', |
14295 | | - 'flaggedrevs-pref-UI' => 'Giao diện phiên bản ổn định:', |
| 14342 | + 'flaggedrevs-pref-UI' => 'Giao diện cơ bản:', |
14296 | 14343 | 'flaggedrevs-pref-UI-0' => 'Sử dụng giao diện người dùng phiên bản ổn định chi tiết', |
14297 | 14344 | 'flaggedrevs-pref-UI-1' => 'Sử dụng giao diện người dùng phiên bản ổn định đơn giản', |
14298 | 14345 | 'prefs-flaggedrevs' => 'Ổn định', |
— | — | @@ -14315,6 +14362,10 @@ |
14316 | 14363 | 'revreview-hist-quality-user' => '[[User:$3|$3]] [{{fullurl:$1|stableid=$2}} đã phê chuẩn]', |
14317 | 14364 | 'revreview-hist-basic-user' => '[[User:$3|$3]] [{{fullurl:$1|stableid=$2}} đã xem qua]', |
14318 | 14365 | 'revreview-hist-basic-auto' => '[{{fullurl:$1|stableid=$2}} được xem qua tự động]', |
| 14366 | + 'revreview-diff-toggle-show' => 'hiện thay đổi', |
| 14367 | + 'revreview-diff-toggle-hide' => 'ẩn thay đổi', |
| 14368 | + 'revreview-log-details-show' => 'hiện chi tiết', |
| 14369 | + 'revreview-log-details-hide' => 'ẩn chi tiết', |
14319 | 14370 | 'review-diff2stable' => 'So sánh phiên bản ổn định với bản hiện hành', |
14320 | 14371 | 'review-logentry-app' => 'đã duyệt phiên bản $2 của [[$1]]', |
14321 | 14372 | 'review-logentry-dis' => 'đã đánh giá thấp hơn cho phiên bản $2 của [[$1]]', |
— | — | @@ -14355,7 +14406,7 @@ |
14356 | 14407 | 'revreview-depth-3' => 'Cao', |
14357 | 14408 | 'revreview-depth-4' => 'Rất tốt', |
14358 | 14409 | 'revreview-draft-title' => 'Đây là trang nháp', |
14359 | | - 'revreview-edit' => 'Sửa đổi bản nháp', |
| 14410 | + 'revreview-edit' => 'Sửa đổi', |
14360 | 14411 | 'revreview-editnotice' => "'''Các sửa đổi tại trang này sẽ vào bản [[{{MediaWiki:Validationpage}}|ổn định]] lúc khi chúng được duyệt bởi một thành viên được quyền.'''", |
14361 | 14412 | 'revreview-edited' => "'''Những sửa đổi sẽ được đưa vào [[{{MediaWiki:Validationpage}}|bản ổn định]] ngay khi được một thành viên được chỉ định duyệt qua. |
14362 | 14413 | Dưới đây là ''bản nháp''.''' Có [{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $2 {{PLURAL:$2|thay đổi|thay đổi}}] đề nghị.", |
— | — | @@ -14408,6 +14459,7 @@ |
14409 | 14460 | 'revreview-style-3' => 'Súc tích', |
14410 | 14461 | 'revreview-style-4' => 'Rất tốt', |
14411 | 14462 | 'revreview-submit' => 'Đăng bản duyệt', |
| 14463 | + 'revreview-submit-review' => 'Chấp nhận', |
14412 | 14464 | 'revreview-submitting' => 'Đang gửi thông tin…', |
14413 | 14465 | 'revreview-successful' => "'''Phiên bản của [[:$1|$1]] đã được gắn cờ. ([{{fullurl:{{#Special:ReviewedVersions}}|page=$2}} xem các phiên bản có cờ])'''", |
14414 | 14466 | 'revreview-successful2' => "'''Phiên bản của [[:$1|$1]] đã được bỏ cờ thành công.'''", |
— | — | @@ -14887,6 +14939,7 @@ |
14888 | 14940 | /** Traditional Chinese (中文(繁體)) |
14889 | 14941 | * @author Alexsh |
14890 | 14942 | * @author Gaoxuewei |
| 14943 | + * @author Horacewai2 |
14891 | 14944 | * @author Liangent |
14892 | 14945 | * @author Mark85296341 |
14893 | 14946 | * @author Wrightbus |
— | — | @@ -14898,7 +14951,13 @@ |
14899 | 14952 | 'flaggedrevs-backlog' => "目前有積壓的[[Special:OldReviewedPages|編輯]]未複查。'''需要您的注意!'''", |
14900 | 14953 | 'flaggedrevs-watched-pending' => "您監視列表上有積壓的[{{fullurl:{{#Special:OldReviewedPages}}|watched=1}} 編輯]未複查。'''需要您的注意!'''", |
14901 | 14954 | 'flaggedrevs-desc' => '給予編輯者與評論家能力去核實修訂以及穩定化頁面', |
14902 | | - 'prefs-flaggedrevs' => '穩定性', |
| 14955 | + 'flaggedrevs-pref-UI' => '基本界面:', |
| 14956 | + 'flaggedrevs-pref-UI-0' => '使用詳細的審批狀態框來顯示此頁面的複審狀態', |
| 14957 | + 'flaggedrevs-pref-UI-1' => '使用小圖標和顯示最小的文字來表示頁面的審批狀態', |
| 14958 | + 'prefs-flaggedrevs' => '編輯審核', |
| 14959 | + 'prefs-flaggedrevs-ui' => '編輯審批', |
| 14960 | + 'flaggedrevs-prefs-stable' => '始終顯示已發布的版本的內容(如果有)', |
| 14961 | + 'flaggedrevs-prefs-watch' => '將我評審的頁面添加到我的監視列表中', |
14903 | 14962 | 'flaggedrevs-prefs-editdiffs' => '在編輯時顯示與穩定版本的差異', |
14904 | 14963 | 'flaggedrevs-prefs-viewdiffs' => '在顯示頁面草稿時顯示與穩定版本的差異', |
14905 | 14964 | 'group-editor' => '編輯', |
— | — | @@ -14909,17 +14968,31 @@ |
14910 | 14969 | 'grouppage-reviewer' => '{{ns:project}}:評論家', |
14911 | 14970 | 'group-autoreview' => '自動複查員', |
14912 | 14971 | 'group-autoreview-member' => '自動複查員', |
| 14972 | + 'grouppage-autoreview' => '{{ns:project}}:自動複審', |
| 14973 | + 'revreview-hist-draft' => '未經檢查的修訂', |
14913 | 14974 | 'revreview-hist-quality' => '[質素]', |
14914 | | - 'revreview-hist-basic' => '[已察]', |
| 14975 | + 'revreview-hist-basic' => '已察版本', |
14915 | 14976 | 'revreview-hist-quality-user' => '[{{fullurl:$1|stableid=$2}} 已驗證]由[[User:$3|$3]]', |
14916 | | - 'revreview-hist-basic-user' => '[{{fullurl:$1|stableid=$2}} 已複查]由[[User:$3|$3]]', |
| 14977 | + 'revreview-hist-basic-user' => '已由[[User:$3|$3]][{{fullurl:$1|stableid=$2}} 複查]', |
14917 | 14978 | 'revreview-hist-basic-auto' => '[{{fullurl:$1|stableid=$2}} 已自動複查]', |
14918 | | - 'review-diff2stable' => '跟上次穩定修訂的差異', |
| 14979 | + 'revreview-hist-quality-auto' => '[{{fullurl:$1|stableid=$2}} 已自動複查]', |
| 14980 | + 'revreview-hist-pending' => "'''[[{{fullurl:$1|oldid=$2&diff=$3}} 等待審核]]'''", |
| 14981 | + 'review-edit-diff' => "'''注意:一些懸而未決的更改已發布的版本納入編輯下面的表格。'''", |
| 14982 | + 'revreview-diff-toggle-show' => '顯示變化', |
| 14983 | + 'revreview-diff-toggle-hide' => '隱藏變化', |
| 14984 | + 'revreview-diff-toggle-title' => '切換顯示掛起的更改已發布的版本', |
| 14985 | + 'revreview-log-toggle-show' => '顯示穩定版本日誌', |
| 14986 | + 'revreview-log-toggle-hide' => '隱藏穩定版本日誌', |
| 14987 | + 'revreview-log-toggle-title' => '切換至顯示穩定性設置日誌', |
| 14988 | + 'revreview-log-details-show' => '顯示詳情', |
| 14989 | + 'revreview-log-details-hide' => '隱藏細節', |
| 14990 | + 'revreview-log-details-title' => '切換至顯示穩定性設置日誌', |
| 14991 | + 'review-diff2stable' => '查看所有懸而未決的變化', |
14919 | 14992 | 'review-logentry-app' => '[[$1]]的已複查版本', |
14920 | 14993 | 'review-logentry-dis' => '[[$1]]的不推薦版本', |
14921 | 14994 | 'review-logentry-id' => '修訂 ID: $2', |
14922 | 14995 | 'review-logentry-diff' => '修改已複查', |
14923 | | - 'review-logentry-diff2' => '修改未複查', |
| 14996 | + 'review-logentry-diff2' => '修改過時', |
14924 | 14997 | 'review-logpage' => '文章複審記錄', |
14925 | 14998 | 'review-logpagetext' => '這個是內容頁[[{{MediaWiki:Validationpage}}|批准]]狀態的更改記錄。', |
14926 | 14999 | 'reviewer' => '評論家', |
— | — | @@ -14971,16 +15044,22 @@ |
14972 | 15045 | 於<i>$2</i>[{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} 批准]。[{{fullurl:{{FULLPAGENAMEE}}|stable=0}} 現時修訂] |
14973 | 15046 | 可以[{{fullurl:{{FULLPAGENAMEE}}|action=edit}} 更改]];[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} $3次更改] |
14974 | 15047 | 正等候複審。', |
| 15048 | + 'revreview-quality-same' => '這是於<i>$2</i>被[{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} 審核]的[[{{MediaWiki:Validationpage}}|已審核版本]]', |
| 15049 | + 'revreview-quality-source' => '這是一個[{{fullurl:{{FULLPAGENAMEE}}|stableid=$1}} 本頁的質數版本],於<i>$2</i>[{{fullurl:{{#Special:Log}}|type=review&page={{FULLPAGENAMEE}}}} 被審核]。', |
14975 | 15050 | 'revreview-quality-title' => '這是一個高質量頁面', |
14976 | | - 'revreview-quick-basic' => "'''[[{{MediaWiki:Validationpage}}|視察過的]]'''。[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} 看現時修訂]]", |
| 15051 | + 'revreview-quick-basic' => "''[[{{MediaWiki:Validationpage}}|視察過的]]'''。[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} 看現時修訂]]", |
| 15052 | + 'revreview-quick-basic-old' => "'''[[{{MediaWiki:Validationpage}}|已審查]]'''", |
| 15053 | + 'revreview-quick-basic-same' => "'''[[{{MediaWiki:Validationpage}}|已審核]]'''", |
14977 | 15054 | 'revreview-quick-invalid' => "'''修訂版本號碼錯誤'''", |
14978 | | - 'revreview-quick-none' => "'''現時的'''。沒有已複審的修訂。", |
| 15055 | + 'revreview-quick-none' => "'''[[{{MediaWiki:Validationpage}}|現時的]]'''。沒有已複審的修訂。", |
14979 | 15056 | 'revreview-quick-quality' => "'''[[{{MediaWiki:Validationpage}}|有質素的]]'''。[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} 看現時修訂]]", |
14980 | | - 'revreview-quick-see-basic' => "'''現時的'''。[[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} 看最後檢查過的修訂]]", |
14981 | | - 'revreview-quick-see-quality' => "'''現時的'''。[[{{fullurl:{{FULLPAGENAMEE}}|stable=1}} 看睇最後的質素修訂]]", |
| 15057 | + 'revreview-quick-quality-old' => "'''[[{{MediaWiki:Validationpage}}|有質數的]]'''", |
| 15058 | + 'revreview-quick-quality-same' => "'''[[{{MediaWiki:Validationpage}}|有質數的]]'''", |
| 15059 | + 'revreview-quick-see-basic' => "'''現時的'''。[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} 看最後檢查過的修訂]]", |
| 15060 | + 'revreview-quick-see-quality' => "'''現時的'''。[[{{fullurl:{{FULLPAGENAMEE}}|oldid=$1&diff=cur&diffonly=0}} 看睇最後的質素修訂]]", |
14982 | 15061 | 'revreview-selected' => "已經選擇 '''$1''' 的修訂:", |
14983 | | - 'revreview-source' => '草稿原始碼', |
14984 | | - 'revreview-stable' => '穩定', |
| 15062 | + 'revreview-source' => '檢視原始碼', |
| 15063 | + 'revreview-stable' => '穩定頁面', |
14985 | 15064 | 'revreview-basic-title' => '這是一個已複查頁面', |
14986 | 15065 | 'revreview-style' => '可讀性', |
14987 | 15066 | 'revreview-style-0' => '未批准', |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/OldReviewedPages.i18n.php |
— | — | @@ -348,6 +348,7 @@ |
349 | 349 | ); |
350 | 350 | |
351 | 351 | /** German (Deutsch) |
| 352 | + * @author Kghbln |
352 | 353 | * @author Melancholie |
353 | 354 | * @author Michawiki |
354 | 355 | * @author Raimond Spekking |
— | — | @@ -355,7 +356,7 @@ |
356 | 357 | * @author Umherirrender |
357 | 358 | */ |
358 | 359 | $messages['de'] = array( |
359 | | - 'oldreviewedpages' => 'Alte, gesichtete Seiten', |
| 360 | + 'oldreviewedpages' => 'Seiten mit unmarkierten Änderungen', |
360 | 361 | 'oldreviewedpages-legend' => 'Liste gesichteter Seiten mit ungesichteten Versionen', |
361 | 362 | 'oldreviewedpages-list' => 'Diese Spezialseite zeigt {{PLURAL:$1|eine gesichtete Seite|gesichtete Seiten}}, die noch ungesichtete Bearbeitungen {{PLURAL:$1|hat|haben}}.', |
362 | 363 | 'oldreviewedpages-none' => 'Gegenwärtig gibt es keine Seiten, auf die diese Kriterien zutreffen.', |
— | — | @@ -1300,19 +1301,19 @@ |
1301 | 1302 | */ |
1302 | 1303 | $messages['ro'] = array( |
1303 | 1304 | 'oldreviewedpages' => 'Pagini revizuite expirate', |
1304 | | - 'oldreviewedpages-legend' => 'Lista de pagini revizuite, cu revizuiri în aşteptarea revizuirii', |
1305 | | - 'oldreviewedpages-list' => 'Această pagină afişează {{PLURAL:$1|o pagină revizuită care are|paginile revizuite care au}} modificări în aşteptare.', |
| 1305 | + 'oldreviewedpages-legend' => 'Lista de pagini revizuite, cu revizuiri în așteptarea revizuirii', |
| 1306 | + 'oldreviewedpages-list' => 'Această pagină afișează {{PLURAL:$1|o pagină revizuită care are|paginile revizuite care au}} modificări în așteptare.', |
1306 | 1307 | 'oldreviewedpages-none' => 'Momentan nu există pagini care satisfac aceste criterii', |
1307 | 1308 | 'oldreviewedpages-hours' => '($1 {{PLURAL:$1|oră|ore}})', |
1308 | 1309 | 'oldreviewedpages-days' => '($1 {{PLURAL:$1|zi|zile}})', |
1309 | | - 'oldreviewedpages-recent' => '(mai puţin de 1 oră)', |
| 1310 | + 'oldreviewedpages-recent' => '(mai puțin de 1 oră)', |
1310 | 1311 | 'oldreviewed-category' => 'Categorie:', |
1311 | 1312 | 'oldreviewed-watched' => 'În lista mea de urmărire', |
1312 | 1313 | 'oldreviewed-stable' => 'Stabilit', |
1313 | 1314 | 'oldreviewed-diff' => 'revizuire', |
1314 | | - 'oldreviewed-size' => 'Schimbare maximă (baiţi):', |
| 1315 | + 'oldreviewed-size' => 'Schimbare maximă (baiți):', |
1315 | 1316 | 'oldreviewedpages-unwatched' => '(neurmărite)', |
1316 | | - 'oldreviewedpages-watched' => '($1 {{PLURAL:$1|utilizator activ care urmăreşte|utilizatori activi care urmăresc}})', |
| 1317 | + 'oldreviewedpages-watched' => '($1 {{PLURAL:$1|utilizator activ care urmărește|utilizatori activi care urmăresc}})', |
1317 | 1318 | 'oldreviewedpages-viewing' => '(în curs de revizuire)', |
1318 | 1319 | ); |
1319 | 1320 | |
— | — | @@ -1702,6 +1703,7 @@ |
1703 | 1704 | |
1704 | 1705 | /** Traditional Chinese (中文(繁體)) |
1705 | 1706 | * @author Gzdavidwong |
| 1707 | + * @author Horacewai2 |
1706 | 1708 | * @author Liangent |
1707 | 1709 | * @author Shinjiman |
1708 | 1710 | * @author Wrightbus |
— | — | @@ -1709,13 +1711,13 @@ |
1710 | 1712 | $messages['zh-hant'] = array( |
1711 | 1713 | 'oldreviewedpages' => '已過時複審過的頁面', |
1712 | 1714 | 'oldreviewedpages-legend' => '列示有未複審修訂之複審過的頁面', |
1713 | | - 'oldreviewedpages-list' => '這個頁面列示出有正等候編輯之評論頁面。', |
| 1715 | + 'oldreviewedpages-list' => '這個頁面列示出{{PLURAL:$1|一個|一些}}正等候編輯之評論頁面。', |
1714 | 1716 | 'oldreviewedpages-none' => '這裏現時沒有頁面係合乎這些條件', |
1715 | 1717 | 'oldreviewedpages-hours' => '($1小時)', |
1716 | 1718 | 'oldreviewedpages-days' => '($1日)', |
1717 | 1719 | 'oldreviewedpages-recent' => '(少於1小時)', |
1718 | 1720 | 'oldreviewed-category' => '分類:', |
1719 | | - 'oldreviewed-watched' => '在我的監視列表上', |
| 1721 | + 'oldreviewed-watched' => '在我的監視列表上的頁面', |
1720 | 1722 | 'oldreviewed-stable' => '穩定的', |
1721 | 1723 | 'oldreviewed-diff' => '複審', |
1722 | 1724 | 'oldreviewed-size' => '最大變動(位元組):', |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/ProblemChanges.i18n.php |
— | — | @@ -114,11 +114,12 @@ |
115 | 115 | |
116 | 116 | /** German (Deutsch) |
117 | 117 | * @author Jens Liebenau |
| 118 | + * @author Kghbln |
118 | 119 | * @author Khaledelmansoury |
119 | 120 | * @author Umherirrender |
120 | 121 | */ |
121 | 122 | $messages['de'] = array( |
122 | | - 'problemchanges' => 'Nachprüfung der markierten Veränderungen', |
| 123 | + 'problemchanges' => 'gekennzeichnete unmarkierte Änderungen', |
123 | 124 | 'problemchanges-legend' => 'Liste der Seiten mit markierten Bearbeitungen, für die noch eine Nachprüfung notwendig ist', |
124 | 125 | 'problemchanges-none' => 'Es gibt zurzeit keine Seiten, die diese Kriterien erfüllen.', |
125 | 126 | 'problemchanges-category' => 'Kategorie:', |
— | — | @@ -517,7 +518,7 @@ |
518 | 519 | * @author Stelistcristi |
519 | 520 | */ |
520 | 521 | $messages['ro'] = array( |
521 | | - 'problemchanges' => 'Revizualizaţi schimbările etichetate', |
| 522 | + 'problemchanges' => 'Revizualizați schimbările etichetate', |
522 | 523 | 'problemchanges-category' => 'Categorie:', |
523 | 524 | ); |
524 | 525 | |
— | — | @@ -672,9 +673,12 @@ |
673 | 674 | ); |
674 | 675 | |
675 | 676 | /** Traditional Chinese (中文(繁體)) |
| 677 | + * @author Horacewai2 |
676 | 678 | * @author Liangent |
677 | 679 | */ |
678 | 680 | $messages['zh-hant'] = array( |
| 681 | + 'problemchanges' => '標記審核', |
| 682 | + 'problemchanges-legend' => '列出頁面正等待審核', |
679 | 683 | 'problemchanges-none' => '目前沒有頁面符合這些條件', |
680 | 684 | 'problemchanges-category' => '分類:', |
681 | 685 | ); |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/ReviewedPages.i18n.php |
— | — | @@ -225,13 +225,15 @@ |
226 | 226 | |
227 | 227 | /** German (Deutsch) |
228 | 228 | * @author Imre |
| 229 | + * @author Kghbln |
229 | 230 | * @author Umherirrender |
230 | 231 | */ |
231 | 232 | $messages['de'] = array( |
232 | | - 'reviewedpages' => 'Liste der gesichteten Seiten', |
| 233 | + 'reviewedpages' => 'Liste der markierten Seiten', |
233 | 234 | 'reviewedpages-leg' => 'Seiten nach Prüfungsstufe auflisten', |
234 | | - 'reviewedpages-list' => 'Diese Spezialseite zeigt Seiten, die bisher mit dem angegebenem Level als höchstes markiert wurden.', |
235 | | - 'reviewedpages-none' => 'Die Liste ist leer.', |
| 235 | + 'reviewedpages-list' => 'Diese Listen enthalten [[{{MediaWiki:Validationpage}}|markierte]] Seiten, deren höchster Qualitätsstatus (einer Version) dem angegebenen Status entspricht. |
| 236 | +Der Link zu neuesten Version dieses Status ist angegeben.', |
| 237 | + 'reviewedpages-none' => 'Diese Liste enthält keine Seiten.', |
236 | 238 | 'reviewedpages-lev-0' => 'Gesichtet', |
237 | 239 | 'reviewedpages-lev-1' => 'Geprüft', |
238 | 240 | 'reviewedpages-lev-2' => 'Exzellent', |
— | — | @@ -952,7 +954,7 @@ |
953 | 955 | */ |
954 | 956 | $messages['ro'] = array( |
955 | 957 | 'reviewedpages' => 'Pagini revizuite', |
956 | | - 'reviewedpages-list' => 'Această pagină afişează paginile care au fost revizuite (la cel mai mare nivel) la nivelul specificat.', |
| 958 | + 'reviewedpages-list' => 'Această pagină afișează paginile care au fost revizuite (la cel mai mare nivel) la nivelul specificat.', |
957 | 959 | 'reviewedpages-none' => 'Nu există pagini în această listă', |
958 | 960 | 'reviewedpages-lev-1' => 'Calitate', |
959 | 961 | 'reviewedpages-all' => 'versiuni revizuite', |
— | — | @@ -1095,6 +1097,7 @@ |
1096 | 1098 | |
1097 | 1099 | /** Swedish (Svenska) |
1098 | 1100 | * @author Boivie |
| 1101 | + * @author Dafer45 |
1099 | 1102 | * @author Lejonel |
1100 | 1103 | * @author M.M.S. |
1101 | 1104 | * @author McDutchie |
— | — | @@ -1103,7 +1106,7 @@ |
1104 | 1107 | */ |
1105 | 1108 | $messages['sv'] = array( |
1106 | 1109 | 'reviewedpages' => 'Granskade sidor', |
1107 | | - 'reviewedpages-leg' => 'Lista sidor efter högsta granskningsnivå', |
| 1110 | + 'reviewedpages-leg' => 'Lista sidor som har blivit granskade', |
1108 | 1111 | 'reviewedpages-list' => 'Följande {{PLURAL:$1|sida|sidor}} har granskats till (högst) den angivna nivån.', |
1109 | 1112 | 'reviewedpages-none' => 'Den här listan innehåller inga sidor', |
1110 | 1113 | 'reviewedpages-lev-0' => '{{int:revreview-lev-basic}}', |
— | — | @@ -1305,12 +1308,13 @@ |
1306 | 1309 | ); |
1307 | 1310 | |
1308 | 1311 | /** Traditional Chinese (中文(繁體)) |
| 1312 | + * @author Horacewai2 |
1309 | 1313 | * @author Shinjiman |
1310 | 1314 | */ |
1311 | 1315 | $messages['zh-hant'] = array( |
1312 | 1316 | 'reviewedpages' => '複審過的頁面', |
1313 | 1317 | 'reviewedpages-leg' => '列示複審過到指定級數之頁面', |
1314 | | - 'reviewedpages-list' => '以下的頁面已經複審到一個指定的級數', |
| 1318 | + 'reviewedpages-list' => '以下的頁面[[{{MediaWiki:Validationpage}}|已經複審]]到一個指定的級數', |
1315 | 1319 | 'reviewedpages-none' => '沒有頁面在這個清單中', |
1316 | 1320 | 'reviewedpages-lev-0' => '視察過', |
1317 | 1321 | 'reviewedpages-lev-1' => '質素', |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/StablePages.i18n.php |
— | — | @@ -146,14 +146,15 @@ |
147 | 147 | ); |
148 | 148 | |
149 | 149 | /** German (Deutsch) |
| 150 | + * @author Kghbln |
150 | 151 | * @author MF-Warburg |
151 | 152 | * @author Purodha |
152 | 153 | * @author Umherirrender |
153 | 154 | */ |
154 | 155 | $messages['de'] = array( |
155 | | - 'stablepages' => 'Konfigurierte Seiten', |
156 | | - 'stablepages-text' => 'Es folgt eine Liste der Seiten, die individuell konfiguriert wurden, damit diese die markierte Version als Standardinhalt für Leser anzeigen.', |
157 | | - 'stablepages-none' => 'Diese Liste ist leer.', |
| 156 | + 'stablepages' => 'Seiten die nur mit Bearbeitungsfreigabe bearbeitet werden können', |
| 157 | + 'stablepages-text' => 'Es folgt eine Liste der Seiten, die nur von Benutzern bearbeitet werden können, deren Bearbeitungen keine weitere Durchsicht erfordert. Derartige Bearbeitungen werden nicht veröffentlicht bis ein entsprechend berechtigter Benutzer sie markiert.', |
| 158 | + 'stablepages-none' => 'Diese Liste enthält keine Seiten.', |
158 | 159 | 'stablepages-config' => 'Konfiguration', |
159 | 160 | ); |
160 | 161 | |
— | — | @@ -591,7 +592,7 @@ |
592 | 593 | $messages['ro'] = array( |
593 | 594 | 'stablepages' => 'Pagini stabile', |
594 | 595 | 'stablepages-none' => 'Nu există pagini în această listă', |
595 | | - 'stablepages-config' => 'Configuraţie', |
| 596 | + 'stablepages-config' => 'Configurație', |
596 | 597 | ); |
597 | 598 | |
598 | 599 | /** Tarandíne (Tarandíne) |
— | — | @@ -784,11 +785,12 @@ |
785 | 786 | |
786 | 787 | /** Traditional Chinese (中文(繁體)) |
787 | 788 | * @author Gaoxuewei |
| 789 | + * @author Horacewai2 |
788 | 790 | * @author Shinjiman |
789 | 791 | */ |
790 | 792 | $messages['zh-hant'] = array( |
791 | | - 'stablepages' => '穩定頁面', |
792 | | - 'stablepages-text' => '以下的頁面列示出一些頁面是手動地設定去顯示穩定版作為觀看者做預設頁面版內容。', |
| 793 | + 'stablepages' => '頁面已經通過審核', |
| 794 | + 'stablepages-text' => '以下的頁面列示出一些頁面是手動地設定去顯示穩定版作為觀看者做預設頁面版內容,只有指定用戶的編輯才不需要通過審核。', |
793 | 795 | 'stablepages-none' => '沒有頁面在這個清單中', |
794 | 796 | 'stablepages-config' => '設定', |
795 | 797 | ); |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/Stabilization.i18n.php |
— | — | @@ -42,10 +42,18 @@ |
43 | 43 | 'stabilization-def-short' => 'Default', |
44 | 44 | 'stabilization-def-short-0' => 'Current', |
45 | 45 | 'stabilization-def-short-1' => 'Published', |
46 | | - 'stabilize_expiry_invalid' => 'Invalid expiration date.', |
47 | | - 'stabilize_expiry_old' => 'This expiration time has already passed.', |
48 | | - 'stabilize-expiring' => 'expires $1 (UTC)', |
49 | | - 'stabilization-review' => 'Mark the current revision checked', |
| 46 | + 'stabilize_page_invalid' => 'The target page title is invalid.', |
| 47 | + 'stabilize_page_notexists' => 'The target page does not exist.', |
| 48 | + 'stabilize_page_unreviewable' => 'The target page is not in reviewable namespace.', |
| 49 | + 'stabilize_invalid_precedence' => 'Invalid version precedence.', |
| 50 | + 'stabilize_invalid_autoreview' => 'Invalid autoreview restriction.', |
| 51 | + 'stabilize_invalid_level' => 'Invalid protection level.', |
| 52 | + 'stabilize_expiry_invalid' => 'Invalid expiration date.', |
| 53 | + 'stabilize_expiry_old' => 'This expiration time has already passed.', |
| 54 | + 'stabilize_denied' => 'Permission denied.', |
| 55 | + 'stabilize_protect_quota' => 'The maximum number of currently flag-protected pages has already been reached.', # do not translate |
| 56 | + 'stabilize-expiring' => 'expires $1 (UTC)', |
| 57 | + 'stabilization-review' => 'Mark the current revision checked', |
50 | 58 | ); |
51 | 59 | |
52 | 60 | /** Message documentation (Message documentation) |
— | — | @@ -422,8 +430,15 @@ |
423 | 431 | 'stabilization-def-short' => 'Па змоўчваньні', |
424 | 432 | 'stabilization-def-short-0' => 'Цяперашняя', |
425 | 433 | 'stabilization-def-short-1' => 'Апублікаваная', |
| 434 | + 'stabilize_page_invalid' => 'Няслушная назва мэтавай старонкі.', |
| 435 | + 'stabilize_page_notexists' => 'Мэтавая старонка не існуе.', |
| 436 | + 'stabilize_page_unreviewable' => 'Мэтавай старонкі няма ў прасторы назваў, якую можна рэцэнзаваць.', |
| 437 | + 'stabilize_invalid_precedence' => 'Няслушны прыярытэт вэрсіяў.', |
| 438 | + 'stabilize_invalid_autoreview' => 'Няслушнае абмежаваньне аўтаматычнага рэцэнзаваньня', |
| 439 | + 'stabilize_invalid_level' => 'Няслушны ўзровень абароны.', |
426 | 440 | 'stabilize_expiry_invalid' => 'Няслушны тэрмін.', |
427 | 441 | 'stabilize_expiry_old' => 'Час сканчэньня ўжо прайшоў.', |
| 442 | + 'stabilize_denied' => 'Доступ забаронены.', |
428 | 443 | 'stabilize-expiring' => 'канчаецца $1 (UTC)', |
429 | 444 | 'stabilization-review' => 'Пазначыць цяперашнюю вэрсію як правераную', |
430 | 445 | ); |
— | — | @@ -651,6 +666,7 @@ |
652 | 667 | |
653 | 668 | /** German (Deutsch) |
654 | 669 | * @author Als-Holder |
| 670 | + * @author Kghbln |
655 | 671 | * @author Metalhead64 |
656 | 672 | * @author Purodha |
657 | 673 | * @author Steef389 |
— | — | @@ -659,21 +675,21 @@ |
660 | 676 | $messages['de'] = array( |
661 | 677 | 'stabilization-tab' => 'Konfig.', |
662 | 678 | 'stabilization' => 'Seitenkonfiguration', |
663 | | - 'stabilization-text' => "'''Ändere die Einstellungen um festzulegen, wie die markierte Version von „[[:$1|$1]]“ ausgewählt und angezeigt werden soll.''' |
| 679 | + 'stabilization-text' => "'''Ändere die folgenden Einstellungen, um festzulegen, wie die zu veröffentlichende Version von „[[:$1|$1]]“ ausgewählt und angezeigt werden soll.''' |
664 | 680 | |
665 | | -Bei einer Änderung der Konfiguration der standardmäßig angezeigten Version auf „geprüft“ oder „ursprünglich“, sollte darauf geachtet werden, dass die Seite eine solche Version enthält, andernfalls hat die Änderung keine große Auswirkung.", |
| 681 | +'''Hinweis:''' Die Änderung der Konfiguration hinsichtlich der standardmäßig anzuzeigenden Version, auf „geprüft“ oder „neueste markierte“, hat keinerlei Auswirkungen, sofern derartige Versionen nicht vorhanden sind. Bedenke, dass in diesem Zusammenhang eine „markierte“ Version als „geprüfte“ Version angesehen wird.", |
666 | 682 | 'stabilization-perm' => 'Du hast nicht die erforderliche Berechtigung, um die Einstellungen der markierten Version zu ändern. |
667 | 683 | Die aktuellen Einstellungen für „[[:$1|$1]]“ sind:', |
668 | 684 | 'stabilization-page' => 'Seitenname:', |
669 | | - 'stabilization-leg' => 'Einstellungen der markierten Version für eine Seite', |
| 685 | + 'stabilization-leg' => 'Bestätige die Einstellungen bezüglich der zu veröffentlichenden Version', |
670 | 686 | 'stabilization-select' => 'Vorzugsweise stabile Versionen auswählen', |
671 | 687 | 'stabilization-select1' => 'Die letzte geprüfte Version; wenn keine vorhanden ist, dann die letzte gesichtete Version', |
672 | 688 | 'stabilization-select2' => 'Die letzte markierte Version, unabhängig vom Markierungslevel', |
673 | 689 | 'stabilization-select3' => 'Die letzte ursprüngliche Version; wenn keine vorhanden ist, dann die letzte gesichtete oder geprüfte Version', |
674 | 690 | 'stabilization-def' => 'Angezeigte Version in der normalen Seitenansicht', |
675 | | - 'stabilization-def1' => 'Die markierte Version; wenn keine vorhanden ist, dann die aktuelle Version/der Entwurf', |
| 691 | + 'stabilization-def1' => 'Die veröffentlichte Version. Sofern keine vorhanden ist, die aktuelle Version/der aktuelle Entwurf', |
676 | 692 | 'stabilization-def2' => 'Die aktuelle Version/der Entwurf', |
677 | | - 'stabilization-restrict' => 'Einschränkung der automatischen Markierung', |
| 693 | + 'stabilization-restrict' => 'Einschränkungen bezüglich des Markierens/des automatischen Markierens', |
678 | 694 | 'stabilization-restrict-none' => 'Keine zusätzlichen Einschränkungen', |
679 | 695 | 'stabilization-submit' => 'Bestätigen', |
680 | 696 | 'stabilization-notexists' => 'Es gibt keine Seite „[[:$1|$1]]“. Keine Einstellungen möglich.', |
— | — | @@ -689,8 +705,15 @@ |
690 | 706 | 'stabilization-def-short' => 'Standard', |
691 | 707 | 'stabilization-def-short-0' => 'Aktuell', |
692 | 708 | 'stabilization-def-short-1' => 'Markiert', |
| 709 | + 'stabilize_page_invalid' => 'Der gewählte Seitentitel ist ungültig.', |
| 710 | + 'stabilize_page_notexists' => 'Die gewählte Seite existiert nicht.', |
| 711 | + 'stabilize_page_unreviewable' => 'Die gewählte Seite befindet sich nicht in einem Namensraum, in dem Markierungen gesetzt werden können.', |
| 712 | + 'stabilize_invalid_precedence' => 'Ungültige Versionspriorität.', |
| 713 | + 'stabilize_invalid_autoreview' => 'Ungültige Einschränkung bezüglich automatischer Markierungen.', |
| 714 | + 'stabilize_invalid_level' => 'Ungültige Seitenschutzart', |
693 | 715 | 'stabilize_expiry_invalid' => 'Ungültiges Ablaufdatum.', |
694 | 716 | 'stabilize_expiry_old' => 'Das Ablaufdatum wurde überschritten.', |
| 717 | + 'stabilize_denied' => 'Zugriff verweigert.', |
695 | 718 | 'stabilize-expiring' => 'erlischt am $2, $3 Uhr (UTC)', |
696 | 719 | 'stabilization-review' => 'Überprüfe die aktuelle Version', |
697 | 720 | ); |
— | — | @@ -886,6 +909,8 @@ |
887 | 910 | 'stabilization-def-short' => 'Defaŭlta', |
888 | 911 | 'stabilization-def-short-0' => 'Nuna', |
889 | 912 | 'stabilization-def-short-1' => 'Publikigita', |
| 913 | + 'stabilize_page_invalid' => 'La titolo de la cela paĝo estas malvalida.', |
| 914 | + 'stabilize_page_notexists' => 'La cela paĝo ne ekzistas.', |
890 | 915 | 'stabilize_expiry_invalid' => 'Malvalida findato.', |
891 | 916 | 'stabilize_expiry_old' => 'Ĉi tiu findato jam estas pasita.', |
892 | 917 | 'stabilize-expiring' => 'findato $1 (UTC)', |
— | — | @@ -938,6 +963,12 @@ |
939 | 964 | 'stabilization-def-short' => 'Por defecto', |
940 | 965 | 'stabilization-def-short-0' => 'Actual', |
941 | 966 | 'stabilization-def-short-1' => 'Publicado', |
| 967 | + 'stabilize_page_invalid' => 'El título de la página de destino es inválido.', |
| 968 | + 'stabilize_page_notexists' => 'La página de destino es no existe.', |
| 969 | + 'stabilize_page_unreviewable' => 'La página de destino no está en un espacio de nombre en el que sea posible una revisión.', |
| 970 | + 'stabilize_invalid_precedence' => 'Precedencia de versión inválida.', |
| 971 | + 'stabilize_invalid_autoreview' => 'Restricciión e autorevisión inválida.', |
| 972 | + 'stabilize_invalid_level' => 'Nivel de protección inválido.', |
942 | 973 | 'stabilize_expiry_invalid' => 'La fecha de caducidad no es válida.', |
943 | 974 | 'stabilize_expiry_old' => 'Este tiempo de expiración ya ha pasado', |
944 | 975 | 'stabilize-expiring' => 'caduca el $1 (UTC)', |
— | — | @@ -1124,6 +1155,12 @@ |
1125 | 1156 | 'stabilization-def-short' => 'Défaut', |
1126 | 1157 | 'stabilization-def-short-0' => 'Courante', |
1127 | 1158 | 'stabilization-def-short-1' => 'Publié', |
| 1159 | + 'stabilize_page_invalid' => 'Le titre de la page cible est incorrect', |
| 1160 | + 'stabilize_page_notexists' => "La page cible n'existe pas.", |
| 1161 | + 'stabilize_page_unreviewable' => "La page cible n'est pas dans un espace de noms qui peut être relu.", |
| 1162 | + 'stabilize_invalid_precedence' => 'Priorité de version invalide.', |
| 1163 | + 'stabilize_invalid_autoreview' => 'Restriction de relecture automatique invalide', |
| 1164 | + 'stabilize_invalid_level' => 'Niveau de protection invalide.', |
1128 | 1165 | 'stabilize_expiry_invalid' => "Date d'expiration invalide.", |
1129 | 1166 | 'stabilize_expiry_old' => "Cette durée d'expiration est déjà écoulée.", |
1130 | 1167 | 'stabilize-expiring' => 'Expire le $1 (UTC)', |
— | — | @@ -1231,8 +1268,15 @@ |
1232 | 1269 | 'stabilization-def-short' => 'Por defecto', |
1233 | 1270 | 'stabilization-def-short-0' => 'Actual', |
1234 | 1271 | 'stabilization-def-short-1' => 'Publicada', |
1235 | | - 'stabilize_expiry_invalid' => 'Data non válida de caducidade.', |
| 1272 | + 'stabilize_page_invalid' => 'O título da páxina de destino non é correcto.', |
| 1273 | + 'stabilize_page_notexists' => 'A páxina de destino non existe.', |
| 1274 | + 'stabilize_page_unreviewable' => 'A páxina de destino non está nun espazo de nomes que se poida revisar.', |
| 1275 | + 'stabilize_invalid_precedence' => 'Prioridade de versión incorrecta.', |
| 1276 | + 'stabilize_invalid_autoreview' => 'Restrición de revisión automática incorrecta', |
| 1277 | + 'stabilize_invalid_level' => 'Nivel de protección incorrecto.', |
| 1278 | + 'stabilize_expiry_invalid' => 'Data de caducidade non válida.', |
1236 | 1279 | 'stabilize_expiry_old' => 'O tempo de caducidade xa pasou.', |
| 1280 | + 'stabilize_denied' => 'Permisos rexeitados.', |
1237 | 1281 | 'stabilize-expiring' => 'caduca o $2 ás $3 (UTC)', |
1238 | 1282 | 'stabilization-review' => 'Marcar a revisión actual como comprobada', |
1239 | 1283 | ); |
— | — | @@ -1478,8 +1522,15 @@ |
1479 | 1523 | 'stabilization-def-short' => 'Standard', |
1480 | 1524 | 'stabilization-def-short-0' => 'Aktualny', |
1481 | 1525 | 'stabilization-def-short-1' => 'Wozjewjeny', |
| 1526 | + 'stabilize_page_invalid' => 'Titul ciloweje strony je njepłaćiwy.', |
| 1527 | + 'stabilize_page_notexists' => 'Cilowa strona njeeksistuje.', |
| 1528 | + 'stabilize_page_unreviewable' => 'Cilowa strona w přepruwujomnym mjenowym rumje njeje.', |
| 1529 | + 'stabilize_invalid_precedence' => 'Njepłaćiwa wersijowa priorita.', |
| 1530 | + 'stabilize_invalid_autoreview' => 'Njepłaćiwe wobmjezowanje awtomatiskeho přepruwowanja', |
| 1531 | + 'stabilize_invalid_level' => 'Njepłaćiwy škitny schodźenk.', |
1482 | 1532 | 'stabilize_expiry_invalid' => 'Njepłaćiwy datum spadnjenja.', |
1483 | 1533 | 'stabilize_expiry_old' => 'Tutón čas spadnjenja je hižo zańdźeny.', |
| 1534 | + 'stabilize_denied' => 'Prawo zapowědźene.', |
1484 | 1535 | 'stabilize-expiring' => 'spadnje $1 hodź. (UTC)', |
1485 | 1536 | 'stabilization-review' => 'Aktualnu wersiju jako skontrolowanu markěrować', |
1486 | 1537 | ); |
— | — | @@ -1570,6 +1621,12 @@ |
1571 | 1622 | 'stabilization-def-short' => 'Predefinition', |
1572 | 1623 | 'stabilization-def-short-0' => 'Actual', |
1573 | 1624 | 'stabilization-def-short-1' => 'Publicate', |
| 1625 | + 'stabilize_page_invalid' => 'Le titulo del pagina de destination es invalide.', |
| 1626 | + 'stabilize_page_notexists' => 'Le pagina de destination non existe.', |
| 1627 | + 'stabilize_page_unreviewable' => 'Le pagina de destination non es in un spatio de nomines revisibile.', |
| 1628 | + 'stabilize_invalid_precedence' => 'Precedentia de versiones invalide.', |
| 1629 | + 'stabilize_invalid_autoreview' => 'Restriction de autorevision invalide.', |
| 1630 | + 'stabilize_invalid_level' => 'Nivello de protection invalide.', |
1574 | 1631 | 'stabilize_expiry_invalid' => 'Data de expiration invalide.', |
1575 | 1632 | 'stabilize_expiry_old' => 'Iste tempore de expiration ha ja passate.', |
1576 | 1633 | 'stabilize-expiring' => 'expira le $1 (UTC)', |
— | — | @@ -1701,6 +1758,7 @@ |
1702 | 1759 | * @author Hosiryuhosi |
1703 | 1760 | * @author JtFuruhata |
1704 | 1761 | * @author Whym |
| 1762 | + * @author 青子守歌 |
1705 | 1763 | */ |
1706 | 1764 | $messages['ja'] = array( |
1707 | 1765 | 'stabilization-tab' => '固定', |
— | — | @@ -1734,8 +1792,15 @@ |
1735 | 1793 | 'stabilization-def-short' => '既定表示', |
1736 | 1794 | 'stabilization-def-short-0' => '最新版', |
1737 | 1795 | 'stabilization-def-short-1' => '公開済み', |
| 1796 | + 'stabilize_page_invalid' => '指定したページ名が無効です。', |
| 1797 | + 'stabilize_page_notexists' => '指定したページ名が存在しません。', |
| 1798 | + 'stabilize_page_unreviewable' => '指定したページは査読可能な名前空間にありません。', |
| 1799 | + 'stabilize_invalid_precedence' => '無効なバージョン優先度。', |
| 1800 | + 'stabilize_invalid_autoreview' => '無効な自動査読の制限。', |
| 1801 | + 'stabilize_invalid_level' => '不正な保護レベル。', |
1738 | 1802 | 'stabilize_expiry_invalid' => '有効期限に不正な日時が設定されました。', |
1739 | 1803 | 'stabilize_expiry_old' => '有効期限に指定された日時を過ぎています。', |
| 1804 | + 'stabilize_denied' => '許可されていません。', |
1740 | 1805 | 'stabilize-expiring' => '有効期限: $1 (UTC)', |
1741 | 1806 | 'stabilization-review' => '現在の版を査読済みとする', |
1742 | 1807 | ); |
— | — | @@ -2121,6 +2186,12 @@ |
2122 | 2187 | 'stabilization-def-short' => 'Основно', |
2123 | 2188 | 'stabilization-def-short-0' => 'Моментално', |
2124 | 2189 | 'stabilization-def-short-1' => 'Објавена', |
| 2190 | + 'stabilize_page_invalid' => 'Целната страница е неважечка.', |
| 2191 | + 'stabilize_page_notexists' => 'Целната страница не постои.', |
| 2192 | + 'stabilize_page_unreviewable' => 'Целната страница не е во проверлив именски простор.', |
| 2193 | + 'stabilize_invalid_precedence' => 'Неважечко првенство на верзија.', |
| 2194 | + 'stabilize_invalid_autoreview' => 'Неважечко ограничување на автопрегледот', |
| 2195 | + 'stabilize_invalid_level' => 'Неважечко ниво на заштита.', |
2125 | 2196 | 'stabilize_expiry_invalid' => 'Погрешен датум на важност.', |
2126 | 2197 | 'stabilize_expiry_old' => 'Времето на важност веќе е поминато.', |
2127 | 2198 | 'stabilize-expiring' => 'истекува $1 (UTC)', |
— | — | @@ -2159,6 +2230,11 @@ |
2160 | 2231 | 'stabilization-def-short' => 'സ്വതവെ', |
2161 | 2232 | 'stabilization-def-short-0' => 'നിലവിലുള്ളത്', |
2162 | 2233 | 'stabilization-def-short-1' => 'പ്രസിദ്ധീകരിക്കപ്പെട്ടത്', |
| 2234 | + 'stabilize_page_invalid' => 'താളിനു ലക്ഷ്യമിട്ട പേര് അസാധുവാണ്.', |
| 2235 | + 'stabilize_page_notexists' => 'ലക്ഷ്യമിട്ട താൾ നിലവിലില്ല.', |
| 2236 | + 'stabilize_page_unreviewable' => 'ലക്ഷ്യമിട്ട താൾ സംശോധനം ചെയ്യാവുന്ന നാമമേഖലയിലല്ല.', |
| 2237 | + 'stabilize_invalid_autoreview' => 'അസാധുവായ സ്വയംസംശോധന പരിമിതപ്പെടുത്തൽ', |
| 2238 | + 'stabilize_invalid_level' => 'അസാധുവായ സംരക്ഷണ മാനം.', |
2163 | 2239 | 'stabilize_expiry_invalid' => 'അസാധുവായ കാലാവധി തീയതി.', |
2164 | 2240 | 'stabilize_expiry_old' => 'ഈ കാലാവധി സമയം കഴിഞ്ഞു പോയി.', |
2165 | 2241 | 'stabilize-expiring' => 'കാലാവധി തീരുന്നത് - $1 (UTC)', |
— | — | @@ -2327,6 +2403,12 @@ |
2328 | 2404 | 'stabilization-def-short' => 'Standaard', |
2329 | 2405 | 'stabilization-def-short-0' => 'Huidig', |
2330 | 2406 | 'stabilization-def-short-1' => 'Gepubliceerd', |
| 2407 | + 'stabilize_page_invalid' => 'De naam van de doelpagina is ongeldig.', |
| 2408 | + 'stabilize_page_notexists' => 'De doelpagina bestaat niet.', |
| 2409 | + 'stabilize_page_unreviewable' => 'De doelpagina is bevindt zich niet in een te controleren naamruimte.', |
| 2410 | + 'stabilize_invalid_precedence' => 'Ongeldig versievoorvoegsel.', |
| 2411 | + 'stabilize_invalid_autoreview' => 'Ongeldige beperking voor automatische controle', |
| 2412 | + 'stabilize_invalid_level' => 'Ongeldig beschermingsniveau.', |
2331 | 2413 | 'stabilize_expiry_invalid' => 'Ongeldige vervaldatum.', |
2332 | 2414 | 'stabilize_expiry_old' => 'Deze vervaldatum is al verstreken.', |
2333 | 2415 | 'stabilize-expiring' => 'vervalt $1 (UTC)', |
— | — | @@ -2418,6 +2500,12 @@ |
2419 | 2501 | 'stabilization-def-short' => 'Standard', |
2420 | 2502 | 'stabilization-def-short-0' => 'Nåværende', |
2421 | 2503 | 'stabilization-def-short-1' => 'Publisert', |
| 2504 | + 'stabilize_page_invalid' => 'Målsidetittelen er ugyldig.', |
| 2505 | + 'stabilize_page_notexists' => 'Målsiden finnes ikke.', |
| 2506 | + 'stabilize_page_unreviewable' => 'Målsiden er ikke i et reviderbart navnerom.', |
| 2507 | + 'stabilize_invalid_precedence' => 'Ugyldig versjonsforrang.', |
| 2508 | + 'stabilize_invalid_autoreview' => 'Ugyldig autorevideringsbegrensning', |
| 2509 | + 'stabilize_invalid_level' => 'Ugyldig beskyttelsesnivå.', |
2422 | 2510 | 'stabilize_expiry_invalid' => 'Ugyldig varighet.', |
2423 | 2511 | 'stabilize_expiry_old' => 'Varigheten har allerede utløpt.', |
2424 | 2512 | 'stabilize-expiring' => 'utgår $1 (UTC)', |
— | — | @@ -2647,6 +2735,12 @@ |
2648 | 2736 | 'stabilization-def-short' => 'Padrão', |
2649 | 2737 | 'stabilization-def-short-0' => 'Actual', |
2650 | 2738 | 'stabilization-def-short-1' => 'Publicada', |
| 2739 | + 'stabilize_page_invalid' => 'O título da página de destino é inválido.', |
| 2740 | + 'stabilize_page_notexists' => 'A página de destino não existe.', |
| 2741 | + 'stabilize_page_unreviewable' => 'A página de destino não está num espaço nominal sujeito a revisão.', |
| 2742 | + 'stabilize_invalid_precedence' => 'Precedência de versões inválida.', |
| 2743 | + 'stabilize_invalid_autoreview' => 'Restrição de auto-revisão é inválida', |
| 2744 | + 'stabilize_invalid_level' => 'Nível de protecção é inválido.', |
2651 | 2745 | 'stabilize_expiry_invalid' => 'Data de expiração inválida.', |
2652 | 2746 | 'stabilize_expiry_old' => 'Esta data de expiração já passou.', |
2653 | 2747 | 'stabilize-expiring' => 'expira às $1 (UTC)', |
— | — | @@ -2707,16 +2801,16 @@ |
2708 | 2802 | */ |
2709 | 2803 | $messages['ro'] = array( |
2710 | 2804 | 'stabilization-tab' => 'config.', |
2711 | | - 'stabilization-perm' => 'Contul tău nu are permisiunea de a schimba versiunea stabilă a configuraţiei. |
2712 | | -Iată configuraţia curentă pentru [[:$1|$1]]:', |
| 2805 | + 'stabilization-perm' => 'Contul tău nu are permisiunea de a schimba versiunea stabilă a configurației. |
| 2806 | +Iată configurația curentă pentru [[:$1|$1]]:', |
2713 | 2807 | 'stabilization-page' => 'Numele paginii:', |
2714 | | - 'stabilization-leg' => 'Confirmaţi setările versiunii stabile', |
2715 | | - 'stabilization-select' => 'Precedenta selecţie a versiunii stabile', |
2716 | | - 'stabilization-def' => 'Revizie afişată pe vizualizarea paginii implicite', |
| 2808 | + 'stabilization-leg' => 'Confirmați setările versiunii stabile', |
| 2809 | + 'stabilization-select' => 'Precedenta selecție a versiunii stabile', |
| 2810 | + 'stabilization-def' => 'Revizie afișată pe vizualizarea paginii implicite', |
2717 | 2811 | 'stabilization-def1' => 'Revizia stabilă; dacă nu există, atunci cea curentă', |
2718 | 2812 | 'stabilization-def2' => 'Revizia curentă', |
2719 | | - 'stabilization-restrict' => 'Restricţii pentru revizualizarea automată', |
2720 | | - 'stabilization-restrict-none' => 'Nicio restricţie suplimentară', |
| 2813 | + 'stabilization-restrict' => 'Restricții pentru revizualizarea automată', |
| 2814 | + 'stabilization-restrict-none' => 'Nicio restricție suplimentară', |
2721 | 2815 | 'stabilization-submit' => 'Confirmă', |
2722 | 2816 | 'stabilization-comment' => 'Motiv:', |
2723 | 2817 | 'stabilization-otherreason' => 'Alt motiv', |
— | — | @@ -2732,7 +2826,7 @@ |
2733 | 2827 | 'stabilize_expiry_invalid' => 'Data expirării incorectă.', |
2734 | 2828 | 'stabilize_expiry_old' => 'Această dată de expirare a trecut deja.', |
2735 | 2829 | 'stabilize-expiring' => 'expiră $1 (UTC)', |
2736 | | - 'stabilization-review' => 'Revizuieşte versiunea curentă', |
| 2830 | + 'stabilization-review' => 'Revizuiește versiunea curentă', |
2737 | 2831 | ); |
2738 | 2832 | |
2739 | 2833 | /** Tarandíne (Tarandíne) |
— | — | @@ -2820,8 +2914,15 @@ |
2821 | 2915 | 'stabilization-def-short' => 'по умолчанию', |
2822 | 2916 | 'stabilization-def-short-0' => 'текущая', |
2823 | 2917 | 'stabilization-def-short-1' => 'Опубликованная', |
| 2918 | + 'stabilize_page_invalid' => 'Целевое название страницы ошибочно.', |
| 2919 | + 'stabilize_page_notexists' => 'Целевой страницы не существует.', |
| 2920 | + 'stabilize_page_unreviewable' => 'Целевая страница не находится в проверяемом пространстве имён.', |
| 2921 | + 'stabilize_invalid_precedence' => 'Ошибочный приоритет версий.', |
| 2922 | + 'stabilize_invalid_autoreview' => 'Ошибочные ограничения автопроверки', |
| 2923 | + 'stabilize_invalid_level' => 'Ошибочный уровень защиты.', |
2824 | 2924 | 'stabilize_expiry_invalid' => 'Ошибочная дата истечения.', |
2825 | 2925 | 'stabilize_expiry_old' => 'Указанное время окончания действия уже прошло.', |
| 2926 | + 'stabilize_denied' => 'Доступ запрещён.', |
2826 | 2927 | 'stabilize-expiring' => 'истекает $1 (UTC)', |
2827 | 2928 | 'stabilization-review' => 'Отметить текущую версию как проверенную', |
2828 | 2929 | ); |
— | — | @@ -3102,6 +3203,7 @@ |
3103 | 3204 | |
3104 | 3205 | /** Swedish (Svenska) |
3105 | 3206 | * @author Boivie |
| 3207 | + * @author Dafer45 |
3106 | 3208 | * @author Lejonel |
3107 | 3209 | * @author M.M.S. |
3108 | 3210 | * @author Najami |
— | — | @@ -3140,10 +3242,13 @@ |
3141 | 3243 | 'stabilization-def-short' => 'Standard', |
3142 | 3244 | 'stabilization-def-short-0' => 'Senaste', |
3143 | 3245 | 'stabilization-def-short-1' => 'Publicerad', |
| 3246 | + 'stabilize_page_invalid' => 'Målsidans titel är ogiltig.', |
| 3247 | + 'stabilize_page_notexists' => 'Målsidan finns ej.', |
| 3248 | + 'stabilize_invalid_level' => 'Ogiltig skyddsnivå.', |
3144 | 3249 | 'stabilize_expiry_invalid' => 'Ogiltig varaktighet.', |
3145 | 3250 | 'stabilize_expiry_old' => 'Varaktigheten har redan löpt ut.', |
3146 | 3251 | 'stabilize-expiring' => 'upphör den $1 (UTC)', |
3147 | | - 'stabilization-review' => 'Granska den nuvarande versionen', |
| 3252 | + 'stabilization-review' => 'Markera den nuvarande revisionen som kontrollerad', |
3148 | 3253 | ); |
3149 | 3254 | |
3150 | 3255 | /** Silesian (Ślůnski) |
— | — | @@ -3403,6 +3508,12 @@ |
3404 | 3509 | 'stabilization-def-short' => 'Varsayılan', |
3405 | 3510 | 'stabilization-def-short-0' => 'Şuanki', |
3406 | 3511 | 'stabilization-def-short-1' => 'Yayımlandı', |
| 3512 | + 'stabilize_page_invalid' => 'Hedef sayfa başlığı geçersiz.', |
| 3513 | + 'stabilize_page_notexists' => 'Hedef sayfa mevcut değil.', |
| 3514 | + 'stabilize_page_unreviewable' => 'Hedef sayfa incelenebilir ad alanında değil.', |
| 3515 | + 'stabilize_invalid_precedence' => 'Geçersiz sürüm önceliği.', |
| 3516 | + 'stabilize_invalid_autoreview' => 'Geçersiz oto-inceleme kısıtlaması', |
| 3517 | + 'stabilize_invalid_level' => 'Geçersiz koruma seviyesi.', |
3407 | 3518 | 'stabilize_expiry_invalid' => 'Geçersiz sona erme tarihi.', |
3408 | 3519 | 'stabilize_expiry_old' => 'Sona erme tarihi zaten geçmiş.', |
3409 | 3520 | 'stabilize-expiring' => '$1 (UTC) tarihinde sona eriyor', |
— | — | @@ -3722,13 +3833,16 @@ |
3723 | 3834 | /** Traditional Chinese (中文(繁體)) |
3724 | 3835 | * @author Alexsh |
3725 | 3836 | * @author Gaoxuewei |
| 3837 | + * @author Horacewai2 |
3726 | 3838 | * @author Liangent |
3727 | 3839 | * @author Shinjiman |
3728 | 3840 | */ |
3729 | 3841 | $messages['zh-hant'] = array( |
3730 | 3842 | 'stabilization-tab' => '調查', |
3731 | 3843 | 'stabilization' => '穩定頁面', |
3732 | | - 'stabilization-text' => "'''更改以下的設定去調節所選擇的[[:$1|$1]]之穩定版本如何顯示。'''", |
| 3844 | + 'stabilization-text' => "'''更改以下的設定去調節所選擇的[[:$1|$1]]之穩定版本如何顯示。''' |
| 3845 | + |
| 3846 | +注意:如果那麼沒有這樣的版本,更改出版版本設定去選擇「已審核」或是「原始」版本是不會影響的。而且,有質數的版本是已被檢查的。", |
3733 | 3847 | 'stabilization-perm' => '您的賬戶並沒有權限去更改穩定版本設定。 |
3734 | 3848 | 這是[[:$1|$1]]當前的設定:', |
3735 | 3849 | 'stabilization-page' => '頁面名稱:', |
— | — | @@ -3738,8 +3852,8 @@ |
3739 | 3853 | 'stabilization-select2' => '最近複審過的修訂', |
3740 | 3854 | 'stabilization-select3' => '最近原始的修訂;如果未有,則是最近有質素或視察過的', |
3741 | 3855 | 'stabilization-def' => '在預設頁視的修訂顯示', |
3742 | | - 'stabilization-def1' => '穩定修訂;如果未有,則是現時的', |
3743 | | - 'stabilization-def2' => '現時的修訂', |
| 3856 | + 'stabilization-def1' => '穩定修訂;如果未有,則是現時或草稿', |
| 3857 | + 'stabilization-def2' => '!現時的修訂', |
3744 | 3858 | 'stabilization-restrict' => '自動審核限制', |
3745 | 3859 | 'stabilization-restrict-none' => '無其他限制', |
3746 | 3860 | 'stabilization-submit' => '確認', |
— | — | @@ -3758,8 +3872,15 @@ |
3759 | 3873 | 'stabilization-def-short' => '預設', |
3760 | 3874 | 'stabilization-def-short-0' => '現時', |
3761 | 3875 | 'stabilization-def-short-1' => '穩定', |
| 3876 | + 'stabilize_page_invalid' => '目標頁面名稱是無效的', |
| 3877 | + 'stabilize_page_notexists' => '目標頁面不存在', |
| 3878 | + 'stabilize_page_unreviewable' => '目標頁面的名字空間不是一個需要審查的名字空間。', |
| 3879 | + 'stabilize_invalid_precedence' => '無效的修訂版本。', |
| 3880 | + 'stabilize_invalid_autoreview' => '沒有自動複查權限', |
| 3881 | + 'stabilize_invalid_level' => '無效的保護水平。', |
3762 | 3882 | 'stabilize_expiry_invalid' => '無效的到期日。', |
3763 | 3883 | 'stabilize_expiry_old' => '到期日已過。', |
3764 | 3884 | 'stabilize-expiring' => '於 $1 (UTC) 到期', |
| 3885 | + 'stabilization-review' => '將此當前版本標記為已查閱', |
3765 | 3886 | ); |
3766 | 3887 | |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/language/UnreviewedPages.i18n.php |
— | — | @@ -1240,6 +1240,7 @@ |
1241 | 1241 | |
1242 | 1242 | /** Brazilian Portuguese (Português do Brasil) |
1243 | 1243 | * @author Eduardo.mps |
| 1244 | + * @author Giro720 |
1244 | 1245 | */ |
1245 | 1246 | $messages['pt-br'] = array( |
1246 | 1247 | 'unreviewedpages' => 'Páginas não analisadas', |
— | — | @@ -1248,7 +1249,7 @@ |
1249 | 1250 | 'unreviewed-diff' => 'analisar', |
1250 | 1251 | 'unreviewed-unwatched' => '(não-vigiada)', |
1251 | 1252 | 'unreviewed-watched' => '($1 {{PLURAL:$1|utilizador ativo|utilizadores ativos}} a vigiar)', |
1252 | | - 'unreviewed-list' => 'Esta página lista as páginas de conteúdo que ainda não foram analisadas.', |
| 1253 | + 'unreviewed-list' => 'Esta página lista as páginas de conteúdo que não foram revistas até ao nível escolhido.', |
1253 | 1254 | 'unreviewed-none' => 'No momento não há páginas que se enquadrem nestes critérios', |
1254 | 1255 | 'unreviewed-viewing' => '(sob análise)', |
1255 | 1256 | 'unreviewed-hours' => '($1 {{PLURAL:$1|hora|horas}})', |
— | — | @@ -1262,14 +1263,14 @@ |
1263 | 1264 | */ |
1264 | 1265 | $messages['ro'] = array( |
1265 | 1266 | 'unreviewedpages' => 'Pagini nerevizuite', |
1266 | | - 'unreviewed-legend' => 'Afişează pagini cu conţinut nerevizuit', |
| 1267 | + 'unreviewed-legend' => 'Afișează pagini cu conținut nerevizuit', |
1267 | 1268 | 'unreviewed-category' => 'Categorie:', |
1268 | 1269 | 'unreviewed-diff' => 'recenzie', |
1269 | 1270 | 'unreviewed-unwatched' => '(neurmărit)', |
1270 | | - 'unreviewed-watched' => '($1 {{PLURAL:$1|utilizator activ care urmăreşte|utilizatori activi care urmăresc}})', |
| 1271 | + 'unreviewed-watched' => '($1 {{PLURAL:$1|utilizator activ care urmărește|utilizatori activi care urmăresc}})', |
1271 | 1272 | 'unreviewed-hours' => '($1 {{PLURAL:$1|oră|ore}})', |
1272 | 1273 | 'unreviewed-days' => '($1 {{PLURAL:$1|zi|zile}})', |
1273 | | - 'unreviewed-recent' => '(mai puţin de 1 oră)', |
| 1274 | + 'unreviewed-recent' => '(mai puțin de 1 oră)', |
1274 | 1275 | ); |
1275 | 1276 | |
1276 | 1277 | /** Tarandíne (Tarandíne) |
Index: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha/FlaggedRevs.class.php |
— | — | @@ -96,7 +96,7 @@ |
97 | 97 | self::$patrolNamespaces = $wgFlaggedRevsPatrolNamespaces; |
98 | 98 | } |
99 | 99 | |
100 | | - # ################ Basic accessors ################# |
| 100 | + # ################ Basic config accessors ################# |
101 | 101 | |
102 | 102 | /** |
103 | 103 | * Is there only one tag and it has only one level? |
— | — | @@ -255,32 +255,6 @@ |
256 | 256 | } |
257 | 257 | |
258 | 258 | /** |
259 | | - * Find what protection level a config is in |
260 | | - * @param array $config |
261 | | - * @returns string |
262 | | - */ |
263 | | - public static function getProtectionLevel( array $config ) { |
264 | | - if ( !self::useProtectionLevels() ) { |
265 | | - throw new MWException( 'getProtectionLevel() called with $wgFlaggedRevsProtection off' ); |
266 | | - } |
267 | | - $defaultConfig = self::getDefaultVisibilitySettings(); |
268 | | - # Check if the page is not protected at all... |
269 | | - if ( $config['override'] == $defaultConfig['override'] |
270 | | - && $config['autoreview'] == $defaultConfig['autoreview'] ) |
271 | | - { |
272 | | - return "none"; // not protected |
273 | | - } |
274 | | - # All protection levels have 'override' on |
275 | | - if ( $config['override'] ) { |
276 | | - # The levels are defined by the 'autoreview' settings |
277 | | - if ( in_array( $config['autoreview'], self::getRestrictionLevels() ) ) { |
278 | | - return $config['autoreview']; |
279 | | - } |
280 | | - } |
281 | | - return "invalid"; |
282 | | - } |
283 | | - |
284 | | - /** |
285 | 259 | * Get the autoreview restriction levels available |
286 | 260 | * @returns array |
287 | 261 | */ |
— | — | @@ -419,82 +393,92 @@ |
420 | 394 | return str_replace( '$wgScriptPath', $wgScriptPath, $wgFlaggedRevsStylePath ); |
421 | 395 | } |
422 | 396 | |
| 397 | + # ################ Permission functions ################# |
| 398 | + |
423 | 399 | /** |
424 | | - * Get global revision status precedence setting |
425 | | - * or a specific one if given a tag tier (e.g. FR_QUALITY). |
426 | | - * Returns one of FLAGGED_VIS_PRISTINE, FLAGGED_VIS_QUALITY, FLAGGED_VIS_LATEST. |
427 | | - * |
428 | | - * @param int config tier, optional (FR_PRISTINE,FR_QUALITY,FR_SIGHTED) |
429 | | - * @return int |
| 400 | + * Returns true if a user can set $tag to $value. |
| 401 | + * @param string $tag |
| 402 | + * @param int $value |
| 403 | + * @returns bool |
430 | 404 | */ |
431 | | - public static function getPrecedence( $configTier = null ) { |
432 | | - global $wgFlaggedRevsPrecedence; |
433 | | - if ( is_null( $configTier ) ) { |
434 | | - $configTier = (int)$wgFlaggedRevsPrecedence; |
| 405 | + public static function userCanSetTag( $tag, $value ) { |
| 406 | + global $wgUser; |
| 407 | + # Sanity check tag and value |
| 408 | + $levels = self::getTagLevels( $tag ); |
| 409 | + $highest = count( $levels ) - 1; |
| 410 | + if( !$levels || $value < 0 || $value > $highest ) { |
| 411 | + return false; // flag range is invalid |
435 | 412 | } |
436 | | - switch( $configTier ) |
437 | | - { |
438 | | - case FR_PRISTINE: |
439 | | - $select = FLAGGED_VIS_PRISTINE; |
440 | | - break; |
441 | | - case FR_QUALITY: |
442 | | - $select = FLAGGED_VIS_QUALITY; |
443 | | - break; |
444 | | - default: |
445 | | - $select = FLAGGED_VIS_LATEST; |
446 | | - break; |
| 413 | + $restrictions = self::getTagRestrictions(); |
| 414 | + # No restrictions -> full access |
| 415 | + if ( !isset( $restrictions[$tag] ) ) { |
| 416 | + return true; |
447 | 417 | } |
448 | | - return $select; |
| 418 | + # Validators always have full access |
| 419 | + if ( $wgUser->isAllowed( 'validate' ) ) { |
| 420 | + return true; |
| 421 | + } |
| 422 | + # Check if this user has any right that lets him/her set |
| 423 | + # up to this particular value |
| 424 | + foreach ( $restrictions[$tag] as $right => $level ) { |
| 425 | + if ( $value <= $level && $level > 0 && $wgUser->isAllowed( $right ) ) { |
| 426 | + return true; |
| 427 | + } |
| 428 | + } |
| 429 | + return false; |
449 | 430 | } |
450 | | - |
| 431 | + |
451 | 432 | /** |
452 | | - * Get minimum level tags for a tier |
453 | | - * @return array |
| 433 | + * Returns true if a user can set $flags. |
| 434 | + * This checks if the user has the right to review |
| 435 | + * to the given levels for each tag. |
| 436 | + * @param array $flags, suggested flags |
| 437 | + * @param array $oldflags, pre-existing flags |
| 438 | + * @returns bool |
454 | 439 | */ |
455 | | - public static function quickTags( $tier ) { |
456 | | - self::load(); |
457 | | - switch( $tier ) // select reference levels |
458 | | - { |
459 | | - case FR_PRISTINE: |
460 | | - $minLevels = self::$minPL; |
461 | | - case FR_QUALITY: |
462 | | - $minLevels = self::$minQL; |
463 | | - default: |
464 | | - $minLevels = self::$minSL; |
| 440 | + public static function userCanSetFlags( $flags, $oldflags = array() ) { |
| 441 | + global $wgUser; |
| 442 | + if ( !$wgUser->isAllowed( 'review' ) ) |
| 443 | + return false; // User is not able to review pages |
| 444 | + # Check if all of the required site flags have a valid value |
| 445 | + # that the user is allowed to set. |
| 446 | + foreach ( self::getDimensions() as $qal => $levels ) { |
| 447 | + $level = isset( $flags[$qal] ) ? $flags[$qal] : 0; |
| 448 | + $highest = count( $levels ) - 1; // highest valid level |
| 449 | + if ( !self::userCanSetTag( $qal, $level ) ) { |
| 450 | + return false; // user cannot set proposed flag |
| 451 | + } elseif ( isset( $oldflags[$qal] ) |
| 452 | + && !self::userCanSetTag( $qal, $oldflags[$qal] ) ) |
| 453 | + { |
| 454 | + return false; // user cannot change old flag |
| 455 | + } |
465 | 456 | } |
466 | | - $flags = array(); |
467 | | - foreach ( self::getDimensions() as $tag => $x ) { |
468 | | - $flags[$tag] = $minLevels[$tag]; |
469 | | - } |
470 | | - return $flags; |
| 457 | + return true; |
471 | 458 | } |
472 | 459 | |
473 | 460 | /** |
474 | | - * Get minimum tags that are closest to $oldFlags |
475 | | - * given the site, page, and user rights limitations. |
476 | | - * @param array $oldFlags previous stable rev flags |
477 | | - * @param array $config |
478 | | - * @return mixed array or null |
479 | | - */ |
480 | | - public static function getAutoReviewTags( $oldFlags, array $config = array() ) { |
481 | | - if ( !FlaggedRevs::autoReviewEdits() ) { |
482 | | - return null; // shouldn't happen |
| 461 | + * Check if a user can set the autoreview restiction level to $right |
| 462 | + * @param string $right the level |
| 463 | + * @returns bool |
| 464 | + */ |
| 465 | + public static function userCanSetAutoreviewLevel( $right ) { |
| 466 | + global $wgUser; |
| 467 | + if ( $right == '' ) { |
| 468 | + return true; // no restrictions (none) |
483 | 469 | } |
484 | | - $flags = array(); |
485 | | - foreach ( self::getDimensions() as $tag => $levels ) { |
486 | | - # Try to keep this tag val the same as the stable rev's |
487 | | - $val = isset( $oldFlags[$tag] ) ? $oldFlags[$tag] : 1; |
488 | | - $val = min( $val, self::maxAutoReviewLevel( $tag ) ); |
489 | | - # Dial down the level to one the user has permission to set |
490 | | - while ( !RevisionReview::userCan( $tag, $val ) ) { |
491 | | - $val--; |
492 | | - if ( $val <= 0 ) { |
493 | | - return null; // all tags vals must be > 0 |
494 | | - } |
| 470 | + if ( !in_array( $right, FlaggedRevs::getRestrictionLevels() ) ) { |
| 471 | + return false; // invalid restriction level |
| 472 | + } |
| 473 | + # Don't let them choose levels above their own rights |
| 474 | + if ( $right == 'sysop' ) { |
| 475 | + // special case, rewrite sysop to protect and editprotected |
| 476 | + if ( !$wgUser->isAllowed( 'protect' ) && !$wgUser->isAllowed( 'editprotected' ) ) { |
| 477 | + return false; |
495 | 478 | } |
496 | | - $flags[$tag] = $val; |
| 479 | + } else if ( !$wgUser->isAllowed( $right ) ) { |
| 480 | + return false; |
497 | 481 | } |
498 | | - return $flags; |
| 482 | + return true; |
499 | 483 | } |
500 | 484 | |
501 | 485 | # ################ Parsing functions ################# |
— | — | @@ -510,7 +494,7 @@ |
511 | 495 | global $wgParser; |
512 | 496 | # Make our hooks trigger (force unstub so setting doesn't get lost) |
513 | 497 | $wgParser->firstCallInit(); |
514 | | - $wgParser->fr_isStable = ( FlaggedRevs::inclusionSetting() != FR_INCLUDES_CURRENT ); |
| 498 | + $wgParser->fr_isStable = ( self::inclusionSetting() != FR_INCLUDES_CURRENT ); |
515 | 499 | # Parse with default options |
516 | 500 | $options = self::makeParserOptions(); |
517 | 501 | $outputText = $wgParser->preprocess( $text, $title, $options, $id ); |
— | — | @@ -535,7 +519,7 @@ |
536 | 520 | $title = $article->getTitle(); // avoid pass-by-reference error |
537 | 521 | # Make our hooks trigger (force unstub so setting doesn't get lost) |
538 | 522 | $wgParser->firstCallInit(); |
539 | | - $wgParser->fr_isStable = ( FlaggedRevs::inclusionSetting() != FR_INCLUDES_CURRENT ); |
| 523 | + $wgParser->fr_isStable = ( self::inclusionSetting() != FR_INCLUDES_CURRENT ); |
540 | 524 | # Don't show section-edit links, they can be old and misleading |
541 | 525 | $options = self::makeParserOptions(); |
542 | 526 | # Parse the new body, wikitext -> html |
— | — | @@ -760,7 +744,7 @@ |
761 | 745 | } |
762 | 746 | } |
763 | 747 | # If using the current version of includes, there is nothing else to check. |
764 | | - if ( FlaggedRevs::inclusionSetting() == FR_INCLUDES_CURRENT ) { |
| 748 | + if ( self::inclusionSetting() == FR_INCLUDES_CURRENT ) { |
765 | 749 | return true; |
766 | 750 | } |
767 | 751 | # Try the cache... |
— | — | @@ -1221,7 +1205,34 @@ |
1222 | 1206 | ); |
1223 | 1207 | } |
1224 | 1208 | |
| 1209 | + |
1225 | 1210 | /** |
| 1211 | + * Find what protection level a config is in |
| 1212 | + * @param array $config |
| 1213 | + * @returns string |
| 1214 | + */ |
| 1215 | + public static function getProtectionLevel( array $config ) { |
| 1216 | + if ( !self::useProtectionLevels() ) { |
| 1217 | + throw new MWException( 'getProtectionLevel() called with $wgFlaggedRevsProtection off' ); |
| 1218 | + } |
| 1219 | + $defaultConfig = self::getDefaultVisibilitySettings(); |
| 1220 | + # Check if the page is not protected at all... |
| 1221 | + if ( $config['override'] == $defaultConfig['override'] |
| 1222 | + && $config['autoreview'] == '' ) |
| 1223 | + { |
| 1224 | + return "none"; // not protected |
| 1225 | + } |
| 1226 | + # All protection levels have 'override' on |
| 1227 | + if ( $config['override'] ) { |
| 1228 | + # The levels are defined by the 'autoreview' settings |
| 1229 | + if ( in_array( $config['autoreview'], self::getRestrictionLevels() ) ) { |
| 1230 | + return $config['autoreview']; |
| 1231 | + } |
| 1232 | + } |
| 1233 | + return "invalid"; |
| 1234 | + } |
| 1235 | + |
| 1236 | + /** |
1226 | 1237 | * Check if an fpc_select value is valid |
1227 | 1238 | * @param int $select |
1228 | 1239 | */ |
— | — | @@ -1238,7 +1249,7 @@ |
1239 | 1250 | if ( $right == '' ) { |
1240 | 1251 | return true; // no restrictions (none) |
1241 | 1252 | } |
1242 | | - return in_array( $right, FlaggedRevs::getRestrictionLevels(), true ); |
| 1253 | + return in_array( $right, self::getRestrictionLevels(), true ); |
1243 | 1254 | } |
1244 | 1255 | |
1245 | 1256 | /** |
— | — | @@ -1261,7 +1272,7 @@ |
1262 | 1273 | // If FlaggedRevs got "turned off" for this page (due to not |
1263 | 1274 | // having the stable version as the default), then clear it |
1264 | 1275 | // from the tracking tables... |
1265 | | - if ( !$config['override'] && FlaggedRevs::forDefaultVersionOnly() ) { |
| 1276 | + if ( !$config['override'] && self::forDefaultVersionOnly() ) { |
1266 | 1277 | $pagesClearTracking[] = $row->fpc_page_id; // no stable version |
1267 | 1278 | // Check if the new (default) config has a different way |
1268 | 1279 | // of selecting the stable version of this page... |
— | — | @@ -1350,6 +1361,84 @@ |
1351 | 1362 | } |
1352 | 1363 | |
1353 | 1364 | /** |
| 1365 | + * Get global revision status precedence setting |
| 1366 | + * or a specific one if given a tag tier (e.g. FR_QUALITY). |
| 1367 | + * Returns one of FLAGGED_VIS_PRISTINE, FLAGGED_VIS_QUALITY, FLAGGED_VIS_LATEST. |
| 1368 | + * |
| 1369 | + * @param int config tier, optional (FR_PRISTINE,FR_QUALITY,FR_SIGHTED) |
| 1370 | + * @return int |
| 1371 | + */ |
| 1372 | + public static function getPrecedence( $configTier = null ) { |
| 1373 | + global $wgFlaggedRevsPrecedence; |
| 1374 | + if ( is_null( $configTier ) ) { |
| 1375 | + $configTier = (int)$wgFlaggedRevsPrecedence; |
| 1376 | + } |
| 1377 | + switch( $configTier ) |
| 1378 | + { |
| 1379 | + case FR_PRISTINE: |
| 1380 | + $select = FLAGGED_VIS_PRISTINE; |
| 1381 | + break; |
| 1382 | + case FR_QUALITY: |
| 1383 | + $select = FLAGGED_VIS_QUALITY; |
| 1384 | + break; |
| 1385 | + default: |
| 1386 | + $select = FLAGGED_VIS_LATEST; |
| 1387 | + break; |
| 1388 | + } |
| 1389 | + return $select; |
| 1390 | + } |
| 1391 | + |
| 1392 | + /** |
| 1393 | + * Get minimum level tags for a tier |
| 1394 | + * @return array |
| 1395 | + */ |
| 1396 | + public static function quickTags( $tier ) { |
| 1397 | + self::load(); |
| 1398 | + switch( $tier ) // select reference levels |
| 1399 | + { |
| 1400 | + case FR_PRISTINE: |
| 1401 | + $minLevels = self::$minPL; |
| 1402 | + case FR_QUALITY: |
| 1403 | + $minLevels = self::$minQL; |
| 1404 | + default: |
| 1405 | + $minLevels = self::$minSL; |
| 1406 | + } |
| 1407 | + $flags = array(); |
| 1408 | + foreach ( self::getDimensions() as $tag => $x ) { |
| 1409 | + $flags[$tag] = $minLevels[$tag]; |
| 1410 | + } |
| 1411 | + return $flags; |
| 1412 | + } |
| 1413 | + |
| 1414 | + /** |
| 1415 | + * Get minimum tags that are closest to $oldFlags |
| 1416 | + * given the site, page, and user rights limitations. |
| 1417 | + * @param array $oldFlags previous stable rev flags |
| 1418 | + * @param array $config |
| 1419 | + * @return mixed array or null |
| 1420 | + */ |
| 1421 | + public static function getAutoReviewTags( $oldFlags, array $config = array() ) { |
| 1422 | + if ( !self::autoReviewEdits() ) { |
| 1423 | + return null; // shouldn't happen |
| 1424 | + } |
| 1425 | + $flags = array(); |
| 1426 | + foreach ( self::getDimensions() as $tag => $levels ) { |
| 1427 | + # Try to keep this tag val the same as the stable rev's |
| 1428 | + $val = isset( $oldFlags[$tag] ) ? $oldFlags[$tag] : 1; |
| 1429 | + $val = min( $val, self::maxAutoReviewLevel( $tag ) ); |
| 1430 | + # Dial down the level to one the user has permission to set |
| 1431 | + while ( !self::userCanSetTag( $tag, $val ) ) { |
| 1432 | + $val--; |
| 1433 | + if ( $val <= 0 ) { |
| 1434 | + return null; // all tags vals must be > 0 |
| 1435 | + } |
| 1436 | + } |
| 1437 | + $flags[$tag] = $val; |
| 1438 | + } |
| 1439 | + return $flags; |
| 1440 | + } |
| 1441 | + |
| 1442 | + /** |
1354 | 1443 | * Get the list of reviewable namespaces |
1355 | 1444 | * @return array |
1356 | 1445 | */ |
— | — | @@ -1590,7 +1679,7 @@ |
1591 | 1680 | # We can set the sync cache key already. |
1592 | 1681 | global $wgParserCacheExpireTime; |
1593 | 1682 | $key = wfMemcKey( 'flaggedrevs', 'includesSynced', $article->getId() ); |
1594 | | - $data = FlaggedRevs::makeMemcObj( "true" ); |
| 1683 | + $data = self::makeMemcObj( "true" ); |
1595 | 1684 | $wgMemc->set( $key, $data, $wgParserCacheExpireTime ); |
1596 | 1685 | } else if ( $sv ) { |
1597 | 1686 | # Update tracking table |
Property changes on: branches/wmf/1.16wmf4/extensions/FlaggedRevs_alpha |
___________________________________________________________________ |
Modified: svn:mergeinfo |
1598 | 1687 | Merged /trunk/extensions/FlaggedRevs:r66345,66384-66669 |