Fix: Removed deprecated codes.

This commit is contained in:
Laurent Destailleur 2009-03-23 01:10:41 +00:00
parent 70ce4c7187
commit 7b75dbc285
4 changed files with 32 additions and 296 deletions

View File

@ -17,18 +17,18 @@
*/
/**
\file htdocs/admin/tools/listevents.php
\ingroup core
\brief List of security events
\version $Id$
*/
* \file htdocs/admin/tools/listevents.php
* \ingroup core
* \brief List of security events
* \version $Id$
*/
require_once("./pre.inc.php");
if (! $user->admin)
accessforbidden();
// Sécurité accés client
// Security check
if ($user->societe_id > 0)
{
$action = '';
@ -77,7 +77,7 @@ $form=new Form($db);
$userstatic=new User($db);
$usefilter=0;
$sql = "SELECT e.rowid, e.type, e.ip, ".$db->pdate("e.dateevent")." as dateevent,";
$sql = "SELECT e.rowid, e.type, e.ip, e.dateevent,";
$sql.= " e.fk_user, e.description,";
$sql.= " u.login";
$sql.= " FROM ".MAIN_DB_PREFIX."events as e";
@ -89,7 +89,7 @@ if ($_GET["search_user"]) { $usefilter++; $sql.=" AND u.login like '%".$_GET["se
if ($_GET["search_desc"]) { $usefilter++; $sql.=" AND e.description like '%".$_GET["search_desc"]."%'"; }
$sql.= $db->order($sortfield,$sortorder);
$sql.= $db->plimit($conf->liste_limit+1, $offset);
//print $sql;
$result = $db->query($sql);
if ($result)
{
@ -155,7 +155,7 @@ if ($result)
print "<tr $bc[$var]>";
// Date
print '<td align="left" nowrap="nowrap">'.dol_print_date($obj->dateevent,'%Y-%m-%d %H:%M:%S').'</td>';
print '<td align="left" nowrap="nowrap">'.dol_print_date($db->jdate($obj->dateevent),'%Y-%m-%d %H:%M:%S').'</td>';
// Code
print '<td>'.$obj->type.'</td>';

View File

@ -21,7 +21,7 @@
* \ingroup core
* \brief Trigger file for
* \version $Id$
*/
*/
/**
@ -109,7 +109,7 @@ class InterfaceLogevents
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->date=gmmktime();
$this->duree=0;
$this->texte="(UserLogged,".$object->login.")";
$this->desc="(UserLogged,".$object->login.")";
@ -119,7 +119,7 @@ class InterfaceLogevents
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->date=gmmktime();
$this->duree=0;
$this->texte=$object->trigger_mesg; // Message direct
$this->desc=$object->trigger_mesg; // Message direct
@ -130,7 +130,7 @@ class InterfaceLogevents
$langs->load("users");
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->date=gmmktime();
$this->duree=0;
$this->texte=$langs->transnoentities("NewUserCreated",$object->login);
$this->desc=$langs->transnoentities("NewUserCreated",$object->login);
@ -141,7 +141,7 @@ class InterfaceLogevents
$langs->load("users");
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->date=gmmktime();
$this->duree=0;
$this->texte=$langs->transnoentities("EventUserModified",$object->login);
$this->desc=$langs->transnoentities("EventUserModified",$object->login);
@ -152,7 +152,7 @@ class InterfaceLogevents
$langs->load("users");
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->date=gmmktime();
$this->duree=0;
$this->texte=$langs->transnoentities("NewUserPassword",$object->login);
$this->desc=$langs->transnoentities("NewUserPassword",$object->login);
@ -162,7 +162,7 @@ class InterfaceLogevents
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("users");
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->date=gmmktime();
$this->duree=0;
if ($object->statut == 0)
{
@ -180,7 +180,7 @@ class InterfaceLogevents
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("users");
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->date=gmmktime();
$this->duree=0;
$this->texte=$langs->transnoentities("UserDeleted",$object->login);
$this->desc=$langs->transnoentities("Userdeleted",$object->login);
@ -192,7 +192,7 @@ class InterfaceLogevents
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("users");
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->date=gmmktime();
$this->duree=0;
$this->texte=$langs->transnoentities("NewGroupCreated",$object->nom);
$this->desc=$langs->transnoentities("NewGroupCreated",$object->nom);
@ -202,7 +202,7 @@ class InterfaceLogevents
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("users");
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->date=gmmktime();
$this->duree=0;
$this->texte=$langs->transnoentities("GroupModified",$object->nom);
$this->desc=$langs->transnoentities("GroupModified",$object->nom);
@ -212,278 +212,12 @@ class InterfaceLogevents
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("users");
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->date=gmmktime();
$this->duree=0;
$this->texte=$langs->transnoentities("GroupDeleted",$object->nom);
$this->desc=$langs->transnoentities("GroupDeleted",$object->nom);
}
// Actions
if ($action == 'ACTION_CREATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
// Initialisation donnees (date,duree,texte,desc)
if ($object->type_id == 5 && $object->contact->fullname)
{
$libellecal =$langs->transnoentities("TaskRDVWith",$object->contact->getFullName($langs))."\n";
$libellecal.=$object->note;
}
else
{
$libellecal="";
if ($langs->transnoentities("Action".$object->type_code) != "Action".$object->type_code)
{
$libellecal.=$langs->transnoentities("Action".$object->type_code)."\n";
}
$libellecal.=($object->label!=$libellecal?$object->label."\n":"");
$libellecal.=($object->note?$object->note:"");
}
$this->date=$object->date ? $object->date : $object->datep;
$this->duree=$object->duree;
$this->texte=$object->societe->nom;
$this->desc=$libellecal;
}
// Third parties
elseif ($action == 'COMPANY_CREATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("NewCompanyToDolibarr",$object->nom);
$this->desc=$langs->transnoentities("NewCompanyToDolibarr",$object->nom);
if ($object->prefix) $this->desc.=" (".$object->prefix.")";
//$this->desc.="\n".$langs->transnoentities("Customer").': '.yn($object->client);
//$this->desc.="\n".$langs->transnoentities("Supplier").': '.yn($object->fournisseur);
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
// Contracts
elseif ($action == 'CONTRACT_VALIDATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
// Initialisation donnees (date,duree,texte,desc)
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("ContractValidatedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("ContractValidatedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'CONTRACT_CANCEL')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("ContractCanceledInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("ContractCanceledInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'CONTRACT_CLOSE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("ContractClosedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("ContractClosedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
// Proposals
elseif ($action == 'PROPAL_VALIDATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("PropalValidatedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("PropalValidatedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'PROPAL_CLOSE_SIGNED')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("PropalClosedSignedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("PropalClosedSignedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'PROPAL_CLOSE_REFUSED')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("PropalClosedRefusedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("PropalClosedRefusedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
// Invoices
elseif ($action == 'BILL_VALIDATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("InvoiceValidatedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("InvoiceValidatedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'BILL_PAYED')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("InvoicePayedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("InvoicePayedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'BILL_CANCELED')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("InvoiceCanceledInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("InvoiceCanceledInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
// Payments
elseif ($action == 'PAYMENT_CUSTOMER_CREATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("CustomerPaymentDoneInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("CustomerPaymentDoneInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("AmountTTC").': '.$object->total;
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'PAYMENT_SUPPLIER_CREATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("SupplierPaymentDoneInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("SupplierPaymentDoneInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("AmountTTC").': '.$object->total;
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
// Members
elseif ($action == 'MEMBER_CREATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$langs->load("members");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("NewMemberCreated",$object->ref);
$this->desc=$langs->transnoentities("NewMemberCreated",$object->ref);
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'MEMBER_VALIDATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$langs->load("members");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("MemberValidatedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'MEMBER_SUBSCRIPTION')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$langs->load("members");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("MemberSubscriptionAddedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
$this->desc.="\n".$langs->transnoentities("Amount").': '.$object->last_subscription_amount;
$this->desc.="\n".$langs->transnoentities("Period").': '.dol_print_date($object->last_subscription_date_start,'day').' - '.dol_print_date($object->last_subscription_date_end,'day');
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'MEMBER_MODIFY')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$langs->load("members");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("MemberModifiedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'MEMBER_RESILIATE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$langs->load("members");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("MemberResiliatedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
elseif ($action == 'MEMBER_DELETE')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
$langs->load("other");
$langs->load("members");
$this->date=time();
$this->duree=0;
$this->texte=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
$this->desc=$langs->transnoentities("MemberDeletedInDolibarr",$object->ref);
$this->desc.="\n".$langs->transnoentities("Member").': '.$object->fullname;
$this->desc.="\n".$langs->transnoentities("Type").': '.$object->type;
$this->desc.="\n".$langs->transnoentities("Author").': '.$user->login;
}
// If not found
/*
else

View File

@ -17,18 +17,17 @@
*/
/**
\file htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php
\ingroup core
\brief Trigger file for
\version $Id$
*/
* \file htdocs/includes/triggers/interface_modAgenda_ActionsAuto.class.php
* \ingroup core
* \brief Trigger file for
* \version $Id$
*/
/**
\class InterfaceActionsAuto
\brief Classe des fonctions triggers des actions agenda
*/
* \class InterfaceActionsAuto
* \brief Classe des fonctions triggers des actions agenda
*/
class InterfaceActionsAuto
{
var $db;
@ -421,7 +420,7 @@ class InterfaceActionsAuto
// Add entry in event table
if ($ok)
{
$now=time();
$now=gmmktime();
// Insertion action
require_once(DOL_DOCUMENT_ROOT.'/contact.class.php');

View File

@ -14,6 +14,9 @@ insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) v
update llx_const set visible = 1 where name = 'PROPALE_ADD_DELIVERY_ADDRESS';
delete from llx_const where name like 'MAIN_LOGEVENTS_%' and name not like 'MAIN_LOGEVENTS_USER%' and name not like 'MAIN_LOGEVENTS_GROUP%';
delete from llx_events where type not like 'USER%' and type not like 'GROUP%';
alter table llx_expedition_methode change statut active tinyint DEFAULT 1;
update llx_actioncomm set datep = datea where datep is null;