Index: trunk/extensions/Wikidata/OmegaWiki/OmegaWikiAttributes.php |
— | — | @@ -31,7 +31,7 @@ |
32 | 32 | * -this is what RecordHelpers are for. |
33 | 33 | */ |
34 | 34 | function initializeOmegaWikiAttributes(ViewInformation $viewInformation){ |
35 | | - initializeOmegaWikiAttributesOld($viewInformation); //backward compatibility, will be removed! |
| 35 | +// initializeOmegaWikiAttributesOld($viewInformation); //backward compatibility, will be removed! |
36 | 36 | $init_and_discard_this = OmegaWikiAttributes::getInstance($viewInformation); |
37 | 37 | } |
38 | 38 | |
— | — | @@ -39,7 +39,7 @@ |
40 | 40 | * Original initializeOmegaWikiAttributes, Do not call. |
41 | 41 | * @deprecated use/update OmegaWikiAttributes->hardValues instead for now. |
42 | 42 | */ |
43 | | -function initializeOmegaWikiAttributesOld(ViewInformation $viewInformation) { |
| 43 | +/*function initializeOmegaWikiAttributesOld(ViewInformation $viewInformation) { |
44 | 44 | global |
45 | 45 | $languageAttribute, $spellingAttribute, $textAttribute, |
46 | 46 | $wgLanguageAttributeName, $wgSpellingAttributeName, $wgTextAttributeName; |
— | — | @@ -357,6 +357,7 @@ |
358 | 358 | } |
359 | 359 | |
360 | 360 | } |
| 361 | +*/ |
361 | 362 | |
362 | 363 | |
363 | 364 | class OmegaWikiAttributes { |
— | — | @@ -594,8 +595,10 @@ |
595 | 596 | $attributes=&$this->attributes; |
596 | 597 | $attributes[$key] = $value; |
597 | 598 | |
598 | | - if ($value instanceof Attribute && !isset($GLOBALS[$key . "Attribute"])) |
599 | | - throw new Exception("Could not find attribute global with key: " . $key); |
| 599 | + if ($value instanceof Attribute) |
| 600 | + $GLOBALS[$key . "Attribute"] = $value; |
| 601 | + else |
| 602 | + $GLOBALS[$key] = $value; |
600 | 603 | } |
601 | 604 | |
602 | 605 | public function __get($key) { |