mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Debug v16
This commit is contained in:
parent
2e1dfc9a43
commit
8023e1b0cd
|
|
@ -397,7 +397,7 @@ if ($actioncode || GETPOSTISSET('search_actioncode')) {
|
|||
if ($resourceid > 0) {
|
||||
$param .= "&search_resourceid=".urlencode($resourceid);
|
||||
}
|
||||
if ($status || GETPOSTISSET('status')) {
|
||||
if ($status || GETPOSTISSET('status') || GETPOSTISSET('search_status')) {
|
||||
$param .= "&search_status=".urlencode($status);
|
||||
}
|
||||
if ($filter) {
|
||||
|
|
@ -622,7 +622,7 @@ if (!empty($conf->use_javascript_ajax)) { // If javascript on
|
|||
$s .= '<div class="nowrap inline-block minheight30"><input type="checkbox" id="check_birthday" name="check_birthday" class="check_birthday"><label for="check_birthday"> <span class="check_birthday_text">'.$langs->trans("AgendaShowBirthdayEvents").'</span></label> </div>';
|
||||
|
||||
// Calendars from hooks
|
||||
$parameters = array(); $object = null;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action);
|
||||
if (empty($reshook)) {
|
||||
$s .= $hookmanager->resPrint;
|
||||
|
|
@ -1213,7 +1213,7 @@ if (count($listofextcals)) {
|
|||
$addevent = true;
|
||||
} elseif (!is_array($icalevent['DTSTART'])) { // not fullday event (DTSTART is not array. It is a value like '19700101T000000Z' for 00:00 in greenwitch)
|
||||
$datestart = $icalevent['DTSTART'];
|
||||
$dateend = $icalevent['DTEND'];
|
||||
$dateend = empty($icalevent['DTEND']) ? $datestart : $icalevent['DTEND'];
|
||||
|
||||
$datestart += +($offsettz * 3600);
|
||||
$dateend += +($offsettz * 3600);
|
||||
|
|
|
|||
|
|
@ -93,15 +93,15 @@ if (empty($user->rights->agenda->allactions->read) || $filter == 'mine') { // I
|
|||
}
|
||||
|
||||
$mode = 'show_pertype';
|
||||
$resourceid = GETPOST("search_resourceid", "int") ?GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int");
|
||||
$year = GETPOST("year", "int") ?GETPOST("year", "int") : date("Y");
|
||||
$month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m");
|
||||
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
||||
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
|
||||
$pid = GETPOST("search_projectid", "int", 3) ?GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
||||
$status = GETPOST("search_status", 'alpha') ?GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha');
|
||||
$type = GETPOST("search_type", 'alpha') ?GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha');
|
||||
$maxprint = ((GETPOST("maxprint", 'int') != '') ?GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||
$resourceid = GETPOST("search_resourceid", "int") ? GETPOST("search_resourceid", "int") : GETPOST("resourceid", "int");
|
||||
$year = GETPOST("year", "int") ? GETPOST("year", "int") : date("Y");
|
||||
$month = GETPOST("month", "int") ? GETPOST("month", "int") : date("m");
|
||||
$week = GETPOST("week", "int") ? GETPOST("week", "int") : date("W");
|
||||
$day = GETPOST("day", "int") ? GETPOST("day", "int") : date("d");
|
||||
$pid = GETPOSTISSET("search_projectid") ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
||||
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha');
|
||||
$type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha');
|
||||
$maxprint = ((GETPOST("maxprint", 'int') != '') ? GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index)
|
||||
if (GETPOST('search_actioncode', 'array')) {
|
||||
|
|
@ -144,7 +144,7 @@ $tmparray = explode('-', $tmp);
|
|||
$begin_d = 1;
|
||||
$end_d = 53;
|
||||
|
||||
if ($status == '' && !GETPOSTISSET('status')) {
|
||||
if ($status == '' && !GETPOSTISSET('search_status')) {
|
||||
$status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||
}
|
||||
if (empty($mode) && !GETPOSTISSET('mode')) {
|
||||
|
|
@ -164,6 +164,8 @@ if (GETPOST('viewyear', 'alpha') || $mode == 'show_year') {
|
|||
$mode = 'show_year';
|
||||
} // View by year
|
||||
|
||||
$object = new ActionComm($db);
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('users', 'agenda', 'other', 'commercial'));
|
||||
|
||||
|
|
@ -175,6 +177,8 @@ if ($user->socid && $socid) {
|
|||
$result = restrictedArea($user, 'societe', $socid);
|
||||
}
|
||||
|
||||
$search_status = $status;
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
|
@ -276,7 +280,7 @@ if ($actioncode || GETPOSTISSET('search_actioncode')) {
|
|||
if ($resourceid > 0) {
|
||||
$param .= "&search_resourceid=".urlencode($resourceid);
|
||||
}
|
||||
if ($status || GETPOSTISSET('status')) {
|
||||
if ($status || GETPOSTISSET('status') || GETPOSTISSET('search_status')) {
|
||||
$param .= "&search_status=".urlencode($status);
|
||||
}
|
||||
if ($filter) {
|
||||
|
|
@ -402,7 +406,7 @@ if ($conf->use_javascript_ajax) {
|
|||
//$s.='<div class="nowrap float"><input type="checkbox" id="check_birthday" name="check_birthday"> '.$langs->trans("AgendaShowBirthdayEvents").' </div>';
|
||||
|
||||
// Calendars from hooks
|
||||
$parameters = array(); $object = null;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action);
|
||||
if (empty($reshook)) {
|
||||
$s .= $hookmanager->resPrint;
|
||||
|
|
|
|||
|
|
@ -98,9 +98,9 @@ $year = GETPOST("year", "int") ?GETPOST("year", "int") : date("Y");
|
|||
$month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m");
|
||||
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
||||
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
|
||||
$pid = GETPOST("search_projectid", "int", 3) ?GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
||||
$status = GETPOST("search_status", 'alpha') ?GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha');
|
||||
$type = GETPOST("search_type", 'alpha') ?GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha');
|
||||
$pid = GETPOSTISSET("search_projectid") ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
||||
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha');
|
||||
$type = GETPOSTISSET("search_type") ? GETPOST("search_type", 'alpha') : GETPOST("type", 'alpha');
|
||||
$maxprint = ((GETPOST("maxprint", 'int') != '') ?GETPOST("maxprint", 'int') : $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW);
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index)
|
||||
|
|
@ -153,9 +153,10 @@ if ($end_d < $begin_d) {
|
|||
$end_d = $begin_d + 1;
|
||||
}
|
||||
|
||||
if ($status == '' && !GETPOSTISSET('status')) {
|
||||
if ($status == '' && !GETPOSTISSET('search_status')) {
|
||||
$status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||
}
|
||||
|
||||
if (empty($mode) && !GETPOSTISSET('mode')) {
|
||||
$mode = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW);
|
||||
}
|
||||
|
|
@ -170,6 +171,8 @@ if (GETPOST('viewday', 'alpha') || $mode == 'show_day') {
|
|||
$mode = 'show_day'; $day = ($day ? $day : date("d"));
|
||||
} // View by day
|
||||
|
||||
$object = new ActionComm($db);
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('users', 'agenda', 'other', 'commercial'));
|
||||
|
||||
|
|
@ -181,6 +184,8 @@ if ($user->socid && $socid) {
|
|||
$result = restrictedArea($user, 'societe', $socid);
|
||||
}
|
||||
|
||||
$search_status = $status;
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
|
|
@ -282,7 +287,8 @@ if ($actioncode || GETPOSTISSET('search_actioncode')) {
|
|||
if ($resourceid > 0) {
|
||||
$param .= "&search_resourceid=".urlencode($resourceid);
|
||||
}
|
||||
if ($status || GETPOSTISSET('status')) {
|
||||
|
||||
if ($status || GETPOSTISSET('status') || GETPOSTISSET('search_status')) {
|
||||
$param .= "&search_status=".urlencode($status);
|
||||
}
|
||||
if ($filter) {
|
||||
|
|
@ -412,7 +418,7 @@ if ($conf->use_javascript_ajax) {
|
|||
//$s.='<div class="nowrap float"><input type="checkbox" id="check_birthday" name="check_birthday"> '.$langs->trans("AgendaShowBirthdayEvents").' </div>';
|
||||
|
||||
// Calendars from hooks
|
||||
$parameters = array(); $object = null;
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action);
|
||||
if (empty($reshook)) {
|
||||
$s .= $hookmanager->resPrint;
|
||||
|
|
@ -509,9 +515,7 @@ $s = $newtitle;
|
|||
print $s;
|
||||
|
||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
||||
if (empty($search_status)) {
|
||||
$search_status = '';
|
||||
}
|
||||
|
||||
print_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||
print '</div>';
|
||||
|
||||
|
|
|
|||
|
|
@ -7792,7 +7792,7 @@ class Form
|
|||
if (is_array($tmpvalue)) {
|
||||
$value = $tmpvalue['label'];
|
||||
$disabled = empty($tmpvalue['disabled']) ? '' : ' disabled';
|
||||
$style = empty($tmpvalue['css']) ? ' class="'.$tmpvalue['css'].'"' : '';
|
||||
$style = empty($tmpvalue['css']) ? '' : ' class="'.$tmpvalue['css'].'"';
|
||||
} else {
|
||||
$value = $tmpvalue;
|
||||
$disabled = '';
|
||||
|
|
|
|||
|
|
@ -3748,7 +3748,7 @@ class User extends CommonObject
|
|||
*/
|
||||
public function findUserIdByEmail($email)
|
||||
{
|
||||
if ($this->findUserIdByEmailCache[$email]) {
|
||||
if (isset($this->findUserIdByEmailCache[$email])) {
|
||||
return $this->findUserIdByEmailCache[$email];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user