Merge branch '9.0' of git@github.com:Dolibarr/dolibarr.git into 9.0
This commit is contained in:
commit
51de29458f
@ -1391,6 +1391,8 @@ class ActionComm extends CommonObject
|
|||||||
*/
|
*/
|
||||||
function build_exportfile($format,$type,$cachedelay,$filename,$filters)
|
function build_exportfile($format,$type,$cachedelay,$filename,$filters)
|
||||||
{
|
{
|
||||||
|
global $hookmanager;
|
||||||
|
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf,$langs,$dolibarr_main_url_root,$mysoc;
|
global $conf,$langs,$dolibarr_main_url_root,$mysoc;
|
||||||
|
|
||||||
@ -1456,6 +1458,11 @@ class ActionComm extends CommonObject
|
|||||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)";
|
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)";
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; // Link to get author of event for export
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; // Link to get author of event for export
|
||||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
|
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
|
||||||
|
|
||||||
|
$parameters=array('filters' => $filters);
|
||||||
|
$reshook=$hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
|
$sql.=$hookmanager->resPrint;
|
||||||
|
|
||||||
// We must filter on assignement table
|
// We must filter on assignement table
|
||||||
if ($filters['logint']) $sql.=", ".MAIN_DB_PREFIX."actioncomm_resources as ar";
|
if ($filters['logint']) $sql.=", ".MAIN_DB_PREFIX."actioncomm_resources as ar";
|
||||||
$sql.= " WHERE a.fk_action=c.id";
|
$sql.= " WHERE a.fk_action=c.id";
|
||||||
@ -1501,7 +1508,13 @@ class ActionComm extends CommonObject
|
|||||||
elseif ($result < 0 || $condition == '=') $sql.= " AND ar.fk_element = 0";
|
elseif ($result < 0 || $condition == '=') $sql.= " AND ar.fk_element = 0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sql.= " AND a.datep IS NOT NULL"; // To exclude corrupted events and avoid errors in lightning/sunbird import
|
$sql.= " AND a.datep IS NOT NULL"; // To exclude corrupted events and avoid errors in lightning/sunbird import
|
||||||
|
|
||||||
|
$parameters=array('filters' => $filters);
|
||||||
|
$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||||
|
$sql.=$hookmanager->resPrint;
|
||||||
|
|
||||||
$sql.= " ORDER by datep";
|
$sql.= " ORDER by datep";
|
||||||
//print $sql;exit;
|
//print $sql;exit;
|
||||||
|
|
||||||
|
|||||||
@ -106,6 +106,8 @@ if (empty($_GET["exportkey"]) || $conf->global->MAIN_AGENDA_XCAL_EXPORTKEY != $_
|
|||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Initialize technical object to manage hooks. Note that conf->hooks_modules contains array of hooks
|
||||||
|
$hookmanager->initHooks(array('agendaexport'));
|
||||||
|
|
||||||
// Define filename with prefix on filters predica (each predica set must have on cache file)
|
// Define filename with prefix on filters predica (each predica set must have on cache file)
|
||||||
$shortfilename='dolibarrcalendar';
|
$shortfilename='dolibarrcalendar';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user