r104040 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r104039‎ | r104040 | r104041 >
Date:14:48, 23 November 2011
Author:yaron
Status:deferred
Tags:
Comment:
Fix for r102704 - fixed getFormEditURL(), based on code suggestions from Nikerabbit
Modified paths:
  • /trunk/extensions/SemanticForms/specials/SF_FormStart.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SemanticForms/specials/SF_FormStart.php
@@ -127,9 +127,9 @@
128128 $targetName = SFUtils::titleURLString( $targetTitle );
129129 // Special handling for forms whose name contains a slash.
130130 if ( strpos( $formName, '/' ) !== false ) {
131 - return $fe->getTitle()->getFullURL( array( 'form' => $formName, 'target' => $targetName ) );
 131+ return $fe->getTitle()->getLocalURL( array( 'form' => $formName, 'target' => $targetName ) );
132132 }
133 - return $fe->getTitle()->getFullURL() . "/" . $formName . "/" . $targetName;
 133+ return $fe->getTitle( "$formName/$targetName" )->getLocalURL();
134134 }
135135
136136 function doRedirect( $form_name, $page_name, $params ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r102704Fixed handling of forms whose name contains a slash, via new helper function,...yaron22:27, 10 November 2011