From c85b75924fc205648e67eeadb95c726100c53900 Mon Sep 17 00:00:00 2001 From: Dorian Vabre Date: Mon, 10 May 2021 16:57:48 +0200 Subject: [PATCH] wip on adding a filter for the ics file + fix on class name --- htdocs/comm/action/class/actioncomm.class.php | 3 +++ htdocs/public/agenda/agendaexport.php | 3 +++ htdocs/public/project/suggestbooth.php | 2 +- htdocs/public/project/suggestconference.php | 2 +- 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index d8bcd0efb1b..bf6fa9fcc56 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -1901,6 +1901,9 @@ class ActionComm extends CommonObject $sql .= " AND ar.fk_element = 0"; } } + if ($key == 'author') { + $sql .= " AND c.type = '".$this->db->escape($value)."'"; + } } $sql .= " AND a.datep IS NOT NULL"; // To exclude corrupted events and avoid errors in lightning/sunbird import diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php index d40d75c0acf..00514cd026c 100644 --- a/htdocs/public/agenda/agendaexport.php +++ b/htdocs/public/agenda/agendaexport.php @@ -135,6 +135,9 @@ if (GETPOST("notolderthan", 'int')) { } else { $filters['notolderthan'] = $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY; } +if (GETPOST("author", 'apha')) { + $filters['author'] = GETPOST("author", 'apha'); +} // Check config if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY)) { diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index f510a5274f0..65b15578b7d 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -439,7 +439,7 @@ if (empty($reshook) && $action == 'add') { } } else { // If no price has been set for the booth, we confirm it as suggested and we update - $conforbooth->status = CONFERENCEORBOOTH::STATUS_SUGGESTED; + $conforbooth->status = ConferenceOrBooth::STATUS_SUGGESTED; $conforbooth->update($user); // Sending mail require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 3eff5fad3a9..0028f544f9f 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -373,7 +373,7 @@ if (empty($reshook) && $action == 'add') { $error++; $errmsg .= $conforbooth->error; } else { - $conforbooth->status = CONFERENCEORBOOTH::STATUS_SUGGESTED; + $conforbooth->status = ConferenceOrBooth::STATUS_SUGGESTED; $conforbooth->update($user); // Sending mail