Perf: Optimisation chargement class
This commit is contained in:
parent
ebbe5ec69e
commit
a6ca8524f7
@ -35,7 +35,6 @@
|
|||||||
\version $Revision$
|
\version $Revision$
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/includes/xmlrpc/xmlrpc.php");
|
|
||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");
|
||||||
|
|
||||||
|
|
||||||
@ -1415,6 +1414,8 @@ class Adherent
|
|||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/includes/xmlrpc/xmlrpc.php");
|
||||||
|
|
||||||
dolibarr_syslog("Adherent::add_to_glasnost");
|
dolibarr_syslog("Adherent::add_to_glasnost");
|
||||||
|
|
||||||
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
||||||
@ -1481,6 +1482,8 @@ class Adherent
|
|||||||
*/
|
*/
|
||||||
function del_to_glasnost()
|
function del_to_glasnost()
|
||||||
{
|
{
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/includes/xmlrpc/xmlrpc.php");
|
||||||
|
|
||||||
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
||||||
defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' &&
|
defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' &&
|
||||||
defined('ADHERENT_GLASNOST_USER') && ADHERENT_GLASNOST_USER != '' &&
|
defined('ADHERENT_GLASNOST_USER') && ADHERENT_GLASNOST_USER != '' &&
|
||||||
@ -1586,6 +1589,8 @@ class Adherent
|
|||||||
|
|
||||||
function is_in_glasnost()
|
function is_in_glasnost()
|
||||||
{
|
{
|
||||||
|
require_once(DOL_DOCUMENT_ROOT."/includes/xmlrpc/xmlrpc.php");
|
||||||
|
|
||||||
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
if (defined("ADHERENT_USE_GLASNOST") && ADHERENT_USE_GLASNOST ==1 &&
|
||||||
defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' &&
|
defined('ADHERENT_GLASNOST_SERVEUR') && ADHERENT_GLASNOST_SERVEUR != '' &&
|
||||||
defined('ADHERENT_GLASNOST_USER') && ADHERENT_GLASNOST_USER != '' &&
|
defined('ADHERENT_GLASNOST_USER') && ADHERENT_GLASNOST_USER != '' &&
|
||||||
|
|||||||
@ -35,7 +35,6 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_options.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_options.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/includes/xmlrpc/xmlrpc.php");
|
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
|
|||||||
@ -35,7 +35,6 @@ require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_type.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_options.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/adherent_options.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/adherents/cotisation.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/compta/bank/account.class.php");
|
||||||
require_once(DOL_DOCUMENT_ROOT."/includes/xmlrpc/xmlrpc.php");
|
|
||||||
|
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
@ -498,11 +497,9 @@ if ($user->rights->adherent->creer && $_POST["action"] == 'confirm_add_glasnost'
|
|||||||
if ($result >= 0 && ! sizeof($adh->errors))
|
if ($result >= 0 && ! sizeof($adh->errors))
|
||||||
{
|
{
|
||||||
if ($adht->vote == 'yes'){
|
if ($adht->vote == 'yes'){
|
||||||
define("XMLRPC_DEBUG", 1);
|
|
||||||
if (!$adh->add_to_glasnost()){
|
if (!$adh->add_to_glasnost()){
|
||||||
$errmsg.="Echec du rajout de l'utilisateur dans glasnost: ".$adh->error."<BR>\n";
|
$errmsg.="Echec du rajout de l'utilisateur dans glasnost: ".$adh->error."<BR>\n";
|
||||||
}
|
}
|
||||||
XMLRPC_debug_print();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -515,11 +512,9 @@ if ($user->rights->adherent->supprimer && $_POST["action"] == 'confirm_del_glasn
|
|||||||
if ($result >= 0 && ! sizeof($adh->errors))
|
if ($result >= 0 && ! sizeof($adh->errors))
|
||||||
{
|
{
|
||||||
if ($adht->vote == 'yes'){
|
if ($adht->vote == 'yes'){
|
||||||
define("XMLRPC_DEBUG", 1);
|
|
||||||
if(!$adh->del_to_glasnost()){
|
if(!$adh->del_to_glasnost()){
|
||||||
$errmsg.="Echec de la suppression de l'utilisateur dans glasnost: ".$adh->error."<BR>\n";
|
$errmsg.="Echec de la suppression de l'utilisateur dans glasnost: ".$adh->error."<BR>\n";
|
||||||
}
|
}
|
||||||
XMLRPC_debug_print();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1083,7 +1078,6 @@ if ($rowid && $action != 'edit')
|
|||||||
// Action Glasnost
|
// Action Glasnost
|
||||||
if ($adht->vote == 'yes' && $conf->global->ADHERENT_USE_GLASNOST)
|
if ($adht->vote == 'yes' && $conf->global->ADHERENT_USE_GLASNOST)
|
||||||
{
|
{
|
||||||
define("XMLRPC_DEBUG", 1);
|
|
||||||
$isinglasnost=$adh->is_in_glasnost();
|
$isinglasnost=$adh->is_in_glasnost();
|
||||||
if ($isinglasnost == 1)
|
if ($isinglasnost == 1)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user