[MediaWiki-commits] [Gerrit] Make it possible to remove categories in view mode - change (mediawiki...BlueSpiceExtensions)

2014-12-11 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Make it possible to remove categories in view mode
..

Make it possible to remove categories in view mode

Categories could not be removed in view mode (just adding). Now, all
categories are removed before setting the selected.

Change-Id: I88e4cbe5e0c8db50d7388d14bedfd7ce215ad8b6
---
M InsertCategory/InsertCategory.class.php
1 file changed, 12 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/42/179142/1

diff --git a/InsertCategory/InsertCategory.class.php 
b/InsertCategory/InsertCategory.class.php
index a3a6fe3..16b6055 100644
--- a/InsertCategory/InsertCategory.class.php
+++ b/InsertCategory/InsertCategory.class.php
@@ -144,17 +144,24 @@
);
}
 
-   $sTags = RequestContext::getMain()->getRequest()->getVal( 
'categories', '' );
-   $aTags = explode( ',', $sTags );
+   $sTags = RequestContext::getMain()->getRequest()->getVal( 
'categories' );
+   $aTags = ( empty( $sTags ) )
+   ? array()
+   : explode( ',', $sTags );
 
$oTitle = Title::newFromID( $iArticleId );
if ( $oTitle->exists() ) {
$sCat = BsNamespaceHelper::getNamespaceName( 
NS_CATEGORY );
$sText = 
BsPageContentProvider::getInstance()->getContentFromTitle( $oTitle, 
Revision::RAW );
 
-   foreach ( $aTags as $sTag ) {
-   if ( preg_match( 
'#\[\['.$sCat.':'.$sTag.'\]\]#i', $sText ) ) continue;
-   $sText .= "\n[[".$sCat.":$sTag]]";
+   // Remove all before adding
+   $sPattern = '#^\[\['.$sCat.':.*?\]\]#im';
+   $sText = preg_replace( $sPattern, '', $sText );
+
+   if ( !empty( $aTags ) ) {
+   foreach ( $aTags as $sTag ) {
+   $sText .= "\n[[".$sCat.":$sTag]]";
+   }
}
 
$oArticle = new Article( $oTitle );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I88e4cbe5e0c8db50d7388d14bedfd7ce215ad8b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Also check for closures in hook registration - change (mediawiki...BlueSpiceFoundation)

2014-12-11 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Also check for closures in hook registration
..


Also check for closures in hook registration

Change-Id: Icd75e99dcab73c34ce578f6b8f73389a20aab197
---
M includes/ExtensionMW.class.php
1 file changed, 6 insertions(+), 2 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/includes/ExtensionMW.class.php b/includes/ExtensionMW.class.php
index 657754d..0919d67 100644
--- a/includes/ExtensionMW.class.php
+++ b/includes/ExtensionMW.class.php
@@ -82,8 +82,12 @@
$register = ( $method && ( $method !== 'on' . $hook ) ) ? 
array( &$this, $method ) : $this;
// do not set same hook twice
if ( isset( $wgHooks ) && isset( $wgHooks[$hook] )
-   && is_array( $wgHooks[$hook] ) && in_array( $register, 
$wgHooks[$hook] ) )
+   && is_array( $wgHooks[$hook] )
+   && !(count($wgHooks[$hook]) && 
is_object($wgHooks[$hook][0])
+   && ($wgHooks[$hook][0] instanceof Closure))
+   && in_array( $register, $wgHooks[$hook] ) ) {
return;
+   };
if ( $bExecuteFirst && isset( $wgHooks[$hook] ) ) {
array_unshift( $wgHooks[$hook], $register );
} else {
@@ -131,4 +135,4 @@
$sSubKey
);
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icd75e99dcab73c34ce578f6b8f73389a20aab197
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Pigpen 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Changed version of BlueSpice - change (mediawiki...BlueSpiceExtensions)

2014-12-10 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Changed version of BlueSpice
..

Changed version of BlueSpice

Change-Id: Ie3fef2db888939f8f2f21ce76ed2f331d8456e8c
---
M UniversalExport/UniversalExport.class.php
1 file changed, 3 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/61/178861/1

diff --git a/UniversalExport/UniversalExport.class.php 
b/UniversalExport/UniversalExport.class.php
index 9805ac9..4fd803f 100644
--- a/UniversalExport/UniversalExport.class.php
+++ b/UniversalExport/UniversalExport.class.php
@@ -112,12 +112,13 @@
$this->setHook( 'BSInsertMagicAjaxGetData', 
'onBSInsertMagicAjaxGetData' );
$this->setHook( 'BeforePageDisplay' );
 
+   global $wgBlueSpiceExtInfo;
//Configuration variables
$aMetadataDefaults = array(
-   'creator'  => 'Hallo Welt! Medienwerkstatt GmbH',
+   'creator' => 'Hallo Welt! Medienwerkstatt GmbH',
);
$aMetadataOverrides = array(
-   'producer' => 'UniversalExport 2.22 (BlueSpice for 
MediaWiki)'
+   'producer' => 'UniversalExport 
'.$wgBlueSpiceExtInfo['version'].' (BlueSpice for MediaWiki)'
);
 
BsConfig::registerVar( 
'MW::UniversalExport::CategoryWhitelist', $this->aCategoryWhitelist,  
BsConfig::LEVEL_PRIVATE|BsConfig::TYPE_ARRAY_STRING );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3fef2db888939f8f2f21ce76ed2f331d8456e8c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Release 2.23.0 - change (mediawiki...BlueSpiceSkin)

2014-12-10 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Release 2.23.0
..

Release 2.23.0

Change-Id: I796812f011483df776d2ed6a62bacaf64fa523bd
---
M .gitreview
M BlueSpiceSkin.i18n.php
M BlueSpiceSkin.php
M BlueSpiceSkin.skin.php
A doc/bs.icons.html
A i18n/ast.json
A i18n/av.json
A i18n/bcc.json
A i18n/bcl.json
A i18n/be-tarask.json
A i18n/bn.json
A i18n/br.json
A i18n/ca.json
A i18n/ce.json
A i18n/de.json
A i18n/el.json
A i18n/en.json
A i18n/eo.json
A i18n/es.json
A i18n/fa.json
A i18n/fr.json
A i18n/fy.json
A i18n/gu.json
A i18n/he.json
A i18n/ia.json
A i18n/id.json
A i18n/it.json
A i18n/ja.json
A i18n/ksh.json
A i18n/lb.json
A i18n/mk.json
A i18n/mn.json
A i18n/ms.json
A i18n/nap.json
A i18n/nb.json
A i18n/nl.json
A i18n/pl.json
A i18n/pt.json
A i18n/qqq.json
A i18n/ru.json
A i18n/sco.json
A i18n/sr-ec.json
A i18n/sr-el.json
A i18n/su.json
A i18n/sv.json
A i18n/ta.json
A i18n/tr.json
A i18n/uk.json
A i18n/vi.json
A i18n/zh-hans.json
A i18n/zh-hant.json
M includes/BlueSpiceSkinHooks.php
A resources/bs.icons.css
A resources/components.extension.less
A resources/components.less
A resources/components.skin.less
A resources/components.special.less
A resources/components/extension.extendedSearch.less
M resources/components/extension.notifications.less
M resources/components/extension.statebar.less
M resources/components/extension.widgetbar.js
M resources/components/extension.widgetbar.less
M resources/components/skin.content.less
M resources/components/skin.content.tables.less
M resources/components/skin.contentActions.js
M resources/components/skin.contentActions.less
M resources/components/skin.dataAfterContent.js
M resources/components/skin.dataAfterContent.less
M resources/components/skin.font.less
M resources/components/skin.icons.less
M resources/components/skin.links.less
M resources/components/skin.menuTop.js
M resources/components/skin.menuTop.less
M resources/components/skin.navigationTabs.js
M resources/components/skin.navigationTabs.less
M resources/components/skin.search.less
D resources/components/special.preferences.css
A resources/components/special.preferences.js
A resources/components/special.preferences.less
M resources/fonts.css
A resources/fonts/RobotoSlab-Bold.ttf
A resources/fonts/RobotoSlab-Regular.ttf
A resources/fonts/SourceSansPro-Bold.ttf
A resources/fonts/SourceSansPro-Regular.ttf
D resources/fonts/source_sans_pro_300.ttf
D resources/fonts/source_sans_pro_600.ttf
M resources/icomoon/icomoon.eot
M resources/icomoon/icomoon.icons.css
M resources/icomoon/icomoon.svg
M resources/icomoon/icomoon.ttf
M resources/icomoon/icomoon.woff
D resources/images/desktop/bs-add.png
D resources/images/desktop/bs-delete.png
D resources/images/desktop/bs-icon-loginswitch-off.png
D resources/images/desktop/bs-icon-loginswitch-on.png
D resources/images/desktop/bs-icon-user-over.png
D resources/images/desktop/bs-icon-user-transp-50.png
D resources/images/desktop/bs-list-bullet.gif
D resources/images/desktop/bs-logo.png
D resources/images/desktop/bs-moremenu-less.png
D resources/images/desktop/bs-moremenu-less_r.png
D resources/images/desktop/bs-moremenu-more.png
D resources/images/desktop/bs-moremenu-more_l.png
R resources/images/desktop/bs-nav-icon-sprite.png
D resources/images/desktop/bs-user-anon-image.png
D resources/images/desktop/bs-user-default-image.png
D resources/images/desktop/bs-user-deleted-image.png
D resources/images/desktop/content-drucken-btn-active.png
D resources/images/desktop/content-drucken-btn.png
D resources/images/desktop/content-edit-btn-active.png
D resources/images/desktop/content-edit-btn.png
D resources/images/desktop/content-mailen-btn-active.png
D resources/images/desktop/content-mailen-btn.png
D resources/images/desktop/content-pdf-btn-active.png
D resources/images/desktop/content-pdf-btn.png
A resources/images/desktop/external-link-icon.png
D resources/images/desktop/favicon.ico
A resources/images/desktop/footer-marker.png
D resources/images/desktop/icon_nav.png
D resources/images/desktop/navi-collapse-btn.png
D resources/images/desktop/navi-expand-btn.png
A resources/images/desktop/navi-header-marker.png
D resources/images/desktop/navi-icon-alle-kategorien.png
D resources/images/desktop/navi-icon-alle-seiten.png
D resources/images/desktop/navi-icon-anleitungen.png
D resources/images/desktop/navi-icon-hauptseite.png
D resources/images/desktop/navi-icon-kontakt.png
D resources/images/desktop/navi-icon-letzte-aenderungen.png
D resources/images/desktop/navi-icon-standard.png
D resources/images/desktop/navi-icon-support.png
D resources/images/desktop/search-field.png
D resources/images/desktop/star.png
D resources/images/desktop/statusbar-btn_less.png
D resources/images/desktop/statusbar-btn_more.png
D resources/images/desktop/userbar-icon-message-on.png
D resources/images/desktop/userbar-icon-message.png
D resources/images/desktop/userbar-icon-workflow.png
A 

[MediaWiki-commits] [Gerrit] Release 2.23.0 - change (mediawiki...BlueSpiceFoundation)

2014-12-10 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Release 2.23.0
..

Release 2.23.0

Change-Id: Iec3330eee5a7b74d2519289fbe266431a27bc86d
---
A .gitreview
M BLUESPICE-INSTALL
M BLUESPICE-LICENCE
M BLUESPICE-RELEASE-HISTORY
M BLUESPICE-RELEASE-NOTES
A BlueSpice.hooks.php
M BlueSpiceFoundation.php
M doc/design.txt
M doc/hooks.txt
A i18n/core/am.json
M i18n/core/as.json
A i18n/core/ast.json
A i18n/core/av.json
A i18n/core/ba.json
A i18n/core/bg.json
M i18n/core/bn.json
M i18n/core/br.json
A i18n/core/bto.json
A i18n/core/ca.json
M i18n/core/ce.json
A i18n/core/crh-cyrl.json
A i18n/core/crh-latn.json
M i18n/core/de-formal.json
M i18n/core/de.json
A i18n/core/diq.json
M i18n/core/el.json
M i18n/core/en.json
M i18n/core/es.json
M i18n/core/fa.json
A i18n/core/fi.json
M i18n/core/fr.json
A i18n/core/fy.json
M i18n/core/gl.json
M i18n/core/he.json
A i18n/core/hu.json
A i18n/core/ia.json
A i18n/core/id.json
M i18n/core/it.json
M i18n/core/ja.json
A i18n/core/ka.json
M i18n/core/kk-cyrl.json
A i18n/core/kn.json
M i18n/core/ko.json
M i18n/core/krc.json
A i18n/core/ku-latn.json
M i18n/core/lb.json
A i18n/core/lrc.json
A i18n/core/lv.json
A i18n/core/lzh.json
M i18n/core/mk.json
A i18n/core/mr.json
A i18n/core/my.json
A i18n/core/myv.json
A i18n/core/nds-nl.json
M i18n/core/nl.json
M i18n/core/oc.json
A i18n/core/or.json
M i18n/core/pl.json
A i18n/core/pt.json
M i18n/core/qqq.json
M i18n/core/rmf.json
A i18n/core/ro.json
A i18n/core/roa-tara.json
M i18n/core/ru.json
M i18n/core/sco.json
M i18n/core/sr-ec.json
A i18n/core/sr-el.json
M i18n/core/sv.json
M i18n/core/ta.json
A i18n/core/te.json
A i18n/core/tr.json
A i18n/core/tyv.json
A i18n/core/uk.json
A i18n/core/uz.json
M i18n/core/yi.json
M i18n/core/zh-hans.json
A i18n/core/zh-hant.json
M i18n/credits/ast.json
A i18n/credits/av.json
M i18n/credits/bn.json
M i18n/credits/br.json
M i18n/credits/ce.json
M i18n/credits/de.json
A i18n/credits/diq.json
M i18n/credits/en.json
M i18n/credits/es.json
A i18n/credits/eu.json
M i18n/credits/fa.json
A i18n/credits/fi.json
M i18n/credits/fr.json
A i18n/credits/fy.json
A i18n/credits/gl.json
M i18n/credits/he.json
A i18n/credits/hu.json
A i18n/credits/ia.json
A i18n/credits/id.json
M i18n/credits/it.json
M i18n/credits/ja.json
A i18n/credits/kn.json
M i18n/credits/ko.json
A i18n/credits/lb.json
A i18n/credits/lzh.json
M i18n/credits/mk.json
M i18n/credits/nl.json
M i18n/credits/oc.json
A i18n/credits/pl.json
A i18n/credits/pt.json
M i18n/credits/qqq.json
M i18n/credits/ru.json
M i18n/credits/sco.json
M i18n/credits/sr-ec.json
M i18n/credits/sv.json
M i18n/credits/ta.json
A i18n/credits/tr.json
A i18n/credits/uk.json
M i18n/credits/vi.json
M i18n/credits/zh-hans.json
A i18n/credits/zh-hant.json
M i18n/diagnostics/ast.json
A i18n/diagnostics/av.json
A i18n/diagnostics/br.json
A i18n/diagnostics/ce.json
M i18n/diagnostics/de.json
A i18n/diagnostics/diq.json
M i18n/diagnostics/el.json
M i18n/diagnostics/es.json
M i18n/diagnostics/fa.json
M i18n/diagnostics/fr.json
A i18n/diagnostics/gl.json
A i18n/diagnostics/ia.json
A i18n/diagnostics/id.json
M i18n/diagnostics/it.json
M i18n/diagnostics/ja.json
M i18n/diagnostics/ko.json
A i18n/diagnostics/ksh.json
M i18n/diagnostics/mk.json
M i18n/diagnostics/nb.json
A i18n/diagnostics/nl.json
M i18n/diagnostics/oc.json
M i18n/diagnostics/pl.json
A i18n/diagnostics/pt.json
M i18n/diagnostics/qqq.json
M i18n/diagnostics/ru.json
M i18n/diagnostics/sco.json
M i18n/diagnostics/sv.json
A i18n/diagnostics/uk.json
M i18n/diagnostics/vi.json
A i18n/diagnostics/yi.json
M i18n/diagnostics/zh-hans.json
A i18n/diagnostics/zh-hant.json
M i18n/extjs-portal/ast.json
M i18n/extjs-portal/br.json
M i18n/extjs-portal/ce.json
M i18n/extjs-portal/de.json
A i18n/extjs-portal/diq.json
M i18n/extjs-portal/es.json
M i18n/extjs-portal/fa.json
M i18n/extjs-portal/fr.json
A i18n/extjs-portal/fy.json
M i18n/extjs-portal/gl.json
M i18n/extjs-portal/he.json
A i18n/extjs-portal/ia.json
A i18n/extjs-portal/id.json
M i18n/extjs-portal/it.json
M i18n/extjs-portal/ja.json
A i18n/extjs-portal/kn.json
A i18n/extjs-portal/ko.json
M i18n/extjs-portal/krc.json
M i18n/extjs-portal/lb.json
M i18n/extjs-portal/mk.json
A i18n/extjs-portal/nds-nl.json
M i18n/extjs-portal/nl.json
M i18n/extjs-portal/oc.json
M i18n/extjs-portal/pl.json
A i18n/extjs-portal/pt-br.json
A i18n/extjs-portal/pt.json
M i18n/extjs-portal/qqq.json
M i18n/extjs-portal/rmf.json
M i18n/extjs-portal/ru.json
M i18n/extjs-portal/sco.json
M i18n/extjs-portal/sr-ec.json
M i18n/extjs-portal/sv.json
M i18n/extjs-portal/ta.json
A i18n/extjs-portal/tr.json
A i18n/extjs-portal/uk.json
M i18n/extjs-portal/vi.json
M i18n/extjs-portal/zh-hans.json
A i18n/extjs-portal/zh-hant.json
M i18n/extjs/as.json
M i18n/extjs/ast.json
A i18n/extjs/bg.json
M i18n/extjs/bn.json
M i18n/extjs/br.json
A i18n/extjs/ca.json
M i18n/extjs/ce.json
A i18n/extjs/crh-cyrl.json
A i18n/extjs/crh

[MediaWiki-commits] [Gerrit] Release 2.23.0 - change (mediawiki...BlueSpiceExtensions)

2014-12-10 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Release 2.23.0
..

Release 2.23.0

Change-Id: I91df3d10e70b42a902aae242409d28355211e801
---
A .gitreview
M ArticleInfo/ArticleInfo.class.php
M ArticleInfo/ArticleInfo.setup.php
A ArticleInfo/i18n/ar.json
A ArticleInfo/i18n/ast.json
A ArticleInfo/i18n/bcc.json
A ArticleInfo/i18n/bn.json
A ArticleInfo/i18n/br.json
A ArticleInfo/i18n/bs.json
A ArticleInfo/i18n/ca.json
A ArticleInfo/i18n/ce.json
A ArticleInfo/i18n/de.json
A ArticleInfo/i18n/diq.json
A ArticleInfo/i18n/en.json
A ArticleInfo/i18n/es.json
A ArticleInfo/i18n/eu.json
A ArticleInfo/i18n/fa.json
A ArticleInfo/i18n/fi.json
A ArticleInfo/i18n/fr.json
A ArticleInfo/i18n/fy.json
A ArticleInfo/i18n/gl.json
A ArticleInfo/i18n/he.json
A ArticleInfo/i18n/hu.json
A ArticleInfo/i18n/ia.json
A ArticleInfo/i18n/id.json
A ArticleInfo/i18n/it.json
A ArticleInfo/i18n/ja.json
A ArticleInfo/i18n/kn.json
A ArticleInfo/i18n/ko.json
A ArticleInfo/i18n/lb.json
A ArticleInfo/i18n/lv.json
A ArticleInfo/i18n/mk.json
A ArticleInfo/i18n/ms.json
A ArticleInfo/i18n/myv.json
A ArticleInfo/i18n/ne.json
A ArticleInfo/i18n/nl.json
A ArticleInfo/i18n/oc.json
A ArticleInfo/i18n/pl.json
A ArticleInfo/i18n/pt-br.json
A ArticleInfo/i18n/pt.json
A ArticleInfo/i18n/qqq.json
A ArticleInfo/i18n/ru.json
A ArticleInfo/i18n/sc.json
A ArticleInfo/i18n/sr-ec.json
A ArticleInfo/i18n/sv.json
A ArticleInfo/i18n/te.json
A ArticleInfo/i18n/tr.json
A ArticleInfo/i18n/tyv.json
A ArticleInfo/i18n/uk.json
A ArticleInfo/i18n/yi.json
A ArticleInfo/i18n/zh-hans.json
A ArticleInfo/i18n/zh-hant.json
M ArticleInfo/languages/ArticleInfo.i18n.php
M ArticleInfo/resources/bluespice.articleInfo.js
M Authors/Authors.class.php
M Authors/Authors.setup.php
A Authors/i18n/ast.json
A Authors/i18n/bcc.json
A Authors/i18n/bn.json
A Authors/i18n/br.json
A Authors/i18n/ca.json
A Authors/i18n/ce.json
A Authors/i18n/de.json
A Authors/i18n/diq.json
A Authors/i18n/el.json
A Authors/i18n/en.json
A Authors/i18n/es.json
A Authors/i18n/et.json
A Authors/i18n/fa.json
A Authors/i18n/fr.json
A Authors/i18n/gl.json
A Authors/i18n/gu.json
A Authors/i18n/he.json
A Authors/i18n/hu.json
A Authors/i18n/ia.json
A Authors/i18n/id.json
A Authors/i18n/it.json
A Authors/i18n/ja.json
A Authors/i18n/kn.json
A Authors/i18n/ko.json
A Authors/i18n/lb.json
A Authors/i18n/lv.json
A Authors/i18n/mk.json
A Authors/i18n/nl.json
A Authors/i18n/oc.json
A Authors/i18n/pl.json
A Authors/i18n/pt-br.json
A Authors/i18n/pt.json
A Authors/i18n/qqq.json
A Authors/i18n/ru.json
A Authors/i18n/sv.json
A Authors/i18n/tr.json
A Authors/i18n/uk.json
A Authors/i18n/zh-hans.json
A Authors/i18n/zh-hant.json
M Authors/languages/Authors.i18n.php
M Authors/resources/bluespice.authors.css
M Avatars/Avatars.class.php
M Avatars/Avatars.setup.php
A Avatars/i18n/ast.json
A Avatars/i18n/bn.json
A Avatars/i18n/br.json
A Avatars/i18n/ca.json
A Avatars/i18n/ce.json
A Avatars/i18n/de-formal.json
A Avatars/i18n/de.json
A Avatars/i18n/en.json
A Avatars/i18n/es.json
A Avatars/i18n/fa.json
A Avatars/i18n/fi.json
A Avatars/i18n/fr.json
A Avatars/i18n/fy.json
A Avatars/i18n/gl.json
A Avatars/i18n/he.json
A Avatars/i18n/hu.json
A Avatars/i18n/ia.json
A Avatars/i18n/id.json
A Avatars/i18n/it.json
A Avatars/i18n/ja.json
A Avatars/i18n/ka.json
A Avatars/i18n/ko.json
A Avatars/i18n/lb.json
A Avatars/i18n/mk.json
A Avatars/i18n/mr.json
A Avatars/i18n/nl.json
A Avatars/i18n/oc.json
A Avatars/i18n/pl.json
A Avatars/i18n/pt.json
A Avatars/i18n/qqq.json
A Avatars/i18n/roa-tara.json
A Avatars/i18n/ru.json
A Avatars/i18n/sr-ec.json
A Avatars/i18n/sr-el.json
A Avatars/i18n/sv.json
A Avatars/i18n/te.json
A Avatars/i18n/tr.json
A Avatars/i18n/uk.json
A Avatars/i18n/zh-hans.json
A Avatars/i18n/zh-hant.json
M Avatars/includes/lib/Identicon/COPYING.txt
M Avatars/includes/lib/Identicon/README.txt
M Avatars/includes/lib/InstantAvatar/instantavatar.php
M Avatars/includes/lib/InstantAvatar/test.php
D Avatars/includes/specials/SpecialAvatars.class.php
M Avatars/languages/Avatars.i18n.php
A Avatars/maintenance/CreateAvatarHTML.php
M Avatars/resources/BS.Avatars/SettingsWindow.js
M Blog/Blog.class.php
M Blog/Blog.setup.php
A Blog/i18n/ast.json
A Blog/i18n/br.json
A Blog/i18n/bs.json
A Blog/i18n/bto.json
A Blog/i18n/ce.json
A Blog/i18n/de.json
A Blog/i18n/en.json
A Blog/i18n/es.json
A Blog/i18n/eu.json
A Blog/i18n/fa.json
A Blog/i18n/fr.json
A Blog/i18n/fy.json
A Blog/i18n/gl.json
A Blog/i18n/he.json
A Blog/i18n/hu.json
A Blog/i18n/ia.json
A Blog/i18n/id.json
A Blog/i18n/it.json
A Blog/i18n/ja.json
A Blog/i18n/lb.json
A Blog/i18n/mk.json
A Blog/i18n/nl.json
A Blog/i18n/oc.json
A Blog/i18n/pl.json
A Blog/i18n/pt.json
A Blog/i18n/qqq.json
A Blog/i18n/ru.json
A Blog/i18n/sr-ec.json
A Blog/i18n/sr-el.json
A Blog/i18n/sv.json
A Blog/i18n/uk.json
A Blog/i18n/zh-hans.json
A Blog/i18n/zh-hant.json
M Blog/languages/Blog.i18n.php
M Blog/views/view.Blog.php
M 

[MediaWiki-commits] [Gerrit] Added missing query param returnto - change (mediawiki...BlueSpiceFoundation)

2014-12-10 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Added missing query param returnto
..

Added missing query param returnto

Query param returnto was missing on login link, so the user always gets
redircted to main page and not to the desired page.

Change-Id: I1d3c1288a45ab4bab4552b6be06dfa21a5a3ba8a
---
M includes/BsBaseTemplate.php
1 file changed, 20 insertions(+), 4 deletions(-)


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

diff --git a/includes/BsBaseTemplate.php b/includes/BsBaseTemplate.php
index 2827163..4540761 100644
--- a/includes/BsBaseTemplate.php
+++ b/includes/BsBaseTemplate.php
@@ -528,10 +528,26 @@
$aOut[] = "";
}
 
-   if ($oUser->isLoggedIn())
-   $aOut[] = 
BsCore::getInstance()->getUserMiniProfile($oUser, array("width" => "32", 
"height" => "32"))->execute();
-   else
-   $aOut[] = "" . 
Linker::link(SpecialPage::getTitleFor('login'), wfMessage("login")->plain()) . 
"";
+   if ( $oUser->isLoggedIn() ) {
+   $oProfile = BsCore::getInstance()->getUserMiniProfile(
+   $oUser,
+   array(
+   "width" => "32",
+   "height" => "32"
+   )
+   );
+   $aOut[] = $oProfile->execute();
+   } else {
+   $sLink = Linker::link(
+   SpecialPage::getTitleFor( 'login' ),
+   wfMessage( "login" )->plain(),
+   array(),
+   array(
+   'returnto' => 
RequestContext::getMain()->getRequest()->getVal( 'title' )
+   )
+   );
+   $aOut[] = "" . 
$sLink . "";
+   }
 
$this->printPersonalInfo($aOut);
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1d3c1288a45ab4bab4552b6be06dfa21a5a3ba8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Removed hard readable font color - change (mediawiki...BlueSpiceSkin)

2014-12-10 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Removed hard readable font color
..

Removed hard readable font color

Change-Id: Ieff4f99357f9f7b930815de4ddcb040d41cc51b2
---
M resources/components/skin.content.less
1 file changed, 0 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/skins/BlueSpiceSkin 
refs/changes/39/178839/1

diff --git a/resources/components/skin.content.less 
b/resources/components/skin.content.less
index 31ed594..02ce8fd 100644
--- a/resources/components/skin.content.less
+++ b/resources/components/skin.content.less
@@ -37,7 +37,6 @@
text-align:center;
a {
border:1px solid #F0F0F0;
-   color:#C9D6DE;
display:block;
float:left;
height:90px;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieff4f99357f9f7b930815de4ddcb040d41cc51b2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Changed include order of BlueSpice - change (mediawiki...BlueSpiceFoundation)

2014-12-09 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Changed include order of BlueSpice
..

Changed include order of BlueSpice

 * Changed RSS whitelist

Change-Id: I0bbb6558a2f31fb3a81747f438d7b68c37ed4cca
---
M includes/DefaultSettings.php
M includes/installer/BsLocalSettingsGenerator.php
2 files changed, 2 insertions(+), 2 deletions(-)


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

diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php
index 165b3be..19ed476 100644
--- a/includes/DefaultSettings.php
+++ b/includes/DefaultSettings.php
@@ -35,7 +35,7 @@
 //Default settings needed for BlueSpice
 $wgNamespacesWithSubpages[NS_MAIN] = true;
 $wgApiFrameOptions = 'SAMEORIGIN';
-$wgRSSUrlWhitelist = array( "*" );
+$wgRSSUrlWhitelist = array( "http://blog.blue-spice.org/feed/"; );
 $wgExternalLinkTarget = '_blank';
 $wgCapitalLinkOverrides[ NS_FILE ] = false;
 $wgRestrictDisplayTitle = false; //Otherwise only titles that normalize to the 
same DB key are allowed
diff --git a/includes/installer/BsLocalSettingsGenerator.php 
b/includes/installer/BsLocalSettingsGenerator.php
index 695ef89..e483af5 100644
--- a/includes/installer/BsLocalSettingsGenerator.php
+++ b/includes/installer/BsLocalSettingsGenerator.php
@@ -53,9 +53,9 @@
}
 
// BlueSpice
+   $localSettings .= "require_once 
\"\$IP/extensions/BlueSpiceDistribution/BlueSpiceDistribution.php\";\n";
$localSettings .= "require_once 
\"\$IP/extensions/BlueSpiceFoundation/BlueSpiceFoundation.php\";\n";
$localSettings .= "require_once 
\"\$IP/extensions/BlueSpiceExtensions/BlueSpiceExtensions.php\";\n";
-   $localSettings .= "require_once 
\"\$IP/extensions/BlueSpiceDistribution/BlueSpiceDistribution.php\";\n";
$localSettings .= "require_once 
\"\$IP/skins/BlueSpiceSkin/BlueSpiceSkin.php\";\n";
 
$localSettings .= "\n\n# End of automatically generated 
settings.

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0bbb6558a2f31fb3a81747f438d7b68c37ed4cca
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Updating RELEASE NOTES/HISTORY, INSTALL and LICENSE - change (mediawiki...BlueSpiceFoundation)

2014-12-09 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Updating RELEASE NOTES/HISTORY, INSTALL and LICENSE
..

Updating RELEASE NOTES/HISTORY, INSTALL and LICENSE

Updating release relevant documents for upcoming BlueSpice 2.23 release.

Change-Id: Ie8034f3f428664d94b70b94581b051b9426faeda
---
M BLUESPICE-INSTALL
M BLUESPICE-LICENCE
M BLUESPICE-RELEASE-HISTORY
M BLUESPICE-RELEASE-NOTES
4 files changed, 297 insertions(+), 487 deletions(-)


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

diff --git a/BLUESPICE-INSTALL b/BLUESPICE-INSTALL
index 3cdcb2e..9b5bbec 100644
--- a/BLUESPICE-INSTALL
+++ b/BLUESPICE-INSTALL
@@ -1,5 +1,9 @@
 ---
-Installing BlueSpice free 2.22 for MediaWiki
+Installing BlueSpice free 2.23 for MediaWiki
 ---
 
-English install manual: 
http://help.blue-spice.org/index.php/BlueSpice_2.22/Installation_Manual
\ No newline at end of file
+==Without Installer==
+* English install manual: 
http://help.blue-spice.org/index.php/BlueSpice_2.23/Installation_Manual/Without_Installer
+
+==Installer==
+* English install manual: 
http://help.blue-spice.org/index.php/BlueSpice_2.23/Installation_Manual/Installer
\ No newline at end of file
diff --git a/BLUESPICE-LICENCE b/BLUESPICE-LICENCE
index 7899460..12a09b6 100644
--- a/BLUESPICE-LICENCE
+++ b/BLUESPICE-LICENCE
@@ -1,5 +1,5 @@
 ## BlueSpice for MediaWiki
-## Copyright 2013 by Hallo Welt! Medienwerkstatt GmbH
+## Copyright 2014 by Hallo Welt! Medienwerkstatt GmbH
 ## http://www.blue-spice.org
 ## http://www.hallowelt.biz
 
diff --git a/BLUESPICE-RELEASE-HISTORY b/BLUESPICE-RELEASE-HISTORY
index ff9184b..e48c2e5 100644
--- a/BLUESPICE-RELEASE-HISTORY
+++ b/BLUESPICE-RELEASE-HISTORY
@@ -5,138 +5,118 @@
 
 = BlueSpice release notes =
 
-== BlueSpice for MediaWiki 2.22.1a ==
-Date: 2014-02-19
-This is a patch of the patch release
+==BlueSpice 2.23.0 beta==
+'''DO NOT USE THIS IN PRODUCTION.'''
 
-=== Changes since 2.22.1 ===
-* VisualEditor: Fixed resize error in Firefox and Chrome
+BlueSpice 2.23.0 is a minor and maintenance release.
 
-== BlueSpice for MediaWiki 2.22.1 ==
-Date: 2014-02-13
-This is a patch and maintenance release.
+===New features===
+* BlueSpice is translated by the [https://translatewiki.net translatewiki.net] 
community
+* Completely revised English and German localisation
+* Added memcached support
+* Rewrite of BlueSpice skin
+* Added compatibility to vector skin
+* Added package installer for MediaWiki and BlueSpice
+* Redesign of user and BlueSpice preferences layout
+* Added support to delete multiple rows in some managers
+* Updated TinyMCE to version 4.1.3
+* Files can be found by their category in InsertFile
 
-=== Changes since 2.22.0 ===
- extensions/BlueSpiceFoundation 
-* Fixes & changes to support MW updater
-* Use database specific escape methods to escape string for sql
-* Moved some messages from BSFoundation to respective extensions
-* Function for uploading base to tmp added
-* Had to separate the query in getCategoryStoreData because it was to 
expensive - ended in dead lock
-* Removed legacy code
-* Fix to stay compatible with MW 1.23
-* Fixed several bugs in InsertFile in combination with VisualEditor and 
getCategoryStoreData
-* Now using ExtJS StateManager
-* Fixed a bug in getCategoryStoreData which occurred, when a category title 
could not be created
-* Fixed bug that categories which did not exist anymore were displayed
-* Improved code of CommonAJAXInterface
-* Fixed inheritance issues with CRUDGridPanel
-* Improved list formatting
-* Added $wgExternalLinkTarget = '_blank'; as default
-* Changed wrong variable name in getUsersForVar
-* Added subpage check before rewrite links to user subpages
-* Removed MW::BlueSpiceScriptPath
-* Fixed methods args in HTMLFormFieldOverrides
-* Fixed display of extension version & status on Special:Version
+===Change log===
+BlueSpiceFoundation
+* Added download button to file pages
+* Removed support for mw < 1.21
+* Added audit method for CSS selectors to find out which do not match
+* PasteImage fix for preg_match overflow
+* Added BsBaseTemplate class
+* Don't show username when user is not logged in
+* Changed searchbox ID to avoid issues with MW searchSuggest
+* Resized profile image
+* New API base class for use with ExtJS stores
+* Minor profiling fix
+* Restored compatiblity to mw 1.22
+* Fixed action buttons in CRUDGridPanel
+* Added TitleCombo for dialogs
+* Removed strict mode, reset caller to null in some cases
+* Added make method to create selModel
+* Config class change for preferences
+* Fixed UTF-8 issue in BsTagFinder
+* Replaced deprecated User::editToken call (thanks to umherirrender)
 
- extensions/BlueSpiceExtension 
-* Fixes & changes to support MW updater
-* Remove some easily removed $wgTitles from BlueSpiceExtensions (thanks to 
Chad Horohoe

[MediaWiki-commits] [Gerrit] Fixed schema update hook registration - change (mediawiki...BlueSpiceExtensions)

2014-12-08 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Fixed schema update hook registration
..

Fixed schema update hook registration

We need to use $GLOBALS otherwise callback is not correct registered and
update from web will fail

Change-Id: I75b13c38eda953cd44036843fc099493da456273
---
M SmartList/SmartList.setup.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/96/178196/1

diff --git a/SmartList/SmartList.setup.php b/SmartList/SmartList.setup.php
index 5f9b3d9..f3941ef 100644
--- a/SmartList/SmartList.setup.php
+++ b/SmartList/SmartList.setup.php
@@ -8,7 +8,7 @@
 
 $GLOBALS['wgAutoloadClasses']['SmartList'] = __DIR__ . '/SmartList.class.php';
 
-$wgHooks['LoadExtensionSchemaUpdates'][] = 'SmartList::getSchemaUpdates';
+$GLOBALS['wgHooks']['LoadExtensionSchemaUpdates'][] = 
'SmartList::getSchemaUpdates';
 
 $wgAjaxExportList[] = 'SmartList::getMostVisitedPages';
 $wgAjaxExportList[] = 'SmartList::getMostEditedPages';

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I75b13c38eda953cd44036843fc099493da456273
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] WikiAdmin: Fix for shop link - change (mediawiki...BlueSpiceExtensions)

2014-12-08 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: WikiAdmin: Fix for shop link
..


WikiAdmin: Fix for shop link

The shop link was not placed in an list item element which caused
malformed html

Change-Id: Idfe18c02715390bbfd628049c0b1366a40f4cacc
---
M WikiAdmin/WikiAdmin.class.php
1 file changed, 4 insertions(+), 4 deletions(-)

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



diff --git a/WikiAdmin/WikiAdmin.class.php b/WikiAdmin/WikiAdmin.class.php
index c464e0c..7676e4f 100644
--- a/WikiAdmin/WikiAdmin.class.php
+++ b/WikiAdmin/WikiAdmin.class.php
@@ -216,7 +216,7 @@
$aOutSortable[$sModulLabel] = ''.$sLink.'';
}
 
