public function execute( $par ) { $out = $this->getOutput(); $lang = $this->getLanguage(); $request = $this->getRequest(); if( $request->wasPosted() ) { $out->disable(); $action = $request->getVal( 'action' ); $selection_name = $request->getText( 'selection' ); if( $action == 'addtoselection' ) { $success = Selection::addEntries( $selection_name, $entries ); $sel_page = new SpecialSelection(); $url = $sel_page->getTitle()->getLinkUrl( array( 'name' => $selection_name ) ); $return = array( 'status' => $success, 'selection_url' => $url ); } echo json_encode($return); return; } $fields = array( 'Project-Name' => array( 'type' => 'text', 'label-message' => 'ss-project', 'tabindex' => '1' ), 'Importance' => array( 'type' => 'text', 'label-message' => 'ss-importance', 'tabindex' => '2' ), 'Quality' => array( 'type' => 'text', 'label-message' => 'ss-quality', 'tabindex' => '3' ) ); $project = $request->getText( 'wpProject' ); $importance = $request->getText( 'wpImportance' ); $quality = $request->getText( 'wpQuality' ); $filters = array_filter( array( 'r_project' => $project, 'r_importance' => $importance, 'r_quality' => $quality ) ); $this->setHeaders(); $this->outputHeader(); $out->setPageTitle( $this->msg( 'ss-filter-ratings' ) ); $form = new HTMLForm( $fields, $this->getContext() ); $form->setMethod( 'get' ); $form->prepareForm(); $form->displayForm( '' ); $pager = new RatingsPager( $this, $filters ); if ( $pager->getNumRows() ) { $out->addHTML( $pager->getNavigationBar() . $pager->getBody() ); } else { $out->addWikiMsg( 'ss-ratings-empty' ); } return; }