Tweichart has submitted this change and it was merged.
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
PatchSet 2: Rebased on current HEAD
Change-Id: Iafcfe91c19308fed2b6d0e95cc914733fea3e7f4
---
M includes/utility/FileSystemHelper.class.php
M resources/bluespice/bluespice.wikiText.js
2 files changed, 17 insertions(+), 4 deletions(-)
Approvals:
Robert Vogel: Checked; Looks good to me, but someone else must approve
Tweichart: Verified; Looks good to me, approved
diff --git a/includes/utility/FileSystemHelper.class.php
b/includes/utility/FileSystemHelper.class.php
index 4972536..b2dc13b 100644
--- a/includes/utility/FileSystemHelper.class.php
+++ b/includes/utility/FileSystemHelper.class.php
@@ -576,6 +576,8 @@
$oRepoFile = wfFindFile( $sTargetFileName );
if ($status->isGood() && $oRepoFile !== false){
+ $oPage = WikiPage::factory( $oRepoFile->getTitle() );
+ $oPage->doEditContent( new WikitextContent( $sPageText
), '' );
if ( BsExtensionManager::isContextActive(
'MW::SecureFileStore::Active' ) ) {
return
Status::newGood(SecureFileStore::secureStuff($oRepoFile->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: merged
Gerrit-Change-Id: Iafcfe91c19308fed2b6d0e95cc914733fea3e7f4
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Tweichart <[email protected]>
Gerrit-Reviewer: Mglaser <[email protected]>
Gerrit-Reviewer: Pigpen <[email protected]>
Gerrit-Reviewer: Pwirth <[email protected]>
Gerrit-Reviewer: Robert Vogel <[email protected]>
Gerrit-Reviewer: Tweichart <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits