From d8822b5d526c26aa069d687d09029f6b6f6f387e Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 22 Feb 2016 17:13:48 +0000 Subject: [PATCH] fix PHP Warning: declaration of method x should be compatible with parent --- addressbook/inc/class.addressbook_sql.inc.php | 5 +++-- etemplate/inc/class.so_sql.inc.php | 10 ---------- etemplate/inc/class.so_sql_cf.inc.php | 10 +--------- 3 files changed, 4 insertions(+), 21 deletions(-) diff --git a/addressbook/inc/class.addressbook_sql.inc.php b/addressbook/inc/class.addressbook_sql.inc.php index 51ab7830c2..48d871cfaa 100644 --- a/addressbook/inc/class.addressbook_sql.inc.php +++ b/addressbook/inc/class.addressbook_sql.inc.php @@ -837,11 +837,12 @@ class addressbook_sql extends so_sql_cf * Re-implemented to deal with extra contact_owner column * * @param array $data data to save (cf's have to be prefixed with self::CF_PREFIX = #) + * @param array $extra_cols =array() extra-data to be saved * @return bool false on success, errornumber on failure */ - function save_customfields($data) + function save_customfields($data, array $extra_cols=array()) { - return parent::save_customfields($data, array('contact_owner' => $data['owner'])); + return parent::save_customfields($data, array('contact_owner' => $data['owner'])+$extra_cols); } /** diff --git a/etemplate/inc/class.so_sql.inc.php b/etemplate/inc/class.so_sql.inc.php index ccab4b2b87..76afa3d744 100644 --- a/etemplate/inc/class.so_sql.inc.php +++ b/etemplate/inc/class.so_sql.inc.php @@ -236,16 +236,6 @@ class so_sql $this->tz_offset_s = egw_time::tz_offset_s(); } - /** - * php4 constructor - * - * @deprecated use __construct - */ - function so_sql($app='',$table='',$db=null,$column_prefix='',$no_clone=false) - { - self::__construct($app,$table,$db,$column_prefix,$no_clone); - } - /** * sets up the class for an app and table (by using the table-definition of $app/setup/tables_current.inc.php * diff --git a/etemplate/inc/class.so_sql_cf.inc.php b/etemplate/inc/class.so_sql_cf.inc.php index 0b17ad6aac..e7cef19b0e 100644 --- a/etemplate/inc/class.so_sql_cf.inc.php +++ b/etemplate/inc/class.so_sql_cf.inc.php @@ -210,7 +210,7 @@ class so_sql_cf extends so_sql * saves custom field data * * @param array $data data to save (cf's have to be prefixed with self::CF_PREFIX = #) - * @param array $extra_cols =array() + * @param array $extra_cols =array() extra-data to be saved * @return bool false on success, errornumber on failure */ function save_customfields($data, array $extra_cols=array()) @@ -738,12 +738,4 @@ class so_sql_cf extends so_sql return $this->allow_multiple_values && in_array($this->customfields[$name]['type'],array('select','select-account')) && $this->customfields[$name]['rows'] > 1; } - - /** - * Prevent someone calling the old php4 so_sql constructor - */ - function so_sql() - { - throw new egw_exception_assertion_failed('use __construct()!'); - } }