-   $aOutSortable['Shop'] = self::getShopLink();
+   $aOutSortable['Shop'] = self::getShopListItem();
 
ksort( $aOutSortable );
$aOut[] = implode( "\n", $aOutSortable ).'';
@@ -236,10 +236,10 @@
}
 
/**
-* Returns a link to the BlueSpice shop
+* Returns a list item with a link to the BlueSpice shop
 * @return string Link to the shop
 */
-   private static function getShopLink() {
+   private static function getShopListItem() {
$sLink = Html::element(
'a',
array(
@@ -249,6 +249,6 @@
),
wfMessage( 'bs-wikiadmin-shop' )->escaped()
);
-   return $sLink;
+   return ''.$sLink.'';
}
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idfe18c02715390bbfd628049c0b1366a40f4cacc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] bug fix + element added - change (mediawiki...BlueSpiceFoundation)

2014-12-05 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: bug fix + element added
..


bug fix + element added

* fixed a bug where the wiki crashed after deactivating extension widgetbar
* added div for better display when widgetbar extension is deactivated

Change-Id: I8fe768292e6ffe6ecde0b4d91c63c2bbb3e7d7b9
---
M includes/BsBaseTemplate.php
M includes/utility/WidgetListHelper.class.php
2 files changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/includes/BsBaseTemplate.php b/includes/BsBaseTemplate.php
index 0063b1e..f706a95 100644
--- a/includes/BsBaseTemplate.php
+++ b/includes/BsBaseTemplate.php
@@ -297,7 +297,8 @@

msg( 'bs-tools-button' ) 
?>

-   html( 
'userlangattributes' ) ?>>
+   
+   html( 
'userlangattributes' ) ?> class="bs-personal-menu">
 $item){
echo 
$this->makeListItem( $key, $item );
}?>
diff --git a/includes/utility/WidgetListHelper.class.php 
b/includes/utility/WidgetListHelper.class.php
index 5533d88..5c7980a 100644
--- a/includes/utility/WidgetListHelper.class.php
+++ b/includes/utility/WidgetListHelper.class.php
@@ -79,6 +79,10 @@
$sKey = BsCacheHelper::getCacheKey( 'BlueSpice', 
'WidgetListHelper', $this->oTitle->getPrefixedDBkey() );
$aData = BsCacheHelper::get( $sKey );
 
+   if (is_null(BsExtensionManager::getExtension( "WidgetBar" ))){
+   return array();
+   }
+
if( $aData !== false ) {
wfDebugLog( 'BsMemcached', __CLASS__.': Fetching 
WidgetList page content from cache' );
$sArticleContent = $aData;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I8fe768292e6ffe6ecde0b4d91c63c2bbb3e7d7b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Tweichart 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Score direct match higher - change (mediawiki...BlueSpiceExtensions)

2014-12-05 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Score direct match higher
..

Score direct match higher

Increased boosting of direct matches

Change-Id: Ifddfb8e046ca1c8fe7059645e8abf327412343ef
---
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/94/177794/1

diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index f059f22..79c8d99 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -305,7 +305,7 @@
$this->aOptions['searchStringForStatistics'] = 
$this->aOptions['searchStringWildcarded'];
 
$aSearchTitle = array(
-   'title:(' . $this->aOptions['searchStringOrig'] . ')^2',
+   'title:(' . $this->aOptions['searchStringOrig'] . ')^5',
'titleWord:(' . $this->aOptions['searchStringOrig'] . 
')^2',
'titleReverse:(' . 
$this->aOptions['searchStringWildcarded'] . ')',
'redirects:(' . $this->aOptions['searchStringOrig'] . 
')'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ifddfb8e046ca1c8fe7059645e8abf327412343ef
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added link to BlueSpice Shop - change (mediawiki...BlueSpiceExtensions)

2014-12-05 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added link to BlueSpice Shop
..


Added link to BlueSpice Shop

* Removed some unreachable statements
* Make message translatable

Change-Id: I235db5e1f0da315ade25265f9c5a90d45159ec7b
---
M WikiAdmin/WikiAdmin.class.php
M WikiAdmin/i18n/de.json
M WikiAdmin/i18n/en.json
M WikiAdmin/i18n/qqq.json
4 files changed, 25 insertions(+), 8 deletions(-)

Approvals:
  Robert Vogel: Checked; Looks good to me, but someone else must approve
  Pigpen: Looks good to me, but someone else must approve
  Mglaser: Looks good to me, but someone else must approve
  Smuggli: Verified; Looks good to me, approved
  Tweichart: Checked; Looks good to me, but someone else must approve
  Pwirth: Looks good to me, but someone else must approve
  Raimond Spekking: Looks good to me, but someone else must approve



diff --git a/WikiAdmin/WikiAdmin.class.php b/WikiAdmin/WikiAdmin.class.php
index 4eaa0f4..c464e0c 100644
--- a/WikiAdmin/WikiAdmin.class.php
+++ b/WikiAdmin/WikiAdmin.class.php
@@ -107,15 +107,10 @@
public static function &get( $name ) {
switch ( $name ) {
case 'ExcludeGroups': return self::$prExcludeGroups;
-   break;
case 'ExcludeDeleteGroups': return 
self::$prExcludeDeleteGroups;
-   break;
case 'ExcludeRights': return self::$prExcludeRights;
-   break;
case 'CommonRights': return self::$prCommonRights;
-   break;
case 'HardPerms': return self::$prHardPerms;
-   break;
}
return null;
}
@@ -221,6 +216,8 @@
$aOutSortable[$sModulLabel] = ''.$sLink.'';
}
 
+   $aOutSortable['Shop'] = self::getShopLink();
+
ksort( $aOutSortable );
$aOut[] = implode( "\n", $aOutSortable ).'';
$aOut[] = '';
@@ -237,4 +234,21 @@
}
return true;
}
+
+   /**
+* Returns a link to the BlueSpice shop
+* @return string Link to the shop
+*/
+   private static function getShopLink() {
+   $sLink = Html::element(
+   'a',
+   array(
+   'id' => 'bs-admin-shop',
+   'href' => 'http://shop.blue-spice.org/',
+   'title' => wfMessage( 'bs-wikiadmin-shop' 
)->escaped()
+   ),
+   wfMessage( 'bs-wikiadmin-shop' )->escaped()
+   );
+   return $sLink;
+   }
 }
\ No newline at end of file
diff --git a/WikiAdmin/i18n/de.json b/WikiAdmin/i18n/de.json
index c9c895f..d1ab619 100644
--- a/WikiAdmin/i18n/de.json
+++ b/WikiAdmin/i18n/de.json
@@ -9,5 +9,6 @@
"bs-wikiadmin-notallowed": "Du bist leider nicht berechtigt, diese 
Seite zu benutzen.",
"wikiadmin": "BlueSpice Administration",
"action-wikiadmin": "BlueSpice-Administrationsseiten anzuzeigen",
-   "right-wikiadmin": "BlueSpice Administrationsseiten darzustellen"
+   "right-wikiadmin": "BlueSpice Administrationsseiten darzustellen",
+   "bs-wikiadmin-shop": "Shop"
 }
diff --git a/WikiAdmin/i18n/en.json b/WikiAdmin/i18n/en.json
index 81edc7d..d11d442 100644
--- a/WikiAdmin/i18n/en.json
+++ b/WikiAdmin/i18n/en.json
@@ -8,5 +8,6 @@
"bs-wikiadmin-notallowed": "You are not allowed to use this page.",
"wikiadmin": "BlueSpice administration",
"action-wikiadmin": "display BlueSpice administration pages",
-   "right-wikiadmin": "Display BlueSpice administration pages"
+   "right-wikiadmin": "Display BlueSpice administration pages",
+   "bs-wikiadmin-shop": "Shop"
 }
diff --git a/WikiAdmin/i18n/qqq.json b/WikiAdmin/i18n/qqq.json
index b37b1c3..8346d3e 100644
--- a/WikiAdmin/i18n/qqq.json
+++ b/WikiAdmin/i18n/qqq.json
@@ -9,5 +9,6 @@
"bs-wikiadmin-notallowed": "Text for you are not allowed to use this 
page.",
"wikiadmin": "Special page title for bluespice 
administration\n{{Identical|BlueSpice administration}}",
"action-wikiadmin": "{{doc-action|wikiadmin}}",
-   "right-wikiadmin": "{{doc-right|wikiadmin}}"
+   "right-wikiadmin": "{{doc-right|wikiadmin}}",
+   "bs-wikiadmin-shop": "Anchor text and title for 
Shop\n*{{Identical|Shop}}"
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I235db5e1f0da315ade25265f9c5a90d45159ec7b
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewe

[MediaWiki-commits] [Gerrit] InsertFile: Fix for JS error when no file selected - change (mediawiki...BlueSpiceExtensions)

2014-12-05 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: InsertFile: Fix for JS error when no file selected
..


InsertFile: Fix for JS error when no file selected

When no file was selected a js error occured due to not initialized fields

Change-Id: If935bfd772e2ddf371d1953b06d8cc9025fff5a9
---
M InsertFile/resources/bluespice.insertFile.js
1 file changed, 4 insertions(+), 1 deletion(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/InsertFile/resources/bluespice.insertFile.js 
b/InsertFile/resources/bluespice.insertFile.js
index 9eec097..6b7dc25 100644
--- a/InsertFile/resources/bluespice.insertFile.js
+++ b/InsertFile/resources/bluespice.insertFile.js
@@ -143,7 +143,10 @@
var editor = plugin.getEditor();
var bookmark = editor.selection.getBookmark();
var image = this.selection.getNode();
-   var params = {};
+   var params = {
+   caption: '',
+   alt: ''
+   };
 
if( image.nodeName.toLowerCase() === 'img' ) {
var data = bs.util.makeAttributeObject( image );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: If935bfd772e2ddf371d1953b06d8cc9025fff5a9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added linkt to BlueSpice Shop - change (mediawiki...BlueSpiceExtensions)

2014-12-04 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Added linkt to BlueSpice Shop
..

Added linkt to BlueSpice Shop

* Removed some unreachable statements

Change-Id: I235db5e1f0da315ade25265f9c5a90d45159ec7b
---
M WikiAdmin/WikiAdmin.class.php
1 file changed, 19 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/47/177547/1

diff --git a/WikiAdmin/WikiAdmin.class.php b/WikiAdmin/WikiAdmin.class.php
index 4eaa0f4..fea9cc0 100644
--- a/WikiAdmin/WikiAdmin.class.php
+++ b/WikiAdmin/WikiAdmin.class.php
@@ -107,15 +107,10 @@
public static function &get( $name ) {
switch ( $name ) {
case 'ExcludeGroups': return self::$prExcludeGroups;
-   break;
case 'ExcludeDeleteGroups': return 
self::$prExcludeDeleteGroups;
-   break;
case 'ExcludeRights': return self::$prExcludeRights;
-   break;
case 'CommonRights': return self::$prCommonRights;
-   break;
case 'HardPerms': return self::$prHardPerms;
-   break;
}
return null;
}
@@ -221,6 +216,8 @@
$aOutSortable[$sModulLabel] = ''.$sLink.'';
}
 
+   $aOutSortable['Shop'] = self::getShopLink();
+
ksort( $aOutSortable );
$aOut[] = implode( "\n", $aOutSortable ).'';
$aOut[] = '';
@@ -237,4 +234,21 @@
}
return true;
}
+
+   /**
+* Returns a link to the BlueSpice shop
+* @return string Link to the shop
+*/
+   private static function getShopLink() {
+   $sLink = Html::element(
+   'a',
+   array(
+   'id' => 'bs-admin-shop',
+   'href' => 'http://shop.blue-spice.org/',
+   'title' => 'BlueSpice Shop'
+   ),
+   'Shop'
+   );
+   return $sLink;
+   }
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I235db5e1f0da315ade25265f9c5a90d45159ec7b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added new Maintenance base classes - change (mediawiki...BlueSpiceFoundation)

2014-12-04 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added new Maintenance base classes
..


Added new Maintenance base classes

* Also removed legacy Code

Change-Id: Ib49d6a6375204514eeac2b44517d157641ef8422
---
A maintenance/BSBatchFileProcessorBase.php
D maintenance/BSMigrationHelper.php
A maintenance/BSRemoteAPIBase.php
3 files changed, 253 insertions(+), 504 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/maintenance/BSBatchFileProcessorBase.php 
b/maintenance/BSBatchFileProcessorBase.php
new file mode 100644
index 000..1dbdc86
--- /dev/null
+++ b/maintenance/BSBatchFileProcessorBase.php
@@ -0,0 +1,112 @@
+addOption('src', 'The path to the source directory', 
false, true);
+   $this->addOption('dest', 'The path to the destination 
directory', false, true);
+
+   $this->aFileExtensionWhitelist = array_map(
+   'strtoupper', $this->aFileExtensionWhitelist
+   );
+   }
+
+   public function execute() {
+   //wfCountDown( 5 );
+
+   $this->sSrc = $this->getOption( 'src', $this->sSrc );
+   $this->sDest = $this->getOption( 'dest', $this->sDest );
+
+   $aFiles = $this->getFileList();
+
+   $iProcessedFiles = 0;
+   foreach( $aFiles as $sFileName => $oFile ) {
+   if( $oFile instanceof SplFileInfo !== true ) {
+   $this->error( 'Could not process list item: '
+   . $sFileName . ' '
+   . var_export( $oFile, true )
+   );
+   continue;
+   }
+   $this->output( 'Processing ' . $oFile->getPathname().' 
...' );
+   $mResult = $this->processFile( $oFile );
+   if ( $mResult !== true ) {
+   $this->error( '... error:' . $mResult );
+   }
+   else {
+   $this->output( '... done.' );
+   $iProcessedFiles++;
+   }
+   }
+
+   $this->output( $iProcessedFiles.' file(s) processed.' );
+   $this->output( count($this->aErrors).' errors(s) occured.' );
+   if( count( $this->aErrors ) > 0 ) {
+   $this->output(
+   implode( "\n", $this->aErrors )
+   );
+   }
+   }
+
+   /**
+* Throw an error to the user. Doesn't respect --quiet, so don't use
+* this for non-error output
+*
+* BSMaintenance: Public to allow hook callbacks to write output.
+* @param $err String: the error to display
+* @param $die Int: if > 0, go ahead and die out using this int as the 
code
+*/
+   public function error( $err, $die = 0 ) {
+   $this->aErrors[] = $err;
+   parent::error( $err, $die );
+   }
+
+   /**
+*
+* @return array\RecursiveIteratorIterator
+*/
+   public function getFileList() {
+   $sPath = realpath( $this->sSrc );
+   $this->output( 'Fetching file list from "'.$sPath.'" ...' );
+
+   $oFiles = new RecursiveIteratorIterator(
+   new RecursiveDirectoryIterator( $sPath ),
+   RecursiveIteratorIterator::SELF_FIRST
+   );
+
+   $aFiles = array();
+   foreach ( $oFiles as $sPath => $oFile ) {
+   if( $oFile instanceof SplFileInfo === false ) {
+   $this->error( 'Not a valid SplFileInfo object: 
' . $sPath );
+   }
+   if( !empty( $this->aFileExtensionWhitelist ) ) {
+   $sFileExt = strtoupper( $oFile->getExtension() 
);
+   if( !in_array( $sFileExt, 
$this->aFileExtensionWhitelist ) ) {
+   continue;
+   }
+   }
+   $aFiles[$oFile->getFilename()] = $oFile;
+   }
+
+   ksort($aFiles, SORT_NATURAL);
+   $this->output( '... found ' . count( $aFiles ) . ' file(s).' );
+   return $aFiles;
+   }
+
+   /**
+*
+* @param SplFileInfo $oFile
+*/
+   public abstract function processFile($oFile);
+}
\ No newline at end of file
diff --git a/maintenance/BSMigrationHelper.php 
b/maintenance/BSMigrationHelper.php
deleted file mode 100644
index 2918552..000
--- a/maintenance/BSMigrationHelper.php
+++ /dev/null
@@ -1,504 +0,0 @@
-oResultDocument = new DOMDocument();
-   $this->oResultD

[MediaWiki-commits] [Gerrit] UniversalExport: Fixed permission error for special pages - change (mediawiki...BlueSpiceExtensions)

2014-12-04 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: UniversalExport: Fixed permission error for special pages
..


UniversalExport: Fixed permission error for special pages

* Used isAllowed instead of userCan if requested title is a special page
* Added descriptiom

Change-Id: Idef3128d6dc9e297bedaa8324adfef6b076a7ccc
---
M UniversalExport/includes/specials/SpecialUniversalExport.class.php
1 file changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/UniversalExport/includes/specials/SpecialUniversalExport.class.php 
b/UniversalExport/includes/specials/SpecialUniversalExport.class.php
index ae9e094..0c445c7 100644
--- a/UniversalExport/includes/specials/SpecialUniversalExport.class.php
+++ b/UniversalExport/includes/specials/SpecialUniversalExport.class.php
@@ -132,7 +132,12 @@

BsUniversalExportHelper::getParamsFromQueryString( 
$this->aParams );
 
-   if ( $this->oRequestedTitle->userCan( 
'universalexport-export' ) === false ) {
+   //Title::userCan always returns false on special pages 
(exept for createaccount action)
+   if( $this->oRequestedTitle->getNamespace() === 
NS_SPECIAL ) {
+   if( 
$this->getUser()->isAllowed('universalexport-export') !== true ){
+   throw new Exception( 
'bs-universalexport-error-permission');
+   }
+   } elseif( $this->oRequestedTitle->userCan( 
'universalexport-export' ) === false ) {
throw new Exception( 
'bs-universalexport-error-permission');
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Idef3128d6dc9e297bedaa8324adfef6b076a7ccc
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_22
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Ajax dispatcher methods need to return something - change (mediawiki...BlueSpiceExtensions)

2014-12-04 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Ajax dispatcher methods need to return something
..

Ajax dispatcher methods need to return something

Accidently removed return

Change-Id: I8dccc20fe003e5186a7ae1e25b386af446f90fe5
---
M ExtendedSearch/includes/ExtendedSearchAdmin.class.php
1 file changed, 3 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/42/177542/1

diff --git a/ExtendedSearch/includes/ExtendedSearchAdmin.class.php 
b/ExtendedSearch/includes/ExtendedSearchAdmin.class.php
index 9b69a5d..b9592e7 100644
--- a/ExtendedSearch/includes/ExtendedSearchAdmin.class.php
+++ b/ExtendedSearch/includes/ExtendedSearchAdmin.class.php
@@ -67,7 +67,10 @@
case 'deleteLock':
$sOutput = 
ExtendedSearchAdmin::getInstance()->checkLockExistence( $sMode );
break;
+   default:
+   $sOutput = '';
}
+   return $sOutput;
}
 
/**

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I8dccc20fe003e5186a7ae1e25b386af446f90fe5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fixed error when image cannot be found locally - change (mediawiki...BlueSpiceFoundation)

2014-12-04 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Fixed error when image cannot be found locally
..


Fixed error when image cannot be found locally

When an image cannot be found locally, no image object is instantiated.
However, the method tried to access a method of this object, resulting in
an error. Now, in this case an empty string is returned.

Change-Id: I5b10d278485b88af2ea15f7a48996f5cf7ba4a20
---
M includes/CommonAJAXInterface.php
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/includes/CommonAJAXInterface.php b/includes/CommonAJAXInterface.php
index af92914..8cc321b 100644
--- a/includes/CommonAJAXInterface.php
+++ b/includes/CommonAJAXInterface.php
@@ -507,6 +507,9 @@
if ( !$image ) {
$image = wfLocalFile( $name );
}
+   if ( !$image ) {
+   return $image;
+   }
return $image->getUrl();
}
 }

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I5b10d278485b88af2ea15f7a48996f5cf7ba4a20
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fixed notices if no data is available - change (mediawiki...BlueSpiceFoundation)

2014-12-03 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Fixed notices if no data is available
..

Fixed notices if no data is available

Change-Id: I6bf799493c87c8b01bb79b1a6954423ce5680c88
---
M includes/CoreHooks.php
1 file changed, 6 insertions(+), 1 deletion(-)


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

diff --git a/includes/CoreHooks.php b/includes/CoreHooks.php
index de06c38..c98f4aa 100755
--- a/includes/CoreHooks.php
+++ b/includes/CoreHooks.php
@@ -496,11 +496,16 @@
return false;
}
 
-   foreach( self::$oCurrentTemplate->data['bs_dataAfterContent'] 
as $sExtKey => $aData ) {
+   if ( isset( 
self::$oCurrentTemplate->data['bs_dataAfterContent'] ) ) {
+   $aData = 
self::$oCurrentTemplate->data['bs_dataAfterContent'];
+
+   foreach ( $aData as $sExtKey => $aData ) {
$data .= '';
$data .= $aData['content'];
$data .= '';
}
+   }
+
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6bf799493c87c8b01bb79b1a6954423ce5680c88
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] CAI TitleStore and DOMHelper additions - change (mediawiki...BlueSpiceFoundation)

2014-12-03 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: CAI TitleStore and DOMHelper additions
..


CAI TitleStore and DOMHelper additions

* Changed LIKE in CAI TitleStore query to also habe a left trunc
* Added some methods to DOMHelper

Change-Id: Ief54324702993538878f4027a42a894f8634bc24
---
M includes/CommonAJAXInterface.php
M includes/utility/DOMHelper.class.php
M maintenance/BSMigrationHelper.php
3 files changed, 76 insertions(+), 11 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/includes/CommonAJAXInterface.php b/includes/CommonAJAXInterface.php
index ce3f74f..af92914 100644
--- a/includes/CommonAJAXInterface.php
+++ b/includes/CommonAJAXInterface.php
@@ -96,8 +96,8 @@
 
// We want LIKE operator behind every term,
// so multi term queries also bring results
-   $aLike = array();
$sOp = $dbr->anyString();
+   $aLike = array( '', $sOp );
$sParams = explode( ' ', strtolower( $oQueryTitle->getText() ) 
);
foreach ( $sParams as $sParam ) {
$aLike[] = $sParam;
diff --git a/includes/utility/DOMHelper.class.php 
b/includes/utility/DOMHelper.class.php
index c201670..4c9f745 100644
--- a/includes/utility/DOMHelper.class.php
+++ b/includes/utility/DOMHelper.class.php
@@ -5,7 +5,7 @@
  * @subpackage Utility
  */
 class BsDOMHelper {
-   
+
/**
 * Finds the previous DOMElement starting from $oNode in the DOM tree
 * @param DOMNode $oNode
@@ -21,7 +21,7 @@
}
return static::getPreviousDOMElementSibling( 
$oNode->previousSibling, $aElementNames );
}
-   
+
/**
 * Finds the next DOMElement starting from $oNode in the DOM tree
 * @param DOMNode $oNode
@@ -37,7 +37,7 @@
}
return static::getNextDOMElementSibling( $oNode->nextSibling, 
$aElementNames );
}
-   
+
/**
 * Finds the previous DOMElement starting from $oNode in the DOM tree
 * @param DOMNode $oNode
@@ -53,7 +53,7 @@
}
return static::getParentDOMElement( $oNode->parentNode, 
$aElementNames );
}
-   
+
/**
 * Finds the previous DOMElement starting from $oNode in the DOM tree
 * @param DOMNode $oNode
@@ -69,9 +69,9 @@
}
return static::getNextDOMElementSibling( $oNode->firstChild, 
$aElementNames );
}
-   
+
/**
-* Adds one or more entries to the "class" attribute of all childNodes 
in a 
+* Adds one or more entries to the "class" attribute of all childNodes 
in a
 * recursive manner
 * @param DOMElement $oNode
 * @param array $aClasses
@@ -80,7 +80,7 @@
public static function addClassesRecursive( $oNode, $aClasses, 
$bOverrideExisting = false ) {
$sNodesClasses = $oNode->getAttribute('class');
$aNodesClasses = explode( ' ', $sNodesClasses );
-   $oNode->setAttribute( 
+   $oNode->setAttribute(
'class',
implode( ' ', array_unique( array_merge( 
$aNodesClasses, $aClasses ) ) )
);
@@ -91,9 +91,9 @@
static::addClassesRecursive($oChild, $aClasses, 
$bOverrideExisting);
}
}
-   
+
/**
-* 
+* Inserts a DOMNode after another DOMNode in the DOM tree
 * @param DOMNode $oNode
 * @param DOMNode $oRefNode
 */
@@ -105,4 +105,69 @@
$oRefNode->parentNode->appendChild($oNode);
}
}
+
+   /**
+* HINT: 
http://stackoverflow.com/questions/1604471/how-can-i-find-an-element-by-css-class-with-xpath
+* @param DOMDocument $oDOMDoc
+* @param array $aClassNames
+* @return array of DOMElement
+*/
+   public static function getElementsByClassNames( $oDOMDoc, $aClassNames 
) {
+   $oDOMXPath = new DOMXPath( $oDOMDoc );
+   $aClassQuery = array();
+   foreach( $aClassNames as $sClassName ) {
+   # //*[contains(concat(' ', normalize-space(@class), ' 
'), ' Test ')]
+   $aClassQuery[] = "contains(concat(' ', 
normalize-space(@class), ' '), ' $sClassName ')";
+   }
+   $sQuery = '//*['.implode( ' or ', $aClassQuery ).']';
+   $oElements = $oDOMXPath->query( $sQuery );
+
+   $aElements = array();
+   foreach( $oElements as $oElement ) {
+   $aElements[] = $oElement;
+   }
+
+   return $aElements;
+   }
+
+   /**
+* Returns an array of DOMElements of given tag names. The returned 
array
+* is ordered according to t

[MediaWiki-commits] [Gerrit] Added ExtendedSearch support with other skins - change (mediawiki...BlueSpiceExtensions)

2014-12-03 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Added ExtendedSearch support with other skins
..

Added ExtendedSearch support with other skins

Support other skins then bluespiceskin.

Change-Id: I02f1db45b3f05ecf0e39d671547e819a7bf0d2b4
---
M ExtendedSearch/ExtendedSearch.class.php
M ExtendedSearch/ExtendedSearch.setup.php
M ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js
M ExtendedSearch/resources/bluespice.extendedSearch.focus.js
A ExtendedSearch/resources/bluespice.extendedSearch.form.css
A ExtendedSearch/resources/bluespice.extendedSearch.form.js
6 files changed, 66 insertions(+), 11 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/08/177208/1

diff --git a/ExtendedSearch/ExtendedSearch.class.php 
b/ExtendedSearch/ExtendedSearch.class.php
index 3ebd57c..8f55b34 100644
--- a/ExtendedSearch/ExtendedSearch.class.php
+++ b/ExtendedSearch/ExtendedSearch.class.php
@@ -172,6 +172,7 @@
$oOut->addModuleStyles( 
'ext.bluespice.extendedsearch.autocomplete.style' );
$oOut->addModules( 'ext.bluespice.extendedsearch.autocomplete' 
);
$oOut->addModules( 'ext.bluespice.extendedsearch.focus' );
+   $oOut->addModules( 'ext.bluespice.extendedsearch.form' );
return true;
}
 
diff --git a/ExtendedSearch/ExtendedSearch.setup.php 
b/ExtendedSearch/ExtendedSearch.setup.php
index 8489419..ac8b7bd 100644
--- a/ExtendedSearch/ExtendedSearch.setup.php
+++ b/ExtendedSearch/ExtendedSearch.setup.php
@@ -15,6 +15,11 @@
'scripts' => 'bluespice.extendedSearch.focus.js',
 ) + $aResourceModuleTemplate;
 
+$wgResourceModules['ext.bluespice.extendedsearch.form'] = array(
+   'scripts' => 'bluespice.extendedSearch.form.js',
+   'styles' => 'bluespice.extendedSearch.form.css'
+) + $aResourceModuleTemplate;
+
 $wgResourceModules['ext.bluespice.extendedsearch.autocomplete.style'] = array(
'styles' => 'bluespice.extendedSearch.autocomplete.css'
 ) + $aResourceModuleTemplate;
@@ -97,3 +102,5 @@
 
 $wgHooks['LoadExtensionSchemaUpdates'][] = 'ExtendedSearch::getSchemaUpdates';
 $GLOBALS['wgHooks']['OpenSearchUrls'][] = 'ExtendedSearch::onOpenSearchUrls';
+
+$wgEnableMWSuggest = false;
\ No newline at end of file
diff --git a/ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js 
b/ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js
index d07f200..fd91b08 100644
--- a/ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js
+++ b/ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js
@@ -10,7 +10,7 @@
  * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
  * @filesource
  */
