r106309 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r106308‎ | r106309 | r106310 >
Date:02:37, 15 December 2011
Author:ning
Status:deferred (Comments)
Tags:
Comment:
apply ask query to WOM
Modified paths:
  • /trunk/extensions/WikiObjectModel/includes/WOM_Initialize.php (modified) (history)
  • /trunk/extensions/WikiObjectModel/includes/WOM_Processor.php (modified) (history)
  • /trunk/extensions/WikiObjectModel/includes/WOM_Setup.php (modified) (history)
  • /trunk/extensions/WikiObjectModel/includes/models/WOM_OM_NestProperty.php (added) (history)
  • /trunk/extensions/WikiObjectModel/includes/models/WOM_OM_NestPropertyValue.php (added) (history)
  • /trunk/extensions/WikiObjectModel/includes/models/WOM_OM_QueryPrintout.php (added) (history)
  • /trunk/extensions/WikiObjectModel/includes/models/WOM_OM_Querystring.php (added) (history)
  • /trunk/extensions/WikiObjectModel/includes/parsers/WOMParameterParser.php (modified) (history)
  • /trunk/extensions/WikiObjectModel/includes/parsers/WOMParserFunctionParser.php (modified) (history)
  • /trunk/extensions/WikiObjectModel/includes/parsers/WOMPropertyParser.php (modified) (history)
  • /trunk/extensions/WikiObjectModel/includes/parsers/WOMPropertyValueParser.php (added) (history)
  • /trunk/extensions/WikiObjectModel/includes/parsers/WOMTableParser.php (modified) (history)
  • /trunk/extensions/WikiObjectModel/includes/parsers/WOMTemplateFieldHolderParser.php (modified) (history)
  • /trunk/extensions/WikiObjectModel/includes/parsers/WOMTemplateParser.php (modified) (history)
  • /trunk/extensions/WikiObjectModel/includes/parsers/WikiObjectModelParser.php (modified) (history)

Diff [purge]

Index: trunk/extensions/WikiObjectModel/includes/parsers/WOMParserFunctionParser.php
@@ -20,11 +20,22 @@
2121 if ( $r ) {
2222 $len = strlen( $m[0] );
2323 $func_key = trim( $m[1] );
 24+
2425 return array( 'len' => $len, 'obj' => new WOMParserFunctionModel( $func_key ) );
2526 }
2627 return null;
2728 }
2829
 30+ public function getSubParserID( $obj ) {
 31+// if ( ( $obj instanceof WOMParserFunctionModel )
 32+// && ( strtolower( $obj->getFunctionKey() ) == 'ask' )
 33+// && ( count ( $obj->getObjects() ) == 0 ) ) {
 34+//
 35+// return WOM_PARSER_ID_QUERYSTRING;
 36+// }
 37+ return WOM_PARSER_ID_PARAMETER;
 38+ }
 39+
2940 public function isObjectClosed( $obj, $text, $offset ) {
3041 if ( !$obj instanceof WOMParserFunctionModel ) return false;
3142
Index: trunk/extensions/WikiObjectModel/includes/parsers/WOMTemplateParser.php
@@ -25,7 +25,7 @@
2626 return null;
2727 }
2828
29 - public function getSubParserID() {
 29+ public function getSubParserID( $obj ) {
3030 return WOM_PARSER_ID_PARAMETER;
3131 }
3232
Index: trunk/extensions/WikiObjectModel/includes/parsers/WOMTemplateFieldHolderParser.php
@@ -25,7 +25,7 @@
2626 return null;
2727 }
2828
29 - public function getSubParserID() {
 29+ public function getSubParserID( $obj ) {
3030 return WOM_PARSER_ID_PARAM_VALUE;
3131 }
3232
Index: trunk/extensions/WikiObjectModel/includes/parsers/WOMParameterParser.php
@@ -13,12 +13,40 @@
1414 $this->m_parserId = WOM_PARSER_ID_PARAMETER;
1515 }
1616
 17+ private function parseAsk ( $text, WikiObjectModelCollection $parentObj ) {
 18+ if ( !defined( 'SMW_VERSION' ) ) return null;
 19+
 20+ if ( trim( strtolower( $parentObj->getFunctionKey() ) ) != 'ask' ) return null;
 21+
 22+ if ( count ( $parentObj->getObjects() ) == 0 ) {
 23+ return array( 'len' => 0, 'obj' => new WOMQuerystringModel() );
 24+ }
 25+
 26+ if ( defined( 'SMW_AGGREGATION_VERSION' ) ) {
 27+ $r = preg_match( '/^(\s*\?([^>=|}]+)(?:\>([^=|}]*))?(?:=([^|}]*))?)(\||\}|$)/', $text, $m );
 28+ if ( !$r ) return null;
 29+ return array(
 30+ 'len' => strlen( $m[5] == '|' ? $m[0] : $m[1] ),
 31+ 'obj' => new WOMQueryPrintoutModel( trim( $m[2] ), trim( $m[4] ), trim( $m[3] ) ) );
 32+ } else {
 33+ $r = preg_match( '/^(\s*\?([^=|}]+)(?:=([^|}]*))?)(\||\}|$)/', $text, $m );
 34+ if ( !$r ) return null;
 35+ return array(
 36+ 'len' => strlen( $m[4] == '|' ? $m[0] : $m[1] ),
 37+ 'obj' => new WOMQueryPrintoutModel( trim( $m[2] ), trim( $m[3] ) ) );
 38+ }
 39+ }
 40+
