Minor esthetical change and fix

This commit is contained in:
Laurent Destailleur 2009-05-04 20:57:26 +00:00
parent 2e2b3b4be4
commit ab2b56be13
6 changed files with 140 additions and 128 deletions

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2008-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -17,10 +17,10 @@
*/ */
/** /**
\file htdocs/admin/agenda.php * \file htdocs/admin/agenda.php
\ingroup agenda * \ingroup agenda
\brief Page de configuration du module agenda * \brief Page de configuration du module agenda
\version $Id$ * \version $Id$
*/ */
require("./pre.inc.php"); require("./pre.inc.php");
@ -46,8 +46,9 @@ if ($actionsave)
$db->begin(); $db->begin();
$i+=dolibarr_set_const($db,'MAIN_AGENDA_XCAL_EXPORTKEY',trim($_POST["MAIN_AGENDA_XCAL_EXPORTKEY"]),'chaine',0,'',$conf->entity); $i+=dolibarr_set_const($db,'MAIN_AGENDA_XCAL_EXPORTKEY',trim($_POST["MAIN_AGENDA_XCAL_EXPORTKEY"]),'chaine',0,'',$conf->entity);
$i+=dolibarr_set_const($db,'MAIN_AGENDA_EXPORT_CACHE',trim($_POST["MAIN_AGENDA_EXPORT_CACHE"]),'chaine',0,'',$conf->entity);
if ($i > 0) if ($i >= 2)
{ {
$db->commit(); $db->commit();
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>"; $mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
@ -83,7 +84,7 @@ print '<form name="agendasetupform" action="'.$_SERVER["PHP_SELF"].'" method="po
print "<table class=\"noborder\" width=\"100%\">"; print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">"; print "<tr class=\"liste_titre\">";
print "<td width=\"30%\">".$langs->trans("Parameter")."</td>"; print "<td>".$langs->trans("Parameter")."</td>";
print "<td>".$langs->trans("Value")."</td>"; print "<td>".$langs->trans("Value")."</td>";
//print "<td>".$langs->trans("Examples")."</td>"; //print "<td>".$langs->trans("Examples")."</td>";
print "<td>&nbsp;</td>"; print "<td>&nbsp;</td>";
@ -95,6 +96,12 @@ print "<td><input type=\"text\" class=\"flat\" name=\"MAIN_AGENDA_XCAL_EXPORTKEY
print "<td>&nbsp;</td>"; print "<td>&nbsp;</td>";
print "</tr>"; print "</tr>";
print "<tr class=\"pair\">";
print "<td>".$langs->trans("UseACacheDelay")."</td>";
print "<td><input type=\"text\" class=\"flat\" name=\"MAIN_AGENDA_EXPORT_CACHE\" value=\"". ($_POST["MAIN_AGENDA_EXPORT_CACHE"]?$_POST["MAIN_AGENDA_EXPORT_CACHE"]:$conf->global->MAIN_AGENDA_EXPORT_CACHE) . "\" size=\"10\"></td>";
print "<td>&nbsp;</td>";
print "</tr>";
print '</table>'; print '</table>';
print '<br><center>'; print '<br><center>';

View File

@ -97,10 +97,13 @@ if (! $filename)
$agenda=new ActionComm($db); $agenda=new ActionComm($db);
$cachedelay=0;
if (! empty($conf->global->MAIN_AGENDA_EXPORT_CACHE)) $cachedelay=$conf->global->MAIN_AGENDA_EXPORT_CACHE;
// Build file // Build file
if ($format == 'ical' || $format == 'vcal') if ($format == 'ical' || $format == 'vcal')
{ {
$result=$agenda->build_exportfile($format,$type,0,$filename,$filters); $result=$agenda->build_exportfile($format,$type,$cachedelay,$filename,$filters);
if ($result >= 0) if ($result >= 0)
{ {
$attachment = true; $attachment = true;
@ -131,7 +134,7 @@ if ($format == 'ical' || $format == 'vcal')
if ($format == 'rss') if ($format == 'rss')
{ {
$result=$agenda->build_exportfile($format,$type,0,$filename,$filters); $result=$agenda->build_exportfile($format,$type,$cachedelay,$filename,$filters);
if ($result >= 0) if ($result >= 0)
{ {
$attachment = false; $attachment = false;

View File

@ -233,6 +233,7 @@ ErrorCantUseRazInStartedYearIfNoYearMonthInMask=Error, can't user option @ if se
UMask=UMask parameter for new files on Unix/Linux/BSD file system. UMask=UMask parameter for new files on Unix/Linux/BSD file system.
UMaskExplanation=This parameter allow you to define permissions set by default on files created by Dolibarr on server (during upload for example).<br>It must be the octal value (for example, 0666 means read and write for everyone).<br>Ce paramètre ne sert pas sous un serveur Windows. UMaskExplanation=This parameter allow you to define permissions set by default on files created by Dolibarr on server (during upload for example).<br>It must be the octal value (for example, 0666 means read and write for everyone).<br>Ce paramètre ne sert pas sous un serveur Windows.
SeeWikiForAllTeam=Take a look at the wiki page for full list of all actors and their organisation SeeWikiForAllTeam=Take a look at the wiki page for full list of all actors and their organisation
UseACacheDelay = Delay for caching export response in seconds (0 or empty for no cache)
# Modules # Modules
Module0Name=Users & groups Module0Name=Users & groups

View File

@ -233,6 +233,7 @@ ErrorCantUseRazInStartedYearIfNoYearMonthInMask = Erreur, ne peut utiliser l'opt
UMask = Paramètre UMask des nouveaux fichiers sous Unix/Linux/BSD. UMask = Paramètre UMask des nouveaux fichiers sous Unix/Linux/BSD.
UMaskExplanation = Ce paramètre permet de définir les droits des fichiers créés sur le serveur par Dolibarr (lors d'upload par exemple).<br>Ce doit être la valeur octal (par exemple 0666 signifie lecture/ecriture pour tous).<br>Ce paramètre n'a aucun effet sur un serveur Windows. UMaskExplanation = Ce paramètre permet de définir les droits des fichiers créés sur le serveur par Dolibarr (lors d'upload par exemple).<br>Ce doit être la valeur octal (par exemple 0666 signifie lecture/ecriture pour tous).<br>Ce paramètre n'a aucun effet sur un serveur Windows.
SeeWikiForAllTeam = Voir le wiki pour le détail de tous les acteurs et leur organisation SeeWikiForAllTeam = Voir le wiki pour le détail de tous les acteurs et leur organisation
UseACacheDelay = Delay de mise en cache de l'export en secondes (0 ou vide pour aucun cache)
# Modules = undefined # Modules = undefined
Module0Name = Utilisateurs & groupes Module0Name = Utilisateurs & groupes
Module0Desc = Gestion des utilisateurs et groupes Module0Desc = Gestion des utilisateurs et groupes

View File

@ -340,16 +340,16 @@ function dolibarr_get_const($db, $name, $entity=1)
/** /**
\brief Insertion d'une constante dans la base de donnees. * \brief Insertion d'une constante dans la base de donnees.
\sa dolibarr_del_const, dolibarr_get_const * \sa dolibarr_del_const, dolibarr_get_const
\param db Handler d'acces base * \param db Handler d'acces base
\param name Nom de la constante * \param name Nom de la constante
\param value Valeur de la constante * \param value Valeur de la constante
\param type Type de constante (chaine par defaut) * \param type Type de constante (chaine par defaut)
\param visible La constante est elle visible (0 par defaut) * \param visible La constante est elle visible (0 par defaut)
\param note Explication de la constante * \param note Note on parameter
\param entity Multi company id * \param entity Multi company id
\return int -1 if KO, 1 if OK * \return int -1 if KO, 1 if OK
*/ */
function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1) function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $note='', $entity=1)
{ {

View File

@ -890,7 +890,7 @@ else
// Administrateur // Administrateur
print '<tr><td width="25%" valign="top">'.$langs->trans("Administrator").'</td>'; print '<tr><td width="25%" valign="top">'.$langs->trans("Administrator").'</td>';
print '<td>'.yn($fuser->admin); print '<td>'.yn($fuser->admin);
if ($conf->global->MAIN_MODULE_MULTICOMPANY && $fuser->admin && ! $fuser->entity) if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY) && $fuser->admin && ! $fuser->entity)
{ {
print ' '.img_redstar($langs->trans("SuperAdministrator")); print ' '.img_redstar($langs->trans("SuperAdministrator"));
} }
@ -912,7 +912,7 @@ else
{ {
print $langs->trans("DomainUser",$ldap->domainFQDN); print $langs->trans("DomainUser",$ldap->domainFQDN);
} }
else if ($fuser->entity!=0) else if (empty($conf->global->MAIN_MODULE_MULTICOMPANY) || ! empty($fuser->entity))
{ {
print $html->textwithpicto($langs->trans("Internal"),$langs->trans("InternalExternalDesc")); print $html->textwithpicto($langs->trans("Internal"),$langs->trans("InternalExternalDesc"));
} }