No need of option. A new parameter on url is enough.
This commit is contained in:
Laurent Destailleur 2020-01-28 03:34:56 +01:00
parent 51d750cb49
commit 40636adb56
3 changed files with 7 additions and 3 deletions

View File

@ -178,6 +178,7 @@ $message .= $langs->trans("AgendaUrlOptionsNotAdmin", $user->login, $user->login
$message .= $langs->trans("AgendaUrlOptions4", $user->login, $user->login).'<br>';
$message .= $langs->trans("AgendaUrlOptionsProject", $user->login, $user->login).'<br>';
$message .= $langs->trans("AgendaUrlOptionsNotAutoEvent", 'systemauto', 'systemauto').'<br>';
$message .= $langs->trans("AgendaUrlOptionsIncludeHolidays", '1', '1').'<br>';
print info_admin($message);

View File

@ -123,6 +123,7 @@ AgendaUrlOptionsNotAdmin=<b>logina=!%s</b> to restrict output to actions not own
AgendaUrlOptions4=<b>logint=%s</b> to restrict output to actions assigned to user <b>%s</b> (owner and others).
AgendaUrlOptionsProject=<b>project=__PROJECT_ID__</b> to restrict output to actions linked to project <b>__PROJECT_ID__</b>.
AgendaUrlOptionsNotAutoEvent=<b>notactiontype=systemauto</b> to exclude automatic events.
AgendaUrlOptionsIncludeHolidays=<b>includeholidays=1</b> to include events of holidays.
AgendaShowBirthdayEvents=Show birthdays of contacts
AgendaHideBirthdayEvents=Hide birthdays of contacts
Busy=Busy

View File

@ -34,8 +34,10 @@ if (! defined('NOREQUIREHTML')) define('NOREQUIREHTML', '1'); // If we don't ne
if (! defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
if (! defined('NOLOGIN')) define("NOLOGIN", 1); // This means this output page does not require to be logged.
if (! defined('NOCSRFCHECK')) define("NOCSRFCHECK", 1); // We accept to go on this page from external web site.
if (! defined('NOIPCHECK')) define('NOIPCHECK', '1'); // Do not check IP defined into conf $dolibarr_main_restrict_ip
// C'est un wrapper, donc header vierge
// It's a wrapper, so empty header
/**
* Header function
@ -72,7 +74,7 @@ if (GETPOST("format", 'alpha')) $format=GETPOST("format", 'apha');
if (GETPOST("type", 'apha')) $type=GETPOST("type", 'alpha');
$filters=array();
if (GETPOST("year", 'int')) $filters['year']=GETPOST("year", 'int');
if (GETPOST("year", 'int')) $filters['year']=GETPOST("year", 'int');
if (GETPOST("id", 'int')) $filters['id']=GETPOST("id", 'int');
if (GETPOST("idfrom", 'int')) $filters['idfrom']=GETPOST("idfrom", 'int');
if (GETPOST("idto", 'int')) $filters['idto']=GETPOST("idto", 'int');
@ -157,7 +159,7 @@ $agenda=new ActionComm($db);
$cachedelay=0;
if (! empty($conf->global->MAIN_AGENDA_EXPORT_CACHE)) $cachedelay=$conf->global->MAIN_AGENDA_EXPORT_CACHE;
$exportholidays = empty($conf->global->AGENDA_SHOW_HOLIDAYS) ? 0 : 1;
$exportholidays = GETPOST('includeholidays', 'int');
// Build file
if ($format == 'ical' || $format == 'vcal')