Add hint to update a search.

Signed-off-by: Hugues Peccatte <hugues.peccatte@gmail.com>
This commit is contained in:
Hugues Peccatte 2014-02-24 20:54:11 +01:00
parent 1fa4cdf800
commit 5cf8424a7f

View File

@ -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));
?>