예제 #1
0
 /**
  * Get information about the repo - overrides/extends the parent
  * class's information.
  * @return array
  * @since 1.22
  */
 function getInfo()
 {
     $info = parent::getInfo();
     $info['apiurl'] = $this->getApiUrl();
     $query = ['format' => 'json', 'action' => 'query', 'meta' => 'siteinfo', 'siprop' => 'general'];
     $data = $this->httpGetCached('SiteInfo', $query, 7200);
     if ($data) {
         $siteInfo = FormatJson::decode($data, true);
         $general = $siteInfo['query']['general'];
         $info['articlepath'] = $general['articlepath'];
         $info['server'] = $general['server'];
         if (isset($general['favicon'])) {
             $info['favicon'] = $general['favicon'];
         }
     }
     return $info;
 }
예제 #2
0
 /**
  * Return information about the repository.
  *
  * @return array
  * @since 1.22
  */
 function getInfo()
 {
     global $wgFavicon;
     return array_merge(parent::getInfo(), array('favicon' => wfExpandUrl($wgFavicon)));
 }
예제 #3
0
 /**
  * Return information about the repository.
  *
  * @return array
  * @since 1.22
  */
 function getInfo()
 {
     return FileRepo::getInfo();
 }