Index: trunk/extensions/SemanticMediaWiki/maintenance/SMW_refreshData.php |
— | — | @@ -155,8 +155,8 @@ |
156 | 156 | if ( $revision === NULL ) continue; |
157 | 157 | $output = $wgParser->parse($revision->getText(), $title, $options, true, true, $revision->getID()); |
158 | 158 | SMWParseData::storeData($output, $title, false); |
159 | | - /// FIXME: as in SMWUpdateJob, this ignores changes in header items and other parser-cached data. See the |
160 | | - /// comment in SMWUpdateJob for details. |
| 159 | + /// NOTE: Like SMWUpdateJob, this only updates the stored data, not the records related to page display |
| 160 | + /// (such as the parser cache). |
161 | 161 | // sleep to be nice to the server |
162 | 162 | if ( ($delay !== false) && (($num_files+1) % 100 === 0) ) { |
163 | 163 | usleep($delay); |
Index: trunk/extensions/SemanticMediaWiki/includes/jobs/SMW_UpdateJob.php |
— | — | @@ -1,15 +1,26 @@ |
2 | 2 | <?php |
3 | 3 | /** |
4 | | - * SMWUpdateJob updates the semantic data in the database for a given title |
5 | | - * using the MediaWiki JobQueue. |
6 | | - * Update jobs are created if, when saving an article, it is detected that the |
7 | | - * content of other pages must be re-parsed as well (e.g. due to some type change). |
| 4 | + * File containing SMWUpdateJob. |
8 | 5 | * |
9 | 6 | * @author Daniel M. Herzig |
| 7 | + * @author Markus Krötzsch |
10 | 8 | * @file |
11 | 9 | * @ingroup SMW |
12 | 10 | */ |
13 | 11 | |
| 12 | +/** |
| 13 | + * SMWUpdateJob updates the semantic data in the database for a given title |
| 14 | + * using the MediaWiki JobQueue. Update jobs are created if, when saving an article, |
| 15 | + * it is detected that the content of other pages must be re-parsed as well (e.g. |
| 16 | + * due to some type change). |
| 17 | + * |
| 18 | + * @note This job does not update the page display or parser cache, so in general |
| 19 | + * it might happen that part of the wiki page still displays based on old data (e.g. |
| 20 | + * formatting in-page values based on a datatype thathas since been changed), whereas |
| 21 | + * the Factbox and query/browsing interfaces might already show the updatd records. |
| 22 | + * |
| 23 | + * @ingroup SMW |
| 24 | + */ |
14 | 25 | class SMWUpdateJob extends Job { |
15 | 26 | |
16 | 27 | function __construct($title) { |
— | — | @@ -47,12 +58,6 @@ |
48 | 59 | wfProfileIn( __METHOD__.'-parse' ); |
49 | 60 | $options = new ParserOptions; |
50 | 61 | $output = $wgParser->parse($revision->getText(), $this->title, $options, true, true, $revision->getID()); |
51 | | - /// FIXME: we do not care about the parser cache here, and additional information such as the header scripts |
52 | | - /// that the above parsing might have created is simply discarded. This yields trouble: if some datatype changes |
53 | | - /// such that it now requires a stylesheet to display, then the parsercache will not be aware of this and hence |
54 | | - /// the header item will be missing! |
55 | | - /// Besides this problem, the architecture since SMW 1.4 should at least ensure that no other globals are used |
56 | | - /// to pass around data *over long distances* and the above call thus should not disturb any other data. |
57 | 62 | |
58 | 63 | wfProfileOut( __METHOD__.'-parse' ); |
59 | 64 | wfProfileIn( __METHOD__.'-update' ); |