recordHistory Class Reference

List of all members.

Public Member Functions

 recordHistory ()
 main ()
 displaySysHistoryEntry ($sh_uid)
 revertToPreviousValues ($element, $field)
 saveState ($element, $sumUp)
 displayHistory ($element)
 nextHisUid ($element, $hisUid)
 compareChangesWithCurrent ($element, $changeRec)
 readFieldTypes ($table, $id)
 cmp ($changeStatus, $oldRecord)
 removeFilefields ($table, $dataArray)
 renderEntry ($entry, $table)
 listHeader ()
 linkPage ($str, $inparams=array(), $anchor=')
 getChangesSinceRecord ($element, $hisUid=0, $hisUid_Stop=0)

Public Attributes

 $maxSteps = 20
 $listType = 0
 $sh_uid
 $element
 $saveState
 $returnUrl
 $revert
 $sumUp
 $doReturn

Detailed Description

Definition at line 83 of file class.show_rechis.inc.


Constructor & Destructor Documentation

recordHistory::recordHistory  ) 
 

Constructor for the class

Returns:
void

Definition at line 106 of file class.show_rechis.inc.

References t3lib_div::_GP(), and saveState().


Member Function Documentation

recordHistory::cmp changeStatus,
oldRecord
 

Compares the old record with the changed fields.

Parameters:
array Record with field/value pairs (what has changed)
array Record with field/value pairs
Returns:
array Comparison result. private

Definition at line 662 of file class.show_rechis.inc.

Referenced by displayHistory().

recordHistory::compareChangesWithCurrent element,
changeRec
 

This compares a certain sys_history state (given by the $changeRec array) with the current values of the element refered to by $element.

Parameters:
string Element reference, syntax "[table]:[uid]"
array Array with the state information from a certain state. This kind of array is produced by getChangesSinceRecord()
Returns:
array Array with the changes registered in. private
See also:
getChangesSinceRecord()

Definition at line 586 of file class.show_rechis.inc.

References $TCA, and t3lib_BEfunc::getRecord().

Referenced by displayHistory(), and revertToPreviousValues().

recordHistory::displayHistory element  ) 
 

Displays the history states of an element

Parameters:
string Element reference, syntax "[table]:[uid]"
Returns:
string HTML for list, wrapped in a table.

Definition at line 339 of file class.show_rechis.inc.

References $GLOBALS, $LANG, $lines, $res, $SOBE, $table, $TCA, $theTime, a, cmp(), colspan, compareChangesWithCurrent(), t3lib_BEfunc::cshItem(), t3lib_BEfunc::datetime(), debug(), t3lib_BEfunc::getUserNames(), height, img, t3lib_div::intInRange(), linkPage(), listHeader(), nbsp, nextHisUid(), saveState(), t3lib_iconWorks::skinImg(), table, and td.

Referenced by main().

recordHistory::displaySysHistoryEntry sh_uid  ) 
 

Displays a specific entry from the sys_history table

Parameters:
integer UID of sys_history table entry
Returns:
string HTML content

Definition at line 155 of file class.show_rechis.inc.

References $content, $GLOBALS, $LANG, $lines, $res, $SOBE, $TCA, $theTime, colspan, t3lib_BEfunc::cshItem(), t3lib_BEfunc::datetime(), height, img, linkPage(), listHeader(), table, and td.

Referenced by main().

recordHistory::getChangesSinceRecord element,
hisUid = 0,
hisUid_Stop = 0
 

This creates an array with the sum of differences between two points in the sys_history

Parameters:
string Element reference, syntax "[table]:[uid]"
integer sys_history uid from which to start the selection process
integer optional sys_history uid at which to stop the selection (thus applying an upper limit)
Returns:
array Array with difference information private

Definition at line 841 of file class.show_rechis.inc.

References $GLOBALS, $res, $TCA, and debug().

Referenced by saveState().

recordHistory::linkPage str,
inparams = array(),
anchor = '
 

Creates a link to the same page.

Parameters:
string String to wrap in tags (must be htmlspecialchars()'ed prior to calling function)
array Array of key/value pairs to override the default values with.
string Possible anchor value.
Returns:
string Link. private

Definition at line 813 of file class.show_rechis.inc.

References a.

Referenced by displayHistory(), and displaySysHistoryEntry().

recordHistory::listHeader  ) 
 

Creates a header row based on the value of $this->listType

Returns:
string HTML table header row private

