mirror of
https://github.com/e107inc/e107.git
synced 2025-08-05 06:07:32 +02:00
Issue #857 - Page category advanced search - display only when chapters available.
This commit is contained in:
@@ -72,18 +72,9 @@ class page_search extends e_search // include plugin-folder in the name.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$search = array(
|
$search = array(
|
||||||
'name' => "Pages",
|
'name' => "Pages",
|
||||||
'table' => 'page AS p LEFT JOIN #page_chapters AS c ON p.page_chapter = c.chapter_id ',
|
'table' => 'page AS p LEFT JOIN #page_chapters AS c ON p.page_chapter = c.chapter_id ',
|
||||||
|
|
||||||
'advanced' => array(
|
|
||||||
'cat' => array('type' => 'dropdown', 'text' => "Search in Book/Chapter", 'list'=>$catList),
|
|
||||||
// 'date'=> array('type' => 'date', 'text' => LAN_DATE_POSTED),
|
|
||||||
// 'match'=> array('type' => 'dropdown', 'text' => LAN_SEARCH_52, 'list'=>$matchList)
|
|
||||||
),
|
|
||||||
|
|
||||||
'return_fields' => array('p.page_id', 'p.page_title', 'p.page_sef', 'p.page_text', 'p.page_chapter', 'p.page_datestamp', 'p.menu_image'),
|
'return_fields' => array('p.page_id', 'p.page_title', 'p.page_sef', 'p.page_text', 'p.page_chapter', 'p.page_datestamp', 'p.menu_image'),
|
||||||
'search_fields' => array('p.page_title' => '1.2', 'p.page_text' => '0.6', 'p.page_metakeys'=> '1.0'), // fields and their weights.
|
'search_fields' => array('p.page_title' => '1.2', 'p.page_text' => '0.6', 'p.page_metakeys'=> '1.0'), // fields and their weights.
|
||||||
|
|
||||||
@@ -91,6 +82,14 @@ class page_search extends e_search // include plugin-folder in the name.
|
|||||||
'refpage' => 'page.php'
|
'refpage' => 'page.php'
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if(!empty($catList))
|
||||||
|
{
|
||||||
|
$search['advanced'] = array(
|
||||||
|
'cat' => array('type' => 'dropdown', 'text' => "Search in Book/Chapter", 'list'=>$catList),
|
||||||
|
// 'date'=> array('type' => 'date', 'text' => LAN_DATE_POSTED),
|
||||||
|
// 'match'=> array('type' => 'dropdown', 'text' => LAN_SEARCH_52, 'list'=>$matchList)
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
return $search;
|
return $search;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user