r88235 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88234‎ | r88235 | r88236 >
Date:13:30, 16 May 2011
Author:ashley
Status:ok (Comments)
Tags:
Comment:
three new hooks in SpecialUndelete.php from Wikia codebase so that extensions, such as the Video extension, can use their custom PageArchive class
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/docs/hooks.txt (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUndelete.php (modified) (history)

Diff [purge]

Index: trunk/phase3/docs/hooks.txt
@@ -1706,6 +1706,23 @@
17071707 $pageid: database ID of the page that's been moved
17081708 $redirid: database ID of the created redirect
17091709
 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+
17101727 'UndeleteShowRevision': called when showing a revision in Special:Undelete
17111728 $title: title object related to the revision
17121729 $rev: revision (object) that will be viewed
Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -28,6 +28,10 @@
2929 * Images can now be embedded in an XML dump stream using backupDump.php
3030 --include-files and can be imported using importDump.php --uploads;
3131 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
3236
3337 === Bug fixes in 1.19 ===
3438 * (bug 10154) Don't allow user to specify days beyond $wgRCMaxAge.
Index: trunk/phase3/includes/specials/SpecialUndelete.php
@@ -769,6 +769,7 @@
770770 }
771771
772772 $archive = new PageArchive( $this->mTargetObj );
 773+ wfRunHooks( 'UndeleteForm::showRevision', array( &$archive, $this->mTargetObj ) );
773774 $rev = $archive->getRevision( $timestamp );
774775
775776 if( !$rev ) {
@@ -1062,6 +1063,7 @@
10631064 );
10641065
10651066 $archive = new PageArchive( $this->mTargetObj );
 1067+ wfRunHooks( 'UndeleteForm::showHistory', array( &$archive, $this->mTargetObj ) );
10661068 /*
10671069 $text = $archive->getLastRevisionText();
10681070 if( is_null( $text ) ) {
@@ -1421,6 +1423,7 @@
14221424 }
14231425 if( !is_null( $this->mTargetObj ) ) {
14241426 $archive = new PageArchive( $this->mTargetObj );
 1427+ wfRunHooks( 'UndeleteForm::undelete', array( &$archive, $this->mTargetObj ) );
14251428 $ok = $archive->undelete(
14261429 $this->mTargetTimestamp,
14271430 $this->mComment,

Comments

#Comment by Reedy (talk | contribs)   14:42, 16 May 2011

Omg, it's like, they're committing upstream or something

#Comment by Hashar (talk | contribs)   17:00, 18 May 2011

I dont get it. Does wikia forked MediaWiki ? Maybe we could work more closely with them.

#Comment by Jack Phoenix (talk | contribs)   17:07, 18 May 2011
Does wikia forked MediaWiki ?

Indeed they did! Take a look at their Trac; they have plenty of custom extensions, of which some require core patches. Some of their core patches are documented, some are not.

Maybe we could work more closely with them.

I'm sure everyone would love that. One SVN to rule them all! \o/ Seriously though, I see no reason why Wikia couldn't have their code at trunk/wikia or something on svn.wikimedia.org, but maybe they have a good reason for keeping svn.wikia-code.com instead of using svn.wikimedia.org; I don't know.

#Comment by Reedy (talk | contribs)   18:03, 18 May 2011

Yeah, its sort of a fork, but they seemingly rebuild it against releases later on

Though, they should probably develop on our svn, but them using their own for their deployment branches isnt a big deal

It's like Hashar, after resource loader was written, we found that wikia already had their own, and no on e really knew

Certainly, like this, I'm sure they have more core patches and that would be widely useful, and people shoulnt have to patch trunk to use some of wikias extensions, that's just not nice

Status & tagging log