mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-05 17:18:13 +01:00
Compare commits
34 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
af6e95aa79 | ||
|
|
5d942c9d1a | ||
|
|
10e32c056e | ||
|
|
eb7dd74026 | ||
|
|
88f6c71e88 | ||
|
|
b081cf5cba | ||
|
|
3ea9c297ea | ||
|
|
474260e526 | ||
|
|
eead9a93d3 | ||
|
|
4bdf10c995 | ||
|
|
7f759c6ff5 | ||
|
|
20aa51f26b | ||
|
|
35f32391a0 | ||
|
|
ec6e933f66 | ||
|
|
e0c8ccb9fb | ||
|
|
ef00cb0736 | ||
|
|
d7f7f5bf3d | ||
|
|
7c0a6946a7 | ||
|
|
1ecc1afa9e | ||
|
|
ceb1e699b7 | ||
|
|
c028819cab | ||
|
|
5dbf060f00 | ||
|
|
53149bb7cd | ||
|
|
394104291a | ||
|
|
b847eb1b7e | ||
|
|
2aee62ea28 | ||
|
|
7aac67f79c | ||
|
|
935e84d985 | ||
|
|
fbb8808f29 | ||
|
|
00394493eb | ||
|
|
6db7414f88 | ||
|
|
0d3a2f800b | ||
|
|
d59b1bb0c6 | ||
|
|
9d582a53ca |
10
.stickler.yml
Normal file
10
.stickler.yml
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
linters:
|
||||||
|
phpcs:
|
||||||
|
standard: 'dev/setup/codesniffer/ruleset.xml'
|
||||||
|
extensions: 'php'
|
||||||
|
tab_width: 4
|
||||||
|
fixer: true
|
||||||
|
|
||||||
|
fixers:
|
||||||
|
enable: true
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
/* Copyright (C) 2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||||
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
* Copyright (C) 2016 Alexandre Spangaro <aspangaro@zendsi.com>
|
||||||
|
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@@ -60,6 +61,7 @@ $langs->load("loans");
|
|||||||
llxHeader('', $langs->trans("AccountancyArea"));
|
llxHeader('', $langs->trans("AccountancyArea"));
|
||||||
|
|
||||||
print load_fiche_titre($langs->trans("AccountancyArea"), '', 'title_accountancy');
|
print load_fiche_titre($langs->trans("AccountancyArea"), '', 'title_accountancy');
|
||||||
|
dol_fiche_head();
|
||||||
|
|
||||||
$step = 0;
|
$step = 0;
|
||||||
|
|
||||||
@@ -175,6 +177,7 @@ else
|
|||||||
{
|
{
|
||||||
print $langs->trans("Module10Desc")."<br>\n";
|
print $langs->trans("Module10Desc")."<br>\n";
|
||||||
}
|
}
|
||||||
|
dol_fiche_end();
|
||||||
|
|
||||||
llxFooter();
|
llxFooter();
|
||||||
$db->close();
|
$db->close();
|
||||||
|
|||||||
@@ -460,7 +460,7 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
|||||||
$mesg='<div class="error">';
|
$mesg='<div class="error">';
|
||||||
if ($mailfile->error)
|
if ($mailfile->error)
|
||||||
{
|
{
|
||||||
$mesg.=$langs->trans('ErrorFailedToSendMail',$from,$sendto);
|
$mesg.=$langs->transnoentities('ErrorFailedToSendMail',dol_escape_htmltag($from),dol_escape_htmltag($sendto));
|
||||||
$mesg.='<br>'.$mailfile->error;
|
$mesg.='<br>'.$mailfile->error;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -291,18 +291,20 @@ class Utils
|
|||||||
$ok=0;
|
$ok=0;
|
||||||
dol_syslog("Run command ".$fullcommandcrypted);
|
dol_syslog("Run command ".$fullcommandcrypted);
|
||||||
$handlein = popen($fullcommandclear, 'r');
|
$handlein = popen($fullcommandclear, 'r');
|
||||||
$i=0;
|
if ($handlein) {
|
||||||
while (!feof($handlein))
|
$i=0;
|
||||||
{
|
while (!feof($handlein))
|
||||||
$i++; // output line number
|
{
|
||||||
$read = fgets($handlein);
|
$i++; // output line number
|
||||||
// Exclude warning line we don't want
|
$read = fgets($handlein);
|
||||||
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
// Exclude warning line we don't want
|
||||||
fwrite($handle,$read);
|
if ($i == 1 && preg_match('/Warning.*Using a password/i', $read)) continue;
|
||||||
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
|
fwrite($handle,$read);
|
||||||
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
|
if (preg_match('/'.preg_quote('-- Dump completed').'/i',$read)) $ok=1;
|
||||||
|
elseif (preg_match('/'.preg_quote('SET SQL_NOTES=@OLD_SQL_NOTES').'/i',$read)) $ok=1;
|
||||||
|
}
|
||||||
|
pclose($handlein);
|
||||||
}
|
}
|
||||||
pclose($handlein);
|
|
||||||
|
|
||||||
if ($compression == 'none') fclose($handle);
|
if ($compression == 'none') fclose($handle);
|
||||||
if ($compression == 'gz') gzclose($handle);
|
if ($compression == 'gz') gzclose($handle);
|
||||||
|
|||||||
@@ -739,7 +739,7 @@ function show_projects($conf, $langs, $db, $object, $backtopage='', $nocreatelin
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
print '<tr class="oddeven"><td colspan="5" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
print '<tr class="oddeven"><td colspan="8" class="opacitymedium">'.$langs->trans("None").'</td></tr>';
|
||||||
}
|
}
|
||||||
$db->free($result);
|
$db->free($result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1376,6 +1376,7 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
$fileimagebis = $file.'_preview-0.png'; // If PDF has more than one page
|
$fileimagebis = $file.'_preview-0.png'; // If PDF has more than one page
|
||||||
$relativepathimage = $relativepath.'_preview.png';
|
$relativepathimage = $relativepath.'_preview.png';
|
||||||
|
|
||||||
|
|
||||||
// Si fichier PDF existe
|
// Si fichier PDF existe
|
||||||
if (file_exists($file))
|
if (file_exists($file))
|
||||||
{
|
{
|
||||||
@@ -1387,7 +1388,8 @@ function dol_banner_tab($object, $paramid, $morehtml='', $shownav=1, $fieldid='r
|
|||||||
{
|
{
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experienc trouble with pdf thumb generation and imagick, you can disable here.
|
if (empty($conf->global->MAIN_DISABLE_PDF_THUMBS)) // If you experienc trouble with pdf thumb generation and imagick, you can disable here.
|
||||||
{
|
{
|
||||||
$ret = dol_convert_file($file, 'png', $fileimage);
|
include_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||||
|
$ret = dol_convert_file($file, 'png', $fileimage);
|
||||||
if ($ret < 0) $error++;
|
if ($ret < 0) $error++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1228,7 +1228,7 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
false,
|
false,
|
||||||
$this->lines[$i]->date_start,
|
$this->lines[$i]->date_start,
|
||||||
$this->lines[$i]->date_end,
|
$this->lines[$i]->date_end,
|
||||||
0,
|
$this->lines[$i]->array_options,
|
||||||
$this->lines[$i]->fk_unit
|
$this->lines[$i]->fk_unit
|
||||||
);
|
);
|
||||||
if ($result < 0)
|
if ($result < 0)
|
||||||
@@ -1338,6 +1338,10 @@ class CommandeFournisseur extends CommonOrder
|
|||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
|
|
||||||
|
// get extrafields so they will be clone
|
||||||
|
foreach($this->lines as $line)
|
||||||
|
$line->fetch_optionals($line->rowid);
|
||||||
|
|
||||||
// Load source object
|
// Load source object
|
||||||
$objFrom = clone $this;
|
$objFrom = clone $this;
|
||||||
|
|
||||||
|
|||||||
@@ -897,7 +897,7 @@ class Product extends CommonObject
|
|||||||
$sql.= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell)."'";
|
$sql.= ", accountancy_code_sell= '" . $this->db->escape($this->accountancy_code_sell)."'";
|
||||||
$sql.= ", accountancy_code_sell_intra= '" . $this->db->escape($this->accountancy_code_sell_intra)."'";
|
$sql.= ", accountancy_code_sell_intra= '" . $this->db->escape($this->accountancy_code_sell_intra)."'";
|
||||||
$sql.= ", accountancy_code_sell_export= '" . $this->db->escape($this->accountancy_code_sell_export)."'";
|
$sql.= ", accountancy_code_sell_export= '" . $this->db->escape($this->accountancy_code_sell_export)."'";
|
||||||
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && $this->desiredstock != '') ? $this->desiredstock : "null");
|
$sql.= ", desiredstock = " . ((isset($this->desiredstock) && is_numeric($this->desiredstock)) ? $this->desiredstock : "null");
|
||||||
$sql.= ", cost_price = " . ($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
|
$sql.= ", cost_price = " . ($this->cost_price != '' ? $this->db->escape($this->cost_price) : 'null');
|
||||||
$sql.= ", fk_unit= " . (!$this->fk_unit ? 'NULL' : $this->fk_unit);
|
$sql.= ", fk_unit= " . (!$this->fk_unit ? 'NULL' : $this->fk_unit);
|
||||||
$sql.= ", price_autogen = " . (!$this->price_autogen ? 0 : 1);
|
$sql.= ", price_autogen = " . (!$this->price_autogen ? 0 : 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user