Yaron Koren has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/95635


Change subject: Fix for "connecting property" bug in new #subobject handling
......................................................................

Fix for "connecting property" bug in new #subobject handling

Change-Id: I95930587bba799f78febcac3faa5afb890d69b80
---
M specials/SF_CreateClass.php
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/SemanticForms 
refs/changes/35/95635/1

diff --git a/specials/SF_CreateClass.php b/specials/SF_CreateClass.php
index 5d3ba7f..cc9a28e 100644
--- a/specials/SF_CreateClass.php
+++ b/specials/SF_CreateClass.php
@@ -103,13 +103,13 @@
                }
 
                // Also create the "connecting property", if there is one.
-               if ( $wgRequest->getCheck('connecting_property') ) {
+               $connectingProperty = trim( 
$wgRequest->getVal('connecting_property') );
+               if ( $connectingProperty != '' ) {
                        global $smwgContLang;
                        $datatypeLabels = $smwgContLang->getDatatypeLabels();
                        $property_type = $datatypeLabels['_wpg'];
                        $full_text = SFCreateProperty::createPropertyText( 
$property_type, '', $allowed_values );
-                       $property_name = trim( 
$wgRequest->getVal('connecting_property') );
-                       $property_title = Title::makeTitleSafe( 
SMW_NS_PROPERTY, $property_name );
+                       $property_title = Title::makeTitleSafe( 
SMW_NS_PROPERTY, $connectingProperty );
                        $params = array();
                        $params['user_id'] = $wgUser->getId();
                        $params['page_text'] = $full_text;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I95930587bba799f78febcac3faa5afb890d69b80
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/SemanticForms
Gerrit-Branch: master
Gerrit-Owner: Yaron Koren <[email protected]>

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

Reply via email to