Tweichart has uploaded a new change for review.

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

Change subject: file helper + js links change
......................................................................

file helper + js links change

* change for filesystemhelper to set the right fields
* changed params in wikitext for insertimage

Change-Id: Iafcfe91c19308fed2b6d0e95cc914733fea3e7f4
---
M includes/utility/FileSystemHelper.class.php
M resources/bluespice/bluespice.wikiText.js
2 files changed, 17 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceFoundation 
refs/changes/56/187356/1

diff --git a/includes/utility/FileSystemHelper.class.php 
b/includes/utility/FileSystemHelper.class.php
index dd1190e..4feb96c 100644
--- a/includes/utility/FileSystemHelper.class.php
+++ b/includes/utility/FileSystemHelper.class.php
@@ -545,6 +545,8 @@
                        unlink($sFilename);
                $oFile = wfFindFile(basename($sFilename));
                if ($status->isGood() && $oFile !== false){
+                       $oPage = WikiPage::factory($oFile->getTitle());
+                       $oPage->doEditContent(new WikitextContent($sPageText), 
"");
                        if ( BsExtensionManager::isContextActive( 
'MW::SecureFileStore::Active' ) ) {
                                return 
Status::newGood(SecureFileStore::secureStuff($oFile->getUrl(), true));
                        }
diff --git a/resources/bluespice/bluespice.wikiText.js 
b/resources/bluespice/bluespice.wikiText.js
index 7318713..c4f4c88 100644
--- a/resources/bluespice/bluespice.wikiText.js
+++ b/resources/bluespice/bluespice.wikiText.js
@@ -94,7 +94,7 @@
                        //'baseline', 'sub', 'super', 'top', 'text-top', 
'middle', 'bottom', 'text-bottom' //Vertical alignment (UNSUPPORTED)
                ];
                var wikiLinkProperties = [
-                       'alt', 'link'
+                       'alt', 'link', 'nolink'
                ];
 
                var additionalProperties = [
@@ -125,7 +125,8 @@
                        displayText: '',
                        link: false,
                        sizewidth: false,
-                       sizeheight: false
+                       sizeheight: false,
+                       nolink: false
                };
 
                if ( typeof(cfg) === 'object' ) {
@@ -227,7 +228,12 @@
                                var key = kvpair[0], value = kvpair[1];
 
                                if( $.inArray( key, ['link', 'verweis'] ) !== 
-1 ) {
-                                       me.properties.link = value;
+                                       if (value === ""){
+                                               me.properties.nolink = true;
+                                       }
+                                       else{
+                                               me.properties.link = value;
+                                       }
                                        continue;
                                }
 
@@ -260,11 +266,16 @@
                                if ( $.inArray(property, ['left','right', 
'center']) !== -1 ) continue; //Not yet used. Instead 'align' is set.
 
                                var value = this.properties[property];
+                               if (property === 'noLink' && value === true){
+                                       wikiText.push('link=');
+                                       continue;
+                               }
                                //"link" may be intentionally empty. Therefore 
we have to
                                //check it _before_ "value is empty?"
                                if ( property === 'link' && ( value !== null &&
                                        value !== 'false' && value !== false &&
-                                       typeof value !== "undefined" ) ) {
+                                       typeof value !== "undefined" && value 
!== "" &&
+                                       this.properties['nolink'] === false) ) {
                                        wikiText.push(property + '=' + value);
                                        continue;
                                }

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iafcfe91c19308fed2b6d0e95cc914733fea3e7f4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Tweichart <[email protected]>

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

Reply via email to