Merge "Adding ability of jQuery badge to display the number zero if requested."
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index c0420e5..1ea6e46 100644 (file)
@@ -417,6 +417,9 @@ class PageArchive {
                $logEntry->setPerformer( $user );
                $logEntry->setTarget( $this->title );
                $logEntry->setComment( $reason );
+
+               wfRunHooks( 'ArticleUndeleteLogEntry', array( $this, &$logEntry, $user ) );
+
                $logid = $logEntry->insert();
                $logEntry->publish( $logid );
 
@@ -429,9 +432,10 @@ class PageArchive {
         * be stuffed into old, otherwise the most recent will go into cur.
         *
         * @param $timestamps Array: pass an empty array to restore all revisions, otherwise list the ones to undelete.
-        * @param $comment String
         * @param $unsuppress Boolean: remove all ar_deleted/fa_deleted restrictions of seletected revs
         *
+        * @param $comment String
+        * @throws ReadOnlyError
         * @return Status, containing the number of revisions restored on success
         */
        private function undeleteRevisions( $timestamps, $unsuppress = false, $comment = '' ) {
@@ -823,7 +827,7 @@ class SpecialUndelete extends SpecialPage {
 
                if( $result->numRows() == 0 ) {
                        $out->addWikiMsg( 'undelete-no-results' );
-                       return;
+                       return false;
                }
 
                $out->addWikiMsg( 'undeletepagetext', $this->getLanguage()->formatNum( $result->numRows() ) );