mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v20
This commit is contained in:
parent
5c36a834d1
commit
fe21cc3605
|
|
@ -2083,7 +2083,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
|
||||
print '</div><div class="fichehalfright">';
|
||||
|
||||
$MAX = 10;
|
||||
$MAXEVENT = 10;
|
||||
|
||||
$morehtmlcenter = '';
|
||||
$messagingUrl = DOL_URL_ROOT.'/adherents/messaging.php?rowid='.$object->id;
|
||||
|
|
@ -2093,7 +2093,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
// List of actions on element
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
$formactions = new FormActions($db);
|
||||
$somethingshown = $formactions->showactions($object, $object->element, $socid, 1, 'listactions', $MAX, '', $morehtmlcenter);
|
||||
$somethingshown = $formactions->showactions($object, $object->element, $socid, 1, 'listactions', $MAXEVENT, '', $morehtmlcenter);
|
||||
|
||||
print '</div></div>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -406,7 +406,7 @@ if ($rowid && $action != 'edit') {
|
|||
/*
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
|
||||
$formactions = new FormActions($db);
|
||||
$somethingshown = $formactions->showactions($object, $object->element, $socid, 1);
|
||||
$somethingshown = $formactions->showactions($object, $object->element, $socid, 1, '', $MAXEVENT);
|
||||
*/
|
||||
|
||||
print '</div></div>';
|
||||
|
|
|
|||
|
|
@ -1299,7 +1299,7 @@ class ActionComm extends CommonObject
|
|||
|
||||
/**
|
||||
* Load all objects with filters.
|
||||
* @TODO WARNING: This make a fetch on all records instead of making one request with a join.
|
||||
* @TODO WARNING: This make a fetch on all records instead of making one request with a join, like done into show_actions_done.
|
||||
*
|
||||
* @param int $socid Filter by thirdparty
|
||||
* @param int $fk_element Id of element action is linked to
|
||||
|
|
@ -1341,9 +1341,14 @@ class ActionComm extends CommonObject
|
|||
if ($elementtype == 'project') {
|
||||
$sql .= ' AND a.fk_project = '.((int) $fk_element);
|
||||
} elseif ($elementtype == 'contact') {
|
||||
$sql .= ' AND a.id IN';
|
||||
$sql .= " (SELECT fk_actioncomm FROM ".MAIN_DB_PREFIX."actioncomm_resources WHERE";
|
||||
$sql .= " element_type = 'socpeople' AND fk_element = ".((int) $fk_element).')';
|
||||
$sql .= ' AND EXISTS';
|
||||
$sql .= " (SELECT r.rowid FROM ".MAIN_DB_PREFIX."actioncomm_resources as r WHERE";
|
||||
$sql .= " r.element_type = 'socpeople' AND r.fk_element = ".((int) $fk_element).' AND r.fk_actioncomm = a.id)';
|
||||
} elseif ($elementtype == 'user') {
|
||||
$sql .= " AND (a.fk_user_action = ".((int) $fk_element)." OR EXISTS";
|
||||
$sql .= " (SELECT r.rowid FROM ".MAIN_DB_PREFIX."actioncomm_resources as r WHERE";
|
||||
$sql .= " r.element_type = 'user' AND r.fk_element = ".((int) $fk_element).' AND r.fk_actioncomm = a.id)';
|
||||
$sql .= ")";
|
||||
} else {
|
||||
$sql .= " AND a.fk_element = ".((int) $fk_element)." AND a.elementtype = '".$this->db->escape($elementtype)."'";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ class FormActions
|
|||
$url = DOL_URL_ROOT.'/comm/action/card.php?action=create&token='.newToken().'&datep='.urlencode(dol_print_date(dol_now(), 'dayhourlog', 'tzuser'));
|
||||
$url .= '&origin='.urlencode($typeelement).'&originid='.((int) $object->id).((!empty($object->socid) && $object->socid > 0) ? '&socid='.((int) $object->socid) : ((!empty($socid) && $socid > 0) ? '&socid='.((int) $socid) : ''));
|
||||
$url .= ($projectid > 0 ? '&projectid='.((int) $projectid) : '').($taskid > 0 ? '&taskid='.((int) $taskid) : '');
|
||||
$url .= ($assignedtouser > 0 ? '&assignedtouser='.$assignedtouser : '');
|
||||
$url .= ($assignedtouser > 0 ? '&assignedtouser='.((int) $assignedtouser) : '');
|
||||
$url .= '&backtopage='.urlencode($urlbacktopage);
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', $url);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2077,14 +2077,14 @@ if ($action == 'create') {
|
|||
// Show links to link elements
|
||||
$linktoelem = $form->showLinkToObjectBlock($object, null, array('supplier_proposal'));
|
||||
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
||||
|
||||
$MAXEVENT = 10;
|
||||
|
||||
print '</div><div class="fichehalfright">';
|
||||
|
||||
// List of actions on element
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
$formactions = new FormActions($db);
|
||||
$somethingshown = $formactions->showactions($object, 'supplier_proposal', $socid, 1);
|
||||
$somethingshown = $formactions->showactions($object, 'supplier_proposal', $socid, 1, '', $MAXEVENT);
|
||||
|
||||
print '</div></div>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2974,12 +2974,14 @@ if ($action == 'create' || $action == 'adduserldap') {
|
|||
$linktoelem = $form->showLinkToObjectBlock($object, null, null);
|
||||
$somethingshown = $form->showLinkedObjectBlock($object, $linktoelem);
|
||||
|
||||
$MAXEVENT = 10;
|
||||
|
||||
print '</div><div class="fichehalfright">';
|
||||
|
||||
// List of actions on element
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php';
|
||||
$formactions = new FormActions($db);
|
||||
$somethingshown = $formactions->showactions($object, 'user', $socid, 1, 'listactions', 0, '', '', $object->id);
|
||||
$somethingshown = $formactions->showactions($object, 'user', $socid, 1, 'listactions', $MAXEVENT, '', '', $object->id);
|
||||
|
||||
print '</div></div>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -508,7 +508,7 @@ if ($action == 'create') {
|
|||
// List of actions on element
|
||||
/*include_once DOL_DOCUMENT_ROOT . '/core/class/html.formactions.class.php';
|
||||
$formactions = new FormActions($db);
|
||||
$somethingshown = $formactions->showactions($object, 'usergroup', $socid, 1);*/
|
||||
$somethingshown = $formactions->showactions($object, 'usergroup', $socid, 1, '', $MAXEVENT);*/
|
||||
|
||||
print '</div></div>';
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user