mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-12 04:23:19 +00:00
Fix PR
This commit is contained in:
@@ -272,14 +272,18 @@ class Query implements ControllerProviderInterface
|
|||||||
*/
|
*/
|
||||||
public function queryAnswerTrain(Application $app, Request $request)
|
public function queryAnswerTrain(Application $app, Request $request)
|
||||||
{
|
{
|
||||||
$searchEngine = null;
|
if (null === $optionsSerial = $request->request->get('options_serial')) {
|
||||||
|
$app->abort(400, 'Search engine options are missing');
|
||||||
if (($options = unserialize($request->request->get('options_serial', ''))) !== false) {
|
|
||||||
$searchEngine = new \searchEngine_adapter($app);
|
|
||||||
$searchEngine->set_options($options);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$pos = (int) $request->request->get('pos');
|
if (($options = unserialize($optionsSerial)) !== false) {
|
||||||
|
$searchEngine = new \searchEngine_adapter($app);
|
||||||
|
$searchEngine->set_options($options);
|
||||||
|
} else {
|
||||||
|
$app->abort(400, 'Provided search engine options are not valid');
|
||||||
|
}
|
||||||
|
|
||||||
|
$pos = (int) $request->request->get('pos', 1);
|
||||||
$query = $request->request->get('query', '');
|
$query = $request->request->get('query', '');
|
||||||
|
|
||||||
$record = new \record_preview($app, 'RESULT', $pos, '', '', $searchEngine, $query);
|
$record = new \record_preview($app, 'RESULT', $pos, '', '', $searchEngine, $query);
|
||||||
|
@@ -2121,7 +2121,7 @@ function activeIcons()
|
|||||||
$('.TOOL_chgstatus_btn').live('click', function(){
|
$('.TOOL_chgstatus_btn').live('click', function(){
|
||||||
var params = {};
|
var params = {};
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
console.log(p4.Results.Selection.length());
|
|
||||||
if ($this.hasClass('results_window')) {
|
if ($this.hasClass('results_window')) {
|
||||||
if (p4.Results.Selection.length() > 0) {
|
if (p4.Results.Selection.length() > 0) {
|
||||||
params.lst = p4.Results.Selection.serialize();
|
params.lst = p4.Results.Selection.serialize();
|
||||||
|
Reference in New Issue
Block a user