public function execute($par)
 {
     //big table, big wikiHow page
     global $wgHooks;
     $wgHooks['ShowSideBar'][] = array('SpecialListFiles::removeSideBarCallback');
     $this->setHeaders();
     $this->outputHeader();
     if ($this->including()) {
         $userName = $par;
         $search = '';
         $showAll = false;
     } else {
         $userName = $this->getRequest()->getText('user', $par);
         $search = $this->getRequest()->getText('ilsearch', '');
         $showAll = $this->getRequest()->getBool('ilshowall', false);
     }
     $pager = new ImageListPager($this->getContext(), $userName, $search, $this->including(), $showAll);
     if ($this->including()) {
         $html = $pager->getBody();
     } else {
         $form = $pager->getForm();
         $body = $pager->getBody();
         $nav = $pager->getNavigationBar();
         $html = "{$form}<br />\n{$body}<br />\n{$nav}";
     }
     $this->getOutput()->addHTML($html);
 }
示例#2
0
	public function execute( $par ) {
		$this->setHeaders();
		$this->outputHeader();

		if ( $this->including() ) {
			$userName = $par;
			$search = '';
		} else {
			$userName = $this->getRequest()->getText( 'user', $par );
			$search = $this->getRequest()->getText( 'ilsearch', '' );
			$showAll = $this->getRequest()->getBool( 'ilshowall', false );
		}

		$pager = new ImageListPager(
			$this->getContext(),
			$userName,
			$search,
			$this->including(),
			$showAll
		);

		if ( $this->including() ) {
			$html = $pager->getBody();
		} else {
			$form = $pager->getForm();
			$body = $pager->getBody();
			$nav = $pager->getNavigationBar();
			$html = "$form<br />\n$body<br />\n$nav";
		}
		$this->getOutput()->addHTML( $html );
	}
示例#3
0
/**
 *
 */
function wfSpecialListfiles()
{
    global $wgOut;
    $pager = new ImageListPager();
    $limit = $pager->getForm();
    $body = $pager->getBody();
    $nav = $pager->getNavigationBar();
    $wgOut->addHTML("{$limit}<br />\n{$body}<br />\n{$nav}");
}
/**
 *
 */
function wfSpecialImagelist()
{
    global $wgOut;
    $pager = new ImageListPager();
    $limit = $pager->getForm();
    $body = $pager->getBody();
    $nav = $pager->getNavigationBar();
    $wgOut->addHTML($limit . '<br/>' . $body . '<br/>' . $nav);
}
示例#5
0
/**
 *
 */
function wfSpecialImagelist()
{
    global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest, $wgMiserMode;
    $pager = new ImageListPager();
    $limit = $pager->getForm();
    $body = $pager->getBody();
    $nav = $pager->getNavigationBar();
    $wgOut->addHTML("\n\t\t{$limit}\n\t\t<br/>\n\t\t{$body}\n\t\t{$nav}");
}
示例#6
0
 public function execute($par)
 {
     global $wgOut, $wgRequest;
     $this->setHeaders();
     $this->outputHeader();
     if ($this->including()) {
         $userName = $par;
         $search = '';
     } else {
         $userName = $wgRequest->getText('user', $par);
         $search = $wgRequest->getText('ilsearch', '');
     }
     $pager = new ImageListPager($userName, $search, $this->including());
     if ($this->including()) {
         $html = $pager->getBody();
     } else {
         $form = $pager->getForm();
         $body = $pager->getBody();
         $nav = $pager->getNavigationBar();
         $html = "{$form}<br />\n{$body}<br />\n{$nav}";
     }
     $wgOut->addHTML($html);
 }
 function execute($par)
 {
     global $wgOut;
     $cacheManager = new \PageAttachment\Cache\CacheManager();
     $pageFactory = new \PageAttachment\Session\PageFactory($cacheManager);
     $security = new \PageAttachment\Security\SecurityManager();
     $session = new \PageAttachment\Session\Session($security, $pageFactory);
     $attachToPage = $session->getAttachToPage();
     if (isset($attachToPage) && $attachToPage->getId() > 0) {
         $pageTitle = $attachToPage->getPageTitle();
         $protectedPage = $attachToPage->isProtected();
         if (!$security->isBrowseSearchAttachAllowed($protectedPage)) {
             if ($security->isBrowseSearchAttachRequireLogin() && !$security->isLoggedIn()) {
                 $session->setStatusMessage('YouMustBeLoggedInToBrowseSearchAttach');
             } else {
                 $session->setStatusMessage('BrowseSearchAttachIsNotPermitted');
             }
             $wgOut->redirect($attachToPage->getRedirectURL());
         } else {
             $context = $this->getContext();
             $userName = $this->getRequest()->getText('user', $par);
             $search = $this->getRequest()->getText('ilsearch', '');
             $this->setHeaders();
             $pager = new ImageListPager($context, $userName, $search);
             $limit = $pager->getForm();
             $body = $pager->getBody();
             $nav = $pager->getNavigationBar();
             $msgAttachToPageName = \wfMsg('AttachToPageName', $pageTitle);
             $wgOut->addHTML("{$limit}<br />\n{$body}<br />\n{$nav}");
         }
     } else {
         $session->setStatusMessage('UnableToDetermineAttachToPage');
         $title = \Title::newFromText(\wfMsgForContent('mainpage'));
         $wgOut->redirect($title->getFullURL());
     }
 }