diff --git a/lib/Alchemy/Phrasea/Controller/Prod/MoveCollectionController.php b/lib/Alchemy/Phrasea/Controller/Prod/MoveCollectionController.php index c4fe729538..50e2219e0d 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/MoveCollectionController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/MoveCollectionController.php @@ -114,6 +114,7 @@ class MoveCollectionController extends Controller $trashCollectionsBySbasId = []; foreach ($records as $record) { + $oldCollectionId = $record->getCollection()->get_coll_id(); $record->move_to_collection($collection, $this->getApplicationBox()); if ($request->request->get("chg_coll_son") == "1") { @@ -130,7 +131,7 @@ class MoveCollectionController extends Controller $trashCollectionsBySbasId[$sbasId] = $record->getDatabox()->getTrashCollection(); } if ($trashCollectionsBySbasId[$sbasId] !== null) { - if ($record->getCollection()->get_coll_id() == $trashCollectionsBySbasId[$sbasId]->get_coll_id() && $collection->get_coll_id() !== $trashCollectionsBySbasId[$sbasId]->get_coll_id()) { + if ($oldCollectionId == $trashCollectionsBySbasId[$sbasId]->get_coll_id() && $collection->get_coll_id() !== $trashCollectionsBySbasId[$sbasId]->get_coll_id()) { // record is already in trash so active it foreach ($record->get_subdefs() as $subdef) { if (($pl = $subdef->get_permalink())) { diff --git a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php index 1e8724c0ee..790e33525d 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/QueryController.php @@ -214,7 +214,7 @@ class QueryController extends Controller if (min($d2top, $d2bottom) < 4) { if ($d2bottom < 4) { if($page != 1){ - $string .= ""; + $string .= ""; } for ($i = 1; ($i <= 4 && (($i <= $npages) === true)); $i++) { if ($i == $page) @@ -223,13 +223,13 @@ class QueryController extends Controller $string .= '' . $i . ''; } if ($npages > 4) - $string .= ""; - $string .= ''; + $string .= ""; + $string .= ''; } else { $start = $npages - 4; if (($start) > 0){ - $string .= ''; - $string .= ''; + $string .= ''; + $string .= ''; }else $start = 1; for ($i = ($start); $i <= $npages; $i++) { @@ -239,11 +239,11 @@ class QueryController extends Controller $string .= '' . $i . ''; } if($page < $npages){ - $string .= ""; + $string .= ""; } } } else { - $string .= ''; + $string .= ''; for ($i = ($page - 2); $i <= ($page + 2); $i++) { if ($i == $page) @@ -252,10 +252,10 @@ class QueryController extends Controller $string .= '' . $i . ''; } - $string .= ''; + $string .= ''; } } - $string .= '
'; + $string .= '
'; $explain = $this->render( "prod/results/infos.html.twig", @@ -470,7 +470,6 @@ class QueryController extends Controller $json['results'] = $this->render($template, ['results'=> $result]); } - return $this->app->json($json); }