Clean code

This commit is contained in:
Laurent Destailleur 2018-05-02 19:15:16 +02:00
parent dfe6e4bfc1
commit 24518803fc
5 changed files with 8 additions and 11 deletions

View File

@ -128,8 +128,6 @@ print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="action" value="setvalue">';
$var=true;
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>';
@ -168,7 +166,6 @@ $listofnotifiedevents=$notificationtrigger->getListOfManagedEvents();
print '<tr class="oddeven">';
print '<td>';
$var=true;
$i=0;
foreach($listofnotifiedevents as $notifiedevent)
{
@ -212,7 +209,6 @@ print "</tr>\n";
$notificationtrigger=new InterfaceNotification($db);
$listofnotifiedevents=$notificationtrigger->getListOfManagedEvents();
$var=true;
foreach($listofnotifiedevents as $notifiedevent)
{

View File

@ -23,7 +23,6 @@
*/
require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
/**
@ -56,6 +55,7 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
$b=new BlockedLog($this->db);
// Tracked events

View File

@ -24,8 +24,6 @@
*/
require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
require_once DOL_DOCUMENT_ROOT."/core/class/ldap.class.php";
require_once DOL_DOCUMENT_ROOT."/user/class/usergroup.class.php";
/**
@ -60,6 +58,9 @@ class InterfaceLdapsynchro extends DolibarrTriggers
return 0;
}
require_once DOL_DOCUMENT_ROOT."/core/class/ldap.class.php";
require_once DOL_DOCUMENT_ROOT."/user/class/usergroup.class.php";
$result=0;
// Users

View File

@ -22,8 +22,6 @@
* \brief File to manage triggers Mailman and Spip
*/
require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
require_once DOL_DOCUMENT_ROOT."/mailmanspip/class/mailmanspip.class.php";
require_once DOL_DOCUMENT_ROOT."/user/class/usergroup.class.php";
/**
@ -51,6 +49,9 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers
{
if (empty($conf->mailmanspip->enabled)) return 0; // Module not active, we do nothing
require_once DOL_DOCUMENT_ROOT."/mailmanspip/class/mailmanspip.class.php";
require_once DOL_DOCUMENT_ROOT."/user/class/usergroup.class.php";
if ($action == 'CATEGORY_LINK')
{
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);

View File

@ -28,7 +28,6 @@
* - Le nom de la propriete name doit etre Mytrigger
*/
require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php';
$path=dirname(__FILE__).'/';
/**
@ -122,7 +121,7 @@ class InterfaceStripe
$ok = 0;
include_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
require_once DOL_DOCUMENT_ROOT.'/stripe/class/stripe.class.php';
$stripe = new Stripe($db);
if (empty($conf->stripe->enabled)) return 0;