/** * Stores this object if the history item warrants it. * The object is only stored if there are differences from 'history item'. If the object needs to be stored, the * function specified in the second parameter is called. * @param HISTORY_ITEM $history_item * @param string $store_func_name * @access private */ protected function _store_if_different($history_item, $store_func_name) { $history_item->record_differences($this); if ($history_item->differences_exist()) { $exists = $this->exists(); $this->{$store_func_name}(); /* If the object was just created, then the history item doesn't have the * proper object id stored. */ if (!$exists) { $history_item->update_object($this); } $history_item->store(); } }