commit
e950bdde26
154 changed files with 213 additions and 211 deletions
|
|
@ -43,6 +43,8 @@ $error = 0;
|
|||
require_once $path."../../../htdocs/master.inc.php";
|
||||
// After this $db, $mysoc, $langs and $conf->entity are defined. Opened handler to database will be closed at end of file.
|
||||
|
||||
global $db, $conf, $langs;
|
||||
|
||||
//$langs->setDefaultLang('en_US'); // To change default language of $langs
|
||||
$langs->load("main"); // To load language file for default language
|
||||
@set_time_limit(0);
|
||||
|
|
@ -50,7 +52,7 @@ $langs->load("main"); // To load language file for default language
|
|||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
dol_print_error(null, $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ $langs->load("main"); // To load language file for default language
|
|||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
dol_print_error(null, $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ $langs->load("main"); // To load language file for default language
|
|||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
dol_print_error(null, $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ $langs->load("main"); // To load language file for default language
|
|||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
dol_print_error(null, $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ $langs->load("main"); // To load language file for default language
|
|||
// Load user and its permissions
|
||||
$result = $user->fetch('', 'admin'); // Load user for login 'admin'. Comment line to run as anonymous user.
|
||||
if (!$result > 0) {
|
||||
dol_print_error('', $user->error);
|
||||
dol_print_error(null, $user->error);
|
||||
exit;
|
||||
}
|
||||
$user->getrights();
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@ print 'SFTP connect string : '.$sftpconnectstring."\n";
|
|||
|
||||
// SFTP connect
|
||||
if (!function_exists("ssh2_connect")) {
|
||||
dol_print_error('', 'ssh2_connect function does not exists');
|
||||
dol_print_error(null, 'ssh2_connect function does not exists');
|
||||
exit(1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ if ($action == 'create') {
|
|||
$next_num_mvt = $object->getNextNumMvt('_tmp');
|
||||
|
||||
if (empty($next_num_mvt)) {
|
||||
dol_print_error('', 'Failed to get next piece number');
|
||||
dol_print_error(null, 'Failed to get next piece number');
|
||||
}
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" name="create_mvt" method="POST">';
|
||||
|
|
|
|||
|
|
@ -781,7 +781,7 @@ class AccountancyCategory // extends CommonObject
|
|||
global $conf, $mysoc;
|
||||
|
||||
if (empty($mysoc->country_id)) {
|
||||
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
|
||||
dol_print_error(null, 'Call to select_accounting_account with mysoc country not yet defined');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -846,7 +846,7 @@ class AccountancyCategory // extends CommonObject
|
|||
$sql = '';
|
||||
|
||||
if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
|
||||
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
|
||||
dol_print_error(null, 'Call to select_accounting_account with mysoc country not yet defined');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ $result = $object->fetch($id_journal);
|
|||
if ($result > 0) {
|
||||
$id_journal = $object->id;
|
||||
} elseif ($result < 0) {
|
||||
dol_print_error('', $object->error, $object->errors);
|
||||
dol_print_error(null, $object->error, $object->errors);
|
||||
} elseif ($result == 0) {
|
||||
accessforbidden('ErrorRecordNotFound');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -913,7 +913,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
$object = new Adherent($db);
|
||||
$result = $object->fetch($id);
|
||||
if ($result <= 0) {
|
||||
dol_print_error('', $object->error);
|
||||
dol_print_error(null, $object->error);
|
||||
}
|
||||
}
|
||||
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ if ((!empty($foruserid) || !empty($foruserlogin) || !empty($mode)) && !$mesg) {
|
|||
}
|
||||
|
||||
if ($result <= 0) {
|
||||
dol_print_error('', $result);
|
||||
dol_print_error(null, $result);
|
||||
}
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ if ($id > 0) {
|
|||
|
||||
print dol_get_fiche_end();
|
||||
} else {
|
||||
dol_print_error('', 'Parameter rowid not defined');
|
||||
dol_print_error(null, 'Parameter rowid not defined');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ if (empty($reshook) && $action == 'setuserid' && ($user->hasRight('user', 'self'
|
|||
if (GETPOST("userid", 'int') != $object->user_id) { // If link differs from currently in database
|
||||
$result = $object->setUserId(GETPOST("userid", 'int'));
|
||||
if ($result < 0) {
|
||||
dol_print_error('', $object->error);
|
||||
dol_print_error(null, $object->error);
|
||||
}
|
||||
$action = '';
|
||||
}
|
||||
|
|
@ -192,7 +192,7 @@ if (empty($reshook) && $action == 'setsocid') {
|
|||
if (!$error) {
|
||||
$result = $object->setThirdPartyId(GETPOST('socid', 'int'));
|
||||
if ($result < 0) {
|
||||
dol_print_error('', $object->error);
|
||||
dol_print_error(null, $object->error);
|
||||
}
|
||||
$action = '';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ if ($action == 'updateik') {
|
|||
if ($id > 0) {
|
||||
$result = $expIk->fetch($id);
|
||||
if ($result < 0) {
|
||||
dol_print_error('', $expIk->error, $expIk->errors);
|
||||
dol_print_error(null, $expIk->error, $expIk->errors);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -85,7 +85,7 @@ if ($action == 'updateik') {
|
|||
if ($id > 0) {
|
||||
$result = $expIk->fetch($id);
|
||||
if ($result < 0) {
|
||||
dol_print_error('', $expIk->error, $expIk->errors);
|
||||
dol_print_error(null, $expIk->error, $expIk->errors);
|
||||
}
|
||||
|
||||
$expIk->delete($user);
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ if (empty($reshook)) {
|
|||
if (!empty($id)) {
|
||||
$result = $object->fetch($id);
|
||||
if ($result < 0) {
|
||||
dol_print_error('', $object->error, $object->errors);
|
||||
dol_print_error(null, $object->error, $object->errors);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,11 +50,11 @@ $rawData = file_get_contents('php://input');
|
|||
$jsonData = json_decode($rawData, true);
|
||||
|
||||
if (is_null($jsonData)) {
|
||||
dol_print_error('data with format JSON valide.');
|
||||
dol_print_error(null, 'data with format JSON valide.');
|
||||
}
|
||||
$token = GETPOST('token');
|
||||
if ($token !== currentToken()) { // Remplacez 'newToken' par le nom de votre variable de session contenant le token
|
||||
dol_print_error('CSRF token validation failed.');
|
||||
dol_print_error(null, 'CSRF token validation failed.');
|
||||
exit;
|
||||
}
|
||||
$chatGPT = new Ai('API_ENDPOINT', 'API_KEY');
|
||||
|
|
@ -66,5 +66,5 @@ $generatedContent = $chatGPT->generateContent($instructions);
|
|||
if ($generatedContent) {
|
||||
print $generatedContent;
|
||||
} else {
|
||||
dol_print_error('error!!');
|
||||
dol_print_error(null, 'error!!');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1561,7 +1561,7 @@ class Asset extends CommonObject
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -890,7 +890,7 @@ class BOM extends CommonObject
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1019,7 +1019,7 @@ class Availabilities extends CommonObject
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1007,7 +1007,7 @@ class Calendar extends CommonObject
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ $visible = (int) GETPOST('visible', 'int');
|
|||
$parent = (int) GETPOST('parent', 'int');
|
||||
|
||||
if ($id == "") {
|
||||
dol_print_error('', 'Missing parameter id');
|
||||
dol_print_error(null, 'Missing parameter id');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ $action = GETPOST('action', 'aZ09');
|
|||
$confirm = GETPOST('confirm');
|
||||
|
||||
if ($id == '' && $label == '') {
|
||||
dol_print_error('', 'Missing parameter id');
|
||||
dol_print_error(null, 'Missing parameter id');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ $action = GETPOST('action', 'aZ09');
|
|||
$cancel = GETPOST('cancel', 'alpha');
|
||||
|
||||
if ($id == '' && $label == '') {
|
||||
dol_print_error('', 'Missing parameter id');
|
||||
dol_print_error(null, 'Missing parameter id');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ $pageprev = $page - 1;
|
|||
$pagenext = $page + 1;
|
||||
|
||||
if ($id == "" && $label == "") {
|
||||
dol_print_error('', 'Missing parameter id');
|
||||
dol_print_error(null, 'Missing parameter id');
|
||||
exit();
|
||||
}
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ if ($id > 0 && $removeelem > 0 && $action == 'unlink') {
|
|||
|
||||
$result = $object->del_type($tmpobject, $elementtype);
|
||||
if ($result < 0) {
|
||||
dol_print_error('', $object->error);
|
||||
dol_print_error(null, $object->error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ if ($id > 0 && $action != 'add') {
|
|||
$ret1 = $object->fetch_userassigned();
|
||||
}
|
||||
if ($ret < 0 || $ret1 < 0) {
|
||||
dol_print_error('', $object->error);
|
||||
dol_print_error(null, $object->error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ if (empty($reshook)) {
|
|||
$action = '';
|
||||
} else {
|
||||
if ($object->statut == 0) {
|
||||
dol_print_error('', 'ErrorMailIsNotValidated');
|
||||
dol_print_error(null, 'ErrorMailIsNotValidated');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3761,7 +3761,7 @@ class Propal extends CommonObject
|
|||
}
|
||||
|
||||
if (!$mybool) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -436,7 +436,7 @@ class Commande extends CommonOrder
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1301,7 +1301,7 @@ if ($resql) {
|
|||
// If we are in a situation where we need/can show balance, we calculate the start of balance
|
||||
if (!$balancecalculated && (!empty($arrayfields['balancebefore']['checked']) || !empty($arrayfields['balance']['checked'])) && ($mode_balance_ok || $search_conciliated === '0')) {
|
||||
if (!$search_account) {
|
||||
dol_print_error('', 'account is not defined but $mode_balance_ok is true');
|
||||
dol_print_error(null, 'account is not defined but $mode_balance_ok is true');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ if ($action == 'confirm_delete' && !empty($permissiontodelete)) {
|
|||
$object->fetch($id);
|
||||
|
||||
if (!($object->id > 0)) {
|
||||
dol_print_error('', 'Error, object must be fetched before being deleted');
|
||||
dol_print_error(null, 'Error, object must be fetched before being deleted');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -351,7 +351,7 @@ if ($action == "create" || $action == "start" || $action == 'close') {
|
|||
} elseif ($key == 'card') {
|
||||
$sql .= " AND cp.code = 'CB'";
|
||||
} else {
|
||||
dol_print_error('Value for key = '.$key.' not supported');
|
||||
dol_print_error(null, 'Value for key = '.$key.' not supported');
|
||||
exit;
|
||||
}
|
||||
if ($syear && !$smonth) {
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ $sql.= " AND f.entity IN (".getEntity('facture').")";
|
|||
if ($syear && ! $smonth) $sql.= " AND dateo BETWEEN '".$db->idate(dol_get_first_day($syear, 1))."' AND '".$db->idate(dol_get_last_day($syear, 12))."'";
|
||||
elseif ($syear && $smonth && ! $sday) $sql.= " AND dateo BETWEEN '".$db->idate(dol_get_first_day($syear, $smonth))."' AND '".$db->idate(dol_get_last_day($syear, $smonth))."'";
|
||||
elseif ($syear && $smonth && $sday) $sql.= " AND dateo BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'";
|
||||
else dol_print_error('', 'Year not defined');
|
||||
else dol_print_error(null, 'Year not defined');
|
||||
// Define filter on bank account
|
||||
$sql.=" AND (b.fk_account = ".((int) $conf->global->CASHDESK_ID_BANKACCOUNT_CASH);
|
||||
$sql.=" OR b.fk_account = ".((int) $conf->global->CASHDESK_ID_BANKACCOUNT_CB);
|
||||
|
|
@ -133,7 +133,7 @@ elseif ($key == 'cheque') $sql.=" AND cp.code = 'CHQ'";
|
|||
elseif ($key == 'card') $sql.=" AND cp.code = 'CB'";
|
||||
else
|
||||
{
|
||||
dol_print_error('Value for key = '.$key.' not supported');
|
||||
dol_print_error(null, 'Value for key = '.$key.' not supported');
|
||||
exit;
|
||||
}*/
|
||||
if ($syear && !$smonth) {
|
||||
|
|
@ -143,7 +143,7 @@ if ($syear && !$smonth) {
|
|||
} elseif ($syear && $smonth && $sday) {
|
||||
$sql .= " AND datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $smonth, $sday, $syear))."' AND '".$db->idate(dol_mktime(23, 59, 59, $smonth, $sday, $syear))."'";
|
||||
} else {
|
||||
dol_print_error('', 'Year not defined');
|
||||
dol_print_error(null, 'Year not defined');
|
||||
}
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
|
|
|||
|
|
@ -1204,7 +1204,7 @@ if ($action == 'create') {
|
|||
|
||||
print "</form>\n";
|
||||
} else {
|
||||
dol_print_error('', "Error, no invoice ".$object->id);
|
||||
dol_print_error(null, "Error, no invoice ".$object->id);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -4633,7 +4633,7 @@ class Facture extends CommonInvoice
|
|||
}
|
||||
|
||||
if (!$mybool) {
|
||||
dol_print_error('', 'Failed to include file '.$file);
|
||||
dol_print_error(null, 'Failed to include file '.$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -443,7 +443,7 @@ class RemiseCheque extends CommonObject
|
|||
}
|
||||
|
||||
if (!$mybool) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1156,7 +1156,7 @@ class Paiement extends CommonObject
|
|||
}
|
||||
|
||||
if (!$mybool) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -884,7 +884,7 @@ if ($id > 0) {
|
|||
include DOL_DOCUMENT_ROOT.'/core/tpl/card_presend.tpl.php';
|
||||
} else {
|
||||
/* Social contribution not found */
|
||||
dol_print_error('', $object->error);
|
||||
dol_print_error(null, $object->error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
$object = new Contact($db);
|
||||
$result = $object->fetch($id);
|
||||
if ($result <= 0) {
|
||||
dol_print_error('', $object->error);
|
||||
dol_print_error(null, $object->error);
|
||||
}
|
||||
}
|
||||
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
|
||||
|
|
|
|||
|
|
@ -586,7 +586,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
$object = new Contact($db);
|
||||
$result = $object->fetch($id);
|
||||
if ($result <= 0) {
|
||||
dol_print_error('', $object->error);
|
||||
dol_print_error(null, $object->error);
|
||||
}
|
||||
}
|
||||
$objcanvas->assign_values($action, $object->id, $object->ref); // Set value for templates
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ if ($id > 0 || !empty($ref) && $action != 'add') {
|
|||
$ret = $object->fetch_thirdparty();
|
||||
}
|
||||
if ($ret < 0) {
|
||||
dol_print_error('', $object->error);
|
||||
dol_print_error(null, $object->error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ class Contrat extends CommonObject
|
|||
}
|
||||
|
||||
if (!$mybool) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ $ref=GETPOST('ref', 'alpha');
|
|||
$action=GETPOST('action', 'alpha');
|
||||
|
||||
if ($id == '' && $ref == '') {
|
||||
dol_print_error('', 'Bad parameter');
|
||||
dol_print_error(null, 'Bad parameter');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -384,7 +384,7 @@ if ($action == "update_extras" && GETPOST('id', 'int') > 0 && !empty($permission
|
|||
// Action to delete
|
||||
if ($action == 'confirm_delete' && !empty($permissiontodelete)) {
|
||||
if (!($object->id > 0)) {
|
||||
dol_print_error('', 'Error, object must be fetched before being deleted');
|
||||
dol_print_error(null, 'Error, object must be fetched before being deleted');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ if ($action == 'builddoc' && ($permissiontoadd || !empty($usercangeneretedoc)))
|
|||
$ret = $object->fetch_thirdparty();
|
||||
/*if (empty($object->id) || ! $object->id > 0)
|
||||
{
|
||||
dol_print_error('Object must have been loaded by a fetch');
|
||||
dol_print_error(null, 'Object must have been loaded by a fetch');
|
||||
exit;
|
||||
}*/
|
||||
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ if (($action == 'send' || $action == 'relance') && !GETPOST('addfile') && !GETPO
|
|||
}
|
||||
}
|
||||
} else {
|
||||
dol_print_error('', "Use actions_sendmails.in.php for an element/object '".$object->element."' that is not supported");
|
||||
dol_print_error(null, "Use actions_sendmails.in.php for an element/object '".$object->element."' that is not supported");
|
||||
}
|
||||
|
||||
if (is_object($hookmanager)) {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
// Set public note
|
||||
if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel', 'alpha')) {
|
||||
if (empty($action) || !is_object($object) || empty($id)) {
|
||||
dol_print_error('', 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||
dol_print_error(null, 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||
}
|
||||
if (empty($object->id)) {
|
||||
$object->fetch($id); // Fetch may not be already done
|
||||
|
|
@ -76,7 +76,7 @@ if ($action == 'setnote_public' && !empty($permissionnote) && !GETPOST('cancel',
|
|||
if (empty($user->socid)) {
|
||||
// Private notes (always hidden to external users)
|
||||
if (empty($action) || !is_object($object) || empty($id)) {
|
||||
dol_print_error('', 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||
dol_print_error(null, 'Include of actions_setnotes.inc.php was done but required variable was not set before');
|
||||
}
|
||||
if (empty($object->id)) {
|
||||
$object->fetch($id); // Fetch may not be already done
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ $_SESSION[$sessionkey] = $string;
|
|||
|
||||
$img = imagecreate(80, 32);
|
||||
if (empty($img)) {
|
||||
dol_print_error('', "Problem with GD creation");
|
||||
dol_print_error(null, "Problem with GD creation");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ class CSMSFile
|
|||
$sms->error = 'The SMS manager "'.$classfile.'" defined into SMS setup MAIN_MODULE_'.strtoupper($sendmode).'_SMS is not found';
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
dol_print_error('', 'Error to get list of senders: '.$e->getMessage());
|
||||
dol_print_error(null, 'Error to get list of senders: '.$e->getMessage());
|
||||
}
|
||||
} else {
|
||||
// Send sms method not correctly defined
|
||||
|
|
|
|||
|
|
@ -2182,7 +2182,7 @@ abstract class CommonObject
|
|||
global $conf, $user;
|
||||
|
||||
if (!$this->table_element) {
|
||||
dol_print_error('', get_class($this)."::load_previous_next_ref was called on object with property table_element not defined");
|
||||
dol_print_error(null, get_class($this)."::load_previous_next_ref was called on object with property table_element not defined");
|
||||
return -1;
|
||||
}
|
||||
if ($fieldid == 'none') {
|
||||
|
|
@ -4716,7 +4716,7 @@ abstract class CommonObject
|
|||
|
||||
// Check parameters
|
||||
if (!isset($this->childtables) || !is_array($this->childtables) || count($this->childtables) == 0) {
|
||||
dol_print_error('Called isObjectUsed on a class with property this->childtables not defined');
|
||||
dol_print_error(null, 'Called isObjectUsed on a class with property this->childtables not defined');
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
@ -5173,7 +5173,7 @@ abstract class CommonObject
|
|||
// Define output language and label
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS')) {
|
||||
if (property_exists($this, 'socid') && !is_object($this->thirdparty)) {
|
||||
dol_print_error('', 'Error: Method printObjectLine was called on an object and object->fetch_thirdparty was not done before');
|
||||
dol_print_error(null, 'Error: Method printObjectLine was called on an object and object->fetch_thirdparty was not done before');
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -6000,7 +6000,7 @@ abstract class CommonObject
|
|||
global $langs, $conf;
|
||||
|
||||
if (!empty(self::TRIGGER_PREFIX) && strpos($triggerName, self::TRIGGER_PREFIX . '_') !== 0) {
|
||||
dol_print_error('', 'The trigger "' . $triggerName . '" does not start with "' . self::TRIGGER_PREFIX . '_" as required.');
|
||||
dol_print_error(null, 'The trigger "' . $triggerName . '" does not start with "' . self::TRIGGER_PREFIX . '_" as required.');
|
||||
exit;
|
||||
}
|
||||
if (!is_object($langs)) { // If lang was not defined, we set it. It is required by run_triggers().
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ class FormAccounting extends Form
|
|||
global $langs, $mysoc;
|
||||
|
||||
if (empty($mysoc->country_id) && empty($mysoc->country_code) && empty($allcountries)) {
|
||||
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
|
||||
dol_print_error(null, 'Call to select_accounting_account with mysoc country not yet defined');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ function limitChars(textarea, limit, infodiv)
|
|||
$sms->error = 'The SMS manager "'.$classfile.'" defined into SMS setup MAIN_MODULE_'.strtoupper($sendmode).'_SMS is not found';
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
dol_print_error('', 'Error to get list of senders: '.$e->getMessage());
|
||||
dol_print_error(null, 'Error to get list of senders: '.$e->getMessage());
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -965,7 +965,7 @@ class TimeSpent extends CommonObject
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ class Translate
|
|||
|
||||
// Check parameters
|
||||
if (empty($domain)) {
|
||||
dol_print_error('', get_class($this) . "::Load ErrorWrongParameters");
|
||||
dol_print_error(null, get_class($this) . "::Load ErrorWrongParameters");
|
||||
return -1;
|
||||
}
|
||||
if ($this->defaultlang === 'none_NONE') {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
if (empty($keyforclass) || empty($keyforclassfile) || empty($keyforelement)) {
|
||||
//print $keyforclass.' - '.$keyforclassfile.' - '.$keyforelement;
|
||||
dol_print_error('', 'include of file commonfieldsinexport.inc.php was done but var $keyforclass or $keyforclassfile or $keyforelement was not set');
|
||||
dol_print_error(null, 'include of file commonfieldsinexport.inc.php was done but var $keyforclass or $keyforclassfile or $keyforelement was not set');
|
||||
exit;
|
||||
}
|
||||
if (empty($keyforalias)) {
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
if (empty($keyforclass) || empty($keyforclassfile) || empty($keyforelement)) {
|
||||
//print $keyforclass.' - '.$keyforclassfile.' - '.$keyforelement;
|
||||
dol_print_error('', 'include of file commonfieldsinimport.inc.php was done but var $keyforclass or $keyforclassfile or $keyforelement was not set');
|
||||
dol_print_error(null, 'include of file commonfieldsinimport.inc.php was done but var $keyforclass or $keyforclassfile or $keyforelement was not set');
|
||||
exit;
|
||||
}
|
||||
if (empty($keyforalias)) {
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ if ($qualified) {
|
|||
//print $_GET["cm"].",".$_GET["sd"].",".$_GET["m"].",".$_GET["y"];exit;
|
||||
displayBox(GETPOST("sd", 'alpha'), GETPOST("m", 'int'), GETPOST("y", 'int'));
|
||||
} else {
|
||||
dol_print_error('', 'ErrorBadParameters');
|
||||
dol_print_error(null, 'ErrorBadParameters');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ class DoliDBMysqli extends DoliDB
|
|||
$tmp = false;
|
||||
try {
|
||||
if (!class_exists('mysqli')) {
|
||||
dol_print_error('', 'Driver mysqli for PHP not available');
|
||||
dol_print_error(null, 'Driver mysqli for PHP not available');
|
||||
}
|
||||
if (strpos($host, 'ssl://') === 0) {
|
||||
$tmp = new mysqliDoli($host, $login, $passwd, $name, $port);
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
if (empty($keyforselect) || empty($keyforelement) || empty($keyforaliasextra)) {
|
||||
//print $keyforselet.' - '.$keyforelement.' - '.$keyforaliasextra;
|
||||
dol_print_error('', 'include of file extrafieldsinexport.inc.php was done but var $keyforselect or $keyforelement or $keyforaliasextra was not set');
|
||||
dol_print_error(null, 'include of file extrafieldsinexport.inc.php was done but var $keyforselect or $keyforelement or $keyforaliasextra was not set');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
if (empty($keyforselect) || empty($keyforelement) || empty($keyforaliasextra)) {
|
||||
//print $keyforselet.' - '.$keyforelement.' - '.$keyforaliasextra;
|
||||
dol_print_error('', 'include of file extrafieldsinimport.inc.php was done but var $keyforselect or $keyforelement or $keyforaliasextra was not set');
|
||||
dol_print_error(null, 'include of file extrafieldsinimport.inc.php was done but var $keyforselect or $keyforelement or $keyforaliasextra was not set');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -565,7 +565,7 @@ function dolibarr_del_const($db, $name, $entity = 1)
|
|||
global $conf;
|
||||
|
||||
if (empty($name)) {
|
||||
dol_print_error('', 'Error call dolibar_del_const with parameter name empty');
|
||||
dol_print_error(null, 'Error call dolibar_del_const with parameter name empty');
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1621,7 +1621,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
|||
|
||||
// Check parameters
|
||||
if (!is_object($filterobj) && !is_object($objcon)) {
|
||||
dol_print_error('', 'BadParameter');
|
||||
dol_print_error(null, 'BadParameter');
|
||||
}
|
||||
|
||||
$out = '';
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ function getServerTimeZoneInt($refgmtdate = 'now')
|
|||
//print $refgmtdate.'='.$tmp;
|
||||
} else {
|
||||
$tmp = 0;
|
||||
dol_print_error('', 'PHP version must be 5.3+');
|
||||
dol_print_error(null, 'PHP version must be 5.3+');
|
||||
}
|
||||
$tz = round(($tmp < 0 ? 1 : -1) * abs($tmp / 3600));
|
||||
return $tz;
|
||||
|
|
|
|||
|
|
@ -3264,7 +3264,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||
if (preg_match('/^([a-z]+)_user_temp$/i', $modulepart, $reg)) {
|
||||
$tmpmodule = $reg[1];
|
||||
if (empty($conf->$tmpmodule->dir_temp)) { // modulepart not supported
|
||||
dol_print_error('', 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||
dol_print_error(null, 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||
exit;
|
||||
}
|
||||
if ($fuser->hasRight($tmpmodule, $lire) || $fuser->hasRight($tmpmodule, $read) || $fuser->hasRight($tmpmodule, $download)) {
|
||||
|
|
@ -3274,7 +3274,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||
} elseif (preg_match('/^([a-z]+)_temp$/i', $modulepart, $reg)) {
|
||||
$tmpmodule = $reg[1];
|
||||
if (empty($conf->$tmpmodule->dir_temp)) { // modulepart not supported
|
||||
dol_print_error('', 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||
dol_print_error(null, 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||
exit;
|
||||
}
|
||||
if ($fuser->hasRight($tmpmodule, $lire) || $fuser->hasRight($tmpmodule, $read) || $fuser->hasRight($tmpmodule, $download)) {
|
||||
|
|
@ -3284,7 +3284,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||
} elseif (preg_match('/^([a-z]+)_user$/i', $modulepart, $reg)) {
|
||||
$tmpmodule = $reg[1];
|
||||
if (empty($conf->$tmpmodule->dir_output)) { // modulepart not supported
|
||||
dol_print_error('', 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||
dol_print_error(null, 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||
exit;
|
||||
}
|
||||
if ($fuser->hasRight($tmpmodule, $lire) || $fuser->hasRight($tmpmodule, $read) || $fuser->hasRight($tmpmodule, $download)) {
|
||||
|
|
@ -3294,7 +3294,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||
} elseif (preg_match('/^massfilesarea_([a-z]+)$/i', $modulepart, $reg)) {
|
||||
$tmpmodule = $reg[1];
|
||||
if (empty($conf->$tmpmodule->dir_output)) { // modulepart not supported
|
||||
dol_print_error('', 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||
dol_print_error(null, 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.')');
|
||||
exit;
|
||||
}
|
||||
if ($fuser->hasRight($tmpmodule, $lire) || preg_match('/^specimen/i', $original_file)) {
|
||||
|
|
@ -3303,7 +3303,7 @@ function dol_check_secure_access_document($modulepart, $original_file, $entity,
|
|||
$original_file = $conf->$tmpmodule->dir_output.'/temp/massgeneration/'.$user->id.'/'.$original_file;
|
||||
} else {
|
||||
if (empty($conf->$modulepart->dir_output)) { // modulepart not supported
|
||||
dol_print_error('', 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.'). The module for this modulepart value may not be activated.');
|
||||
dol_print_error(null, 'Error call dol_check_secure_access_document with not supported value for modulepart parameter ('.$modulepart.'). The module for this modulepart value may not be activated.');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2947,7 +2947,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs =
|
|||
// Analyze date
|
||||
$reg = array();
|
||||
if (preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$/i', $time, $reg)) { // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000
|
||||
dol_print_error('', "Functions.lib::dol_print_date function called with a bad value from page ".(empty($_SERVER["PHP_SELF"]) ? 'unknown' : $_SERVER["PHP_SELF"]));
|
||||
dol_print_error(null, "Functions.lib::dol_print_date function called with a bad value from page ".(empty($_SERVER["PHP_SELF"]) ? 'unknown' : $_SERVER["PHP_SELF"]));
|
||||
return '';
|
||||
} elseif (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i', $time, $reg)) { // Still available to solve problems in extrafields of type date
|
||||
// This part of code should not be used anymore.
|
||||
|
|
@ -9112,7 +9112,7 @@ function setEventMessages($mesg, $mesgs, $style = 'mesgs', $messagekey = '', $no
|
|||
}
|
||||
if (empty($messagekey) || empty($_COOKIE["DOLHIDEMESSAGE".$messagekey])) {
|
||||
if (!in_array((string) $style, array('mesgs', 'warnings', 'errors'))) {
|
||||
dol_print_error('', 'Bad parameter style='.$style.' for setEventMessages');
|
||||
dol_print_error(null, 'Bad parameter style='.$style.' for setEventMessages');
|
||||
}
|
||||
if (empty($mesgs)) {
|
||||
setEventMessage($mesg, $style, $noduplicate);
|
||||
|
|
@ -12756,7 +12756,7 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = '', $n
|
|||
|
||||
// Check parameters
|
||||
if (!is_object($filterobj) && !is_object($objcon)) {
|
||||
dol_print_error('', 'BadParameter');
|
||||
dol_print_error(null, 'BadParameter');
|
||||
}
|
||||
|
||||
$histo = array();
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ function rebuildObjectClass($destdir, $module, $objectname, $newmask, $readdir =
|
|||
}
|
||||
|
||||
if (!empty($addfieldentry['arrayofkeyval']) && !is_array($addfieldentry['arrayofkeyval'])) {
|
||||
dol_print_error('', 'Bad parameter addfieldentry with a property arrayofkeyval defined but that is not an array.');
|
||||
dol_print_error(null, 'Bad parameter addfieldentry with a property arrayofkeyval defined but that is not an array.');
|
||||
return -7;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1050,7 +1050,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl
|
|||
// If external user: Check permission for external users
|
||||
if ($user->socid > 0) {
|
||||
if (empty($dbt_keyfield)) {
|
||||
dol_print_error('', 'Param dbt_keyfield is required but not defined');
|
||||
dol_print_error(null, 'Param dbt_keyfield is required but not defined');
|
||||
}
|
||||
$sql = "SELECT COUNT(dbt.".$dbt_keyfield.") as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
||||
|
|
@ -1060,7 +1060,7 @@ function checkUserAccessToObject($user, array $featuresarray, $object = 0, $tabl
|
|||
// If internal user without permission to see all thirdparties: Check permission for internal users that are restricted on their objects
|
||||
if ($feature != 'ticket') {
|
||||
if (empty($dbt_keyfield)) {
|
||||
dol_print_error('', 'Param dbt_keyfield is required but not defined');
|
||||
dol_print_error(null, 'Param dbt_keyfield is required but not defined');
|
||||
}
|
||||
$sql = "SELECT COUNT(sc.fk_soc) as nb";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX.$dbtablename." as dbt";
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ function tax_by_thirdparty($type, $db, $y, $date_start, $date_end, $modetax, $di
|
|||
|
||||
// If we use date_start and date_end, we must not use $y, $m, $q
|
||||
if (($date_start || $date_end) && (!empty($y) || !empty($m) || !empty($q))) {
|
||||
dol_print_error('', 'Bad value of input parameter for tax_by_rate');
|
||||
dol_print_error(null, 'Bad value of input parameter for tax_by_rate');
|
||||
}
|
||||
|
||||
$list = array();
|
||||
|
|
@ -704,7 +704,7 @@ function tax_by_rate($type, $db, $y, $q, $date_start, $date_end, $modetax, $dire
|
|||
|
||||
// If we use date_start and date_end, we must not use $y, $m, $q
|
||||
if (($date_start || $date_end) && (!empty($y) || !empty($m) || !empty($q))) {
|
||||
dol_print_error('', 'Bad value of input parameter for tax_by_rate');
|
||||
dol_print_error(null, 'Bad value of input parameter for tax_by_rate');
|
||||
}
|
||||
|
||||
$list = array();
|
||||
|
|
|
|||
|
|
@ -1250,7 +1250,7 @@ function show_actions_done_user($conf, $langs, $db, $filterobj, $objcon = null,
|
|||
|
||||
// Check parameters
|
||||
if (!is_object($filterobj) && !is_object($objcon)) {
|
||||
dol_print_error('', 'BadParameter');
|
||||
dol_print_error(null, 'BadParameter');
|
||||
}
|
||||
|
||||
$out = '';
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
|
|||
return -1;
|
||||
}
|
||||
} else {
|
||||
dol_print_error('', $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $dir.$file));
|
||||
dol_print_error(null, $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $dir.$file));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -271,7 +271,7 @@ class ExportExcel2007 extends ModeleExports
|
|||
$alias = $array_export_fields_label[$code];
|
||||
//print "dd".$alias;
|
||||
if (empty($alias)) {
|
||||
dol_print_error('', 'Bad value for field with code='.$code.'. Try to redefine export.');
|
||||
dol_print_error(null, 'Bad value for field with code='.$code.'. Try to redefine export.');
|
||||
}
|
||||
$typefield = isset($array_types[$code]) ? $array_types[$code] : '';
|
||||
|
||||
|
|
@ -322,7 +322,7 @@ class ExportExcel2007 extends ModeleExports
|
|||
$alias = substr($code, strpos($code, ' as ') + 4);
|
||||
}
|
||||
if (empty($alias)) {
|
||||
dol_print_error('', 'Bad value for field with code='.$code.'. Try to redefine export.');
|
||||
dol_print_error(null, 'Bad value for field with code='.$code.'. Try to redefine export.');
|
||||
}
|
||||
$newvalue = $objp->$alias;
|
||||
|
||||
|
|
|
|||
|
|
@ -249,7 +249,7 @@ class ExportTsv extends ModeleExports
|
|||
$alias = substr($code, strpos($code, ' as ') + 4);
|
||||
}
|
||||
if (empty($alias)) {
|
||||
dol_print_error('', 'Bad value for field with code='.$code.'. Try to redefine export.');
|
||||
dol_print_error(null, 'Bad value for field with code='.$code.'. Try to redefine export.');
|
||||
}
|
||||
|
||||
$newvalue = $outputlangs->convToOutputCharset($objp->$alias); // objp->$alias must be utf8 encoded as any var in memory // newvalue is now $outputlangs->charset_output encoded
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ class ExportCsv extends ModeleExports
|
|||
$alias = substr($code, strpos($code, ' as ') + 4);
|
||||
}
|
||||
if (empty($alias)) {
|
||||
dol_print_error('', 'Bad value for field with key='.$code.'. Try to redefine export.');
|
||||
dol_print_error(null, 'Bad value for field with key='.$code.'. Try to redefine export.');
|
||||
}
|
||||
|
||||
$newvalue = $outputlangs->convToOutputCharset($objp->$alias); // objp->$alias must be utf8 encoded as any var in memory // newvalue is now $outputlangs->charset_output encoded
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ class mod_facture_mars extends ModeleNumRefFactures
|
|||
dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num);
|
||||
return $prefix.$yymm."-".$num;
|
||||
} else {
|
||||
dol_print_error('', 'Bad parameter for getNextValue');
|
||||
dol_print_error(null, 'Bad parameter for getNextValue');
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -273,7 +273,7 @@ class mod_facture_terre extends ModeleNumRefFactures
|
|||
dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num);
|
||||
return $prefix.$yymm."-".$num;
|
||||
} else {
|
||||
dol_print_error('', 'Bad parameter for getNextValue');
|
||||
dol_print_error(null, 'Bad parameter for getNextValue');
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ class ImportCsv extends ModeleImports
|
|||
} else {
|
||||
$resultload = dol_include_once($file);
|
||||
if (empty($resultload)) {
|
||||
dol_print_error('', 'Error trying to call file='.$file.', class='.$class.', method='.$method);
|
||||
dol_print_error(null, 'Error trying to call file='.$file.', class='.$class.', method='.$method);
|
||||
break;
|
||||
}
|
||||
$classinstance = new $class($this->db);
|
||||
|
|
@ -503,7 +503,7 @@ class ImportCsv extends ModeleImports
|
|||
} else {
|
||||
$resultload = dol_include_once($file);
|
||||
if (empty($resultload)) {
|
||||
dol_print_error('', 'Error trying to call file='.$file.', class='.$class.', method='.$method.', code='.$code);
|
||||
dol_print_error(null, 'Error trying to call file='.$file.', class='.$class.', method='.$method.', code='.$code);
|
||||
break;
|
||||
}
|
||||
$classinstance = new $class($this->db);
|
||||
|
|
@ -539,7 +539,7 @@ class ImportCsv extends ModeleImports
|
|||
} else {
|
||||
$resultload = dol_include_once($file);
|
||||
if (empty($resultload)) {
|
||||
dol_print_error('', 'Error trying to call file='.$file.', class='.$class.', method='.$method.', units='.$units);
|
||||
dol_print_error(null, 'Error trying to call file='.$file.', class='.$class.', method='.$method.', units='.$units);
|
||||
break;
|
||||
}
|
||||
$classinstance = new $class($this->db);
|
||||
|
|
@ -638,7 +638,7 @@ class ImportCsv extends ModeleImports
|
|||
$method = $objimport->array_import_convertvalue[0][$val]['method'];
|
||||
$resultload = dol_include_once($file);
|
||||
if (empty($resultload)) {
|
||||
dol_print_error('', 'Error trying to call file='.$file.', class='.$class.', method='.$method);
|
||||
dol_print_error(null, 'Error trying to call file='.$file.', class='.$class.', method='.$method);
|
||||
break;
|
||||
}
|
||||
$classinstance = new $class($this->db);
|
||||
|
|
@ -808,7 +808,7 @@ class ImportCsv extends ModeleImports
|
|||
$method = $objimport->array_import_convertvalue[0][$fieldname]['method'];
|
||||
$resultload = dol_include_once($file);
|
||||
if (empty($resultload)) {
|
||||
dol_print_error('', 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method);
|
||||
dol_print_error(null, 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method);
|
||||
break;
|
||||
}
|
||||
$classinstance = new $class($this->db);
|
||||
|
|
@ -1036,7 +1036,7 @@ class ImportCsv extends ModeleImports
|
|||
}
|
||||
/*else
|
||||
{
|
||||
dol_print_error('','ErrorFieldListEmptyFor '.$alias."/".$tablename);
|
||||
dol_print_error(null,'ErrorFieldListEmptyFor '.$alias."/".$tablename);
|
||||
}*/
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -467,7 +467,7 @@ class ImportXlsx extends ModeleImports
|
|||
} else {
|
||||
$resultload = dol_include_once($file);
|
||||
if (empty($resultload)) {
|
||||
dol_print_error('', 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method);
|
||||
dol_print_error(null, 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method);
|
||||
break;
|
||||
}
|
||||
$classinstance = new $class($this->db);
|
||||
|
|
@ -546,7 +546,7 @@ class ImportXlsx extends ModeleImports
|
|||
} else {
|
||||
$resultload = dol_include_once($file);
|
||||
if (empty($resultload)) {
|
||||
dol_print_error('', 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method . ', code=' . $code);
|
||||
dol_print_error(null, 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method . ', code=' . $code);
|
||||
break;
|
||||
}
|
||||
$classinstance = new $class($this->db);
|
||||
|
|
@ -582,7 +582,7 @@ class ImportXlsx extends ModeleImports
|
|||
} else {
|
||||
$resultload = dol_include_once($file);
|
||||
if (empty($resultload)) {
|
||||
dol_print_error('', 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method . ', units=' . $units);
|
||||
dol_print_error(null, 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method . ', units=' . $units);
|
||||
break;
|
||||
}
|
||||
$classinstance = new $class($this->db);
|
||||
|
|
@ -681,7 +681,7 @@ class ImportXlsx extends ModeleImports
|
|||
$method = $objimport->array_import_convertvalue[0][$val]['method'];
|
||||
$resultload = dol_include_once($file);
|
||||
if (empty($resultload)) {
|
||||
dol_print_error('', 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method);
|
||||
dol_print_error(null, 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method);
|
||||
break;
|
||||
}
|
||||
$classinstance = new $class($this->db);
|
||||
|
|
@ -850,7 +850,7 @@ class ImportXlsx extends ModeleImports
|
|||
$method = $objimport->array_import_convertvalue[0][$fieldname]['method'];
|
||||
$resultload = dol_include_once($file);
|
||||
if (empty($resultload)) {
|
||||
dol_print_error('', 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method);
|
||||
dol_print_error(null, 'Error trying to call file=' . $file . ', class=' . $class . ', method=' . $method);
|
||||
break;
|
||||
}
|
||||
$classinstance = new $class($this->db);
|
||||
|
|
@ -1079,7 +1079,7 @@ class ImportXlsx extends ModeleImports
|
|||
}
|
||||
/*else
|
||||
{
|
||||
dol_print_error('','ErrorFieldListEmptyFor '.$alias."/".$tablename);
|
||||
dol_print_error(null,'ErrorFieldListEmptyFor '.$alias."/".$tablename);
|
||||
}*/
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -342,7 +342,7 @@ class pdf_standard extends CommonStickerGenerator
|
|||
|
||||
$this->Tformat = $_Avery_Labels[$this->code];
|
||||
if (empty($this->Tformat)) {
|
||||
dol_print_error('', 'ErrorBadTypeForCard'.$this->code);
|
||||
dol_print_error(null, 'ErrorBadTypeForCard'.$this->code);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -373,7 +373,7 @@ class pdf_standard extends CommonStickerGenerator
|
|||
$title = $outputlangs->transnoentities('MembersCards');
|
||||
$keywords = $outputlangs->transnoentities('MembersCards')." ".$outputlangs->transnoentities("Foundation")." ".$outputlangs->convToOutputCharset($mysoc->name);
|
||||
} else {
|
||||
dol_print_error('', 'Bad value for $mode');
|
||||
dol_print_error(null, 'Bad value for $mode');
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -156,7 +156,7 @@ function members_card_pdf_create($db, $arrayofmembers, $modele, $outputlangs, $o
|
|||
return -1;
|
||||
}
|
||||
} else {
|
||||
dol_print_error('', $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $file));
|
||||
dol_print_error(null, $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $file));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ class pdf_standardlabel extends CommonStickerGenerator
|
|||
$this->code = $srctemplatepath;
|
||||
$this->Tformat = $_Avery_Labels[$this->code];
|
||||
if (empty($this->Tformat)) {
|
||||
dol_print_error('', 'ErrorBadTypeForCard'.$this->code);
|
||||
dol_print_error(null, 'ErrorBadTypeForCard'.$this->code);
|
||||
exit;
|
||||
}
|
||||
$this->type = 'pdf';
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
|
|||
$this->code = $srctemplatepath;
|
||||
$this->Tformat = $_Avery_Labels[$this->code];
|
||||
if (empty($this->Tformat)) {
|
||||
dol_print_error('', 'ErrorBadTypeForCard'.$this->code);
|
||||
dol_print_error(null, 'ErrorBadTypeForCard'.$this->code);
|
||||
exit;
|
||||
}
|
||||
$this->type = 'pdf';
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ function doc_label_pdf_create($db, $arrayofrecords, $modele, $outputlangs, $outp
|
|||
return -1;
|
||||
}
|
||||
} else {
|
||||
dol_print_error('', $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $file));
|
||||
dol_print_error(null, $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists", $file));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ class mod_facture_fournisseur_cactus extends ModeleNumRefSuppliersInvoices
|
|||
dol_syslog(get_class($this)."::getNextValue return ".$prefix.$yymm."-".$num);
|
||||
return $prefix.$yymm."-".$num;
|
||||
} else {
|
||||
dol_print_error('', 'Bad parameter for getNextValue');
|
||||
dol_print_error(null, 'Bad parameter for getNextValue');
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
|||
dol_syslog(get_class($this)."::getNextValue return ".$this->prefix.$pos_source.'-'.$yymm.'-'.$num);
|
||||
return $this->prefix.$pos_source.'-'.$yymm.'-'.$num;
|
||||
} else {
|
||||
dol_print_error('', 'Bad parameter for getNextValue');
|
||||
dol_print_error(null, 'Bad parameter for getNextValue');
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -338,14 +338,14 @@ if ($cancel) {
|
|||
header("Location: ".$backtourl);
|
||||
exit;
|
||||
} else {
|
||||
dol_print_error('', 'Cancel on photo_resize with a not supported value of modulepart='.$modulepart);
|
||||
dol_print_error(null, 'Cancel on photo_resize with a not supported value of modulepart='.$modulepart);
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex") && GETPOSTISSET("sizey")) {
|
||||
if (empty($dir)) {
|
||||
dol_print_error('', 'Bug: Value for $dir could not be defined.');
|
||||
dol_print_error(null, 'Bug: Value for $dir could not be defined.');
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -398,7 +398,7 @@ if ($action == 'confirm_resize' && GETPOSTISSET("file") && GETPOSTISSET("sizex")
|
|||
header("Location: ".$backtourl);
|
||||
exit;
|
||||
} else {
|
||||
dol_print_error('', 'confirm_resize on photo_resize without backtourl defined for modulepart='.$modulepart);
|
||||
dol_print_error(null, 'confirm_resize on photo_resize without backtourl defined for modulepart='.$modulepart);
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -461,7 +461,7 @@ if ($action == 'confirm_crop') {
|
|||
header("Location: ".$backtourl);
|
||||
exit;
|
||||
} else {
|
||||
dol_print_error('', 'confirm_crop on photo_resize without backtourl defined for modulepart='.$modulepart);
|
||||
dol_print_error(null, 'confirm_crop on photo_resize without backtourl defined for modulepart='.$modulepart);
|
||||
exit;
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ if ($module == 'propal') {
|
|||
} elseif ($module == 'user') {
|
||||
$permission = $user->hasRight("user", "self", "write");
|
||||
}
|
||||
//else dol_print_error('','Bad value '.$module.' for param module');
|
||||
//else dol_print_error(null,'Bad value '.$module.' for param module');
|
||||
|
||||
if (isModEnabled('fckeditor') && getDolGlobalString('FCKEDITOR_ENABLE_NOTE_PUBLIC')) {
|
||||
$typeofdatapub = 'ckeditor:dolibarr_notes:100%:200::1:12:95%:0'; // Rem: This var is for all notes, not only thirdparties note.
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ if ($action == 'add' && $permissiontoadd) {
|
|||
}
|
||||
if (empty($dirfornewdir)) {
|
||||
$error++;
|
||||
dol_print_error('', 'Bad value for module. Not supported.');
|
||||
dol_print_error(null, 'Bad value for module. Not supported.');
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ if (!$sortfield) {
|
|||
|
||||
$section = GETPOST("section", 'alpha') ? GETPOST("section", 'alpha') : GETPOST("relativedir", 'alpha');
|
||||
if (!$section) {
|
||||
dol_print_error('', "ErrorSectionParamNotDefined");
|
||||
dol_print_error(null, "ErrorSectionParamNotDefined");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,12 +65,12 @@ if (!$sortfield) {
|
|||
|
||||
$section = GETPOST("section", 'alpha');
|
||||
if (!$section) {
|
||||
dol_print_error('', 'Error, section parameter missing');
|
||||
dol_print_error(null, 'Error, section parameter missing');
|
||||
exit;
|
||||
}
|
||||
$urlfile = (string) dol_sanitizePathName(GETPOST("urlfile"), '_', 0);
|
||||
if (!$urlfile) {
|
||||
dol_print_error('', "ErrorParamNotDefined");
|
||||
dol_print_error(null, "ErrorParamNotDefined");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -69,12 +69,12 @@ if (!$sortfield) {
|
|||
|
||||
$section = GETPOST("section", 'alpha');
|
||||
if (!$section) {
|
||||
dol_print_error('', 'Error, section parameter missing');
|
||||
dol_print_error(null, 'Error, section parameter missing');
|
||||
exit;
|
||||
}
|
||||
$urlfile = (string) dol_sanitizePathName(GETPOST("urlfile"));
|
||||
if (!$urlfile) {
|
||||
dol_print_error('', "ErrorParamNotDefined");
|
||||
dol_print_error(null, "ErrorParamNotDefined");
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -985,7 +985,7 @@ class ConferenceOrBoothAttendee extends CommonObject
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -309,7 +309,7 @@ class Expedition extends CommonObject
|
|||
}
|
||||
|
||||
if (!$mybool) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1735,7 +1735,7 @@ if ($action == 'create') {
|
|||
$userauthor = new User($db);
|
||||
$result = $userauthor->fetch($object->fk_user_author);
|
||||
if ($result < 0) {
|
||||
dol_print_error('', $userauthor->error);
|
||||
dol_print_error(null, $userauthor->error);
|
||||
} elseif ($result > 0) {
|
||||
print $userauthor->getNomUrl(-1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1676,7 +1676,7 @@ class ExpenseReport extends CommonObject
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -466,7 +466,7 @@ if ($action == 'create') {
|
|||
|
||||
print "</form>\n";
|
||||
} else {
|
||||
dol_print_error('', "Error, no fichinter ".$object->id);
|
||||
dol_print_error(null, "Error, no fichinter ".$object->id);
|
||||
}
|
||||
} elseif ($action == 'selsocforcreatefrommodel') {
|
||||
print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'intervention');
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ if ($id > 0 || !empty($ref)) {
|
|||
$ret = $object->fetch_thirdparty();
|
||||
}
|
||||
if ($ret < 0) {
|
||||
dol_print_error('', $object->error);
|
||||
dol_print_error(null, $object->error);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -985,7 +985,7 @@ class Fichinter extends CommonObject
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1035,7 +1035,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2970,7 +2970,7 @@ class FactureFournisseur extends CommonInvoice
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -799,7 +799,7 @@ class PaiementFourn extends Paiement
|
|||
}
|
||||
|
||||
if ($mybool === false) {
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
dol_print_error(null, "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1103,7 +1103,7 @@ if ($action == 'create') {
|
|||
|
||||
print "</form>\n";
|
||||
} else {
|
||||
dol_print_error('', "Error, no invoice " . $object->id);
|
||||
dol_print_error(null, "Error, no invoice " . $object->id);
|
||||
}
|
||||
} else {
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@ if ($action == 'uploadfile') {
|
|||
}
|
||||
$action = '';
|
||||
} else {
|
||||
dol_print_error('', $mesg);
|
||||
dol_print_error(null, $mesg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -148,7 +148,7 @@ if ($action == 'addfolder') {
|
|||
}
|
||||
$action = '';
|
||||
} else {
|
||||
dol_print_error('', $mesg);
|
||||
dol_print_error(null, $mesg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -193,7 +193,7 @@ if ($action == 'confirm_deletefile' && GETPOST('confirm') == 'yes') {
|
|||
|
||||
$action = '';
|
||||
} else {
|
||||
dol_print_error('', $mesg);
|
||||
dol_print_error(null, $mesg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -232,7 +232,7 @@ if (GETPOST("const", 'array') && GETPOST("delete") && GETPOST("delete") == $lang
|
|||
}
|
||||
}
|
||||
} else {
|
||||
dol_print_error('', $mesg);
|
||||
dol_print_error(null, $mesg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -262,7 +262,7 @@ if ($action == 'confirm_deletesection' && $confirm == 'yes') {
|
|||
|
||||
$action = '';
|
||||
} else {
|
||||
dol_print_error('', $mesg);
|
||||
dol_print_error(null, $mesg);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -321,7 +321,7 @@ if ($action == 'download') {
|
|||
setEventMessages($langs->transnoentitiesnoconv('FailedToGetFile', $file), null, 'errors');
|
||||
}
|
||||
} else {
|
||||
dol_print_error('', $mesg);
|
||||
dol_print_error(null, $mesg);
|
||||
}
|
||||
|
||||
//ftp_close($conn_id); Close later
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue