Merge "Do not automatically infuse any OOjs UI widgets"
[lhc/web/wiklou.git] / includes / Pingback.php
index f633029..dd68102 100644 (file)
@@ -115,9 +115,11 @@ class Pingback {
         * as an associative array conforming to the Pingback schema on MetaWiki
         * (<https://meta.wikimedia.org/wiki/Schema:MediaWikiPingback>).
         *
+        * This is public so we can display it in the installer
+        *
         * @return array
         */
-       private function getData() {
+       public function getSystemInfo() {
                $event = [
                        'database'   => $this->config->get( 'DBtype' ),
                        'MediaWiki'  => $this->config->get( 'Version' ),
@@ -136,11 +138,20 @@ class Pingback {
                        $event['memoryLimit'] = $limit;
                }
 
+               return $event;
+       }
+
+       /**
+        * Get the EventLogging packet to be sent to the server
+        *
+        * @return array
+        */
+       private function getData() {
                return [
                        'schema'           => 'MediaWikiPingback',
                        'revision'         => self::SCHEMA_REV,
                        'wiki'             => $this->getOrCreatePingbackId(),
-                       'event'            => $event,
+                       'event'            => $this->getSystemInfo(),
                ];
        }
 
@@ -191,7 +202,7 @@ class Pingback {
         * <https://github.com/wikimedia/mediawiki-extensions-EventLogging/
         *   blob/7e5fe4f1ef/includes/EventLogging.php#L32-L74>
         *
-        * @param data Pingback data as an associative array
+        * @param array $data Pingback data as an associative array
         * @return bool true on success, false on failure
         */
        private function postPingback( array $data ) {