Commit 3b3e9618 authored by Oliver Hader's avatar Oliver Hader Committed by Oliver Hader
Browse files

[TASK] Fix code formatting

Change-Id: Ib681cc7ea82d820655a856e0a8e391e3397844ea
Releases: 6.0
Reviewed-on: http://review.typo3.org/15957
Reviewed-by: Oliver Hader
Tested-by: Oliver Hader
parent 7c9386e1
......@@ -1049,10 +1049,23 @@ class PageLayoutController {
*/
public function exec_languageQuery($id) {
if ($id) {
$exQ = \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('pages_language_overlay') . ($GLOBALS['BE_USER']->isAdmin() ? '' : ' AND sys_language.hidden=0');
return $GLOBALS['TYPO3_DB']->exec_SELECTquery('sys_language.*', 'pages_language_overlay,sys_language', 'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . intval($id) . $exQ, 'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag', 'sys_language.title');
$exQ = \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause('pages_language_overlay') .
($GLOBALS['BE_USER']->isAdmin() ? '' : ' AND sys_language.hidden=0');
return $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'sys_language.*',
'pages_language_overlay,sys_language',
'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . intval($id) . $exQ,
'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag',
'sys_language.title'
);
} else {
return $GLOBALS['TYPO3_DB']->exec_SELECTquery('sys_language.*', 'sys_language', 'sys_language.hidden=0', '', 'sys_language.title');
return $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'sys_language.*',
'sys_language',
'sys_language.hidden=0',
'',
'sys_language.title'
);
}
}
......
......@@ -155,7 +155,17 @@ class BackendUtility {
*/
static public function getRecordsByField($theTable, $theField, $theValue, $whereClause = '', $groupBy = '', $orderBy = '', $limit = '', $useDeleteClause = TRUE) {
if (is_array($GLOBALS['TCA'][$theTable])) {
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $theTable, $theField . '=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($theValue, $theTable) . ($useDeleteClause ? self::deleteClause($theTable) . ' ' : '') . self::versioningPlaceholderClause($theTable) . ' ' . $whereClause, $groupBy, $orderBy, $limit);
$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
'*',
$theTable,
$theField . '=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($theValue, $theTable) .
($useDeleteClause ? self::deleteClause($theTable) . ' ' : '') .
self::versioningPlaceholderClause($theTable) . ' ' .
$whereClause,
$groupBy,
$orderBy,
$limit
);
$rows = array();
while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
$rows[] = $row;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment