Yaron Koren has submitted this change and it was merged.

Change subject: Fix for correct display of spaces in page names in form titles
......................................................................


Fix for correct display of spaces in page names in form titles

Change-Id: Ib60ba6bc1e325a9dd6cf288402726f9d97bf7f47
---
M specials/SF_FormEdit.php
1 file changed, 2 insertions(+), 3 deletions(-)

Approvals:
  Yaron Koren: Verified; Looks good to me, approved
  jenkins-bot: Checked



diff --git a/specials/SF_FormEdit.php b/specials/SF_FormEdit.php
index 76e1dbd..b6f2b2e 100644
--- a/specials/SF_FormEdit.php
+++ b/specials/SF_FormEdit.php
@@ -38,6 +38,7 @@
                        $queryparts = explode( '/', $query, 2 );
                        $this->mForm = isset( $queryparts[ 0 ] ) ? $queryparts[ 
0 ] : '';
                        $this->mTarget = isset( $queryparts[ 1 ] ) ? 
$queryparts[ 1 ] : '';
+                       $this->mTarget = str_replace( '_', ' ', $this->mTarget 
);
                }
 
                $alt_forms = $this->getRequest()->getArray( 'alt_form' );
@@ -62,7 +63,6 @@
        }
 
        static function printForm( &$form_name, &$targetName, $alt_forms = 
array( ) ) {
-
                global $wgOut, $wgRequest;
 
                if ( method_exists( 'ApiMain', 'getContext' ) ) {
@@ -108,8 +108,7 @@
                        } else {
                                $pageTitle = $result[ 'formtitle' ] . ': ' . 
$targetName;
                        }
-
-               } else if ( $result[ 'form' ] !== '' ) {
+               } elseif ( $result[ 'form' ] !== '' ) {
                        // set page title depending on whether the target page 
exists
                        if ( empty( $targetName ) ) {
                                $pageTitle = wfMessage( 
'sf_formedit_createtitlenotarget', $result[ 'form' ] )->text();

-- 
To view, visit https://gerrit.wikimedia.org/r/50938
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib60ba6bc1e325a9dd6cf288402726f9d97bf7f47
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>
Gerrit-Reviewer: Yaron Koren <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to