Fix parameter notolderthan was not effective
This commit is contained in:
parent
79023cddb0
commit
7050ef6176
@ -22,6 +22,10 @@
|
|||||||
* http://127.0.0.1/dolibarr/public/agenda/agendaexport.php?format=vcal&exportkey=cle
|
* http://127.0.0.1/dolibarr/public/agenda/agendaexport.php?format=vcal&exportkey=cle
|
||||||
* http://127.0.0.1/dolibarr/public/agenda/agendaexport.php?format=ical&type=event&exportkey=cle
|
* http://127.0.0.1/dolibarr/public/agenda/agendaexport.php?format=ical&type=event&exportkey=cle
|
||||||
* http://127.0.0.1/dolibarr/public/agenda/agendaexport.php?format=rss&exportkey=cle
|
* http://127.0.0.1/dolibarr/public/agenda/agendaexport.php?format=rss&exportkey=cle
|
||||||
|
* Other parameters into url are:
|
||||||
|
* ¬olderthan=99
|
||||||
|
* &year=2015
|
||||||
|
* &id=..., &idfrom=..., &idto=...
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');
|
//if (! defined('NOREQUIREUSER')) define('NOREQUIREUSER','1');
|
||||||
@ -55,11 +59,15 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
|||||||
// Security check
|
// Security check
|
||||||
if (empty($conf->agenda->enabled)) accessforbidden('',1,1,1);
|
if (empty($conf->agenda->enabled)) accessforbidden('',1,1,1);
|
||||||
|
|
||||||
|
// Not older than
|
||||||
|
if (! isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY=100; // default limit
|
||||||
|
|
||||||
// Define format, type and filter
|
// Define format, type and filter
|
||||||
$format='ical';
|
$format='ical';
|
||||||
$type='event';
|
$type='event';
|
||||||
if (! empty($_GET["format"])) $format=$_GET["format"];
|
if (! empty($_GET["format"])) $format=$_GET["format"];
|
||||||
if (! empty($_GET["type"])) $type=$_GET["type"];
|
if (! empty($_GET["type"])) $type=$_GET["type"];
|
||||||
|
|
||||||
$filters=array();
|
$filters=array();
|
||||||
if (! empty($_GET["year"])) $filters['year']=$_GET["year"];
|
if (! empty($_GET["year"])) $filters['year']=$_GET["year"];
|
||||||
if (! empty($_GET["id"])) $filters['id']=$_GET["id"];
|
if (! empty($_GET["id"])) $filters['id']=$_GET["id"];
|
||||||
@ -69,9 +77,8 @@ if (! empty($_GET["project"])) $filters['project']=$_GET["project"];
|
|||||||
if (! empty($_GET["login"])) $filters['login']=$_GET["login"];
|
if (! empty($_GET["login"])) $filters['login']=$_GET["login"];
|
||||||
if (! empty($_GET["logina"])) $filters['logina']=$_GET["logina"];
|
if (! empty($_GET["logina"])) $filters['logina']=$_GET["logina"];
|
||||||
if (! empty($_GET["logint"])) $filters['logint']=$_GET["logint"];
|
if (! empty($_GET["logint"])) $filters['logint']=$_GET["logint"];
|
||||||
// Not older than
|
if (GETPOST("notolderthan")) $filters['notolderthan']=GETPOST("notolderthan","int");
|
||||||
if (! isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY=100;
|
else $filters['notolderthan']=$conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY;
|
||||||
$filters['notolderthan']=$conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY;
|
|
||||||
|
|
||||||
// Check config
|
// Check config
|
||||||
if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY))
|
if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user