r86386 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r86385‎ | r86386 | r86387 >
Date:10:29, 19 April 2011
Author:reedy
Status:deferred (Comments)
Tags:
Comment:
Revert RDF changes from r86365

What is the point of this extension? It looks like it's just rotting, with duplicate classes and alike
Modified paths:
  • /trunk/extensions/RdfRedland/test/MwRdfTest.php (modified) (history)
  • /trunk/extensions/RdfRedland/test/includes/Title.php (modified) (history)

Diff [purge]

Index: trunk/extensions/RdfRedland/test/MwRdfTest.php
@@ -283,7 +283,7 @@
284284 public function createTestArticle( $title_text, $text,
285285 $cats, $user,
286286 $contribs = array() ) {
287 - $title = Title::newFromText( $title_text );
 287+ $title = new Title( $title_text );
288288 $title->setParentCategories( $cats );
289289 $article = new Article( $title);
290290 $article->setContent( $text );
@@ -295,7 +295,7 @@
296296 }
297297
298298 public function createTalkPage() {
299 - $title = Title::newFromText( "Talk:Modeling test article");
 299+ $title = new Title( "Talk:Modeling test article");
300300 $user = self::createUserWithRealName();
301301 $article = new Article( $title );
302302 $article->setContent( " " );
@@ -305,7 +305,7 @@
306306
307307 public function createStorageTestArticle() {
308308 $text = self::InPageWikitext();
309 - $title = Title::newFromText( "Storage test article");
 309+ $title = new Title( "Storage test article");
310310 $cats = array( "Category:Red", "Category:Blue" );
311311 $title->setParentCategories( $cats );
312312 $article = new Article( $title );
@@ -317,7 +317,7 @@
318318
319319 public function createspecialpagetestarticle() {
320320 $text = self::InPageWikitext();
321 - $title = Title::newFromText( "Modeling test article");
 321+ $title = new Title( "Modeling test article");
322322 $cats = array( "Category:Red", "Category:Blue" );
323323 $title->setParentCategories( $cats );
324324 $article = new Article( $title );
@@ -328,7 +328,7 @@
329329 }
330330
331331 public function createTestTitle( $text ) {
332 - return Title::newFromText( $text );
 332+ return new Title( $text );
333333 }
334334
335335 public function createExpectedModel( $text ) {
Index: trunk/extensions/RdfRedland/test/includes/Title.php
@@ -50,11 +50,11 @@
5151 public static function newFromText( $text) {
5252 if ( ! $text ) return null;
5353 $text = str_replace( '_', ' ', $text);
54 - return Title::newFromText( $text );
 54+ return new Title( $text );
5555 }
5656
5757 public static function makeTitle( $ns, $text ) {
58 - return Title::makeTitle( $ns, $text );
 58+ return new Title( "$ns:$text" );
5959 }
6060
6161 public function __construct( $text ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r86365Apply Extension related new constructor fixes...reedy23:17, 18 April 2011

Comments

#Comment by Happy-melon (talk | contribs)   10:34, 19 April 2011

Move it to a branch?

Status & tagging log