Remove public $db

This commit is contained in:
Alexandre SPANGARO 2018-12-03 21:25:44 +01:00
parent 0c6f6b80cb
commit 3b8dd71816

View File

@ -1,5 +1,5 @@
<?php <?php
/* Copyright (C) 2014-2017 Alexandre Spangaro <aspangaro@zendsi.com> /* Copyright (C) 2014-2018 Alexandre Spangaro <aspangaro@zendsi.com>
* *
* 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
@ -28,11 +28,6 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/commonobject.class.php';
*/ */
class Fiscalyear extends CommonObject class Fiscalyear extends CommonObject
{ {
/**
* @var DoliDB Database handler.
*/
public $db;
/** /**
* @var string ID to identify managed object * @var string ID to identify managed object
*/ */
@ -65,9 +60,9 @@ class Fiscalyear extends CommonObject
public $rowid; public $rowid;
/** /**
* @var string fiscal year label * @var string fiscal year label
*/ */
public $label; public $label;
public $date_start; public $date_start;
public $date_end; public $date_end;
@ -170,10 +165,10 @@ class Fiscalyear extends CommonObject
// Check parameters // Check parameters
if (empty($this->date_start) && empty($this->date_end)) if (empty($this->date_start) && empty($this->date_end))
{ {
$this->error='ErrorBadParameter'; $this->error='ErrorBadParameter';
return -1; return -1;
} }
$this->db->begin(); $this->db->begin();
@ -274,7 +269,7 @@ class Fiscalyear extends CommonObject
return $this->LibStatut($this->statut,$mode); return $this->LibStatut($this->statut,$mode);
} }
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps // phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
/** /**
* Give a label from a status * Give a label from a status
* *
@ -284,7 +279,7 @@ class Fiscalyear extends CommonObject
*/ */
function LibStatut($statut,$mode=0) function LibStatut($statut,$mode=0)
{ {
// phpcs:enable // phpcs:enable
global $langs; global $langs;
if ($mode == 0) if ($mode == 0)