Definition at line 769 of file class.show_rechis.inc.

References $LANG, $SOBE, height, img, nbsp, t3lib_iconWorks::skinImg(), and td.

Referenced by displayHistory(), and displaySysHistoryEntry().

recordHistory::main  ) 
 

Main function for the listing of history. It detects incoming variables like element reference, history element uid etc. and renders the correct screen.

Returns:
void

Definition at line 124 of file class.show_rechis.inc.

References $content, displayHistory(), displaySysHistoryEntry(), revertToPreviousValues(), and saveState().

recordHistory::nextHisUid element,
hisUid
 

Based on the uid of a sys_history record (a state) this method will find the uids of the previous and next state (if any)

Parameters:
string Element reference, syntax "[table]:[uid]"
integer Current state uid
Returns:
array Array with previous and next uid as key 0 / 1 private

Definition at line 540 of file class.show_rechis.inc.

References $GLOBALS, $res, and $row.

Referenced by displayHistory().

recordHistory::readFieldTypes table,
id
 

Returns the record of $table/$id along with the sql field types for each field

Parameters:
string The table name
integer The uid of the record
Returns:
array An array with two num keys; in 0 is the current record, in 1 is the field types for each field. private

Definition at line 631 of file class.show_rechis.inc.

References $col, $GLOBALS, $res, and table.

recordHistory::removeFilefields table,
dataArray
 

Will traverse the field names in $dataArray and look in $TCA if the fields are of types which cannot be handled by the sys_history (that is currently group types with internal_type set to "file")

Parameters:
string Table name
array The data array
Returns:
array The modified data array private

Definition at line 685 of file class.show_rechis.inc.

References $TCA, field, t3lib_div::loadTCA(), and table.

Referenced by revertToPreviousValues().

recordHistory::renderEntry entry,
table
 

Renders HTML table-rows with the comparison information of an sys_history entry record

Parameters:
array sys_history entry record.
string The table name
Returns:
array HTML table rows in an array private

Definition at line 708 of file class.show_rechis.inc.

References $LANG, $lines, $SOBE, $TCA, t3lib_BEfunc::getItemLabel(), t3lib_BEfunc::getProcessedValue(), height, img, t3lib_div::loadTCA(), t3lib_div::makeInstance(), nbsp, t3lib_iconWorks::skinImg(), table, and td.

recordHistory::revertToPreviousValues element,
field
 

Return to previous values for element

Parameters:
string Element reference, syntax "[table]:[uid]"
string Tells which field to restore. A single field (eg named "myField") is defined as "field:myField" while ALL fields is indicated by the string "ALL_FIELDS"
Returns:
void The function writes through tceMain and ends with a header-location, if instructed to.

Definition at line 219 of file class.show_rechis.inc.

References $data, $GLOBALS, $redirect, $res, $row, $sumUp, compareChangesWithCurrent(), exit, field, t3lib_BEfunc::getRecord(), t3lib_div::locationHeaderUrl(), t3lib_div::makeInstance(), and removeFilefields().

Referenced by main().

recordHistory::saveState element,
sumUp
 

Will save state uid $sumUp of element

Parameters:
string Element reference, syntax "[table]:[uid]"
integer sys_history uid from which to get previous values
Returns:
void

Definition at line 285 of file class.show_rechis.inc.

References $GLOBALS, $res, and getChangesSinceRecord().

Referenced by displayHistory(), main(), and recordHistory().


Member Data Documentation

recordHistory::$doReturn
 

Definition at line 98 of file class.show_rechis.inc.

recordHistory::$element
 

Definition at line 93 of file class.show_rechis.inc.

recordHistory::$listType = 0
 

Definition at line 89 of file class.show_rechis.inc.

recordHistory::$maxSteps = 20
 

Definition at line 86 of file class.show_rechis.inc.

recordHistory::$returnUrl
 

Definition at line 95 of file class.show_rechis.inc.

recordHistory::$revert
 

Definition at line 96 of file class.show_rechis.inc.

recordHistory::$saveState
 

Definition at line 94 of file class.show_rechis.inc.

recordHistory::$sh_uid
 

Definition at line 92 of file class.show_rechis.inc.

recordHistory::$sumUp
 

Definition at line 97 of file class.show_rechis.inc.

Referenced by revertToPreviousValues().


The documentation for this class was generated from the following file:
Generated on Wed Aug 10 07:57:10 2005 for TYPO3 3.8.0 by  doxygen 1.4.3-20050530