r60671 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r60670‎ | r60671 | r60672 >
Date:17:16, 5 January 2010
Author:yaron
Status:deferred
Tags:
Comment:
Version 1.2: functions moved from ST_Notify_Assignment.php to SemanticTasks.classes.php
Modified paths:
  • /trunk/extensions/SemanticTasks/SemanticTasks.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticTasks/SemanticTasks.php
@@ -18,19 +18,24 @@
1919 'path' => __FILE__,
2020 'name' => 'SemanticTasks',
2121 'author' => 'Steren Giannini',
22 - 'version' => '1.1.1',
23 - 'url' => 'http://www.creativecommons.org', // FIXME: URL should point to a page about this extension
 22+ 'version' => '1.2',
 23+ 'url' => 'http://www.mediawiki.org/wiki/Extension:Semantic_Tasks',
2424 'description' => 'E-mail notifications for assigned or updated tasks',
2525 'descriptionmsg' => 'semantictasks-desc',
2626 );
2727
2828 // Do st_SetupExtension after the mediawiki setup, AND after SemanticMediaWiki setup
2929 // FIXME: only hook added is ArticleSaveComplete. There appears to be no need for this.
30 -$wgExtensionFunctions[] = 'st_SetupExtension';
 30+$wgExtensionFunctions[] = 'SemanticTasksSetupExtension';
3131
3232 // i18n
3333 $wgExtensionMessagesFiles['SemanticTasks'] = dirname( __FILE__ ) . '/SemanticTasks.i18n.php';
3434
35 -// FIXME: Use $wgAutoloadClasses
36 -// ST_Notify_Assignment.php
37 -require_once( dirname( __FILE__ ) . "/ST_Notify_Assignment.php" );
 35+$dir = dirname( __FILE__ ) . '/';
 36+$wgAutoloadClasses['SemanticTasksMailer'] = $dir . 'SemanticTasks.classes.php';
 37+
 38+function SemanticTasksSetupExtension() {
 39+ global $wgHooks;
 40+ $wgHooks['ArticleSaveComplete'][] = 'SemanticTasksMailer::mailAssigneesUpdatedTask';
 41+ return true;
 42+}

Status & tagging log