FIX rename "dolresource" into "resource" for compatibility with PR 11822

This commit is contained in:
VESSILLER 2019-09-05 11:57:12 +02:00
parent 9ed09db93c
commit 815d0bbc20
2 changed files with 3 additions and 3 deletions

View File

@ -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 .= " 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 .= " WHERE ac.id != " . $object->id;
$sql .= " AND er.resource_id IN (";

View File

@ -105,7 +105,7 @@ if (empty($reshook))
// 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
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;
$eventDateEnd = $objstat->datef;
$isFullDayEvent = intval($objstat->fulldayevent);
@ -185,7 +185,7 @@ if (empty($reshook))
$object->busy = $busy;
$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;
$eventDateEnd = $object->objelement->datef;
$isFullDayEvent = intval($objstat->fulldayevent);