Merge remote-tracking branch 'origin/3.7' into develop
This commit is contained in:
commit
60a6d8789f
@ -41,7 +41,7 @@ $actiontest=GETPOST('test','alpha');
|
||||
$actionsave=GETPOST('save','alpha');
|
||||
|
||||
if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5;
|
||||
$MAXAGENDA=empty($conf->global->AGENDA_EXT_NB)?5:$conf->global->AGENDA_EXT_NB;
|
||||
$MAXAGENDA=$conf->global->AGENDA_EXT_NB;
|
||||
|
||||
// List of aviable colors
|
||||
$colorlist=array('BECEDD','DDBECE','BFDDBE','F598B4','F68654','CBF654','A4A4A5');
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Eric Seigne <erics@rycks.com>
|
||||
* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
@ -39,6 +39,9 @@ if (! empty($conf->projet->enabled)) {
|
||||
|
||||
if (! isset($conf->global->AGENDA_MAX_EVENTS_DAY_VIEW)) $conf->global->AGENDA_MAX_EVENTS_DAY_VIEW=3;
|
||||
|
||||
if (empty($conf->global->AGENDA_EXT_NB)) $conf->global->AGENDA_EXT_NB=5;
|
||||
$MAXAGENDA=$conf->global->AGENDA_EXT_NB;
|
||||
|
||||
$filter=GETPOST("filter",'',3);
|
||||
$filtert = GETPOST("usertodo","int",3)?GETPOST("usertodo","int",3):GETPOST("filtert","int",3);
|
||||
$usergroup = GETPOST("usergroup","int",3);
|
||||
@ -170,7 +173,7 @@ $listofextcals=array();
|
||||
if (empty($conf->global->AGENDA_DISABLE_EXT))
|
||||
{
|
||||
$i=0;
|
||||
while($i < $conf->global->AGENDA_EXT_NB)
|
||||
while($i < $MAXAGENDA)
|
||||
{
|
||||
$i++;
|
||||
$source='AGENDA_EXT_SRC'.$i;
|
||||
@ -188,7 +191,7 @@ if (empty($conf->global->AGENDA_DISABLE_EXT))
|
||||
if (empty($user->conf->AGENDA_DISABLE_EXT))
|
||||
{
|
||||
$i=0;
|
||||
while($i < $conf->global->AGENDA_EXT_NB)
|
||||
while($i < $MAXAGENDA)
|
||||
{
|
||||
$i++;
|
||||
$source='AGENDA_EXT_SRC_'.$user->id.'_'.$i;
|
||||
|
||||
@ -3851,8 +3851,8 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false)
|
||||
|
||||
/**
|
||||
* This function is called to encode a string into a HTML string but differs from htmlentities because
|
||||
* all entities but &,<,> are converted. This permits to encode special chars to entities with no double
|
||||
* encoding for already encoded HTML strings.
|
||||
* a detection is done before to see if text is already HTML or not. Also, all entities but &,<,> are converted.
|
||||
* This permits to encode special chars to entities with no double encoding for already encoded HTML strings.
|
||||
* This function also remove last EOL or BR if $removelasteolbr=1 (default).
|
||||
* For PDF usage, you can show text by 2 ways:
|
||||
* - writeHTMLCell -> param must be encoded into HTML.
|
||||
@ -3869,7 +3869,7 @@ function dol_nl2br($stringtoencode,$nl2brmode=0,$forxml=false)
|
||||
function dol_htmlentitiesbr($stringtoencode,$nl2brmode=0,$pagecodefrom='UTF-8',$removelasteolbr=1)
|
||||
{
|
||||
$newstring=$stringtoencode;
|
||||
if (dol_textishtml($stringtoencode))
|
||||
if (dol_textishtml($stringtoencode)) // Check if text is already HTML or not
|
||||
{
|
||||
$newstring=preg_replace('/<br(\s[\sa-zA-Z_="]*)?\/?>/i','<br>',$newstring); // Replace "<br type="_moz" />" by "<br>". It's same and avoid pb with FPDF.
|
||||
if ($removelasteolbr) $newstring=preg_replace('/<br>$/i','',$newstring); // Remove last <br> (remove only last one)
|
||||
|
||||
@ -1095,8 +1095,8 @@ ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_task (fk_task);
|
||||
ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_date (task_date);
|
||||
ALTER TABLE llx_projet_task_time ADD INDEX idx_projet_task_time_datehour (task_datehour);
|
||||
|
||||
ALTER TABLE llx_projet_task CHANGE COLUMN duration_effective real DEFAULT 0 NULL;
|
||||
ALTER TABLE llx_projet_task CHANGE COLUMN planned_workload real DEFAULT 0 NULL;
|
||||
ALTER TABLE llx_projet_task MODIFY COLUMN duration_effective real DEFAULT 0 NULL;
|
||||
ALTER TABLE llx_projet_task MODIFY COLUMN planned_workload real DEFAULT 0 NULL;
|
||||
|
||||
|
||||
-- add extrafield on ficheinter lines
|
||||
|
||||
@ -37,7 +37,7 @@ function dolDispatchToDo($order_id)
|
||||
$dispatched = array();
|
||||
$ordered = array();
|
||||
|
||||
# Count nb of quantity dispatched per product
|
||||
// Count nb of quantity dispatched per product
|
||||
$sql = 'SELECT fk_product, SUM(qty) FROM ' . MAIN_DB_PREFIX . 'commande_fournisseur_dispatch';
|
||||
$sql.= ' WHERE fk_commande = ' . $order_id;
|
||||
$sql.= ' GROUP BY fk_product';
|
||||
@ -49,7 +49,7 @@ function dolDispatchToDo($order_id)
|
||||
$dispatched[$obj->fk_product] = $obj;
|
||||
}
|
||||
|
||||
# Count nb of quantity to dispatch per product
|
||||
// Count nb of quantity to dispatch per product
|
||||
$sql = 'SELECT fk_product, SUM(qty) FROM ' . MAIN_DB_PREFIX . 'commande_fournisseurdet';
|
||||
$sql.= ' WHERE fk_commande = ' . $order_id;
|
||||
$sql.= ' AND fk_product > 0';
|
||||
|
||||
@ -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=ical&type=event&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');
|
||||
@ -55,23 +59,26 @@ require_once DOL_DOCUMENT_ROOT.'/comm/action/class/actioncomm.class.php';
|
||||
// Security check
|
||||
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
|
||||
$format='ical';
|
||||
$type='event';
|
||||
if (! empty($_GET["format"])) $format=$_GET["format"];
|
||||
if (! empty($_GET["type"])) $type=$_GET["type"];
|
||||
|
||||
$filters=array();
|
||||
if (! empty($_GET["year"])) $filters['year']=$_GET["year"];
|
||||
if (! empty($_GET["id"])) $filters['id']=$_GET["id"];
|
||||
if (! empty($_GET["idfrom"])) $filters['idfrom']=$_GET["idfrom"];
|
||||
if (! empty($_GET["idto"])) $filters['idto']=$_GET["idto"];
|
||||
if (! empty($_GET["project"])) $filters['project']=$_GET["project"];
|
||||
if (! empty($_GET["login"])) $filters['login']=$_GET["login"];
|
||||
if (! empty($_GET["logina"])) $filters['logina']=$_GET["logina"];
|
||||
if (! empty($_GET["logint"])) $filters['logint']=$_GET["logint"];
|
||||
// Not older than
|
||||
if (! isset($conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY)) $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY=100;
|
||||
$filters['notolderthan']=$conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY;
|
||||
if (! empty($_GET["year"])) $filters['year']=$_GET["year"];
|
||||
if (! empty($_GET["id"])) $filters['id']=$_GET["id"];
|
||||
if (! empty($_GET["idfrom"])) $filters['idfrom']=$_GET["idfrom"];
|
||||
if (! empty($_GET["idto"])) $filters['idto']=$_GET["idto"];
|
||||
if (! empty($_GET["project"])) $filters['project']=$_GET["project"];
|
||||
if (! empty($_GET["login"])) $filters['login']=$_GET["login"];
|
||||
if (! empty($_GET["logina"])) $filters['logina']=$_GET["logina"];
|
||||
if (! empty($_GET["logint"])) $filters['logint']=$_GET["logint"];
|
||||
if (GETPOST("notolderthan")) $filters['notolderthan']=GETPOST("notolderthan","int");
|
||||
else $filters['notolderthan']=$conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY;
|
||||
|
||||
// Check config
|
||||
if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY))
|
||||
|
||||
Loading…
Reference in New Issue
Block a user