Index: trunk/extensions/FlaggedRevs/FlaggedRevs.php |
— | — | @@ -438,9 +438,6 @@ |
439 | 439 | $wgHooks['BeforeParserFetchTemplateAndtitle'][] = 'FlaggedRevsHooks::parserFetchStableTemplate'; |
440 | 440 | $wgHooks['BeforeParserMakeImageLinkObj'][] = 'FlaggedRevsHooks::parserFetchStableFile'; |
441 | 441 | $wgHooks['BeforeGalleryFindFile'][] = 'FlaggedRevsHooks::galleryFetchStableFile'; |
442 | | -# Additional parser versioning |
443 | | -$wgHooks['ParserAfterTidy'][] = 'FlaggedRevsHooks::parserInjectTimestamps'; |
444 | | -$wgHooks['OutputPageParserOutput'][] = 'FlaggedRevsHooks::outputInjectTimestamps'; |
445 | 442 | # ######## |
446 | 443 | |
447 | 444 | # ######## DB write operations ######### |
— | — | @@ -631,4 +628,4 @@ |
632 | 629 | } |
633 | 630 | |
634 | 631 | # B/C ... |
635 | | -$wgLogActions['rights/erevoke'] = 'rights-editor-revoke'; |
| 632 | +$wgLogActions['rights/erevoke'] = 'rights-editor-revoke'; |
\ No newline at end of file |
Index: trunk/extensions/FlaggedRevs/maintenance/tests/FRInclusionManagerTest.php |
— | — | @@ -8,11 +8,11 @@ |
9 | 9 | 0 => array('ZZ' => 464, '0' => 13) |
10 | 10 | ); |
11 | 11 | protected static $inputFiles = array( |
12 | | - 'FileXX' => array('ts' => '20100405192110', 'sha1' => 'abc1'), |
13 | | - 'FileYY' => array('ts' => '20000403101300', 'sha1' => 1134), |
14 | | - 'FileZZ' => array('ts' => '0', 'sha1' => ''), |
15 | | - 'Filele' => array('ts' => 0, 'sha1' => ''), |
16 | | - '0' => array('ts' => '20000203101350', 'sha1' => 'ae33'), |
| 12 | + 'FileXX' => array('time' => '20100405192110', 'sha1' => 'abc1'), |
| 13 | + 'FileYY' => array('time' => '20000403101300', 'sha1' => 1134), |
| 14 | + 'FileZZ' => array('time' => '0', 'sha1' => ''), |
| 15 | + 'Filele' => array('time' => 0, 'sha1' => ''), |
| 16 | + '0' => array('time' => '20000203101350', 'sha1' => 'ae33'), |
17 | 17 | ); |
18 | 18 | /* output to test against (<test,NS,dbkey,expected rev ID>) */ |
19 | 19 | protected static $reviewedOutputTemplates = array( |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php |
— | — | @@ -652,7 +652,7 @@ |
653 | 653 | /** |
654 | 654 | * @param Article $article |
655 | 655 | * @param parserOutput $parserOut |
656 | | - * Updates the stable-only cache dependancy table |
| 656 | + * Updates the stable-only cache dependency table |
657 | 657 | */ |
658 | 658 | public static function updateCacheTracking( Article $article, ParserOutput $stableOut ) { |
659 | 659 | wfProfileIn( __METHOD__ ); |
— | — | @@ -1269,7 +1269,7 @@ |
1270 | 1270 | 'img_timestamp' => $fileData['timestamp'], |
1271 | 1271 | 'img_sha1' => $fileData['sha1'], |
1272 | 1272 | 'templateVersions' => $poutput->mTemplateIds, |
1273 | | - 'fileVersions' => $poutput->fr_fileSHA1Keys |
| 1273 | + 'fileVersions' => $poutput->mImageTimeKeys |
1274 | 1274 | ) ); |
1275 | 1275 | $flaggedRevision->insertOn( $auto ); |
1276 | 1276 | # Update the article review log |
Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php |
— | — | @@ -542,7 +542,7 @@ |
543 | 543 | * Get template and image parameters from parser output to use on forms. |
544 | 544 | * @param FlaggedArticle $article |
545 | 545 | * @param array $templateIDs (from ParserOutput/OutputPage->mTemplateIds) |
546 | | - * @param array $imageSHA1Keys (from ParserOutput/OutputPage->fr_fileSHA1Keys) |
| 546 | + * @param array $imageSHA1Keys (from ParserOutput/OutputPage->mImageTimeKeys) |
547 | 547 | * @returns array( templateParams, imageParams, fileVersion ) |
548 | 548 | */ |
549 | 549 | public static function getIncludeParams( |
— | — | @@ -558,7 +558,7 @@ |
559 | 559 | } |
560 | 560 | # Image -> timestamp -> sha1 mapping |
561 | 561 | foreach ( $imageSHA1Keys as $dbKey => $timeAndSHA1 ) { |
562 | | - $imageParams .= $dbKey . "|" . $timeAndSHA1['ts']; |
| 562 | + $imageParams .= $dbKey . "|" . $timeAndSHA1['time']; |
563 | 563 | $imageParams .= "|" . $timeAndSHA1['sha1'] . "#"; |
564 | 564 | } |
565 | 565 | # For image pages, note the displayed image version |
— | — | @@ -577,7 +577,7 @@ |
578 | 578 | * @param string $imageParams |
579 | 579 | * @returns array( templateIds, fileSHA1Keys ) |
580 | 580 | * templateIds like ParserOutput->mTemplateIds |
581 | | - * fileSHA1Keys like ParserOutput->fr_fileSHA1Keys |
| 581 | + * fileSHA1Keys like ParserOutput->mImageTimeKeys |
582 | 582 | */ |
583 | 583 | public static function getIncludeVersions( $templateParams, $imageParams ) { |
584 | 584 | $templateIds = array(); |
— | — | @@ -613,15 +613,15 @@ |
614 | 614 | if ( !isset( $m[0] ) || !isset( $m[1] ) || !isset( $m[2] ) || !$m[0] ) { |
615 | 615 | continue; |
616 | 616 | } |
617 | | - list( $dbkey, $timestamp, $key ) = $m; |
| 617 | + list( $dbkey, $time, $key ) = $m; |
618 | 618 | # Get the file title |
619 | 619 | $img_title = Title::makeTitle( NS_IMAGE, $dbkey ); // Normalize |
620 | 620 | if ( is_null( $img_title ) ) { |
621 | 621 | continue; // Page must be valid! |
622 | 622 | } |
623 | 623 | $fileSHA1Keys[$img_title->getDBkey()] = array(); |
624 | | - $fileSHA1Keys[$img_title->getDBkey()]['ts'] = $timestamp; |
625 | | - $fileSHA1Keys[$img_title->getDBkey()]['sha1'] = $key; |
| 624 | + $fileSHA1Keys[$img_title->getDBkey()]['time'] = $time ? $time : '0'; |
| 625 | + $fileSHA1Keys[$img_title->getDBkey()]['sha1'] = $key ? $key : ''; |
626 | 626 | } |
627 | 627 | return array( $templateIds, $fileSHA1Keys ); |
628 | 628 | } |
— | — | @@ -753,7 +753,7 @@ |
754 | 754 | $pOutput = $parserCache->get( $article, $wgOut->parserOptions() ); |
755 | 755 | } |
756 | 756 | # Otherwise (or on cache miss), parse the rev text... |
757 | | - if ( !$pOutput || !isset( $pOutput->fr_fileSHA1Keys ) ) { |
| 757 | + if ( !$pOutput || !isset( $pOutput->mImageTimeKeys ) ) { |
758 | 758 | $text = $rev->getText(); |
759 | 759 | $title = $article->getTitle(); |
760 | 760 | $options = FlaggedRevs::makeParserOptions(); |
— | — | @@ -765,7 +765,7 @@ |
766 | 766 | } |
767 | 767 | } |
768 | 768 | $templateIDs = $pOutput->mTemplateIds; |
769 | | - $imageSHA1Keys = $pOutput->fr_fileSHA1Keys; |
| 769 | + $imageSHA1Keys = $pOutput->mImageTimeKeys; |
770 | 770 | } |
771 | 771 | list( $templateParams, $imageParams, $fileVersion ) = |
772 | 772 | RevisionReviewForm::getIncludeParams( $article, $templateIDs, $imageSHA1Keys ); |
Index: trunk/extensions/FlaggedRevs/FlaggedRevision.php |
— | — | @@ -292,7 +292,8 @@ |
293 | 293 | 'fi_name' => $dbkey, |
294 | 294 | 'fi_img_sha1' => strval( $timeSHA1['sha1'] ), |
295 | 295 | // b/c: fi_img_timestamp DEFAULT either NULL (new) or '' (old) |
296 | | - 'fi_img_timestamp' => $timeSHA1['ts'] ? $dbw->timestamp( $timeSHA1['ts'] ) : '' |
| 296 | + 'fi_img_timestamp' => $timeSHA1['time'] ? |
| 297 | + $dbw->timestamp( $timeSHA1['time'] ) : '' |
297 | 298 | ); |
298 | 299 | } |
299 | 300 | # Our review entry |
— | — | @@ -496,7 +497,7 @@ |
497 | 498 | /** |
498 | 499 | * Get original template versions at time of review |
499 | 500 | * @param int $flags FR_MASTER |
500 | | - * @return Array file versions (dbKey => array('ts' => MW timestamp,'sha1' => sha1) ) |
| 501 | + * @return Array file versions (dbKey => array('time' => MW timestamp,'sha1' => sha1) ) |
501 | 502 | * Note: '0' used for file timestamp if it didn't exist ('' for sha1) |
502 | 503 | */ |
503 | 504 | public function getFileVersions( $flags = 0 ) { |
— | — | @@ -513,7 +514,7 @@ |
514 | 515 | $reviewedTS = trim( $row->fi_img_timestamp ); // may be ''/NULL |
515 | 516 | $reviewedTS = $reviewedTS ? wfTimestamp( TS_MW, $reviewedTS ) : '0'; |
516 | 517 | $this->mFiles[$row->fi_name] = array(); |
517 | | - $this->mFiles[$row->fi_name]['ts'] = $reviewedTS; |
| 518 | + $this->mFiles[$row->fi_name]['time'] = $reviewedTS; |
518 | 519 | $this->mFiles[$row->fi_name]['sha1'] = $row->fi_img_sha1; |
519 | 520 | } |
520 | 521 | } |
— | — | @@ -557,7 +558,7 @@ |
558 | 559 | /** |
559 | 560 | * Get the current stable version of the files used at time of review |
560 | 561 | * @param int $flags FR_MASTER |
561 | | - * @return Array file versions (dbKey => array('ts' => MW timestamp,'sha1' => sha1) ) |
| 562 | + * @return Array file versions (dbKey => array('time' => MW timestamp,'sha1' => sha1) ) |
562 | 563 | * Note: '0' used for file timestamp if it doesn't exist ('' for sha1) |
563 | 564 | */ |
564 | 565 | public function getStableFileVersions( $flags = 0 ) { |
— | — | @@ -587,7 +588,7 @@ |
588 | 589 | $reviewedSha1 = strval( $row->fr_img_sha1 ); |
589 | 590 | } |
590 | 591 | $this->mStableFiles[$row->fi_name] = array(); |
591 | | - $this->mStableFiles[$row->fi_name]['ts'] = $reviewedTS; |
| 592 | + $this->mStableFiles[$row->fi_name]['time'] = $reviewedTS; |
592 | 593 | $this->mStableFiles[$row->fi_name]['sha1'] = $reviewedSha1; |
593 | 594 | } |
594 | 595 | } |
— | — | @@ -714,7 +715,7 @@ |
715 | 716 | if ( FlaggedRevs::inclusionSetting() == FR_INCLUDES_STABLE ) { |
716 | 717 | $stableTS = wfTimestampOrNull( TS_MW, $row->fr_img_timestamp ); |
717 | 718 | # Select newest of (stable rev, rev when reviewed) as "version used" |
718 | | - $tsStable = ( $stableTS >= $reviewedTS ) ? $stableTS : $reviewedTS; |
| 719 | + $tsStable = max( $stableTS, $reviewedTS ); |
719 | 720 | } else { |
720 | 721 | $tsStable = $reviewedTS; |
721 | 722 | } |
Index: trunk/extensions/FlaggedRevs/FlaggedRevs.hooks.php |
— | — | @@ -288,8 +288,7 @@ |
289 | 289 | * Add special fields to parser. |
290 | 290 | */ |
291 | 291 | public static function parserAddFields( Parser $parser ) { |
292 | | - $parser->mOutput->fr_fileSHA1Keys = array(); |
293 | | - $parser->mOutput->fr_includeErrors = array(); |
| 292 | + $parser->getOutput()->fr_includeErrors = array(); |
294 | 293 | return true; |
295 | 294 | } |
296 | 295 | |
— | — | @@ -321,7 +320,7 @@ |
322 | 321 | } |
323 | 322 | # If $id not specified, see if we are allowed to use the current revision |
324 | 323 | if ( $id === false ) { |
325 | | - $parser->mOutput->fr_includeErrors[] = $title->getPrefixedDBKey(); // unspecified |
| 324 | + $parser->getOutput()->fr_includeErrors[] = $title->getPrefixedDBKey(); // unspecified |
326 | 325 | # If $id is zero, don't bother loading it |
327 | 326 | } elseif ( !$id ) { |
328 | 327 | $skip = true; |
— | — | @@ -331,7 +330,7 @@ |
332 | 331 | |
333 | 332 | /** |
334 | 333 | * (a) Select the desired images based on the selected stable version time/SHA-1 |
335 | | - * (b) Set specified versions in fr_fileSHA1Keys |
| 334 | + * (b) Set specified versions in mImageTimeKeys |
336 | 335 | */ |
337 | 336 | public static function parserFetchStableFile( |
338 | 337 | $parser, Title $nt, &$skip, &$time, &$query, &$sha1 |
— | — | @@ -349,7 +348,7 @@ |
350 | 349 | } else { |
351 | 350 | $title =& $nt; |
352 | 351 | } |
353 | | - # Get version, update fr_fileSHA1Keys... |
| 352 | + # Get version, update mImageTimeKeys... |
354 | 353 | list( $time, $sha1 ) = self::parserFindStableFile( $parser, $title ); |
355 | 354 | # Stabilize the file link |
356 | 355 | if ( $time ) { |
— | — | @@ -361,7 +360,7 @@ |
362 | 361 | |
363 | 362 | /** |
364 | 363 | * (a) Select the desired images based on the selected stable version time/SHA-1 |
365 | | - * (b) Set specified versions in fr_fileSHA1Keys |
| 364 | + * (b) Set specified versions in mImageTimeKeys |
366 | 365 | */ |
367 | 366 | public static function galleryFetchStableFile( $ig, Title $nt, &$time, &$query, &$sha1 ) { |
368 | 367 | $parser =& $ig->mParser; // convenience |
— | — | @@ -371,7 +370,7 @@ |
372 | 371 | if ( !FRInclusionManager::singleton()->parserOutputIsStabilized() ) { |
373 | 372 | return true; // trigger for stable version parsing only |
374 | 373 | } |
375 | | - # Get version, update fr_fileSHA1Keys... |
| 374 | + # Get version, update mImageTimeKeys... |
376 | 375 | list( $time, $sha1 ) = self::parserFindStableFile( $parser, $nt ); |
377 | 376 | # Stabilize the file link |
378 | 377 | if ( $time ) { |
— | — | @@ -383,7 +382,7 @@ |
384 | 383 | |
385 | 384 | /** |
386 | 385 | * (a) Select the desired images based on the selected stable version time/SHA-1 |
387 | | - * (b) Set specified versions in fr_fileSHA1Keys |
| 386 | + * (b) Set specified versions in mImageTimeKeys |
388 | 387 | */ |
389 | 388 | protected static function parserFindStableFile( Parser $parser, Title $title ) { |
390 | 389 | $time = false; // current version |
— | — | @@ -407,72 +406,13 @@ |
408 | 407 | # If $time not specified, see if we are allowed to use the current revision |
409 | 408 | if ( $time === false ) { |
410 | 409 | # May want to give an error, so track these... |
411 | | - $parser->mOutput->fr_includeErrors[] = $title->getPrefixedDBKey(); |
| 410 | + $parser->getOutput()->fr_includeErrors[] = $title->getPrefixedDBKey(); |
412 | 411 | } elseif ( !$time ) { |
413 | 412 | $time = "0"; // make sure this the string '0' |
414 | 413 | } |
415 | | - # Add specified image metadata to parser output |
416 | | - if ( $time !== false ) { |
417 | | - $parser->mOutput->fr_fileSHA1Keys[$title->getDBkey()] = array(); |
418 | | - $parser->mOutput->fr_fileSHA1Keys[$title->getDBkey()]['ts'] = $time; |
419 | | - $parser->mOutput->fr_fileSHA1Keys[$title->getDBkey()]['sha1'] = $sha1; |
420 | | - } |
421 | 414 | return array( $time, $sha1 ); |
422 | 415 | } |
423 | 416 | |
424 | | - /** |
425 | | - * Insert image timestamps/SHA-1 keys into parser output |
426 | | - */ |
427 | | - public static function parserInjectTimestamps( Parser $parser ) { |
428 | | - $pOutput =& $parser->mOutput; // convenience |
429 | | - if ( !isset( $pOutput->mImages ) ) { |
430 | | - return true; // sanity check |
431 | | - } |
432 | | - # Fetch the current timestamps of the images. |
433 | | - foreach ( $pOutput->mImages as $filename => $x ) { |
434 | | - # Stable output with versions specified |
435 | | - if ( isset( $pOutput->fr_fileSHA1Keys[$filename] ) ) { |
436 | | - // Fetch file with $time to confirm the specified version exists |
437 | | - $time = $pOutput->fr_fileSHA1Keys[$filename]['ts']; |
438 | | - $sha1 = $pOutput->fr_fileSHA1Keys[$filename]['sha1']; |
439 | | - # FIXME: don't double fetch these (Parser just did)!!! |
440 | | - $file = RepoGroup::singleton()->findFileFromKey( |
441 | | - $sha1, array( 'time' => $time ) ); |
442 | | - } else { |
443 | | - $title = Title::makeTitleSafe( NS_FILE, $filename ); |
444 | | - # FIXME: don't double fetch these (Parser just did)!!! |
445 | | - $file = wfFindFile( $title ); |
446 | | - } |
447 | | - # Update tracking vars... |
448 | | - $pOutput->fr_fileSHA1Keys[$filename] = array(); |
449 | | - if ( $file ) { |
450 | | - $pOutput->fr_fileSHA1Keys[$filename]['ts'] = $file->getTimestamp(); |
451 | | - $pOutput->fr_fileSHA1Keys[$filename]['sha1'] = $file->getSha1(); |
452 | | - } else { |
453 | | - $pOutput->fr_fileSHA1Keys[$filename]['ts'] = '0'; |
454 | | - $pOutput->fr_fileSHA1Keys[$filename]['sha1'] = ''; |
455 | | - } |
456 | | - } |
457 | | - return true; |
458 | | - } |
459 | | - |
460 | | - /** |
461 | | - * Insert image timestamps/SHA-1s into page output |
462 | | - */ |
463 | | - public static function outputInjectTimestamps( OutputPage $out, ParserOutput $parserOut ) { |
464 | | - # Set first time |
465 | | - if ( !isset( $out->fr_fileSHA1Keys ) ) { |
466 | | - $out->fr_fileSHA1Keys = array(); |
467 | | - } |
468 | | - # Leave as defaults if missing. Relevant things will be updated only when needed. |
469 | | - # We don't want to go around resetting caches all over the place if avoidable... |
470 | | - $fileSHA1Keys = isset( $parserOut->fr_fileSHA1Keys ) ? |
471 | | - $parserOut->fr_fileSHA1Keys : array(); |
472 | | - # Add on any new items |
473 | | - $out->fr_fileSHA1Keys = wfArrayMerge( $out->fr_fileSHA1Keys, $fileSHA1Keys ); |
474 | | - return true; |
475 | | - } |
476 | | - |
477 | 417 | public static function onParserFirstCallInit( &$parser ) { |
478 | 418 | $parser->setFunctionHook( 'pagesusingpendingchanges', |
479 | 419 | 'FlaggedRevsHooks::parserPagesUsingPendingChanges' ); |
— | — | @@ -488,9 +428,9 @@ |
489 | 429 | } |
490 | 430 | |
491 | 431 | public static function onParserGetVariableValueSwitch( &$parser, &$cache, &$word, &$ret ) { |
492 | | - if( $word == 'pendingchangelevel' ) { |
| 432 | + if ( $word == 'pendingchangelevel' ) { |
493 | 433 | $title = $parser->getTitle(); |
494 | | - if( !FlaggedRevs::inReviewNamespace( $title ) ) { |
| 434 | + if ( !FlaggedRevs::inReviewNamespace( $title ) ) { |
495 | 435 | $ret = ''; |
496 | 436 | } else { |
497 | 437 | $config = FlaggedPageConfig::getPageStabilitySettings( $title ); |
— | — | @@ -2034,4 +1974,4 @@ |
2035 | 1975 | } |
2036 | 1976 | return true; |
2037 | 1977 | } |
2038 | | -} |
\ No newline at end of file |
| 1978 | +} |
Index: trunk/extensions/FlaggedRevs/api/ApiReview.php |
— | — | @@ -72,7 +72,7 @@ |
73 | 73 | $parserCache = ParserCache::singleton(); |
74 | 74 | $parserOutput = $parserCache->get( $article, $wgOut->parserOptions() ); |
75 | 75 | } |
76 | | - if ( !$parserOutput || !isset( $parserOutput->fr_fileSHA1Keys ) ) { |
| 76 | + if ( !$parserOutput || !isset( $parserOutput->mImageTimeKeys ) ) { |
77 | 77 | // Miss, we have to reparse the page |
78 | 78 | $text = $article->getContent(); |
79 | 79 | $options = FlaggedRevs::makeParserOptions(); |
— | — | @@ -82,7 +82,7 @@ |
83 | 83 | // Set version parameters for review submission |
84 | 84 | list( $templateParams, $imageParams, $fileVersion ) = |
85 | 85 | RevisionReviewForm::getIncludeParams( $article, |
86 | | - $parserOutput->mTemplateIds, $parserOutput->fr_fileSHA1Keys ); |
| 86 | + $parserOutput->mTemplateIds, $parserOutput->mImageTimeKeys ); |
87 | 87 | $form->setTemplateParams( $templateParams ); |
88 | 88 | $form->setFileParams( $imageParams ); |
89 | 89 | $form->setFileVersion( $fileVersion ); |
Index: trunk/extensions/FlaggedRevs/FRInclusionManager.php |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | * (a) Stabilize inclusions in Parser output |
41 | 41 | * (b) Set the template/image versions used in the flagged version of a revision |
42 | 42 | * @param array $tmpParams (ns => dbKey => revId ) |
43 | | - * @param array $imgParams (dbKey => array('ts' => MW timestamp,'sha1' => sha1) ) |
| 43 | + * @param array $imgParams (dbKey => array('time' => MW timestamp,'sha1' => sha1) ) |
44 | 44 | */ |
45 | 45 | public function setReviewedVersions( array $tmpParams, array $imgParams ) { |
46 | 46 | $this->reviewedVersions = array(); |
— | — | @@ -50,7 +50,7 @@ |
51 | 51 | /** |
52 | 52 | * Set the stable versions of some template/images |
53 | 53 | * @param array $tmpParams (ns => dbKey => revId ) |
54 | | - * @param array $imgParams (dbKey => array('ts' => MW timestamp,'sha1' => sha1) ) |
| 54 | + * @param array $imgParams (dbKey => array('time' => MW timestamp,'sha1' => sha1) ) |
55 | 55 | */ |
56 | 56 | public function setStableVersionCache( array $tmpParams, array $imgParams ) { |
57 | 57 | $this->stableVersions['templates'] = $tmpParams; |
— | — | @@ -116,7 +116,7 @@ |
117 | 117 | $dbKey = $title->getDBkey(); |
118 | 118 | # All NS_FILE, no need to check namespace |
119 | 119 | if ( isset( $this->reviewedVersions['files'][$dbKey] ) ) { |
120 | | - $time = $this->reviewedVersions['files'][$dbKey]['ts']; |
| 120 | + $time = $this->reviewedVersions['files'][$dbKey]['time']; |
121 | 121 | $sha1 = $this->reviewedVersions['files'][$dbKey]['sha1']; |
122 | 122 | return array( $time, $sha1 ); |
123 | 123 | } |
— | — | @@ -154,7 +154,7 @@ |
155 | 155 | $sha1 = ''; |
156 | 156 | # All NS_FILE, no need to check namespace |
157 | 157 | if ( isset( $this->stableVersions['files'][$dbKey] ) ) { |
158 | | - $time = $this->stableVersions['files'][$dbKey]['ts']; |
| 158 | + $time = $this->stableVersions['files'][$dbKey]['time']; |
159 | 159 | $sha1 = $this->stableVersions['files'][$dbKey]['sha1']; |
160 | 160 | return array( $time, $sha1 ); |
161 | 161 | } |
— | — | @@ -164,7 +164,7 @@ |
165 | 165 | $sha1 = $srev->getFileSha1(); |
166 | 166 | } |
167 | 167 | $this->stableVersions['files'][$dbKey] = array(); |
168 | | - $this->stableVersions['files'][$dbKey]['ts'] = $time; |
| 168 | + $this->stableVersions['files'][$dbKey]['time'] = $time; |
169 | 169 | $this->stableVersions['files'][$dbKey]['sha1'] = $sha1; |
170 | 170 | return array( $time, $sha1 ); |
171 | 171 | } |
Index: trunk/extensions/FlaggedRevs/FlaggedArticleView.php |
— | — | @@ -1083,10 +1083,10 @@ |
1084 | 1084 | $templateIDs = $fileSHA1Keys = null; |
1085 | 1085 | if ( $wgOut->getRevisionId() == $rev->getId() |
1086 | 1086 | && isset( $wgOut->mTemplateIds ) |
1087 | | - && isset( $wgOut->fr_fileSHA1Keys ) ) |
| 1087 | + && isset( $wgOut->mImageTimeKeys ) ) |
1088 | 1088 | { |
1089 | 1089 | $templateIDs = $wgOut->mTemplateIds; |
1090 | | - $fileSHA1Keys = $wgOut->fr_fileSHA1Keys; |
| 1090 | + $fileSHA1Keys = $wgOut->mImageTimeKeys; |
1091 | 1091 | } |
1092 | 1092 | # Review notice box goes in top of form |
1093 | 1093 | $form = RevisionReviewForm::buildQuickReview( |