Index: trunk/extensions/SemanticMediaWiki/includes/jobs/SMW_RefreshJob.php |
— | — | @@ -37,10 +37,12 @@ |
38 | 38 | */ |
39 | 39 | function run() { |
40 | 40 | wfProfileIn( 'SMWRefreshJob::run (SMW)' ); |
| 41 | + |
41 | 42 | if ( !array_key_exists( 'spos', $this->params ) ) { |
| 43 | + wfProfileOut( 'SMWRefreshJob::run (SMW)' ); |
42 | 44 | return true; |
43 | | - wfProfileOut( 'SMWRefreshJob::run (SMW)' ); |
44 | 45 | } |
| 46 | + |
45 | 47 | $run = array_key_exists( 'run', $this->params ) ? $this->params['run']:1; |
46 | 48 | $spos = $this->params['spos']; |
47 | 49 | $store = smwfGetStore(); |
— | — | @@ -54,7 +56,9 @@ |
55 | 57 | $nextjob = new SMWRefreshJob( $this->title, array( 'spos' => 1, 'prog' => 0, 'rc' => $this->params['rc'], 'run' => $run + 1 ) ); |
56 | 58 | $nextjob->insert(); |
57 | 59 | } |
| 60 | + |
58 | 61 | wfProfileOut( 'SMWRefreshJob::run (SMW)' ); |
| 62 | + |
59 | 63 | return true; |
60 | 64 | } |
61 | 65 | |
— | — | @@ -63,8 +67,9 @@ |
64 | 68 | * The progress refers to the state before processing this job. |
65 | 69 | */ |
66 | 70 | public function getProgress() { |
67 | | - $prog = array_key_exists( 'prog', $this->params ) ? $this->params['prog']:0; |
68 | | - $run = array_key_exists( 'run', $this->params ) ? $this->params['run']:1; |
| 71 | + $prog = array_key_exists( 'prog', $this->params ) ? $this->params['prog'] : 0; |
| 72 | + $run = array_key_exists( 'run', $this->params ) ? $this->params['run'] : 1; |
69 | 73 | return ( $run - 1 + $prog ) / $this->params['rc']; |
70 | 74 | } |
71 | | -} |
| 75 | + |
| 76 | +} |
\ No newline at end of file |
Index: trunk/extensions/SemanticMediaWiki/includes/jobs/SMW_UpdateJob.php |
— | — | @@ -63,8 +63,10 @@ |
64 | 64 | wfProfileIn( __METHOD__ . '-update' ); |
65 | 65 | |
66 | 66 | SMWParseData::storeData( $output, $this->title, false ); |
| 67 | + |
67 | 68 | wfProfileOut( __METHOD__ . '-update' ); |
68 | 69 | wfProfileOut( 'SMWUpdateJob::run (SMW)' ); |
| 70 | + |
69 | 71 | return true; |
70 | 72 | } |
71 | 73 | |
— | — | @@ -80,4 +82,5 @@ |
81 | 83 | parent::insert(); |
82 | 84 | } |
83 | 85 | } |
84 | | -} |
| 86 | + |
| 87 | +} |
\ No newline at end of file |