From 0719b52874063cc4e757ddc33e0034253121759c Mon Sep 17 00:00:00 2001 From: rvelices Date: Wed, 17 Sep 2014 18:33:52 +0000 Subject: - active search filter but empty string in batch manager does not change the results - if the quick search engine drops a searched term, indicate it in the admin batch manager git-svn-id: http://piwigo.org/svn/trunk@29600 68402e56-0260-453c-a942-63ccdbb3a9ee --- admin/batch_manager.php | 7 ++++++- admin/themes/default/template/batch_manager_global.tpl | 10 ++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) (limited to 'admin') diff --git a/admin/batch_manager.php b/admin/batch_manager.php index 905035fac..47a40f813 100644 --- a/admin/batch_manager.php +++ b/admin/batch_manager.php @@ -507,10 +507,15 @@ SELECT id $filter_sets[] = query2array($query, null, 'id'); } -if (isset($_SESSION['bulk_manager_filter']['search'])) +if (isset($_SESSION['bulk_manager_filter']['search']) && + strlen($_SESSION['bulk_manager_filter']['search']['q'])) { include_once( PHPWG_ROOT_PATH .'include/functions_search.inc.php' ); $res = get_quick_search_results_no_cache($_SESSION['bulk_manager_filter']['search']['q'], array('permissions'=>false)); + if (!empty($res['items']) && !empty($res['qs']['unmatched_terms'])) + { + $template->assign('no_search_results', $res['qs']['unmatched_terms']); + } $filter_sets[] = $res['items']; } diff --git a/admin/themes/default/template/batch_manager_global.tpl b/admin/themes/default/template/batch_manager_global.tpl index 648253277..dd218cda0 100644 --- a/admin/themes/default/template/batch_manager_global.tpl +++ b/admin/themes/default/template/batch_manager_global.tpl @@ -417,6 +417,16 @@ var sliders = { {combine_script id='core.scripts' load='async' path='themes/default/js/scripts.js'} +{if (isset($no_search_results))} +
{'No results for'|@translate} : + + {foreach $no_search_results as $res} + {if !$res@first} — {/if} + {$res} + {/foreach} + +
+{/if}
  • -- cgit v1.2.3