Gerharddiller85 has uploaded a new change for review.

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

Change subject: Nutzungsstatistik erhoben Change-Id: 
I53f5dc6b6c7334ed8e697c40309f303f1764ed82
......................................................................

Nutzungsstatistik erhoben
Change-Id: I53f5dc6b6c7334ed8e697c40309f303f1764ed82
---
M Checklist/Checklist.class.php
M Checklist/i18n/en.json
2 files changed, 33 insertions(+), 1 deletion(-)


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

diff --git a/Checklist/Checklist.class.php b/Checklist/Checklist.class.php
index 304146c..5eea3a1 100644
--- a/Checklist/Checklist.class.php
+++ b/Checklist/Checklist.class.php
@@ -52,6 +52,7 @@
                $this->setHook( 'VisualEditorConfig' );
                $this->mCore->registerPermission( 'checklistmodify', array( 
'user' ) );
                wfProfileOut( 'BS::'.__METHOD__ );
+                $this->setHook( 'BSUsageTrackerRegisterCollectors' );
        }
 
        /**
@@ -164,7 +165,12 @@
 
        public function onMagicWordBsChecklist( $input, $args, $parser ) {
                $parser->disableCache();
-
+                
+               if ( $parser instanceof Parser ) {
+               $parser->getOutput()->setProperty( 'bs-tag-checklist', 1 );
+               }
+               
+               
                $this->bCheckboxFound = true;
                $sOut = array();
 
@@ -241,4 +247,29 @@
                return true;
        }
 
+
+        public static function hasChecks( SMW\SemanticData $aSemanticData, 
WikiPage $aWikiPage, SMW\DIProperty $aProperty ) {
+
+        $oTitle = $aWikiPage->this->bCheckboxFound;
+        if( $oTitle )
+            $oTitle = "Checkbox found!";        
+        $aSemanticData->addPropertyObjectValue( //this is the only relevant 
step, data from above is just for example
+        $aProperty, SMW\DIWikiPage::newFromTitle( Title::newFromText( $oTitle 
) )
+        );
+
+    }
+        
+      public function onBSUsageTrackerRegisterCollectors( &$aCollectorsConfig 
) {
+          error_log("here");
+          error_log(BSDebug::logVar($aCollectorsConfig['bs:checklist']));
+        $aCollectorsConfig['bs:checklist'] = array(
+            'class' => 'Property',
+            'config' => array(
+                'identifier' => 'bs-tag-checklist'
+            )
+        );
+        error_log("there");
+        error_log(BSDebug::logVar($aCollectorsConfig['bs:checklist']));
+   }  
+
 }
diff --git a/Checklist/i18n/en.json b/Checklist/i18n/en.json
index 7382dac..065855b 100644
--- a/Checklist/i18n/en.json
+++ b/Checklist/i18n/en.json
@@ -5,6 +5,7 @@
                        "Markus Glaser <gla...@hallowelt.biz>"
                ]
        },
+        "bs-tag-checklist": "the checklist tag",
        "bs-checklist-desc": "Provides checklist functionality",
        "bs-checklist-button-checkbox-title": "Checklist elements",
        "bs-checklist-menu-insert-list-title": "Insert list",

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I53f5dc6b6c7334ed8e697c40309f303f1764ed82
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Gerharddiller85 <gerharddil...@icloud.com>

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

Reply via email to