Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix CI #32089

Merged
merged 4 commits into from
Nov 25, 2024
Merged

fix CI #32089

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions htdocs/accountancy/admin/subaccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
if ($user->socid > 0) {
accessforbidden();
}
if (!$user->hasRight('accounting', 'chartofaccount')) {
if (!$user->hasRight('accounting', 'chartofaccount')) { // after this test, $user->hasRight('accounting', 'chartofaccount') is always valid
accessforbidden();
}

Expand Down Expand Up @@ -125,10 +125,10 @@
$search_array_options = array();
}

if ($action == 'enable' && $user->hasRight('accounting', 'chartofaccount')) {
if ($action == 'enable' /* && $user->hasRight('accounting', 'chartofaccount') */) { // test useless
setEventMessages($langs->trans("FeatureNotYetAvailable"), null, 'errors');
}
if ($action == 'disable' && $user->hasRight('accounting', 'chartofaccount')) {
if ($action == 'disable' /* && $user->hasRight('accounting', 'chartofaccount') */) {
setEventMessages($langs->trans("FeatureNotYetAvailable"), null, 'errors');
}
}
Expand Down Expand Up @@ -170,7 +170,6 @@
}
}

//var_dump($search_subaccount); exit;
if ($search_subaccount_tmp) {
if ($weremovedsomezero) {
$search_subaccount_tmp_clean = $search_subaccount_tmp;
Expand Down
7 changes: 3 additions & 4 deletions htdocs/core/lib/ajax.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -660,9 +660,10 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof
$out = '<a '.($morecss ? 'class="'.$morecss.'" ' : '').' href="'.$_SERVER['PHP_SELF'].'?action=del_'.$code.'&token='.newToken().'&entity='.$entity.($mode ? '&mode='.$mode : '').($forcereload ? '&dol_resetcache=1' : '').'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
}
} else {
$userconstid = 0;
if (is_object($userconst)) {
$userconstid = $userconst->id;
} elseif (is_numeric($userconstid) && $userconstid > 0) {
} elseif (is_numeric($userconst) && $userconst > 0) {
$userconstid = $userconst;
$userconst = new User($db);
$userconst->fetch($userconstid);
Expand All @@ -685,7 +686,6 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof

// Set constant
$("#set_" + code).click(function() {
console.log("ee");
if (warning) {
alert(warning);
}
Expand Down Expand Up @@ -734,7 +734,7 @@ function ajax_constantonoff($code, $input = array(), $entity = null, $revertonof
* On/off button to change a property status of an object
* This uses the ajax service objectonoff.php (May be called when MAIN_DIRECT_STATUS_UPDATE is set for some pages)
*
* @param Object $object Object to set
* @param CommonObject $object Object to set
* @param string $code Name of property in object : 'status' or 'status_buy' for product by example
* @param string $field Name of database field : 'tosell' or 'tobuy' for product by example
* @param string $text_on Text if on ('Text' or 'Text:Picto on:Css picto on')
Expand All @@ -754,7 +754,6 @@ function ajax_object_onoff($object, $code, $field, $text_on, $text_off, $input =
if (empty($htmlname)) {
$htmlname = $code;
}
//var_dump($object->module); var_dump($object->element);

$out = '';

Expand Down
13 changes: 11 additions & 2 deletions scripts/company/sync_contacts_dolibarr2ldap.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#!/usr/bin/env php
<?php
/*
* Copyright (C) 2005 Rodolphe Quiedeville <[email protected]>
* Copyright (C) 2006-2009 Laurent Destailleur <[email protected]>
* Copyright (C) 2005 Rodolphe Quiedeville <[email protected]>
* Copyright (C) 2006-2009 Laurent Destailleur <[email protected]>
* Copyright (C) 2024 Frédéric France <[email protected]>
*
* 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
Expand Down Expand Up @@ -44,6 +45,14 @@
require_once DOL_DOCUMENT_ROOT."/user/class/user.class.php";
require_once DOL_DOCUMENT_ROOT."/core/class/ldap.class.php";

/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
* @var User $user
*/

// Global variables
$version = DOL_VERSION;
$error = 0;
Expand Down
7 changes: 7 additions & 0 deletions scripts/contracts/email_expire_services_to_customers.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@
require $path."../../htdocs/master.inc.php";
require_once DOL_DOCUMENT_ROOT.'/core/lib/functionscli.lib.php';
require_once DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php";
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
* @var User $user
*/

$langs->loadLangs(array('main', 'contracts'));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,13 @@
require $path."../../htdocs/master.inc.php";
require_once DOL_DOCUMENT_ROOT.'/core/lib/functionscli.lib.php';
require_once DOL_DOCUMENT_ROOT."/core/class/CMailFile.class.php";
/**
* @var Conf $conf
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
* @var User $user
*/

$langs->loadLangs(array('main', 'contracts'));

Expand Down
Loading