From 720a368b297cc38f82a150e428220488ee9bb7d1 Mon Sep 17 00:00:00 2001 From: Dorian Vabre Date: Thu, 20 May 2021 17:24:27 +0200 Subject: [PATCH] link ics ok (todo: add name of speaker) --- htdocs/comm/action/class/actioncomm.class.php | 7 +++++-- .../class/conferenceorbooth.class.php | 2 ++ .../conferenceorbooth_list.php | 7 ++++--- htdocs/langs/en_US/eventorganization.lang | 1 + htdocs/public/agenda/agendaexport.php | 17 +++++++++++++---- 5 files changed, 25 insertions(+), 9 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index a6f9faf353f..747c50c9640 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1901,8 +1901,11 @@ class ActionComm extends CommonObject $sql .= " AND ar.fk_element = 0"; } } - if ($key == 'author') { - $sql .= " AND u.lastname = '".$this->db->escape($value)."'"; + if ($key == 'module') { + $sql .= " AND c.module LIKE '%".$value."'"; + } + if ($key == 'status') { + $sql .= " AND a.status =".$value; } } diff --git a/htdocs/eventorganization/class/conferenceorbooth.class.php b/htdocs/eventorganization/class/conferenceorbooth.class.php index 1719f0c508d..ff26d192301 100644 --- a/htdocs/eventorganization/class/conferenceorbooth.class.php +++ b/htdocs/eventorganization/class/conferenceorbooth.class.php @@ -134,6 +134,8 @@ class ConferenceOrBooth extends ActionComm public $status; // END MODULEBUILDER PROPERTIES + public $pubregister; + /** * Constructor * diff --git a/htdocs/eventorganization/conferenceorbooth_list.php b/htdocs/eventorganization/conferenceorbooth_list.php index 24d6853abda..15664896700 100644 --- a/htdocs/eventorganization/conferenceorbooth_list.php +++ b/htdocs/eventorganization/conferenceorbooth_list.php @@ -430,11 +430,11 @@ if ($projectid > 0) { // Define $urlwithroot $urlwithouturlroot = preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; - $getentity = ($conf->entity > 1 ? "&entity=".$conf->entity : ""); // Show message - $message = ''; + $message = 'global->MAIN_AGENDA_XCAL_EXPORTKEY ?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY) : '...'); + $message .= "&project=".$projectid.'&module='.urlencode('@eventorganization').'&status='.ConferenceOrBooth::STATUS_CONFIRMED.'">'.$langs->trans('DownloadICSLink').''; $message .= ''; $message .= '
'; print $message; @@ -457,6 +457,7 @@ if ($projectid > 0) { // -------------------------------------------------------------------- $sql = 'SELECT '; $sql .= $object->getFieldList('t'); + // Add fields from extrafields if (!empty($extrafields->attributes[$object->table_element]['label'])) { foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) { diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index f990779b305..335c257b224 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -82,6 +82,7 @@ PriceOfBoothHelp=Subscription price to stand a booth EventOrganizationICSLink=Link ICS for events ConferenceOrBoothInformation=Conference Or Booth informations Attendees = Attendees +DownloadICSLink = Download ICS link EVENTORGANIZATION_SECUREKEY = Secure Key of the public registration link to a conference SERVICE_BOOTH_LOCATION = Service used for the invoice row about a booth location SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION = Service used for the invoice row about an attendee subscription to a conference diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index 6a07680c9b9..5d48ffb06fe 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -135,11 +135,11 @@ if (GETPOST("notolderthan", 'int')) { } else { $filters['notolderthan'] = $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY; } -if (GETPOST("author", 'apha')) { - $filters['author'] = GETPOST("author", 'apha'); +if (GETPOST("module", 'alpha')) { + $filters['module'] = GETPOST("module", 'alpha'); } -if (GETPOST("module", 'apha')) { - $filters['module'] = GETPOST("module", 'apha'); +if (GETPOST("status", 'int')) { + $filters['status'] = GETPOST("status", 'int'); } // Check config if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY)) { @@ -206,6 +206,15 @@ foreach ($filters as $key => $value) { if ($key == 'notactiontype') { $filename .= '-notactiontype'.$value; } + if ($key == 'actiontype') { + $filename .= '-actiontype'.$value; + } + if ($key == 'module') { + $filename .= '-module'.$value; + } + if ($key == 'status') { + $filename .= '-status'.$value; + } } // Add extension if ($format == 'vcal') {