* Document ParserMakeImageParams hook
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 29 Feb 2008 19:58:50 +0000 (19:58 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Fri, 29 Feb 2008 19:58:50 +0000 (19:58 +0000)
* Fix capitalization of @addtogroup in RepoGroup.php
* Fix comment in SpecialRevisiondelete.php, replace xml functions from wf* to Xml::* and use __METHOD__ instead of hardcoded function name

docs/hooks.txt
includes/SpecialRevisiondelete.php
includes/filerepo/RepoGroup.php

index 21c9555..0d99832 100644 (file)
@@ -802,6 +802,11 @@ $varCache: varaiable cache (array)
 $parser: Parser object
 $limitReport: text that will be included (without comment tags)
 
+'ParserMakeImageParams': Called before the parser make an image link, use this to modify the parameters of the image.
+$title: title object representing the file
+$file: file object that will be used to create the image
+&$params: 2-D array of parameters
+
 'ParserTestParser': called when creating a new instance of Parser in maintenance/parserTests.inc
 $parser: Parser object created
 
index b6ca7e1..c1702d1 100644 (file)
@@ -41,8 +41,7 @@ function wfSpecialRevisiondelete( $par = null ) {
  */
 class RevisionDeleteForm {
        /**
-        * @param Title $page
-        * @param int $oldid
+        * @param WebRequest $request
         */
        function __construct( $request ) {
                global $wgUser;
@@ -83,17 +82,17 @@ class RevisionDeleteForm {
                $wgOut->addWikiMsg( 'revdelete-text' );
                
                $items = array(
-                       wfInputLabel( wfMsg( 'revdelete-log' ), 'wpReason', 'wpReason', 60 ),
-                       wfSubmitButton( wfMsg( 'revdelete-submit' ) ) );
+                       Xml::inputLabel( wfMsg( 'revdelete-log' ), 'wpReason', 'wpReason', 60 ),
+                       Xml::submitButton( wfMsg( 'revdelete-submit' ) ) );
                $hidden = array(
-                       wfHidden( 'wpEditToken', $wgUser->editToken() ),
-                       wfHidden( 'target', $this->page->getPrefixedText() ) );
+                       Xml::hidden( 'wpEditToken', $wgUser->editToken() ),
+                       Xml::hidden( 'target', $this->page->getPrefixedText() ) );
                foreach( $this->revisions as $revid ) {
-                       $hidden[] = wfHidden( 'oldid[]', $revid );
+                       $hidden[] = Xml::hidden( 'oldid[]', $revid );
                }
                
                $special = SpecialPage::getTitleFor( 'Revisiondelete' );
-               $wgOut->addHtml( wfElement( 'form', array(
+               $wgOut->addHtml( Xml::element( 'form', array(
                        'method' => 'post',
                        'action' => $special->getLocalUrl( 'action=submit' ) ),
                        null ) );
@@ -102,7 +101,7 @@ class RevisionDeleteForm {
                foreach( $this->checks as $item ) {
                        list( $message, $name, $field ) = $item;
                        $wgOut->addHtml( '<div>' .
-                               wfCheckLabel( wfMsg( $message), $name, $name, $rev->isDeleted( $field ) ) .
+                               Xml::checkLabel( wfMsg( $message), $name, $name, $rev->isDeleted( $field ) ) .
                                '</div>' );
                }
                $wgOut->addHtml( '</fieldset>' );
@@ -228,7 +227,7 @@ class RevisionDeleter {
                $this->db->update( 'revision',
                        array( 'rev_deleted' => $bitfield ),
                        array( 'rev_id' => $rev->getId() ),
-                       'RevisionDeleter::updateRevision' );
+                       __METHOD__ );
        }
        
        /**
@@ -244,7 +243,7 @@ class RevisionDeleter {
                                'rc_comment' => ($bitfield & Revision::DELETED_COMMENT) ? wfMsg( 'rev-deleted-comment' ) : $rev->getComment() ),
                        array(
                                'rc_this_oldid' => $rev->getId() ),
-                       'RevisionDeleter::updateRecentChanges' );
+                       __METHOD__ );
        }
        
        /**
index b0e1d78..d685121 100644 (file)
@@ -2,7 +2,7 @@
 
 /**
  * Prioritized list of file repositories
- * @addtogroup filerepo
+ * @addtogroup FileRepo
  */
 class RepoGroup {
        var $localRepo, $foreignRepos, $reposInitialised = false;