88 */
99
1010// use MediaWiki\Extension\KnowledgeGraph\Aliases\Category as CategoryClass;
11- use MediaWiki \Extension \KnowledgeGraph \Aliases \Title as TitleClass ;
1211use MediaWiki \MediaWikiServices ;
1312use MediaWiki \Revision \SlotRecord ;
1413use MediaWiki \Title \Title ;
@@ -256,15 +255,15 @@ public static function parserFunctionKnowledgeGraph( Parser $parser, ...$argv )
256255 // property-related options
257256 foreach ( $ values as $ val ) {
258257 if ( preg_match ( '/^property-options(\?(.+))?=(.+)/ ' , $ val , $ match ) ) {
259- $ title_ = TitleClass ::makeTitleSafe ( \SMW_NS_PROPERTY , $ match [2 ] );
258+ $ title_ = Title ::makeTitleSafe ( \SMW_NS_PROPERTY , $ match [2 ] );
260259 if ( $ title_ ) {
261260 $ propertyOptions [$ title_ ->getText ()] = $ match [3 ];
262261 }
263262 }
264263 }
265264
266265 foreach ( $ params ['nodes ' ] as $ titleText ) {
267- $ title_ = TitleClass ::newFromText ( $ titleText );
266+ $ title_ = Title ::newFromText ( $ titleText );
268267 if ( $ title_ && $ title_ ->isKnown () ) {
269268 if ( !isset ( self ::$ data [$ title_ ->getFullText ()] ) ) {
270269 self ::setSemanticDataFromApi ( $ title_ , $ params ['properties ' ], 0 , $ params ['depth ' ] );
@@ -275,7 +274,7 @@ public static function parserFunctionKnowledgeGraph( Parser $parser, ...$argv )
275274 $ graphOptions = [];
276275 if ( !empty ( $ params ['graph-options ' ] ) ) {
277276 // , NS_KNOWLEDGEGRAPH
278- $ title_ = TitleClass ::newFromText ( $ params ['graph-options ' ], NS_MEDIAWIKI );
277+ $ title_ = Title ::newFromText ( $ params ['graph-options ' ], NS_MEDIAWIKI );
279278
280279 if ( $ title_ && $ title_ ->isKnown () ) {
281280 // $graphOptions = json_decode( self::getWikipageContent( $title_ ), true );
@@ -284,7 +283,7 @@ public static function parserFunctionKnowledgeGraph( Parser $parser, ...$argv )
284283 }
285284
286285 foreach ( $ propertyOptions as $ property => $ titleText ) {
287- $ title_ = TitleClass ::newFromText ( $ titleText , NS_MEDIAWIKI );
286+ $ title_ = Title ::newFromText ( $ titleText , NS_MEDIAWIKI );
288287 if ( $ title_ && $ title_ ->isKnown () ) {
289288 // $propertyOptions[$property] = json_decode( self::getWikipageContent( $title_ ), true );
290289 $ propertyOptions [$ property ] = self ::getWikipageContent ( $ title_ );
@@ -595,7 +594,7 @@ public static function articlesInCategories( $category, $limit, $offset ) {
595594 );
596595 $ ret = [];
597596 foreach ( $ res as $ row ) {
598- $ title_ = TitleClass ::newFromID ( $ row ->pageid );
597+ $ title_ = Title ::newFromID ( $ row ->pageid );
599598 if ( $ title_ ) {
600599 $ ret [] = $ title_ ;
601600 }
0 commit comments