Index: trunk/phase3/docs/hooks.txt |
— | — | @@ -390,6 +390,14 @@ |
391 | 391 | &$personal_urls: Array of link specifiers (see SkinTemplate.php) |
392 | 392 | &$title: Title object representing the current page |
393 | 393 | |
| 394 | +'RunUnknownJob': Handle additional, unknown job queue commands |
| 395 | +&$job: Job object to be handled |
| 396 | +&$retval: Return value indicating whether or not the operation was successful |
| 397 | + |
| 398 | +Return true to continue with processing the job through other hooks and code, |
| 399 | +or false if the job has been completed. Alter $retval to indicate success or |
| 400 | +failure when performing the actual steps to "process" the job. |
| 401 | + |
394 | 402 | 'SiteNoticeBefore': Before the sitenotice/anonnotice is composed |
395 | 403 | &$siteNotice: HTML returned as the sitenotice |
396 | 404 | Return true to allow the normal method of notice selection/rendering to work, |
Index: trunk/phase3/includes/JobQueue.php |
— | — | @@ -187,9 +187,14 @@ |
188 | 188 | $retval = $this->refreshLinks(); |
189 | 189 | break; |
190 | 190 | default: |
191 | | - $this->error = "Invalid job type {$this->command}, ignoring"; |
192 | | - wfDebug( $this->error . "\n" ); |
193 | | - $retval = false; |
| 191 | + $retval = true; |
| 192 | + if( wfRunHooks( 'RunUnknownJob', array( &$this, &$retval ) ) ) { |
| 193 | + $this->error = "Invalid job type {$this->command}, ignoring"; |
| 194 | + wfDebug( $this->error . "\n" ); |
| 195 | + $retval = false; |
| 196 | + } else { |
| 197 | + $retval = true; |
| 198 | + } |
194 | 199 | } |
195 | 200 | wfProfileOut( $fname ); |
196 | 201 | return $retval; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -495,6 +495,7 @@ |
496 | 496 | * (bug 6162) Change date format for Dutch Low Saxon (nds-nl) |
497 | 497 | * (bug 6296) Update to Indonesian localisation (id) #21 |
498 | 498 | * Introduce EditFormPreloadText hook, see docs/hooks.txt for more information |
| 499 | +* (bug 6095) Introduce RunUnknownJob hook, see docs/hooks.txt for more information |
499 | 500 | |
500 | 501 | == Compatibility == |
501 | 502 | |