r9100 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r9099‎ | r9100 | r9101 >
Date:09:34, 19 May 2005
Author:vibber
Status:old
Tags:
Comment:
* Run ArticleSave hooks on image upload.
Modified paths:
  • /branches/REL1_4/phase3/RELEASE-NOTES (modified) (history)
  • /branches/REL1_4/phase3/includes/Image.php (modified) (history)

Diff [purge]

Index: branches/REL1_4/phase3/includes/Image.php
@@ -869,6 +869,15 @@
870870
871871 $log = new LogPage( 'upload' );
872872 $log->addEntry( 'upload', $descTitle, $desc );
 873+
 874+ # Run page save hooks
 875+ $article = new Article( $descTitle );
 876+ if( wfRunHooks( 'ArticleSave', array(
 877+ &$article, &$wgUser, $textdesc, $desc, false, false, null ) ) ) {
 878+ wfRunHooks( 'ArticleSaveComplete', array(
 879+ &$article, &$wgUser, $textdesc, $desc, false, false, null ) );
 880+ }
 881+
873882 }
874883
875884 /**
Index: branches/REL1_4/phase3/RELEASE-NOTES
@@ -594,6 +594,7 @@
595595 * Avoid overwriting shared image metadata cache with bogus encoding conversions
596596 * Fix reporting of minor edits in Special:Export output
597597 * (bug 2150) Fix tab indexes on edit form
 598+* Run ArticleSave hooks on image upload.
598599
599600
600601 === Caveats ===

Status & tagging log