mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-20 08:21:29 +01:00
Fix init hook context "cli" for all cli scripts
This commit is contained in:
@@ -107,6 +107,12 @@ if (!($result > 0)) {
|
|||||||
}
|
}
|
||||||
$user->getrights();
|
$user->getrights();
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Main
|
||||||
|
*/
|
||||||
|
|
||||||
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
||||||
if (!isset($argv[1])) { // Check parameters
|
if (!isset($argv[1])) { // Check parameters
|
||||||
|
|||||||
@@ -56,6 +56,9 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/paymentsocialcontribution
|
|||||||
$version = DOL_VERSION;
|
$version = DOL_VERSION;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -48,6 +48,9 @@ $version = DOL_VERSION;
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
$confirmed = 0;
|
$confirmed = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ $langs->loadLangs(array('main', 'contracts'));
|
|||||||
$version = DOL_VERSION;
|
$version = DOL_VERSION;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ $langs->loadLangs(array('main', 'contracts'));
|
|||||||
$version = DOL_VERSION;
|
$version = DOL_VERSION;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -56,6 +56,13 @@ $version = DOL_VERSION;
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
$forcecommit = 0;
|
$forcecommit = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Main
|
||||||
|
*/
|
||||||
|
|
||||||
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." - dir=".DOL_DATA_ROOT." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." - dir=".DOL_DATA_ROOT." *****\n";
|
||||||
dol_syslog($script_file." launched with arg ".join(',', $argv));
|
dol_syslog($script_file." launched with arg ".join(',', $argv));
|
||||||
|
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
* \ingroup mailing
|
* \ingroup mailing
|
||||||
* \brief Script to send a prepared and validated emaling from command line
|
* \brief Script to send a prepared and validated emaling from command line
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (!defined('NOSESSION')) {
|
if (!defined('NOSESSION')) {
|
||||||
define('NOSESSION', '1');
|
define('NOSESSION', '1');
|
||||||
}
|
}
|
||||||
@@ -78,6 +79,8 @@ if (!isModEnabled('mailing')) {
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
|
|||||||
@@ -62,6 +62,8 @@ if (!isModEnabled('mailing')) {
|
|||||||
exit(-1);
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
|
|||||||
@@ -61,6 +61,9 @@ $langs->load('main');
|
|||||||
$version = DOL_VERSION;
|
$version = DOL_VERSION;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -59,6 +59,9 @@ $langs->load('main');
|
|||||||
$version = DOL_VERSION;
|
$version = DOL_VERSION;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ $langs->load("main");
|
|||||||
$version = DOL_VERSION;
|
$version = DOL_VERSION;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
|
|||||||
@@ -49,6 +49,9 @@ $version = constant('DOL_VERSION');
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
$confirmed = 0;
|
$confirmed = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ $error = 0;
|
|||||||
$forcecommit = 0;
|
$forcecommit = 0;
|
||||||
$confirmed = 0;
|
$confirmed = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -54,6 +54,9 @@ require_once DOL_DOCUMENT_ROOT."/adherents/class/adherent_type.class.php";
|
|||||||
$version = constant('DOL_VERSION');
|
$version = constant('DOL_VERSION');
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ $error = 0;
|
|||||||
$forcecommit = 0;
|
$forcecommit = 0;
|
||||||
$confirmed = 0;
|
$confirmed = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -56,6 +56,13 @@ $version = DOL_VERSION;
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
$forcecommit = 0;
|
$forcecommit = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Main
|
||||||
|
*/
|
||||||
|
|
||||||
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
||||||
dol_syslog($script_file." launched with arg ".join(',', $argv));
|
dol_syslog($script_file." launched with arg ".join(',', $argv));
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,12 @@ $version = DOL_VERSION;
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
$forcecommit = 0;
|
$forcecommit = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Main
|
||||||
|
*/
|
||||||
|
|
||||||
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
||||||
dol_syslog($script_file." launched with arg ".join(',', $argv));
|
dol_syslog($script_file." launched with arg ".join(',', $argv));
|
||||||
|
|
||||||
|
|||||||
@@ -56,6 +56,13 @@ $version = DOL_VERSION;
|
|||||||
$error = 0;
|
$error = 0;
|
||||||
$forcecommit = 0;
|
$forcecommit = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Main
|
||||||
|
*/
|
||||||
|
|
||||||
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
print "***** ".$script_file." (".$version.") pid=".dol_getmypid()." *****\n";
|
||||||
dol_syslog($script_file." launched with arg ".join(',', $argv));
|
dol_syslog($script_file." launched with arg ".join(',', $argv));
|
||||||
|
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ require_once DOL_DOCUMENT_ROOT."/user/class/usergroup.class.php";
|
|||||||
$version = DOL_VERSION;
|
$version = DOL_VERSION;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -53,6 +53,9 @@ $error = 0;
|
|||||||
$forcecommit = 0;
|
$forcecommit = 0;
|
||||||
$confirmed = 0;
|
$confirmed = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ require_once DOL_DOCUMENT_ROOT."/user/class/user.class.php";
|
|||||||
$version = DOL_VERSION;
|
$version = DOL_VERSION;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -52,6 +52,9 @@ $forcecommit = 0;
|
|||||||
$excludeuser = array();
|
$excludeuser = array();
|
||||||
$confirmed = 0;
|
$confirmed = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -63,6 +63,8 @@ include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php';
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/website2.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/website2.lib.php';
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
|
|||||||
@@ -58,6 +58,8 @@ include_once DOL_DOCUMENT_ROOT.'/website/class/website.class.php';
|
|||||||
include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/website/class/websitepage.class.php';
|
||||||
include_once DOL_DOCUMENT_ROOT.'/core/lib/website2.lib.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/website2.lib.php';
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ require_once DOL_DOCUMENT_ROOT."/compta/paiement/class/paiement.class.php";
|
|||||||
$version = constant('DOL_VERSION');
|
$version = constant('DOL_VERSION');
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
|
$hookmanager->initHooks(array('cli'));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Main
|
* Main
|
||||||
*/
|
*/
|
||||||
|
|||||||
Reference in New Issue
Block a user