mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-18 07:23:13 +00:00
fix #1095 : task archive crashed
This commit is contained in:
@@ -2045,7 +2045,8 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
|
||||
$appbox = appbox::get_instance(\bootstrap::getCore());
|
||||
|
||||
$sql = 'SELECT record_id
|
||||
if ($appbox->get_session()->get_usr_id()) {
|
||||
$sql = 'SELECT record_id
|
||||
FROM regroup g
|
||||
INNER JOIN (record r
|
||||
INNER JOIN collusr c
|
||||
@@ -2058,11 +2059,22 @@ class record_adapter implements record_Interface, cache_cacheableInterface
|
||||
ON (g.rid_child = r.record_id AND g.rid_parent = :record_id)
|
||||
ORDER BY g.ord ASC, dateadd ASC, record_id ASC';
|
||||
|
||||
$params = array(
|
||||
':GV_site' => $appbox->get_registry()->get('GV_sit')
|
||||
, ':usr_id' => $appbox->get_session()->get_usr_id()
|
||||
, ':record_id' => $this->get_record_id()
|
||||
);
|
||||
$params = array(
|
||||
':GV_site' => $appbox->get_registry()->get('GV_sit')
|
||||
, ':usr_id' => $appbox->get_session()->get_usr_id()
|
||||
, ':record_id' => $this->get_record_id()
|
||||
);
|
||||
} else {
|
||||
$sql = 'SELECT record_id
|
||||
FROM regroup g
|
||||
INNER JOIN record r
|
||||
ON (g.rid_child = r.record_id AND g.rid_parent = :record_id)
|
||||
ORDER BY g.ord ASC, dateadd ASC, record_id ASC';
|
||||
|
||||
$params = array(
|
||||
':record_id' => $this->get_record_id()
|
||||
);
|
||||
}
|
||||
|
||||
$stmt = $this->get_databox()->get_connection()->prepare($sql);
|
||||
$stmt->execute($params);
|
||||
|
Reference in New Issue
Block a user