Merge branch 'develop_new_workstation' of github.com:atm-gauthier/dolibarr into develop_new_workstation

This commit is contained in:
Gauthier PC portable 024 2020-12-21 12:38:59 +01:00
commit 4a2f38fcea
6 changed files with 27 additions and 36 deletions

View File

@ -46,7 +46,8 @@ class WorkstationResource extends CommonObject
} }
} }
static public function getAllResourcesOfWorkstation($fk_workstation) { static public function getAllResourcesOfWorkstation($fk_workstation)
{
global $db; global $db;
@ -62,10 +63,10 @@ class WorkstationResource extends CommonObject
} }
return $TRes; return $TRes;
} }
static public function deleteAllResourcesOfWorkstation($fk_workstation) { static public function deleteAllResourcesOfWorkstation($fk_workstation)
{
global $db; global $db;
@ -76,7 +77,5 @@ class WorkstationResource extends CommonObject
if (empty($resql)) return 0; if (empty($resql)) return 0;
return 1; return 1;
} }
} }

View File

@ -46,7 +46,8 @@ class WorkstationUserGroup extends CommonObject
} }
} }
static public function getAllGroupsOfWorkstation($fk_workstation) { static public function getAllGroupsOfWorkstation($fk_workstation)
{
global $db; global $db;
@ -62,10 +63,10 @@ class WorkstationUserGroup extends CommonObject
} }
return $TRes; return $TRes;
} }
static public function deleteAllGroupsOfWorkstation($fk_workstation) { static public function deleteAllGroupsOfWorkstation($fk_workstation)
{
global $db; global $db;
@ -76,7 +77,5 @@ class WorkstationUserGroup extends CommonObject
if (empty($resql)) return 0; if (empty($resql)) return 0;
return 1; return 1;
} }
} }

View File

@ -161,15 +161,10 @@ if (empty($reshook))
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php'; include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
if ($action == 'confirm_enable' && $confirm == "yes" && $permissiontoadd) { if ($action == 'confirm_enable' && $confirm == "yes" && $permissiontoadd) {
if (!empty($object->id)) $object->setStatus(1); if (!empty($object->id)) $object->setStatus(1);
} elseif ($action == 'confirm_disable' && $confirm == "yes" && $permissiontoadd) { } elseif ($action == 'confirm_disable' && $confirm == "yes" && $permissiontoadd) {
if (!empty($object->id)) $object->setStatus(0); if (!empty($object->id)) $object->setStatus(0);
} }
} }
@ -469,7 +464,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (empty($reshook)) if (empty($reshook))
{ {
// Modify // Modify
if ($permissiontoadd) { if ($permissiontoadd) {
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n"; print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit">'.$langs->trans("Modify").'</a>'."\n";
@ -503,7 +497,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
} }
print '</div>'."\n"; print '</div>'."\n";
} }
} }
// End of page // End of page