59 'database::change_history::change_history_access' ,
'last' , __FILE__
94 $Code = $this->CachedMultyFS->get_template( __FILE__ ,
'change_history_header.tpl' );
96 return( str_replace(
'{id}' , $id , $Code ) );
122 private function get_replace_parameters()
126 $PlaceHolders = array(
127 '{class}' ,
'{date_string}' ,
'{time_string}' ,
'{author_name}' ,
'{field_name}' ,
128 '{previous}' ,
'{field_value}'
132 'table_row_'.( $i % 2 ?
'even' :
'odd' ) , date(
'd.m.y' , $Time ) , date(
'H:i:s' , $Time ) ,
133 get_field( $Change ,
'author_name' ) , $FieldName =
get_field( $Change ,
'field_name' ) ,
134 get_field( $Previous , $FieldName ,
'-' ) , $FieldValue =
get_field( $Change ,
'field_value' )
137 return( array( $PlaceHolders , $Data ) );
139 catch( Exception $e )
171 $Lines = $Previous = array();
173 foreach( $Changes as $i => $Change )
175 list( $PlaceHolders , $Data ) = $this->get_replace_parameters();
177 $Code = $this->CachedMultyFS->get_template( __FILE__ ,
'change_history_item.tpl' );
179 $Code = str_replace( $PlaceHolders , $Data , $Code );
181 $Previous[ $FieldName ] = $FieldValue;
186 return( implode(
'' , array_reverse( $Lines ) ) );
188 catch( Exception $e )
224 $Changes = $this->ChangeHistoryAcces->get_history( $id , $ObjectType );
226 if( isset( $Changes[ 0 ] ) )
231 $Footer = $this->CachedMultyFS->get_template( __FILE__ ,
'change_history_footer.tpl' );
232 $Code .= str_replace(
'{code}' , $Code , $Footer );
236 $NoDataFound = $this->CachedMultyFS->get_template( __FILE__ ,
'change_history_no_data_found.tpl' );
237 $Code = str_replace(
'{id}' , $id , $NoDataFound );
242 catch( Exception $e )