1741 public function parseNext( $text, WikiObjectModelCollection $parentObj, $offset = 0 ) {
1842 if ( !( ( $parentObj instanceof WOMTemplateModel )
1943 || ( $parentObj instanceof WOMParserFunctionModel ) ) )
2044 return null;
2145
2246 $text = substr( $text, $offset );
 47+
 48+ $ret = $this->parseAsk ( $text, $parentObj );
 49+ if ( $ret != null ) return $ret;
 50+
2351 $r = preg_match( '/^([^=|}]*)(\||=|\}|$)/', $text, $m );
2452 if ( !$r ) return null;
2553
@@ -38,13 +66,19 @@
3967 }
4068 }
4169
42 - public function getSubParserID() {
 70+ public function getSubParserID( $obj ) {
 71+ if ( ( $obj instanceof WOMQuerystringModel )
 72+ || ( $obj instanceof WOMQueryPrintoutModel ) )
 73+ return '';
 74+
4375 return WOM_PARSER_ID_PARAM_VALUE;
4476 }
4577
4678 public function isObjectClosed( $obj, $text, $offset ) {
4779 if ( !( ( $obj instanceof WOMTemplateFieldModel )
48 - || ( $obj instanceof WOMParameterModel ) ) )
 80+ || ( $obj instanceof WOMParameterModel )
 81+ || ( $obj instanceof WOMQuerystringModel )
 82+ || ( $obj instanceof WOMQueryPrintoutModel ) ) )
