| | |
| | | * Hint: The auto increment (ID) filed of the table has not be be definied separately. |
| | | * |
| | | */ |
| | | |
| | | global $app; |
| | | $app->load('tform_base'); |
| | | class remoting_lib extends tform_base { |
| | | |
| | |
| | | |
| | | |
| | | //* Load the form definition from file. - special version for remoting |
| | | function loadFormDef($file) { |
| | | // module parameter is only for compatibility with base class |
| | | function loadFormDef($file, $module = '') { |
| | | global $app,$conf; |
| | | |
| | | include($file); |
| | |
| | | /** |
| | | * Converts the data in the array to human readable format |
| | | * Datatype conversion e.g. to show the data in lists |
| | | * tab parameter is only there for compatibility with params of base class |
| | | * |
| | | * @param record |
| | | * @return record |
| | | */ |
| | | function decode($record) { |
| | | function decode($record, $tab = '') { |
| | | return $this->_decode($record, '', true); |
| | | } |
| | | |
| | | /** |
| | | * Get the key => value array of a form filled from a datasource definitiom |
| | | * |
| | | * dummy parameter is only there for compatibility with params of base class |
| | | * |
| | | * @param field = array with field definition |
| | | * @param record = Dataset as array |
| | | * @return key => value array for the value field of a form |
| | | */ |
| | | |
| | | function getDatasourceData($field, $record) { |
| | | function getDatasourceData($field, $record, $dummy = '') { |
| | | return $this->_getDatasourceData($field, $record, true); |
| | | } |
| | | |
| | |
| | | /** |
| | | * Rewrite the record data to be stored in the database |
| | | * and check values with regular expressions. |
| | | * |
| | | * dummy parameter is only there for compatibility with params of base class |
| | | * |
| | | * @param record = Datensatz als Array |
| | | * @return record |
| | | */ |
| | | function encode($record,$dbencode = true) { |
| | | function encode($record,$dbencode = true, $dummy = '') { |
| | | $new_record = $this->_encode($record, '', $dbencode, true); |
| | | if(isset($record['_ispconfig_pw_crypted'])) $new_record['_ispconfig_pw_crypted'] = $record['_ispconfig_pw_crypted']; // this one is not in form definitions! |
| | | |
| | |
| | | |
| | | /** |
| | | * Create SQL statement |
| | | * |
| | | * dummy parameter is only there for compatibility with params of base class |
| | | * |
| | | * @param record = Datensatz als Array |
| | | * @param action = INSERT oder UPDATE |
| | | * @param primary_id |
| | | * @return record |
| | | */ |
| | | function getSQL($record, $action = 'INSERT', $primary_id = 0, $sql_ext_where = '') { |
| | | function getSQL($record, $action = 'INSERT', $primary_id = 0, $sql_ext_where = '', $dummy = '') { |
| | | |
| | | global $app; |
| | | |