Bug #17991 ยป 20080114_csv_fixes.patch
typo3/class.db_list_extra.inc (working copy) | ||
---|---|---|
}
|
||
// Create the SQL query for selecting the elements in the listing:
|
||
if ($this->csvOutput) { // do not do paging when outputting as CSV
|
||
$this->iLimit = 0;
|
||
}
|
||
$queryParts = $this->makeQueryArray($table, $id,$addWhere,$selFieldList); // (API function from class.db_list.inc)
|
||
$this->setTotalItems($queryParts); // Finding the total amount of records on the page (API function from class.db_list.inc)
|
||
... | ... | |
// If the count query returned any number of records, we perform the real query, selecting records.
|
||
if ($this->totalItems) {
|
||
// set the showLimit to the number of records when outputting as CSV
|
||
if ($this->csvOutput) {
|
||
$this->showLimit = $this->totalItems;
|
||
$this->iLimit = $this->totalItems;
|
||
}
|
||
$result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
|
||
$dbCount = $GLOBALS['TYPO3_DB']->sql_num_rows($result);
|
||
}
|
||
... | ... | |
} elseif ($fCol=='_LOCALIZATION_b') {
|
||
// Do nothing, has been done above.
|
||
} else {
|
||
$theData[$fCol] = $this->linkUrlMail(htmlspecialchars(t3lib_BEfunc::getProcessedValueExtra($table,$fCol,$row[$fCol],100,$row['uid'])),$row[$fCol]);
|
||
$tmpProc = t3lib_BEfunc::getProcessedValueExtra($table,$fCol,$row[$fCol],100,$row['uid']);
|
||
$theData[$fCol] = $this->linkUrlMail(htmlspecialchars($tmpProc), $row[$fCol]);
|
||
$row[$fCol] = $tmpProc;
|
||
}
|
||
}
|
||
... | ... | |
$this->csvLines[]='';
|
||
}
|
||
/**
|
||
* Adds the content of input array $row to the CSV list:
|
||
*
|
||
... | ... | |
// Traversing fields, adding values from $row:
|
||
$csvRow=array();
|
||
foreach($this->fieldArray as $fN) {
|
||
if ($fN=='_PATH_') {
|
||
$csvRow[]=$this->recPath($row['pid']);
|
||
} elseif ($fN=='_REF_') {
|
||
$csvRow[]=$this->makeRef($table, $row['uid']);
|
||
} else {
|
||
$csvRow[]=$row[$fN];
|
||
foreach ($this->fieldArray as $fN) {
|
||
switch ($fN) {
|
||
case '_PATH':
|
||
$csvRow[] = $this->recPath($row['pid']);
|
||
break;
|
||
case '_REF_':
|
||
$csvRow[] = $this->makeRef($table, $row['uid']);
|
||
case '_CONTROL_':
|
||
case '_CLIPBOARD_':
|
||
continue;
|
||
break;
|
||
default:
|
||
$csvRow[] = $row[$fN];
|
||
}
|
||
}
|
||