Skip to content

Commit

Permalink
Fix codestyle
Browse files Browse the repository at this point in the history
lessc.class.php should be excluded from ruleset as it is an external lib
  • Loading branch information
jtraulle committed Aug 14, 2019
1 parent 6d55af2 commit c739b95
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions dev/setup/codesniffer/ruleset.xml
Expand Up @@ -6,6 +6,7 @@
<exclude-pattern type="relative">build/html</exclude-pattern>
<exclude-pattern type="relative">build/aps</exclude-pattern>
<exclude-pattern type="relative">documents</exclude-pattern>
<exclude-pattern type="relative">htdocs/core/class/lessc.class.php</exclude-pattern>
<exclude-pattern type="relative">htdocs/custom</exclude-pattern>
<exclude-pattern type="relative">htdocs/includes</exclude-pattern>
<exclude-pattern type="relative">htdocs/install/doctemplates/websites</exclude-pattern>
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/lib/files.lib.php
Expand Up @@ -1911,7 +1911,7 @@ function dol_compress_file($inputfile, $outputfile, $mode = "gz")
dol_syslog("Class ZipArchive is set so we zip using ZipArchive to zip into ".$outputfile.' rootPath='.$rootPath);
$zip = new ZipArchive;

if ($zip->open($outputfile, ZipArchive::CREATE)!==TRUE) {
if ($zip->open($outputfile, ZipArchive::CREATE)!==true) {
$errormsg="Failed to open file ".$outputfile."\n";
dol_syslog("dol_compress_file failure - ".$errormsg, LOG_ERR);
return -6;
Expand Down
6 changes: 3 additions & 3 deletions htdocs/fourn/class/api_supplier_invoices.class.php
Expand Up @@ -362,9 +362,9 @@ public function getPayments($id)
throw new RestException(400, 'Invoice ID is mandatory');
}

if( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}
if( ! DolibarrApi::_checkAccessToResource('fournisseur', $this->invoice->id, 'facture_fourn', 'facture')) {
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
}

$result = $this->invoice->fetch($id);
if( ! $result ) {
Expand Down

0 comments on commit c739b95

Please sign in to comment.