Skip to content
Snippets Groups Projects
Commit 75207ea0 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: Add "Audit" feature.

parent b22a77cd
No related branches found
No related tags found
No related merge requests found
Showing
with 273 additions and 115 deletions
<?php
/* Copyright (C) 2008 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
\file htdocs/admin/events.php
\ingroup core
\brief Log event setup page
\version $Id$
*/
require("./pre.inc.php");
require_once(DOL_DOCUMENT_ROOT."/lib/admin.lib.php");
require_once(DOL_DOCUMENT_ROOT."/lib/agenda.lib.php");
if (!$user->admin)
accessforbidden();
$langs->load("admin");
$langs->load("other");
$action=$_POST["action"];
$eventstolog=array(
array('id'=>'ACTION_CREATE', 'test'=>$conf->societe->enabled),
array('id'=>'COMPANY_CREATE', 'test'=>$conf->societe->enabled),
array('id'=>'CONTRACT_VALIDATE', 'test'=>$conf->contrat->enabled),
array('id'=>'CONTRACT_CANCEL', 'test'=>$conf->contrat->enabled),
array('id'=>'CONTRACT_CLOSE', 'test'=>$conf->contrat->enabled),
array('id'=>'PROPAL_VALIDATE', 'test'=>$conf->propal->enabled),
array('id'=>'PROPAL_CLOSE_SIGNED', 'test'=>$conf->propal->enabled),
array('id'=>'PROPAL_CLOSE_REFUSED', 'test'=>$conf->propal->enabled),
array('id'=>'BILL_VALIDATE', 'test'=>$conf->facture->enabled),
array('id'=>'BILL_PAYED', 'test'=>$conf->facture->enabled),
array('id'=>'BILL_CANCELED', 'test'=>$conf->facture->enabled),
array('id'=>'PAYMENT_CUSTOMER_CREATE','test'=>$conf->facture->enabled),
array('id'=>'PAYMENT_SUPPLIER_CREATE','test'=>$conf->fournisseur->enabled),
array('id'=>'MEMBER_VALIDATE', 'test'=>$conf->adherent->enabled),
array('id'=>'MEMBER_SUBSCRIPTION', 'test'=>$conf->adherent->enabled),
array('id'=>'MEMBER_MODIFY', 'test'=>$conf->adherent->enabled),
array('id'=>'MEMBER_RESILIATE', 'test'=>$conf->adherent->enabled),
array('id'=>'MEMBER_DELETE', 'test'=>$conf->adherent->enabled),
);
/*
* Actions
*/
if ($action == "save")
{
$i=0;
$db->begin();
foreach ($eventstolog as $key => $arr)
{
$param='MAIN_LOGEVENTS_'.$arr['id'];
//print "param=".$param." - ".$_POST[$param];
if (! empty($_POST[$param])) dolibarr_set_const($db,$param,$_POST[$param],'chaine',0);
else dolibarr_del_const($db,$param);
}
$db->commit();
$mesg = "<font class=\"ok\">".$langs->trans("SetupSaved")."</font>";
}
/**
* Affichage du formulaire de saisie
*/
llxHeader();
//$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php">'.$langs->trans("BackToModuleList").'</a>';
print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
print $langs->trans("LogEventDesc")."<br>\n";
print "<br>\n";
$head=security_prepare_head();
dolibarr_fiche_head($head, 'audit', $langs->trans("Security"));
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
print '<input type="hidden" name="action" value="save">';
$var=true;
print "<table class=\"noborder\" width=\"100%\">";
print "<tr class=\"liste_titre\">";
print "<td colspan=\"2\">".$langs->trans("LogEvents")."</td>";
print "</tr>\n";
foreach ($eventstolog as $key => $arr)
{
if ($arr['id'])
{
$var=!$var;
print '<tr '.$bc[$var].'>';
print '<td>'.$arr['id'].'</td>';
print '<td>';
$key='MAIN_LOGEVENTS_'.$arr['id'];
$value=$conf->global->$key;
print '<input type="checkbox" name="'.$key.'" value="1"'.($value?' checked="true"':'').'>';
print '</td></tr>'."\n";
}
}
print '</table>';
print '<br><center>';
print "<input type=\"submit\" name=\"save\" class=\"button\" value=\"".$langs->trans("Save")."\">";
print "</center>";
print "</form>\n";
print '</div>';
if ($mesg) print "<br>$mesg<br>";
print "<br>";
// Show message
/*
$message='';
$urlwithouturlroot=eregi_replace(DOL_URL_ROOT.'$','',$dolibarr_main_url_root);
$urlvcal='<a href="'.DOL_URL_ROOT.'/webcal/webcalexport.php?format=vcal" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/webcal/webcalexport.php?format=vcal'.'</a>';
$message.=$langs->trans("WebCalUrlForVCalExport",'vcal',$urlvcal);
$message.='<br>';
$urlical='<a href="'.DOL_URL_ROOT.'/webcal/webcalexport.php?format=ical&type=event" target="_blank">'.$urlwithouturlroot.DOL_URL_ROOT.'/webcal/webcalexport.php?format=ical&type=event'.'</a>';
$message.=$langs->trans("WebCalUrlForVCalExport",'ical',$urlical);
print info_admin($message);
*/
$db->close();
llxFooter('$Date$ - $Revision$');
?>
......@@ -55,23 +55,9 @@ print_fiche_titre($langs->trans("SecuritySetup"),'','setup');
print $langs->trans("DefaultRightsDesc")."<br>\n";
print "<br>\n";
$head=security_prepare_head();
$h = 0;
$head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
$head[$h][1] = $langs->trans("DefaultRights");
$hselected=$h;
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/security.php";
$head[$h][1] = $langs->trans("Passwords");
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/security_other.php";
$head[$h][1] = $langs->trans("Miscellanous");
$h++;
dolibarr_fiche_head($head, $hselected, $langs->trans("Security"));
dolibarr_fiche_head($head, 'default', $langs->trans("Security"));
print info_admin($langs->trans("WarningOnlyPermissionOfActivatedModules"));
......
<?php
/* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2007 Regis Houssin <regis@dolibarr.fr>
*
* This program is free software; you can redistribute it and/or modify
......@@ -15,15 +15,13 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
*/
/**
\file htdocs/admin/security.php
\ingroup setup
\brief Page de configuration du module scurit
\version $Revision$
\version $Id$
*/
require("./pre.inc.php");
......@@ -163,22 +161,9 @@ print $langs->trans("GeneratedPasswordDesc")."<br>\n";
print "<br>\n";
$h = 0;
$head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
$head[$h][1] = $langs->trans("DefaultRights");
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/security.php";
$head[$h][1] = $langs->trans("Passwords");
$hselected=$h;
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/security_other.php";
$head[$h][1] = $langs->trans("Miscellanous");
$h++;
$head=security_prepare_head();
dolibarr_fiche_head($head, $hselected, $langs->trans("Security"));
dolibarr_fiche_head($head, 'passwords', $langs->trans("Security"));
$var=false;
......
......@@ -14,16 +14,13 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* $Id$
* $Source$
*/
/**
\file htdocs/admin/security_other.php
\ingroup setup
\ingroup core
\brief Page de configuration du module s�curit� autre
\version $Revision$
\version $Id$
*/
require("./pre.inc.php");
......@@ -91,22 +88,9 @@ print $langs->trans("MiscellanousDesc")."<br>\n";
print "<br>\n";
$h = 0;
$head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
$head[$h][1] = $langs->trans("DefaultRights");
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/security.php";
$head[$h][1] = $langs->trans("Passwords");
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/security_other.php";
$head[$h][1] = $langs->trans("Miscellanous");
$hselected=$h;
$h++;
$head=security_prepare_head();
dolibarr_fiche_head($head, $hselected, $langs->trans("Security"));
dolibarr_fiche_head($head, 'misc', $langs->trans("Security"));
$var=false;
......
......@@ -17,8 +17,8 @@
*/
/**
\file agenda/events.class.php
\ingroup agenda
\file core/events.class.php
\ingroup core
\brief Events class file.
\version $Id$
\author Laurent Destailleur
......@@ -47,7 +47,7 @@ class Events // extends CommonObject
var $id;
var $tms;
var $fk_action;
var $type;
var $dateevent;
var $label;
var $description;
......@@ -91,9 +91,9 @@ class Events // extends CommonObject
$sql = "INSERT INTO ".MAIN_DB_PREFIX."events(";
$sql.= "id,";
$sql.= "tms,";
$sql.= "fk_action,";
$sql.= "type,";
$sql.= "dateevent,";
$sql.= "fk_user,";
$sql.= "label,";
$sql.= "description";
......@@ -101,9 +101,9 @@ class Events // extends CommonObject
$sql.= ") VALUES (";
$sql.= " '".$this->id."',";
$sql.= " ".$this->db->idate($this->tms).",";
$sql.= " '".$this->fk_action."',";
$sql.= " '".$this->type."',";
$sql.= " ".$this->db->idate($this->dateevent).",";
$sql.= " '".$user->id."',";
$sql.= " '".$this->label."',";
$sql.= " '".$this->description."'";
......@@ -139,7 +139,7 @@ class Events // extends CommonObject
// Clean parameters
$this->id=trim($this->id);
$this->fk_action=trim($this->fk_action);
$this->type=trim($this->type);
$this->label=trim($this->label);
$this->description=trim($this->description);
......@@ -152,8 +152,7 @@ class Events // extends CommonObject
$sql = "UPDATE ".MAIN_DB_PREFIX."events SET";
$sql.= " id='".$this->id."',";
$sql.= " tms=".$this->db->idate($this->tms).",";
$sql.= " fk_action='".$this->fk_action."',";
$sql.= " type='".$this->type."',";
$sql.= " dateevent=".$this->db->idate($this->dateevent).",";
$sql.= " label='".addslashes($this->label)."',";
$sql.= " description='".addslashes($this->description)."'";
......@@ -188,7 +187,7 @@ class Events // extends CommonObject
$sql.= " t.id,";
$sql.= " ".$this->db->pdate('t.tms').",";
$sql.= " t.fk_action,";
$sql.= " t.type,";
$sql.= " ".$this->db->pdate('t.dateevent').",";
$sql.= " t.label,";
$sql.= " t.description";
......@@ -209,7 +208,7 @@ class Events // extends CommonObject
$this->id = $obj->id;
$this->tms = $obj->tms;
$this->fk_action = $obj->fk_action;
$this->type = $obj->type;
$this->dateevent = $obj->dateevent;
$this->label = $obj->label;
$this->description = $obj->description;
......@@ -262,14 +261,11 @@ class Events // extends CommonObject
{
$this->id=0;
$this->id='';
$this->tms='';
$this->fk_action='';
$this->dateevent='';
$this->label='';
$this->description='';
$this->tms=time();
$this->type='';
$this->dateevent=time();
$this->label='Speciment event';
$this->description='This is a specimen event';
}
}
......
......@@ -112,12 +112,14 @@ class PaiementFourn
}
/**
* \brief Cr�ation du paiement en base
* \param user object utilisateur qui cr�e
* \return int id du paiement cr�e, < 0 si erreur
* \brief Creta payment in database
* \param user Object of creating user
* \return int id of created payment, < 0 if error
*/
function create($user)
{
global $langs,$conf;
$error = 0;
// Nettoyage parametres
......@@ -169,7 +171,7 @@ class PaiementFourn
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('PAYMENT_SUPPLIER_CREATE',$this,$user,$lang,$conf);
$result=$interface->run_triggers('PAYMENT_SUPPLIER_CREATE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
}
......
......@@ -17,21 +17,19 @@
*/
/**
\file htdocs/includes/triggers/interface_modAgenda_Eventsynchro.class.php
\ingroup agenda
\file htdocs/includes/triggers/interface_all_Logevents.class.php
\ingroup core
\brief Trigger file for
\version $Id$
*/
include_once(DOL_DOCUMENT_ROOT.'/agenda/events.class.php');
/**
\class InterfaceEventsynchro
\class InterfaceLogevents
\brief Classe des fonctions triggers des actions agenda
*/
class InterfaceEventsynchro
class InterfaceLogevents
{
var $db;
var $error;
......@@ -45,13 +43,13 @@ class InterfaceEventsynchro
* \brief Constructeur.
* \param DB Handler d'acces base
*/
function InterfaceEventsynchro($DB)
function InterfaceLogevents($DB)
{
$this->db = $DB ;
$this->name = "Eventsynchro";
$this->family = "agenda";
$this->description = "Les triggers de ce composant permettent d'inserer un evenement dans le calendrier event pour chaque grand evenement Dolibarr.";
$this->family = "core";
$this->description = "Les triggers de ce composant permettent de logguer les evenements Dolibarr (modification status des objets).";
$this->version = 'dolibarr'; // 'experimental' or 'dolibarr' or version
}
......@@ -94,18 +92,18 @@ class InterfaceEventsynchro
* \param action Code de l'evenement
* \param object Objet concerne
* \param user Objet user
* \param lang Objet lang
* \param langs Objet langs
* \param conf Objet conf
* \return int <0 si ko, 0 si aucune action faite, >0 si ok
*/
function run_trigger($action,$object,$user,$langs,$conf)
{
// Mettre ici le code a executer en reaction de l'action
// Les donnees de l'action sont stockees dans $object
if (! $conf->agenda->enabled) return 0; // Module non actif
if (! $object->use_agenda) return 0; // Option syncro agenda non active
if (! empty($conf->global->MAIN_LOGEVENTS_DISABLE_ALL)) return 0; // Log events is disabled (hidden features)
$key='MAIN_LOGEVENTS_'.$action;
//dolibarr_syslog("xxxxxxxxxxx".$key);
if (empty($conf->global->$key)) return 0; // Log events not enabled for this action
// Actions
if ($action == 'ACTION_CREATE')
{
......@@ -373,10 +371,13 @@ class InterfaceEventsynchro
// Ajoute entree dans webcal
if ($this->date)
{
$event->date=$this->date;
$event->duree=$this->duree;
$event->texte=$this->texte;
$event->desc=$this->desc;
include_once(DOL_DOCUMENT_ROOT.'/core/events.class.php');
$event=new Events($this->db);
$event->type=$action;
$event->dateevent=$this->date;
$event->label=$this->texte;
$event->description=$this->desc;
$result=$event->create($user);
if ($result > 0)
......
......@@ -55,7 +55,7 @@ class Interfaces
* \param conf Objet conf
* \return int Nb triggers ayant agit si pas d'erreurs, -Nb en erreur sinon.
*/
function run_triggers($action,$object,$user,$lang,$conf)
function run_triggers($action,$object,$user,$langs,$conf)
{
$handle=opendir($this->dir);
$modules = array();
......@@ -102,7 +102,7 @@ class Interfaces
{
$modules[$i] = $modName;
//dolibarr_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO);
$result=$objMod->run_trigger($action,$object,$user,$lang,$conf);
$result=$objMod->run_trigger($action,$object,$user,$langs,$conf);
if ($result > 0)
{
// Action OK
......
......@@ -513,6 +513,10 @@ SetupDescription1=All the parameters available in the setup area allow you to se
SetupDescription2=The 2 most important setup steps are the 2 first ones in the left setup menu, this means Company/fundation setup page and Modules setup page:
SetupDescription3=<b>Company/fundation</b> setup is required because input information is used on Dolibarr displays and to modify Dolibarr behaviour (for example for features related to your country).
SetupDescription4=<b>Modules</b> setup is required because Dolibarr is not a simple ERP/CRM but a sum of several modules, all more or less independant. It's only after activating modules you're interesting in that you will see features appeared in Dolibarr menu.
EventsSetup=Setup for events logs
LogEvents=Events
Audit=Audit
LogEventDesc=You can enable here log for some common events in the dolibarr event table.
AreaForAdminOnly=Those features can be used by <b>administrator users</b> only. Administrator features and help are identified in Dolibarr by the following picto:
SystemInfoDesc=System information is miscellanous technical information you get in read only mode and visible for administrators only.
SystemAreaForAdminOnly=This area is available for administrator users only. None of the Dolibarr permissions can reduce this limit.
......
......@@ -512,6 +512,10 @@ SetupDescription1=Toutes les options de l'espace configuration sont des options
SetupDescription2=Les 2 étapes indispensables de configuration sont les 2 premières dans le menu gauche, à savoir, la configuration de la société/institution et la configuration des modules:
SetupDescription3=La configuration <b>Société/institution</b> à gérer est requise car les informations saisies sont utilisées dans la plupart des écrans, en affichage, ou pour modifier le comportement de Dolibarr (comme par exemple des fonctions qui dépendent de votre pays).
SetupDescription4=La configuration <b>Modules</b> est indispensable car Dolibarr n'est pas un ERP/CRM monolithique mais un ensemble de modules tous plus ou moins indépendant. C'est après avoir activé les modules qui vous intéressent que vous verrez apparaitre les fonctionnalités dans les menus de Dolibarr.
EventsSetup=Configuration du traçage des évenements
LogEvents=Evènements
Audit=Audit
LogEventDesc=Vous pouvez activer ici, le traçage de l'historique des evènements dans la table des evènements Dolibarr.
AreaForAdminOnly=Ces fonctions ne sont accessibles qu'à un utilisateur administrateur. La fonction d'administrateur et les aides pour les administrateurs sont identifiées dans Dolibarr par le picto suivant:
SystemInfoDesc=Les informations systèmes sont des informations techniques diverses accessibles en lecture seule aux administrateurs uniquement.
SystemAreaForAdminOnly=Cet espace n'est accessible qu'aux utilisateurs de type administrateurs. Aucune permission Dolibarr ne permet d'étendre le cercle des utilisateurs autorisés à cet espace.
......
......@@ -304,5 +304,42 @@ function dolibarr_set_const($db, $name, $value, $type='chaine', $visible=0, $not
return -1;
}
}
/**
\file htdocs/lib/company.lib.php
\brief Ensemble de fonctions de base pour le module societe
\ingroup societe
\version $Id$
*/
function security_prepare_head()
{
global $langs, $conf, $user;
$h = 0;
$head = array();
$head[$h][0] = DOL_URL_ROOT."/admin/perms.php";
$head[$h][1] = $langs->trans("DefaultRights");
$head[$h][2] = 'default';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/security.php";
$head[$h][1] = $langs->trans("Passwords");
$head[$h][2] = 'passwords';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/security_other.php";
$head[$h][1] = $langs->trans("Miscellanous");
$head[$h][2] = 'misc';
$h++;
$head[$h][0] = DOL_URL_ROOT."/admin/events.php";
$head[$h][1] = $langs->trans("Audit");
$head[$h][2] = 'audit';
$h++;
return $head;
}
?>
\ No newline at end of file
......@@ -120,6 +120,8 @@ class Paiement
*/
function create($user)
{
global $langs,$conf;
$error = 0;
// Nettoyage parametres
......@@ -177,7 +179,7 @@ class Paiement
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('PAYMENT_CUSTOMER_CREATE',$this,$user,$lang,$conf);
$result=$interface->run_triggers('PAYMENT_CUSTOMER_CREATE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
}
......
......@@ -604,7 +604,7 @@ class User extends CommonObject
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('USER_DISABLE',$this,$user,$lang,$conf);
$result=$interface->run_triggers('USER_DISABLE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
}
......@@ -659,7 +659,7 @@ class User extends CommonObject
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('USER_DELETE',$this,$user,$lang,$conf);
$result=$interface->run_triggers('USER_DELETE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
......@@ -747,7 +747,7 @@ class User extends CommonObject
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface = new Interfaces($this->db);
$result = $interface->run_triggers('USER_CREATE',$this,$user,$lang,$conf);
$result = $interface->run_triggers('USER_CREATE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
}
......@@ -1048,7 +1048,7 @@ class User extends CommonObject
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('USER_MODIFY',$this,$user,$lang,$conf);
$result=$interface->run_triggers('USER_MODIFY',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
}
......
......@@ -366,7 +366,7 @@ class UserGroup
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('USER_DELETE',$this,$user,$lang,$conf);
$result=$interface->run_triggers('USER_DELETE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
......@@ -403,7 +403,7 @@ class UserGroup
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('GROUP_CREATE',$this,$user,$lang,$conf);
$result=$interface->run_triggers('GROUP_CREATE',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
......@@ -443,7 +443,7 @@ class UserGroup
// Appel des triggers
include_once(DOL_DOCUMENT_ROOT . "/interfaces.class.php");
$interface=new Interfaces($this->db);
$result=$interface->run_triggers('GROUP_MODIFY',$this,$user,$lang,$conf);
$result=$interface->run_triggers('GROUP_MODIFY',$this,$user,$langs,$conf);
if ($result < 0) { $error++; $this->errors=$interface->errors; }
// Fin appel triggers
}
......
......@@ -175,17 +175,19 @@ ALTER TABLE llx_element_element ADD INDEX idx_element_element_targetid (targetid
ALTER TABLE llx_actioncomm add column fk_user_mod integer after fk_user_author;
ALTER TABLE llx_actioncomm add column fk_user_done integer after fk_user_action;
drop table if exists llx_events;
create table llx_events
(
id integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp,
fk_action integer,
dateevent datetime,
label varchar(50) NOT NULL,
description text NOT NULL
tms timestamp, -- date creation/modification
type varchar(32) NOT NULL, -- action type
dateevent datetime, -- date event
fk_user integer, -- id user
label varchar(50) NOT NULL, -- label of action
description text NOT NULL -- full description of action
) type=innodb;
ALTER TABLE llx_events ADD INDEX idx_events_dateevent (dateevent);
ALTER TABLE llx_c_forme_juridique ADD isvatexempted tinyint DEFAULT 0 NOT NULL after libelle;
......
......@@ -25,8 +25,9 @@ create table llx_events
(
id integer AUTO_INCREMENT PRIMARY KEY,
tms timestamp, -- date creation/modification
fk_action integer, -- action type
type varchar(32) NOT NULL, -- action type
dateevent datetime, -- date event
fk_user integer, -- id user
label varchar(50) NOT NULL, -- label of action
description text NOT NULL -- full description of action
) type=innodb;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment