/**
  * Renders special page output.
  * @param string $sParameter Name of the article, who's review should be edited, or user whos review should be displayed.
  * @return bool Allow other hooked methods to be executed. always true.
  */
 public function execute($par)
 {
     parent::execute($par);
     if (!empty($par)) {
         global $wgRequest;
         $sData = $wgRequest->getVal('svg', '');
         if (!empty($sData)) {
             switch ($par) {
                 case 'export-png':
                     return $this->exportPNG($sData);
                 case 'export-svg':
                     return $this->exportSVG($sData);
             }
         }
     }
     $this->getOutput()->addHTML('<div id="bs-statistics-panel"></div>');
     $this->getOutput()->addModules('ext.bluespice.statistics');
     $this->getOutput()->setPagetitle(wfMessage('extendedstatistics')->plain());
     $bAllowPNGExport = false;
     global $wgSVGConverter, $wgSVGConverters;
     if ($wgSVGConverter != false && isset($wgSVGConverters[$wgSVGConverter])) {
         $bAllowPNGExport = true;
     }
     $this->getOutput()->addJsConfigVars('BsExtendedStatisticsAllowPNGExport', $bAllowPNGExport);
     return true;
 }
 /**
  *
  * @global OutputPage $this->getOutput()
  * @param type $sParameter
  * @return type 
  */
 public function execute($sParameter)
 {
     parent::execute($sParameter);
     $extension = false;
     if ($sParameter) {
         $sParameter = $this->parseParams($sParameter);
     } else {
         $sParameter = array('Page' => $this->getRequest()->getVal('Page', ''));
     }
     if (isset($sParameter['Page'])) {
         $extension = $sParameter['Page'];
     }
     $rssFeeds = RSSFeeder::getRegisteredFeeds();
     if ($extension && is_array($rssFeeds[$extension])) {
         $this->getOutput()->disable();
         $runner = $rssFeeds[$extension]['method'];
         header('Content-Type: application/xml; charset=UTF-8');
         echo $rssFeeds[$extension]['object']->{$runner}($sParameter);
         return;
     }
     $this->getOutput()->addModuleStyles('ext.bluespice.rssFeeder');
     $form = new ViewBaseForm();
     $form->setId('RSSFeederForm');
     #$form->setValidationUrl( 'index.php?&action=remote&mod=RSSFeeder&rf=validate' );
     $label = new ViewFormElementLabel();
     $label->useAutoWidth();
     $label->setText('<h3>' . wfMessage('bs-rssfeeder-pagetext')->plain() . '</h3>');
     $form->addItem($label);
     foreach ($rssFeeds as $name => $feed) {
         $func = $feed['buildLinks'];
         $form->addItem($feed['object']->{$func}());
     }
     $this->getOutput()->addHTML($form->execute());
 }
 /**
  * Renders special page output.
  * @param string $sParameter Name of the article, who's review should be edited, or user whos review should be displayed.
  * @return bool Allow other hooked methods to be executed. always true.
  */
 public function execute($sParameter)
 {
     parent::execute($sParameter);
     $sOut = '';
     $oOutputPage = $this->getOutput();
     $oOutputPage->addModules('ext.bluespice.review.overview');
     //TODO: Redundant?
     if (!$this->getUser()->isAllowed('workflowview')) {
         $sOut = wfMessage('bs-review-not-allowed')->plain();
         $oOutputPage->addHTML($sOut);
         return true;
     }
     $oUser = User::newFromName($sParameter);
     if ($oUser && $oUser->getId() > 0) {
         $sName = $oUser->getRealName();
         $sName = empty($sName) ? $oUser->getName() : $oUser->getRealName() . ' (' . $oUser->getName() . ')';
         $oOutputPage->setPagetitle(wfMessage('bs-review-specialreview-header', 1, $sName)->text());
         $oOutputPage->addJsConfigVars('bsSpecialReviewUserID', $oUser->getId());
         $oOutputPage->addJsConfigVars('bsSpecialReviewUserName', $oUser->getName());
     } else {
         $oOutputPage->setPagetitle(wfMessage('bs-review-specialreview-header', 0)->text());
     }
     $oOutputPage->addHTML($sOut);
     $oOutputPage->addHTML(Html::element('div', array('id' => 'bs-review-overview')));
     return true;
 }
 public function execute($par)
 {
     parent::execute($par);
     $oOut = $this->getOutput();
     $output = '';
     # Get request data from, e.g.
     $wa_mode = $this->getRequest()->getVal('mode', 'WikiAdmin');
     $wa_mode_Instance = null;
     $wa_mode_Credits = null;
     $runningModules = WikiAdmin::getRunningModules();
     foreach ($runningModules as $moduleName => $moduleInstance) {
         if (strcasecmp($wa_mode, $moduleName) == 0) {
             $wa_mode_Credits = WikiAdmin::getRegisteredModule($moduleName);
             if (!$this->getUser()->isAllowed($wa_mode_Credits['level'])) {
                 $output = wfMessage('bs-wikiadmin-notallowed')->plain();
                 $oOut->addHTML($output);
                 return;
             }
             $wa_mode = $moduleName;
             $wa_mode_Instance = $moduleInstance;
             $oOut->setPagetitle('WikiAdmin - ' . wfMessage($wa_mode_Credits['message'])->plain());
         }
     }
     if ($wa_mode_Instance != null) {
         $output .= $wa_mode_Instance->getForm();
     } else {
         $output = $this->getForm();
     }
     # Output
     $oOut->addHTML('<div class="bs-admincontrolbtns clearfix">' . $output . '</div>');
 }
 /**
  * 
  * @global OutputPage $wgOut
  * @param string $sParameter
  */
 public function execute($sParameter)
 {
     parent::execute($sParameter);
     $this->checkForReadOnly();
     $this->getAdminConfig();
     $this->getOutput()->addHTML(Html::element('div', array('id' => 'bs-dashboards-admindashboard')));
     return;
 }
 /**
  * Actually render the page content.
  * @param string $sParameter URL parameters to special page.
  * @return string Rendered HTML output.
  */
 public function execute($sParameter)
 {
     parent::execute($sParameter);
     $this->getOutput()->addModuleStyles('ext.bluespice.extendedsearch.specialpage.style');
     $this->getOutput()->addModules('ext.bluespice.extendedsearch.specialpage');
     $oExtendedsearchBase = new ExtendedSearchBase($this);
     $oView = $oExtendedsearchBase->renderSpecialpage();
     $this->getOutput()->addHTML($oView->execute());
 }
 /**
  * This method gets called by the MediaWiki framework on page display.
  * @param string $sParameter
  */
 function execute($sParameter)
 {
     parent::execute($sParameter);
     wfRunHooks('BSUniversalExportSpecialPageExecute', array($this, $sParameter, &$this->aModules));
     if (!empty($sParameter)) {
         $this->processParameter($sParameter);
     } else {
         $this->outputInformation();
     }
     return;
 }
 public function execute($par)
 {
     parent::execute($par);
     $oOutputPage = $this->getOutput();
     $dbr = wfGetDB(DB_SLAVE);
     $res = $dbr->select(array('page_props'), array('pp_page', 'pp_value'), array('pp_propname' => 'bs-page-access'));
     #TODO: Beautify output! Ext grid?
     while ($row = $dbr->fetchObject($res)) {
         $iPageID = $row->pp_page;
         $oTitle = Title::newFromID($iPageID);
         $oOutputPage->addHtml(Linker::link($oTitle, null, array(), array(), array('known')));
         $oOutputPage->addHtml(" (" . $row->pp_value . ")");
         $oOutputPage->addHtml("<br/>");
     }
 }
    public function execute($sParameter)
    {
        parent::execute($sParameter);
        $oRequestedTitle = null;
        $oOut = $this->getOutput();
        if (!empty($sParameter)) {
            $oRequestedTitle = Title::newFromText($sParameter);
            if ($oRequestedTitle->exists() && ($oRequestedTitle->getNamespace() !== NS_USER || $oRequestedTitle->isSubpage() === true)) {
                $sOut = $this->renderReadersGrid();
                $oOut->addModules('ext.bluespice.readers.specialreaders');
                $oOut->setPageTitle(wfMessage('readers', $oRequestedTitle->getFullText())->text());
                $oOut->addHtml('<script type="text/javascript">
						bsReadersTitle = "' . $oRequestedTitle->getPrefixedText() . '";
					</script>');
            } elseif ($oRequestedTitle->getNamespace() === NS_USER) {
                $sOut = $this->renderReaderspathGrid();
                $oOut->addModules('ext.bluespice.readers.specialreaderspath');
                $oUser = User::newFromName($oRequestedTitle->getText());
                $oOut->setPageTitle(wfMessage('readers-user', $oUser->getName())->text());
                $oOut->addHtml('<script type="text/javascript">
						bsReadersUserID = "' . $oUser->getId() . '";
					</script>');
            } else {
                $oErrorView = new ViewTagErrorList();
                $oErrorView->addItem(new ViewTagError(wfMessage('bs-readers-pagenotexists')->plain()));
                $sOut = $oErrorView->execute();
            }
        } else {
            $oErrorView = new ViewTagErrorList(BsExtensionManager::getExtension('Readers'));
            $oErrorView->addItem(new ViewTagError(wfMessage('bs-readers-emptyinput')->plain()));
            $sOut = $oErrorView->execute();
        }
        if ($oRequestedTitle === null) {
            $oOut->setPageTitle($oOut->getPageTitle());
        }
        $oOut->addHTML($sOut);
    }
 /**
  * 
  * @global OutputPage $wgOut
  * @param string $sParameter
  */
 public function execute($sParameter)
 {
     parent::execute($sParameter);
     $this->checkForReadOnly();
     $oDbr = wfGetDB(DB_SLAVE);
     $res = $oDbr->select('bs_dashboards_configs', '*', array('dc_identifier' => $this->getUser()->getId()), __METHOD__);
     if ($oDbr->numRows($res) > 0) {
         $row = $oDbr->fetchObject($res);
         $aPortalConfig = unserialize($row->dc_config);
         $aPortalConfig = FormatJson::decode($aPortalConfig);
     } else {
         $bIsDefault = true;
         $aPortalConfig = array(array(), array(), array());
         wfRunHooks('BSDashboardsUserDashboardPortalConfig', array($this, &$aPortalConfig, $bIsDefault));
     }
     $sSaveBackend = 'Dashboards::saveUserDashboardConfig';
     $sLocation = 'UserDashboard';
     $this->getOutput()->addJsConfigVars('bsPortalConfigSavebackend', $sSaveBackend);
     $this->getOutput()->addJsConfigVars('bsPortalConfigLocation', $sLocation);
     $this->getOutput()->addJsConfigVars('bsPortalConfig', $aPortalConfig);
     $this->getOutput()->addModuleStyles('ext.bluespice.extjs.BS.portal.css');
     $this->getOutput()->addModules('ext.bluespice.dashboards.userDashboard');
     $this->getOutput()->addHTML(Html::element('div', array('id' => 'bs-dashboards-userdashboard')));
 }
 public function execute($par)
 {
     parent::execute($par);
     $this->getOutput()->addModules('ext.bluespice.extensioninfo');
     $this->getOutput()->addHtml($this->getForm());
 }
 public function execute($sParameter)
 {
     parent::execute($sParameter);
     $sOut = $this->renderOverviewGrid();
     $this->getOutput()->addHTML($sOut);
 }