Robert Vogel has uploaded a new change for review.

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

Change subject: SmartList: Allow variables/parserfunctions as args
......................................................................

SmartList: Allow variables/parserfunctions as args

One can now use parser variables like {{PAGENAME}} or parser functions
within the tags arguments

Change-Id: I6758856b7a7732fd7e2c662a4d726be8fc10bfda
---
M SmartList/SmartList.class.php
1 file changed, 4 insertions(+), 0 deletions(-)


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

diff --git a/SmartList/SmartList.class.php b/SmartList/SmartList.class.php
index 871a526..3bd9203 100644
--- a/SmartList/SmartList.class.php
+++ b/SmartList/SmartList.class.php
@@ -543,6 +543,10 @@
         */
        public function onTagSmartList( $sInput, $aArgs, $oParser ) {
                $oParser->disableCache();
+               foreach( $aArgs as $sArg => $sVal ) {
+                       //Allow Magic Words (Variables) and Parser Functions as 
arguments
+                       $aArgs[$sArg] = $oParser->recursivePreprocess( $sVal );
+               }
 
                //Get arguments
                $aArgs['count'] = BsCore::sanitizeArrayEntry( $aArgs, 'count', 
5, BsPARAMTYPE::INT );

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6758856b7a7732fd7e2c662a4d726be8fc10bfda
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Robert Vogel <[email protected]>

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

Reply via email to