Ejemplo n.º 1
0
 /**
  * @param $article Article
  *
  * @return bool
  */
 public function onBeforeDisplayNoArticleText($article)
 {
     $this->wf->profileIn(__METHOD__);
     if ($this->app->checkSkin('wikiamobile')) {
         $title = $article->getTitle();
         if ($title->getNamespace() == NS_USER) {
             //if user exists and it is not subpage display masthead
             //otherwise show 404 page
             $user = User::newFromName($title->getBaseText());
             if ($user instanceof User && $user->getId() > 0 && !$title->isSubpage()) {
                 $this->wf->profileOut(__METHOD__);
                 return true;
             }
         }
         self::$displayErrorPage = true;
     }
     $this->wf->profileOut(__METHOD__);
     return true;
 }