Project

General

Profile

Bug #23190 » 4.3_0015129_v1.diff

Administrator Admin, 2011-01-05 15:28

View differences:

typo3/class.db_list.inc (Arbeitskopie)
// Adding search constraints:
$search = $this->makeSearchString($table);
$pidSelect = $this->getPidSelectForQuery();
// Compiling query array:
$queryParts = array(
'SELECT' => $fieldList,
'FROM' => $table,
'WHERE' => $this->pidSelect.
'WHERE' => $pidSelect .
' '.$pC.
t3lib_BEfunc::deleteClause($table).
t3lib_BEfunc::versioningPlaceholderClause($table).
......
}
/**
* Get the pids for the select query depending on wether the user has webmounts set and a searchString is given
*
* @return string
*/
public function getPidSelectForQuery() {
$pidSelect = $this->pidSelect;
if (strlen($this->searchString) AND strlen($GLOBALS['BE_USER']->groupData['webmounts'])) {
$ids = explode(',', $GLOBALS['BE_USER']->groupData['webmounts']);
$pageIds = array();
foreach ($ids as $id) {
$tree = $this->getTreeObject($id, intval($this->searchLevels), $this->perms_clause);
$pageIds = array_merge($pageIds, (array) $tree->ids);
}
$pidSelect = 'pid in (' . implode(',', $pageIds) . ')';
}
return $pidSelect;
}
/**
* Based on input query array (query for selecting count(*) from a table) it will select the number of records and set the value in $this->totalItems
*
* @param array Query array
(2-2/4)