Debug v16
This commit is contained in:
parent
2e1dfc9a43
commit
8023e1b0cd
@ -397,7 +397,7 @@ if ($actioncode || GETPOSTISSET('search_actioncode')) {
|
|||||||
if ($resourceid > 0) {
|
if ($resourceid > 0) {
|
||||||
$param .= "&search_resourceid=".urlencode($resourceid);
|
$param .= "&search_resourceid=".urlencode($resourceid);
|
||||||
}
|
}
|
||||||
if ($status || GETPOSTISSET('status')) {
|
if ($status || GETPOSTISSET('status') || GETPOSTISSET('search_status')) {
|
||||||
$param .= "&search_status=".urlencode($status);
|
$param .= "&search_status=".urlencode($status);
|
||||||
}
|
}
|
||||||
if ($filter) {
|
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>';
|
$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
|
// Calendars from hooks
|
||||||
$parameters = array(); $object = null;
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action);
|
$reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action);
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
$s .= $hookmanager->resPrint;
|
$s .= $hookmanager->resPrint;
|
||||||
@ -1213,7 +1213,7 @@ if (count($listofextcals)) {
|
|||||||
$addevent = true;
|
$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)
|
} 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'];
|
$datestart = $icalevent['DTSTART'];
|
||||||
$dateend = $icalevent['DTEND'];
|
$dateend = empty($icalevent['DTEND']) ? $datestart : $icalevent['DTEND'];
|
||||||
|
|
||||||
$datestart += +($offsettz * 3600);
|
$datestart += +($offsettz * 3600);
|
||||||
$dateend += +($offsettz * 3600);
|
$dateend += +($offsettz * 3600);
|
||||||
|
|||||||
@ -98,9 +98,9 @@ $year = GETPOST("year", "int") ?GETPOST("year", "int") : date("Y");
|
|||||||
$month = GETPOST("month", "int") ? GETPOST("month", "int") : date("m");
|
$month = GETPOST("month", "int") ? GETPOST("month", "int") : date("m");
|
||||||
$week = GETPOST("week", "int") ? GETPOST("week", "int") : date("W");
|
$week = GETPOST("week", "int") ? GETPOST("week", "int") : date("W");
|
||||||
$day = GETPOST("day", "int") ? GETPOST("day", "int") : date("d");
|
$day = GETPOST("day", "int") ? GETPOST("day", "int") : date("d");
|
||||||
$pid = GETPOST("search_projectid", "int", 3) ?GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
$pid = GETPOSTISSET("search_projectid") ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
||||||
$status = GETPOST("search_status", 'alpha') ?GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha');
|
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha');
|
||||||
$type = GETPOST("search_type", 'alpha') ?GETPOST("search_type", 'alpha') : GETPOST("type", '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);
|
$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')
|
$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)
|
// Set actioncode (this code must be same for setting actioncode into peruser, listacton and index)
|
||||||
@ -144,7 +144,7 @@ $tmparray = explode('-', $tmp);
|
|||||||
$begin_d = 1;
|
$begin_d = 1;
|
||||||
$end_d = 53;
|
$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);
|
$status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||||
}
|
}
|
||||||
if (empty($mode) && !GETPOSTISSET('mode')) {
|
if (empty($mode) && !GETPOSTISSET('mode')) {
|
||||||
@ -164,6 +164,8 @@ if (GETPOST('viewyear', 'alpha') || $mode == 'show_year') {
|
|||||||
$mode = 'show_year';
|
$mode = 'show_year';
|
||||||
} // View by year
|
} // View by year
|
||||||
|
|
||||||
|
$object = new ActionComm($db);
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('users', 'agenda', 'other', 'commercial'));
|
$langs->loadLangs(array('users', 'agenda', 'other', 'commercial'));
|
||||||
|
|
||||||
@ -175,6 +177,8 @@ if ($user->socid && $socid) {
|
|||||||
$result = restrictedArea($user, 'societe', $socid);
|
$result = restrictedArea($user, 'societe', $socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$search_status = $status;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -276,7 +280,7 @@ if ($actioncode || GETPOSTISSET('search_actioncode')) {
|
|||||||
if ($resourceid > 0) {
|
if ($resourceid > 0) {
|
||||||
$param .= "&search_resourceid=".urlencode($resourceid);
|
$param .= "&search_resourceid=".urlencode($resourceid);
|
||||||
}
|
}
|
||||||
if ($status || GETPOSTISSET('status')) {
|
if ($status || GETPOSTISSET('status') || GETPOSTISSET('search_status')) {
|
||||||
$param .= "&search_status=".urlencode($status);
|
$param .= "&search_status=".urlencode($status);
|
||||||
}
|
}
|
||||||
if ($filter) {
|
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>';
|
//$s.='<div class="nowrap float"><input type="checkbox" id="check_birthday" name="check_birthday"> '.$langs->trans("AgendaShowBirthdayEvents").' </div>';
|
||||||
|
|
||||||
// Calendars from hooks
|
// Calendars from hooks
|
||||||
$parameters = array(); $object = null;
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action);
|
$reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action);
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
$s .= $hookmanager->resPrint;
|
$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");
|
$month = GETPOST("month", "int") ?GETPOST("month", "int") : date("m");
|
||||||
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
$week = GETPOST("week", "int") ?GETPOST("week", "int") : date("W");
|
||||||
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
|
$day = GETPOST("day", "int") ?GETPOST("day", "int") : date("d");
|
||||||
$pid = GETPOST("search_projectid", "int", 3) ?GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
$pid = GETPOSTISSET("search_projectid") ? GETPOST("search_projectid", "int", 3) : GETPOST("projectid", "int", 3);
|
||||||
$status = GETPOST("search_status", 'alpha') ?GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha');
|
$status = GETPOSTISSET("search_status") ? GETPOST("search_status", 'alpha') : GETPOST("status", 'alpha');
|
||||||
$type = GETPOST("search_type", 'alpha') ?GETPOST("search_type", 'alpha') : GETPOST("type", '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);
|
$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')
|
$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)
|
// 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;
|
$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);
|
$status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($mode) && !GETPOSTISSET('mode')) {
|
if (empty($mode) && !GETPOSTISSET('mode')) {
|
||||||
$mode = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW);
|
$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"));
|
$mode = 'show_day'; $day = ($day ? $day : date("d"));
|
||||||
} // View by day
|
} // View by day
|
||||||
|
|
||||||
|
$object = new ActionComm($db);
|
||||||
|
|
||||||
// Load translation files required by the page
|
// Load translation files required by the page
|
||||||
$langs->loadLangs(array('users', 'agenda', 'other', 'commercial'));
|
$langs->loadLangs(array('users', 'agenda', 'other', 'commercial'));
|
||||||
|
|
||||||
@ -181,6 +184,8 @@ if ($user->socid && $socid) {
|
|||||||
$result = restrictedArea($user, 'societe', $socid);
|
$result = restrictedArea($user, 'societe', $socid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$search_status = $status;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Actions
|
* Actions
|
||||||
@ -282,7 +287,8 @@ if ($actioncode || GETPOSTISSET('search_actioncode')) {
|
|||||||
if ($resourceid > 0) {
|
if ($resourceid > 0) {
|
||||||
$param .= "&search_resourceid=".urlencode($resourceid);
|
$param .= "&search_resourceid=".urlencode($resourceid);
|
||||||
}
|
}
|
||||||
if ($status || GETPOSTISSET('status')) {
|
|
||||||
|
if ($status || GETPOSTISSET('status') || GETPOSTISSET('search_status')) {
|
||||||
$param .= "&search_status=".urlencode($status);
|
$param .= "&search_status=".urlencode($status);
|
||||||
}
|
}
|
||||||
if ($filter) {
|
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>';
|
//$s.='<div class="nowrap float"><input type="checkbox" id="check_birthday" name="check_birthday"> '.$langs->trans("AgendaShowBirthdayEvents").' </div>';
|
||||||
|
|
||||||
// Calendars from hooks
|
// Calendars from hooks
|
||||||
$parameters = array(); $object = null;
|
$parameters = array();
|
||||||
$reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action);
|
$reshook = $hookmanager->executeHooks('addCalendarChoice', $parameters, $object, $action);
|
||||||
if (empty($reshook)) {
|
if (empty($reshook)) {
|
||||||
$s .= $hookmanager->resPrint;
|
$s .= $hookmanager->resPrint;
|
||||||
@ -509,9 +515,7 @@ $s = $newtitle;
|
|||||||
print $s;
|
print $s;
|
||||||
|
|
||||||
print '<div class="liste_titre liste_titre_bydiv centpercent">';
|
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_actions_filter($form, $canedit, $search_status, $year, $month, $day, $showbirthday, 0, $filtert, 0, $pid, $socid, $action, -1, $actioncode, $usergroup, '', $resourceid);
|
||||||
print '</div>';
|
print '</div>';
|
||||||
|
|
||||||
|
|||||||
@ -7792,7 +7792,7 @@ class Form
|
|||||||
if (is_array($tmpvalue)) {
|
if (is_array($tmpvalue)) {
|
||||||
$value = $tmpvalue['label'];
|
$value = $tmpvalue['label'];
|
||||||
$disabled = empty($tmpvalue['disabled']) ? '' : ' disabled';
|
$disabled = empty($tmpvalue['disabled']) ? '' : ' disabled';
|
||||||
$style = empty($tmpvalue['css']) ? ' class="'.$tmpvalue['css'].'"' : '';
|
$style = empty($tmpvalue['css']) ? '' : ' class="'.$tmpvalue['css'].'"';
|
||||||
} else {
|
} else {
|
||||||
$value = $tmpvalue;
|
$value = $tmpvalue;
|
||||||
$disabled = '';
|
$disabled = '';
|
||||||
|
|||||||
@ -3748,7 +3748,7 @@ class User extends CommonObject
|
|||||||
*/
|
*/
|
||||||
public function findUserIdByEmail($email)
|
public function findUserIdByEmail($email)
|
||||||
{
|
{
|
||||||
if ($this->findUserIdByEmailCache[$email]) {
|
if (isset($this->findUserIdByEmailCache[$email])) {
|
||||||
return $this->findUserIdByEmailCache[$email];
|
return $this->findUserIdByEmailCache[$email];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user