Skip to content

Commit

Permalink
search results
Browse files Browse the repository at this point in the history
  • Loading branch information
juek committed Jul 10, 2018
1 parent 749987f commit af2e0e3
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions include/special/Search.php
Expand Up @@ -70,15 +70,11 @@ public function Search(){
global $langmessage;

echo '<div class="GPAREA filetype-special_search search_results">';
echo '<h2>' . \gp\tool\Output::GetAddonText('Search') . '</h2>';
echo '<form action="'.\gp\tool::GetUrl('special_gpsearch').'" method="get">';

echo '<h2>';
echo \gp\tool\Output::GetAddonText('Search');
echo '</h2>';
echo '<input name="q" type="text" class="text" value="'.htmlspecialchars($_REQUEST['q']).'"/> ';
$html = '<input type="submit" name="" class="submit" value="%s" />';
echo \gp\tool\Output::GetAddonText('Search',$html);

echo '</form>';

if( \gp\tool::LoggedIn() ){
Expand Down Expand Up @@ -217,7 +213,7 @@ public static function ReqPage($key = 'pg', $total_pages = null){
public static function PaginationLinks($current_page, $total_pages, $slug, $query, $page_key = 'pg', $attr=''){
global $langmessage;

if( $total_pages < 2 ){
if( $total_pages < 1 ){
return;
}

Expand All @@ -239,7 +235,7 @@ public static function PaginationLinks($current_page, $total_pages, $slug, $quer
for($i=$min_page;$i<$max_page;$i++){

if( $i == $current_page ){
echo '<li class="page-item active"><span class="page-link">'.($i+1).'</span></li>';
echo '<li class="page-item active"><span class="page-link">'.($i+1).'</span></li> ';
continue;
}
echo '<li class="page-item">';
Expand Down

0 comments on commit af2e0e3

Please sign in to comment.