Add hint to update a search.
Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
This commit is contained in:
parent
1fa4cdf800
commit
5cf8424a7f
13
db_qbe.php
13
db_qbe.php
@ -21,6 +21,7 @@ $cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
$savedSearchList = array();
|
||||
$currentSearchId = null;
|
||||
$displayUpdateSearchHint = false;
|
||||
if ($cfgRelation['savedsearcheswork']) {
|
||||
include 'libraries/SavedSearches.php';
|
||||
$header = $response->getHeader();
|
||||
@ -39,6 +40,7 @@ if ($cfgRelation['savedsearcheswork']) {
|
||||
if ('save' === $_REQUEST['action']) {
|
||||
$saveResult = $savedSearch->setCriterias($_REQUEST)
|
||||
->save();
|
||||
$displayUpdateSearchHint = true;
|
||||
/*if (!$saveResult) {
|
||||
$response->addHTML('raté');
|
||||
exit();
|
||||
@ -52,6 +54,7 @@ if ($cfgRelation['savedsearcheswork']) {
|
||||
$_REQUEST = array();
|
||||
} elseif ('load' === $_REQUEST['action']) {
|
||||
$loadResult = $savedSearch->load();
|
||||
$displayUpdateSearchHint = true;
|
||||
}
|
||||
//Else, it's an "update query"
|
||||
}
|
||||
@ -115,5 +118,15 @@ if ($cfgRelation['designerwork']) {
|
||||
)
|
||||
);
|
||||
}
|
||||
if ($displayUpdateSearchHint) {
|
||||
$response->addHTML(
|
||||
PMA_Message::notice(
|
||||
__(
|
||||
'After saving or loading a search, you can rename it and save the '
|
||||
. 'new criterias.'
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
$response->addHTML($db_qbe->getSelectionForm($cfgRelation));
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user