diff --git a/ChangeLog b/ChangeLog index f5140e17a10..8c8b7693823 100644 --- a/ChangeLog +++ b/ChangeLog @@ -54,6 +54,7 @@ For developers: - New: Log module outputs can be setup with "or" rule (not only "xor"). - New: Add FirePHP output for logging module. - New: Add trigger ACTION_DELETE and ACTION_MODIFY. +- New: Trigger now have a priority to define sort execution order. - New: Can define different requests according to database type into migration files. - New: Add "canvas" feature to overwrite page of thirdparty, contact, product with yours. - New: Removed artichow deprecated libraries. diff --git a/build/exe/doliwamp/doliwamp.iss b/build/exe/doliwamp/doliwamp.iss index 440aed7060a..35db3685573 100644 --- a/build/exe/doliwamp/doliwamp.iss +++ b/build/exe/doliwamp/doliwamp.iss @@ -107,7 +107,7 @@ Source: "C:\Program Files\Wamp\bin\mysql\mysql5.0.45\*.*"; DestDir: "{app}\bin\m ; Mysql data files (does not overwrite if exists) Source: "build\exe\doliwamp\mysql\*.*"; DestDir: "{app}\bin\mysql\data\mysql"; Flags: onlyifdoesntexist ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db" ; Dolibarr -Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,telephonie\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\install.forced.php,*\modBookmark4u.class.php,*\modDocument.class.php,*\modDroitPret.class.php,*\modEditeur.class.php,*\modPostnuke.class.php,*\modTelephonie.class.php,*\interface_modEditeur_Editeur.class.php*,*\bureau2crea,*\rodolphe" +Source: "htdocs\*.*"; DestDir: "{app}\www\dolibarr\htdocs"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,custom\*,custom2\*,telephonie\*,*\conf.php,*\conf.php.mysql,*\conf.php.old,*\conf.php.postgres,*\install.forced.php" Source: "dev\*.*"; DestDir: "{app}\www\dolibarr\dev"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,dbmodel\*,fpdf\*,initdata\*,iso-normes\*,licence\*,phpcheckstyle\*,phpunit\*,samples\*,test\*,uml\*,xdebug\*" Source: "doc\*.*"; DestDir: "{app}\www\dolibarr\doc"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,wiki\*,plaquette\*,dev\*,images\dolibarr_screenshot2.png,images\dolibarr_screenshot3.png,images\dolibarr_screenshot4.png,images\dolibarr_screenshot5.png,images\dolibarr_screenshot6.png,images\dolibarr_screenshot7.png,images\dolibarr_screenshot8.png,images\dolibarr_screenshot9.png,images\dolibarr_screenshot10.png,images\dolibarr_screenshot11.png,images\dolibarr_screenshot12.png" Source: "scripts\*.*"; DestDir: "{app}\www\dolibarr\scripts"; Flags: ignoreversion recursesubdirs; Excludes: ".cvsignore,.project,CVS\*,Thumbs.db,product\materiel.net.php,product\import-product.php" diff --git a/build/makepack-dolibarrmodule.conf b/build/makepack-dolibarrmodule.conf index 8fddcd07a3b..33cd433ea98 100644 --- a/build/makepack-dolibarrmodule.conf +++ b/build/makepack-dolibarrmodule.conf @@ -3,13 +3,13 @@ # Goal: Goal of module # Version: 1.0 # Author: Copyright 2008 - Author name here -# Licence: Not yet defined +# Licence: GPL # Install: Just unpack content of module package in Dolibarr directory. -# Setup: Go on Dolibarr setup - modules page to enable module. +# Setup: Go on Dolibarr setup - modules to enable module. # # Files in module -htdocs/core/modules/modMyModule.class.php -htdocs/core/triggers/interface_mymodule.class.php +htdocs/mymodule/core/modules/modMyModule.class.php +htdocs/mymodule/core/triggers/interface_mymodule.class.php htdocs/mymodule/page1.php htdocs/mymodule/page2.php htdocs/mymodule/sql/script1.sql diff --git a/build/tgz/tar_exclude.txt b/build/tgz/tar_exclude.txt index af3d3aac3ef..5b7eb73e07a 100644 --- a/build/tgz/tar_exclude.txt +++ b/build/tgz/tar_exclude.txt @@ -31,15 +31,6 @@ htdocs/conf/conf.php.mysql htdocs/conf/conf.php.old htdocs/conf/conf.php.postgres htdocs/avoir -htdocs/core/modules/modBookmark4u.class.php -htdocs/core/modules/modDocument.class.php -htdocs/core/modules/modDroitPret.class.php -htdocs/core/modules/modEditeur.class.php -htdocs/core/modules/modPostnuke.class.php -htdocs/core/modules/modTelephonie.class.php -htdocs/core/triggers/interface_user.class.php -htdocs/core/triggers/interface_contractfrombill.class.php-NORUN -htdocs/core/triggers/interface_modEditeur_Editeur.class.php-NORUN htdocs/custom htdocs/custom2 htdocs/customleave diff --git a/build/zip/zip_exclude.txt b/build/zip/zip_exclude.txt index 512aa41f368..1409e7ee9db 100644 --- a/build/zip/zip_exclude.txt +++ b/build/zip/zip_exclude.txt @@ -27,15 +27,6 @@ */htdocs/conf/conf.php.mysql */htdocs/conf/conf.php.old */htdocs/conf/conf.php.postgres -*/htdocs/core/modules/modBookmark4u.class.php -*/htdocs/core/modules/modClickToDial.class.php -*/htdocs/core/modules/modDocument.class.php -*/htdocs/core/modules/modDomain.class.php -*/htdocs/core/modules/modDroitPret.class.php -*/htdocs/core/modules/modEditeur.class.php -*/htdocs/core/modules/modPostnuke.class.php -*/htdocs/core/triggers/interface_user.class.php -*/htdocs/core/triggers/interface_contractfrombill.class.php-NORUN */htdocs/custom/* */htdocs/custom2/* */htdocs/document/* diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 9855c45a0dc..bc228be0711 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -24,7 +24,7 @@ require("../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/admin.lib.php"); -require_once(DOL_DOCUMENT_ROOT."/core/triggers/interface_modNotification_Notification.class.php"); +require_once(DOL_DOCUMENT_ROOT."/core/triggers/interface_50_modNotification_Notification.class.php"); $langs->load("admin"); $langs->load("other"); diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php index 39f185c4a21..d3860512d1e 100644 --- a/htdocs/admin/triggers.php +++ b/htdocs/admin/triggers.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2005-2012 Laurent Destailleur * * 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 @@ -17,7 +17,7 @@ /** * \file htdocs/admin/triggers.php - * \brief Page de configuration et activation des triggers + * \brief Page to view triggers */ require("../main.inc.php"); @@ -25,13 +25,13 @@ require_once(DOL_DOCUMENT_ROOT."/core/class/interfaces.class.php"); $langs->load("admin"); -if (!$user->admin) - accessforbidden(); +if (!$user->admin) accessforbidden(); /* * Action */ +// None /* @@ -50,9 +50,11 @@ print "
\n"; $template_dir = DOL_DOCUMENT_ROOT.'/core/tpl/'; $interfaces = new Interfaces($db); -$triggers = $interfaces->getTriggersList(0); +$triggers = $interfaces->getTriggersList(0,'priority'); include($template_dir.'triggers.tpl.php'); llxFooter(); + +$db->close(); ?> diff --git a/htdocs/core/class/interfaces.class.php b/htdocs/core/class/interfaces.class.php index eb3395e7397..c13aa28800b 100644 --- a/htdocs/core/class/interfaces.class.php +++ b/htdocs/core/class/interfaces.class.php @@ -67,6 +67,13 @@ class Interfaces dol_syslog(get_class($this).'::run_triggers was called with wrong parameters action='.$action.' object='.is_object($object).' user='.is_object($user).' langs='.is_object($langs).' conf='.is_object($conf), LOG_WARNING); } + $nbfile = $nbtotal = $nbok = $nbko = 0; + + $files = array(); + $modules = array(); + $orders = array(); + $i=0; + foreach($conf->triggers_modules as $reldir) { $dir=dol_buildpath($reldir,0); @@ -76,111 +83,116 @@ class Interfaces if (!is_dir($dir)) continue; $handle=opendir($dir); - $modules = array(); - $nbfile = $nbtotal = $nbok = $nbko = 0; if (is_resource($handle)) { while (($file = readdir($handle))!==false) { - if (is_readable($dir."/".$file) && preg_match('/^interface_([^_]+)_(.+)\.class\.php$/i',$file,$reg)) + if (is_readable($dir."/".$file) && preg_match('/^interface_([0-9]+)_([^_]+)_(.+)\.class\.php$/i',$file,$reg)) { + $part1=$reg[1]; + $part2=$reg[2]; + $part3=$reg[3]; + $nbfile++; - $modName = "Interface".ucfirst($reg[2]); + $modName = "Interface".ucfirst($reg[3]); //print "file=$file"; print "modName=$modName"; exit; if (in_array($modName,$modules)) { $langs->load("errors"); - dol_syslog("Interface::run_triggers action=".$action." ".$langs->trans("ErrorDuplicateTrigger",$modName,"/htdocs/core/triggers/"),LOG_ERR); + dol_syslog(get_class($this)."::run_triggers action=".$action." ".$langs->trans("ErrorDuplicateTrigger",$modName,"/htdocs/core/triggers/"),LOG_ERR); continue; } + else + { + include_once($dir.'/'.$file); + } // Check if trigger file is disabled by name - if (preg_match('/NORUN$/i',$file)) - { - continue; - } + if (preg_match('/NORUN$/i',$file)) continue; // Check if trigger file is for a particular module $qualified=true; - if (strtolower($reg[1]) != 'all') + if (strtolower($reg[2]) != 'all') { - $module=preg_replace('/^mod/i','',$reg[1]); + $module=preg_replace('/^mod/i','',$reg[2]); $constparam='MAIN_MODULE_'.strtoupper($module); if (empty($conf->global->$constparam)) $qualified=false; } if (! $qualified) { - dol_syslog("Interfaces::run_triggers action=".$action." Triggers for file '".$file."' need module to be enabled",LOG_INFO); + dol_syslog(get_class($this)."::run_triggers action=".$action." Triggers for file '".$file."' need module to be enabled",LOG_INFO); continue; } - - include_once($dir."/".$file); - $objMod = new $modName($this->db); - $i=0; - if ($objMod) - { - // Bypass if workflow module is enabled and if the trigger asked to be disable in such case - if (! empty($conf->workflow->enabled) && ! empty($objMod->disabled_if_workflow)) - { - dol_syslog("Interfaces::run_triggers action=".$action." Bypass triggers for file '".$file."'",LOG_INFO); - continue; - } - - dol_syslog("Interfaces::run_triggers action=".$action." Launch triggers for file '".$file."'",LOG_INFO); - - $modules[$i] = $modName; - //dol_syslog("Interfaces::run_triggers Launch triggers for file '".$file."'",LOG_INFO); - $result=$objMod->run_trigger($action,$object,$user,$langs,$conf); - if ($result > 0) - { - // Action OK - $nbtotal++; - $nbok++; - } - if ($result == 0) - { - // Aucune action faite - $nbtotal++; - } - if ($result < 0) - { - // Action KO - $nbtotal++; - $nbko++; - $this->errors[]=$objMod->error; - } - $i++; - } - else - { - dol_syslog("Interfaces::run_triggers action=".$action." Failed to instantiate trigger for file '".$file."'",LOG_ERR); - } + + $modules[$i] = $modName; + $files[$i] = $file; + $orders[$i] = $part1.'_'.$part2.'_'.$part3; // Set sort criteria value + + $i++; } } - closedir($handle); + } + } + + asort($orders); + + // Loop on each trigger + foreach ($orders as $key => $value) + { + $modName = $modules[$key]; + if (empty($modName)) continue; + + $objMod = new $modName($this->db); + if ($objMod) + { + dol_syslog(get_class($this)."::run_triggers action=".$action." Launch triggers for file '".$files[$key]."'",LOG_INFO); + + $result=$objMod->run_trigger($action,$object,$user,$langs,$conf); + if ($result > 0) + { + // Action OK + $nbtotal++; + $nbok++; + } + if ($result == 0) + { + // Aucune action faite + $nbtotal++; + } + if ($result < 0) + { + // Action KO + $nbtotal++; + $nbko++; + $this->errors[]=$objMod->error; + } + } + else + { + dol_syslog(get_class($this)."::run_triggers action=".$action." Failed to instantiate trigger for file '".$files[$key]."'",LOG_ERR); } } if ($nbko) { - dol_syslog("Interfaces::run_triggers action=".$action." Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_ERR); + dol_syslog(get_class($this)."::run_triggers action=".$action." Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_ERR); return -$nbko; } else { - //dol_syslog("Interfaces::run_triggers Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_DEBUG); + //dol_syslog(get_class($this)."::run_triggers Files found: ".$nbfile.", Files launched: ".$nbtotal.", Done: ".$nbok.", Failed: ".$nbko, LOG_DEBUG); return $nbok; } } /** - * Return list of triggers. Function used by admin page htdoc/admin/triggers + * Return list of triggers. Function used by admin page htdoc/admin/triggers. + * List is sorted by trigger filename so by priority to run. * - * @param int $workflow 0=Return all triggers, 1=Return only triggers not disabled if workflow module activated * @return array Array list of triggers */ - function getTriggersList($workflow=0) + function getTriggersList() { global $conf, $langs; @@ -204,31 +216,29 @@ class Interfaces { while (($file = readdir($handle))!==false) { - if (is_readable($dir.'/'.$file) && preg_match('/^interface_([^_]+)_(.+)\.class\.php/',$file,$reg)) + if (is_readable($dir.'/'.$file) && preg_match('/^interface_([0-9]+)_([^_]+)_(.+)\.class\.php/',$file,$reg)) { - $modName = 'Interface'.ucfirst($reg[2]); + $part1=$reg[1]; + $part2=$reg[2]; + $part3=$reg[3]; + + $modName = 'Interface'.ucfirst($reg[3]); //print "file=$file"; print "modName=$modName"; exit; if (in_array($modName,$modules)) { $langs->load("errors"); print '
'.$langs->trans("Error").' : '.$langs->trans("ErrorDuplicateTrigger",$modName,"/htdocs/core/triggers/").'
'; - $objMod = new $modName($this->db); - - $modules[$i] = $modName; - $files[$i] = $file; - $orders[$i] = $objMod->family; // Tri par famille - $i++; } else { include_once($dir.'/'.$file); - $objMod = new $modName($this->db); - - $modules[$i] = $modName; - $files[$i] = $file; - $orders[$i] = $objMod->family; // Tri par famille - $i++; } + + $files[$i] = $file; + $modules[$i] = $modName; + $orders[$i] = $part1.'_'.$part2.'_'.$part3; // Set sort criteria value + + $i++; } } closedir($handle); @@ -244,27 +254,27 @@ class Interfaces foreach ($orders as $key => $value) { $modName = $modules[$key]; - if ($modName) - { - $objMod = new $modName($this->db); - // Bypass if workflow module is enabled and if the trigger is compatible - if ($workflow && ! empty($objMod->disabled_if_workflow)) continue; - } + if (empty($modName)) continue; + + $objMod = new $modName($this->db); // Define disabledbyname and disabledbymodule $disabledbyname=0; $disabledbymodule=1; $module=''; + + // Check if trigger file is disabled by name if (preg_match('/NORUN$/i',$files[$key])) $disabledbyname=1; - if (preg_match('/^interface_([^_]+)_(.+)\.class\.php/i',$files[$key],$reg)) + // Check if trigger file is for a particular module + if (preg_match('/^interface_([0-9]+)_([^_]+)_(.+)\.class\.php/i',$files[$key],$reg)) { - // Check if trigger file is for a particular module - $module=preg_replace('/^mod/i','',$reg[1]); + $module=preg_replace('/^mod/i','',$reg[2]); $constparam='MAIN_MODULE_'.strtoupper($module); - if (strtolower($reg[1]) == 'all') $disabledbymodule=0; + if (strtolower($reg[2]) == 'all') $disabledbymodule=0; else if (empty($conf->global->$constparam)) $disabledbymodule=2; } + // We set info of modules $triggers[$j]['picto'] = $objMod->picto?img_object('',$objMod->picto):img_object('','generic'); $triggers[$j]['file'] = $files[$key]; $triggers[$j]['version'] = $objMod->getVersion(); diff --git a/htdocs/core/triggers/interface_all_Logevents.class.php b/htdocs/core/triggers/interface_20_all_Logevents.class.php old mode 100644 new mode 100755 similarity index 96% rename from htdocs/core/triggers/interface_all_Logevents.class.php rename to htdocs/core/triggers/interface_20_all_Logevents.class.php index bba2794b177..508cfa19541 --- a/htdocs/core/triggers/interface_all_Logevents.class.php +++ b/htdocs/core/triggers/interface_20_all_Logevents.class.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/triggers/interface_all_Logevents.class.php + * \file htdocs/core/triggers/interface_20_all_Logevents.class.php * \ingroup core * \brief Trigger file for */ @@ -38,12 +38,13 @@ class InterfaceLogevents var $desc; /** - * Constructor. - * @param DB Database handler + * Constructor + * + * @param DoliDB $db Database handler */ - function InterfaceLogevents($DB) + function InterfaceLogevents($db) { - $this->db = $DB ; + $this->db = $db; $this->name = preg_replace('/^Interface/i','',get_class($this)); $this->family = "core"; @@ -243,7 +244,7 @@ class InterfaceLogevents $error ="Failed to insert security event: ".$event->error; $this->error=$error; - dol_syslog("interface_all_Logevents.class.php: ".$this->error, LOG_ERR); + dol_syslog(get_class($this).": ".$this->error, LOG_ERR); return -1; } } diff --git a/htdocs/core/triggers/interface_modPaypal_PaypalWorkflow.class.php b/htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php old mode 100644 new mode 100755 similarity index 95% rename from htdocs/core/triggers/interface_modPaypal_PaypalWorkflow.class.php rename to htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php index c44554ba466..219087a0922 --- a/htdocs/core/triggers/interface_modPaypal_PaypalWorkflow.class.php +++ b/htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php @@ -16,7 +16,7 @@ */ /** - * \file /htdocs/core/triggers/interface_modPaypal_PaypalWorkflow.class.php + * \file /htdocs/core/triggers/interface_20_modPaypal_PaypalWorkflow.class.php * \ingroup paypal * \brief Trigger file for paypal workflow */ @@ -32,11 +32,12 @@ class InterfacePaypalWorkflow /** * Constructor - * @param DB Database handler + * + * @param DoliDB $db Database handler */ - function InterfacePaypalWorkflow($DB) + function InterfacePaypalWorkflow($db) { - $this->db = $DB ; + $this->db = $db; $this->name = preg_replace('/^Interface/i','',get_class($this)); $this->family = "paypal"; diff --git a/htdocs/core/triggers/interface_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php similarity index 94% rename from htdocs/core/triggers/interface_modWorkflow_WorkflowManager.class.php rename to htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index a123bd63842..4d9c5a42ac0 100755 --- a/htdocs/core/triggers/interface_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/triggers/interface_modWorkflow_WorkflowManager.class.php + * \file htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php * \ingroup core * \brief Trigger file for workflows */ @@ -33,12 +33,13 @@ class InterfaceWorkflowManager var $db; /** - * Constructor. - * @param DB Database handler + * Constructor + * + * @param DoliDB $db Database handler */ - function InterfaceWorkflowManager($DB) + function InterfaceWorkflowManager($db) { - $this->db = $DB ; + $this->db = $db; $this->name = preg_replace('/^Interface/i','',get_class($this)); $this->family = "core"; diff --git a/htdocs/core/triggers/interface_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php old mode 100644 new mode 100755 similarity index 99% rename from htdocs/core/triggers/interface_modAgenda_ActionsAuto.class.php rename to htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 2551fba0731..77d4755134e --- a/htdocs/core/triggers/interface_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -18,7 +18,7 @@ */ /** - * \file htdocs/core/triggers/interface_modAgenda_ActionsAuto.class.php + * \file htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php * \ingroup agenda * \brief Trigger file for agenda module */ @@ -39,12 +39,13 @@ class InterfaceActionsAuto var $desc; /** - * Constructor. - * @param DB Database handler + * Constructor + * + * @param DoliDB $db Database handler */ - function InterfaceActionsAuto($DB) + function InterfaceActionsAuto($db) { - $this->db = $DB ; + $this->db = $db; $this->name = preg_replace('/^Interface/i','',get_class($this)); $this->family = "agenda"; diff --git a/htdocs/core/triggers/interface_modLdap_Ldapsynchro.class.php b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php old mode 100644 new mode 100755 similarity index 98% rename from htdocs/core/triggers/interface_modLdap_Ldapsynchro.class.php rename to htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php index 542150f217b..89595d96169 --- a/htdocs/core/triggers/interface_modLdap_Ldapsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php @@ -16,7 +16,7 @@ */ /** - * \file htdocs/core/triggers/interface_modLdap_Ldapsynchro.class.php + * \file htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php * \ingroup core * \brief Fichier de gestion des triggers LDAP */ @@ -34,12 +34,13 @@ class InterfaceLdapsynchro /** - * Constructor. - * @param DB Database handler + * Constructor + * + * @param DoliDB $db Database handler */ - function InterfaceLdapsynchro($DB) + function InterfaceLdapsynchro($db) { - $this->db = $DB ; + $this->db = $db; $this->name = preg_replace('/^Interface/i','',get_class($this)); $this->family = "ldap"; diff --git a/htdocs/core/triggers/interface_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php old mode 100644 new mode 100755 similarity index 97% rename from htdocs/core/triggers/interface_modNotification_Notification.class.php rename to htdocs/core/triggers/interface_50_modNotification_Notification.class.php index eff1ded2345..d98c1ec0b93 --- a/htdocs/core/triggers/interface_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/core/triggers/interface_modNotification_Notification.class.php + * \file htdocs/core/triggers/interface_50_modNotification_Notification.class.php * \ingroup notification * \brief File of class of triggers for notification module */ @@ -34,12 +34,13 @@ class InterfaceNotification 'FICHEINTER_VALIDATE','ORDER_SUPPLIER_APPROVE','ORDER_SUPPLIER_REFUSE'); /** - * Constructor. - * @param DB Database handler + * Constructor + * + * @param DoliDB $db Database handler */ - function InterfaceNotification($DB) + function InterfaceNotification($db) { - $this->db = $DB ; + $this->db = $db; $this->name = preg_replace('/^Interface/i','',get_class($this)); $this->family = "notification"; diff --git a/htdocs/core/triggers/interface_all_Demo.class.php-NORUN b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN old mode 100644 new mode 100755 similarity index 98% rename from htdocs/core/triggers/interface_all_Demo.class.php-NORUN rename to htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN index 8c02ba961d2..7d28d98760f --- a/htdocs/core/triggers/interface_all_Demo.class.php-NORUN +++ b/htdocs/core/triggers/interface_90_all_Demo.class.php-NORUN @@ -17,12 +17,12 @@ */ /** - * \file htdocs/core/triggers/interface_all_Demo.class.php + * \file htdocs/core/triggers/interface_90_all_Demo.class.php * \ingroup core * \brief Fichier de demo de personalisation des actions du workflow * \remarks Son propre fichier d'actions peut etre cree par recopie de celui-ci: - * - Le nom du fichier doit etre: interface_modMymodule_Mytrigger.class.php - * ou: interface_all_Mytrigger.class.php + * - Le nom du fichier doit etre: interface_99_modMymodule_Mytrigger.class.php + * ou: interface_99_all_Mytrigger.class.php * - Le fichier doit rester stocke dans core/triggers * - Le nom de la classe doit etre InterfaceMytrigger * - Le nom de la methode constructeur doit etre InterfaceMytrigger @@ -39,12 +39,13 @@ class InterfaceDemo var $db; /** - * Constructor. - * @param DB Database handler + * Constructor + * + * @param DoliDB $db Database handler */ - function InterfaceDemo($DB) + function InterfaceDemo($db) { - $this->db = $DB ; + $this->db = $db; $this->name = preg_replace('/^Interface/i','',get_class($this)); $this->family = "demo"; diff --git a/htdocs/install/mysql/tables/llx_events.sql b/htdocs/install/mysql/tables/llx_events.sql index 7edd4174538..7425a4e5e68 100644 --- a/htdocs/install/mysql/tables/llx_events.sql +++ b/htdocs/install/mysql/tables/llx_events.sql @@ -18,7 +18,7 @@ -- ======================================================================== -- This table logs all dolibarr security events -- Content of this table is not managed by users but by Dolibarr --- trigger interface_all_LogEvent. +-- trigger interface_20_all_Logevents. -- ======================================================================== create table llx_events diff --git a/htdocs/societe/notify/fiche.php b/htdocs/societe/notify/fiche.php index e931b35d570..18ce7e898a7 100644 --- a/htdocs/societe/notify/fiche.php +++ b/htdocs/societe/notify/fiche.php @@ -26,7 +26,7 @@ require("../../main.inc.php"); require_once(DOL_DOCUMENT_ROOT."/core/lib/company.lib.php"); require_once(DOL_DOCUMENT_ROOT."/contact/class/contact.class.php"); -require_once(DOL_DOCUMENT_ROOT."/core/triggers/interface_modNotification_Notification.class.php"); +require_once(DOL_DOCUMENT_ROOT."/core/triggers/interface_50_modNotification_Notification.class.php"); $langs->load("companies"); $langs->load("mails"); diff --git a/htdocs/theme/eldy/style.css.php b/htdocs/theme/eldy/style.css.php index 8735efe5fdc..42aa4644afb 100644 --- a/htdocs/theme/eldy/style.css.php +++ b/htdocs/theme/eldy/style.css.php @@ -383,7 +383,7 @@ a.tmenu:link, a.tmenu:visited, a.tmenu:hover, a.tmenu:active { padding: 0px 5px 0px 5px; margin: 0px 1px 2px 1px; white-space: nowrap; - text-shadow: 1px 2px 3px #AFAFAF; + text-shadow: 1px 2px 4px #BFBFBF; } a.tmenu:hover, a.tmenu:active { margin: 0px 0px 0px 0px; @@ -394,7 +394,7 @@ a.tmenu:hover, a.tmenu:active { } a.tmenu:hover, a.tmenu:active { background: #F4F4F4; - text-shadow: 1px 2px 3px #AFAFAF; + text-shadow: 1px 2px 4px #BFBFBF; } a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { @@ -408,7 +408,7 @@ a.tmenusel:link, a.tmenusel:visited, a.tmenusel:hover, a.tmenusel:active { border-: 1px solid #D8D8D8; border-bottom: 2px solid #F4F4F4; white-space: nowrap; - text-shadow: 1px 2px 3px #AFAFAF; + text-shadow: 1px 2px 4px #BFBFBF; } @@ -1693,7 +1693,7 @@ div.titre { font-weight: bold; color: rgb(); text-decoration: none; - text-shadow: 1px 2px 3px #AFAFAF; + text-shadow: 2px 2px 4px #BFBFBF; }