Moved hardcoded html filepaths into config file for extensibility (#354)

Co-authored-by: chatfield <chatfield@creatuity.com>
Co-authored-by: Fred Brennan <copypaste@kittens.ph>
This commit is contained in:
C Hatfield
2022-08-29 09:50:45 -05:00
committed by GitHub
parent 0f94915fdf
commit ae2d91c534
7 changed files with 129 additions and 68 deletions

View File

@@ -72,7 +72,7 @@
if(!preg_match('/[^*^\s]/', $phrase) && empty($filters)) {
_syslog(LOG_WARNING, 'Query too broad.');
$body .= '<p class="unimportant" style="text-align:center">(Query too broad.)</p>';
echo Element('page.html', Array(
echo Element($config['file_page_template'], Array(
'config'=>$config,
'title'=>'Search',
'body'=>$body,
@@ -133,7 +133,7 @@
if($query->rowCount() == $search_limit) {
_syslog(LOG_WARNING, 'Query too broad.');
$body .= '<p class="unimportant" style="text-align:center">('._('Query too broad.').')</p>';
echo Element('page.html', Array(
echo Element($config['file_page_template'], Array(
'config'=>$config,
'title'=>'Search',
'body'=>$body,
@@ -167,7 +167,7 @@
$body .= '<p style="text-align:center" class="unimportant">('._('No results.').')</p>';
}
echo Element('page.html', Array(
echo Element($config['file_page_template'], Array(
'config'=>$config,
'title'=>_('Search'),
'boardlist'=>createBoardlist(),