/** Enable slow parser functions */
$wgAllowSlowParserFunctions = false;
+/**
+ * Extra custom jobs can be added to the Job Queue system.
+ * This array should consist of job name => job queue subclass pairs
+ */
+$wgCustomJobs = array();
+
/**
* To use inline TeX, you need to compile 'texvc' (in the 'math' subdirectory of
* the MediaWiki package and have latex, dvips, gs (ghostscript), andconvert
case 'refreshLinks':
return new RefreshLinksJob( $title, $params, $id );
case 'htmlCacheUpdate':
+ return;
case 'html_cache_update': # BC
return new HTMLCacheUpdateJob( $title, $params['table'], $params['start'], $params['end'], $id );
case 'sendMail':
- return new EmaillingJob($params);
+ return new EmaillingJob( $params );
case 'enotifNotify':
- return new EnotifNotifyJob($title, $params);
- default:
- throw new MWException( "Invalid job command \"$command\"" );
+ return new EnotifNotifyJob( $title, $params );
+ }
+ // OK, check if this is a custom job
+ global $wgCustomJobs;
+ wfLoadAllExtensions(); // This may be for an extension
+
+ if( isset($wgCustomJobs[$command]) ) {
+ $class = $wgCustomJobs[$command];
+ return new $class($title, $params, $id);
+ } else {
+ throw new MWException( "Invalid job command \"$command\"" );
}
}