Exemplo n.º 1
0
 /**
  * Return contribution/copyright notice
  */
 public function getCopyrightNotice()
 {
     $wikitext = parent::getCopywarn();
     $parser = new Parser();
     return $parser->parse($wikitext, $this->app->wg->Title, new ParserOptions())->getText();
 }
Exemplo n.º 2
0
 /**
  * Return contribution/copyright notice
  */
 public function getCopyrightNotice()
 {
     global $wgMemc, $wgLang;
     wfProfileIn(__METHOD__);
     $wikitext = parent::getCopywarn();
     $key = wfMemcKey(__METHOD__, $wgLang->getCode(), md5($wikitext));
     $text = $wgMemc->get($key);
     if (empty($text)) {
         wfProfileIn(__METHOD__ . '-parse');
         $text = ParserPool::parse($wikitext, $this->app->wg->Title, new ParserOptions())->getText();
         wfProfileOut(__METHOD__ . '-parse');
         $wgMemc->set($key, $text, self::COPYRIGHT_CACHE_TTL);
     }
     wfProfileOut(__METHOD__);
     return $text;
 }