Index: trunk/extensions/SemanticMediaWiki/includes/SMW_ParseData.php |
— | — | @@ -20,7 +20,11 @@ |
21 | 21 | * a new empty container if it is not initiated yet. |
22 | 22 | */ |
23 | 23 | static public function getSMWdata(Parser $parser) { |
24 | | - $output = $parser->getOutput(); |
| 24 | + if (method_exists($parser,'getOutput')) { |
| 25 | + $output = $parser->getOutput(); |
| 26 | + } else { |
| 27 | + $output = $parser->mOutput; |
| 28 | + } |
25 | 29 | $title = $parser->getTitle(); |
26 | 30 | if (!isset($output) || !isset($title)) return NULL; // no parsing, create error |
27 | 31 | if (!isset($output->mSMWData)) { // no data container yet |
— | — | @@ -35,7 +39,11 @@ |
36 | 40 | * Clear all stored data for a given parser. |
37 | 41 | */ |
38 | 42 | static public function clearStorage(Parser $parser) { |
39 | | - $output = $parser->getOutput(); |
| 43 | + if (method_exists($parser,'getOutput')) { |
| 44 | + $output = $parser->getOutput(); |
| 45 | + } else { |
| 46 | + $output = $parser->mOutput; |
| 47 | + } |
40 | 48 | $title = $parser->getTitle(); |
41 | 49 | if (!isset($output) || !isset($title)) return; |
42 | 50 | $dv = SMWDataValueFactory::newTypeIDValue('_wpg'); |
— | — | @@ -160,7 +168,9 @@ |
161 | 169 | } |
162 | 170 | } |
163 | 171 | } |
164 | | - |
| 172 | +debug_zval_dump($processSemantics); |
| 173 | +debug_zval_dump($semdata); |
| 174 | +die; |
165 | 175 | // Actually store semantic data, or at least clear it if needed |
166 | 176 | if ($processSemantics) { |
167 | 177 | smwfGetStore()->updateData($semdata, SMWFactbox::isNewArticle()); |