4983 return false;
5084
5185 if ( ( strlen( $text ) >= $offset + 1 ) && $text { $offset } == '|' ) {
Index: trunk/extensions/WikiObjectModel/includes/parsers/WOMPropertyValueParser.php
@@ -0,0 +1,36 @@
 2+<?php
 3+/**
 4+ * @author Ning
 5+ *
 6+ * @file
 7+ * @ingroup WikiObjectModels
 8+ */
 9+
 10+class WOMPropertyValueParser extends WikiObjectModelParser {
 11+
 12+ public function __construct() {
 13+ parent::__construct();
 14+ $this->m_parserId = WOM_PARSER_ID_PROPERTY_VALUE;
 15+ }
 16+
 17+ public function parseNext( $text, WikiObjectModelCollection $parentObj, $offset = 0 ) {
 18+ if ( !( $parentObj instanceof WOMNestPropertyModel ) )
 19+ return null;
 20+
 21+ return array( 'len' => 0, 'obj' => new WOMNestPropertyValueModel() );
 22+ }
 23+
 24+ public function isObjectClosed( $obj, $text, $offset ) {
 25+ if ( !( $obj instanceof WOMNestPropertyValueModel ) )
 26+ return false;
 27+
 28+ if ( ( strlen( $text ) >= $offset + 1 ) && $text { $offset } == '|' ) {
 29+ return 1;
 30+ }
 31+ $parentClose = WOMProcessor::getObjectParser( $obj->getParent() )
 32+ ->isObjectClosed( $obj->getParent(), $text, $offset );
 33+ if ( $parentClose !== false ) return 0;
 34+
 35+ return false;
 36+ }
 37+}
Index: trunk/extensions/WikiObjectModel/includes/parsers/WOMPropertyParser.php
@@ -45,8 +45,42 @@
4646 // }
4747 $r = preg_match( $semanticLinkPattern, $text, $m );
4848 if ( $r ) {
 49+ $inQuerystring = false;
 50+ $o = $parentObj;
 51+ do {
 52+ if ( $o instanceof WOMQuerystringModel ) {
 53+ $inQuerystring = true;
 54+ break;
 55+ }
 56+ $o = $o->getParent();
 57+ } while ( $o != null );
 58+
 59+ if ( $inQuerystring ) {
 60+ $semanticPropPattern = '/\[\[ # Beginning of the link
 61+ (?:([^:][^][]*):[=:])+ # Property name (or a list of those)
 62+ /xu';
 63+ preg_match( $semanticPropPattern, $text, $m );
 64+ return array( 'len' => strlen( $m[0] ), 'obj' => new WOMNestPropertyModel( $m[1] ) );
 65+ }
 66+
4967 return array( 'len' => strlen( $m[0] ), 'obj' => new WOMPropertyModel( $m[1], $m[2], isset( $m[3] ) ? $m[3] : '' ) );
5068 }
5169 return null;
5270 }
 71+
 72+ public function getSubParserID( $obj ) {
 73+ return WOM_PARSER_ID_PROPERTY_VALUE;
 74+ }
 75+
 76+ public function isObjectClosed( $obj, $text, $offset ) {
 77+ if ( !$obj instanceof WOMNestPropertyModel ) return false;
 78+
 79+ if ( ( strlen( $text ) >= $offset + 2 )
 80+ && $text { $offset } == ']'
 81+ && $text { $offset + 1 } == ']' ) {
 82+ return 2;
 83+ }
 84+
 85+ return false;
 86+ }
5387 }
Index: trunk/extensions/WikiObjectModel/includes/parsers/WOMTableParser.php
@@ -26,7 +26,7 @@
2727 return array( 'len' => strlen( $m[1] ), 'obj' => new WOMTableModel( trim( $m[2] ) ) );
2828 }
2929
30 - public function getSubParserID() {
 30+ public function getSubParserID( $obj ) {
3131 return WOM_PARSER_ID_TABLECELL;
3232 }
3333
Index: trunk/extensions/WikiObjectModel/includes/parsers/WikiObjectModelParser.php
@@ -70,7 +70,7 @@
7171 }
7272
7373 // specified next parser. e.g., template parser -> parameter parser
74 - public function getSubParserID() { return ''; }
 74+ public function getSubParserID( $obj ) { return ''; }
7575
7676 /**
7777 * Return a string that displays all error messages as a tooltip, or
Index: trunk/extensions/WikiObjectModel/includes/models/WOM_OM_NestProperty.php
@@ -0,0 +1,66 @@
 2+<?php
 3+/**
 4+ * This model implements Property models.
 5+ *
 6+ * @author Ning
 7+ * @file
 8+ * @ingroup WikiObjectModels
 9+ *
 10+ */
 11+
 12+class WOMNestPropertyModel extends WikiObjectModelCollection {
 13+ protected $m_property; // name
 14+ protected $m_user_property; // name
 15+
 16+ public function __construct( $property ) {
 17+ parent::__construct( WOM_TYPE_NESTPROPERTY );
 18+
 19+ if ( !defined( 'SMW_VERSION' ) ) {
 20+ // MW hook will catch this exception
 21+ throw new MWException( __METHOD__ . ": Property model is invalid. Please install 'SemanticMediaWiki extension' first." );
 22+ }
 23+
 24+ $user_property = SMWPropertyValue::makeUserProperty( $property );
 25+ if ( count ( $user_property->getErrors() ) > 0 ) {
 26+ $user_property = SMWPropertyValue::makeUserProperty( '///NA///' );
 27+ } else {
 28+ $property = '';
 29+ }
 30+
 31+ $this->m_user_property = $user_property;
 32+ $this->m_property = $property;
 33+ }
 34+
 35+ public function getProperty() {
 36+ return $this->m_user_property;
 37+ }
 38+
 39+ public function setProperty( $property ) {
 40+ $this->m_user_property = $property;
 41+ }
 42+
 43+ public function getPropertyName() {
 44+ return ( $this->m_property ) ? $this->m_property : $this->m_user_property->getWikiValue();
 45+ }
 46+
 47+ public function getWikiText() {
 48+ return "[[{$this->getPropertyName()}::{$this->getValueText()}]]";
 49+ }
 50+
 51+ public function getValueText() {
 52+ return parent::getWikiText();
 53+ }
 54+
 55+ public function setXMLAttribute( $key, $value ) {
 56+ if ( $value == '' ) throw new MWException( __METHOD__ . ": value cannot be empty" );
 57+
 58+ if ( $key == 'name' ) {
 59+ $property = SMWPropertyValue::makeUserProperty( $value );
 60+ } else {
 61+ throw new MWException( __METHOD__ . ": invalid key/value pair: name=property_name" );
 62+ }
 63+ }
 64+ protected function getXMLAttributes() {
 65+ return 'name="' . self::xml_entities( $this->getPropertyName() ) . '"';
 66+ }
 67+}
Index: trunk/extensions/WikiObjectModel/includes/models/WOM_OM_Querystring.php
@@ -0,0 +1,29 @@
 2+<?php
 3+/**
 4+ * This model implements key value models.
 5+ *
 6+ * @author Ning
 7+ * @file
 8+ * @ingroup WikiObjectModels
 9+ *
 10+ */
 11+
 12+class WOMQuerystringModel extends WikiObjectModelCollection {
 13+
 14+ public function __construct() {
 15+ parent::__construct( WOM_TYPE_QUERYSTRING );
 16+ }
 17+
 18+ public function setXMLAttribute( $key, $value ) {
 19+ throw new MWException( __METHOD__ . ": no key/value pair required" );
 20+ }
 21+
 22+ public function getWikiText() {
 23+ return $this->getValueText() .
 24+ '|';
 25+ }
 26+
 27+ public function getValueText() {
 28+ return parent::getWikiText();
 29+ }
 30+}
Index: trunk/extensions/WikiObjectModel/includes/models/WOM_OM_QueryPrintout.php
@@ -0,0 +1,62 @@
 2+<?php
 3+/**
 4+ * This model implements query printout models.
 5+ *
 6+ * @author Ning
 7+ * @file
 8+ * @ingroup WikiObjectModels
 9+ *
 10+ */
 11+
 12+class WOMQueryPrintoutModel extends WikiObjectModel {
 13+ protected $m_property;
 14+ protected $m_label;
 15+ protected $m_aggregation;
 16+
 17+ public function __construct( $property, $label = '', $aggregation = '' ) {
 18+ parent::__construct( WOM_TYPE_QUERYPRINTOUT );
 19+ $this->m_property = $property;
 20+ $this->m_label = $label;
 21+
 22+ $this->m_aggregation = ( defined( 'SMW_AGGREGATION_VERSION' ) ? $aggregation : '' );
 23+ }
 24+
 25+ public function getProperty() {
 26+ return $this->m_property;
 27+ }
 28+
 29+ public function getLabel() {
 30+ return $this->m_label;
 31+ }
 32+
 33+ public function getAggregation() {
 34+ return $this->m_aggregation;
 35+ }
 36+
 37+ public function getWikiText() {
 38+ return '?' . $this->m_property .
 39+ ( $this->m_aggregation == '' ? "" : ( '>' . $this->m_aggregation ) ) .
 40+ ( $this->m_label == '' ? "" : ( '=' . $this->m_label ) ) . '|';
 41+ }
 42+
 43+ public function setXMLAttribute( $key, $value ) {
 44+ if ( $value == '' ) throw new MWException( __METHOD__ . ": value cannot be empty" );
 45+
 46+ if ( $key == 'property' ) {
 47+ $this->m_property = $value;
 48+ } elseif ( $key == 'label' ) {
 49+ $this->m_label = $value;
 50+ } elseif ( defined( 'SMW_AGGREGATION_VERSION' ) && $key == 'aggregation' ) {
 51+ $this->m_aggregation = $value;
 52+ } else {
 53+ throw new MWException( __METHOD__ . ": invalid key/value pair: property=property name, label=query label" .
 54+ ( defined( 'SMW_AGGREGATION_VERSION' ) ? ", aggregation=agg_type" : "" ) );
 55+ }
 56+ }
 57+
 58+ protected function getXMLAttributes() {
 59+ return 'property="' . self::xml_entities( $this->m_property ) . '"' .
 60+ ( $this->m_aggregation == '' ? "" : ( ' aggregation="' . self::xml_entities( $this->m_aggregation ) . '"' ) ) .
 61+ ( $this->m_label == '' ? "" : ( ' label="' . self::xml_entities( $this->m_label ) . '"' ) );
 62+ }
 63+}
Index: trunk/extensions/WikiObjectModel/includes/models/WOM_OM_NestPropertyValue.php
@@ -0,0 +1,20 @@
 2+<?php
 3+/**
 4+ * This model implements Parameter / Template_field value models.
 5+ *
 6+ * @author Ning
 7+ * @file
 8+ * @ingroup WikiObjectModels
 9+ *
 10+ */
 11+
 12+class WOMNestPropertyValueModel extends WikiObjectModelCollection {
 13+
 14+ public function __construct() {
 15+ parent::__construct( WOM_TYPE_NESTPROPERTYVAL );
 16+ }
 17+
 18+ public function setXMLAttribute( $key, $value ) {
 19+ throw new MWException( __METHOD__ . ": no key/value pair required" );
 20+ }
 21+}
Index: trunk/extensions/WikiObjectModel/includes/WOM_Processor.php
@@ -206,7 +206,7 @@
207207 }
208208 }
209209
210 - private static function parseNext( $text, WikiObjectModelCollection $parentObj, WOMPageModel $rootObj, &$offset = 0, $parserInstance = null ) {
 210+ private static function parseNext( $text, WikiObjectModelCollection $parentObj, WOMPageModel $rootObj, &$offset = 0 ) {
211211 // $fname = 'WikiObjectModel::parseNext (WOM)';
212212 // wfProfileIn( $fname );
213213
@@ -224,22 +224,23 @@
225225 }
226226
227227 $result = null;
228 - if ( $parserInstance == null ) {
229 - $parserInstance2 = null;
 228+ $parserId = self::getObjectParser( $parentObj )->getSubParserID( $parentObj );
 229+ if ( $parserId == '' ) {
 230+ $parserInstance = null;
230231 foreach ( self::$parsers as $parser ) {
231232 $parser_res = $parser->parseNext( $text, $parentObj, $offset );
232233 if ( $parser_res == null ) continue;
233 - if ( $parserInstance2 == null || $parser->subclassOf( $parserInstance2 ) ) {
234 - $parserInstance2 = $parser;
 234+ if ( $parserInstance == null || $parser->subclassOf( $parserInstance ) ) {
 235+ $parserInstance = $parser;
235236 $result = $parser_res;
236237 }
237238 }
238 - if ( $parserInstance2 == null ) {
239 - $parserInstance2 = self::$base_parser;
240 - $result = $parserInstance2->parseNext( $text, $parentObj, $offset );
 239+ if ( $parserInstance == null ) {
 240+ $parserInstance = self::$base_parser;
 241+ $result = $parserInstance->parseNext( $text, $parentObj, $offset );
241242 }
242243 } else {
243 - $parserInstance2 = $parserInstance;
 244+ $parserInstance = self::$parsers[$parserId];
244245 $result = $parserInstance->parseNext( $text, $parentObj, $offset );
245246 if ( $result == null ) {
246247 // FIXME: just omit current char, this will not fit for Wiki parser
@@ -265,15 +266,14 @@
266267
267268 if ( $next_obj->isCollection() && !( isset( $result['closed'] ) && $result['closed'] ) ) {
268269 $collection_start = $offset;
269 - $d = self::parseNext( $text, $next_obj, $rootObj, $offset,
270 - ( ( $parserInstance2 != null && isset( self::$parsers[$parserInstance2->getSubParserID()] ) ) ?
271 - self::$parsers[$parserInstance2->getSubParserID()] :
272 - null ) );
273 - if ( $d == 100 && $parserInstance2->isObjectClosed( $next_obj, $text, $offset ) === false ) {
 270+ $d = self::parseNext( $text, $next_obj, $rootObj, $offset );
 271+ if ( $d == 100 && $parserInstance->isObjectClosed( $next_obj, $text, $offset ) === false ) {
274272 // rollback
275 - $p = self::getObjectParser( $parentObj );
276 - if ( $p != null && $p->isObjectClosed( $parentObj, $text, $offset ) === false ) {
277 - return $d;
 273+ if ( ! ( $parentObj instanceof WOMPageModel ) ) {
 274+ $p = self::getObjectParser( $parentObj );
 275+ if ( $p != null && $p->isObjectClosed( $parentObj, $text, $offset ) === false ) {
 276+ return $d;
 277+ }
278278 }
279279 $parentObj->rollback();
280280 $offset = $collection_start - $result['len'];
@@ -738,13 +738,12 @@
739739
740740 public static function getValidText( $text, $parent, $wom ) {
741741 if ( $parent != null ) {
742 - $parserId = self::getObjectParser( $parent )->getSubParserID();
 742+ $parserId = self::getObjectParser( $parent )->getSubParserID( $parent );
743743 if ( $parserId != '' ) {
744 - $parser = self::$parsers[$parserId];
745744 $offset = 0;
746745 $p2 = clone ( $parent );
747746 $p2->reset();
748 - self::parseNext( $text, $p2, $wom, $offset, $parser );
 747+ self::parseNext( $text, $p2, $wom, $offset );
749748 $text = '';
750749 foreach ( $p2->getObjects() as $obj ) {
751750 $text .= $obj->getWikiText();
Index: trunk/extensions/WikiObjectModel/includes/WOM_Setup.php
@@ -14,9 +14,13 @@
1515 $wgAutoloadClasses['WOMTemplateModel'] = $wgOMIP . '/includes/models/WOM_OM_Template.php';
1616 $wgAutoloadClasses['WOMParserFunctionModel'] = $wgOMIP . '/includes/models/WOM_OM_ParserFunction.php';
1717 $wgAutoloadClasses['WOMParameterModel'] = $wgOMIP . '/includes/models/WOM_OM_Parameter.php';
 18+$wgAutoloadClasses['WOMQuerystringModel'] = $wgOMIP . '/includes/models/WOM_OM_Querystring.php';
 19+$wgAutoloadClasses['WOMQueryPrintoutModel'] = $wgOMIP . '/includes/models/WOM_OM_QueryPrintout.php';
1820 $wgAutoloadClasses['WOMParamValueModel'] = $wgOMIP . '/includes/models/WOM_OM_ParamValue.php';
1921 $wgAutoloadClasses['WOMTemplateFieldModel'] = $wgOMIP . '/includes/models/WOM_OM_TmplField.php';
2022 $wgAutoloadClasses['WOMPropertyModel'] = $wgOMIP . '/includes/models/WOM_OM_Property.php';
 23+$wgAutoloadClasses['WOMNestPropertyModel'] = $wgOMIP . '/includes/models/WOM_OM_NestProperty.php';
 24+$wgAutoloadClasses['WOMNestPropertyValueModel'] = $wgOMIP . '/includes/models/WOM_OM_NestPropertyValue.php';
2125 $wgAutoloadClasses['WOMTextModel'] = $wgOMIP . '/includes/models/WOM_OM_Text.php';
2226 $wgAutoloadClasses['WOMLinkModel'] = $wgOMIP . '/includes/models/WOM_OM_Link.php';
2327 $wgAutoloadClasses['WOMSectionModel'] = $wgOMIP . '/includes/models/WOM_OM_Section.php';
@@ -34,11 +38,15 @@
3539 define( 'WOM_TYPE_CATEGORY' , 'category' );
3640 define( 'WOM_TYPE_SECTION' , 'section' );
3741 define( 'WOM_TYPE_PROPERTY' , 'property' );
 42+define( 'WOM_TYPE_NESTPROPERTY' , 'nest_property' );
 43+define( 'WOM_TYPE_NESTPROPERTYVAL', 'nest_property_value' );
3844 define( 'WOM_TYPE_LINK' , 'link' );
3945 define( 'WOM_TYPE_TEXT' , 'text' );
4046 define( 'WOM_TYPE_TEMPLATE' , 'template' );
4147 define( 'WOM_TYPE_PARSERFUNCTION' , 'parser_function' );
4248 define( 'WOM_TYPE_PARAMETER' , 'parameter' );
 49+define( 'WOM_TYPE_QUERYSTRING' , 'querystring' );
 50+define( 'WOM_TYPE_QUERYPRINTOUT' , 'printout' );
4351 define( 'WOM_TYPE_PARAM_VALUE' , 'value' );
4452 define( 'WOM_TYPE_TMPL_FIELD' , 'template_field' );
4553 define( 'WOM_TYPE_SENTENCE' , 'sentence' );
@@ -56,6 +64,7 @@
5765 $wgAutoloadClasses['WOMCategoryParser'] = $wgOMIP . '/includes/parsers/WOMCategoryParser.php';
5866 $wgAutoloadClasses['WOMLinkParser'] = $wgOMIP . '/includes/parsers/WOMLinkParser.php';
5967 $wgAutoloadClasses['WOMPropertyParser'] = $wgOMIP . '/includes/parsers/WOMPropertyParser.php';
 68+$wgAutoloadClasses['WOMPropertyValueParser'] = $wgOMIP . '/includes/parsers/WOMPropertyValueParser.php';
6069 $wgAutoloadClasses['WOMSectionParser'] = $wgOMIP . '/includes/parsers/WOMSectionParser.php';
6170 $wgAutoloadClasses['WOMTemplateParser'] = $wgOMIP . '/includes/parsers/WOMTemplateParser.php';
6271 $wgAutoloadClasses['WOMParserFunctionParser'] = $wgOMIP . '/includes/parsers/WOMParserFunctionParser.php';
@@ -72,6 +81,7 @@
7382 define( 'WOM_PARSER_ID_CATEGORY' , 'category' );
7483 define( 'WOM_PARSER_ID_SECTION' , 'section' );
7584 define( 'WOM_PARSER_ID_PROPERTY' , 'property' );
 85+define( 'WOM_PARSER_ID_PROPERTY_VALUE' , 'property_val' );
7686 define( 'WOM_PARSER_ID_LINK' , 'link' );
7787 define( 'WOM_PARSER_ID_TEXT' , 'text' );
7888 define( 'WOM_PARSER_ID_TEMPLATE' , 'template' );
@@ -91,6 +101,7 @@
92102 'WOMCategoryParser',
93103 'WOMLinkParser',
94104 'WOMPropertyParser',
 105+ 'WOMPropertyValueParser',
95106 'WOMSectionParser',
96107 'WOMTemplateParser',
97108 'WOMParserFunctionParser',
@@ -109,11 +120,15 @@
110121 WOM_TYPE_CATEGORY => WOM_PARSER_ID_CATEGORY,
111122 WOM_TYPE_SECTION => WOM_PARSER_ID_SECTION,
112123 WOM_TYPE_PROPERTY => WOM_PARSER_ID_PROPERTY,
 124+ WOM_TYPE_NESTPROPERTY => WOM_PARSER_ID_PROPERTY,
 125+ WOM_TYPE_NESTPROPERTYVAL => WOM_PARSER_ID_PROPERTY_VALUE,
113126 WOM_TYPE_LINK => WOM_PARSER_ID_LINK,
114127 WOM_TYPE_TEMPLATE => WOM_PARSER_ID_TEMPLATE,
115128 WOM_TYPE_PARSERFUNCTION => WOM_PARSER_ID_PARSERFUNCTION,
116129 WOM_TYPE_PARAMETER => WOM_PARSER_ID_PARAMETER,
117130 WOM_TYPE_TMPL_FIELD => WOM_PARSER_ID_PARAMETER,
 131+ WOM_TYPE_QUERYSTRING => WOM_PARSER_ID_PARAMETER,
 132+ WOM_TYPE_QUERYPRINTOUT => WOM_PARSER_ID_PARAMETER,
118133 WOM_TYPE_PARAM_VALUE => WOM_PARSER_ID_PARAM_VALUE,
119134 WOM_TYPE_LISTITEM => WOM_PARSER_ID_LISTITEM,
120135 WOM_TYPE_TABLE => WOM_PARSER_ID_TABLE,
Index: trunk/extensions/WikiObjectModel/includes/WOM_Initialize.php
@@ -1,7 +1,7 @@
22 <?php
33
44 /**
5 - * Deprecated entry point, use WikiObjectModel/WikiObjectModel.php instead.
 5+ * Deprecated entry point, use WikiObjectModel/WikiObjectModel.php instead.
66 */
77
88 include_once '../WikiObjectModel.php';
\ No newline at end of file

Comments

#Comment by Nikerabbit (talk | contribs)   10:52, 16 December 2011

New files are missing svn:eol-style = native;

#Comment by 😂 (talk | contribs)   15:01, 5 January 2012

Was done as part of r106460.

Status & tagging log