Skip to content

Commit

Permalink
Fix errors reported by scrutinizer
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Apr 9, 2016
1 parent f2f672a commit 83644dc
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 46 deletions.
8 changes: 2 additions & 6 deletions htdocs/accountancy/admin/card.php
Expand Up @@ -216,12 +216,8 @@
$head = accounting_prepare_head($object);

// Edit mode
if ($action == 'update') {
$soc = new Societe($db);
if ($object->socid) {
$soc->fetch($object->socid);
}

if ($action == 'update')
{
dol_fiche_head($head, 'card', $langs->trans('AccountAccounting'), 0, 'billr');

print '<form name="update" action="' . $_SERVER["PHP_SELF"] . '" method="POST">' . "\n";
Expand Down
1 change: 0 additions & 1 deletion htdocs/accountancy/class/accountancyexport.class.php
Expand Up @@ -69,7 +69,6 @@ public function __construct(DoliDB &$db)
$this->db = &$db;
$this->separator = $conf->global->ACCOUNTING_EXPORT_SEPARATORCSV;
$this->end_line = "\n";
return 1;
}

/**
Expand Down
8 changes: 4 additions & 4 deletions htdocs/core/class/commonobject.class.php
Expand Up @@ -3943,15 +3943,15 @@ function addThumbs($file)
* 3) If not but a constant $conf->global->OBJECTELEMENT_FIELDNAME is set, we return it (It is better to use the dedicated table).
* 4) Return value found into database (TODO No yet implemented)
*
* @param string $fieldname Name of field
* @param string $alternatevalue Alternate value to use
* @return string Default value
* @param string $fieldname Name of field
* @param string $alternatevalue Alternate value to use
* @return string|string[] Default value (can be an array if the GETPOST return an array)
**/
function getDefaultCreateValueFor($fieldname, $alternatevalue=null)
{
global $conf, $_POST;

// If param is has been posted with use this value first.
// If param here has been posted, we use this value first.
if (isset($_POST[$fieldname])) return GETPOST($fieldname, 2);

if (isset($alternatevalue)) return $alternatevalue;
Expand Down
40 changes: 10 additions & 30 deletions htdocs/core/modules/expensereport/doc/pdf_standard.modules.php
Expand Up @@ -771,53 +771,33 @@ function _tableau(&$pdf, $tab_top, $tab_height, $nexY, $outputlangs, $hidetop=0,

// Type
$pdf->line($this->posxtype-1, $tab_top, $this->posxtype-1, $tab_top + $tab_height);
<<<<<<< HEAD
$pdf->SetXY($this->posxtype - 1, $tab_top + 1);
$pdf->MultiCell($this->posxprojet - $this->posxtype - 1, 2, $outputlangs->transnoentities("Type"), '', 'C');
=======
if (empty($hidetop))
{
$pdf->SetXY($this->posxtype-1, $tab_top+1);
$pdf->MultiCell($this->posxprojet-$this->posxtype-1,2, $outputlangs->transnoentities("Type"),'','C');
$pdf->MultiCell($this->posxprojet-$this->posxtype - 1, 2, $outputlangs->transnoentities("Type"), '', 'C');
}
>>>>>>> refs/remotes/origin/3.9

<<<<<<< HEAD
if (!empty($conf->projet->enabled)) {
if (!empty($conf->projet->enabled))
{
// Project
$pdf->line($this->posxprojet - 1, $tab_top, $this->posxprojet - 1, $tab_top + $tab_height);
$pdf->SetXY($this->posxprojet - 1, $tab_top + 1);
$pdf->MultiCell($this->posxtva - $this->posxprojet - 1, 2, $outputlangs->transnoentities("Project"), '', 'C');
if (empty($hidetop))
{
$pdf->SetXY($this->posxprojet - 1, $tab_top + 1);
$pdf->MultiCell($this->posxtva - $this->posxprojet - 1, 2, $outputlangs->transnoentities("Project"), '', 'C');
}
}
=======
// Project
$pdf->line($this->posxprojet-1, $tab_top, $this->posxprojet-1, $tab_top + $tab_height);
if (empty($hidetop))
{
$pdf->SetXY($this->posxprojet-1, $tab_top+1);
$pdf->MultiCell($this->posxtva-$this->posxprojet-1,2, $outputlangs->transnoentities("Project"),'','C');
}
>>>>>>> refs/remotes/origin/3.9

<<<<<<< HEAD
// VAT
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT)) {
$pdf->line($this->posxtva - 1, $tab_top, $this->posxtva - 1, $tab_top + $tab_height);
$pdf->SetXY($this->posxtva - 1, $tab_top + 1);
$pdf->MultiCell($this->posxup - $this->posxtva - 1, 2, $outputlangs->transnoentities("VAT"), '', 'C');
}
=======

// VAT
if (empty($conf->global->MAIN_GENERATE_DOCUMENTS_WITHOUT_VAT))
{
$pdf->line($this->posxtva-1, $tab_top, $this->posxtva-1, $tab_top + $tab_height);
if (empty($hidetop))
{
$pdf->SetXY($this->posxtva-1, $tab_top+1);
$pdf->MultiCell($this->posxup-$this->posxtva-1,2, $outputlangs->transnoentities("VAT"),'','C');
$pdf->MultiCell($this->posxup-$this->posxtva - 1, 2, $outputlangs->transnoentities("VAT"), '', 'C');
}
}
>>>>>>> refs/remotes/origin/3.9

// Unit price
$pdf->line($this->posxup-1, $tab_top, $this->posxup-1, $tab_top + $tab_height);
Expand Down
2 changes: 1 addition & 1 deletion htdocs/main.inc.php
Expand Up @@ -925,7 +925,7 @@ function analyseVarsForSqlAndScriptsInjection(&$var, $type)
* @param string $morequerystring Query string to add to the link "print" to get same parameters (use only if autodetect fails)
* @return void
*/
function llxHeader($head = '', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='')
function llxHeader($head='', $title='', $help_url='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='')
{
global $conf;

Expand Down
4 changes: 0 additions & 4 deletions htdocs/public/demo/index.php
Expand Up @@ -273,9 +273,6 @@
column-count: 2;
}
}
<<<<<<< HEAD
=======
@media only screen and (max-width: 420px)
{
.csscolumns {
Expand All @@ -284,7 +281,6 @@
column-count: 1;
}
}
>>>>>>> refs/remotes/origin/3.9
</style>
<script type="text/javascript">
Expand Down

0 comments on commit 83644dc

Please sign in to comment.