Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -1706,6 +1706,23 @@ |
1707 | 1707 | $pageid: database ID of the page that's been moved |
1708 | 1708 | $redirid: database ID of the created redirect |
1709 | 1709 | |
| 1710 | +'UndeleteForm::showHistory': called in UndeleteForm::showHistory, after a |
| 1711 | +PageArchive object has been created but before any further processing is done. |
| 1712 | +&$archive: PageArchive object |
| 1713 | +$title: Title object of the page that we're viewing |
| 1714 | + |
| 1715 | +'UndeleteForm::showRevision': called in UndeleteForm::showRevision, after a |
| 1716 | +PageArchive object has been created but before any further processing is done. |
| 1717 | +&$archive: PageArchive object |
| 1718 | +$title: Title object of the page that we're viewing |
| 1719 | + |
| 1720 | +'UndeleteForm::undelete': called un UndeleteForm::undelete, after checking that |
| 1721 | +the site is not in read-only mode, that the Title object is not null and after |
| 1722 | +a PageArchive object has been constructed but before performing any further |
| 1723 | +processing. |
| 1724 | +&$archive: PageArchive object |
| 1725 | +$title: Title object of the page that we're about to undelete |
| 1726 | + |
1710 | 1727 | 'UndeleteShowRevision': called when showing a revision in Special:Undelete |
1711 | 1728 | $title: title object related to the revision |
1712 | 1729 | $rev: revision (object) that will be viewed |
Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -28,6 +28,10 @@ |
29 | 29 | * Images can now be embedded in an XML dump stream using backupDump.php |
30 | 30 | --include-files and can be imported using importDump.php --uploads; |
31 | 31 | furthermore, it can import files from the filesystem using --image-base-path |
| 32 | +* Three new hooks in Special:Undelete, 'UndeleteForm::showHistory', |
| 33 | + 'UndeleteForm::showRevision' and 'UndeleteForm::undelete', so that extensions |
| 34 | + may override the usage of PageArchive class and replace it with their own |
| 35 | + class that extends PageArchive |
32 | 36 | |
33 | 37 | === Bug fixes in 1.19 === |
34 | 38 | * (bug 10154) Don't allow user to specify days beyond $wgRCMaxAge. |
Index: trunk/phase3/includes/specials/SpecialUndelete.php |
— | — | @@ -769,6 +769,7 @@ |
770 | 770 | } |
771 | 771 | |
772 | 772 | $archive = new PageArchive( $this->mTargetObj ); |
| 773 | + wfRunHooks( 'UndeleteForm::showRevision', array( &$archive, $this->mTargetObj ) ); |
773 | 774 | $rev = $archive->getRevision( $timestamp ); |
774 | 775 | |
775 | 776 | if( !$rev ) { |
— | — | @@ -1062,6 +1063,7 @@ |
1063 | 1064 | ); |
1064 | 1065 | |
1065 | 1066 | $archive = new PageArchive( $this->mTargetObj ); |
| 1067 | + wfRunHooks( 'UndeleteForm::showHistory', array( &$archive, $this->mTargetObj ) ); |
1066 | 1068 | /* |
1067 | 1069 | $text = $archive->getLastRevisionText(); |
1068 | 1070 | if( is_null( $text ) ) { |
— | — | @@ -1421,6 +1423,7 @@ |
1422 | 1424 | } |
1423 | 1425 | if( !is_null( $this->mTargetObj ) ) { |
1424 | 1426 | $archive = new PageArchive( $this->mTargetObj ); |
| 1427 | + wfRunHooks( 'UndeleteForm::undelete', array( &$archive, $this->mTargetObj ) ); |
1425 | 1428 | $ok = $archive->undelete( |
1426 | 1429 | $this->mTargetTimestamp, |
1427 | 1430 | $this->mComment, |