r109987 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109986‎ | r109987 | r109988 >
Date:02:32, 25 January 2012
Author:yaron
Status:deferred
Tags:
Comment:
Fix for handling of $sfgRedLinksCheckOnlyLocalProps with SMW 1.7; added "redlink=1" to generated red-link URLs
Modified paths:
  • /trunk/extensions/SemanticForms/includes/SF_FormLinker.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/includes/SF_FormLinker.php
@@ -75,6 +75,8 @@
7676 $propertyName = $property->getWikiValue();
7777 $linkedPageName = $propertyValue->getWikiValue();
7878 }
 79+ // Needed for SMW 1.7 (?)
 80+ $linkedPageName = str_replace( '_', ' ', $linkedPageName );
7981 if ( !is_null( $linkedPageName ) ) {
8082 if ( array_key_exists( $linkedPageName, self::$mLinkedPages ) ) {
8183 self::$mLinkedPages[$linkedPageName][] = $propertyName;
@@ -214,6 +216,10 @@
215217 $form_edit_url .= ( strpos( $form_edit_url, "?" ) ) ? "&" : "?";
216218 $form_edit_url .= "alt_form[$i]=$alt_form";
217219 }
 220+ // Add "redlink=1" to the query string, so that the user will
 221+ // go to the actual page if it now exists.
 222+ $form_edit_url .= ( strpos( $form_edit_url, "?" ) ) ? "&" : "?";
 223+ $form_edit_url .= "redlink=1";
218224 return $form_edit_url;
219225 }
220226