r112197 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r112196‎ | r112197 | r112198 >
Date:12:34, 23 February 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
fix bug 34499, follow up r111407
Modified paths:
  • /trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php (modified) (history)
  • /trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_Property.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php
@@ -415,12 +415,13 @@
416416 * LinksUpdate.
417417 *
418418 * @param WikiPage|Article $article WikiPage on 1.19 and later
419 - * @param $rev
420 - * @param $baseID
 419+ * @param Revision $rev
 420+ * @param integer $baseID
 421+ * @param User $user
421422 *
422423 * @return true
423424 */
424 - static public function onNewRevisionFromEditComplete( /* WikiPage */ $article, $rev, $baseID ) {
 425+ static public function onNewRevisionFromEditComplete( /* WikiPage */ $article, Revision $rev, $baseID, User $user ) {
425426 global $smwgPageSpecialProperties;
426427
427428 if ( ( $article->mPreparedEdit ) && ( $article->mPreparedEdit->output instanceof ParserOutput ) ) {
@@ -449,7 +450,7 @@
450451 }
451452
452453 if ( in_array( '_LEDT', $smwgPageSpecialProperties ) ) {
453 - $di = SMWDIWikiPage::newFromTitle( User::newFromId( $article->getRevision()->getUser() )->getUserPage() );
 454+ $di = SMWDIWikiPage::newFromTitle( $user->getUserPage() );
454455
455456 if ( !is_null( $di ) ) {
456457 $semdata->addPropertyObjectValue( new SMWDIProperty( '_LEDT' ), $di );
@@ -459,7 +460,7 @@
460461 if ( in_array( '_NEWP', $smwgPageSpecialProperties ) ) {
461462 $semdata->addPropertyObjectValue(
462463 new SMWDIProperty( '_NEWP' ),
463 - new SMWDIBoolean( is_null( $article->getRevision()->getParentId() ) )
 464+ new SMWDIBoolean( is_null( $rev->getParentId() ) )
464465 );
465466 }
466467
Index: trunk/extensions/SemanticMediaWiki/includes/dataitems/SMW_DI_Property.php
@@ -331,7 +331,7 @@
332332 '_CONC' => array( '__con', false ), // associated concept
333333 '_MDAT' => array( '_dat', false ), // "modification date"
334334 '_CDAT' => array( '_dat', false ), // "creation date"
335 - '_NEWP' => array( '_dat', false ), // "is a new page"
 335+ '_NEWP' => array( '_boo', false ), // "is a new page"
336336 '_LEDT' => array( '_wpg', false ), // "last editor is"
337337 '_ERRP' => array( '_wpp', false ), // "has improper value for"
338338 '_LIST' => array( '__pls', true ), // "has fields"

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r111407some work on special property handlingjeroendedauw19:46, 13 February 2012