Commit 50c19cf1 authored by Kasper Skårhøj's avatar Kasper Skårhøj
Browse files

*** empty log message ***


git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@138 709f56b5-9817-0410-a4d7-c38de5d9e867
parent 36088ff5
......@@ -40,17 +40,17 @@
*
* 90: class t3lib_admin
* 116: function genTree($theID, $depthData)
* 150: function lostRecords($pid_list)
* 179: function fixLostRecord($table,$uid)
* 197: function countRecords($pid_list)
* 227: function getGroupFields($mode)
* 261: function getFileFields($uploadfolder)
* 284: function getDBFields($theSearchTable)
* 312: function selectNonEmptyRecordsWithFkeys($fkey_arrays)
* 387: function testFileRefs ()
* 438: function testDBRefs($theArray)
* 477: function whereIsRecordReferenced($searchTable,$id)
* 511: function whereIsFileReferenced($uploadfolder,$filename)
* 156: function lostRecords($pid_list)
* 187: function fixLostRecord($table,$uid)
* 208: function countRecords($pid_list)
* 236: function getGroupFields($mode)
* 270: function getFileFields($uploadfolder)
* 293: function getDBFields($theSearchTable)
* 321: function selectNonEmptyRecordsWithFkeys($fkey_arrays)
* 394: function testFileRefs ()
* 445: function testDBRefs($theArray)
* 483: function whereIsRecordReferenced($searchTable,$id)
* 520: function whereIsFileReferenced($uploadfolder,$filename)
*
* TOTAL FUNCTIONS: 12
* (This index is automatically created/updated by the extension "extdeveval")
......@@ -78,9 +78,9 @@
/**
* This class holds functions used by the TYPO3 backend to check the integrity of the database (The DBint module, 'lowlevel' extension)
*
*
* Depends on: Depends on loaddbgroup from t3lib/
*
*
* @todo Need to really extend this class when the tcemain library has been updated and the whole API is better defined. There are some known bugs in this library. Further it would be nice with a facility to not only analyze but also clean up!
* @see SC_mod_tools_dbint_index::func_relations(), SC_mod_tools_dbint_index::func_records()
* @author Kasper Skaarhoj <kasper@typo3.com>
......@@ -108,16 +108,22 @@ class t3lib_admin {
/**
* Generates a list of Page-uid's that corresponds to the tables in the tree. This list should ideally include all records in the pages-table.
*
*
* @param integer a pid (page-record id) from which to start making the tree
* @param string HTML-code (image-tags) used when this function calls itself recursively.
* @return integer Number of mysql_num_rows (most recent query)
* @return integer Number of $GLOBALS['TYPO3_DB']->sql_num_rows (most recent query)
*/
function genTree($theID, $depthData) {
$res = mysql(TYPO3_db, 'SELECT uid,title,doktype,deleted'.(t3lib_extMgm::isLoaded('cms')?',hidden':'').' FROM pages WHERE pid="'.$theID.'" '.((!$this->genTree_includeDeleted)?'AND NOT deleted':'').$this->perms_clause.' ORDER BY sorting');
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'uid,title,doktype,deleted'.(t3lib_extMgm::isLoaded('cms')?',hidden':''),
'pages',
'pid='.intval($theID).' '.((!$this->genTree_includeDeleted)?'AND NOT deleted':'').$this->perms_clause,
'',
'sorting'
);
$a=0;
$c=mysql_num_rows($res);
while ($row = mysql_fetch_assoc($res)) {
$c = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$a++;
$newID =$row['uid'];
if ($this->genTree_makeHTML) {
......@@ -138,14 +144,14 @@ class t3lib_admin {
$this->genTree($newID,$this->genTree_HTML ? $depthData.'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/ol/'.$LN.'.gif','width="18" height="16"').' align="top" alt="" />' : '');
}
return (mysql_num_rows($res));
return $GLOBALS['TYPO3_DB']->sql_num_rows($res);
}
/**
* Fills $this->lRecords with the records from all tc-tables that are not attached to a PID in the pid-list.
*
*
* @param string list of pid's (page-record uid's). This list is probably made by genTree()
* @return void
* @return void
*/
function lostRecords($pid_list) {
global $TCA;
......@@ -154,11 +160,13 @@ class t3lib_admin {
if ($pid_list) {
while (list($table)=each($TCA)) {
t3lib_div::loadTCA($table);
$query = 'SELECT uid,pid,'.$TCA[$table]['ctrl']['label'].' FROM '.$table.' WHERE pid NOT IN ('.$pid_list.')';
$garbage = mysql(TYPO3_db,$query);
echo mysql_error();
$garbage = $GLOBALS['TYPO3_DB']->exec_SELECTquery (
'uid,pid,'.$TCA[$table]['ctrl']['label'],
$table,
'pid NOT IN ('.$pid_list.')'
);
$lostIdList=Array();
while ($row = mysql_fetch_assoc($garbage)) {
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($garbage)) {
$this->lRecords[$table][$row['uid']]=Array('uid'=>$row['uid'], 'pid'=>$row['pid'], 'title'=> strip_tags($row[$TCA[$table]['ctrl']['label']]) );
$lostIdList[]=$row['uid'];
}
......@@ -171,26 +179,29 @@ class t3lib_admin {
/**
* Fixes lost record from $table with uid $uid by setting the PID to zero. If there is a disabled column for the record that will be set as well.
*
*
* @param string Database tablename
* @param integer The uid of the record which will have the PID value set to 0 (zero)
* @return boolean True if done.
*/
function fixLostRecord($table,$uid) {
if ($table && $GLOBALS['TCA'][$table] && $uid && is_array($this->lRecords[$table][$uid]) && $GLOBALS['BE_USER']->user['admin']) {
$extra='';
$updateFields = array();
$updateFields['pid'] = 0;
if ($GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled']) { // If possible a lost record restored is hidden as default
$extra.=','.$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'].'=1';
$updateFields[$GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled']] = 1;
}
$fixQuery = 'UPDATE '.$table.' SET pid=0'.$extra.' WHERE uid="'.$uid.'"';
$fixQ = mysql(TYPO3_db,$fixQuery);
return true;
} else return false;
$GLOBALS['TYPO3_DB']->exec_UPDATEquery($table, 'uid='.intval($uid), $updateFields);
return TRUE;
} else return FALSE;
}
/**
* Counts records from $TCA-tables that ARE attached to an existing page.
*
*
* @param string list of pid's (page-record uid's). This list is probably made by genTree()
* @return array an array with the number of records from all $TCA-tables that are attached to a PID in the pid-list.
*/
......@@ -202,15 +213,13 @@ class t3lib_admin {
if ($pid_list) {
while (list($table)=each($TCA)) {
t3lib_div::loadTCA($table);
$query = 'SELECT count(*) FROM '.$table.' WHERE pid IN ('.$pid_list.')';
$count = mysql(TYPO3_db,$query);
if ($row = mysql_fetch_row($count)) {
$count = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', $table, 'pid IN ('.$pid_list.')');
if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($count)) {
$list[$table]=$row[0];
}
$query = 'SELECT count(*) FROM '.$table.' WHERE pid IN ('.$pid_list.')'.t3lib_BEfunc::deleteClause($table);
$count = mysql(TYPO3_db,$query);
if ($row = mysql_fetch_row($count)) {
$count = $GLOBALS['TYPO3_DB']->exec_SELECTquery('count(*)', $table, 'pid IN ('.$pid_list.')'.t3lib_BEfunc::deleteClause($table));
if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($count)) {
$list_n[$table]=$row[0];
}
}
......@@ -220,7 +229,7 @@ class t3lib_admin {
/**
* Finding relations in database based on type 'group' (files or database-uid's in a list)
*
*
* @param string $mode = file, $mode = db, $mode = '' (all...)
* @return array An array with all fields listed that somehow are references to other records (foreign-keys) or files
*/
......@@ -254,7 +263,7 @@ class t3lib_admin {
/**
* Finds all fields that hold filenames from uploadfolder
*
*
* @param string Path to uploadfolder
* @return array An array with all fields listed that have references to files in the $uploadfolder
*/
......@@ -277,9 +286,9 @@ class t3lib_admin {
/**
* Returns an array with arrays of table/field pairs which are allowed to hold references to the input table name - according to $TCA
*
*
* @param string Table name
* @return array
* @return array
*/
function getDBFields($theSearchTable) {
global $TCA;
......@@ -304,9 +313,9 @@ class t3lib_admin {
/**
* This selects non-empty-records from the tables/fields in the fkey_array generated by getGroupFields()
*
*
* @param array Array with tables/fields generated by getGroupFields()
* @return void
* @return void
* @see getGroupFields()
*/
function selectNonEmptyRecordsWithFkeys($fkey_arrays) {
......@@ -318,10 +327,8 @@ class t3lib_admin {
t3lib_div::loadTCA($table);
$fieldArr = explode(',',$field_list);
$cl_fl = implode ('!="" OR ',$fieldArr). '!=""';
$query = 'SELECT uid,'.$field_list.' FROM '.$table.' WHERE '.$cl_fl;
$mres = mysql(TYPO3_db,$query);
echo mysql_error();
while ($row=mysql_fetch_assoc($mres)) {
$mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,'.$field_list, $table, $cl_fl);
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
reset($fieldArr);
while (list(,$field)=each($fieldArr)) {
if (trim($row[$field])) {
......@@ -381,7 +388,7 @@ class t3lib_admin {
/**
* Depends on selectNonEmpty.... to be executed first!!
*
*
* @return array Report over files; keys are "moreReferences", "noReferences", "noFile", "error"
*/
function testFileRefs () {
......@@ -431,7 +438,7 @@ class t3lib_admin {
/**
* Depends on selectNonEmpty.... to be executed first!!
*
*
* @param array Table with key/value pairs being table names and arrays with uid numbers
* @return string HTML Error message
*/
......@@ -446,9 +453,8 @@ class t3lib_admin {
}
$theList = implode($idlist,',');
if ($theList) {
$query='SELECT uid FROM '.$table.' WHERE uid IN ('.$theList.') '.t3lib_BEfunc::deleteClause($table);
$mres = mysql(TYPO3_db,$query);
while($row=mysql_fetch_assoc($mres)) {
$mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $table, 'uid IN ('.$theList.')'.t3lib_BEfunc::deleteClause($table));
while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
if (isset($dbArr[$row['uid']])) {
unset ($dbArr[$row['uid']]);
} else {
......@@ -469,7 +475,7 @@ class t3lib_admin {
/**
* Finding all references to record based on table/uid
*
*
* @param string Table name
* @param integer Uid of database record
* @return array Array with other arrays containing information about where references was found
......@@ -481,9 +487,12 @@ class t3lib_admin {
while (list(,$info)=each($fileFields)) {
$table=$info[0]; $field=$info[1];
t3lib_div::loadTCA($table);
$query = 'SELECT uid,pid,'.$TCA[$table]['ctrl']['label'].','.$field.' FROM '.$table.' WHERE '.$field.' LIKE "%'.addSlashes($id).'%"';
$mres = mysql(TYPO3_db,$query);
while ($row = mysql_fetch_assoc($mres)) {
$mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'uid,pid,'.$TCA[$table]['ctrl']['label'].','.$field,
$table,
$field.' LIKE "%'.$GLOBALS['TYPO3_DB']->quoteStr($id, $table).'%"'
);
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
// Now this is the field, where the reference COULD come from. But we're not garanteed, so we must carefully examine the data.
$fieldConf = $TCA[$table]['columns'][$field]['config'];
$allowedTables = ($fieldConf['type']=='group') ? $fieldConf['allowed'] : $fieldConf['foreign_table'];
......@@ -503,7 +512,7 @@ class t3lib_admin {
/**
* Finding all references to file based on uploadfolder / filename
*
*
* @param string Upload folder where file is found
* @param string Filename to search for
* @return array Array with other arrays containing information about where references was found
......@@ -514,9 +523,12 @@ class t3lib_admin {
$theRecordList=Array();
while (list(,$info)=each($fileFields)) {
$table=$info[0]; $field=$info[1];
$query = 'SELECT uid,pid,'.$TCA[$table]['ctrl']['label'].','.$field.' FROM '.$table.' WHERE '.$field.' LIKE "%'.addSlashes($filename).'%"';
$mres = mysql(TYPO3_db,$query);
while ($row = mysql_fetch_assoc($mres)) {
$mres = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'uid,pid,'.$TCA[$table]['ctrl']['label'].','.$field,
$table,
$field.' LIKE "%'.$GLOBALS['TYPO3_DB']->quoteStr($filename, $table).'%"'
);
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($mres)) {
// Now this is the field, where the reference COULD come from. But we're not garanteed, so we must carefully examine the data.
$tempArr = explode(',',trim($row[$field]));
while (list(,$file)=each($tempArr)) {
......
......@@ -66,7 +66,7 @@
/**
* Class for displaying an array as a tree
* See the extension 'lowlevel' /config (Backend module 'Tools > Configuration')
*
*
* @author Kasper Skaarhoj <kasper@typo3.com>
* @package TYPO3
* @subpackage t3lib
......@@ -81,7 +81,7 @@ class t3lib_arrayBrowser {
/**
* Make browsable tree
* Before calling this function you may want to set some of the internal vars like depthKeys, regexMode and fixedLgd. For examples see SC_mod_tools_config_index::main()
*
*
* @param array The array to display
* @param string Key-position id. Build up during recursive calls - [key1].[key2].[key3] - an so on.
* @param string Depth-data - basically a prefix for the icons. For calling this function from outside, let it stay blank.
......@@ -144,12 +144,12 @@ class t3lib_arrayBrowser {
/**
* Creates an array with "depthKeys" which will expand the array to show the search results
*
*
* @param array The array to search for the value
* @param string Depth string - blank for first call (will build up during recursive calling creating an id of the position: [key1].[key2].[key3]
* @param string The string to search for
* @param array Key array, for first call pass empty array
* @return array
* @return array
*/
function getSearchKeys($keyArr, $depth_in, $searchString, $keyArray) {
reset($keyArr);
......@@ -178,7 +178,7 @@ class t3lib_arrayBrowser {
/**
* Fixed length function
*
*
* @param string String to process
* @param integer Max number of chars
* @return string Processed string
......@@ -194,7 +194,7 @@ class t3lib_arrayBrowser {
/**
* Function modifying the depthKey array
*
*
* @param array Array with instructions to open/close nodes.
* @param array Input depth_key array
* @return array Output depth_key array with entries added/removed based on $arr
......
......@@ -71,7 +71,7 @@
/**
* Contains functions for management, validation etc of files in TYPO3, using the concepts of web- and ftp-space. Please see the comment for the init() function
*
*
* @author Kasper Skaarhoj <kasper@typo3.com>
* @package TYPO3
* @subpackage t3lib
......@@ -101,7 +101,7 @@ class t3lib_basicFileFunctions {
/**
* Constructor
* This function should be called to initialise the internal arrays $this->mounts and $this->f_ext
*
*
* A typical example of the array $mounts is this:
* $mounts[xx][path] = (..a mounted path..)
* the 'xx'-keys is just numerical from zero. There are also a [name] and [type] value that just denotes the mountname and type. Not used for athentication here.
......@@ -109,7 +109,7 @@ class t3lib_basicFileFunctions {
* The mountpaths are with a trailing '/'. $thePath must be with a trailing '/' also!
* As you can see, $this->mounts is very critical! This is the array that decides where the user will be allowed to copy files!!
* Typically the global var $WEBMOUNTS would be passed along as $mounts
*
*
* A typical example of the array $f_ext is this:
* $f_ext['webspace']['allow']='';
* $f_ext['webspace']['deny']='php3,php';
......@@ -120,13 +120,13 @@ class t3lib_basicFileFunctions {
* You list extensions comma-separated. If the value is a '*' every extension is allowed
* The list is case-insensitive when used in this class (see init())
* Typically TYPO3_CONF_VARS['BE']['fileExtensions'] would be passed along as $f_ext.
*
*
* Example:
* $basicff->init($GLOBALS['FILEMOUNTS'],$TYPO3_CONF_VARS['BE']['fileExtensions']);
*
*
* @param array Contains the paths of the file mounts for the current BE user. Normally $GLOBALS['FILEMOUNTS'] is passed. This variable is set during backend user initialization; $FILEMOUNTS = $BE_USER->returnFilemounts(); (see typo3/init.php)
* @param array Array with information about allowed and denied file extensions. Typically passed: $TYPO3_CONF_VARS['BE']['fileExtensions']
* @return void
* @return void
* @see typo3/init.php, t3lib_userAuthGroup::returnFilemounts()
*/
function init($mounts, $f_ext) {
......@@ -142,7 +142,7 @@ class t3lib_basicFileFunctions {
/**
* Returns an array with a whole lot of fileinformation.
*
*
* @param string Filepath to existing file. Should probably be absolute. Filefunctions are performed on this value.
* @return array Information about the file in the filepath
*/
......@@ -161,7 +161,7 @@ class t3lib_basicFileFunctions {
/**
* Checks if a $iconkey (fileextension) is allowed according to $this->f_ext.
*
*
* @param string The extension to check, eg. "php" or "html" etc.
* @param string Either "webspage" or "ftpspace" - points to a key in $this->f_ext
* @return boolean True if file extension is allowed.
......@@ -187,9 +187,9 @@ class t3lib_basicFileFunctions {
/**
* Returns true if you can operate of ANY file ('*') in the space $theDest is in ('webspace' / 'ftpspace')
*
*
* @param string Absolute path
* @return boolean
* @return boolean
*/
function checkIfFullAccess($theDest) {
$type = $this->is_webpath($theDest)?'webspace':'ftpspace';
......@@ -201,9 +201,9 @@ class t3lib_basicFileFunctions {
/**
* Checks if $this->webPath (should be TYPO3_DOCUMENT_ROOT) is in the first part of $path
* Returns true also if $this->init is not set or if $path is empty...
*
*
* @param string Absolute path to check
* @return boolean
* @return boolean
*/
function is_webpath($path) {
if ($this->isInit) {
......@@ -219,7 +219,7 @@ class t3lib_basicFileFunctions {
/**
* If the filename is given, check it against the TYPO3_CONF_VARS[BE][fileDenyPattern] +
* Checks if the $ext fileextension is allowed in the path $theDest (this is based on whether $theDest is below the $this->webPath)
*
*
* @param string File extension, eg. "php" or "html"
* @param string Absolute path for which to test
* @param string Filename to check against TYPO3_CONF_VARS[BE][fileDenyPattern]
......@@ -231,9 +231,9 @@ class t3lib_basicFileFunctions {
/**
* Returns true if the input filename string is shorter than $this->maxInputNameLen.
*
*
* @param string Filename, eg "somefile.html"
* @return boolean
* @return boolean
*/
function checkFileNameLen($fileName) {
return strlen($fileName) <= $this->maxInputNameLen;
......@@ -241,7 +241,7 @@ class t3lib_basicFileFunctions {
/**
* Cleans $theDir for slashes in the end of the string and returns the new path, if it exists on the server.
*
*
* @param string Directory path to check
* @return string Returns the cleaned up directory name if OK, otherwise false.
*/
......@@ -257,7 +257,7 @@ class t3lib_basicFileFunctions {
/**
* Wrapper for t3lib_div::validPathStr()
*
*
* @param string Filepath to evaluate
* @return boolean True, if no '//', '..' or '\' is in the $theFile
* @see t3lib_div::validPathStr()
......@@ -270,7 +270,7 @@ class t3lib_basicFileFunctions {
* Returns the destination path/filename of a unique filename/foldername in that path.
* If $theFile exists in $theDest (directory) the file have numbers appended up to $this->maxNumber. Hereafter a unique string will be appended.
* This function is used by fx. TCEmain when files are attached to records and needs to be uniquely named in the uploads/* folders
*
*
* @param string The input filename to check
* @param string The directory for which to return a unique filename for $theFile. $theDest MUST be a valid directory. Should be absolute.
* @param boolean If set the filename is returned with the path prepended without checking whether it already existed!
......@@ -315,7 +315,7 @@ class t3lib_basicFileFunctions {
/**
* Checks if $thePath is a path under one of the paths in $this->mounts
* See comment in the header of this class.
*
*
* @param string $thePath MUST HAVE a trailing '/' in order to match correctly with the mounts
* @return string The key to the first mount found, otherwise nothing is returned.
* @see init()
......@@ -334,7 +334,7 @@ class t3lib_basicFileFunctions {
/**
* Removes filemount part of a path, thus blinding the position.
* Takes a path, $thePath, and removes the part of the path which equals the filemount.
*
*
* @param string $thePath is a path which MUST be found within one of the internally set filemounts, $this->mounts
* @return string The processed input path
*/
......@@ -351,7 +351,7 @@ class t3lib_basicFileFunctions {
/**
* Find temporary folder
* Finds the first $this->tempFN ('_temp_' usually) -folder in the internal array of filemounts, $this->mounts
*
*
* @return string Returns the path if found, otherwise nothing if error.
*/
function findTempFolder() {
......@@ -379,7 +379,7 @@ class t3lib_basicFileFunctions {
/**
* Removes all dots, slashes and spaces after a path...
*
*
* @param string Input string
* @return string Output string
*/
......@@ -389,7 +389,7 @@ class t3lib_basicFileFunctions {
/**
* Converts any double slashes (//) to a single slash (/)
*
*
* @param string Input value
* @return string Returns the converted string
*/
......@@ -399,7 +399,7 @@ class t3lib_basicFileFunctions {
/**
* Returns a string which has a slash '/' appended if it doesn't already have that slash
*
*
* @param string Input string
* @return string Output string with a slash in the end (if not already there)
*/
......@@ -412,7 +412,7 @@ class t3lib_basicFileFunctions {
/**
* Returns a string where any character not matching [.a-zA-Z0-9_-] is substituted by '_'
*
*
* @param string Input string, typically the body of a filename
* @return string Output string with any characters not matching [.a-zA-Z0-9_-] is substituted by '_'
*/
......@@ -423,7 +423,7 @@ class t3lib_basicFileFunctions {
/**
* Formats an integer, $sizeInBytes, to Mb or Kb or just bytes
*
*
* @param integer Bytes to be formated
* @return string Formatted with M,K or &nbsp;&nbsp; appended.
*/
......
......@@ -45,10 +45,10 @@
* 146: function getTypeLabel($code)
* 160: function getActionLabel($code)
* 178: function getDetails($code,$text,$data,$sys_log_uid=0)
* 211: function reset()
* 225: function getErrorFormatting($sign)
* 235: function formatDetailsForList($row)
* 252: function stripPath($inArr)
* 210: function reset()
* 224: function getErrorFormatting($sign)
* 234: function formatDetailsForList($row)
* 251: function stripPath($inArr)
*
* TOTAL FUNCTIONS: 10
* (This index is automatically created/updated by the extension "extdeveval")
......@@ -72,7 +72,7 @@
/**
* This class holds some functions used to display the sys_log table-content.
* Used in the status-scripts and the log-module.
*
*
* @author Kasper Skaarhoj <kasper@typo3.com>
* @package TYPO3
* @subpackage t3lib
......@@ -94,8 +94,8 @@ class t3lib_BEDisplayLog {
/**
* Initialize the log table array with header labels.
*
* @return array
*
* @return array
*/
function initArray() {
$codeArr=Array();
......@@ -110,7 +110,7 @@ class t3lib_BEDisplayLog {
/**
* Get time label for log listing
*
*
* @param integer Timestamp to display
* @return string If the timestamp was also shown last time, then "." is returned. Otherwise the new timestamp formatted with ->doc->formatTime()
*/
......@@ -125,7 +125,7 @@ class t3lib_BEDisplayLog {
/**
* Get user name label for log listing
*
*
* @param integer be_user uid
* @return string If username is different from last username then the username, otherwise "."
*/
......@@ -139,7 +139,7 @@ class t3lib_BEDisplayLog {
/**
* Get type label for log listing
*
*
* @param string Key for the type label in locallang
* @return string If labe is different from last type label then the label is returned, otherwise "."
*/
......@@ -153,7 +153,7 @@ class t3lib_BEDisplayLog {
/**
* Get action label for log listing
*
*
* @param string Key for the action label in locallang
* @return string If labe is different from last action label then the label is returned, otherwise "."
*/
......@@ -167,7 +167,7 @@ class t3lib_BEDisplayLog {
/**
* Get details for the log entry
*
*
* @param string Suffix to "msg_" to get label from locallang.
* @param string Details text
* @param array Data array
......@@ -180,9 +180,9 @@ class t3lib_BEDisplayLog {
if (is_array($data)) {
if ($this->detailsOn) {
if (is_object($GLOBALS['LANG'])) {
$label=$GLOBALS['LANG']->getLL('msg_'.$code);
$label = $GLOBALS['LANG']->getLL('msg_'.$code);
} else {
list($label)=explode(',',$text);
list($label) = explode(',',$text);
}
if ($label) {$text=$label;}
$text = sprintf($text, htmlspecialchars($data[0]),htmlspecialchars($data[1]),htmlspecialchars($data[2]),htmlspecialchars($data[3]),htmlspecialchars($data[4]));
......@@ -192,9 +192,8 @@ class t3lib_BEDisplayLog {
}
// Finding the history for the record
$query='SELECT uid,fieldlist FROM sys_history WHERE sys_log_uid='.intval($sys_log_uid);
$res = mysql(TYPO3_db,$query);
$newRow = mysql_fetch_assoc($res);
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,fieldlist', 'sys_history', 'sys_log_uid='.intval($sys_log_uid));
$newRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);