fix PHP Warning: declaration of method x should be compatible with parent

This commit is contained in:
Ralf Becker 2016-02-22 17:13:48 +00:00
parent a84a255bb7
commit d8822b5d52
3 changed files with 4 additions and 21 deletions

View File

@ -837,11 +837,12 @@ class addressbook_sql extends so_sql_cf
* Re-implemented to deal with extra contact_owner column * 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 $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 * @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);
} }
/** /**

View File

@ -236,16 +236,6 @@ class so_sql
$this->tz_offset_s = egw_time::tz_offset_s(); $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 * sets up the class for an app and table (by using the table-definition of $app/setup/tables_current.inc.php
* *

View File

@ -210,7 +210,7 @@ class so_sql_cf extends so_sql
* saves custom field data * saves custom field data
* *
* @param array $data data to save (cf's have to be prefixed with self::CF_PREFIX = #) * @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 * @return bool false on success, errornumber on failure
*/ */
function save_customfields($data, array $extra_cols=array()) 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')) && return $this->allow_multiple_values && in_array($this->customfields[$name]['type'],array('select','select-account')) &&
$this->customfields[$name]['rows'] > 1; $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()!');
}
} }