forked from Wavyzz/dolibarr
Fixing style errors.
This commit is contained in:
@@ -270,13 +270,13 @@ print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// sort list
|
// sort list
|
||||||
if ($sortfield == "name" && $sortorder == "asc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
if ($sortfield == "name" && $sortorder == "asc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($a->name, $b->name); });
|
return strcasecmp($a->name, $b->name); });
|
||||||
if ($sortfield == "name" && $sortorder == "desc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
if ($sortfield == "name" && $sortorder == "desc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($b->name, $a->name); });
|
return strcasecmp($b->name, $a->name); });
|
||||||
if ($sortfield == "version" && $sortorder == "asc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
if ($sortfield == "version" && $sortorder == "asc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($a->version, $b->version); });
|
return strcasecmp($a->version, $b->version); });
|
||||||
if ($sortfield == "version" && $sortorder == "desc") usort($moduleList, function(stdClass $a, stdClass $b) {
|
if ($sortfield == "version" && $sortorder == "desc") usort($moduleList, function (stdClass $a, stdClass $b) {
|
||||||
return strcasecmp($b->version, $a->version); });
|
return strcasecmp($b->version, $a->version); });
|
||||||
if ($sortfield == "id" && $sortorder == "asc") usort($moduleList, "compareIdAsc");
|
if ($sortfield == "id" && $sortorder == "asc") usort($moduleList, "compareIdAsc");
|
||||||
if ($sortfield == "id" && $sortorder == "desc") usort($moduleList, "compareIdDesc");
|
if ($sortfield == "id" && $sortorder == "desc") usort($moduleList, "compareIdDesc");
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ if (!empty($conf->modules_parts['workflow']) && is_array($conf->modules_parts['w
|
|||||||
}
|
}
|
||||||
|
|
||||||
// remove not available workflows (based on activated modules and global defined keys)
|
// remove not available workflows (based on activated modules and global defined keys)
|
||||||
$workflowcodes = array_filter($workflowcodes, function($var) {
|
$workflowcodes = array_filter($workflowcodes, function ($var) {
|
||||||
return $var['enabled']; });
|
return $var['enabled']; });
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
|
|
||||||
// Create the autoloader for Luracast
|
// Create the autoloader for Luracast
|
||||||
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php';
|
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php';
|
||||||
call_user_func(function() {
|
call_user_func(function () {
|
||||||
$loader = Luracast\Restler\AutoLoader::instance();
|
$loader = Luracast\Restler\AutoLoader::instance();
|
||||||
spl_autoload_register($loader);
|
spl_autoload_register($loader);
|
||||||
return $loader;
|
return $loader;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ if (!$res) die("Include of main fails");
|
|||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php';
|
require_once DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/AutoLoader.php';
|
||||||
|
|
||||||
call_user_func(function() {
|
call_user_func(function () {
|
||||||
$loader = Luracast\Restler\AutoLoader::instance();
|
$loader = Luracast\Restler\AutoLoader::instance();
|
||||||
spl_autoload_register($loader);
|
spl_autoload_register($loader);
|
||||||
return $loader;
|
return $loader;
|
||||||
|
|||||||
@@ -1288,7 +1288,7 @@ abstract class CommonDocGenerator
|
|||||||
if (!empty($fields))
|
if (!empty($fields))
|
||||||
{
|
{
|
||||||
// Sort extrafields by rank
|
// Sort extrafields by rank
|
||||||
uasort($fields, function($a, $b) {
|
uasort($fields, function ($a, $b) {
|
||||||
return ($a->rank > $b->rank) ? 1 : -1;
|
return ($a->rank > $b->rank) ? 1 : -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -82,7 +82,7 @@ $tmpDir = $conf->dav->multidir_output[$entity]; // We need root dir, not a dir t
|
|||||||
|
|
||||||
|
|
||||||
// Authentication callback function
|
// Authentication callback function
|
||||||
$authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function($username, $password) {
|
$authBackend = new \Sabre\DAV\Auth\Backend\BasicCallBack(function ($username, $password) {
|
||||||
global $user;
|
global $user;
|
||||||
global $conf;
|
global $conf;
|
||||||
global $dolibarr_main_authentication, $dolibarr_auto_user;
|
global $dolibarr_main_authentication, $dolibarr_auto_user;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
* Simple autoloader, so we don't need Composer just for this.
|
* Simple autoloader, so we don't need Composer just for this.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
spl_autoload_register(function($class) {
|
spl_autoload_register(function ($class) {
|
||||||
if (preg_match('/^DebugBar/', $class)) {
|
if (preg_match('/^DebugBar/', $class)) {
|
||||||
$file = DOL_DOCUMENT_ROOT.'/includes/maximebf/debugbar/src/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php';
|
$file = DOL_DOCUMENT_ROOT.'/includes/maximebf/debugbar/src/'.str_replace('\\', DIRECTORY_SEPARATOR, $class).'.php';
|
||||||
//var_dump($class.' - '.file_exists($file).' - '.$file);
|
//var_dump($class.' - '.file_exists($file).' - '.$file);
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i++) {
|
|||||||
$price_options[$i] = $langs->trans('SellingPrice').' '.$i;
|
$price_options[$i] = $langs->trans('SellingPrice').' '.$i;
|
||||||
}
|
}
|
||||||
|
|
||||||
$genPriceOptions = function($level) use ($price_options) {
|
$genPriceOptions = function ($level) use ($price_options) {
|
||||||
|
|
||||||
$return = array();
|
$return = array();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user