106 if (isset(
$config[
'pidList'])) {
108 $depth = (int)
$config[
'pidDepth'];
109 foreach ($pageIds as $pageId) {
116 if (isset(
$config[
'maxItemsInResultList'])) {
117 $this->maxItems =
$config[
'maxItemsInResultList'];
119 if ($this->table ==
'pages') {
120 $this->addWhere =
' AND ' .
$GLOBALS[
'BE_USER']->getPagePermsClause(1);
124 if (
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'versioningWS'] == TRUE) {
125 $this->addWhere .=
' AND t3ver_wsid = 0';
127 if (isset(
$config[
'addWhere'])) {
128 $this->addWhere .=
' ' .
$config[
'addWhere'];
147 $start = $recursionCounter * 50;
150 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'*', $this->table, $this->selectClause,
'', $this->orderByStatement, $start .
', 50');
151 $allRowsCount =
$GLOBALS[
'TYPO3_DB']->sql_num_rows($res);
153 while ($row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
155 if (count($rows) > $this->maxItems) {
165 $this->table, $row, array(
'style' =>
'margin: 0 4px 0 -20px; padding: 0;')
167 $uid = $row[
't3ver_oid'] > 0 ? $row[
't3ver_oid'] : $row[
'uid'];
169 if (strlen($path) > 30) {
170 $croppedPath =
'<abbr title="' . htmlspecialchars($path) .
'">' . htmlspecialchars((
$GLOBALS[
'LANG']->csConvObj->crop(
$GLOBALS[
'LANG']->charSet, $path, 10) .
'...' .
$GLOBALS[
'LANG']->csConvObj->crop(
$GLOBALS[
'LANG']->charSet, $path, -20))) .
'</abbr>';
172 $croppedPath = htmlspecialchars($path);
176 'text' =>
'<span class="suggest-label">' . $label .
'</span><span class="suggest-uid">[' .
$uid .
']</span><br /> 177 <span class="suggest-path">' . $croppedPath .
'</span>',
178 'table' => $this->mmForeignTable ? $this->mmForeignTable : $this->table,
183 'class' => isset($this->config[
'cssClass']) ? $this->config[
'cssClass'] :
'',
184 'sprite' => $spriteIcon
188 $GLOBALS[
'TYPO3_DB']->sql_free_result($res);
190 if (count($rows) < $this->maxItems && $allRowsCount >= 50 && $recursionCounter < $this->maxItems) {
191 $tmp = self::queryTable(
$params, ++$recursionCounter);
192 $rows = array_merge($tmp, $rows);
205 $searchWholePhrase = $this->config[
'searchWholePhrase'];
206 $searchString = $this->params[
'value'];
207 $searchUid = (int)$searchString;
208 if (strlen($searchString)) {
209 $searchString =
$GLOBALS[
'TYPO3_DB']->quoteStr($searchString, $this->table);
210 $likeCondition =
' LIKE \'' . ($searchWholePhrase ?
'%' :
'') .
$GLOBALS[
'TYPO3_DB']->escapeStrForLike($searchString, $this->table) .
'%\'';
214 $selectFields = array_unique($selectFields);
215 $selectParts = array();
216 foreach ($selectFields as $field) {
217 $selectParts[] = $field . $likeCondition;
219 $this->selectClause =
'(' . implode(
' OR ', $selectParts) .
')';
220 if ($searchUid > 0 && $searchUid == $searchString) {
221 $this->selectClause =
'(' . $this->selectClause .
' OR uid = ' . $searchUid .
')';
224 if (isset(
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'delete'])) {
227 if (count($this->allowedPages)) {
228 $pidList =
$GLOBALS[
'TYPO3_DB']->cleanIntArray($this->allowedPages);
229 if (count($pidList)) {
230 $this->selectClause .=
' AND pid IN (' . implode(
', ', $pidList) .
') ';
234 if (isset($this->config[
'searchCondition']) && strlen($this->config[
'searchCondition']) > 0) {
235 $this->selectClause .=
' AND ' . $this->config[
'searchCondition'];
249 $pageIds = array(
$uid);
251 $pages = array(
$uid);
253 while ($depth - $level > 0 && !empty($pageIds)) {
255 $pidList =
$GLOBALS[
'TYPO3_DB']->cleanIntArray($pageIds);
256 $rows =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows(
'uid',
'pages',
'pid IN (' . implode(
', ', $pidList) .
')',
'',
'',
'',
'uid');
257 if (count($rows) > 0) {
258 $pageIds = array_keys($rows);
259 $pages = array_merge($pages, $pageIds);
274 if (
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'label']) {
302 } elseif (isset(
$GLOBALS[
'TCA'][
$table][
'ctrl'][
'is_static']) && (
bool)
$GLOBALS[
'TCA'][$table][
'ctrl'][
'is_static']) {
320 if (
$GLOBALS[
'BE_USER']->workspace != 0 &&
$GLOBALS[
'TCA'][$this->table][
'ctrl'][
'versioningWS'] == TRUE) {
332 $icon =
IconUtility::getIcon($this->mmForeignTable ? $this->mmForeignTable : $this->table, $row);
347 $titleLimit = max($this->config[
'maxPathTitleLength'], 0);
348 if (($this->mmForeignTable ? $this->mmForeignTable : $this->table) ==
'pages') {
352 $path = substr($path, 0, strrpos($path,
'/', -2)) .
'/';
380 if ($this->config[
'renderFunc'] !=
'') {
382 'table' => $this->table,
383 'uid' => $row[
'uid'],
static mergeRecursiveWithOverrule(array &$original, array $overrule, $addKeys=TRUE, $includeEmptyValues=TRUE, $enableUnsetFeature=TRUE)
static skinImg($backPath, $src, $wHattribs='', $outputMode=0)
static readPageAccess($id, $perms_clause)
static workspaceOL($table, &$row, $wsid=-99, $unsetMovePointers=FALSE)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
static callUserFunction($funcName, &$params, &$ref, $checkPrefix='', $errorMode=0)
static getRecordTitle($table, $row, $prep=FALSE, $forceResult=TRUE)
static getSpriteIconForRecord($table, array $row, array $options=array())
static getIcon($table, $row=array(), $shaded=FALSE)
static getRecordPath($uid, $clause, $titleLimit, $fullTitleLimit=0)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]