FIX rename "dolresource" into "resource" for compatibility with PR 11822
This commit is contained in:
parent
9ed09db93c
commit
815d0bbc20
@ -520,7 +520,7 @@ if ($action == 'update')
|
|||||||
|
|
||||||
$sql = "SELECT er.rowid, r.ref as r_ref, ac.id as ac_id, ac.label as ac_label";
|
$sql = "SELECT er.rowid, r.ref as r_ref, ac.id as ac_id, ac.label as ac_label";
|
||||||
$sql .= " FROM " . MAIN_DB_PREFIX . "element_resources as er";
|
$sql .= " FROM " . MAIN_DB_PREFIX . "element_resources as er";
|
||||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "resource as r ON r.rowid = er.resource_id AND er.resource_type = 'dolresource'";
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "resource as r ON r.rowid = er.resource_id AND er.resource_type = 'resource'";
|
||||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "actioncomm as ac ON ac.id = er.element_id AND er.element_type = '" . $db->escape($object->element) . "'";
|
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "actioncomm as ac ON ac.id = er.element_id AND er.element_type = '" . $db->escape($object->element) . "'";
|
||||||
$sql .= " WHERE ac.id != " . $object->id;
|
$sql .= " WHERE ac.id != " . $object->id;
|
||||||
$sql .= " AND er.resource_id IN (";
|
$sql .= " AND er.resource_id IN (";
|
||||||
|
|||||||
@ -105,7 +105,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
// TODO : add this check at update_linked_resource and when modifying event start or end date
|
// TODO : add this check at update_linked_resource and when modifying event start or end date
|
||||||
// check if an event resource is already in use
|
// check if an event resource is already in use
|
||||||
if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $objstat->element=='action' && $resource_type=='dolresource' && intval($busy)==1) {
|
if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $objstat->element=='action' && $resource_type=='resource' && intval($busy)==1) {
|
||||||
$eventDateStart = $objstat->datep;
|
$eventDateStart = $objstat->datep;
|
||||||
$eventDateEnd = $objstat->datef;
|
$eventDateEnd = $objstat->datef;
|
||||||
$isFullDayEvent = intval($objstat->fulldayevent);
|
$isFullDayEvent = intval($objstat->fulldayevent);
|
||||||
@ -185,7 +185,7 @@ if (empty($reshook))
|
|||||||
$object->busy = $busy;
|
$object->busy = $busy;
|
||||||
$object->mandatory = $mandatory;
|
$object->mandatory = $mandatory;
|
||||||
|
|
||||||
if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $object->element_type=='action' && $object->resource_type=='dolresource' && intval($object->busy)==1) {
|
if (!empty($conf->global->RESOURCE_USED_IN_EVENT_CHECK) && $object->element_type=='action' && $object->resource_type=='resource' && intval($object->busy)==1) {
|
||||||
$eventDateStart = $object->objelement->datep;
|
$eventDateStart = $object->objelement->datep;
|
||||||
$eventDateEnd = $object->objelement->datef;
|
$eventDateEnd = $object->objelement->datef;
|
||||||
$isFullDayEvent = intval($objstat->fulldayevent);
|
$isFullDayEvent = intval($objstat->fulldayevent);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user