-mw.loader.using( 'jquery.ui.autocomplete', function() {
+mw.loader.using( [ 'jquery.ui.autocomplete', 
'ext.bluespice.extendedsearch.form' ], function() {
var cache = [];
var lastXhr = {};
 
@@ -19,7 +19,8 @@
 
var container = $( "" );
$( "body" ).append( container );
-   $( "#bs-extendedsearch-input, .bs-autocomplete-field" ).autocomplete( {
+
+   $( "#bs-extendedsearch-input, .bs-autocomplete-field, #searchInput" 
).autocomplete( {
appendTo: container,
position: {
my: "right top",
diff --git a/ExtendedSearch/resources/bluespice.extendedSearch.focus.js 
b/ExtendedSearch/resources/bluespice.extendedSearch.focus.js
index 9a07efa..3e96540 100644
--- a/ExtendedSearch/resources/bluespice.extendedSearch.focus.js
+++ b/ExtendedSearch/resources/bluespice.extendedSearch.focus.js
@@ -1,12 +1,22 @@
-( function( mw, $ ) {
-   $( function() {
+/**
+ * ExtendedSearch extension
+ *
+ * Part of BlueSpice for MediaWiki
+ *
+ * @author Stephan Muggli 
+ * @packageBluespice_Extensions
+ * @subpackage ExtendedSearch
+ * @copyright  Copyright (C) 2012 Hallo Welt! - Medienwerkstatt GmbH, All 
rights reserved.
+ * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
+ * @filesource
+ */
+mw.loader.using( 'ext.bluespice.extendedsearch.form', function() {
if ( typeof bsExtendedSearchSetFocus === "boolean" ) {
-   //$(document).scrollTop(): prevent loosing last scroll 
position on history back
-   if ( wgIsArticle === true && bsExtendedSearchSetFocus  
=== true && $( document ).scrollTop() < 1 ) {
-   if ( window.location.hash === '' ) {
-   $( '#bs-extendedsearch-input' ).focus();
-   }
+   //$(document).scrollTop(): prevent loosing last scroll position 
on history back
+   if ( wgIsArticle === true && bsExtendedSearchSetFocus  === true 
&& $( document ).scrollTop() < 1 ) {
+   if ( window.l

[MediaWiki-commits] [Gerrit] Fixed permissions issue - change (mediawiki...BlueSpiceExtensions)

2014-12-03 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Fixed permissions issue
..

Fixed permissions issue

Special page was shown to non admin users.

 * Removed unnecessary ,

Change-Id: Id437bed30226751f819b5e01d3d9b7727ad42c8f
---
M ExtensionInfo/ExtensionInfo.setup.php
M ExtensionInfo/includes/specials/SpecialExtensionInfo.class.php
2 files changed, 4 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/96/177196/1

diff --git a/ExtensionInfo/ExtensionInfo.setup.php 
b/ExtensionInfo/ExtensionInfo.setup.php
index 8bc6696..5159ebc 100644
--- a/ExtensionInfo/ExtensionInfo.setup.php
+++ b/ExtensionInfo/ExtensionInfo.setup.php
@@ -17,7 +17,7 @@
 $wgResourceModules['ext.bluespice.extensioninfo.styles'] = array(
'styles' => 'bluespice.extensionInfo.css',
'localBasePath' => $IP . 
'/extensions/BlueSpiceExtensions/ExtensionInfo/resources',
-   'remoteExtPath' => 'BlueSpiceExtensions/ExtensionInfo/resources',
+   'remoteExtPath' => 'BlueSpiceExtensions/ExtensionInfo/resources'
 );
 
 $wgResourceModules['ext.bluespice.extensioninfo'] = array(
diff --git a/ExtensionInfo/includes/specials/SpecialExtensionInfo.class.php 
b/ExtensionInfo/includes/specials/SpecialExtensionInfo.class.php
index 8e5e369..88a718e 100644
--- a/ExtensionInfo/includes/specials/SpecialExtensionInfo.class.php
+++ b/ExtensionInfo/includes/specials/SpecialExtensionInfo.class.php
@@ -5,7 +5,6 @@
  * Part of BlueSpice for MediaWiki
  *
  * @author Stephan Muggli 
-
  * @packageBlueSpice_Extensions
  * @subpackage ExtensionInfo
  * @copyright  Copyright (C) 2013 Hallo Welt! - Medienwerkstatt GmbH, All 
rights reserved.
@@ -16,12 +15,12 @@
 class SpecialExtensionInfo extends BsSpecialPage {
 
public function __construct() {
-   parent::__construct( 'ExtensionInfo' );
+   parent::__construct( 'ExtensionInfo', 'wikiadmin' );
}
 
public function execute( $par ) {
parent::execute( $par );
-   $this->getOutput()->addModules('ext.bluespice.extensioninfo');
+   $this->getOutput()->addModules( 'ext.bluespice.extensioninfo' );
$this->getOutput()->addHtml( $this->getForm() );
}
 
@@ -29,7 +28,7 @@
$oViewExtensionInfoTable = new ViewExtensionInfoTable();
 
$aInfos = BsExtensionManager::getExtensionInformation();
-   ksort($aInfos);
+   ksort( $aInfos );
 
$oViewExtensionInfoTable->setExtensions( $aInfos );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id437bed30226751f819b5e01d3d9b7727ad42c8f
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fixed issue that an user password could not be changed - change (mediawiki...BlueSpiceExtensions)

2014-11-26 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Fixed issue that an user password could not be changed
..

Fixed issue that an user password could not be changed

A logical error was the problem. If a password was valid, an error message
was returned and not further processed.

Change-Id: I738a9d4bb288f89e38a7fd62370f0cf9ad36e7ec
---
M UserManager/UserManager.class.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/90/175990/1

diff --git a/UserManager/UserManager.class.php 
b/UserManager/UserManager.class.php
index 96bfdbe..9a6ff62 100644
--- a/UserManager/UserManager.class.php
+++ b/UserManager/UserManager.class.php
@@ -373,12 +373,12 @@
$aAnswer['success'] = false;
$aAnswer['message'][] = wfMessage( 
'bs-usermanager-idnotexist' )->plain(); // id_noexist = 'This user ID does not 
exist'
}
-   if ( $oUser->isValidPassword( $sPassword ) ) {
+   if ( !$oUser->isValidPassword( $sPassword ) ) {
$aAnswer['success'] = false;
$aAnswer['errors'][] = array(
'id' => 'pass',
'message' => wfMessage( 
'bs-usermanager-invalid-pwd' )->plain()
-   ); // 'invalid_pwd' = 'The supplied password is 
invalid. Please do not use apostrophes or backslashes.'
+   );
}
if ( $sPassword !== $sRePassword ) {
$aAnswer['success'] = false;

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I738a9d4bb288f89e38a7fd62370f0cf9ad36e7ec
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Removed some BsBaseTemplate switches - change (mediawiki...BlueSpiceExtensions)

2014-11-26 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Removed some BsBaseTemplate switches
..


Removed some BsBaseTemplate switches

... that get unnecessary with https://gerrit.wikimedia.org/r/#/c/175674/

NOTE: There are still such switches for "left navigation" in code that
should be removed too!

Change-Id: Iede97c37c8c7e4b354a0fb2abcf4558a63a38a76
---
M Authors/Authors.class.php
M Readers/Readers.class.php
M ShoutBox/ShoutBox.class.php
3 files changed, 2 insertions(+), 7 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/Authors/Authors.class.php b/Authors/Authors.class.php
index 63580c8..8dc5186 100644
--- a/Authors/Authors.class.php
+++ b/Authors/Authors.class.php
@@ -163,10 +163,6 @@
return true;
}
 
-   if ( !( $tpl instanceof BsBaseTemplate ) ) {
-   return true;
-   }
-
$aDetails = array();
$oAuthorsView = $this->getAuthorsViewForAfterContent( 
$sktemplate, $aDetails );
$tpl->data['bs_dataAfterContent']['bs-authors'] = array(
diff --git a/Readers/Readers.class.php b/Readers/Readers.class.php
index 4769f27..6c5607c 100644
--- a/Readers/Readers.class.php
+++ b/Readers/Readers.class.php
@@ -199,8 +199,7 @@
 */
public function onSkinTemplateOutputPageBeforeExec( &$sktemplate, &$tpl 
) {
if ( $this->checkContext() === false ||
-   !$sktemplate->getTitle()->userCan( 
'viewreaders' ) ||
-   !( $tpl instanceof BsBaseTemplate ) ) {
+   !$sktemplate->getTitle()->userCan( 
'viewreaders' ) ) {
return true;
}
if ( !$sktemplate->getTitle()->userCan( 'viewreaders' ) ) {
diff --git a/ShoutBox/ShoutBox.class.php b/ShoutBox/ShoutBox.class.php
index 2ae258e..ad53595 100644
--- a/ShoutBox/ShoutBox.class.php
+++ b/ShoutBox/ShoutBox.class.php
@@ -229,7 +229,7 @@
 * @return bool always true
 */
public function onSkinTemplateOutputPageBeforeExec( &$sktemplate, &$tpl 
) {
-   if ( !BsExtensionManager::isContextActive( 'MW::ShoutboxShow' ) 
|| !( $tpl instanceof BsBaseTemplate ) ) {
+   if ( !BsExtensionManager::isContextActive( 'MW::ShoutboxShow' ) 
) {
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iede97c37c8c7e4b354a0fb2abcf4558a63a38a76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added compatibility with non-BsBaseTemplate skins - change (mediawiki...BlueSpiceFoundation)

2014-11-26 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added compatibility with non-BsBaseTemplate skins
..


Added compatibility with non-BsBaseTemplate skins

... plus: Added some Vector specific styles

Change-Id: Ie9aca4417b9808f60d7ea3be184fdc29ff7945a5
---
M BlueSpice.hooks.php
M includes/CoreHooks.php
M resources/Resources.php
A resources/bluespice.compat/bluespice.compat.vector.fixes.css
4 files changed, 44 insertions(+), 2 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/BlueSpice.hooks.php b/BlueSpice.hooks.php
index 6d6a654..b22a30b 100644
--- a/BlueSpice.hooks.php
+++ b/BlueSpice.hooks.php
@@ -10,7 +10,7 @@
 $wgHooks['userCan'][] = 'BsCoreHooks::onUserCan';
 $wgHooks['UploadVerification'][] = 'BsCoreHooks::onUploadVerification';
 $wgHooks['SkinTemplateOutputPageBeforeExec'][] = 
'BsCoreHooks::onSkinTemplateOutputPageBeforeExec';
-
+$wgHooks['SkinAfterContent'][] = 'BsCoreHooks::onSkinAfterContent';
 $wgHooks['UserAddGroup'][] = 'BsGroupHelper::addTemporaryGroupToUserHelper';
 
 // START cache invalidation hooks
diff --git a/includes/CoreHooks.php b/includes/CoreHooks.php
index e87a5b9..de06c38 100755
--- a/includes/CoreHooks.php
+++ b/includes/CoreHooks.php
@@ -68,6 +68,7 @@
$out->addModuleMessages( 'ext.bluespice.messages' );
$out->addModules( 'ext.bluespice.extjs' );
$out->addModuleStyles( 'ext.bluespice.extjs.styles' );
+   $out->addModuleStyles( 'ext.bluespice.compat.vector.styles' );
 
$wgFavicon = BsConfig::get( 'MW::FaviconPath' );
 
@@ -469,6 +470,37 @@
self::addDownloadTitleAction($skin, $template);
self::addProfilePageSettings($skin, $template);
 
+   //Compatibility to non-BsBaseTemplate skins
+   //This is pretty hacky because Skin-object won't expose 
Template-object
+   //in 'SkinAfterContent' hook (see below)
+   if( $template instanceof BsBaseTemplate === false ) {
+   self::$oCurrentTemplate = $template; //save for later 
use
+   }
+
+   return true;
+   }
+
+   protected static $oCurrentTemplate = null;
+
+   /**
+* At the moment this is just for compatibility to MediaWiki default
+* Vector skin. Unfortunately this is too late to add ResourceLoader
+* modules. Therefore the "ext.bluespice.compat.vector.styles" module 
get's
+* always added in "BeforePageDisplay"
+* @param string $data
+* @param Skin $skin
+* @return boolean
+*/
+   public static function onSkinAfterContent(  &$data, $skin ) {
+   if( self::$oCurrentTemplate == null ) {
+   return false;
+   }
+
+   foreach( self::$oCurrentTemplate->data['bs_dataAfterContent'] 
as $sExtKey => $aData ) {
+   $data .= '';
+   $data .= $aData['content'];
+   $data .= '';
+   }
return true;
}
 
@@ -558,7 +590,7 @@
$template->data['bs_dataAfterContent']['profilepagesettings'] = 
array(
'position' => 5,
'label' => $sLabel,
-   'content' =>  $oProfilePageSettingsView
+   'content' => $oProfilePageSettingsView
);
}
 }
\ No newline at end of file
diff --git a/resources/Resources.php b/resources/Resources.php
index f47177e..ebc791c 100644
--- a/resources/Resources.php
+++ b/resources/Resources.php
@@ -170,4 +170,10 @@
)
 ) + $aResourceModuleTemplate;
 
+$wgResourceModules['ext.bluespice.compat.vector.styles'] = array(
+   'styles' => array(
+   'bluespice.compat/bluespice.compat.vector.fixes.css'
+   )
+) + $aResourceModuleTemplate;
+
 unset( $aResourceModuleTemplate );
diff --git a/resources/bluespice.compat/bluespice.compat.vector.fixes.css 
b/resources/bluespice.compat/bluespice.compat.vector.fixes.css
new file mode 100644
index 000..d53def2
--- /dev/null
+++ b/resources/bluespice.compat/bluespice.compat.vector.fixes.css
@@ -0,0 +1,4 @@
+.skin-vector h5.bs-widget-title {
+   font-size: 80%;
+   border-bottom: 1px solid;
+}
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie9aca4417b9808f60d7ea3be184fdc29ff7945a5
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.o

[MediaWiki-commits] [Gerrit] [WIP] Last code clean up - change (mediawiki...BlueSpiceExtensions)

2014-11-25 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: [WIP] Last code clean up
..

[WIP] Last code clean up

 * Improved/Added documentation
 * Split up a could of methods to make the code more readable
 * Remove blank from search as you type keys
 * Updated authors of a couple of files
 * Some code improvements

Change-Id: I983c45d1f12f634c0763252c4c5abd519bb14c39
---
M ExtendedSearch/ExtendedSearch.class.php
M ExtendedSearch/includes/BuildIndex/AbstractBuildIndexAll.class.php
M ExtendedSearch/includes/BuildIndex/AbstractBuildIndexFile.class.php
M ExtendedSearch/includes/BuildIndex/AbstractBuildIndexLinked.class.php
M ExtendedSearch/includes/BuildIndex/AbstractBuildIndexMwLinked.class.php
M ExtendedSearch/includes/BuildIndex/BuildIndexMainControl.class.php
M ExtendedSearch/includes/BuildIndex/BuildIndexMwArticles.class.php
M ExtendedSearch/includes/BuildIndex/BuildIndexMwExternalRepository.class.php
M ExtendedSearch/includes/BuildIndex/BuildIndexMwLinked.class.php
M ExtendedSearch/includes/BuildIndex/BuildIndexMwRepository.class.php
M ExtendedSearch/includes/BuildIndex/BuildIndexMwSingleFile.class.php
M ExtendedSearch/includes/BuildIndex/BuildIndexMwSpecial.class.php
M ExtendedSearch/includes/BuildIndex/index_progress.php
M ExtendedSearch/includes/ExtendedSearchAdmin.class.php
M ExtendedSearch/includes/ExtendedSearchBase.class.php
M ExtendedSearch/includes/SearchIndex/SearchIndex.class.php
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
M ExtendedSearch/includes/SearchIndex/SearchRequest.class.php
M ExtendedSearch/includes/SearchIndex/SearchResult.class.php
M ExtendedSearch/includes/SearchIndex/SearchUriBuilder.class.php
M ExtendedSearch/includes/SearchService.class.php
M ExtendedSearch/includes/SolrServiceAdapter.class.php
M ExtendedSearch/includes/specials/SpecialExtendedSearch.class.php
M ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js
M ExtendedSearch/views/view.ExtendedSearchResultEntry.php
M ExtendedSearch/views/view.SearchExtendedOptionsForm.php
26 files changed, 581 insertions(+), 554 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/13/175713/1

diff --git a/ExtendedSearch/ExtendedSearch.class.php 
b/ExtendedSearch/ExtendedSearch.class.php
index 351117c..3ebd57c 100644
--- a/ExtendedSearch/ExtendedSearch.class.php
+++ b/ExtendedSearch/ExtendedSearch.class.php
@@ -24,30 +24,16 @@
  * @author Stephan Muggli 
  * @author Mathias Scheer 
  * @author Markus Glaser 
- * @version2.22.0 stable
+ * @version2.23.0 stable
  * @packageBlueSpice_Extensions
  * @subpackage ExtendedSearch
- * @copyright  Copyright (C) 2011 Hallo Welt! - Medienwerkstatt GmbH, All 
rights reserved.
+ * @copyright  Copyright (C) 2014 Hallo Welt! - Medienwerkstatt GmbH, All 
rights reserved.
  * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
  * @filesource
  */
-/* Changelog
- * v1.20.1
- * - Fixed indexing of zipped doctypes
- * - Layout Improvments
- * - Serveral bug fixes
- * v1.20.0
- *
- * v1.0.0
- * - raised to stable
- * v0.1
- * - initial release
- */
 
 /**
- * Base class for ExtendedSearch extension
- * @package BlueSpice_Extensions
- * @subpackage ExtendedSearch
+ * Base class of ExtendedSearch extension
  */
 class ExtendedSearch extends BsExtensionMW {
 
@@ -103,7 +89,7 @@
BsConfig::registerVar( 'MW::ExtendedSearch::ShowAutocomplete', 
true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_PUBLIC, 
'bs-extendedsearch-pref-showautocomplete', 'toggle' );
BsConfig::registerVar( 'MW::ExtendedSearch::ShowCreSugInAc', 
true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_USER, 
'bs-extendedsearch-pref-showcresuginac', 'toggle' );
BsConfig::registerVar( 'MW::ExtendedSearch::AcEntries', 10, 
BsConfig::TYPE_INT|BsConfig::LEVEL_PUBLIC,  'bs-extendedsearch-pref-acentries', 
'int' );
-   BsConfig::registerVar( 'MW::ExtendedSearch::IndexTyLinked', 
false, BsConfig::TYPE_BOOL|BsConfig::LEVEL_PUBLIC, 
'bs-extendedsearch-pref-indextylinked', 'toggle' );
+   BsConfig::registerVar( 'MW::ExtendedSearch::IndexTyLinked', 
true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_PUBLIC, 
'bs-extendedsearch-pref-indextylinked', 'toggle' );
BsConfig::registerVar( 'MW::ExtendedSearch::IndexTypesRepo', 
true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_PUBLIC, 
'bs-extendedsearch-pref-indextypesrepo', 'toggle' );
BsConfig::registerVar( 'MW::ExtendedSearch::IndexTypesWiki', 
true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_PUBLIC, 
'bs-extendedsearch-pref-indextypeswiki', 'toggle' );
BsConfig::registerVar( 'MW::ExtendedSearch::IndexTypesSpecial', 
true, BsConfig::TYPE_BOOL|BsConfig::LEVEL_PUBLIC, 
'bs-extendedsearch-pref-indextypesspecial', 'toggle' );
diff --git a/ExtendedSearch/includes/BuildIndex/AbstractBuild

[MediaWiki-commits] [Gerrit] Clean up foundation - change (mediawiki...BlueSpiceFoundation)

2014-11-25 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Clean up foundation
..

Clean up foundation

Removed unused BsFileManager class. Greped Extensions/Foundation and had
no found. Also no usages of the methods were found.

Change-Id: I2303943afa46a3bbb27071feb5eaf13e0949214c
---
M includes/AutoLoader.php
D includes/FileManager.class.php
2 files changed, 0 insertions(+), 364 deletions(-)


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

diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php
index 43b7634..c1df7c5 100644
--- a/includes/AutoLoader.php
+++ b/includes/AutoLoader.php
@@ -29,7 +29,6 @@
 $GLOBALS['wgAutoloadClasses']['BSDebug'] = __DIR__."/Debug.php";
 $GLOBALS['wgAutoloadClasses']['BsException'] = __DIR__."/Exception.class.php";
 $GLOBALS['wgAutoloadClasses']['BsExtensionManager'] = 
__DIR__."/ExtensionManager.class.php";
-$GLOBALS['wgAutoloadClasses']['BsFileManager'] = 
__DIR__."/FileManager.class.php";
 $GLOBALS['wgAutoloadClasses']['BsMailer'] = __DIR__."/Mailer.class.php";
 $GLOBALS['wgAutoloadClasses']['BsXHRBaseResponse'] = 
__DIR__."/XHRBaseResponse.class.php";
 $GLOBALS['wgAutoloadClasses']['BsXHRJSONResponse'] = 
__DIR__."/XHRBaseResponse.class.php";
diff --git a/includes/FileManager.class.php b/includes/FileManager.class.php
deleted file mode 100644
index 74ba732..000
--- a/includes/FileManager.class.php
+++ /dev/null
@@ -1,363 +0,0 @@
-aFileRegister);
-   if($iIndex) {
-   if(!preg_match('%[/.]%', $sFile)) {
-
-   }
-   else {
-   array_splice($this->aFileRegister, ($iIndex - 
1), 0, array($sFile));
-   $this->aRegisteredFiles[$sFile] = 
array($sGroup, $iOptions);
-   }
-   }
-   else {
-   if(!preg_match('%[/.]%', $sFile)) {
-   $sFile = strtolower($sFile);
-   if(isset($this->aRegisteredGroups[$sFile])) {
-   $this->putBeforeGroup($sGroup, $sFile);
-   }
-   else {
-   $this->aFileRegister[] = $sFile;
-   }
-   }
-   else {
-   if(isset($this->aRegisteredFiles[$sFile])) {
-   $this->putBeforeFile($sGroup, $sFile);
-   }
-   else {
-   $this->aFileRegister[] = $sFile;
-   }
-
-   $this->aRegisteredFiles[$sFile] = 
array($sGroup, $iOptions);
-   $this->aRegisteredGroups[$sGroup][] = $sFile;
-   }
-   }
-   wfProfileOut( 'BS::'.__METHOD__ );
-   }
-
-   public function getFileRegister() {
-   wfProfileIn( 'BS::'.__METHOD__ );
-   $aReturn = array();
-   foreach($this->aFileRegister as $sFile) {
-   if(!preg_match('%[/.]%', $sFile)) {
-   continue;
-   }
-   $aReturn[$sFile] = $this->aRegisteredFiles[$sFile][1] + 
0;
-   }
-   wfProfileOut( 'BS::'.__METHOD__ );
-   return $aReturn;
-   }
-
-   protected function putBeforeFile($sGroup, $sFile) {
-   $iIndex = array_search($sFile, $this->aFileRegister);
-   array_splice($this->aFileRegister, ($iIndex - 1), 0, 
$this->aRegisteredGroups[$sGroup]);
-   $this->aFileRegister = array_slice($this->aFileRegister, 0, 
(count($this->aRegisteredGroups[$sGroup]) * -1), true);
-   }
-   
-   protected function putBeforeGroup($sGroup, $sTargetGroup) {
-   $sFile = $this->aRegisteredGroups[$sTargetGroup][0];
-   $this->putBeforeFile($sGroup, $sFile);
-   }
-}
-
-/*
-class BsFileManager {
-   const NO_MINIFICATION = 256;
-   // TODO MRG20100813: Was macht diese Konstante genau? Ich lese: es wird 
nur sortiert, wenn die Datei geladen wird
-   const ORDER_IF_LOADED = 512;
-   const LOAD_ON_DEMAND  = 1024;
-
-   // TODO MRG20100813: $NULL ist doch allgemeingültig. Warum wird das 
abstrahiert?
-   protected static $NULL  = NULL;
-   protected static $prCounter = 0;
-   protected static $prFiles   = array();
-
-   public static function add($group, $file, $options = 0) {
-   // TODO MRG20100813: normalerweise normieren wir mit strtolower
-   $group = strtoupper($group);
-   $tmp = new self(self::$prCounter+

[MediaWiki-commits] [Gerrit] Removed installer i18n backward compatibility - change (mediawiki...BlueSpiceFoundation)

2014-11-25 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Removed installer i18n backward compatibility
..

Removed installer i18n backward compatibility

The BlueSpice installer will not be shipped with MW < 1.23, so there is no
need for i18n shim for backward compatibility.

Change-Id: I0f154f992e3ee2810f14be01cda6c5de6b361061
---
M includes/installer/BsWebInstaller.php
D languages/BlueSpice.Installer.18n.php
2 files changed, 1 insertion(+), 37 deletions(-)


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

diff --git a/includes/installer/BsWebInstaller.php 
b/includes/installer/BsWebInstaller.php
index 9e9f0ac..490c90d 100644
--- a/includes/installer/BsWebInstaller.php
+++ b/includes/installer/BsWebInstaller.php
@@ -33,9 +33,8 @@
 
public function __construct( \WebRequest $request ) {
 // BlueSpice
-   global $wgMessagesDirs, $wgExtensionMessagesFiles;
+   global $wgMessagesDirs;
$wgMessagesDirs['BlueSpiceInstaller'] = dirname( dirname( 
__DIR__ ) ) . '/i18n/installer';
-   $wgExtensionMessagesFiles['BlueSpiceInstaller'] = dirname( 
dirname( __DIR__ ) ) . '/languages/BlueSpice.Installer.i18n.php';
 
parent::__construct( $request );
$this->output = new BsWebInstallerOutput( $this );
diff --git a/languages/BlueSpice.Installer.18n.php 
b/languages/BlueSpice.Installer.18n.php
deleted file mode 100644
index 7234d31..000
--- a/languages/BlueSpice.Installer.18n.php
+++ /dev/null
@@ -1,35 +0,0 @@
-https://git.wikimedia.org/blob/mediawiki%2Fcore.git/HEAD/maintenance%2FgenerateJsonI18n.php
- *
- * Beginning with MediaWiki 1.23, translation strings are stored in json files,
- * and the EXTENSION.i18n.php file only exists to provide compatibility with
- * older releases of MediaWiki. For more information about this migration, see:
- * https://www.mediawiki.org/wiki/Requests_for_comment/Localisation_format
- *
- * This shim maintains compatibility back to MediaWiki 1.17.
- */
-$messages = array();
-if ( !function_exists( 'wfJsonI18nShim5c8ab9ce08c23b3b' ) ) {
-   function wfJsonI18nShim5c8ab9ce08c23b3b( $cache, $code, &$cachedData ) {
-   $codeSequence = array_merge( array( $code ), 
$cachedData['fallbackSequence'] );
-   foreach ( $codeSequence as $csCode ) {
-   $fileName = dirname( __FILE__ ) . 
"/../i18n/installer/$csCode.json";
-   if ( is_readable( $fileName ) ) {
-   $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
-   foreach ( array_keys( $data ) as $key ) {
-   if ( $key === '' || $key[0] === '@' ) {
-   unset( $data[$key] );
-   }
-   }
-   $cachedData['messages'] = array_merge( $data, 
$cachedData['messages'] );
-   }
-
-   $cachedData['deps'][] = new FileDependency( $fileName );
-   }
-   return true;
-   }
-
-   $GLOBALS['wgHooks']['LocalisationCacheRecache'][] = 
'wfJsonI18nShim5c8ab9ce08c23b3b';
-}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0f154f992e3ee2810f14be01cda6c5de6b361061
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] CSS Fix for ExtJS - change (mediawiki...BlueSpiceFoundation)

2014-11-25 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: CSS Fix for ExtJS
..


CSS Fix for ExtJS

Unfortunately the 'line-height' within #content of some skins interfere
with ExtJS stylings. This change adds just another selector to Markus
Glaser's fix

Also: Some whitespace changes on BSMigrationHelper caused by review with
save

Change-Id: I35d53f506f1a6f06a5643d9b14e67af574b8e638
---
M maintenance/BSMigrationHelper.php
M resources/bluespice.extjs/bluespice.extjs.fixes.css
2 files changed, 45 insertions(+), 44 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/maintenance/BSMigrationHelper.php 
b/maintenance/BSMigrationHelper.php
index 242dcc7..3e234d4 100644
--- a/maintenance/BSMigrationHelper.php
+++ b/maintenance/BSMigrationHelper.php
@@ -27,14 +27,14 @@
'inhaltsverzeichnis',
);
 // public $sourceFolderBaseName = '';
-   
+
public function __construct () {
$this->oResultDocument = new DOMDocument();
$this->oResultDocument->loadXML('');
$this->oResultDocument->formatOutput = true;
}
-   
-   public function processDocument( $oDOC, &$sWikiText ) {
+
+   public function processDocument( $oDOC, &$sWikiText ) {
//Collect some MetaData
$oXPath = new DOMXPath($oDOC);
//$oBookNameNode = $oXPath->query( 
'/html/body/div/p[3]')->item(0);
@@ -64,12 +64,12 @@
//$this->output( $oRevisionNode->nodeValue);
//$oDateNode = $oXPath->query( '/html/body/div/p[17]')->item(0);
//$this->output( $oDateNode->nodeValue);
-   
+
//Process the body content
$oBody = $oDOC->getElementsByTagName('body')->item(0);
foreach( $oBody->childNodes as $oBodyElement ) {
if( $oBodyElement instanceof DOMElement == false ) 
continue;
-   
+
if( strpos( $oBodyElement->getAttribute('class'), 
'WordSection' ) !== false ){
$this->output('Processing WordSection 
"'.$oBodyElement->getAttribute('class') ).'"';
$this->processWordSection( $oBodyElement, 
$sWikiText );
@@ -79,9 +79,9 @@
}
}
}
-   
+
/**
-* 
+*
 * @param DOMElement $oBodyElement
 * @param string $sWikiText
 */
@@ -92,7 +92,7 @@
$this->processWordSectionElement( $oWSElement, 
$sWikiText );
}
}
-   
+
public function processWordSectionElement( $oWSElement, &$sWikiText ) {
//$sWikiText = preg_replace('/&#x.*?;/', '', $sWikiText);
if( $oWSElement instanceof DOMElement == false ) return;
@@ -107,8 +107,8 @@
$sHeading = preg_replace( '# ?(\d+)?\.(\d+) #', '', 
$sHeading );
$sHeading = preg_replace( '#^[0-9]+ #', '', $sHeading );
$sHeading = preg_replace( '#^\d. |^\. #', '', $sHeading 
);
-   
-   
+
+
if( empty( $sHeading ) ) return;
if( in_array( strtolower( $sHeading ), 
$this->aSkipHeadlines ) ) {
$this->output('Skipping headline 
"'.$sHeading.'" found in Array >>SkipHeadlines<<');
@@ -189,9 +189,9 @@
$this->processInline( $oWSElement, $sWikiText );
//$sWikiText .= "\n";
$sWikiText = trim( $sWikiText );
-   
-   if( $sClass == 'MsoNormal' 
-   || strpos( $sClass, 'Deckblatt') !== 
false 
+
+   if( $sClass == 'MsoNormal'
+   || strpos( $sClass, 'Deckblatt') !== 
false
|| strpos( $sClass, 'MsoListBullet') 
!== false ) {
$sWikiText .= "\n\n";
}
@@ -201,7 +201,7 @@
$this->processTable( $oWSElement, $sWikiText );
}
}
-   
+
public function processInline( $oWSElement, &$sWikiText ) {
$sWikiText = str_replace( "\n ", "\n", $sWikiText );
 
@@ -273,19 +273,19 @@
}
break;
}
-   
+
$sWikiText .= $sStartingTag;
-   
+
if( $oChild->hasChildNodes() ) {
$this->processInline($oChild, $sWikiText);
}
-   
+
$sWikiText .= $sClosingT

[MediaWiki-commits] [Gerrit] Added a margin to author pictures - change (mediawiki...BlueSpiceExtensions)

2014-11-25 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added a margin to author pictures
..


Added a margin to author pictures

The author pictures had no space between each other, looked strange.

Change-Id: Id25c6f5adc8479cdb78690fb4a9403a76e8c2281
---
M Authors/resources/bluespice.authors.css
1 file changed, 3 insertions(+), 7 deletions(-)

Approvals:
  Robert Vogel: Checked; Looks good to me, but someone else must approve
  Smuggli: Verified; Looks good to me, approved



diff --git a/Authors/resources/bluespice.authors.css 
b/Authors/resources/bluespice.authors.css
index 8ada77d..b8e9b87 100644
--- a/Authors/resources/bluespice.authors.css
+++ b/Authors/resources/bluespice.authors.css
@@ -4,7 +4,6 @@
  * Part of BlueSpice for MediaWiki
  *
  * @author Robert Vogel 
-
  * @packageBlueSpice_Extensions
  * @subpackage Authors
  * @copyright  Copyright (C) 2011 Hallo Welt! - Medienwerkstatt GmbH, All 
rights reserved.
@@ -22,7 +21,8 @@
 }
 
 .bs-authors .bs-userminiprofile {
-   float:left;
+   float: left;
+   margin-right: 3px;
 }
 
 .bs-authors-originator {
@@ -37,8 +37,4 @@
 .bs-authors-originator img {
 border: 2px #FFAE00 solid;
 }
-*/
-
-.bs-authors-lasteditor {
-   margin-left: 5px;
-}
\ No newline at end of file
+*/
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Id25c6f5adc8479cdb78690fb4a9403a76e8c2281
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: Tweichart 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added a margin to author pictures - change (mediawiki...BlueSpiceExtensions)

2014-11-21 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Added a margin to author pictures
..

Added a margin to author pictures

The author pictures had no space between each other, looked strange.

Change-Id: Id25c6f5adc8479cdb78690fb4a9403a76e8c2281
---
M Authors/resources/bluespice.authors.css
1 file changed, 3 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/47/174947/1

diff --git a/Authors/resources/bluespice.authors.css 
b/Authors/resources/bluespice.authors.css
index 8ada77d..b8e9b87 100644
--- a/Authors/resources/bluespice.authors.css
+++ b/Authors/resources/bluespice.authors.css
@@ -4,7 +4,6 @@
  * Part of BlueSpice for MediaWiki
  *
  * @author Robert Vogel 
-
  * @packageBlueSpice_Extensions
  * @subpackage Authors
  * @copyright  Copyright (C) 2011 Hallo Welt! - Medienwerkstatt GmbH, All 
rights reserved.
@@ -22,7 +21,8 @@
 }
 
 .bs-authors .bs-userminiprofile {
-   float:left;
+   float: left;
+   margin-right: 3px;
 }
 
 .bs-authors-originator {
@@ -37,8 +37,4 @@
 .bs-authors-originator img {
 border: 2px #FFAE00 solid;
 }
-*/
-
-.bs-authors-lasteditor {
-   margin-left: 5px;
-}
\ No newline at end of file
+*/
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id25c6f5adc8479cdb78690fb4a9403a76e8c2281
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fixed issue with wrong id format - change (mediawiki...BlueSpiceExtensions)

2014-11-21 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Fixed issue with wrong id format
..


Fixed issue with wrong id format

Since the id of the element has changed due to testing purpose, a string was 
passed and an int was expected.

 * Removed accidently added change which caused problems

Patchset 3: Added id handling for select boxes

Change-Id: I3cec5bc79f6c35734411ffc0217c4fd45867b686
---
M Checklist/resources/bluespice.checklist.js
1 file changed, 11 insertions(+), 4 deletions(-)

Approvals:
  Mglaser: Verified
  Smuggli: Verified; Looks good to me, approved



diff --git a/Checklist/resources/bluespice.checklist.js 
b/Checklist/resources/bluespice.checklist.js
index bfe2b19..a957b26 100644
--- a/Checklist/resources/bluespice.checklist.js
+++ b/Checklist/resources/bluespice.checklist.js
@@ -27,13 +27,17 @@
},
 
click: function(elem) {
+   var id = elem.id;
+   id = id.split( "-" );
+   id = id.pop();
+
$.ajax({
type: "GET",
url: bs.util.getAjaxDispatcherUrl( 
'Checklist::doChangeCheckItem' ),
data: {
-   pos:elem.id,
-   value:elem.checked,
-   articleId:mw.config.get('wgArticleId')
+   pos: id,
+   value: elem.checked,
+   articleId: mw.config.get('wgArticleId')
},
//dataType: 'html',
success: function(result){ // the returned value is 
passed back as a _result_
@@ -43,12 +47,15 @@
},
 
change: function(elem) {
+   var id = elem.id;
+   id = id.split( "-" );
+   id = id.pop();
elem.style.color=elem.options[elem.selectedIndex].style.color;
$.ajax({
type: "GET",
url: bs.util.getAjaxDispatcherUrl( 
'Checklist::doChangeCheckItem' ),
data: {
-   pos:elem.id,
+   pos: id,
value:$('#'+elem.id).find(":selected").text(),
articleId:mw.config.get('wgArticleId')
},

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3cec5bc79f6c35734411ffc0217c4fd45867b686
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] UserManager: Added multi select features - change (mediawiki...BlueSpiceExtensions)

2014-11-21 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: UserManager: Added multi select features
..


UserManager: Added multi select features

* Added checkbox column
* Added multi group assginment
* Added custom expand mechanism for groups list

Change-Id: Ib8b840e8108ad0ba0be28e17342622a721515cd9
---
M UserManager/UserManager.class.php
M UserManager/UserManager.setup.php
M UserManager/i18n/de.json
M UserManager/i18n/en.json
M UserManager/i18n/qqq.json
R UserManager/resources/BS.UserManager/dialog/User.js
A UserManager/resources/BS.UserManager/dialog/UserGroups.js
R UserManager/resources/BS.UserManager/panel/Manager.js
M UserManager/resources/bluespice.userManager.js
9 files changed, 296 insertions(+), 58 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved
  Raimond Spekking: Looks good to me, but someone else must approve



diff --git a/UserManager/UserManager.class.php 
b/UserManager/UserManager.class.php
index 3aef28d..96bfdbe 100644
--- a/UserManager/UserManager.class.php
+++ b/UserManager/UserManager.class.php
@@ -84,7 +84,7 @@
$sDirection = $oStoreParams->getDirection();
$aFilters = $oStoreParams->getFilter();
 
-   $aSortingParams = json_decode( $sSort );
+   $aSortingParams = FormatJson::decode( $sSort );
if ( is_array( $aSortingParams ) ) {
$sSort = $aSortingParams[0]->property;
$sDirection = $aSortingParams[0]->direction;
@@ -155,7 +155,7 @@
$tmp = array();
$tmp['user_id']= $row->user_id;
$tmp['user_name']  = $row->user_name;
-   $tmp['user_page']  = $oUserTitle->getLocalURL();
+   $tmp['user_page_link'] = Linker::link( $oUserTitle, 
$row->user_name.' ' ); //The whitespace is to aviod automatic rewrite to 
user_real_name by BSF
$tmp['user_real_name'] = $row->user_real_name;
$tmp['user_email'] = $row->user_email == null ? '' 
: $row->user_email; //PW: Oracle returns null when field is emtpy
$tmp['groups'] = array();
@@ -179,7 +179,7 @@
$oUserManager = BsExtensionManager::getExtension( 'UserManager' 
);
wfRunHooks( 'BSWikiAdminUserManagerBeforeUserListSend', array( 
$oUserManager, &$data ) );
 
-   return json_encode( $data );
+   return FormatJson::encode( $data );
}
 
/**
@@ -190,7 +190,7 @@
public static function addUser( $sUsername, $sPassword, $sRePassword, 
$sEmail, $sRealname, $aGroups = array() ) {
if ( wfReadOnly() ) {
global $wgReadOnly;
-   return json_encode( array(
+   return FormatJson::encode( array(
'success' => false,
'message' => array( wfMessage( 'bs-readonly', 
$wgReadOnly )->plain() )
) );
@@ -278,7 +278,7 @@
}
 
if ( !empty( $aResponse['errors'] ) ) { //In case that any 
error occurred
-   return json_encode( $aResponse );
+   return FormatJson::encode( $aResponse );
}
 
$oNewUser->addToDatabase();
@@ -338,7 +338,7 @@
)
);
 
-   return json_encode( $aResponse );
+   return FormatJson::encode( $aResponse );
}
 
/**
@@ -354,7 +354,7 @@
public static function editUser( $sUsername, $sPassword, $sRePassword, 
$sEmail, $sRealname, $aGroups = array() ) {
if ( wfReadOnly() ) {
global $wgReadOnly;
-   return json_encode( array(
+   return FormatJson::encode( array(
'success' => false,
'message' => array( wfMessage( 'bs-readonly', 
$wgReadOnly )->plain() )
) );
@@ -457,7 +457,7 @@
$aAnswer['message'][] = wfMessage( 
'bs-usermanager-save-successful' )->plain();
}
 
-   return json_encode( $aAnswer );
+   return FormatJson::encode( $aAnswer );
}
 
/**
@@ -467,21 +467,21 @@
 * @return string json encoded response
 */
public static function deleteUser( $iUserId ) {
-   if ( wfReadOnly() ) {
-   global $wgReadOnly;
-   return json_encode( array(
-   'success' => false,
-   'message' => array( wfMessage( 'bs-readonly', 
$wgReadOnly )->plain() ),
-   'errors' => array(),
-   ));
-   }

[MediaWiki-commits] [Gerrit] removed cloning as of doubled ids were the effect - change (mediawiki...BlueSpiceSkin)

2014-11-20 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: removed cloning as of doubled ids were the effect
..


removed cloning as of doubled ids were the effect

Change-Id: I2885f9122d16c96cf5ca42f774432033b6d6893e
---
M resources/components/extension.widgetbar.js
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/resources/components/extension.widgetbar.js 
b/resources/components/extension.widgetbar.js
index 927acae..55a8af4 100644
--- a/resources/components/extension.widgetbar.js
+++ b/resources/components/extension.widgetbar.js
@@ -20,9 +20,8 @@
moreContent.attr("id", "bs-widget-more-menu");
moreContent.attr("title", title);
moreContent.find("h5").first().text(title);
-   var moreOld = $("li#bs-cactions-button div.menu").clone(true);
moreContent.find("div.bs-widget-body").first().html("");
-   moreContent.find("div.bs-widget-body").first().append(moreOld);
+   
moreContent.find("div.bs-widget-body").first().append($("li#bs-cactions-button 
div.menu"));
 
var moreContainer = $("");
var moreContainerHeadline = $("");

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2885f9122d16c96cf5ca42f774432033b6d6893e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: master
Gerrit-Owner: Tweichart 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Removed error_log - change (mediawiki...BlueSpiceFoundation)

2014-11-19 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Removed error_log
..


Removed error_log

Somehow an error_log made its way in.

Change-Id: I945801c0f15086e50db077aa004024a8b9b4c85b
---
M includes/installer/BsWebInstaller.php
1 file changed, 0 insertions(+), 3 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/includes/installer/BsWebInstaller.php 
b/includes/installer/BsWebInstaller.php
index ba8f9cd..9e9f0ac 100644
--- a/includes/installer/BsWebInstaller.php
+++ b/includes/installer/BsWebInstaller.php
@@ -155,9 +155,6 @@
'callback' => array( $installer, 
'createExtensionTables' )
);
 
-
-   #BsConfig::saveSettings();
-   error_log(var_export(BsConfig::getRegisteredVars(),1));
return $this->installSteps;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I945801c0f15086e50db077aa004024a8b9b4c85b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Removed error_log - change (mediawiki...BlueSpiceFoundation)

2014-11-19 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Removed error_log
..

Removed error_log

Somehow an error_log made its way in.

Change-Id: I945801c0f15086e50db077aa004024a8b9b4c85b
---
M includes/installer/BsWebInstaller.php
1 file changed, 0 insertions(+), 3 deletions(-)


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

diff --git a/includes/installer/BsWebInstaller.php 
b/includes/installer/BsWebInstaller.php
index ba8f9cd..9e9f0ac 100644
--- a/includes/installer/BsWebInstaller.php
+++ b/includes/installer/BsWebInstaller.php
@@ -155,9 +155,6 @@
'callback' => array( $installer, 
'createExtensionTables' )
);
 
-
-   #BsConfig::saveSettings();
-   error_log(var_export(BsConfig::getRegisteredVars(),1));
return $this->installSteps;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I945801c0f15086e50db077aa004024a8b9b4c85b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Removed text-decoration from toolbar links in ExtJs Managers - change (mediawiki...BlueSpiceFoundation)

2014-11-19 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Removed text-decoration from toolbar links in ExtJs Managers
..

Removed text-decoration from toolbar links in ExtJs Managers

Change-Id: I1472cbf1822b94c03e24ab9cb675c1dfdac179b6
---
M resources/bluespice.extjs/bluespice.extjs.fixes.css
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/resources/bluespice.extjs/bluespice.extjs.fixes.css 
b/resources/bluespice.extjs/bluespice.extjs.fixes.css
index c484532..5ecf12b 100644
--- a/resources/bluespice.extjs/bluespice.extjs.fixes.css
+++ b/resources/bluespice.extjs/bluespice.extjs.fixes.css
@@ -83,4 +83,8 @@
 
 .x-window {
line-height: normal;
+}
+
+.x-btn-toolbar {
+   text-decoration: none !important;
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1472cbf1822b94c03e24ab9cb675c1dfdac179b6
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fixed issue with wrong id format - change (mediawiki...BlueSpiceExtensions)

2014-11-17 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Fixed issue with wrong id format
..

Fixed issue with wrong id format

Since the id of the element has changed due to testing purpose, a string was 
passed and an int was expected.

Change-Id: I3cec5bc79f6c35734411ffc0217c4fd45867b686
---
M Checklist/Checklist.class.php
M Checklist/resources/bluespice.checklist.js
2 files changed, 8 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/00/173800/1

diff --git a/Checklist/Checklist.class.php b/Checklist/Checklist.class.php
index 8d73373..63dbefc 100644
--- a/Checklist/Checklist.class.php
+++ b/Checklist/Checklist.class.php
@@ -104,8 +104,7 @@
if ( $sArticleId == 0 ) return 'false';
 
$oWikiPage = WikiPage::newFromID( $sArticleId );
-   $oContent = $oWikiPage->getContent();
-   $sContent = $oContent->getNativeData();
+   $oContent = $oWikiPage->getContent()->getNativeData();
 
// Maybe a sanity-check is just enough here
$sNewValue = 'value="';
diff --git a/Checklist/resources/bluespice.checklist.js 
b/Checklist/resources/bluespice.checklist.js
index bfe2b19..57323f2 100644
--- a/Checklist/resources/bluespice.checklist.js
+++ b/Checklist/resources/bluespice.checklist.js
@@ -27,13 +27,17 @@
},
 
click: function(elem) {
+   var id = elem.id;
+   id = id.split( "-" );
+   id = id.pop();
+
$.ajax({
type: "GET",
url: bs.util.getAjaxDispatcherUrl( 
'Checklist::doChangeCheckItem' ),
data: {
-   pos:elem.id,
-   value:elem.checked,
-   articleId:mw.config.get('wgArticleId')
+   pos: id,
+   value: elem.checked,
+   articleId: mw.config.get('wgArticleId')
},
//dataType: 'html',
success: function(result){ // the returned value is 
passed back as a _result_

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3cec5bc79f6c35734411ffc0217c4fd45867b686
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix: preg_replace /e modifier deprecation error - change (mediawiki...BlueSpiceFoundation)

2014-11-17 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Fix: preg_replace /e modifier deprecation error
..


Fix: preg_replace /e modifier deprecation error

There was a very old code path that uses /e modifier in
preg_replace statement. On PHP5 this causes issues. The replacement
actually never gets executed, but the pattern gets still compiled and
causes error_log output. I moved it to preg_replace_callback and adjusted
the callbacks argument processing.

Change-Id: Ic31f4fe2384bf46a88d4ca67e8f8ca19148203da
---
M includes/outputhandler/views/view.BaseElement.php
1 file changed, 15 insertions(+), 4 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/includes/outputhandler/views/view.BaseElement.php 
b/includes/outputhandler/views/view.BaseElement.php
index 701cbd3..ea29513 100644
--- a/includes/outputhandler/views/view.BaseElement.php
+++ b/includes/outputhandler/views/view.BaseElement.php
@@ -231,7 +231,11 @@
elseif ( count( $this->_mItems ) ) {
if ( $this->_mTemplate != '' ) {
$output = $this->_mTemplate;
-   $output = preg_replace( 
'/###([-_|A-Za-z0-9]*?)###/e', "\$this->processItem('\\1')", $output );
+   $output = preg_replace_callback(
+   '/###([-_|A-Za-z0-9]*?)###/',
+   array( $this, 'processItem' ),
+   $output
+   );
}
else {
$output .= $this->getAutoElementOpener();
@@ -257,7 +261,12 @@
$this->_mPresentDataset = $dataSet;
if($this->_mTemplate != '') {
$output = $this->_mTemplate;
-   $output = preg_replace( '/###([-_|A-Za-z0-9]*?)###/e', 
"\$this->processItem('\\1')", $output ); // TODO RBV (12.10.10 16:37): Könnte 
man das nicht etwas ansehnlicher mit preg_replace_callback gestalten?
+   $output = preg_replace_callback(
+   '/###([-_|A-Za-z0-9]*?)###/',
+   array( $this, 'processItem' ),
+   $output
+   );
+
foreach( $dataSet as $key => $value ) {
$output = str_replace('{'.$key.'}', $value, 
$output);
}
@@ -275,7 +284,9 @@
return $output;
}
 
-   protected function processItem( $request ) {
+   public function processItem( $matches ) {
+   $request = $matches[1];
+
// TODO MRG20100816: Ist diese Token-Syntax irgendwo 
beschrieben? Ausserdem müssen wir sicherstellen, dass
// | nicht anderweitig verwendet wird.
$tokens = explode( '|', $request );
@@ -286,7 +297,7 @@
if ( count( $tokens ) ) {
$params = array();
foreach ( $tokens as $token ) {
-   if ( isset( $this->_mPresentDataset[$token] ) 
+   if ( isset( $this->_mPresentDataset[$token] )
) {
$params[$token] = 
$this->_mPresentDataset[$token];
}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic31f4fe2384bf46a88d4ca67e8f8ca19148203da
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: REL1_22
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fix: preg_replace /e modifier deprecation error - change (mediawiki...BlueSpiceFoundation)

2014-11-17 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Fix: preg_replace /e modifier deprecation error
..


Fix: preg_replace /e modifier deprecation error

There was a very old code path that uses /e modifier in
preg_replace statement. On PHP5 this causes issues. The replacement
actually never gets executed, but the pattern gets still compiled and
causes error_log output. I moved it to preg_replace_callback and adjusted
the callbacks argument processing.

THIS IS A MANUAL MERGE OF https://gerrit.wikimedia.org/r/#/c/173754/

Change-Id: I04bd7ccf54c879efcaf69e801cf343160cac4bd7
---
M includes/outputhandler/views/view.BaseElement.php
1 file changed, 12 insertions(+), 2 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/includes/outputhandler/views/view.BaseElement.php 
b/includes/outputhandler/views/view.BaseElement.php
index fc1ff13..86efbc1 100644
--- a/includes/outputhandler/views/view.BaseElement.php
+++ b/includes/outputhandler/views/view.BaseElement.php
@@ -235,7 +235,11 @@
elseif ( count( $this->_mItems ) ) {
if ( $this->_mTemplate != '' ) {
$output = $this->_mTemplate;
-   $output = preg_replace( 
'/###([-_|A-Za-z0-9]*?)###/e', "\$this->processItem('\\1')", $output );
+   $output = preg_replace_callback(
+   '/###([-_|A-Za-z0-9]*?)###/',
+   array( $this, 'processItem' ),
+   $output
+   );
}
else {
$output .= $this->getAutoElementOpener();
@@ -261,7 +265,11 @@
$this->_mPresentDataset = $dataSet;
if($this->_mTemplate != '') {
$output = $this->_mTemplate;
-   $output = preg_replace( '/###([-_|A-Za-z0-9]*?)###/e', 
"\$this->processItem('\\1')", $output ); // TODO RBV (12.10.10 16:37): Könnte 
man das nicht etwas ansehnlicher mit preg_replace_callback gestalten?
+   $output = preg_replace_callback(
+   '/###([-_|A-Za-z0-9]*?)###/',
+   array( $this, 'processItem' ),
+   $output
+   );
foreach( $dataSet as $key => $value ) {
$output = str_replace('{'.$key.'}', $value, 
$output);
}
@@ -280,6 +288,8 @@
}
 
protected function processItem( $request ) {
+   $request = $matches[1];
+
// TODO MRG20100816: Ist diese Token-Syntax irgendwo 
beschrieben? Ausserdem müssen wir sicherstellen, dass
// | nicht anderweitig verwendet wird.
$tokens = explode( '|', $request );

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I04bd7ccf54c879efcaf69e801cf343160cac4bd7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added 'clear:both' to #content - change (mediawiki...BlueSpiceSkin)

2014-11-17 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added 'clear:both' to #content
..


Added 'clear:both' to #content

There was an issue when a certain extension was not loaded.
This may be redundant, but it does no harm either.

Change-Id: I917a10a89433a5a6cae96b19a26b3dbb6150724c
---
M resources/components/skin.content.less
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/resources/components/skin.content.less 
b/resources/components/skin.content.less
index 572a81d..31ed594 100644
--- a/resources/components/skin.content.less
+++ b/resources/components/skin.content.less
@@ -3,6 +3,7 @@
padding: 1em;
line-height: 1.5em;
margin: 0 0 0 0;
+   clear: both;
 }
 
 table.wikitable{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I917a10a89433a5a6cae96b19a26b3dbb6150724c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fixed check for BsBaseTemplate - change (mediawiki...BlueSpiceExtensions)

2014-11-17 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Fixed check for BsBaseTemplate
..


Fixed check for BsBaseTemplate

... in SkinTemplateOutputPageBeforeExec hook handlers.

It was executed on Skin object and not on Template object.

Change-Id: I9a42928586bc65e4bc935a4ca389256dfa45a2d0
---
M Authors/Authors.class.php
M Readers/Readers.class.php
M StateBar/StateBar.class.php
M UserSidebar/UserSidebar.class.php
M WidgetBar/WidgetBar.class.php
M WikiAdmin/WikiAdmin.class.php
6 files changed, 12 insertions(+), 55 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/Authors/Authors.class.php b/Authors/Authors.class.php
index ea6aa85..63580c8 100644
--- a/Authors/Authors.class.php
+++ b/Authors/Authors.class.php
@@ -88,7 +88,6 @@
wfProfileIn( 'BS::'.__METHOD__ );
// Hooks
$this->setHook( 'SkinTemplateOutputPageBeforeExec' );
-   $this->setHook( 'SkinAfterContent' );
$this->setHook( 'BeforePageDisplay' );
$this->setHook( 'BSInsertMagicAjaxGetData' );
$this->setHook( 'BS:UserPageSettings', 'onUserPageSettings' );
@@ -159,44 +158,22 @@
 * @param BaseTemplate $tpl currently logged in user. Not used in this 
context.
 * @return bool always true
 */
-   public function onSkinTemplateOutputPageBeforeExec( &$skin, &$tpl ) {
+   public function onSkinTemplateOutputPageBeforeExec( &$sktemplate, &$tpl 
) {
if ( $this->checkContext() === false ) {
return true;
}
 
-   if ( !( $skin instanceof BsBaseTemplate ) ) {
-   return true;
-   }
-
-   $aDetails = array();
-   $oAuthorsView = $this->getAuthorsViewForAfterContent( $skin, 
$aDetails );
-   $tpl->data['bs_dataAfterContent']['bs-authors'] = array(
-   'position' => 10,
-   'label' => wfMessage( 'bs-authors-title', 
$aDetails['count'], $aDetails['username'] )->text(),
-   'content' => $oAuthorsView
-   );
-   return true;
-   }
-
-   /**
-* Hook-Handler for 'SkinAfterContent'. Adds Authors view to the end of 
the content.
-* @param String $data
-* @param Skin $sktemplate
-* @return boolean
-*/
-   public function onSkinAfterContent( &$data, $sktemplate ) {
-   if ( $this->checkContext() === false ) {
-   return true;
-   }
-
-   if ( $sktemplate instanceof BsBaseTemplate ) {
+   if ( !( $tpl instanceof BsBaseTemplate ) ) {
return true;
}
 
$aDetails = array();
$oAuthorsView = $this->getAuthorsViewForAfterContent( 
$sktemplate, $aDetails );
-   $data .= $oAuthorsView->execute();
-
+   $tpl->data['bs_dataAfterContent']['bs-authors'] = array(
+   'position' => 10,
+   'label' => wfMessage( 'bs-authors-title', 
$aDetails['count'], $aDetails['username'] )->text(),
+   'content' => $oAuthorsView
+   );
return true;
}
 
diff --git a/Readers/Readers.class.php b/Readers/Readers.class.php
index 2a76dc2..4769f27 100644
--- a/Readers/Readers.class.php
+++ b/Readers/Readers.class.php
@@ -74,7 +74,6 @@
$this->setHook( 'BeforePageDisplay' );
$this->setHook( 'SkinTemplateOutputPageBeforeExec' );
$this->setHook( 'SkinTemplateNavigation' );
-   $this->setHook( 'SkinAfterContent' );
 
$this->mCore->registerPermission( 'viewreaders' );
 
@@ -201,7 +200,7 @@
public function onSkinTemplateOutputPageBeforeExec( &$sktemplate, &$tpl 
) {
if ( $this->checkContext() === false ||
!$sktemplate->getTitle()->userCan( 
'viewreaders' ) ||
-   !( $sktemplate instanceof BsBaseTemplate ) ) {
+   !( $tpl instanceof BsBaseTemplate ) ) {
return true;
}
if ( !$sktemplate->getTitle()->userCan( 'viewreaders' ) ) {
@@ -215,25 +214,6 @@
'label' => wfMessage( 'bs-readers-title' )->text(),
'content' => $oViewReaders
);
-
-   return true;
-   }
-
-   public function onSkinAfterContent( &$data, $sktemplate ) {
-   if ( $this->checkContext() === false ||
-   !$sktemplate->getTitle()->userCan( 
'viewreaders' ) ||
-   $sktemplate instanceof BsBaseTemplate ) {
-   return true;
-   }
-   if ( !$sktemplate->getTit

[MediaWiki-commits] [Gerrit] Added caching for blog tags - change (mediawiki...BlueSpiceExtensions)

2014-11-13 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added caching for blog tags
..


Added caching for blog tags

Blog tags are cached per page now. They are invalidated when a page
in the blog namespace is saved.

 * When page is saved the blog tags cache should also be invalidated
 * Fixed check with wrong value

Change-Id: Ide9ce843c6509f8276bc33e7b0e5ab5a84084ac7
---
M Blog/Blog.class.php
1 file changed, 53 insertions(+), 0 deletions(-)

Approvals:
  Robert Vogel: Checked; Looks good to me, but someone else must approve
  Smuggli: Verified; Looks good to me, approved



diff --git a/Blog/Blog.class.php b/Blog/Blog.class.php
index 9a2a2ce..e8f8a4d 100644
--- a/Blog/Blog.class.php
+++ b/Blog/Blog.class.php
@@ -78,6 +78,7 @@
$this->setHook( 'BSRSSFeederGetRegisteredFeeds' );
$this->setHook( 'BeforePageDisplay' );
$this->setHook( 'BSTopMenuBarCustomizerRegisterNavigationSites' 
);
+   $this->setHook( 'PageContentSaveComplete' );
 
// Trackback is not fully functional in MW and thus disabled.
BsConfig::registerVar( 'MW::Blog::ShowTrackback', false, 
BsConfig::LEVEL_PRIVATE|BsConfig::TYPE_BOOL );
@@ -183,6 +184,36 @@
break;
}
return $aPrefs;
+   }
+
+   /**
+* Invalidates blog caches
+* @param Article $article
+* @param User $user
+* @param Content $content
+* @param type $summary
+* @param type $isMinor
+* @param type $isWatch
+* @param type $section
+* @param type $flags
+* @param Revision $revision
+* @param Status $status
+* @param type $baseRevId
+* @return boolean
+*/
+   public function onPageContentSaveComplete( $article, $user, $content, 
$summary,
+   $isMinor, $isWatch, $section, $flags, $revision, 
$status, $baseRevId ) {
+   if ( $article->getTitle()->getNamespace() !== NS_BLOG ) return 
true;
+
+   $sTagsKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'Blog', 
'Tags' );
+   $aTagsData = BsCacheHelper::get( $sTagsKey );
+
+   // Invalidate all blog tag caches
+   BsCacheHelper::invalidateCache( $aTagsData );
+   // Invalidate blog tag cache
+   BsCacheHelper::invalidateCache( $sTagsKey );
+
+   return true;
}
 
public function onBSNamespaceManagerBeforeSetUsernamespaces( 
$classInstance, &$bsSystemNamespaces ) {
@@ -303,6 +334,12 @@
$oTitle = $this->getTitle();
}
 
+   $sKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'Blog', 
$oTitle->getArticleID() );
+   $aData = BsCacheHelper::get( $sKey );
+
+   if ( $aData !== false ) {
+   return $aData;
+   }
// initialize local variables
$sOut = '';
$oErrorListView = new ViewTagErrorList( $this );
@@ -570,8 +607,24 @@
$oBlogView->setOption( 'parentpage', 'Blog/' );
}
 
+   $aKey = array( $sKey );
+   $sTagsKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'Blog', 
'Tags' );
+   $aTagsData = BsCacheHelper::get( $sTagsKey );
+
+   if ( $aTagsData !== false ) {
+   if ( !in_array( $sKey, $aTagsData ) ) {
+   $aTagsData = array_merge( $aTagsData, $aKey );
+   }
+   } else {
+   $aTagsData = $aKey;
+   }
+
+   BsCacheHelper::set( $sTagsKey, $aTagsData, 86400 ); // one day
+
// actually create blog output
$sOut = $oBlogView->execute();
+   BsCacheHelper::set( $sKey, $sOut, 86400 ); // one day
+
return $sOut;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ide9ce843c6509f8276bc33e7b0e5ab5a84084ac7
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Pwirth 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: Tweichart 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] InsertLink: Now using new BS.form.field.TitleCombo - change (mediawiki...BlueSpiceExtensions)

2014-11-13 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: InsertLink: Now using new BS.form.field.TitleCombo
..


InsertLink: Now using new BS.form.field.TitleCombo

Implemented the new BS.form.field.TitleCombo in InsertLink
Needs to be tested carefully before merge!

Change-Id: I641804304b53b55b50e0d8d6304e335d007b1e29
---
M InsertLink/resources/BS.InsertLink/FormPanelWikiPage.js
1 file changed, 13 insertions(+), 61 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/InsertLink/resources/BS.InsertLink/FormPanelWikiPage.js 
b/InsertLink/resources/BS.InsertLink/FormPanelWikiPage.js
index d7cc414..cab45a4 100644
--- a/InsertLink/resources/BS.InsertLink/FormPanelWikiPage.js
+++ b/InsertLink/resources/BS.InsertLink/FormPanelWikiPage.js
@@ -17,57 +17,23 @@
beforeInitComponent: function() {
this.setTitle( 
mw.message('bs-insertlink-tab-wiki-page').plain() );
 
-   this.cbNamespace = Ext.create( 'BS.form.NamespaceCombo', {
-   name: 'inputNamespace',
-   excludeIds: [bs.ns.NS_MEDIA]
-   });
-   this.cbNamespace.on('select', this.onCbNamespaceSelect, this);
-
-   this.cbPageName = Ext.create( 'Ext.form.field.ComboBox', {
-   store: this.makePageStore(),
-   fieldLabel: 
mw.message('bs-insertlink-label-page').plain(),
-   displayField:'name',
-   typeAhead: true,
-   queryMode: 'local',
-   triggerAction: 'all',
-   allowBlank: false,
-   
emptyText:mw.message('bs-insertlink-select-a-page').plain()
+   this.cbPageName = Ext.create( 'BS.form.field.TitleCombo', {
+   fieldLabel: 
mw.message('bs-insertlink-label-page').plain()
});
 
this.pnlMainConf.items = [
-   this.cbNamespace,
this.cbPageName
];
 
this.callParent(arguments);
},
 
-   makePageStore: function() {
-   return Ext.create( 'Ext.data.JsonStore', {
-   proxy: {
-   type: 'ajax',
-   url: bs.util.getAjaxDispatcherUrl( 
'InsertLink::getPage' ),
-   reader: {
-   type: 'json',
-   root: 'items'
-   }
-   },
-   autoLoad: true,
-   fields: ['name', 'label', 'ns']
-   });
-   },
-
-   onCbNamespaceSelect: function( field, record ) {
-   this.cbPageName.getStore().load({
-   params:{ ns: record[0].get('id') }
-   });
-   },
resetData: function() {
-   this.cbNamespace.reset();
this.cbPageName.reset();
 
this.callParent(arguments);
},
+
setData: function( obj ) {
var bActive = false;
var desc = false;
@@ -104,12 +70,8 @@
//Check if it is a available namespace or part 
of the title
var normNsText = 
namespace.toLowerCase().replace(' ', '_' );
var nsId = wgNamespaceIds[normNsText];
-   if ( !nsId ) {
-   this.cbPageName.setValue( namespace + 
":" + parts.join( ':' ) );
-   } else {
-   this.cbNamespace.setValue( nsId );
-   this.cbPageName.setValue( parts.join( 
':' ) );
-   }
+   this.cbPageName.setValue( namespace + ":" + 
parts.join( ':' ) );
+
} else {
this.cbPageName.setValue( link );
}
@@ -122,8 +84,7 @@
}
var link = new bs.wikiText.Link(obj.code);
 
-   this.cbPageName.setValue( link.getTitle() );
-   this.cbNamespace.setValue( link.getNsText() );
+   this.cbPageName.setValue( 
link.getPrefixedTitle() );
if( link.getTitle() !== link.getDisplayText() ) 
{
desc = link.getDisplayText();
}
@@ -144,29 +105,20 @@
desc = '|'+title;
}
 
-   var ns = '';
-   var nsIndex = this.cbNamespace.getValue();
-   if( nsIndex !== bs.ns.NS_MAIN ) {
-   var ns = wgFormattedNamespace

[MediaWiki-commits] [Gerrit] Fixed notice - change (mediawiki...BlueSpiceExtensions)

2014-11-13 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Fixed notice
..

Fixed notice

Due to copy and paste a notice was introduced

Change-Id: I7d0456b1ba5ae3564696b980515822a1c6050b55
---
M Authors/Authors.class.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/12/173012/1

diff --git a/Authors/Authors.class.php b/Authors/Authors.class.php
index 769c693..ea6aa85 100644
--- a/Authors/Authors.class.php
+++ b/Authors/Authors.class.php
@@ -164,7 +164,7 @@
return true;
}
 
-   if ( !( $sktemplate instanceof BsBaseTemplate ) ) {
+   if ( !( $skin instanceof BsBaseTemplate ) ) {
return true;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I7d0456b1ba5ae3564696b980515822a1c6050b55
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] More word query returned no results - change (mediawiki...BlueSpiceFoundation)

2014-11-13 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: More word query returned no results
..

More word query returned no results

The LIKE query found no results for more words, also if a
page like that exists. To prevent this the entered string is spilt up
after each whitespace and insert a LIKE operator.

 * Improved query a little

Change-Id: I3bcb0d0f84b3d5411f43121025610569514b3a46
---
M includes/CommonAJAXInterface.php
1 file changed, 42 insertions(+), 40 deletions(-)


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

diff --git a/includes/CommonAJAXInterface.php b/includes/CommonAJAXInterface.php
index b6faa62..b5f09d9 100644
--- a/includes/CommonAJAXInterface.php
+++ b/includes/CommonAJAXInterface.php
@@ -11,7 +11,7 @@
public static function getTitleStoreData( $sOptions = '{}' ) {
global $wgContLang;
$oResponse = BsCAResponse::newFromPermission( 'read' );
-   if( $oResponse->isSuccess() === false ) {
+   if ( $oResponse->isSuccess() === false ) {
return $oResponse;
}
 
@@ -39,23 +39,23 @@
 
//Step 1: Collect namespaces
$aNamespaces = $wgContLang->getNamespaces();
-   asort($aNamespaces);
-   foreach( $aNamespaces as $iNsId => $sNamespaceText ) {
-   if( empty($sNamespaceText) ) {
+   asort( $aNamespaces );
+   foreach ( $aNamespaces as $iNsId => $sNamespaceText ) {
+   if ( empty( $sNamespaceText ) ) {
continue;
}
 
-   if( !in_array($iNsId, $aOptions['namespaces']) ) {
+   if ( !in_array( $iNsId, $aOptions['namespaces'] ) ) {
continue;
}
 
-   $sNormNSText = strtolower( $sNamespaceText);
-   $sNormNSText = str_replace( '_', ' ', $sNormNSText);
+   $sNormNSText = strtolower( $sNamespaceText );
+   $sNormNSText = str_replace( '_', ' ', $sNormNSText );
 
-   if( empty($sQuery) || strpos($sNormNSText, $sQuery) === 
0) {
+   if ( empty( $sQuery ) || strpos( $sNormNSText, $sQuery 
) === 0) {
 
//Only namespaces a user has the read 
permission for
-   $oDummyTitle 
=Title::newFromText($sNamespaceText.':X');
+   $oDummyTitle = 
Title::newFromText($sNamespaceText.':X');
if( $oDummyTitle->userCan('read') === false ) {
continue;
}
@@ -67,7 +67,7 @@
}
}
 
-   if( empty($sQuery) ) {
+   if ( empty( $sQuery ) ) {
$oResponse->setPayload( $aPayload );
return $oResponse;
}
@@ -75,7 +75,7 @@
//Step 2: Find pages
$oQueryTitle = Title::newFromText( $oParams->getQuery() );
 
-   if( $oQueryTitle instanceof Title === false ) {
+   if ( $oQueryTitle instanceof Title === false ) {
$oResponse->setPayload( $aPayload );
return $oResponse;
}
@@ -91,15 +91,25 @@
//The current approach has a major disadvantage: It does not 
find
//anything when the query contains a hyphen!
 
-   $dbr = wfGetDB(DB_SLAVE);
+   $dbr = wfGetDB( DB_SLAVE );
+
+   // We want LIKE operator behind every term,
+   // so multi term queries also bring results
+   $aLike = array();
+   $sOp = $dbr->anyString();
+   $sParams = explode( ' ', strtolower( $oQueryTitle->getText() ) 
);
+   foreach ( $sParams as $sParam ) {
+   $aLike[] = $sParam;
+   $aLike[] = $sOp;
+   }
+
$res = $dbr->select(
array( 'page', 'searchindex' ),
-   array( 'page_namespace', 'page_title' ),
+   array( 'page_id' ),
array(
'page_id = si_page',
'si_title '. $dbr->buildLike(
-   strtolower( $oQueryTitle->getText() ),
-   $dbr->anyString()
+   $aLike
),
'page_namespace' => $oQueryTitle->getNamespace()
),
@@ -110,36 +120,28 @@
);
 
   

[MediaWiki-commits] [Gerrit] Added contributer - change (mediawiki...BlueSpiceFoundation)

2014-11-13 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Added contributer
..

Added contributer

Change-Id: Ie7d353fefbee973b50b73aa349376c6ad5a91372
---
M includes/specials/SpecialCredits.class.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/specials/SpecialCredits.class.php 
b/includes/specials/SpecialCredits.class.php
index d3c66a9..ff80db1 100644
--- a/includes/specials/SpecialCredits.class.php
+++ b/includes/specials/SpecialCredits.class.php
@@ -35,7 +35,7 @@
);
$aContributors = array(
'Aude', 'Chad Horohoe', 'Raimond Spekking', 'Siebrand 
Mazeland',
-   'Yuki Shira', 'TGC', 'Umherirrender'
+   'Yuki Shira', 'TGC', 'Umherirrender', 'Brad Jorsch'
);
$aTranslation = array(
'Siebrand Mazeland', 'Raimond Spekking', 'Stephan 
Muggli'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie7d353fefbee973b50b73aa349376c6ad5a91372
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Changed display of respsonible editors in statebar - change (mediawiki...BlueSpiceExtensions)

2014-11-12 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Changed display of respsonible editors in statebar
..

Changed display of respsonible editors in statebar

Responsible editors are displayed beneath each other in statebar. To
Prevent this changed display of those elements to inline-block.

Change-Id: I814eca79b14c65411c0aee30d7dc40d20fe27086
---
M ResponsibleEditors/resources/bluespice.responsibleEditors.css
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/55/172755/1

diff --git a/ResponsibleEditors/resources/bluespice.responsibleEditors.css 
b/ResponsibleEditors/resources/bluespice.responsibleEditors.css
index c78d248..1e9fa1f 100644
--- a/ResponsibleEditors/resources/bluespice.responsibleEditors.css
+++ b/ResponsibleEditors/resources/bluespice.responsibleEditors.css
@@ -14,4 +14,5 @@
 
 .bs-statebar-body-itembody .bs-userminiprofile {
margin-right: 5px;
+   display: inline-block;
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I814eca79b14c65411c0aee30d7dc40d20fe27086
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Strip tags from preview text - change (mediawiki...BlueSpiceExtensions)

2014-11-12 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Strip tags from preview text
..

Strip tags from preview text

When showtext parameter is set a little preview of the page content is
shown. It looks strange when tags are included in this preview.

Change-Id: I07ad32bd6aeb1050f412af6fa9593afba9eba44e
---
M SmartList/SmartList.class.php
1 file changed, 1 insertion(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/12/172712/1

diff --git a/SmartList/SmartList.class.php b/SmartList/SmartList.class.php
index 1a447db..fb8e9bf 100644
--- a/SmartList/SmartList.class.php
+++ b/SmartList/SmartList.class.php
@@ -850,6 +850,7 @@
if ( $aArgs['showtext'] && ( $iItems <= 
$aArgs['numwithtext'] ) ) {
$oSmartListListEntryView->setTemplate( 
'*[[:{NAMESPACE}:{TITLE}|{DISPLAYTITLE}]]{META}{TEXT}' . "\n" );
$sText = 
BsPageContentProvider::getInstance()->getContentFromTitle( $oTitle );
+   $sText = Sanitizer::stripAllTags( 
$sText );
$sText = BsStringHelper::shorten( 
$sText, array( 'max-length' => $aArgs['trimtext'], 'position' => 'end' ) );
$sText = '' . $sText . 
'';
} else {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I07ad32bd6aeb1050f412af6fa9593afba9eba44e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Improved styling of FormattingHelp - change (mediawiki...BlueSpiceExtensions)

2014-11-12 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Improved styling of FormattingHelp
..

Improved styling of FormattingHelp

Change-Id: I47cebc9865f3931b7bb2c8e0a693195716abe4bf
---
M FormattingHelp/FormattingHelp.class.php
M FormattingHelp/resources/BS.FormattingHelp/Window.js
M FormattingHelp/resources/bluespice.formattinghelp.css
3 files changed, 3 insertions(+), 18 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/02/172702/1

diff --git a/FormattingHelp/FormattingHelp.class.php 
b/FormattingHelp/FormattingHelp.class.php
index f03ca13..092fdf0 100644
--- a/FormattingHelp/FormattingHelp.class.php
+++ b/FormattingHelp/FormattingHelp.class.php
@@ -99,7 +99,7 @@
public static function getFormattingHelp() {
if ( BsCore::checkAccessAdmission( 'edit' ) === false ) return 
true;
 
-   $sOutput = "
+   $sOutput = "



diff --git a/FormattingHelp/resources/BS.FormattingHelp/Window.js 
b/FormattingHelp/resources/BS.FormattingHelp/Window.js
index daf3efa..fd7b9b6 100644
--- a/FormattingHelp/resources/BS.FormattingHelp/Window.js
+++ b/FormattingHelp/resources/BS.FormattingHelp/Window.js
@@ -4,6 +4,8 @@
closeAction: 'hide',
singleton: true,
id: 'bs-formattinghelp-window',
+   height: 600,
+   width: 600,
 
initComponent: function(){
this.setTitle( 
mw.message('bs-formattinghelp-formatting').plain() );
diff --git a/FormattingHelp/resources/bluespice.formattinghelp.css 
b/FormattingHelp/resources/bluespice.formattinghelp.css
index 87bec39..8a0788f 100644
--- a/FormattingHelp/resources/bluespice.formattinghelp.css
+++ b/FormattingHelp/resources/bluespice.formattinghelp.css
@@ -11,24 +11,7 @@
  * @filesource
  */
 
-#bs-formattinghelp-content table {
-   font-family: 'Courier New', monospace;
-   border-collapse: collapse;
-}
-#bs-formattinghelp-content table tr:nth-child(odd) {
-   background-color: #FDFDFD;
-}
-
-#bs-formattinghelp-content table tr td {
-   padding: 10px 5px;
-}
-
 #bs-editbutton-formattinghelp {
/*@embed*/
background-image: url(images/button_formatinghelp.png);
-}
-
-#bs-formattinghelp-content th, #bs-formattinghelp-content td{
-   padding: 10px 5px;
-   text-align: left;
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I47cebc9865f3931b7bb2c8e0a693195716abe4bf
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Removed some font size stylings - change (mediawiki...BlueSpiceSkin)

2014-11-12 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Removed some font size stylings
..


Removed some font size stylings

Some extensions had issues with those stylings. They seem redundant
anyway.

Change-Id: I6565ae92aefcd0412091f82d7c604a9e55e2ee8a
---
M resources/components/skin.font.less
1 file changed, 2 insertions(+), 14 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/resources/components/skin.font.less 
b/resources/components/skin.font.less
index 8e2dfe5..f457908 100644
--- a/resources/components/skin.font.less
+++ b/resources/components/skin.font.less
@@ -3,10 +3,6 @@
font-size: 0.938em; //15px
 }
 body.mediawiki{
-   p, a, em, ul, ol, li, table, h5, h6, #toc{
-   font-size: 100%;
-   font-family: @bs-font-default;
-   }
h1.firstHeading{
font-size: 200%;
}
@@ -220,23 +216,15 @@
 }
 #bs-nav-sections.ui-tabs.ui-widget.ui-widget-content.ui-corner-all,
 #bs-nav-sections .bs-nav-tab {
-   h5 {
+   .bs-nav-links > h5 {
font-size: 150%;
-   }
-}
-#bs-left-column #bs-nav-sections .ui-widget-content,
-#bs-left-column #bs-nav-sections .bs-nav-tab {
-   a, em, strong, li {
-   font-size: 105%;
}
 }
 
 #bs-left-column #bs-nav-sections .ui-widget-content a:hover{
text-decoration: underline;
 }
-#bs-left-column #bs-nav-sections .ui-widget-content a:after{
-   font-size: 100%;
-}
+
 #bs-data-after-content{
font-family: @bs-font-default;
#bs-data-after-content-tabs{

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I6565ae92aefcd0412091f82d7c604a9e55e2ee8a
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] added i18n for log page - change (mediawiki...BlueSpiceExtensions)

2014-11-11 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: added i18n for log page
..


added i18n for log page

Change-Id: Iebc0ef2f299bd19c4ee992c41c512ca46c87025a
---
M Review/languages/Review.i18n.php
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/Review/languages/Review.i18n.php b/Review/languages/Review.i18n.php
index 3b99ee4..aa81922 100644
--- a/Review/languages/Review.i18n.php
+++ b/Review/languages/Review.i18n.php
@@ -146,6 +146,7 @@
'bs-review-commentinputlabel'=> 'Your comment',
'bs-review-ownercomment' => 'Comment of $1',
'bs-review-comments' => 'Comments',
+   'log-show-hide-bs-review' => '$1 review log',
 
//Permissions
//'workflowedit' and 'workflowlist' don't need 'action-*'-messages as 
there
@@ -330,6 +331,7 @@
'bs-review-commentinputlabel'=> 'Dein Kommentar',
'bs-review-ownercomment' => 'Kommentar von $1',
'bs-review-comments' => 'Kommentare',
+   'log-show-hide-bs-review' => 'Review-Logbuch $1',
 
//Permissions
//'workflowedit' and 'workflowlist' don't need 'action-*'-messages as 
there

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Iebc0ef2f299bd19c4ee992c41c512ca46c87025a
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_22
Gerrit-Owner: Tweichart 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Siebrand 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Quote all parameters in filter query - change (mediawiki...BlueSpiceExtensions)

2014-11-11 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Quote all parameters in filter query
..


Quote all parameters in filter query

Change-Id: I4ec023ebf075b36b5db6261ea92fa1e605a98874
---
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index 1476f41..5e8d445 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -429,7 +429,7 @@
$bTagNamespace = true;
$aFq[] = ( BsConfig::get( 
'MW::ExtendedSearch::ShowFacets' ) )
? '{!tag=na}namespace:("' . implode( '" "', 
$aFqNamespaces ) . '")'
-   : 'namespace:(' . implode( ' ', $aFqNamespaces 
) . ')';
+   : 'namespace:("' . implode( '" "', 
$aFqNamespaces ) . '")';
}
 
// $this->aOptions['cats'] = $this->oSearchRequest->sCat; // 
string, defaults to '' if 'search_cat' not set in REQUEST

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I4ec023ebf075b36b5db6261ea92fa1e605a98874
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Quote all parameters in filter query - change (mediawiki...BlueSpiceExtensions)

2014-11-10 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Quote all parameters in filter query
..

Quote all parameters in filter query

Change-Id: I4ec023ebf075b36b5db6261ea92fa1e605a98874
---
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/41/172241/1

diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index 1476f41..5e8d445 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -429,7 +429,7 @@
$bTagNamespace = true;
$aFq[] = ( BsConfig::get( 
'MW::ExtendedSearch::ShowFacets' ) )
? '{!tag=na}namespace:("' . implode( '" "', 
$aFqNamespaces ) . '")'
-   : 'namespace:(' . implode( ' ', $aFqNamespaces 
) . ')';
+   : 'namespace:("' . implode( '" "', 
$aFqNamespaces ) . '")';
}
 
// $this->aOptions['cats'] = $this->oSearchRequest->sCat; // 
string, defaults to '' if 'search_cat' not set in REQUEST

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4ec023ebf075b36b5db6261ea92fa1e605a98874
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Small code improvements - change (mediawiki...BlueSpiceExtensions)

2014-11-10 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Small code improvements
..

Small code improvements

 * Changed from array_search to in_array
 * CC

Change-Id: I0c94926b8f2303c8d9ba31595565e81a65c66423
---
M NamespaceManager/NamespaceManager.class.php
1 file changed, 20 insertions(+), 13 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/40/172240/1

diff --git a/NamespaceManager/NamespaceManager.class.php 
b/NamespaceManager/NamespaceManager.class.php
index af120a3..de2ebc6 100644
--- a/NamespaceManager/NamespaceManager.class.php
+++ b/NamespaceManager/NamespaceManager.class.php
@@ -324,11 +324,13 @@
for ( $i = 0; $i < $iResults; $i++ ) {
 
$iNs = $aResults[$i]['id'];
-   $aResults[ $i ][ 'editable' ] = ( 
isset($bsSystemNamespaces[$iNs] ) ) ? false : (array_search( $iNs, 
$aUserNamespaces ) !== false);
-   $aResults[ $i ][ 'content' ] = (array_search( $iNs, 
$wgContentNamespaces ) !== false);
-   $aResults[ $i ][ 'searchable' ] = (isset( 
$wgNamespacesToBeSearchedDefault[ $iNs ] ) && $wgNamespacesToBeSearchedDefault[ 
$iNs ]);
-   $aResults[ $i ][ 'subpages' ] = (isset( 
$wgNamespacesWithSubpages[ $iNs ] ) && $wgNamespacesWithSubpages[ $iNs ]);
-   if ( array_search( $iNs, $aUserNamespaces ) !== false ) 
{
+   $aResults[$i][ 'editable' ] = ( isset( 
$bsSystemNamespaces[$iNs] ) )
+   ? false
+   : in_array( $iNs, $aUserNamespaces );
+   $aResults[$i]['content'] = in_array( $iNs, 
$wgContentNamespaces );
+   $aResults[$i]['searchable'] = (isset( 
$wgNamespacesToBeSearchedDefault[$iNs] ) && 
$wgNamespacesToBeSearchedDefault[$iNs]);
+   $aResults[$i]['subpages'] = ( isset( 
$wgNamespacesWithSubpages[$iNs] ) && $wgNamespacesWithSubpages[$iNs] );
+   if ( in_array( $iNs, $aUserNamespaces ) ) {
$aResults[$i]['empty'] = 
$this->isNamespaceEmpty( $iNs );
}
}
@@ -477,7 +479,7 @@
}
 
if ( !isset( $bsSystemNamespaces[($iNS)] ) && strstr( 
$sNamespace, '_' . $wgContLang->getNsText( NS_TALK ) ) ) {
-   $aUserNamespaces[ $iNS ] = array(
+   $aUserNamespaces[$iNS] = array(
'name' => 
$aUserNamespaces[$iNS]['name'],
'alias' => str_replace( '_' . 
$wgContLang->getNsText( NS_TALK ), '_talk', $sNamespace ),
);
@@ -525,7 +527,7 @@
global $wgContLang;
$aUserNamespaces = self::getUserNamespaces( true );
$aNamespacesToRemove = array( array( $iNS, 0 ) );
-   $sNamespace = $aUserNamespaces[ $iNS ][ 'name' ];
+   $sNamespace = $aUserNamespaces[$iNS][ 'name' ];
 
if ( !strstr( $sNamespace, '_'.$wgContLang->getNsText( NS_TALK 
) ) ) {
if ( isset( $aUserNamespaces[ ($iNS + 1) ] ) && strstr( 
$aUserNamespaces[ ($iNS + 1) ][ 'name' ], '_'.$wgContLang->getNsText( NS_TALK ) 
) ) {
@@ -597,20 +599,25 @@
}
$sConfigContent = file_get_contents( BSROOTDIR . DS . 'config' 
. DS . 'nm-settings.php' );
$aUserNamespaces = array();
-   //if ( preg_match_all( '%// START Namespace 
([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*).*define\("NS_\1", ([0-9]*)\).*?// 
END Namespace \1%s', $sConfigContent, $aMatches, PREG_PATTERN_ORDER ) ) {
+   /*if ( preg_match_all(
+   '%// START Namespace 
([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*).*define\("NS_\1", ([0-9]*)\).*?// 
END Namespace \1%s',
+   $sConfigContent,
+   $aMatches,
+   PREG_PATTERN_ORDER ) ) {
+*/
if ( preg_match_all( 
'%define\("NS_([a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*)", ([0-9]*)\)%s', 
$sConfigContent, $aMatches, PREG_PATTERN_ORDER ) ) {
$aUserNamespaces = $aMatches[ 2 ];
}
if ( $bFullDetails ) {
$aTmp = array();
foreach ( $aUserNamespaces as $iNS ) {
-   $aTmp[ $iNS ] = array(
-   'content' => ( array_search( $iNS, 
$wgContentNamespaces ) !== false ),
-   'subpages' => ( isset( 
$wgNamespacesWithSubpages[ $iNS ] ) && $wgNamespacesWithSubpages[ $iNS ] ),
-   'searched' => ( isset( 
$wgNamespacesToBeSearchedDefault[ $iNS ] ) &

[MediaWiki-commits] [Gerrit] Minimizing the nav tabs flickering - change (mediawiki...BlueSpiceSkin)

2014-11-10 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Minimizing the nav tabs flickering
..


Minimizing the nav tabs flickering

This is not a complete fix (which would include serverside processing of
cookie information) but it reduces the onload flickering of the
navigation to a minimum.

Change-Id: Ie8453a2a69670eb5f1adde23c63e35781ee92356
---
M resources/components/skin.font.less
M resources/components/skin.navigationTabs.less
2 files changed, 20 insertions(+), 9 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/resources/components/skin.font.less 
b/resources/components/skin.font.less
index f0290a7..8e2dfe5 100644
--- a/resources/components/skin.font.less
+++ b/resources/components/skin.font.less
@@ -218,17 +218,19 @@
color: @bs-color-dark-blue;
}
 }
-#bs-nav-sections.ui-tabs.ui-widget.ui-widget-content.ui-corner-all {
+#bs-nav-sections.ui-tabs.ui-widget.ui-widget-content.ui-corner-all,
+#bs-nav-sections .bs-nav-tab {
h5 {
font-size: 150%;
}
 }
-#bs-left-column #bs-nav-sections .ui-widget-content a,
-#bs-left-column #bs-nav-sections .ui-widget-content em,
-#bs-left-column #bs-nav-sections .ui-widget-content strong,
-#bs-left-column #bs-nav-sections .ui-widget-content li{
-   font-size: 105%;
+#bs-left-column #bs-nav-sections .ui-widget-content,
+#bs-left-column #bs-nav-sections .bs-nav-tab {
+   a, em, strong, li {
+   font-size: 105%;
+   }
 }
+
 #bs-left-column #bs-nav-sections .ui-widget-content a:hover{
text-decoration: underline;
 }
diff --git a/resources/components/skin.navigationTabs.less 
b/resources/components/skin.navigationTabs.less
index 18e5adb..e0d7470 100644
--- a/resources/components/skin.navigationTabs.less
+++ b/resources/components/skin.navigationTabs.less
@@ -16,7 +16,6 @@
color: #555;
}
h5 {
-   margin-top: 1em;
text-transform: uppercase;
}
 }
@@ -126,6 +125,16 @@
 #bs-usersidebar-edit {
float: right;
 }
-#bs-left-column ul{
+
+div.bs-nav-tab {
+   padding: 20px 25px;
+}
+
+#bs-left-column div.bs-nav-tab ul{
margin-left: 15px;
-}
\ No newline at end of file
+}
+/* This would hide all navigation, changing just the 'type' of flickering
+div[id^="bs-nav-section-"] {
+   display: none;
+}
+*/
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie8453a2a69670eb5f1adde23c63e35781ee92356
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added class to navigation tab container - change (mediawiki...BlueSpiceFoundation)

2014-11-10 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added class to navigation tab container
..


Added class to navigation tab container

This is to minimize onload flickering

Change-Id: I1d444d8e46eb5b3625b4114164f6dfe66dd7d665
---
M includes/BsBaseTemplate.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/includes/BsBaseTemplate.php b/includes/BsBaseTemplate.php
index 3fc526a..abeb726 100644
--- a/includes/BsBaseTemplate.php
+++ b/includes/BsBaseTemplate.php
@@ -234,7 +234,7 @@
data['bs_navigation_main'] as $key => 
$data ) {
?>
-   
+   


https://gerrit.wikimedia.org/r/172226
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I1d444d8e46eb5b3625b4114164f6dfe66dd7d665
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Changed label of column header - change (mediawiki...BlueSpiceExtensions)

2014-11-10 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Changed label of column header
..

Changed label of column header

Actually "in statistics" means, the namespace is a content namepsace. So
don't lie about it.

 * Imporved message documentation

Change-Id: I9690da257c7b89a7314b387f6ce7997cf6720abe
---
M NamespaceManager/i18n/en.json
M NamespaceManager/i18n/qqq.json
2 files changed, 9 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/30/172230/1

diff --git a/NamespaceManager/i18n/en.json b/NamespaceManager/i18n/en.json
index e1aca6b..21258ed 100644
--- a/NamespaceManager/i18n/en.json
+++ b/NamespaceManager/i18n/en.json
@@ -13,7 +13,7 @@
"bs-namespacemanager-label-id": "ID",
"bs-namespacemanager-label-namespaces": "Namespace",
"bs-namespacemanager-label-editable": "Renameable",
-   "bs-namespacemanager-label-content": "In statistics",
+   "bs-namespacemanager-label-content": "Content namespace",
"bs-namespacemanager-label-searchable": "Search by default",
"bs-namespacemanager-label-subpages": "Subpages",
"bs-namespacemanager-nsadded": "The namespace has been added.",
diff --git a/NamespaceManager/i18n/qqq.json b/NamespaceManager/i18n/qqq.json
index efd6148..17123dc 100644
--- a/NamespaceManager/i18n/qqq.json
+++ b/NamespaceManager/i18n/qqq.json
@@ -12,12 +12,12 @@
"bs-namespacemanager-ns-exists": "Error message for the namespace 
already exists.",
"bs-namespacemanager-ns-length": "Error message for the namespace must 
have a minumum length of two characters.",
"bs-namespacemanager-invalid-id": "Error message for no valid namespace 
ID",
-   "bs-namespacemanager-label-id": "Column headline for 
id\n{{Identical|ID}}",
-   "bs-namespacemanager-label-namespaces": "Column headline for 
namespace\n{{Identical|Namespace}}",
-   "bs-namespacemanager-label-editable": "Column headline for 
renameable\n{{Identical|Renameable}}",
-   "bs-namespacemanager-label-content": "Column headline for in 
statistics",
-   "bs-namespacemanager-label-searchable": "Column headline for search by 
default.\n\nAlso used as checkbox label.",
-   "bs-namespacemanager-label-subpages": "Column headline for 
subpages.\n\nAlso used as checkbox label.\n{{Identical|Subpage}}",
+   "bs-namespacemanager-label-id": "Column headline for 
id\n*{{Identical|ID}}",
+   "bs-namespacemanager-label-namespaces": "Column headline for 
namespace\n*{{Identical|Namespace}}",
+   "bs-namespacemanager-label-editable": "Column headline for 
renameable\n*{{Identical|Renameable}}",
+   "bs-namespacemanager-label-content": "Column headline for content 
namespace\n*{{Identical|Content namespace}}",
+   "bs-namespacemanager-label-searchable": "Column headline for search by 
default.\n\n*Also used as checkbox label.",
+   "bs-namespacemanager-label-subpages": "Column headline for 
subpages.\n\n*Also used as checkbox label.\n*{{Identical|Subpage}}",
"bs-namespacemanager-nsadded": "Success message for the namespace has 
been added.",
"bs-namespacemanager-nsremoved": "Success message for the namespace has 
been removed.",
"bs-namespacemanager-nsedited": "Success message for the namespace has 
been edited.",
@@ -25,9 +25,9 @@
"bs-namespacemanager-tipedit": "Window title for edit namespace",
"bs-namespacemanager-tipremove": "Window title for remove namespace",
"bs-namespacemanager-msgnoteditabledelete": "Error message for this 
namespace is a system namespace and cannot be deleted.",
-   "bs-namespacemanager-labelnsname": "Label for 
name.\n{{Identical|Namespace name}}",
+   "bs-namespacemanager-labelnsname": "Label for 
name.\n*{{Identical|Namespace name}}",
"bs-namespacemanager-willdelete": "Checkbox label for will be deleted",
-   "bs-namespacemanager-willmove": "Checkbox label for will be moved into 
the namespace NS_MAIN.\n\nRefers to {{msg-mw|Bs-ns main}}.",
+   "bs-namespacemanager-willmove": "Checkbox label for will be moved into 
the namespace NS_MAIN.\n\n*Refers to {{msg-mw|Bs-ns main}}.",
"bs-namespacemanager-willmovesuffix": "Checkbox label for will be moved 
into the namespace NS_MAIN with the suffix \"$1\".\n\nParameters:\n* $1 - is 
the BlueSpice message \"bs-from-something\" which includes the name of the 
namespace which will be deleted\nRefers to:\n* {{msg-mw|Bs-ns main}}",
"bs-namespacemanager-deletewarning": "Text for are you sure that you 
want to delete this namespace? Deleting a namespace cannot be undone.",
"bs-namespacemanager-pagepresent": "Headline for pages in this 
namespace:\nHeadline for checkbox section",

-- 
To view, visit https://gerrit.wikimedia.org/r/172230
To unsubscribe, visit https://gerrit.wikimedia.org/r/setting

[MediaWiki-commits] [Gerrit] Don't call ApiResult::getResult() - change (mediawiki...BlueSpiceExtensions)

2014-11-08 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Don't call ApiResult::getResult()
..


Don't call ApiResult::getResult()

If $apiResult->getResult() !== $apiResult, you've got bigger problems.

Change-Id: I9d5f2617d904de7c1c06a936d9a6cd68cd04f73b
---
M UserSidebar/api/ApiSidebar.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/UserSidebar/api/ApiSidebar.php b/UserSidebar/api/ApiSidebar.php
index 5012732..a648554 100644
--- a/UserSidebar/api/ApiSidebar.php
+++ b/UserSidebar/api/ApiSidebar.php
@@ -32,7 +32,7 @@
 else
 $sContent = $oView->execute();
 $result['usersidebar'][$oView->getId()][] = $sContent;
-
$apiResult->getResult()->setIndexedTagName($result['usersidebar'][$oView->getId()],
 'content');
+
$apiResult->setIndexedTagName($result['usersidebar'][$oView->getId()], 
'content');
 } else {
 wfDebugLog( 'BS::Skin', 'BlueSpiceTemplate::printViews: 
Invalid view.' );
 }
@@ -81,4 +81,4 @@
public function getVersion() {
return __CLASS__;
}
-}
\ No newline at end of file
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9d5f2617d904de7c1c06a936d9a6cd68cd04f73b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Anomie 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Getter for last request in Ext.data.proxy.Server - change (mediawiki...BlueSpiceFoundation)

2014-11-07 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Getter for last request in Ext.data.proxy.Server
..


Getter for last request in Ext.data.proxy.Server

Added override for Ext.data.proxy.Server to allow access to last
Ext.data.request object.

Change-Id: I9722a3e335d33aec4659cfaf885ee82bb349fbc0
---
M resources/bluespice.extjs/bluespice.extjs.js
1 file changed, 12 insertions(+), 1 deletion(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/resources/bluespice.extjs/bluespice.extjs.js 
b/resources/bluespice.extjs/bluespice.extjs.js
index 43ac5bc..b6d6e9a 100755
--- a/resources/bluespice.extjs/bluespice.extjs.js
+++ b/resources/bluespice.extjs/bluespice.extjs.js
@@ -25,6 +25,17 @@
 });
});
 
+   Ext.override(Ext.data.proxy.Server, {
+   buildRequest: function(){
+   this._lastRequest = this.callParent( arguments );
+   return this._lastRequest;
+   },
+   _lastRequest: null,
+   getLastRequest: function() {
+   return this._lastRequest;
+   }
+   });
+
//Be nice to older browsers
//HINT: 
http://stackoverflow.com/questions/2581302/globally-disable-ext-js-animations
if( Ext.isIE9m ) {
@@ -45,7 +56,7 @@
var obj = this.callParent(arguments);
obj.flex = 0;
return obj;
-   },
+   }
});
 
/*

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9722a3e335d33aec4659cfaf885ee82bb349fbc0
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fixed issue with email language - change (mediawiki...BlueSpiceExtensions)

2014-11-06 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Fixed issue with email language
..

Fixed issue with email language

Emails were sent in content languge and not in user language. So now the
emails are sent per user and not combined for all.

Change-Id: I2afe945a9958930c5fae76a64c1844de8038f4c3
---
M ResponsibleEditors/ResponsibleEditors.class.php
1 file changed, 67 insertions(+), 70 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/24/171524/1

diff --git a/ResponsibleEditors/ResponsibleEditors.class.php 
b/ResponsibleEditors/ResponsibleEditors.class.php
index 2fed95f..44ecf6e 100644
--- a/ResponsibleEditors/ResponsibleEditors.class.php
+++ b/ResponsibleEditors/ResponsibleEditors.class.php
@@ -874,80 +874,77 @@
 * @param string $sAction
 */
public static function notifyResponsibleEditors($aResponsibleEditorIds, 
$oUser, $aTitles, $sAction) {
-   if (empty($aResponsibleEditorIds)) return true;
+   if ( empty( $aResponsibleEditorIds ) ) return true;
 
-   $aResponsibleEditors = array();
-   foreach ($aResponsibleEditorIds as $iUserId) {
-   $oREUser = User::newFromId($iUserId);
+   foreach ( $aResponsibleEditorIds as $iUserId ) {
+   $oREUser = User::newFromId( $iUserId );
if ( $iUserId == $oUser->getId() ) continue;
-   if ( BsConfig::getVarForUser( 
"MW::ResponsibleEditors::E".ucfirst( $sAction ), $oREUser ) === true ) {
-   $aResponsibleEditors[] = $oREUser;
+   if ( BsConfig::getVarForUser( 
"MW::ResponsibleEditors::E".ucfirst( $sAction ), $oREUser ) === false ) {
+   continue;
}
+
+   $sUserRealName = 
BsCore::getInstance()->getUserDisplayName( $oUser );
+   $sUsername = $oUser->getName();
+   $sArticleName = $aTitles[0]->getText();
+   $sArticleLink = $aTitles[0]->getFullURL();
+
+   switch( $sAction ) {
+   case 'change':
+   $sSubject = wfMessage(
+   
'bs-responsibleeditors-mail-subject-re-article-changed',
+   $sArticleName,
+   $sUsername,
+   $sUserRealName
+   )->inLanguage( $oREUser->getOption( 
'language' ) )->text();
+   $sMessage = wfMessage(
+   
'bs-responsibleeditors-mail-text-re-article-changed',
+   $sArticleName,
+   $sUsername,
+   $sUserRealName,
+   $sArticleLink
+   )->inLanguage( $oREUser->getOption( 
'language' ) )->text();
+   break;
+   case 'delete':
+   $sSubject = wfMessage(
+   
'bs-responsibleeditors-mail-subject-re-article-deleted',
+   $sArticleName,
+   $sUsername,
+   $sUserRealName
+   )->inLanguage( $oREUser->getOption( 
'language' ) )->text();
+   $sMessage = wfMessage(
+   
'bs-responsibleeditors-mail-text-re-article-deleted',
+   $sArticleName,
+   $sUsername,
+   $sUserRealName,
+   $sArticleLink
+   )->inLanguage( $oREUser->getOption( 
'language' ) )->text();
+   break;
+   case 'move':
+   $sSubject = wfMessage(
+   
'bs-responsibleeditors-mail-subject-re-article-moved',
+   $sArticleName,
+   $sUsername,
+   $sUserRealName
+   )->inLanguage( $oREUser->getOption( 
'language' ) )->text();
+   $sMessage = wfMessage(
+ 

[MediaWiki-commits] [Gerrit] Fixed a couple of issues with emails - change (mediawiki...BlueSpiceFoundation)

2014-11-06 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Fixed a couple of issues with emails
..

Fixed a couple of issues with emails

1) The email greeting was in content language and not in the user language
2) Real name parameter was missing in email greeting

 * Fixed profiling in Mailer.class.php

Change-Id: If871ce67d81fb9df84264b6135da945242994d10
---
M i18n/core/de.json
M i18n/core/en.json
M i18n/core/qqq.json
M includes/Mailer.class.php
4 files changed, 18 insertions(+), 11 deletions(-)


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

diff --git a/i18n/core/de.json b/i18n/core/de.json
index bb6f35b..f4cf68f 100644
--- a/i18n/core/de.json
+++ b/i18n/core/de.json
@@ -25,7 +25,7 @@
"bs-two-units-ago": "vor $1 und $2",
"bs-one-unit-ago": "vor $1",
"bs-now": "jetzt",
-   "bs-email-greeting-receiver": "{{GENDER:$1|Hallo Herr $1|Hallo Frau 
$1|Hallo $1}},",
+   "bs-email-greeting-receiver": "{{GENDER:$1|Hallo Herr $2|Hallo Frau 
$2|Hallo $2}},",
"bs-email-greeting-no-receiver": "Hallo,",
"bs-email-footer": "Dies ist eine automatisch generierte E-Mail. Bitte 
antworte nicht auf diese E-Mail!",
"bs-userpagesettings-legend": "Benutzereinstellungen",
diff --git a/i18n/core/en.json b/i18n/core/en.json
index 8287ee6..ea95f5d 100644
--- a/i18n/core/en.json
+++ b/i18n/core/en.json
@@ -25,7 +25,7 @@
"bs-two-units-ago": "$1 and $2 ago",
"bs-one-unit-ago": "$1 ago",
"bs-now": "now",
-   "bs-email-greeting-receiver": "{{GENDER:$1|Hello Mr $1|Hello Mrs 
$1|Hello $1}},",
+   "bs-email-greeting-receiver": "{{GENDER:$1|Hello Mr $2|Hello Mrs 
$2|Hello $2}},",
"bs-email-greeting-no-receiver": "Hello,",
"bs-email-footer": "This message was generated automatically. Please do 
not reply to this email.",
"bs-userpagesettings-legend": "User settings",
diff --git a/i18n/core/qqq.json b/i18n/core/qqq.json
index 5e6ed1c..07aa245 100644
--- a/i18n/core/qqq.json
+++ b/i18n/core/qqq.json
@@ -29,8 +29,8 @@
"bs-two-units-ago": "Text shown when indicating how long ago an event 
was.\n\nUses {{msg-mw|Bs-years-duration}}, {{msg-mw|Bs-months-duration}}, 
{{msg-mw|Bs-weeks-duration}}, {{msg-mw|Bs-days-duration}}, 
{{msg-mw|Bs-hours-duration}}, {{msg-mw|Bs-mins-duration}}, 
{{msg-mw|Bs-secs-duration}} for parameters\n\nParameters:\n* $1 - a duration, 
e.g. {{msg-mw|Bs-weeks-duration}}\n* $2 - a duration one unit smaller than $1, 
e.g. {{msg-mw|Bs-days-duration}}",
"bs-one-unit-ago": "Text shown when indicating how long ago an event 
was\n\nParameters:\n* $1 - a duration; any one of the following messages:\n** 
{{msg-mw|Bs-years-duration}}\n** {{msg-mw|Bs-months-duration}}\n** 
{{msg-mw|Bs-weeks-duration}}\n** {{msg-mw|Bs-days-duration}}\n** 
{{msg-mw|Bs-hours-duration}}\n** {{msg-mw|Bs-mins-duration}}\n** 
{{msg-mw|Bs-secs-duration}}\n{{Identical|Ago}}",
"bs-now": "Text shown for \"now\" when indicating how long ago an event 
was.\n{{Identical|Now}}",
-   "bs-email-greeting-receiver": "Used in plain text mails as first line 
in body to greet the receiver, $1 is the current user name for GENDER 
distinction (depends on sex setting)\n\nParameters:\n* $1 - name of the 
receiver",
-   "bs-email-greeting-no-receiver": "Used in plain text mails as first 
line in body to greet the reveiver\n{{Identical|Hello}}",
+   "bs-email-greeting-receiver": "Used in emails as first line in body to 
greet the receiver.\n\nParameters:\n* $1 is the username of the receiver - use 
for GENDER distinction \n*$2 is real name of the receiver, if the receiver has 
not set a real name it is the username",
+   "bs-email-greeting-no-receiver": "Used in emails as first line in body 
to greet the reveiver\n{{Identical|Hello}}",
"bs-email-footer": "Used in plain text mails as last line",
"bs-userpagesettings-legend": "Label for section with links to special 
user related settings",
"bs-userpreferences-link-text": "Label for link to user preferences on 
user page",
diff --git a/includes/Mailer.class.php b/includes/Mailer.class.php
index a27b883..3881ee8 100644
--- a/includes/Mailer.class.php
+++ b/includes/Mailer.class.php
@@ -128,14 +128,20 @@
foreach ( $aEmailTo as $aReceiver ) {
//Prepare message
if ( $aReceiver['greeting'] ) {
-   $sGreeting = wfMessage( 
'bs-email-greeting-receiver', $aReceiver['greeting'] )->text() . ( 
$this->bSendHTML )
-   ? ""
-   : "\n\n";
+   $oUser = User::newFromName( 
$aReceiver['greeting'] );
+   $sRealname = $oUser->getRealName();
+   if ( empty( 

[MediaWiki-commits] [Gerrit] Added meaningful id for testing purpose - change (mediawiki...BlueSpiceExtensions)

2014-11-05 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Added meaningful id for testing purpose
..

Added meaningful id for testing purpose

The created checkboxes just had a number as id.

 * Changed initialization from document ready to loading time of ext.bluespice
 * Added missing semicolon

Change-Id: Ia1e22dc6c556a0d63e432d28a8bfe26a984ac5c4
---
M Checklist/Checklist.class.php
M Checklist/resources/bluespice.checklist.js
2 files changed, 7 insertions(+), 10 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/78/171278/1

diff --git a/Checklist/Checklist.class.php b/Checklist/Checklist.class.php
index dfe20de..8d73373 100644
--- a/Checklist/Checklist.class.php
+++ b/Checklist/Checklist.class.php
@@ -330,7 +330,7 @@
$sSelectColor = '';
if (isset($args['type']) && $args['type'] == 'list' ) {
$sOut[] = "getNewCheckboxId()."' ";
+   $sOut[] = "id='bs-cb-".$this->getNewCheckboxId()."' ";
$sOut[] = "onchange='BsChecklist.change(this);' ";
$sOut[] = ">";
 
@@ -359,7 +359,7 @@
$sOut[] = "";
} else {
$sOut[] = "getNewCheckboxId()."' ";
+   $sOut[] = "id='bs-cb-".$this->getNewCheckboxId()."' ";
$sOut[] = "onclick='BsChecklist.click(this);' ";
if (isset ($args['value'] ) && $args['value'] == 
'checked') {
$sOut[] = "checked='checked' ";
diff --git a/Checklist/resources/bluespice.checklist.js 
b/Checklist/resources/bluespice.checklist.js
index 7bd7ee2..bfe2b19 100644
--- a/Checklist/resources/bluespice.checklist.js
+++ b/Checklist/resources/bluespice.checklist.js
@@ -2,9 +2,8 @@
  * Js for ArticleInfo extension
  *
  * @author Patric Wirth 
-
  * @packageBluespice_Extensions
- * @subpackage ArticleInfo
+ * @subpackage Checklist
  * @copyright  Copyright (C) 2011 Hallo Welt! - Medienwerkstatt GmbH, All 
rights reserved.
  * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
  * @filesource
@@ -113,8 +112,8 @@
innerText += '';
}
@@ -158,9 +157,9 @@
BsChecklist.makeSelectbox(listname, value));
return node;
}
-}
+};
 
-$(document).ready(function() {
+mw.loader.using( 'ext.bluespice', function() {
BsChecklist.init();
 });
 
@@ -237,8 +236,6 @@
 $(document).on('BsVisualEditorActionsInit', function(event, plugin, buttons, 
commands, menus) {
var t = plugin;
var ed = t.getEditor();
-
-
 
menus.push({
menuId: 'bsChecklist',

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ia1e22dc6c556a0d63e432d28a8bfe26a984ac5c4
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added caching for blog tags - change (mediawiki...BlueSpiceExtensions)

2014-11-05 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Added caching for blog tags
..

Added caching for blog tags

Blog tags are cached per page now. They are invalidated when a page
in the blog namespace is saved.

Change-Id: Ide9ce843c6509f8276bc33e7b0e5ab5a84084ac7
---
M Blog/Blog.class.php
1 file changed, 49 insertions(+), 0 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/59/171259/1

diff --git a/Blog/Blog.class.php b/Blog/Blog.class.php
index 9a2a2ce..c9f2279 100644
--- a/Blog/Blog.class.php
+++ b/Blog/Blog.class.php
@@ -78,6 +78,7 @@
$this->setHook( 'BSRSSFeederGetRegisteredFeeds' );
$this->setHook( 'BeforePageDisplay' );
$this->setHook( 'BSTopMenuBarCustomizerRegisterNavigationSites' 
);
+   $this->setHook( 'PageContentSaveComplete' );
 
// Trackback is not fully functional in MW and thus disabled.
BsConfig::registerVar( 'MW::Blog::ShowTrackback', false, 
BsConfig::LEVEL_PRIVATE|BsConfig::TYPE_BOOL );
@@ -183,6 +184,32 @@
break;
}
return $aPrefs;
+   }
+
+   /**
+* Invalidates blog caches
+* @param Article $article
+* @param User $user
+* @param Content $content
+* @param type $summary
+* @param type $isMinor
+* @param type $isWatch
+* @param type $section
+* @param type $flags
+* @param Revision $revision
+* @param Status $status
+* @param type $baseRevId
+* @return boolean
+*/
+   public function onPageContentSaveComplete( $article, $user, $content, 
$summary,
+   $isMinor, $isWatch, $section, $flags, $revision, 
$status, $baseRevId ) {
+   if ( $article->getTitle()->getNamespace() !== NS_BLOG ) return 
true;
+
+   $sTagsKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'Blog', 
'Tags' );
+   $aTagsData = BsCacheHelper::get( $sTagsKey );
+   BsCacheHelper::invalidateCache( $aTagsData );
+
+   return true;
}
 
public function onBSNamespaceManagerBeforeSetUsernamespaces( 
$classInstance, &$bsSystemNamespaces ) {
@@ -303,6 +330,12 @@
$oTitle = $this->getTitle();
}
 
+   $sKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'Blog', 
$oTitle->getArticleID() );
+   $aData = BsCacheHelper::get( $sKey );
+
+   if ( $aData !== false ) {
+   return $aData;
+   }
// initialize local variables
$sOut = '';
$oErrorListView = new ViewTagErrorList( $this );
@@ -570,8 +603,24 @@
$oBlogView->setOption( 'parentpage', 'Blog/' );
}
 
+   $aKey = array( $sKey );
+   $sTagsKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'Blog', 
'Tags' );
+   $aTagsData = BsCacheHelper::get( $sTagsKey );
+
+   if ( $aTagsData !== null ) {
+   if ( !in_array( $sKey, $aTagsData ) ) {
+   $aTagsData = array_merge( $aTagsData, $aKey );
+   }
+   } else {
+   $aTagsData = $aKey;
+   }
+
+   BsCacheHelper::set( $sTagsKey, $aTagsData, 86400 ); // one day
+
// actually create blog output
$sOut = $oBlogView->execute();
+   BsCacheHelper::set( $sKey, $sOut, 86400 ); // one day
+
return $sOut;
}
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ide9ce843c6509f8276bc33e7b0e5ab5a84084ac7
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Blog: Thumb float direction - change (mediawiki...BlueSpiceExtensions)

2014-11-05 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Blog: Thumb float direction
..


Blog: Thumb float direction

* Added option Tumb float direction to admin settings an blog tag

Change-Id: I90fe09dae10a3920385320847b5ecf2ef83814c5
---
M Blog/Blog.class.php
M Blog/i18n/de.json
M Blog/i18n/en.json
M Blog/i18n/qqq.json
4 files changed, 23 insertions(+), 1 deletion(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/Blog/Blog.class.php b/Blog/Blog.class.php
index 9a2a2ce..3c22613 100644
--- a/Blog/Blog.class.php
+++ b/Blog/Blog.class.php
@@ -103,6 +103,9 @@
BsConfig::registerVar( 'MW::Blog::MaxEntryCharacters', 1000, 
BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_INT, 'bs-blog-pref-maxentrycharacters', 
'int' );
// Defines how images should be rendered. Possible values: 
full|thumb|none
BsConfig::registerVar( 'MW::Blog::ImageRenderMode', 'thumb', 
BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_STRING|BsConfig::USE_PLUGIN_FOR_PREFS, 
'bs-blog-pref-imagerendermode', 'select' );
+   // Defines float direction of images when ImageRenderMode is 
thumb. Possible values: left|right|none
+   BsConfig::registerVar( 'MW::Blog::ThumbFloatDirection', 
'right', 
BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_STRING|BsConfig::USE_PLUGIN_FOR_PREFS, 
'bs-blog-pref-imagefloatdirection', 'select' );
+
BsConfig::registerVar( 'MW::Blog::ShowTagFormWhenNotLoggedIn', 
false, BsConfig::LEVEL_PRIVATE|BsConfig::TYPE_BOOL, 'toggle' );
 
wfProfileOut( 'BS::'.__METHOD__ );
@@ -161,6 +164,15 @@
'options' => array(
'thumb' => 'thumb',
'full' => 'full',
+   'none' => 'none'
+   )
+   );
+   break;
+   case 'ThumbFloatDirection':
+   $aPrefs = array(
+   'options' => array(
+   'left' => 'left',
+   'right' => 'right',
'none' => 'none'
)
);
@@ -320,6 +332,7 @@
$bShowNewEntryField = BsConfig::get( 
'MW::Blog::ShowNewEntryField' );
$bNewEntryFieldPosition = BsConfig::get( 
'MW::Blog::NewEntryFieldPosition' );
$sImageRenderMode   = BsConfig::get( 
'MW::Blog::ImageRenderMode' );
+   $sImageFloatDirection   = BsConfig::get( 
'MW::Blog::ThumbFloatDirection' );
$iMaxEntryCharacters= BsConfig::get( 
'MW::Blog::MaxEntryCharacters' );
 
// Trackbacks are not supported the way we intend it to be. 
From http://www.mediawiki.org/wiki/Manual:$wgUseTrackbacks
@@ -334,6 +347,7 @@
$argsBNewEntryField  = BsCore::sanitizeArrayEntry( 
$args, 'newentryfield', $bShowNewEntryField, BsPARAMTYPE::BOOL );
$argsSNewEntryFieldPosition  = BsCore::sanitizeArrayEntry( 
$args, 'newentryfieldposition', $bNewEntryFieldPosition, BsPARAMTYPE::STRING );
$argsSImageRenderMode= BsCore::sanitizeArrayEntry( 
$args, 'imagerendermode',   $sImageRenderMode,   BsPARAMTYPE::STRING );
+   $argsSImageFloatDirection= BsCore::sanitizeArrayEntry( 
$args, 'imagefloatdirection',   $sImageFloatDirection,   BsPARAMTYPE::STRING );
$argsIMaxEntryCharacters = BsCore::sanitizeArrayEntry( 
$args, 'maxchars',  $iMaxEntryCharacters,BsPARAMTYPE::INT );
$argsSSortBy = BsCore::sanitizeArrayEntry( 
$args, 'sort',$sSortBy,  BsPARAMTYPE::STRING );
$argsBShowInfo   = BsCore::sanitizeArrayEntry( 
$args, 'showinfo',$bShowInfo,BsPARAMTYPE::BOOL );
@@ -359,6 +373,11 @@
}
 
$oValidationResult = BsValidator::isValid( 'SetItem', 
$argsSImageRenderMode, array( 'fullResponse' => true, 'setname' => 
'imagerendermode', 'set' => array( 'full', 'thumb', 'none' ) ) );
+   if ( $oValidationResult->getErrorCode() ) {
+   $oErrorListView->addItem( new ViewTagError( 
$oValidationResult->getI18N() ) );
+   }
+
+   $oValidationResult = BsValidator::isValid( 'SetItem', 
$argsSImageFloatDirection, array( 'fullResponse' => true, 'setname' => 
'imagefloatdirection', 'set' => array( 'left', 'right', 'none' ) ) );
if ( $oValidationResult->getErrorCode() ) {
$oErrorListView->addItem( new ViewTagError( 
$oValidationResult->getI18N() ) );

[MediaWiki-commits] [Gerrit] TopMenuBarCustomizer: Added cache / small fix - change (mediawiki...BlueSpiceExtensions)

2014-11-05 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: TopMenuBarCustomizer: Added cache / small fix
..


TopMenuBarCustomizer: Added cache / small fix

* Used BsCacheHelper to add cache mechanism
* Fixed preload text
* Fixed typos
* Used max cache time

Change-Id: Ica8ba38f4720f368c52cac4546cdc085d8439085
---
M TopMenuBarCustomizer/TopMenuBarCustomizer.class.php
1 file changed, 33 insertions(+), 3 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php 
b/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php
index a31be4c..3097316 100644
--- a/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php
+++ b/TopMenuBarCustomizer/TopMenuBarCustomizer.class.php
@@ -88,18 +88,30 @@
$this->setHook( 'BeforePageDisplay' );
$this->setHook( 'EditFormPreloadText' );
 
+   $this->setHook( 'PageContentSaveComplete', 
'invalidateCacheOnArticleChange' );
+   $this->setHook( 'ArticleDeleteComplete', 
'invalidateCacheOnArticleChange' );
+   $this->setHook( 'TitleMoveComplete', 
'invalidateCacheOnTitleChange' );
+

BsConfig::registerVar('MW::TopMenuBarCustomizer::NuberOfLevels', 2, 
BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_INT, 
'bs-topmenubarcustomizer-pref-numberoflevels' );

BsConfig::registerVar('MW::TopMenuBarCustomizer::NumberOfMainEntries', 10, 
BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_INT, 
'bs-topmenubarcustomizer-pref-numberofmainentries', 'int' );

BsConfig::registerVar('MW::TopMenuBarCustomizer::NumberOfSubEntries', 25, 
BsConfig::LEVEL_PUBLIC|BsConfig::TYPE_INT, 
'bs-topmenubarcustomizer-pref-numberofsubentries', 'int' );
}
 
/**
-* Getter for the $aNavigationSites array - either from hook or 
TopBarMenu title
+* Getter for the $aNavigationSites array - either from hook, 
TopBarMenu title or cache
 * @global string $wgSitename
 * @return array
 */
public static function getNavigationSites() {
if( !is_null(self::$aNavigationSites) ) return 
self::$aNavigationSites;
+
+   $sKey = BsExtensionManager::getExtension('TopMenuBarCustomizer')
+   ->getCacheKey( 'NavigationSitesData' );
+
+   self::$aNavigationSites = BsCacheHelper::get( $sKey );
+   if( self::$aNavigationSites !== false ) {
+   return self::$aNavigationSites;
+   }
self::$aNavigationSites = array();
 
$oTopBarMenuTitle = Title::makeTitle( NS_MEDIAWIKI, 
'TopBarMenu' );
@@ -108,10 +120,11 @@
$sContent = BsPageContentProvider::getInstance()
->getContentFromTitle( $oTopBarMenuTitle );
 
-   // force unset Applications by create an empty page
+   // Force unset of all menu items by creating an empty 
page
if( !empty($sContent) ) {
self::$aNavigationSites = 
TopMenuBarCustomizerParser::getNavigationSites();
}
+   BsCacheHelper::set( $sKey , self::$aNavigationSites, 
60*1440 );//max cache time 24h
return self::$aNavigationSites;
}
 
@@ -132,6 +145,7 @@
 
wfRunHooks('BSTopMenuBarCustomizerRegisterNavigationSites', 
array( &self::$aNavigationSites ));
 
+   BsCacheHelper::set( $sKey , self::$aNavigationSites, 60*1440 
);//max cache time 24h
return self::$aNavigationSites;
}
 
@@ -141,7 +155,7 @@
 * @param Title $oTitle
 * @return boolean - always true
 */
-   public function onEditFormPreloadText($sText, $oTitle) {
+   public function onEditFormPreloadText( &$sText, $oTitle ) {
$oTopBarMenuTitle = Title::makeTitle( NS_MEDIAWIKI, 
'TopBarMenu' );
if( !$oTopBarMenuTitle || !$oTitle->equals($oTopBarMenuTitle) ) 
return true;
 
@@ -212,4 +226,20 @@
 
return true;
}
+
+   public function invalidateCacheOnArticleChange( $oArticle ) {
+   return $this->invalidateCacheOnTitleChange( 
$oArticle->getTitle() );
+   }
+
+   public function invalidateCacheOnTitleChange( $oTitle ) {
+   if( !$oTitle->equals(Title::makeTitle(NS_MEDIAWIKI, 
'TopBarMenu')) ) return true;
+   $this->invalidateCache();
+   return true;
+   }
+
+   public function invalidateCache() {
+   BsCacheHelper::invalidateCache(
+   $this->getCacheKey( 'NavigationSitesData' )
+   );
+   }
 }
\ No newline at end of file

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

Gerrit-Me

[MediaWiki-commits] [Gerrit] Fixed issue that a link without a label has one after roundtrip - change (mediawiki...BlueSpiceExtensions)

2014-11-04 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Fixed issue that a link without a label has one after roundtrip
..

Fixed issue that a link without a label has one after roundtrip

If a MediaWiki link without a label has non ASCII chars, it will be
modified in roundtrip. The problem is that two different encoded values are
compared. The first is the innerHTML of the the anchor (HTML entites) and
the second is from the "data-bs-wikitext" attribute (URL encoded). So
I switched from innerHTML to the "title" attribute.

Before roundtrip:

* [[Übersicht|]]

After roundtrip:

* [[Übersicht|Übersicht]]

 * Switched from decodeURI to decodeURIComponent

Change-Id: Id3096ebebd7343d28bd064c10d06b69c18b8b660
---
M VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/39/170939/1

diff --git a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js 
b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
index 083de05..1a80284 100644
--- a/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
+++ b/VisualEditor/resources/tiny_mce_plugins/bswikicode/plugin.js
@@ -613,25 +613,26 @@
continue;
}
if (hrefAttr) {
-   target = decodeURI( hrefAttr[1] );
+   target = decodeURIComponent( 
hrefAttr[1] );
// 03.03.2014 STM ??? target = target; 
//unescape(target);
}
// @todo  br-tags bereits in insertLink 
abfangen oder hier einfügen
-   inner = link.match(/>(.*?)<\/a>/i);
+   inner = link.match(/title="(.*?)"/i);
if (inner) {
label = inner[1];
label = label.replace(//gi, 
'');
+   label = decodeURIComponent( label );
}
 
//TODO: Maybe we should relay on classes 
instead?
typeAttr = link.match(/data-bs-type="(.*?)"/i);
if (typeAttr) {
-   type = decodeURI( typeAttr[1] );
+   type = decodeURIComponent( typeAttr[1] 
);
}
 
wikitext = 
link.match(/data-bs-wikitext="(.*?)"/i);
if (wikitext) {
-   wikitext = decodeURI( wikitext[1] );
+   wikitext = decodeURIComponent( 
wikitext[1] );
}
 
if (wikitext) {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3096ebebd7343d28bd064c10d06b69c18b8b660
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added missing PLURAL distinction in message - change (mediawiki...BlueSpiceExtensions)

2014-11-04 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Added missing PLURAL distinction in message
..

Added missing PLURAL distinction in message

There is no need for a code change because the number of elements for
PLURAL distinction is already passed.

 * Corrected and improved message documentation

Change-Id: Ic96759b22e6272800daf1d00ac6cdaac7c149130
---
M PageTemplates/i18n/de-formal.json
M PageTemplates/i18n/de.json
M PageTemplates/i18n/en.json
M PageTemplates/i18n/qqq.json
4 files changed, 5 insertions(+), 5 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/26/170926/1

diff --git a/PageTemplates/i18n/de-formal.json 
b/PageTemplates/i18n/de-formal.json
index c3d9329..e307bd6 100644
--- a/PageTemplates/i18n/de-formal.json
+++ b/PageTemplates/i18n/de-formal.json
@@ -13,6 +13,6 @@
"bs-pagetemplates-tpl-name-empty": "Bitte geben Sie eine Vorlage an.",
"bs-pagetemplates-no-id": "Bitte geben Sie eine Seite an, die als 
Vorlage verwendet werden soll.",
"bs-pagetemplates-choose-template": "Diese Seite existiert noch nicht. 
Sie können hier eine neue Seite verfassen. Falls Sie nichts eingeben möchten, 
klicken auf den Zurück-Button des Browsers, um zu der letzten Seite 
zurückzukehren.\n\nSie können {{PLURAL:$1|diese Vorlage|eine dieser Vorlagen}} 
auswählen:",
-   "bs-pagetemplates-confirm-deletetpl": "Sind Sie sicher, dass Sie diese 
Vorlage löschen wollen?",
+   "bs-pagetemplates-confirm-deletetpl": "Sind Sie sicher, dass Sie diese 
{{PLURAL:$1|Vorlage|Vorlagen}} löschen wollen?",
"bs-pagetemplates-remove-message-unknown": "Ein unbekannter Fehler ist 
aufgetreten. Bitte versuchen Sie es erneut."
 }
diff --git a/PageTemplates/i18n/de.json b/PageTemplates/i18n/de.json
index b310c16..dc3ff1a 100644
--- a/PageTemplates/i18n/de.json
+++ b/PageTemplates/i18n/de.json
@@ -38,7 +38,7 @@
"bs-pagetemplates-label-targetns": "Namensraum",
"bs-pagetemplates-label-tplns": "Vorlagen Namensraum",
"bs-pagetemplates-label-article": "Vorlage",
-   "bs-pagetemplates-confirm-deletetpl": "Bist du sicher, dass du diese 
Vorlage löschen willst?",
+   "bs-pagetemplates-confirm-deletetpl": "Bist du sicher, dass du diese 
{{PLURAL:$1|Vorlage|Vorlagen}} löschen willst?",
"bs-pagetemplates-remove-message-unknown": "Ein unbekannter Fehler ist 
aufgetreten. Bitte versuche es erneut.",
"bs-pagetemplates-remove-message-success": "Folgende 
{{PLURAL:$1|Vorlage wurde|Vorlagen wurden}} gelöscht:$2",
"bs-pagetemplates-remove-message-failure": "Folgende 
{{PLURAL:$1|Vorlage konnte|Vorlagen konnten}} nicht gelöscht werden:$2(Grund: 
$3)"
diff --git a/PageTemplates/i18n/en.json b/PageTemplates/i18n/en.json
index 00cdfa4..95ce0ee 100644
--- a/PageTemplates/i18n/en.json
+++ b/PageTemplates/i18n/en.json
@@ -36,7 +36,7 @@
"bs-pagetemplates-label-targetns": "Namespace",
"bs-pagetemplates-label-tplns": "Template namespace",
"bs-pagetemplates-label-article": "Template",
-   "bs-pagetemplates-confirm-deletetpl": "Are you sure you want to delete 
this template?",
+   "bs-pagetemplates-confirm-deletetpl": "Are you sure you want to delete 
{{PLURAL:$1|this template|these templates}}?",
"bs-pagetemplates-remove-message-unknown": "An unexpected error 
occurred, please try again.",
"bs-pagetemplates-remove-message-success": "The following 
{{PLURAL:$1|template was|templates were}} deleted: $2",
"bs-pagetemplates-remove-message-failure": "The following 
{{PLURAL:$1|template|templates}} could not be deleted: $2 (Reason: $3)"
diff --git a/PageTemplates/i18n/qqq.json b/PageTemplates/i18n/qqq.json
index 55b0f81..54bcc58 100644
--- a/PageTemplates/i18n/qqq.json
+++ b/PageTemplates/i18n/qqq.json
@@ -34,14 +34,14 @@
"bs-pagetemplates-headerlabel": "Label for label\n{{Identical|Label}}",
"bs-pagetemplates-headertargetnamespace": "Label for 
namespace\n{{Identical|Namespace}}",
"bs-pagetemplates-tipeditdetails": "Text for edit 
template\n{{Identical|Edit template}}",
-   "bs-pagetemplates-tipdeletetemplate": "Used as label for the button. 
Parameters:\n* $1 - the number of templates use for PLURAL distinction\nSee 
also:\n* {{msg-mw|Bs-pagetemplates-confirm-deletetpl}}",
+   "bs-pagetemplates-tipdeletetemplate": "Used as title of the 
confirmation window. Parameters:\n* $1 - the number of templates which will be 
deleted - use for PLURAL distinction\nSee also:\n* 
{{msg-mw|Bs-pagetemplates-confirm-deletetpl}}",
"bs-pagetemplates-tipaddtemplate": "Used as window 
title.\n{{Identical|Add template}}",
"bs-pagetemplates-label-tpl": "Label for template 
name.\n{{Identical|Template name}}",
"bs-pagetemplates-label-desc": "Label for 
description.\n{{Identical|Description}}",
"bs-page

[MediaWiki-commits] [Gerrit] small css fix, right action buttons now on one line - change (mediawiki...BlueSpiceSkin)

2014-11-04 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: small css fix, right action buttons now on one line
..


small css fix, right action buttons now on one line

Change-Id: Ic18fa6beb7db337f17f09d87aaa6e744e45725b9
---
M resources/components/skin.contentActions.less
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/resources/components/skin.contentActions.less 
b/resources/components/skin.contentActions.less
index 03578c5..0bd 100644
--- a/resources/components/skin.contentActions.less
+++ b/resources/components/skin.contentActions.less
@@ -30,6 +30,9 @@
a.icon-arrow-down9-after.open{
color: @bs-color-dark-blue;
}
+   > a{
+   padding-top: 7px;
+   }
}
.menu {
display:none;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ic18fa6beb7db337f17f09d87aaa6e744e45725b9
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/skins/BlueSpiceSkin
Gerrit-Branch: master
Gerrit-Owner: Tweichart 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added support for opensearch - change (mediawiki...BlueSpiceExtensions)

2014-10-30 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added support for opensearch
..


Added support for opensearch

When ExtendedSearch is enabled, the default opensearch urls are overwriten
that the request triggers ExtendedSearch and not MediaWiki standard
search.

 * Fixed typo

Change-Id: I3274d894f1bd5f37a2e08a012b12fccb6408b857
---
M ExtendedSearch/ExtendedSearch.class.php
M ExtendedSearch/ExtendedSearch.setup.php
2 files changed, 19 insertions(+), 1 deletion(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/ExtendedSearch/ExtendedSearch.class.php 
b/ExtendedSearch/ExtendedSearch.class.php
index d013037..351117c 100644
--- a/ExtendedSearch/ExtendedSearch.class.php
+++ b/ExtendedSearch/ExtendedSearch.class.php
@@ -144,6 +144,23 @@
}
 
/**
+* Hook-Handler for Hook 'OpenSearchUrls'
+* @param array §$aUrls array of urls for opensearch
+* @return boolean Always true
+*/
+   public static function onOpenSearchUrls( &$aUrls ) {
+   $oSearch = SpecialPage::getTitleFor( 'ExtendedSearch' );
+   $aUrls = array(
+   array(
+   'type' => 'text/html',
+   'method' => 'get',
+   'template' => $oSearch->getCanonicalURL( 
'q={searchTerms}' )
+   )
+   );
+   return true;
+   }
+
+   /**
 * Hook-Handler for Hook 'LoadExtensionSchemaUpdates'
 * @param object §updater Updater
 * @return boolean Always true
diff --git a/ExtendedSearch/ExtendedSearch.setup.php 
b/ExtendedSearch/ExtendedSearch.setup.php
index 17e3575..31a9c59 100644
--- a/ExtendedSearch/ExtendedSearch.setup.php
+++ b/ExtendedSearch/ExtendedSearch.setup.php
@@ -95,4 +95,5 @@
 $wgExtensionMessagesFiles['ExtendedSearchAlias'] = __DIR__ . 
'/languages/SpecialExtendedSearch.alias.php';
 $wgSpecialPages['SpecialExtendedSearch'] = 'SpecialExtendedSearch';
 
-$wgHooks['LoadExtensionSchemaUpdates'][] = 'ExtendedSearch::getSchemaUpdates';
\ No newline at end of file
+$wgHooks['LoadExtensionSchemaUpdates'][] = 'ExtendedSearch::getSchemaUpdates';
+$GLOBALS['wgHooks']['OpenSearchUrls'][] = 'ExtendedSearch::onOpenSearchUrls';
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3274d894f1bd5f37a2e08a012b12fccb6408b857
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Renamed autocomplete file - change (mediawiki...BlueSpiceExtensions)

2014-10-30 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Renamed autocomplete file
..


Renamed autocomplete file

Autocomplete is not a widget so remove this part from the filename. Also removed
unnecessary closure because in mw.loader it is already in a closure.

Change-Id: Id7711d6ec24d677201356cffbfb1563c93a239b3
---
M ExtendedSearch/ExtendedSearch.setup.php
A ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js
D ExtendedSearch/resources/bluespice.extendedSearch.autocompleteWidget.js
3 files changed, 73 insertions(+), 75 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/ExtendedSearch/ExtendedSearch.setup.php 
b/ExtendedSearch/ExtendedSearch.setup.php
index 17e3575..0832cc5 100644
--- a/ExtendedSearch/ExtendedSearch.setup.php
+++ b/ExtendedSearch/ExtendedSearch.setup.php
@@ -20,7 +20,7 @@
 ) + $aResourceModuleTemplate;
 
 $wgResourceModules['ext.bluespice.extendedsearch.autocomplete'] = array(
-   'scripts' => 'bluespice.extendedSearch.autocompleteWidget.js',
+   'scripts' => 'bluespice.extendedSearch.autocomplete.js',
'dependencies' => array(
'jquery.ui.autocomplete'
),
diff --git a/ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js 
b/ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js
new file mode 100644
index 000..d07f200
--- /dev/null
+++ b/ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js
@@ -0,0 +1,72 @@
+/**
+ * ExtendedSearch extension
+ *
+ * Part of BlueSpice for MediaWiki
+ *
+ * @author Stephan Muggli 
+ * @packageBluespice_Extensions
+ * @subpackage ExtendedSearch
+ * @copyright  Copyright (C) 2012 Hallo Welt! - Medienwerkstatt GmbH, All 
rights reserved.
+ * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
+ * @filesource
+ */
+mw.loader.using( 'jquery.ui.autocomplete', function() {
+   var cache = [];
+   var lastXhr = {};
+
+   if ( $( "#bs-extendedsearch-input, .bs-autocomplete-field" ).length < 1 
)
+   return;
+
+   var container = $( "" );
+   $( "body" ).append( container );
+   $( "#bs-extendedsearch-input, .bs-autocomplete-field" ).autocomplete( {
+   appendTo: container,
+   position: {
+   my: "right top",
+   at: "right bottom"
+   },
+   source: function( req, setList ) {
+   if ( req.term in cache ) {
+   setList( cache[ req.term ] );
+   } else {
+   var url = bs.util.getAjaxDispatcherUrl(
+   
'ExtendedSearchBase::getAutocompleteData',
+   [ encodeURIComponent( req.term 
) ]
+   );
+   var lastXhr = $.ajax( {
+   url: url,
+   dataType: 'json',
+   success: function( response, 
textStatus, xhr ) {
+   if ( response == null || 
response.length == '0' ) {
+   $( '.ui-autocomplete' 
).css( 'display', 'none' );
+   } else {
+   if ( xhr === lastXhr ) {
+   setList( 
response );
+   }
+   cache[ req.term ] = 
response;
+   }
+   },
+   failure: function() {
+   }
+   } );
+   }
+   },
+   focus: function( event, ui ) {
+   $( '.ui-corner-all' ).unbind( 'mouseleave' );
+   },
+   select: function( event, ui ) {
+   var status = { skipFurtherProcessing: false };
+   $( document ).trigger( 
'BSExtendedSearchAutocompleteItemSelect', [ event, ui, status ] );
+   if ( status.skipFurtherProcessing )
+   return;
+   document.location.href = "" + ui.item.link;
+   }
+   } );
+
+   $.ui.autocomplete.prototype._renderItem = function( ul, item ) {
+   return $( "" )
+   .data( "item.autocomplete", item )
+   .append( "" + item.label + "" )
+   .appendTo( ul );
+   };
+} );
diff --git 
a/ExtendedSearch/resources/blue

[MediaWiki-commits] [Gerrit] Added boost query for namespace evaluation - change (mediawiki...BlueSpiceExtensions)

2014-10-30 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added boost query for namespace evaluation
..


Added boost query for namespace evaluation

Switched from Lucene query parser to ExtendedDisMax query parser. The 
ExtendedDisMax has a lot of new search functionality like boost queries and 
supports the full Lucene query parser syntax, so that non of our functionality 
will break.

From now on we can improve, for example, the evaluation of namespace, to 
provide individual scoring.

 * Improved logging in case of a bad request
 * Readded quotations to prevent query breaking
 * Removed whitespace

Change-Id: I9f7a8fd300d30372f3987af44e1904f238f3a978
---
M ExtendedSearch/includes/SearchIndex/SearchIndex.class.php
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
M ExtendedSearch/includes/SolrPhpClient/Response.php
M ExtendedSearch/includes/SolrPhpClient/Service.php
4 files changed, 61 insertions(+), 55 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php
index 771da7d..6d1aa71 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php
@@ -115,8 +115,7 @@
$query['searchOptions']
);
} catch ( Exception $e ) {
-   // bs-extendedsearch-invalid-query
-   if ( $e->getMessage() == '"0" Status: Communication 
Error' ) {
+   if ( stripos( $e->getMessage(), 'Communication Error' ) 
!== false ) {
$sUrl = SpecialPage::getTitleFor( 'Search' 
)->getFullURL();
 
$sParams = 'search='.urlencode( 
$this->oSearchOptions->getOption( 'searchStringRaw' ) );
@@ -129,6 +128,7 @@
return $this->oContext->getOutput()->redirect( 
$sUrl, '404' );
}
 
+   wfDebugLog( 'ExtendedSearch', $e->getMessage() );
return $this->createErrorMessageView( 
'bs-extendedsearch-invalid-query' );
}
 
diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index 2d7ba23..1476f41 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -290,15 +290,21 @@
 * Processes incoming search request
 */
public function readInSearchRequest() {
-   global $wgCanonicalNamespaceNames, $wgExtraNamespaces;
+   global $wgCanonicalNamespaceNames, $wgExtraNamespaces, 
$wgContentNamespaces;
$this->aOptions['searchStringRaw'] = 
$this->oSearchRequest->sInput;
$this->aOptions['searchStringOrig'] = 
ExtendedSearchBase::preprocessSearchInput( $this->oSearchRequest->sInput );
 
self::$searchStringRaw = $this->aOptions['searchStringRaw'];
 
$sCustomerId = $this->getCustomerId();
-
+   $sLogOp = ' OR ';
$aFq = array();
+   $aBq = array();
+
+   $scope = ( BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) 
== 'title' )
+   ? 'title'
+   : 'text';
+   $this->aOptions['scope'] = $scope;
 
$vNamespace = $this->checkSearchstringForNamespace(
$this->aOptions['searchStringRaw'],
@@ -309,12 +315,6 @@
 
$this->aOptions['searchStringWildcarded'] = 
SearchService::wildcardSearchstring( $this->aOptions['searchStringOrig'] );
$this->aOptions['searchStringForStatistics'] = 
$this->aOptions['searchStringWildcarded'];
-   $this->aOptions['bExtendedForm'] = 
$this->oSearchRequest->bExtendedForm;
-
-   $scope = ( BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) 
== 'title' )
-   ? 'title'
-   : 'text';
-   $this->aOptions['scope'] = $scope;
 
$aSearchTitle = array(
'title:(' . $this->aOptions['searchStringOrig'] . ')^2',
@@ -328,20 +328,20 @@
'sections:(' . $this->aOptions['searchStringOrig'] . ')'
);
 
-   $sSearchStringTitle = implode( ' OR ', $aSearchTitle );
-   $sSearchStringText = implode( ' OR ', $aSearchText );
+   $sSearchStringTitle = implode( $sLogOp, $aSearchTitle );
+   $sSearchStringText = implode( $sLogOp, $aSearchText );
 
$this->aOptions['searchStringFinal'] = ( 
$this->aOptions['scope'] === 'title' )
? $sSearchStringTitle
-   : $sSearchStringTitl

[MediaWiki-commits] [Gerrit] BsValidator: Fixed warning - change (mediawiki...BlueSpiceFoundation)

2014-10-30 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: BsValidator: Fixed warning
..


BsValidator: Fixed warning

* removed 3rd parameter from implode function

Change-Id: Icc1f62ea5d344699b831a247f2d2caeeab5e7397
---
M includes/validator/Validator.class.php
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/includes/validator/Validator.class.php 
b/includes/validator/Validator.class.php
index 247f785..6cf61cd 100644
--- a/includes/validator/Validator.class.php
+++ b/includes/validator/Validator.class.php
@@ -304,9 +304,8 @@
 class BsValidatorSetItemPlugin implements BsValidatorPlugin {
 
public static function isValid( $validateThis, $options ) {
-   $iCount = count( $options['set'] );
return ( !in_array( $validateThis , $options['set'] ) )
-   ? new BsValidatorResponse( 1, 'Validator', 
'bs-validator-set-validation-not-approved', array( $options['setname'], 
implode( ',', $options['set'], $iCount ) ) )
+   ? new BsValidatorResponse( 1, 'Validator', 
'bs-validator-set-validation-not-approved', array( $options['setname'], 
implode( ',', $options['set'] ) ) )
: new BsValidatorResponse( 0, 'Validator', 
'bs-validator-set-validation-approved', array( $options['setname']) );
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc1f62ea5d344699b831a247f2d2caeeab5e7397
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fixed MaximizablePanel in Chrome - change (mediawiki...BlueSpiceExtensions)

2014-10-30 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Fixed MaximizablePanel in Chrome
..


Fixed MaximizablePanel in Chrome

In Chrome the contents of the Ext.Window derived panel where overlapped
after a 'maximize' command. One had to click on the hidden elements to
reveal them.

The panel no longer gets rendered to the element provided in the
'renderTo' config, but always to the body element. All size and position
operations are still made on 'renderTo'.

Also added logic to update absolute position on window resize

Change-Id: I566854f49f9a4bdeb5a61249c6c99f72f28ed43d
---
M PermissionManager/resources/BS.panel/Maximizable.js
M PermissionManager/resources/bluespice.permissionManager.css
2 files changed, 36 insertions(+), 11 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/PermissionManager/resources/BS.panel/Maximizable.js 
b/PermissionManager/resources/BS.panel/Maximizable.js
index 068246d..974d937 100644
--- a/PermissionManager/resources/BS.panel/Maximizable.js
+++ b/PermissionManager/resources/BS.panel/Maximizable.js
@@ -4,11 +4,23 @@
shadow: false,
closable: false,
border: false,
+
oldX: 0,
oldY: 0,
+   bsRenderToTarget: null,
+
+   constructor: function( cfg ) {
+   this.bsRenderToTarget = Ext.get(cfg.renderTo);
+
+   cfg.height = cfg.height || this.bsRenderToTarget.getHeight();
+   cfg.width = cfg.width || this.bsRenderToTarget.getWidth();
+
+   cfg.renderTo = Ext.getBody();
+
+   this.callParent( arguments );
+   },
+
initComponent: function() {
-   this.height = Ext.get(this.renderTo).getHeight();
-   this.width = Ext.get(this.renderTo).getWidth();
this.maximizeTool = new Ext.panel.Tool({
type: 'maximize'
});
@@ -26,26 +38,29 @@
];
 
this.on('afterrender', this.onAfterRender, this);
+   Ext.get(window).on('resize', this.onWindowResize, this);
 
this.callParent(arguments);
},
onAfterRender: function(sender, eOpts) {
-   this.showAt(sender.container.getXY());
+   this.showAt(this.bsRenderToTarget.getXY());
},
onMaximizeToolClick: function() {
-   Ext.get(this.renderTo).addCls('fullscreen');
+   $('html').addClass('bs-maximizable-panel-fullscreen');
+   this.bsRenderToTarget.addCls('fullscreen');
this.updateSize();
this.maximizeTool.setVisible(false);
this.minimizeTool.setVisible(true);
-   this.showAt(Ext.get(this.renderTo).getXY());
+   this.showAt(this.bsRenderToTarget.getXY());
+
},
onMinimizeToolClick: function() {
-   Ext.get(this.renderTo).removeCls('fullscreen');
-
+   $('html').removeClass('bs-maximizable-panel-fullscreen');
+   this.bsRenderToTarget.removeCls('fullscreen');
this.updateSize();
this.maximizeTool.setVisible(true);
this.minimizeTool.setVisible(false);
-   this.showAt(Ext.get(this.renderTo).getXY());
+   this.showAt(this.bsRenderToTarget.getXY());
},
firstCall: true,
showAt: function(x, y) {
@@ -57,7 +72,12 @@
this.callParent(arguments);
},
updateSize: function() {
-   this.setHeight(Ext.get(this.renderTo).getHeight());
-   this.setWidth(Ext.get(this.renderTo).getWidth());
+   this.setHeight(this.bsRenderToTarget.getHeight());
+   this.setWidth(this.bsRenderToTarget.getWidth());
+   },
+   onWindowResize: function( event, target, eOpts ) {
+   this.setX( this.bsRenderToTarget.getX() );
+   this.setY( this.bsRenderToTarget.getY() );
+   this.updateSize();
}
 });
\ No newline at end of file
diff --git a/PermissionManager/resources/bluespice.permissionManager.css 
b/PermissionManager/resources/bluespice.permissionManager.css
index ec85532..cc8e426 100644
--- a/PermissionManager/resources/bluespice.permissionManager.css
+++ b/PermissionManager/resources/bluespice.permissionManager.css
@@ -37,4 +37,9 @@
text-align: right;
font-weight: bold;
border-left-color: #fff;
-}
\ No newline at end of file
+}
+
+/* Part of BS.panel.Maximizable */
+html.bs-maximizable-panel-fullscreen {
+   overflow: hidden;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I566854f49f9a4bdeb5a61249c6c99f72f28ed43d
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: REL1_22
Gerrit-Owner: Robert Vogel 
Gerrit-Reviewe

[MediaWiki-commits] [Gerrit] Fixed MaximizablePanel in Chrome - change (mediawiki...BlueSpiceExtensions)

2014-10-30 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Fixed MaximizablePanel in Chrome
..


Fixed MaximizablePanel in Chrome

THIS IS A MANUAL MERGE FROM REL1_22
https://gerrit.wikimedia.org/r/#/c/169338/

In Chrome the contents of the Ext.Window derived panel where overlapped
after a 'maximize' command. One had to click on the hidden elements to
reveal them.

The panel no longer gets rendered to the element provided in the
'renderTo' config, but always to the body element. All size and position
operations are still made on 'renderTo'.

Also added logic to update absolute position on window resize

Change-Id: I3e7f46871051ed11bb8131498dce954148e46f18
---
M PermissionManager/resources/BS.panel/Maximizable.js
M PermissionManager/resources/bluespice.permissionManager.css
2 files changed, 36 insertions(+), 11 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/PermissionManager/resources/BS.panel/Maximizable.js 
b/PermissionManager/resources/BS.panel/Maximizable.js
index 068246d..974d937 100644
--- a/PermissionManager/resources/BS.panel/Maximizable.js
+++ b/PermissionManager/resources/BS.panel/Maximizable.js
@@ -4,11 +4,23 @@
shadow: false,
closable: false,
border: false,
+
oldX: 0,
oldY: 0,
+   bsRenderToTarget: null,
+
+   constructor: function( cfg ) {
+   this.bsRenderToTarget = Ext.get(cfg.renderTo);
+
+   cfg.height = cfg.height || this.bsRenderToTarget.getHeight();
+   cfg.width = cfg.width || this.bsRenderToTarget.getWidth();
+
+   cfg.renderTo = Ext.getBody();
+
+   this.callParent( arguments );
+   },
+
initComponent: function() {
-   this.height = Ext.get(this.renderTo).getHeight();
-   this.width = Ext.get(this.renderTo).getWidth();
this.maximizeTool = new Ext.panel.Tool({
type: 'maximize'
});
@@ -26,26 +38,29 @@
];
 
this.on('afterrender', this.onAfterRender, this);
+   Ext.get(window).on('resize', this.onWindowResize, this);
 
this.callParent(arguments);
},
onAfterRender: function(sender, eOpts) {
-   this.showAt(sender.container.getXY());
+   this.showAt(this.bsRenderToTarget.getXY());
},
onMaximizeToolClick: function() {
-   Ext.get(this.renderTo).addCls('fullscreen');
+   $('html').addClass('bs-maximizable-panel-fullscreen');
+   this.bsRenderToTarget.addCls('fullscreen');
this.updateSize();
this.maximizeTool.setVisible(false);
this.minimizeTool.setVisible(true);
-   this.showAt(Ext.get(this.renderTo).getXY());
+   this.showAt(this.bsRenderToTarget.getXY());
+
},
onMinimizeToolClick: function() {
-   Ext.get(this.renderTo).removeCls('fullscreen');
-
+   $('html').removeClass('bs-maximizable-panel-fullscreen');
+   this.bsRenderToTarget.removeCls('fullscreen');
this.updateSize();
this.maximizeTool.setVisible(true);
this.minimizeTool.setVisible(false);
-   this.showAt(Ext.get(this.renderTo).getXY());
+   this.showAt(this.bsRenderToTarget.getXY());
},
firstCall: true,
showAt: function(x, y) {
@@ -57,7 +72,12 @@
this.callParent(arguments);
},
updateSize: function() {
-   this.setHeight(Ext.get(this.renderTo).getHeight());
-   this.setWidth(Ext.get(this.renderTo).getWidth());
+   this.setHeight(this.bsRenderToTarget.getHeight());
+   this.setWidth(this.bsRenderToTarget.getWidth());
+   },
+   onWindowResize: function( event, target, eOpts ) {
+   this.setX( this.bsRenderToTarget.getX() );
+   this.setY( this.bsRenderToTarget.getY() );
+   this.updateSize();
}
 });
\ No newline at end of file
diff --git a/PermissionManager/resources/bluespice.permissionManager.css 
b/PermissionManager/resources/bluespice.permissionManager.css
index ec85532..cc8e426 100644
--- a/PermissionManager/resources/bluespice.permissionManager.css
+++ b/PermissionManager/resources/bluespice.permissionManager.css
@@ -37,4 +37,9 @@
text-align: right;
font-weight: bold;
border-left-color: #fff;
-}
\ No newline at end of file
+}
+
+/* Part of BS.panel.Maximizable */
+html.bs-maximizable-panel-fullscreen {
+   overflow: hidden;
+}

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I3e7f46871051ed11bb8131498dce954148e46f18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueS

[MediaWiki-commits] [Gerrit] Multi select list: Small css fix - change (mediawiki...BlueSpiceFoundation)

2014-10-30 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Multi select list: Small css fix
..


Multi select list: Small css fix

* cursor: pointer for .bs-multiselect-item

Change-Id: I2992efae44b7995e298d8a3e7e581fe668406dfd
---
M resources/bluespice/bluespice.html.formfields.sortable.css
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/resources/bluespice/bluespice.html.formfields.sortable.css 
b/resources/bluespice/bluespice.html.formfields.sortable.css
index ca6a0bf..8e25f58 100644
--- a/resources/bluespice/bluespice.html.formfields.sortable.css
+++ b/resources/bluespice/bluespice.html.formfields.sortable.css
@@ -7,4 +7,5 @@
padding: 2px 5px;
margin: 5px 0;
list-style-type: none;
+   cursor: pointer;
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2992efae44b7995e298d8a3e7e581fe668406dfd
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Improved Vector skin support - change (mediawiki...BlueSpiceExtensions)

2014-10-29 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Improved Vector skin support
..

Improved Vector skin support

Don't use wgDefaultSkin to verfiy which skin is active

 * Fixed issue with untransformed message when vector skin is used

Change-Id: I77497b68a6f4aef5dfb5186c10a96971984e04dc
---
M Authors/Authors.class.php
M Readers/Readers.class.php
M ShoutBox/ShoutBox.class.php
M StateBar/StateBar.class.php
M UserSidebar/UserSidebar.class.php
M WidgetBar/WidgetBar.class.php
M WikiAdmin/WikiAdmin.class.php
7 files changed, 37 insertions(+), 51 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/90/169790/1

diff --git a/Authors/Authors.class.php b/Authors/Authors.class.php
index 39cb109..c04f10e 100644
--- a/Authors/Authors.class.php
+++ b/Authors/Authors.class.php
@@ -164,8 +164,7 @@
return true;
}
 
-   global $wgDefaultSkin;
-   if ( $wgDefaultSkin != "bluespiceskin" ) {
+   if ( !( $sktemplate instanceof SkinBlueSpiceSkin ) ) {
return true;
}
 
@@ -181,7 +180,6 @@
 
/**
 * Hook-Handler for 'SkinAfterContent'. Adds Authors view to the end of 
the content.
-* @global String $wgDefaultSkin
 * @param String $data
 * @param Skin $sktemplate
 * @return boolean
@@ -191,8 +189,7 @@
return true;
}
 
-   global $wgDefaultSkin;
-   if ( $wgDefaultSkin == "bluespiceskin" ) {
+   if ( $sktemplate instanceof SkinBlueSpiceSkin ) {
return true;
}
 
diff --git a/Readers/Readers.class.php b/Readers/Readers.class.php
index f60c848..eef7f06 100644
--- a/Readers/Readers.class.php
+++ b/Readers/Readers.class.php
@@ -199,10 +199,9 @@
 * @return bool always true
 */
public function onSkinTemplateOutputPageBeforeExec( &$sktemplate, &$tpl 
) {
-   global $wgDefaultSkin;
if ( $this->checkContext() === false ||
!$sktemplate->getTitle()->userCan( 
'viewreaders' ) ||
-   $wgDefaultSkin != "bluespiceskin" ) {
+   !( $sktemplate instanceof SkinBlueSpiceSkin ) ) 
{
return true;
}
if ( !$sktemplate->getTitle()->userCan( 'viewreaders' ) ) {
@@ -221,10 +220,9 @@
}
 
public function onSkinAfterContent( &$data, $sktemplate ) {
-   global $wgDefaultSkin;
if ( $this->checkContext() === false ||
!$sktemplate->getTitle()->userCan( 
'viewreaders' ) ||
-   $wgDefaultSkin == "bluespiceskin" ) {
+   $sktemplate instanceof SkinBlueSpiceSkin ) {
return true;
}
if ( !$sktemplate->getTitle()->userCan( 'viewreaders' ) ) {
diff --git a/ShoutBox/ShoutBox.class.php b/ShoutBox/ShoutBox.class.php
index a251b62..4922823 100644
--- a/ShoutBox/ShoutBox.class.php
+++ b/ShoutBox/ShoutBox.class.php
@@ -230,8 +230,7 @@
 * @return bool always true
 */
public function onSkinTemplateOutputPageBeforeExec( &$sktemplate, &$tpl 
) {
-   global $wgDefaultSkin;
-   if ( !BsExtensionManager::isContextActive( 'MW::ShoutboxShow' ) 
|| $wgDefaultSkin != "bluespiceskin" ) {
+   if ( !BsExtensionManager::isContextActive( 'MW::ShoutboxShow' ) 
|| !( $sktemplate instanceof SkinBlueSpiceSkin ) ) {
return true;
}
 
@@ -245,14 +244,12 @@
 
/**
 * Hook-Handler for 'SkinAfterContent'. Adds the ShoutboxView to the 
end of the content
-* @global String $wgDefaultSkin
 * @param String $data
 * @param Skin $sktemplate
 * @return boolean
 */
public function onSkinAfterContent( &$data, $sktemplate ) {
-   global $wgDefaultSkin;
-   if ( !BsExtensionManager::isContextActive( 'MW::ShoutboxShow' ) 
|| $wgDefaultSkin == "bluespiceskin" ) {
+   if ( !BsExtensionManager::isContextActive( 'MW::ShoutboxShow' ) 
|| $sktemplate instanceof SkinBlueSpiceSkin ) {
return true;
}
$oShoutboxView =  $this->getShoutboxViewForAfterContent( 
$sktemplate );
diff --git a/StateBar/StateBar.class.php b/StateBar/StateBar.class.php
index eb87aec..e83ac24 100644
--- a/StateBar/StateBar.class.php
+++ b/StateBar/StateBar.class.php
@@ -319,12 +319,11 @@
 * @return boolean Always true to keep hook running
 */
public function onSkinTemplateOutputPageBeforeExec( &$sktemplate, &$tpl 
) {
-   global $wgDefaul

[MediaWiki-commits] [Gerrit] Renamed autocomplete file - change (mediawiki...BlueSpiceExtensions)

2014-10-29 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Renamed autocomplete file
..

Renamed autocomplete file

Autocomplete is not a widget so remove this part from the filename. Also removed
unnecessary closure because in mw.loader it is already in a closure.

Change-Id: Id7711d6ec24d677201356cffbfb1563c93a239b3
---
M ExtendedSearch/ExtendedSearch.setup.php
A ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js
D ExtendedSearch/resources/bluespice.extendedSearch.autocompleteWidget.js
3 files changed, 73 insertions(+), 75 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/33/169733/1

diff --git a/ExtendedSearch/ExtendedSearch.setup.php 
b/ExtendedSearch/ExtendedSearch.setup.php
index 17e3575..0832cc5 100644
--- a/ExtendedSearch/ExtendedSearch.setup.php
+++ b/ExtendedSearch/ExtendedSearch.setup.php
@@ -20,7 +20,7 @@
 ) + $aResourceModuleTemplate;
 
 $wgResourceModules['ext.bluespice.extendedsearch.autocomplete'] = array(
-   'scripts' => 'bluespice.extendedSearch.autocompleteWidget.js',
+   'scripts' => 'bluespice.extendedSearch.autocomplete.js',
'dependencies' => array(
'jquery.ui.autocomplete'
),
diff --git a/ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js 
b/ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js
new file mode 100644
index 000..d07f200
--- /dev/null
+++ b/ExtendedSearch/resources/bluespice.extendedSearch.autocomplete.js
@@ -0,0 +1,72 @@
+/**
+ * ExtendedSearch extension
+ *
+ * Part of BlueSpice for MediaWiki
+ *
+ * @author Stephan Muggli 
+ * @packageBluespice_Extensions
+ * @subpackage ExtendedSearch
+ * @copyright  Copyright (C) 2012 Hallo Welt! - Medienwerkstatt GmbH, All 
rights reserved.
+ * @licensehttp://www.gnu.org/copyleft/gpl.html GNU Public License v2 or 
later
+ * @filesource
+ */
+mw.loader.using( 'jquery.ui.autocomplete', function() {
+   var cache = [];
+   var lastXhr = {};
+
+   if ( $( "#bs-extendedsearch-input, .bs-autocomplete-field" ).length < 1 
)
+   return;
+
+   var container = $( "" );
+   $( "body" ).append( container );
+   $( "#bs-extendedsearch-input, .bs-autocomplete-field" ).autocomplete( {
+   appendTo: container,
+   position: {
+   my: "right top",
+   at: "right bottom"
+   },
+   source: function( req, setList ) {
+   if ( req.term in cache ) {
+   setList( cache[ req.term ] );
+   } else {
+   var url = bs.util.getAjaxDispatcherUrl(
+   
'ExtendedSearchBase::getAutocompleteData',
+   [ encodeURIComponent( req.term 
) ]
+   );
+   var lastXhr = $.ajax( {
+   url: url,
+   dataType: 'json',
+   success: function( response, 
textStatus, xhr ) {
+   if ( response == null || 
response.length == '0' ) {
+   $( '.ui-autocomplete' 
).css( 'display', 'none' );
+   } else {
+   if ( xhr === lastXhr ) {
+   setList( 
response );
+   }
+   cache[ req.term ] = 
response;
+   }
+   },
+   failure: function() {
+   }
+   } );
+   }
+   },
+   focus: function( event, ui ) {
+   $( '.ui-corner-all' ).unbind( 'mouseleave' );
+   },
+   select: function( event, ui ) {
+   var status = { skipFurtherProcessing: false };
+   $( document ).trigger( 
'BSExtendedSearchAutocompleteItemSelect', [ event, ui, status ] );
+   if ( status.skipFurtherProcessing )
+   return;
+   document.location.href = "" + ui.item.link;
+   }
+   } );
+
+   $.ui.autocomplete.prototype._renderItem = function( ul, item ) {
+   return $( "" )
+   .data( "item.autocomplete", item )
+   .append( "" + item.label + "" )
+   

[MediaWiki-commits] [Gerrit] Added boost query for namespace evaluation - change (mediawiki...BlueSpiceExtensions)

2014-10-29 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Added boost query for namespace evaluation
..

Added boost query for namespace evaluation

Switched from Lucene query parser to ExtendedDisMax query parser. The 
ExtendedDisMax has a lot of new search functionality like boost queries and 
supports the full Lucene query parser syntax, so that non of our functionality 
will break.

From now on we can improve, for example, the evaluation of namespace, to 
provide individual scoring.

 * Improved logging in case of a bad request

Change-Id: I9f7a8fd300d30372f3987af44e1904f238f3a978
---
M ExtendedSearch/includes/SearchIndex/SearchIndex.class.php
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
M ExtendedSearch/includes/SolrPhpClient/Response.php
M ExtendedSearch/includes/SolrPhpClient/Service.php
4 files changed, 61 insertions(+), 55 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/66/169666/1

diff --git a/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php
index 771da7d..6d1aa71 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchIndex.class.php
@@ -115,8 +115,7 @@
$query['searchOptions']
);
} catch ( Exception $e ) {
-   // bs-extendedsearch-invalid-query
-   if ( $e->getMessage() == '"0" Status: Communication 
Error' ) {
+   if ( stripos( $e->getMessage(), 'Communication Error' ) 
!== false ) {
$sUrl = SpecialPage::getTitleFor( 'Search' 
)->getFullURL();
 
$sParams = 'search='.urlencode( 
$this->oSearchOptions->getOption( 'searchStringRaw' ) );
@@ -129,6 +128,7 @@
return $this->oContext->getOutput()->redirect( 
$sUrl, '404' );
}
 
+   wfDebugLog( 'ExtendedSearch', $e->getMessage() );
return $this->createErrorMessageView( 
'bs-extendedsearch-invalid-query' );
}
 
diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index 2d7ba23..ed76f1d 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -290,15 +290,21 @@
 * Processes incoming search request
 */
public function readInSearchRequest() {
-   global $wgCanonicalNamespaceNames, $wgExtraNamespaces;
+   global $wgCanonicalNamespaceNames, $wgExtraNamespaces, 
$wgContentNamespaces;
$this->aOptions['searchStringRaw'] = 
$this->oSearchRequest->sInput;
$this->aOptions['searchStringOrig'] = 
ExtendedSearchBase::preprocessSearchInput( $this->oSearchRequest->sInput );
 
self::$searchStringRaw = $this->aOptions['searchStringRaw'];
 
$sCustomerId = $this->getCustomerId();
-
+   $sLogOp = ' OR ';
$aFq = array();
+   $aBq = array();
+
+   $scope = ( BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) 
== 'title' )
+   ? 'title'
+   : 'text';
+   $this->aOptions['scope'] = $scope;
 
$vNamespace = $this->checkSearchstringForNamespace(
$this->aOptions['searchStringRaw'],
@@ -309,12 +315,6 @@
 
$this->aOptions['searchStringWildcarded'] = 
SearchService::wildcardSearchstring( $this->aOptions['searchStringOrig'] );
$this->aOptions['searchStringForStatistics'] = 
$this->aOptions['searchStringWildcarded'];
-   $this->aOptions['bExtendedForm'] = 
$this->oSearchRequest->bExtendedForm;
-
-   $scope = ( BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) 
== 'title' )
-   ? 'title'
-   : 'text';
-   $this->aOptions['scope'] = $scope;
 
$aSearchTitle = array(
'title:(' . $this->aOptions['searchStringOrig'] . ')^2',
@@ -328,20 +328,20 @@
'sections:(' . $this->aOptions['searchStringOrig'] . ')'
);
 
-   $sSearchStringTitle = implode( ' OR ', $aSearchTitle );
-   $sSearchStringText = implode( ' OR ', $aSearchText );
+   $sSearchStringTitle = implode( $sLogOp, $aSearchTitle );
+   $sSearchStringText = implode( $sLogOp, $aSearchText );
 
$this->aOptions['searchStringFinal'] = ( 
$this->aOptions['scope'] === 'title' )
? $sSearchStringTitle
-   : $sS

[MediaWiki-commits] [Gerrit] Fixed display of section results - change (mediawiki...BlueSpiceExtensions)

2014-10-29 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Fixed display of section results
..

Fixed display of section results

Also improved code a little bit

Change-Id: I97058b1823213bc233a68e755ac872acb8eacc24
---
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
M ExtendedSearch/includes/SearchIndex/SearchResult.class.php
M ExtendedSearch/resources/bluespice.extendedSearch.specialpage.css
3 files changed, 16 insertions(+), 18 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/59/169659/1

diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index eb9debe..2d7ba23 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -290,6 +290,7 @@
 * Processes incoming search request
 */
public function readInSearchRequest() {
+   global $wgCanonicalNamespaceNames, $wgExtraNamespaces;
$this->aOptions['searchStringRaw'] = 
$this->oSearchRequest->sInput;
$this->aOptions['searchStringOrig'] = 
ExtendedSearchBase::preprocessSearchInput( $this->oSearchRequest->sInput );
 
@@ -298,9 +299,6 @@
$sCustomerId = $this->getCustomerId();
 
$aFq = array();
-   $aFq[] = 'redirect:0';
-   $aFq[] = 'special:0';
-   $aFq[] = 'wiki:('.$sCustomerId.')';
 
$vNamespace = $this->checkSearchstringForNamespace(
$this->aOptions['searchStringRaw'],
@@ -311,13 +309,11 @@
 
$this->aOptions['searchStringWildcarded'] = 
SearchService::wildcardSearchstring( $this->aOptions['searchStringOrig'] );
$this->aOptions['searchStringForStatistics'] = 
$this->aOptions['searchStringWildcarded'];
-   $this->aOptions['searchStrComp'] = array();
$this->aOptions['bExtendedForm'] = 
$this->oSearchRequest->bExtendedForm;
 
-   $scope = BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) == 
'title' ? 'title' : 'text';
-
-   if ( $this->oSearchRequest->sScope == 'title' ) $scope = 
'title';
-   if ( $this->oSearchRequest->sScope == 'text' ) $scope = 'text';
+   $scope = ( BsConfig::get( 'MW::ExtendedSearch::DefScopeUser' ) 
== 'title' )
+   ? 'title'
+   : 'text';
$this->aOptions['scope'] = $scope;
 
$aSearchTitle = array(
@@ -326,7 +322,6 @@
'titleReverse:(' . 
$this->aOptions['searchStringWildcarded'] . ')',
'redirects:(' . $this->aOptions['searchStringOrig'] . 
')'
);
-
$aSearchText = array(
'textWord:(' . $this->aOptions['searchStringOrig'] 
.')^2',
'textReverse:(' . 
$this->aOptions['searchStringWildcarded'] . ')',
@@ -334,20 +329,20 @@
);
 
$sSearchStringTitle = implode( ' OR ', $aSearchTitle );
-
$sSearchStringText = implode( ' OR ', $aSearchText );
 
-   $this->aOptions['searchStrComp']['searchStrInTitle'] = 
$sSearchStringTitle;
-   $this->aOptions['searchStrComp']['searchStrInFulltext'] = 
$sSearchStringText;
-
$this->aOptions['searchStringFinal'] = ( 
$this->aOptions['scope'] === 'title' )
-   ? $this->aOptions['searchStrComp']['searchStrInTitle']
-   : implode( ' OR ', $this->aOptions['searchStrComp'] );
+   ? $sSearchStringTitle
+   : $sSearchStringTitle . ' OR ' . $sSearchStringText;
 
// $this->aOptions['namespaces'] HAS TO BE an array with 
numeric indices of type string!
$this->aOptions['namespaces'] = 
$this->oSearchRequest->aNamespaces;
 
-   global $wgCanonicalNamespaceNames, $wgExtraNamespaces;
+   // filter query
+   $aFq[] = 'redirect:0';
+   $aFq[] = 'special:0';
+   $aFq[] = 'wiki:('.$sCustomerId.')';
+
$aNamespaces = array_slice( $wgCanonicalNamespaceNames, 2 );
$aNamespaces = $aNamespaces + $wgExtraNamespaces;
 
diff --git a/ExtendedSearch/includes/SearchIndex/SearchResult.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchResult.class.php
index 699aec0..a55889d 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchResult.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchResult.class.php
@@ -372,6 +372,8 @@
'default' => ' '
);
 
+   $oParser = new Parser();
+
foreach ( $this->oResponse->response->docs as $oDocument ) {

[MediaWiki-commits] [Gerrit] Added missing I18N - change (mediawiki...BlueSpiceExtensions)

2014-10-28 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added missing I18N
..


Added missing I18N

THIS IS A MANUAL MERGE FROM REL1_22
https://gerrit.wikimedia.org/r/#/c/169332/

And fixed one I18N key to meet conventions

 * Added german formal version

Change-Id: I046e280cddc49b8913ca472846fe7f7bd695f06c
---
M PermissionManager/PermissionManager.setup.php
A PermissionManager/i18n/de-formal.json
M PermissionManager/i18n/de.json
M PermissionManager/i18n/en.json
M PermissionManager/i18n/qqq.json
M PermissionManager/resources/BS.PermissionManager/panel/Manager.js
6 files changed, 19 insertions(+), 7 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved
  Raimond Spekking: Looks good to me, but someone else must approve



diff --git a/PermissionManager/PermissionManager.setup.php 
b/PermissionManager/PermissionManager.setup.php
index 570a3a8..25ba256 100644
--- a/PermissionManager/PermissionManager.setup.php
+++ b/PermissionManager/PermissionManager.setup.php
@@ -41,7 +41,7 @@
'bs-permissionmanager-titletpled-new',
'bs-permissionmanager-titletpled-edit',
'bs-permissionmanager-titletpled-delete',
-   'bs-PermissionManager-unsaved-changes'
+   'bs-permissionmanager-unsaved-changes'
),
'localBasePath' => $IP,
'remoteBasePath' => &$GLOBALS['wgScriptPath']
diff --git a/PermissionManager/i18n/de-formal.json 
b/PermissionManager/i18n/de-formal.json
new file mode 100644
index 000..39211e8
--- /dev/null
+++ b/PermissionManager/i18n/de-formal.json
@@ -0,0 +1,8 @@
+{
+   "@metadata": {
+   "authors": [
+   "Stephan Muggli "
+   ]
+   },
+   "bs-permissionmanager-unsaved-changes": "Es existieren ungespeicherte 
Änderungen. Wollen Sie die Seite wirklich verlassen? Die ungespeicherten 
Änderungen gehen in diesem Fall verloren"
+}
diff --git a/PermissionManager/i18n/de.json b/PermissionManager/i18n/de.json
index 74a4499..09c60c8 100644
--- a/PermissionManager/i18n/de.json
+++ b/PermissionManager/i18n/de.json
@@ -39,5 +39,6 @@
"bs-permissionmanager-titletpled-delete": "Vorlage löschen",
"bs-permissionmanager-pref-lockmode": "Lockmode aktivieren",
"bs-permissionmanager-pref-skipsysns": "Systemnamensräume bei 
eingschaltetem Lockmode ignorieren",
-   "bs-permissionmanager-pref-enablerealitycheck": "Rechteprüfung 
aktivieren"
+   "bs-permissionmanager-pref-enablerealitycheck": "Rechteprüfung 
aktivieren",
+   "bs-permissionmanager-unsaved-changes": "Es existieren ungespeicherte 
Änderungen. Willst du die Seite wirklich verlassen? Die ungespeicherten 
Änderungen gehen in diesem Fall verloren"
 }
diff --git a/PermissionManager/i18n/en.json b/PermissionManager/i18n/en.json
index edae6c1..699cd3e 100644
--- a/PermissionManager/i18n/en.json
+++ b/PermissionManager/i18n/en.json
@@ -38,5 +38,6 @@
"bs-permissionmanager-titletpled-delete": "Delete template",
"bs-permissionmanager-pref-lockmode": "Activate lockmode",
"bs-permissionmanager-pref-skipsysns": "Skip system namespaces if 
lockmode is active",
-   "bs-permissionmanager-pref-enablerealitycheck": "Activate permission 
check"
+   "bs-permissionmanager-pref-enablerealitycheck": "Activate permission 
check",
+   "bs-permissionmanager-unsaved-changes": "There are unsaved changes. Do 
you really want to leave the page now? The unsaved changes will be lost."
 }
diff --git a/PermissionManager/i18n/qqq.json b/PermissionManager/i18n/qqq.json
index 55e4f2a..54661e1 100644
--- a/PermissionManager/i18n/qqq.json
+++ b/PermissionManager/i18n/qqq.json
@@ -40,5 +40,6 @@
"bs-permissionmanager-titletpled-delete": "Window title for delete 
template",
"bs-permissionmanager-pref-lockmode": "Option in 
[{{canonicalurl:Special:WikiAdmin|mode=Preferences}} 
Special:WikiAdmin?mode=Preferences], checkbox label for activate lockmode",
"bs-permissionmanager-pref-skipsysns": "Option in 
[{{canonicalurl:Special:WikiAdmin|mode=Preferences}} 
Special:WikiAdmin?mode=Preferences], checkbox label for skip system namespaces 
if lockmode is active",
-   "bs-permissionmanager-pref-enablerealitycheck": "Option in 
[{{canonicalurl:Special:WikiAdmin|mode=Preferences}} 
Special:WikiAdmin?mode=Preferences], checkbox label for activate permission 
check"
+   "bs-permissionmanager-pref-enablerealitycheck": "Option in 
[{{canonicalurl:Special:WikiAdmin|mode=Preferences}} 
Special:WikiAdmin?mode=Preferences], checkbox label for activate permission 
check",
+   "bs-permissionmanager-unsaved-changes": "Hint about data loss when a 
user leaves the page without saving her/his changes"
 }
diff --git a/PermissionManager/resources/BS.PermissionManager/panel/Manager.js 
b/PermissionManager/resources/BS.PermissionManager/panel/Manager.js
index d9859f4..5069eb0 100644
--- a/P

[MediaWiki-commits] [Gerrit] Added support for opensearch - change (mediawiki...BlueSpiceExtensions)

2014-10-28 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Added support for opensearch
..

Added support for opensearch

When ExtendedSearch is enabled, the default opensearch urls are overwriten
that the request triggers ExtendedSearch and not MediaWiki standard
search.

Change-Id: I3274d894f1bd5f37a2e08a012b12fccb6408b857
---
M ExtendedSearch/ExtendedSearch.class.php
M ExtendedSearch/ExtendedSearch.setup.php
2 files changed, 19 insertions(+), 1 deletion(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/09/169509/1

diff --git a/ExtendedSearch/ExtendedSearch.class.php 
b/ExtendedSearch/ExtendedSearch.class.php
index d013037..fba41e5 100644
--- a/ExtendedSearch/ExtendedSearch.class.php
+++ b/ExtendedSearch/ExtendedSearch.class.php
@@ -144,6 +144,23 @@
}
 
/**
+* Hook-Handler for Hook 'OpenSearchUrls'
+* @param array §$aUrls array of urls for opensearch
+* @return boolean Always true
+*/
+   public static function onOpenSearchUrls( &$aUrls ) {
+   $oSerach = SpecialPage::getTitleFor( 'ExtendedSearch' );
+   $aUrls = array(
+   array(
+   'type' => 'text/html',
+   'method' => 'get',
+   'template' => $oSerach->getCanonicalURL( 
'q={searchTerms}' )
+   )
+   );
+   return true;
+   }
+
+   /**
 * Hook-Handler for Hook 'LoadExtensionSchemaUpdates'
 * @param object §updater Updater
 * @return boolean Always true
diff --git a/ExtendedSearch/ExtendedSearch.setup.php 
b/ExtendedSearch/ExtendedSearch.setup.php
index 17e3575..31a9c59 100644
--- a/ExtendedSearch/ExtendedSearch.setup.php
+++ b/ExtendedSearch/ExtendedSearch.setup.php
@@ -95,4 +95,5 @@
 $wgExtensionMessagesFiles['ExtendedSearchAlias'] = __DIR__ . 
'/languages/SpecialExtendedSearch.alias.php';
 $wgSpecialPages['SpecialExtendedSearch'] = 'SpecialExtendedSearch';
 
-$wgHooks['LoadExtensionSchemaUpdates'][] = 'ExtendedSearch::getSchemaUpdates';
\ No newline at end of file
+$wgHooks['LoadExtensionSchemaUpdates'][] = 'ExtendedSearch::getSchemaUpdates';
+$GLOBALS['wgHooks']['OpenSearchUrls'][] = 'ExtendedSearch::onOpenSearchUrls';
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I3274d894f1bd5f37a2e08a012b12fccb6408b857
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Do not use phrase search for better matching - change (mediawiki...BlueSpiceExtensions)

2014-10-28 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Do not use phrase search for better matching
..


Do not use phrase search for better matching

For direct matching use title field.

Change-Id: I0833e9103bc6513b21b08d5ee0cb290df1ffb26e
---
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
1 file changed, 2 insertions(+), 2 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index efb91e3..eb9debe 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -185,7 +185,7 @@
);
 
$aOptions = array();
-   $aOptions['searchString'] = 'titleEdge:('.$sSolrSearchString.') 
OR titleWord:("'.$sSolrSearchString.'")';
+   $aOptions['searchString'] = 'titleEdge:('.$sSolrSearchString.') 
OR title:('.$sSolrSearchString.')';
$aOptions['searchLimit'] = BsConfig::get( 
'MW::ExtendedSearch::AcEntries' );
 
$aSolrAutocompleteQuery = array(
@@ -321,7 +321,7 @@
$this->aOptions['scope'] = $scope;
 
$aSearchTitle = array(
-   'titleWord:("' . $this->aOptions['searchStringOrig'] . 
'")^2',
+   'title:(' . $this->aOptions['searchStringOrig'] . ')^2',
'titleWord:(' . $this->aOptions['searchStringOrig'] . 
')^2',
'titleReverse:(' . 
$this->aOptions['searchStringWildcarded'] . ')',
'redirects:(' . $this->aOptions['searchStringOrig'] . 
')'

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I0833e9103bc6513b21b08d5ee0cb290df1ffb26e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Do not use phrase searching for better matching - change (mediawiki...BlueSpiceExtensions)

2014-10-27 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Do not use phrase searching for better matching
..

Do not use phrase searching for better matching

For direct matching use title field.

Change-Id: I0833e9103bc6513b21b08d5ee0cb290df1ffb26e
---
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/83/168983/1

diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index efb91e3..eb9debe 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -185,7 +185,7 @@
);
 
$aOptions = array();
-   $aOptions['searchString'] = 'titleEdge:('.$sSolrSearchString.') 
OR titleWord:("'.$sSolrSearchString.'")';
+   $aOptions['searchString'] = 'titleEdge:('.$sSolrSearchString.') 
OR title:('.$sSolrSearchString.')';
$aOptions['searchLimit'] = BsConfig::get( 
'MW::ExtendedSearch::AcEntries' );
 
$aSolrAutocompleteQuery = array(
@@ -321,7 +321,7 @@
$this->aOptions['scope'] = $scope;
 
$aSearchTitle = array(
-   'titleWord:("' . $this->aOptions['searchStringOrig'] . 
'")^2',
+   'title:(' . $this->aOptions['searchStringOrig'] . ')^2',
'titleWord:(' . $this->aOptions['searchStringOrig'] . 
')^2',
'titleReverse:(' . 
$this->aOptions['searchStringWildcarded'] . ')',
'redirects:(' . $this->aOptions['searchStringOrig'] . 
')'

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I0833e9103bc6513b21b08d5ee0cb290df1ffb26e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Fixed namespace filter in SmartList (toplist) - change (mediawiki...BlueSpiceExtensions)

2014-10-27 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Fixed namespace filter in SmartList (toplist)
..


Fixed namespace filter in SmartList (toplist)

* fixed query (in instead of =)
* fixed empty clause (string 0 is empty)

Change-Id: I80f663993760d5ac6dc9b645a18233a334473d4c
---
M SmartList/SmartList.class.php
1 file changed, 6 insertions(+), 10 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/SmartList/SmartList.class.php b/SmartList/SmartList.class.php
index 1529c2b..1a447db 100644
--- a/SmartList/SmartList.class.php
+++ b/SmartList/SmartList.class.php
@@ -1044,18 +1044,14 @@
}
}
 
-   if ( !empty( $sNs ) ) {
-   $iNamespaces = 
BsNamespaceHelper::getNamespaceIdsFromAmbiguousCSVString( $sNs );
-   if ( is_array( $iNamespaces ) ) {
-   foreach ( $iNamespaces as $iNamespace ) {
-   if ( $bAlltime === false ) {
-   
$aConditions['wo_page_namespace'] = $iNamespace;
-   } else {
-   $aConditions['page_namespace'] 
= $iNamespace;
-   }
-   }
+   if ( !empty( $sNs ) || $sNs === '0') { // string 0 is empty
+   $aNamespaces = 
BsNamespaceHelper::getNamespaceIdsFromAmbiguousCSVString( $sNs );
+   if ( !empty( $aNamespaces ) ) {
+   $sField = $bAlltime ? 'page_namespace' : 
'wo_page_namespace';
+   $aConditions[$sField] = $aNamespaces;
}
}
+
$res = $oDbr->select(
$aTables,
$aColumns,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80f663993760d5ac6dc9b645a18233a334473d4c
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Pwirth 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added check for empty Lockdown settings - change (mediawiki...BlueSpiceExtensions)

2014-10-24 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added check for empty Lockdown settings
..


Added check for empty Lockdown settings

Now checks, if $wgNamespacePermissionLockdown is empty to prevent warning

Change-Id: I80878480f0c06dbbf9c00020c77bcb0452de9d6b
---
M PermissionManager/PermissionManager.class.php
1 file changed, 15 insertions(+), 13 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/PermissionManager/PermissionManager.class.php 
b/PermissionManager/PermissionManager.class.php
index 5b65499..b752f2c 100644
--- a/PermissionManager/PermissionManager.class.php
+++ b/PermissionManager/PermissionManager.class.php
@@ -199,21 +199,23 @@
$bSave = true;
}
 
-   foreach ($wgNamespacePermissionLockdown as $iNsIndex => 
$aNsRights) {
-   foreach ($aNsRights as $sRight => $aGroups) {
-   if (!in_array(self::$sPmLockModeGroup, 
$aGroups))
-   continue;
-   $key = 
array_search(self::$sPmLockModeGroup, $aGroups);
-   if ($key !== false) {
-   
unset($wgNamespacePermissionLockdown[$iNsIndex][$sRight][$key]);
-   if 
(empty($wgNamespacePermissionLockdown[$iNsIndex][$sRight])) {
-   
unset($wgNamespacePermissionLockdown[$iNsIndex][$sRight]);
+   if ( is_array( $wgNamespacePermissionLockdown ) ) {
+   foreach ($wgNamespacePermissionLockdown as 
$iNsIndex => $aNsRights) {
+   foreach ($aNsRights as $sRight => 
$aGroups) {
+   if 
(!in_array(self::$sPmLockModeGroup, $aGroups))
+   continue;
+   $key = 
array_search(self::$sPmLockModeGroup, $aGroups);
+   if ($key !== false) {
+   
unset($wgNamespacePermissionLockdown[$iNsIndex][$sRight][$key]);
+   if 
(empty($wgNamespacePermissionLockdown[$iNsIndex][$sRight])) {
+   
unset($wgNamespacePermissionLockdown[$iNsIndex][$sRight]);
+   }
+   $bSave = true;
}
-   $bSave = true;
}
-   }
-   if 
(empty($wgNamespacePermissionLockdown[$iNsIndex])) {
-   
unset($wgNamespacePermissionLockdown[$iNsIndex]);
+   if 
(empty($wgNamespacePermissionLockdown[$iNsIndex])) {
+   
unset($wgNamespacePermissionLockdown[$iNsIndex]);
+   }
}
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I80878480f0c06dbbf9c00020c77bcb0452de9d6b
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Adjusted boosts - change (mediawiki...BlueSpiceExtensions)

2014-10-23 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Adjusted boosts
..

Adjusted boosts

The boosting was way to high so text founds did not have a real relevance.
Put direct match, text and title fields with WordDelimiterFilterFactory on same 
level.

Change-Id: I4a066d91126cdacccd272150ebcdbf62e2e7b73e
---
M ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
1 file changed, 6 insertions(+), 6 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/04/168304/1

diff --git a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php 
b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
index 3b03bb9..efb91e3 100644
--- a/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
+++ b/ExtendedSearch/includes/SearchIndex/SearchOptions.class.php
@@ -321,16 +321,16 @@
$this->aOptions['scope'] = $scope;
 
$aSearchTitle = array(
-   'titleWord:("' . $this->aOptions['searchStringOrig'] . 
'")^50',
-   'titleWord:(' . $this->aOptions['searchStringOrig'] . 
')^10',
-   'titleReverse:(' . 
$this->aOptions['searchStringWildcarded'] . ')^1',
-   'redirects:(' . $this->aOptions['searchStringOrig'] . 
')^0.1'
+   'titleWord:("' . $this->aOptions['searchStringOrig'] . 
'")^2',
+   'titleWord:(' . $this->aOptions['searchStringOrig'] . 
')^2',
+   'titleReverse:(' . 
$this->aOptions['searchStringWildcarded'] . ')',
+   'redirects:(' . $this->aOptions['searchStringOrig'] . 
')'
);
 
$aSearchText = array(
'textWord:(' . $this->aOptions['searchStringOrig'] 
.')^2',
-   'textReverse:(' . 
$this->aOptions['searchStringWildcarded'] . ')^0.1',
-   'sections:(' . $this->aOptions['searchStringOrig'] . 
')^0.1'
+   'textReverse:(' . 
$this->aOptions['searchStringWildcarded'] . ')',
+   'sections:(' . $this->aOptions['searchStringOrig'] . ')'
);
 
$sSearchStringTitle = implode( ' OR ', $aSearchTitle );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a066d91126cdacccd272150ebcdbf62e2e7b73e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Rewrite of NamespaceNuker - change (mediawiki...BlueSpiceExtensions)

2014-10-23 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Rewrite of NamespaceNuker
..

Rewrite of NamespaceNuker

All options of NamespaceNuker did not work or not correctly. I Rewrote the code 
of it because it is much easier to use MediaWiki. The benefit is that many 
steps are done by MediaWiki and there is no need that we do them.

 * Fixed bug with not correctly shown message in remove dialog

Change-Id: I65c5a3ec7440563a3373fa1f572b33f312befa50
---
M NamespaceManager/NamespaceManager.class.php
M NamespaceManager/NamespaceManager.setup.php
D NamespaceManager/NamespaceNuker.php
M NamespaceManager/i18n/de.json
M NamespaceManager/i18n/en.json
M NamespaceManager/i18n/qqq.json
M NamespaceManager/includes/NamespaceNuker.php
M NamespaceManager/resources/BS.NamespaceManager/NamespaceRemoveDialog.js
M NamespaceManager/resources/BS.NamespaceManager/Panel.js
9 files changed, 147 insertions(+), 517 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/99/168299/1

diff --git a/NamespaceManager/NamespaceManager.class.php 
b/NamespaceManager/NamespaceManager.class.php
index a942d35..af120a3 100644
--- a/NamespaceManager/NamespaceManager.class.php
+++ b/NamespaceManager/NamespaceManager.class.php
@@ -29,11 +29,11 @@
'searched' => false
);
 
-   public static $aSortConditions = array( 
+   public static $aSortConditions = array(
'sort' => '',
'dir' => ''
);
-   
+
public $aSortHelper = array(
'negative' => 0,
'positive' => 0
@@ -55,7 +55,7 @@
EXTINFO::STATUS  => 'default',
EXTINFO::PACKAGE => 'default',
EXTINFO::URL => 'http://www.hallowelt.biz',
-   EXTINFO::DEPS => array( 
+   EXTINFO::DEPS => array(
'bluespice' => '2.22.0',
'WikiAdmin' => '2.22.0',
'Preferences' => '2.22.0'
@@ -85,19 +85,19 @@
$this->setHook( 
'NamespaceManager::writeNamespaceConfiguration', 
'onWriteNamespaceConfiguration', true );
 
//CR, RBV: This is suposed to return all constants! Not just 
system NS.
-   //At the moment the implementation relies on an hardcoded 
mapping, 
+   //At the moment the implementation relies on an hardcoded 
mapping,
//which is bad. We need to change this and make it more generic!
$GLOBALS['bsSystemNamespaces'] = 
BsNamespaceHelper::getMwNamespaceConstants();
 
wfProfileOut( 'BS::'.__METHOD__ );
}
-   
+
/**
* Add the sql file to database by executing the update.php
* @global type $wgDBtype
* @global array $wgExtNewTables
* @param DatabaseUpdater $du
-   * @return boolean 
+   * @return boolean
*/
public static function getSchemaUpdates( $updater ) {
global $wgExtPGNewFields, $wgDBtype;
@@ -150,7 +150,7 @@
} else {
$updater->addExtensionField(
'bs_namespacemanager_backup_page',
-   'page_content_model', 
+   'page_content_model',
$dir . 
'bs_namespacemanager_backup_page.patch.sql'
);
$updater->addExtensionField(
@@ -171,7 +171,7 @@
/**
 * returns if NS is empty or not
 * @param type $iNamespaceId
-* @return boolean 
+* @return boolean
 */
public function isNamespaceEmpty( $iNamespaceId ) {
if ( BsCore::checkAccessAdmission( 'wikiadmin' ) === false ) 
return true;
@@ -195,10 +195,10 @@
$this->getOutput()->addModules( 
'ext.bluespice.namespaceManager' );
BsExtensionManager::setContext( 'MW::NamespaceManagerShow' );
$aMetaFields = array(
-   array( 
-   'name' => 'id', 
-   'type' => 'int', 
-   'sortable' => true, 
+   array(
+   'name' => 'id',
+   'type' => 'int',
+   'sortable' => true,
'label' => wfMessage( 
'bs-namespacemanager-label-id' )->plain()
),
array(
@@ -210,7 +210,7 @@
 
wfRunHooks( 'NamespaceManager::getMetaFields', array( 
&$aMetaFields ) );

$this->getOutput()->addJsConfigVars('bsNamespaceManagerMetaFields', 
$aMetaFields);
-   
+
return ''

[MediaWiki-commits] [Gerrit] Improved expression - change (mediawiki...BlueSpiceExtensions)

2014-10-22 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Improved expression
..

Improved expression

There is no need to make a second check if sth should be added, do it in
the first. Nothing needs to be added if not true

Change-Id: I37453f4dc8c452055ce4b5b69b53e43787ccf685
---
M ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js
1 file changed, 3 insertions(+), 3 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/83/168083/1

diff --git a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js 
b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js
index a1785f8..c6cc507 100644
--- a/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js
+++ b/ExtendedSearch/resources/bluespice.extendedSearch.specialpage.js
@@ -364,10 +364,10 @@
if ( inputField.val() === '' ) return false;
url = wgServer + wgScriptPath +
'?search_scope=text&search_submit=1&q=' 
+ encodeURIComponent( inputField.val() );
-
-   if ( typeof bsExtendedSearchSearchFiles !== 'undefined' 
) {
-   url += '&search_files=' + ( 
bsExtendedSearchSearchFiles ) ? 1 : 0;
+   if ( typeof bsExtendedSearchSearchFiles !== 'undefined' 
&& bsExtendedSearchSearchFiles ) {
+   url += '&search_files=1';
}
+
thread = setTimeout( function() { 
ExtendedSearchAjaxManager.ajaxMeANewResultsPlz( url ) }, 300 );
} );
}

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I37453f4dc8c452055ce4b5b69b53e43787ccf685
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Small code update - change (mediawiki...BlueSpiceExtensions)

2014-10-22 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Small code update
..


Small code update

Improved code a little

 * Updated jquery events listeners
 * Some CCs
 * use the framewor * use the framework

Change-Id: I4779fe72c6fc93e5ad8cef07da46abac13f7d814
---
M SaferEdit/SaferEdit.class.php
M SaferEdit/resources/bluespice.SaferEdit.editmode.js
2 files changed, 33 insertions(+), 27 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/SaferEdit/SaferEdit.class.php b/SaferEdit/SaferEdit.class.php
index 62a96fa..7b2fba3 100644
--- a/SaferEdit/SaferEdit.class.php
+++ b/SaferEdit/SaferEdit.class.php
@@ -209,7 +209,7 @@
$aTopViews['statebartopsaferedit'] = 
$this->makeStateBarTopSaferEdit( Article::newFromID($oTitle->getArticleID()), 
$oEdit->se_edit_section );
}
 
-   $iTime = date( "YmdHis", time() - BsConfig::get( 
'MW::SaferEdit::Interval' ) * 10 );
+   $iTime = wfTimestamp( TS_MW, time() - BsConfig::get( 
'MW::SaferEdit::Interval' ) * 10 );
if ( $oEdit->se_user_name != $oUser->getName() && 
$oEdit->se_timestamp > $iTime ) {
$aTopViews['statebartopsafereditediting'] = 
$this->makeStateBarTopSomeoneEditing( $oEdit->se_user_name );
}
@@ -307,18 +307,18 @@
"se_text" => $sText,
);
$aConditions = array(
-   "se_user_name"  => $sUsername,
-   "se_page_title" => $oTitle->getDBkey(),
+   "se_user_name" => $sUsername,
+   "se_page_title" => $oTitle->getDBkey(),
"se_page_namespace" => $oTitle->getNamespace(),
-   "se_edit_section"   => $iSection,
+   "se_edit_section" => $iSection,
);
$aOptions = array( //needed for update reason
'ORDER BY' => 'se_id DESC',
'LIMIT' => 1,
);
 
-   if( $oRow = $db->selectRow($sTable, array( 'se_id' ), 
$aConditions, __METHOD__, $aOptions) ) {
-   if( empty($sText) ) unset($aFields['se_text']);
+   if ( $oRow = $db->selectRow( $sTable, array( 'se_id' ), 
$aConditions, __METHOD__, $aOptions ) ) {
+   if ( empty( $sText ) ) unset( $aFields['se_text'] );
 
$oTitle->invalidateCache();
return $db->update(
@@ -329,7 +329,7 @@
}
 
$oTitle->invalidateCache();
-   return $db->insert($sTable, $aConditions + $aFields);
+   return $db->insert( $sTable, $aConditions + $aFields );
}
 
/**
@@ -393,6 +393,7 @@
'',
array( "ORDER BY" => "se_id DESC" )
);
+
if ( $oDbw->numRows( $res ) > 0 ) {
$row = $oDbw->fetchRow( $res );
 
@@ -419,11 +420,13 @@
} elseif ( strcmp( $sOrigText, 
urldecode($row['se_text'] ) ) == 0 ) {
$aData = array( "notexts" => "1" );
} else {
+   global $wgParser;
+   $oParserOptions = new ParserOptions();
$str = urldecode( $row['se_text'] );
$aData = array(
"time" => $oLang->time( 
$row['se_timestamp'] ),
"date" => $oLang->date( 
$row['se_timestamp'] ),
-   "html" => 
BsCore::getInstance()->parseWikiText( $str, 
RequestContext::getMain()->getTitle() ), //breaks on Mainpage
+   "html" => $wgParser->parse( $str, 
RequestContext::getMain()->getTitle(), $oParserOptions )->getText(), //breaks 
on Mainpage
"wiki" => $str,
"section" => $row['se_edit_section'],
"notexts" => 0
@@ -530,7 +533,7 @@
if( !in_array($sRef, array('SaferEditIsSomeoneEditing', 
'SaferEditSave')) ) return true;
 
$oTitle = Title::newFromText( $sTitle, $iNamespace );
-   if( is_null($oTitle) || !$oTitle->userCan('read') ) return true;
+   if ( is_null($oTitle) || !$oTitle->userCan('read') ) return 
true;
 
global $wgUser;
 
@@ -543,21 +546,24 @@
$aSingleResult['someoneEditingView'] = 
$aSingleResult['safereditView'] = '';
$oArticle = Article::newFromID( $iArticleId );
 
+   $bUseSE = BsConfig::get( 'MW::SaferEdit::UseSE' 
);

[MediaWiki-commits] [Gerrit] Initialize variable to prevent error message - change (mediawiki...BlueSpiceExtensions)

2014-10-21 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Initialize variable to prevent error message
..


Initialize variable to prevent error message

If ExtendedSearch is enabled, but the service is not available,
$http_response_header will not be set by file_get_contents, as expected.
This leads to a notice that breaks the json, e.g. for the statebar
content. Initializing the variable helps here.

Change-Id: Ib39bbc7b8b1970fd0a708296c1b671182e9929a2
---
M ExtendedSearch/includes/SolrPhpClient/Service.php
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved
  jenkins-bot: Verified



diff --git a/ExtendedSearch/includes/SolrPhpClient/Service.php 
b/ExtendedSearch/includes/SolrPhpClient/Service.php
index 20e1a1a..1897955 100644
--- a/ExtendedSearch/includes/SolrPhpClient/Service.php
+++ b/ExtendedSearch/includes/SolrPhpClient/Service.php
@@ -286,6 +286,7 @@
 */
protected function _sendRawGet($url, $timeout = FALSE)
{
+   $http_response_header = null;
//$http_response_header is set by file_get_contents
$response = new Apache_Solr_Response(@file_get_contents($url), 
$http_response_header, $this->_createDocuments, 
$this->_collapseSingleValueArrays);
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ib39bbc7b8b1970fd0a708296c1b671182e9929a2
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Added update routine for new images - change (mediawiki...BlueSpiceFoundation)

2014-10-20 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Added update routine for new images
..


Added update routine for new images

 * added some documentation

Change-Id: I525d7240be2b848c3bedd5d81212f4377d4eb0d5
---
M includes/CoreHooks.php
1 file changed, 23 insertions(+), 1 deletion(-)

Approvals:
  Smuggli: Verified; Looks good to me, approved



diff --git a/includes/CoreHooks.php b/includes/CoreHooks.php
index 5dabc4f..e87a5b9 100755
--- a/includes/CoreHooks.php
+++ b/includes/CoreHooks.php
@@ -260,9 +260,31 @@
public static function onLoadExtensionSchemaUpdates( $updater ) {
global $wgDBtype;
 
-   $dbw = wfGetDB( DB_WRITE );
+   $dbw = wfGetDB( DB_MASTER );
 
if ( $dbw->tableExists( 'bs_settings' ) ) {
+   /* Update routine for incorrect images paths. Some not 
skin realted images were located
+* in BlueSpiceSkin and move into Foundation. That an 
update does not effect any functionality
+* the following steps were adeded
+* https://gerrit.wikimedia.org/r/#/c/166979/
+*/
+   BsConfig::loadSettings();
+   if ( preg_match( '#.*?BlueSpiceSkin.*?bs-logo.png#', 
BsConfig::get( 'MW::LogoPath' ) ) ) {
+   $dbw->delete( 'bs_settings', array( 
$dbw->addIdentifierQuotes( 'key' ) => 'MW::LogoPath' ) );
+   }
+   if ( preg_match( '#.*?BlueSpiceSkin.*?favicon.ico#', 
BsConfig::get( 'MW::FaviconPath' ) ) ) {
+   $dbw->delete( 'bs_settings', array( 
$dbw->addIdentifierQuotes( 'key' ) => 'MW::FaviconPath' ) );
+   }
+   if ( preg_match( 
'#.*?BlueSpiceSkin.*?bs-user-default-image.png#', BsConfig::get( 
'MW::DefaultUserImage' ) ) ) {
+   $dbw->delete( 'bs_settings', array( 
$dbw->addIdentifierQuotes( 'key' ) => 'MW::DefaultUserImage' ) );
+   }
+   if ( preg_match( 
'#.*?BlueSpiceSkin.*?bs-user-anon-image.png#', BsConfig::get( 
'MW::AnonUserImage' ) ) ) {
+   $dbw->delete( 'bs_settings', array( 
$dbw->addIdentifierQuotes( 'key' ) => 'MW::AnonUserImage' ) );
+   }
+   if ( preg_match( 
'#.*?BlueSpiceSkin.*?bs-user-deleted-image.png#', BsConfig::get( 
'MW::DeletedUserImage' ) ) ) {
+   $dbw->delete( 'bs_settings', array( 
$dbw->addIdentifierQuotes( 'key' ) => 'MW::DeletedUserImage' ) );
+   }
+
return true;
}
 

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I525d7240be2b848c3bedd5d81212f4377d4eb0d5
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Improved caching - change (mediawiki...BlueSpiceFoundation)

2014-10-17 Thread Smuggli (Code Review)
Smuggli has submitted this change and it was merged.

Change subject: Improved caching
..


Improved caching

 * Invalidate settings cache directly after insertion not kinda additional in a 
hook

Change-Id: Ie3cb9508ebd0614a74e5ef136584d27f6be3405e
---
M BlueSpice.hooks.php
M includes/Config.class.php
M includes/utility/CacheHelper.class.php
3 files changed, 11 insertions(+), 19 deletions(-)

Approvals:
  Mglaser: Checked; Looks good to me, but someone else must approve
  Smuggli: Verified; Looks good to me, approved



diff --git a/BlueSpice.hooks.php b/BlueSpice.hooks.php
index d3f9342..6d6a654 100644
--- a/BlueSpice.hooks.php
+++ b/BlueSpice.hooks.php
@@ -15,7 +15,6 @@
 
 // START cache invalidation hooks
 $wgHooks['PageContentSaveComplete'][] = 
'BsCacheHelper::onPageContentSaveComplete';
-$wgHooks['BsSettingsAfterSaveSettings'][] = 
'BsCacheHelper::onBsSettingsAfterSaveSettings';
 // END cache invalidation hooks
 
 if ( !isset( $wgHooks['EditPage::showEditForm:initial'] ) ) {
diff --git a/includes/Config.class.php b/includes/Config.class.php
index d5916d7..da5a355 100644
--- a/includes/Config.class.php
+++ b/includes/Config.class.php
@@ -271,10 +271,10 @@
 * loads all settings from the database and saves the instances for 
every variable internal.
 */
public static function loadSettings() {
-   $sKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'loadSettings' );
+   $sKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'settings' );
$aData = BsCacheHelper::get( $sKey );
 
-   if( $aData !== false ) {
+   if ( $aData !== false ) {
wfDebugLog( 'BsMemcached' , __CLASS__.': Fetching 
settings from cache' );
$aRows = $aData;
} else {
@@ -323,7 +323,7 @@
# if the setting is a boolean type then make sure, it
# gets saved as boolean type
if ( $setting->getOptions () & self::TYPE_BOOL ) {
-   $value = ( bool ) $setting->getValue ();
+   $value = (bool) $setting->getValue ();
} else {
$value = $setting->getValue ();
}
@@ -334,10 +334,17 @@
);
}
 
-   # write the settings array to the database
wfRunHooks( 'BsSettingsBeforeSaveSettings', array( &$aSettings 
) );
+
+   # write the settings array to the database
$bReturn = $dbw->insert('bs_settings', $aSettings);
+
wfRunHooks( 'BsSettingsAfterSaveSettings', array( $aSettings ) 
);
+
+   BsCacheHelper::invalidateCache(
+   BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'settings' )
+   );
+
return $bReturn;
}
 
diff --git a/includes/utility/CacheHelper.class.php 
b/includes/utility/CacheHelper.class.php
index 14f41d3..770c379 100644
--- a/includes/utility/CacheHelper.class.php
+++ b/includes/utility/CacheHelper.class.php
@@ -116,18 +116,4 @@
return true;
}
 
-   /**
-* Invalidates bs settings cache
-* @param type $aSettings
-*/
-   public static function onBsSettingsAfterSaveSettings( $aSettings ) {
-   $aKeys = array(
-   BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'loadSettings' )
-   );
-
-   BsCacheHelper::invalidateCache( $aKeys );
-
-   return true;
-   }
-
 }
\ No newline at end of file

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie3cb9508ebd0614a74e5ef136584d27f6be3405e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 
Gerrit-Reviewer: Mglaser 
Gerrit-Reviewer: Pigpen 
Gerrit-Reviewer: Robert Vogel 
Gerrit-Reviewer: Smuggli 
Gerrit-Reviewer: jenkins-bot <>

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Force overwriting of images - change (mediawiki...BlueSpiceExtensions)

2014-10-17 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Force overwriting of images
..

Force overwriting of images

In MW 1.24 somehow 4 of those buttons had not the correct BS image, so
force it

Change-Id: I9c631079f8171d10047c77ae10ee610211774097
---
M ExtendedEditBar/resources/bluespice.extendedEditBar.css
1 file changed, 9 insertions(+), 9 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/95/167195/1

diff --git a/ExtendedEditBar/resources/bluespice.extendedEditBar.css 
b/ExtendedEditBar/resources/bluespice.extendedEditBar.css
index e0abb4b..08a7461 100644
--- a/ExtendedEditBar/resources/bluespice.extendedEditBar.css
+++ b/ExtendedEditBar/resources/bluespice.extendedEditBar.css
@@ -32,47 +32,47 @@
 
 #mw-editbutton-bold {
/*@embed*/
-   background-image: url(images/button_format-bold.png);
+   background-image: url(images/button_format-bold.png) !important;
 }
 
 #mw-editbutton-italic {
/*@embed*/
-   background-image: url(images/button_format-italic.png);
+   background-image: url(images/button_format-italic.png) !important;
 }
 
 #mw-editbutton-headline {
/*@embed*/
-   background-image: url(images/button_format-h2.png);
+   background-image: url(images/button_format-h2.png) !important;
 }
 
 #mw-editbutton-link {
/*@embed*/
-   background-image: url(images/button_internal-link.png);
+   background-image: url(images/button_internal-link.png) !important;
 }
 
 #mw-editbutton-extlink {
/*@embed*/
-   background-image: url(images/button_external-link.png);
+   background-image: url(images/button_external-link.png) !important;
 }
 
 #mw-editbutton-strike {
/*@embed*/
-   background-image: url(images/button_format-struck.png);
+   background-image: url(images/button_format-struck.png) !important;
 }
 
 #mw-editbutton-image {
/*@embed*/
-   background-image: url(images/button_filelink.png);
+   background-image: url(images/button_filelink.png) !important;
 }
 
 #mw-editbutton-media {
/*@embed*/
-   background-image: url(images/button_medialink.png);
+   background-image: url(images/button_medialink.png) !important;
 }
 
 #mw-editbutton-signature {
/*@embed*/
-   background-image: url(images/button_signatur.png);
+   background-image: url(images/button_signatur.png) !important;
 }
 
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9c631079f8171d10047c77ae10ee610211774097
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Small code update - change (mediawiki...BlueSpiceExtensions)

2014-10-16 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Small code update
..

Small code update

Improved code a little

 * Updated jquery events listeners
 * Some CCs

Change-Id: I4779fe72c6fc93e5ad8cef07da46abac13f7d814
---
M SaferEdit/SaferEdit.class.php
M SaferEdit/resources/bluespice.SaferEdit.editmode.js
2 files changed, 32 insertions(+), 26 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions 
refs/changes/99/166999/1

diff --git a/SaferEdit/SaferEdit.class.php b/SaferEdit/SaferEdit.class.php
index 62a96fa..26cb10d 100644
--- a/SaferEdit/SaferEdit.class.php
+++ b/SaferEdit/SaferEdit.class.php
@@ -307,18 +307,18 @@
"se_text" => $sText,
);
$aConditions = array(
-   "se_user_name"  => $sUsername,
-   "se_page_title" => $oTitle->getDBkey(),
+   "se_user_name" => $sUsername,
+   "se_page_title" => $oTitle->getDBkey(),
"se_page_namespace" => $oTitle->getNamespace(),
-   "se_edit_section"   => $iSection,
+   "se_edit_section" => $iSection,
);
$aOptions = array( //needed for update reason
'ORDER BY' => 'se_id DESC',
'LIMIT' => 1,
);
 
-   if( $oRow = $db->selectRow($sTable, array( 'se_id' ), 
$aConditions, __METHOD__, $aOptions) ) {
-   if( empty($sText) ) unset($aFields['se_text']);
+   if ( $oRow = $db->selectRow( $sTable, array( 'se_id' ), 
$aConditions, __METHOD__, $aOptions ) ) {
+   if ( empty( $sText ) ) unset( $aFields['se_text'] );
 
$oTitle->invalidateCache();
return $db->update(
@@ -329,7 +329,7 @@
}
 
$oTitle->invalidateCache();
-   return $db->insert($sTable, $aConditions + $aFields);
+   return $db->insert( $sTable, $aConditions + $aFields );
}
 
/**
@@ -393,6 +393,7 @@
'',
array( "ORDER BY" => "se_id DESC" )
);
+
if ( $oDbw->numRows( $res ) > 0 ) {
$row = $oDbw->fetchRow( $res );
 
@@ -419,11 +420,13 @@
} elseif ( strcmp( $sOrigText, 
urldecode($row['se_text'] ) ) == 0 ) {
$aData = array( "notexts" => "1" );
} else {
+   global $wgParser;
+   $oParserOptions = new ParserOptions();
$str = urldecode( $row['se_text'] );
$aData = array(
"time" => $oLang->time( 
$row['se_timestamp'] ),
"date" => $oLang->date( 
$row['se_timestamp'] ),
-   "html" => 
BsCore::getInstance()->parseWikiText( $str, 
RequestContext::getMain()->getTitle() ), //breaks on Mainpage
+   "html" => $wgParser->parse( $str, 
RequestContext::getMain()->getTitle(), $oParserOptions )->getText(), //breaks 
on Mainpage
"wiki" => $str,
"section" => $row['se_edit_section'],
"notexts" => 0
@@ -530,7 +533,7 @@
if( !in_array($sRef, array('SaferEditIsSomeoneEditing', 
'SaferEditSave')) ) return true;
 
$oTitle = Title::newFromText( $sTitle, $iNamespace );
-   if( is_null($oTitle) || !$oTitle->userCan('read') ) return true;
+   if ( is_null($oTitle) || !$oTitle->userCan('read') ) return 
true;
 
global $wgUser;
 
@@ -543,21 +546,24 @@
$aSingleResult['someoneEditingView'] = 
$aSingleResult['safereditView'] = '';
$oArticle = Article::newFromID( $iArticleId );
 
+   $bUseSE = BsConfig::get( 'MW::SaferEdit::UseSE' 
);
+   $sText = 
BsPageContentProvider::getInstance()->getContentFromTitle( $oTitle );
foreach ( $aIntermediateEdits as $oEdit ) {
-   if ( BsConfig::get( 
'MW::SaferEdit::UseSE' ) !== false && $oEdit->se_user_name == $wgUser->getName()
-   && trim($oEdit->se_text) != 
trim( BsPageContentProvider::getInstance()->getContentFromTitle( $oTitle ) ) ) {
+   if ( $bUseSE !== false && 
$oEdit->se_user_name == $wgUser->getName()
+   && trim( $oEdit->se_text ) != 

[MediaWiki-commits] [Gerrit] Performance: Increased ping interval - change (mediawiki...BlueSpiceFoundation)

2014-10-16 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Performance: Increased ping interval
..

Performance: Increased ping interval

A ping call all two seconds is way to much! Increased interval to 10
seconds.

Change-Id: Ie95876ace1b9e41ecb7b06eee69e5a5b7a084745
---
M includes/Core.class.php
1 file changed, 1 insertion(+), 1 deletion(-)


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

diff --git a/includes/Core.class.php b/includes/Core.class.php
index 1c46950..a587010 100644
--- a/includes/Core.class.php
+++ b/includes/Core.class.php
@@ -125,7 +125,7 @@
BsConfig::registerVar( 'MW::AnonUserImage', $sPath . 
'bs-user-anon-image.png', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING, 
'bs-pref-anonuserimage' );
BsConfig::registerVar( 'MW::DeletedUserImage', $sPath . 
'bs-user-deleted-image.png', BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_STRING, 
'bs-pref-deleteduserimage' );
BsConfig::registerVar( 'MW::UserImage', '', 
BsConfig::LEVEL_USER | BsConfig::TYPE_STRING | BsConfig::NO_DEFAULT, 
'bs-authors-profileimage' );
-   BsConfig::registerVar( 'MW::PingInterval', 2, 
BsConfig::LEVEL_PUBLIC | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_INT, 
'bs-pref-bspinginterval' );
+   BsConfig::registerVar( 'MW::PingInterval', 10, 
BsConfig::LEVEL_PUBLIC | BsConfig::RENDER_AS_JAVASCRIPT | BsConfig::TYPE_INT, 
'bs-pref-bspinginterval' );
BsConfig::registerVar( 'MW::SortAlph', false, 
BsConfig::LEVEL_PUBLIC | BsConfig::LEVEL_USER | BsConfig::TYPE_BOOL, 
'bs-pref-sortalph', 'toggle' );
BsConfig::registerVar( 'MW::TestMode', false, 
BsConfig::LEVEL_PUBLIC | BsConfig::TYPE_BOOL, 'bs-pref-testmode', 'toggle' );
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie95876ace1b9e41ecb7b06eee69e5a5b7a084745
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


[MediaWiki-commits] [Gerrit] Improved caching - change (mediawiki...BlueSpiceFoundation)

2014-10-16 Thread Smuggli (Code Review)
Smuggli has uploaded a new change for review.

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

Change subject: Improved caching
..

Improved caching

 * Invalidate settings cache directly after insertion not kinda additional in a 
hook

Change-Id: Ie3cb9508ebd0614a74e5ef136584d27f6be3405e
---
M BlueSpice.hooks.php
M includes/Config.class.php
M includes/utility/CacheHelper.class.php
3 files changed, 11 insertions(+), 19 deletions(-)


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

diff --git a/BlueSpice.hooks.php b/BlueSpice.hooks.php
index d3f9342..6d6a654 100644
--- a/BlueSpice.hooks.php
+++ b/BlueSpice.hooks.php
@@ -15,7 +15,6 @@
 
 // START cache invalidation hooks
 $wgHooks['PageContentSaveComplete'][] = 
'BsCacheHelper::onPageContentSaveComplete';
-$wgHooks['BsSettingsAfterSaveSettings'][] = 
'BsCacheHelper::onBsSettingsAfterSaveSettings';
 // END cache invalidation hooks
 
 if ( !isset( $wgHooks['EditPage::showEditForm:initial'] ) ) {
diff --git a/includes/Config.class.php b/includes/Config.class.php
index d5916d7..da5a355 100644
--- a/includes/Config.class.php
+++ b/includes/Config.class.php
@@ -271,10 +271,10 @@
 * loads all settings from the database and saves the instances for 
every variable internal.
 */
public static function loadSettings() {
-   $sKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'loadSettings' );
+   $sKey = BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'settings' );
$aData = BsCacheHelper::get( $sKey );
 
-   if( $aData !== false ) {
+   if ( $aData !== false ) {
wfDebugLog( 'BsMemcached' , __CLASS__.': Fetching 
settings from cache' );
$aRows = $aData;
} else {
@@ -323,7 +323,7 @@
# if the setting is a boolean type then make sure, it
# gets saved as boolean type
if ( $setting->getOptions () & self::TYPE_BOOL ) {
-   $value = ( bool ) $setting->getValue ();
+   $value = (bool) $setting->getValue ();
} else {
$value = $setting->getValue ();
}
@@ -334,10 +334,17 @@
);
}
 
-   # write the settings array to the database
wfRunHooks( 'BsSettingsBeforeSaveSettings', array( &$aSettings 
) );
+
+   # write the settings array to the database
$bReturn = $dbw->insert('bs_settings', $aSettings);
+
wfRunHooks( 'BsSettingsAfterSaveSettings', array( $aSettings ) 
);
+
+   BsCacheHelper::invalidateCache(
+   BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'settings' )
+   );
+
return $bReturn;
}
 
diff --git a/includes/utility/CacheHelper.class.php 
b/includes/utility/CacheHelper.class.php
index 14f41d3..770c379 100644
--- a/includes/utility/CacheHelper.class.php
+++ b/includes/utility/CacheHelper.class.php
@@ -116,18 +116,4 @@
return true;
}
 
-   /**
-* Invalidates bs settings cache
-* @param type $aSettings
-*/
-   public static function onBsSettingsAfterSaveSettings( $aSettings ) {
-   $aKeys = array(
-   BsCacheHelper::getCacheKey( 'BlueSpice', 'BsConfig', 
'loadSettings' )
-   );
-
-   BsCacheHelper::invalidateCache( $aKeys );
-
-   return true;
-   }
-
 }
\ No newline at end of file

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie3cb9508ebd0614a74e5ef136584d27f6be3405e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceFoundation
Gerrit-Branch: master
Gerrit-Owner: Smuggli 

___
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits


  1   2   3   4   >