aboutsummaryrefslogtreecommitdiffstats
path: root/theme/admin
diff options
context:
space:
mode:
authorThomas Lange <code@nerdmind.de>2021-07-22 21:17:57 +0200
committerThomas Lange <code@nerdmind.de>2021-07-22 21:17:57 +0200
commit0db1beaea6b849790aa0f1f4ecbf6439ce4f1104 (patch)
treee4fb555253891bbf8b192cd7ab5fd28cd7ef914c /theme/admin
parentcb9097e0199cf6afca3f144edb7d7addaec1cb59 (diff)
downloadblog-0db1beaea6b849790aa0f1f4ecbf6439ce4f1104.tar.gz
blog-0db1beaea6b849790aa0f1f4ecbf6439ce4f1104.tar.xz
blog-0db1beaea6b849790aa0f1f4ecbf6439ce4f1104.zip
Catch possible PDOException for search request
Catch possible PDOException on search requests with queries like "*" and pass the exception message to the template for displaying.
Diffstat (limited to 'theme/admin')
-rw-r--r--theme/admin/html/page/search.php10
-rw-r--r--theme/admin/html/post/search.php10
2 files changed, 20 insertions, 0 deletions
diff --git a/theme/admin/html/page/search.php b/theme/admin/html/page/search.php
index 906502f..7250056 100644
--- a/theme/admin/html/page/search.php
+++ b/theme/admin/html/page/search.php
@@ -2,6 +2,16 @@
<h1><i class="fa fa-search"></i><?=$Language->text('title_page_search')?></h1>
<p><?=$Language->text('search_page_desc')?></p>
+<?php if($FORM['INFO']): ?>
+ <div id="message-list-wrapper">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach ?>
+ </ul>
+ </div>
+<?php endif ?>
+
<form id="search-form" method="GET">
<div class="form-grid no-bottom-border">
<label for="form_query">
diff --git a/theme/admin/html/post/search.php b/theme/admin/html/post/search.php
index 1afc5e7..10aa43d 100644
--- a/theme/admin/html/post/search.php
+++ b/theme/admin/html/post/search.php
@@ -2,6 +2,16 @@
<h1><i class="fa fa-search"></i><?=$Language->text('title_post_search')?></h1>
<p><?=$Language->text('search_post_desc')?></p>
+<?php if($FORM['INFO']): ?>
+ <div id="message-list-wrapper">
+ <ul id="message-list">
+ <?php foreach($FORM['INFO'] as $message): ?>
+ <li><?=$message?></li>
+ <?php endforeach ?>
+ </ul>
+ </div>
+<?php endif ?>
+
<form id="search-form" method="GET">
<div class="form-grid no-bottom-border">
<label for="form_query">