From e4ee3731863ae070bf40433977149449be15ae50 Mon Sep 17 00:00:00 2001 From: "tim.niklas" <tim.niklas@web.de> Date: Wed, 3 Feb 2016 03:08:38 -0500 Subject: [PATCH] fixed strict standard errors when functions were inherited with a wrong parameter count --- modules/Calendar/Activity.php | 68 +++++++++++++++------------------ modules/Users/Users.php | 23 ++++++----- vtlib/Vtiger/LanguageExport.php | 4 +- vtlib/Vtiger/LanguageImport.php | 2 +- 4 files changed, 48 insertions(+), 49 deletions(-) diff --git a/modules/Calendar/Activity.php b/modules/Calendar/Activity.php index 2926ecb6..60e9df94 100644 --- a/modules/Calendar/Activity.php +++ b/modules/Calendar/Activity.php @@ -536,14 +536,15 @@ function insertIntoRecurringTable(& $recurObj) return $return_data; } - /** - * Function to get activities for given criteria - * @param string $criteria - query string - * returns activity records in array format($list) or null value - */ - function get_full_list($criteria) { - global $log; - $log->debug("Entering get_full_list(".$criteria.") method ..."); + /** + * Function to get activities for given criteria + * @param string $order_by - query string + * @param string $where - query string + * returns activity records in array format($list) or null value + */ + function get_full_list($order_by = '', $where = '') { + global $log; + $log->debug("Entering get_full_list(".$order_by.", ".$where.") method ..."); $query = "select vtiger_crmentity.crmid,vtiger_crmentity.smownerid,vtiger_crmentity.setype, vtiger_activity.*, vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.contactid from vtiger_activity @@ -551,37 +552,30 @@ function insertIntoRecurringTable(& $recurObj) left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid left join vtiger_contactdetails on vtiger_contactdetails.contactid= vtiger_cntactivityrel.contactid left join vtiger_seactivityrel on vtiger_seactivityrel.activityid = vtiger_activity.activityid - WHERE vtiger_crmentity.deleted=0 ".$criteria; + WHERE vtiger_crmentity.deleted=0 ".$order_by; $result =& $this->db->query($query); - if($this->db->getRowCount($result) > 0){ - - // We have some data. - while ($row = $this->db->fetchByAssoc($result)) { - foreach($this->list_fields_name as $field) - { - if (isset($row[$field])) { - $this->$field = $row[$field]; - } - else { - $this->$field = ''; - } - } - $list[] = $this; - } - } - if (isset($list)) - { - $log->debug("Exiting get_full_list method ..."); - return $list; - } - else - { - $log->debug("Exiting get_full_list method ..."); - return null; - } - - } + if($this->db->getRowCount($result) > 0){ + // We have some data. + while ($row = $this->db->fetchByAssoc($result)) { + foreach($this->list_fields_name as $field){ + if (isset($row[$field])) { + $this->$field = $row[$field]; + } else { + $this->$field = ''; + } + } + $list[] = $this; + } + } + if (isset($list)){ + $log->debug("Exiting get_full_list method ..."); + return $list; + } else { + $log->debug("Exiting get_full_list method ..."); + return null; + } + } //calendarsync diff --git a/modules/Users/Users.php b/modules/Users/Users.php index e76d17c2..e36ae8df 100755 --- a/modules/Users/Users.php +++ b/modules/Users/Users.php @@ -695,9 +695,9 @@ class Users extends CRMEntity { /** Function to save the user information into the database * @param $module -- module name:: Type varchar - * + * @param $fileid */ - function saveentity($module) { + function saveentity($module, $fileid = '') { global $current_user;//$adb added by raju for mass mailing $insertion_mode = $this->mode; if(empty($this->column_fields['time_zone'])) { @@ -787,11 +787,13 @@ class Users extends CRMEntity { } - /** Function to insert values in the specifed table for the specified module + /** + * Function to insert values in the specifed table for the specified module * @param $table_name -- table name:: Type varchar * @param $module -- module:: Type varchar + * @param $fileid */ - function insertIntoEntityTable($table_name, $module) { + function insertIntoEntityTable($table_name, $module, $fileid = '') { global $log; $log->info("function insertIntoEntityTable ".$module.' vtiger_table name ' .$table_name); global $adb, $current_user; @@ -1148,9 +1150,9 @@ class Users extends CRMEntity { /** Function to save the user information into the database * @param $module -- module name:: Type varchar - * + * @param $fileid */ - function save($module_name) { + function save($module_name, $fileid = '') { global $log, $adb; //Save entity being called with the modulename as parameter $this->saveentity($module_name); @@ -1407,11 +1409,14 @@ class Users extends CRMEntity { /** * Function to get the column value of a field - * @param $column_name -- Column name - * @param $input_value -- Input value for the column taken from the User + * @param $columname -- Column name + * @param $fldvalue -- Input value for the column taken from the User + * @param $fieldname + * @param $uitype + * @param $datatype * @return Column value of the field. */ - function get_column_value($columname, $fldvalue, $fieldname, $uitype, $datatype) { + function get_column_value($columname, $fldvalue, $fieldname, $uitype, $datatype = '') { if (is_uitype($uitype, "_date_") && $fldvalue == '') { return null; } diff --git a/vtlib/Vtiger/LanguageExport.php b/vtlib/Vtiger/LanguageExport.php index 75134f24..760cb96a 100644 --- a/vtlib/Vtiger/LanguageExport.php +++ b/vtlib/Vtiger/LanguageExport.php @@ -37,7 +37,7 @@ class Vtiger_LanguageExport extends Vtiger_Package { * Initialize Export * @access private */ - function __initExport($languageCode) { + function __initExport($languageCode, $moduleInstance = null) { // Security check to ensure file is withing the web folder. Vtiger_Utils::checkFileAccessForInclusion("languages/$languageCode/Vtiger.php"); @@ -117,7 +117,7 @@ class Vtiger_LanguageExport extends Vtiger_Package { * Export vtiger dependencies * @access private */ - function export_Dependencies() { + function export_Dependencies($moduleInstance) { global $vtiger_current_version, $adb; $vtigerMinVersion = $vtiger_current_version; diff --git a/vtlib/Vtiger/LanguageImport.php b/vtlib/Vtiger/LanguageImport.php index a8fd4d39..6b2b4ce0 100644 --- a/vtlib/Vtiger/LanguageImport.php +++ b/vtlib/Vtiger/LanguageImport.php @@ -31,7 +31,7 @@ class Vtiger_LanguageImport extends Vtiger_LanguageExport { * Initialize Import * @access private */ - function initImport($zipfile, $overwrite) { + function initImport($zipfile, $overwrite = true) { $this->__initSchema(); $name = $this->getModuleNameFromZip($zipfile); -- GitLab