7 $historyid = $_POST[
'history__id'];
11 $record =&
$app->getRecord();
14 import(
"Dataface/HistoryTool.php");
16 $hrecord = $ht->getRecordById($record->_table->tablename, $historyid);
19 $keys = array_keys($record->_table->keys());
20 if ( $record->strvals(
$keys) != $hrecord->strvals(
$keys) )
25 if ( @$_POST[
'-fieldname'] )
$fieldname = $_POST[
'-fieldname'];
27 $res = $ht->restore($record, $historyid,
$fieldname,
true);
32 if ( @$_POST[
'-locationid'] ) $url = DATAFACE_SITE_HREF.
'?'.
$app->decodeLocation($_POST[
'-locationid']);
37 $url = $record->getURL(
'-action=history');
42 $msg =
"Field '$fieldname' successfully restored to its value from '".$hrecord->strval(
'history__modified').
"'.";
44 $msg =
"Record successfully restored to its value from '".$hrecord->strval(
'history__modified').
"'.";
46 $url .=
"&--msg=".urlencode($msg);