From c2de7adb327473fc2f80db6d9103967208c81794 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 21 Apr 2016 03:18:42 +0200 Subject: [PATCH] Minor PHPCS fixes --- ChangeLog | 1 + dev/skeletons/skeleton_class.class.php | 1 - htdocs/categories/class/api_category.class.php | 2 ++ htdocs/websites/class/websitepage.class.php | 10 ++++------ 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec9b5d50ba0..06310ddce07 100644 --- a/ChangeLog +++ b/ChangeLog @@ -26,6 +26,7 @@ Following changes may create regression for some external modules, but were nece Dolibarr better: - Function log() of class CommandeFournisseur has been removed. Using it is no more required. - Method select_type_comptes_financiers() has been renamed into selectTypeOfBankAccount() +- Property ->client that was deprecated 6 years ago, is replaced in all core code with ->thirdparty. - File '/core/tpl/document_actions_pre_headers.tpl.php' were renamed into '/core/actions_linkedfiles.inc.php'. So if you included it into your module, change your code like this to be compatible with all version: $res=@include_once DOL_DOCUMENT_ROOT . '/core/actions_linkedfiles.inc.php'; diff --git a/dev/skeletons/skeleton_class.class.php b/dev/skeletons/skeleton_class.class.php index 9a230a05698..2858e791ce8 100644 --- a/dev/skeletons/skeleton_class.class.php +++ b/dev/skeletons/skeleton_class.class.php @@ -71,7 +71,6 @@ class Skeleton_Class extends CommonObject public function __construct(DoliDB $db) { $this->db = $db; - return 1; } /** diff --git a/htdocs/categories/class/api_category.class.php b/htdocs/categories/class/api_category.class.php index 5e558ddc486..e17bb273758 100644 --- a/htdocs/categories/class/api_category.class.php +++ b/htdocs/categories/class/api_category.class.php @@ -144,6 +144,7 @@ class CategoryApi extends DolibarrApi $result = $db->query($sql); if ($result) { + $i=0; $num = $db->num_rows($result); while ($i < $num) { @@ -224,6 +225,7 @@ class CategoryApi extends DolibarrApi $result = $db->query($sql); if ($result) { + $i=0; $num = $db->num_rows($result); while ($i < $num) { diff --git a/htdocs/websites/class/websitepage.class.php b/htdocs/websites/class/websitepage.class.php index a001c8ad56c..88b6cee2401 100644 --- a/htdocs/websites/class/websitepage.class.php +++ b/htdocs/websites/class/websitepage.class.php @@ -55,9 +55,9 @@ class WebsitePage extends CommonObject public $keywords; public $content; public $status; - public $date_creation = ''; - public $date_modification = ''; - public $tms = ''; + public $date_creation; + public $date_modification; + public $tms; /** */ @@ -71,7 +71,6 @@ class WebsitePage extends CommonObject public function __construct(DoliDB $db) { $this->db = $db; - return 1; } /** @@ -546,11 +545,10 @@ class WebsitePage extends CommonObject global $dolibarr_main_authentication, $dolibarr_main_demo; global $menumanager; - $result = ''; $companylink = ''; - $label = '' . $langs->trans("MyModule") . ''; + $label = '' . $langs->trans("Page") . ''; $label.= '
'; $label.= '' . $langs->trans('Ref') . ': ' . $this->ref;