Task #54517 » Array_Access___strpos.patch
typo3_src/typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php (revision ) | ||
---|---|---|
$this->getFileName_backPath = PATH_site;
|
||
foreach ($setupArray as $key => $val) {
|
||
// We don't want 'TSConstantEditor' in the flattend setup.
|
||
if ($prefix || substr($key, 0, 16) != 'TSConstantEditor') {
|
||
if ($prefix || strpos($key, 'TSConstantEditor') !== 0) {
|
||
if (is_array($val)) {
|
||
$this->flattenSetup($val, $prefix . $key, $key == 'file.');
|
||
} elseif ($resourceFlag && $this->resourceCheck) {
|
||
... | ... | |
$a++;
|
||
$depth = $depth_in . $key;
|
||
// This excludes all constants starting with '_' from being shown.
|
||
if ($this->bType != 'const' || substr($depth, 0, 1) != '_') {
|
||
if ($this->bType != 'const' || $depth{0} != '_') {
|
||
$goto = substr(md5($depth), 0, 6);
|
||
$deeper = is_array($arr[$key . '.']) && ($this->tsbrowser_depthKeys[$depth] || $this->ext_expandAllNotes) ? 1 : 0;
|
||
$PM = 'join';
|
||
... | ... | |
$HTML .= $depthData;
|
||
$alttext = '[' . $row['templateID'] . ']';
|
||
$alttext .= $row['pid'] ? ' - ' . BackendUtility::getRecordPath($row['pid'], $GLOBALS['SOBE']->perms_clause, 20) : '';
|
||
$icon = substr($row['templateID'], 0, 3) == 'sys' ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('sys_template', $row, array('title' => $alttext)) : \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('mimetypes-x-content-template-static', array('title' => $alttext));
|
||
$icon = strpos($row['templateID'], 'sys') === 0 ? \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord('sys_template', $row, array('title' => $alttext)) : \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('mimetypes-x-content-template-static', array('title' => $alttext));
|
||
if (in_array($row['templateID'], $this->clearList_const) || in_array($row['templateID'], $this->clearList_setup)) {
|
||
$urlParameters = array(
|
||
'id' => $GLOBALS['SOBE']->id,
|
||
... | ... | |
public function ext_fixed_lgd($string, $chars) {
|
||
if ($chars >= 4) {
|
||
if (strlen($string) > $chars) {
|
||
if (strlen($string) > 24 && substr($string, 0, 12) == '##' . $this->Cmarker . '_B##') {
|
||
if (strlen($string) > 24 && strpos($string, '##') === 0 . $this->Cmarker . '_B##') {
|
||
return '##' . $this->Cmarker . '_B##' . GeneralUtility::fixed_lgd_cs(substr($string, 12, -12), ($chars - 3)) . '##' . $this->Cmarker . '_E##';
|
||
} else {
|
||
return GeneralUtility::fixed_lgd_cs($string, $chars - 3);
|
||
... | ... | |
$retArr['paramstr'] = $p;
|
||
switch ($retArr['type']) {
|
||
case 'int':
|
||
if (substr($retArr['paramstr'], 0, 1) == '-') {
|
||
if ($retArr['paramstr']{0} == '-') {
|
||
$retArr['params'] = GeneralUtility::intExplode('-', substr($retArr['paramstr'], 1));
|
||
$retArr['params'][0] = intval('-' . $retArr['params'][0]);
|
||
} else {
|
||
... | ... | |
* @todo Define visibility
|
||
*/
|
||
public function ext_getTSCE_config_image($imgConf) {
|
||
if (substr($imgConf, 0, 4) == 'gfx/') {
|
||
if (strpos($imgConf, 'gfx/') === 0) {
|
||
$iFile = $this->ext_localGfxPrefix . $imgConf;
|
||
$tFile = $this->ext_localWebGfxPrefix . $imgConf;
|
||
} elseif (substr($imgConf, 0, 4) == 'EXT:') {
|
||
} elseif (strpos($imgConf, 'EXT:') === 0) {
|
||
$iFile = GeneralUtility::getFileAbsFileName($imgConf);
|
||
if ($iFile) {
|
||
$f = \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($iFile);
|
||
... | ... | |
$checkboxName = 'check[' . $params['name'] . ']';
|
||
$checkboxID = $checkboxName;
|
||
// Handle type=color specially
|
||
if ($typeDat['type'] == 'color' && substr($params['value'], 0, 2) != '{$') {
|
||
if ($typeDat['type'] == 'color' && strpos($params['value'], '{$') !== 0) {
|
||
$color = '<div id="colorbox-' . $fN . '" class="typo3-tstemplate-ceditor-colorblock" style="background-color:' . $params['value'] . ';"> </div>';
|
||
} else {
|
||
$color = '';
|
||
... | ... | |
}
|
||
$this->rawP++;
|
||
if ($line) {
|
||
if (substr($line, 0, 1) == '[') {
|
||
if ($line{0} == '[') {
|
||
} elseif (strcspn($line, '}#/') != 0) {
|
||
$varL = strcspn($line, ' {=<');
|
||
$var = substr($line, 0, $varL);
|
||
$line = ltrim(substr($line, $varL));
|
||
switch (substr($line, 0, 1)) {
|
||
switch ($line{0}) {
|
||
case '=':
|
||
$this->objReg[$pre . $var] = $this->rawP - 1;
|
||
break;
|
||
... | ... | |
break;
|
||
}
|
||
$this->lastComment = '';
|
||
} elseif (substr($line, 0, 1) == '}') {
|
||
} elseif ($line{0} == '}') {
|
||
$this->lastComment = '';
|
||
$this->ext_inBrace--;
|
||
if ($this->ext_inBrace < 0) {
|
||
... | ... | |
if ($var && !GeneralUtility::inList($this->HTMLcolorList, strtolower($var))) {
|
||
$var = preg_replace('/[^A-Fa-f0-9]*/', '', $var);
|
||
$useFulHex = strlen($var) > 3;
|
||
$col[] = HexDec(substr($var, 0, 1));
|
||
$col[] = HexDec(substr($var, 1, 1));
|
||
$col[] = HexDec(substr($var, 2, 1));
|
||
$col[] = HexDec($var{0});
|
||
$col[] = HexDec($var{1});
|
||
$col[] = HexDec($var{2});
|
||
if ($useFulHex) {
|
||
$col[] = HexDec(substr($var, 3, 1));
|
||
$col[] = HexDec(substr($var, 4, 1));
|
||
$col[] = HexDec(substr($var, 5, 1));
|
||
$col[] = HexDec($var{3});
|
||
$col[] = HexDec($var{4});
|
||
$col[] = HexDec($var{5});
|
||
}
|
||
$var = substr(('0' . DecHex($col[0])), -1) . substr(('0' . DecHex($col[1])), -1) . substr(('0' . DecHex($col[2])), -1);
|
||
if ($useFulHex) {
|
typo3_src/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php (revision ) | ||
---|---|---|
*/
|
||
private function isNameOfInjectMethod($methodName) {
|
||
if (
|
||
substr($methodName, 0, 6) === 'inject'
|
||
strpos($methodName, 'inject') === 0
|
||
&& $methodName[6] === strtoupper($methodName[6])
|
||
&& $methodName !== 'injectSettings'
|
||
) {
|
typo3_src/typo3/sysext/core/Classes/Utility/ClassNamingUtility.php (revision ) | ||
---|---|---|
$matches = array();
|
||
if (strpos($controllerObjectName, '\\') !== FALSE) {
|
||
if (substr($controllerObjectName, 0, 9) === 'TYPO3\\CMS') {
|
||
if (strpos($controllerObjectName, 'TYPO3\\CMS') === 0) {
|
||
$extensionName = '^(?P<vendorName>[^\\\\]+\\\[^\\\\]+)\\\(?P<extensionName>[^\\\\]+)';
|
||
} else {
|
||
$extensionName = '^(?P<vendorName>[^\\\\]+)\\\\(?P<extensionName>[^\\\\]+)';
|
typo3_src/typo3/sysext/core/Classes/Package/PackageFactory.php (revision ) | ||
---|---|---|
if (!is_object($manifest)) {
|
||
throw new \TYPO3\Flow\Package\Exception\InvalidPackageManifestException('Invalid composer manifest.', 1348146450);
|
||
}
|
||
if (isset($manifest->type) && substr($manifest->type, 0, 10) === 'typo3-cms-') {
|
||
if (isset($manifest->type) && strpos($manifest->type, 'typo3-cms-') === 0) {
|
||
$relativePackagePath = substr($packagePath, strlen($packagesBasePath));
|
||
$packageKey = substr($relativePackagePath, strpos($relativePackagePath, '/') + 1, -1);
|
||
/**
|
typo3_src/typo3/sysext/core/Classes/Core/SystemEnvironmentBuilder.php (revision ) | ||
---|---|---|
$isRelativePath = TRUE;
|
||
}
|
||
} else {
|
||
if (substr($scriptPath, 0, 1) !== '/') {
|
||
if ($scriptPath{0} !== '/') {
|
||
$isRelativePath = TRUE;
|
||
}
|
||
}
|
||
... | ... | |
* @return string Absolute path to document root of installation
|
||
*/
|
||
static protected function getPathSiteByTypo3ModulePath() {
|
||
if (substr(TYPO3_MOD_PATH, 0, 7) === 'sysext/' || substr(TYPO3_MOD_PATH, 0, 4) === 'ext/' || substr(TYPO3_MOD_PATH, 0, 8) === 'install/') {
|
||
if (strpos(TYPO3_MOD_PATH, 'sysext/') === 0 || strpos(TYPO3_MOD_PATH, 'ext/') === 0 || strpos(TYPO3_MOD_PATH, 'install/') === 0) {
|
||
$pathPartRelativeToDocumentRoot = TYPO3_mainDir . TYPO3_MOD_PATH;
|
||
} elseif (substr(TYPO3_MOD_PATH, 0, strlen('../typo3conf/')) === '../typo3conf/') {
|
||
$pathPartRelativeToDocumentRoot = substr(TYPO3_MOD_PATH, 3);
|
typo3_src/typo3/sysext/backend/Classes/Controller/Wizard/TableController.php (revision ) | ||
---|---|---|
$cmd = 'row_down';
|
||
}
|
||
if ($cmd && MathUtility::canBeInterpretedAsInteger($kk)) {
|
||
if (substr($cmd, 0, 4) == 'row_') {
|
||
if (strpos($cmd, 'row_') === 0) {
|
||
switch ($cmd) {
|
||
case 'row_remove':
|
||
unset($this->TABLECFG['c'][$kk]);
|
||
... | ... | |
}
|
||
ksort($this->TABLECFG['c']);
|
||
}
|
||
if (substr($cmd, 0, 4) == 'col_') {
|
||
if (strpos($cmd, 'col_') === 0) {
|
||
foreach ($this->TABLECFG['c'] as $cAK => $value) {
|
||
switch ($cmd) {
|
||
case 'col_remove':
|
||
... | ... | |
$vParts = explode($this->tableParsing_delimiter, $v);
|
||
// Traverse columns:
|
||
for ($a = 0; $a < $cols; $a++) {
|
||
if ($this->tableParsing_quote && substr($vParts[$a], 0, 1) == $this->tableParsing_quote && substr($vParts[$a], -1, 1) == $this->tableParsing_quote) {
|
||
if ($this->tableParsing_quote && $vParts[$a]{0} == $this->tableParsing_quote && substr($vParts[$a], -1, 1) == $this->tableParsing_quote) {
|
||
$vParts[$a] = substr(trim($vParts[$a]), 1, -1);
|
||
}
|
||
$cfgArr[$k][$a] = $vParts[$a];
|
typo3_src/typo3/sysext/core/Classes/Database/QueryView.php (revision ) | ||
---|---|---|
}
|
||
if ($fieldSetup['type'] == 'multiple') {
|
||
foreach ($fieldSetup['items'] as $key => $val) {
|
||
if (substr($val[0], 0, 4) == 'LLL:') {
|
||
if (strpos($val[0], 'LLL:') === 0) {
|
||
$value = $GLOBALS['LANG']->sL($val[0]);
|
||
} else {
|
||
$value = $val[0];
|
||
... | ... | |
}
|
||
if ($fieldSetup['type'] == 'binary') {
|
||
foreach ($fieldSetup['items'] as $Key => $val) {
|
||
if (substr($val[0], 0, 4) == 'LLL:') {
|
||
if (strpos($val[0], 'LLL:') === 0) {
|
||
$value = $GLOBALS['LANG']->sL($val[0]);
|
||
} else {
|
||
$value = $val[0];
|
||
... | ... | |
if ($fieldSetup['type'] == 'relation') {
|
||
if ($fieldSetup['items']) {
|
||
foreach ($fieldSetup['items'] as $key => $val) {
|
||
if (substr($val[0], 0, 4) == 'LLL:') {
|
||
if (strpos($val[0], 'LLL:') === 0) {
|
||
$value = $GLOBALS['LANG']->sL($val[0]);
|
||
} else {
|
||
$value = $val[0];
|
||
... | ... | |
$altLabelField = $GLOBALS['TCA'][$from_table]['ctrl']['label_alt'];
|
||
if ($GLOBALS['TCA'][$from_table]['columns'][$labelField]['config']['items']) {
|
||
foreach ($GLOBALS['TCA'][$from_table]['columns'][$labelField]['config']['items'] as $labelArray) {
|
||
if (substr($labelArray[0], 0, 4) == 'LLL:') {
|
||
if (strpos($labelArray[0], 'LLL:') === 0) {
|
||
$labelFieldSelect[$labelArray[1]] = $GLOBALS['LANG']->sL($labelArray[0]);
|
||
} else {
|
||
$labelFieldSelect[$labelArray[1]] = $labelArray[0];
|
||
... | ... | |
}
|
||
if ($GLOBALS['TCA'][$from_table]['columns'][$altLabelField]['config']['items']) {
|
||
foreach ($GLOBALS['TCA'][$from_table]['columns'][$altLabelField]['config']['items'] as $altLabelArray) {
|
||
if (substr($altLabelArray[0], 0, 4) == 'LLL:') {
|
||
if (strpos($altLabelArray[0], 'LLL:') === 0) {
|
||
$altLabelFieldSelect[$altLabelArray[1]] = $GLOBALS['LANG']->sL($altLabelArray[0]);
|
||
} else {
|
||
$altLabelFieldSelect[$altLabelArray[1]] = $altLabelArray[0];
|
typo3_src/typo3/sysext/backend/Classes/Utility/IconUtility.php (revision ) | ||
---|---|---|
$iconfile = 'gfx/i/' . $iconfile;
|
||
}
|
||
// Setting the absolute path where the icon should be found as a file:
|
||
if (substr($iconfile, 0, 3) == '../') {
|
||
if (strpos($iconfile, '../') === 0) {
|
||
$absfile = PATH_site . substr($iconfile, 3);
|
||
} else {
|
||
$absfile = PATH_typo3 . $iconfile;
|
typo3_src/typo3/sysext/core/Resources/PHP/TYPO3.Flow/Classes/TYPO3/Flow/Package/Package.php (revision ) | ||
---|---|---|
if (substr($packagePath, -1, 1) !== '/') {
|
||
throw new \TYPO3\Flow\Package\Exception\InvalidPackagePathException(sprintf('The package path "%s" provided for package "%s" has no trailing forward slash.', $packagePath, $packageKey), 1166633720);
|
||
}
|
||
if (substr($classesPath, 1, 1) === '/') {
|
||
if ($classesPath{1} === '/') {
|
||
throw new \TYPO3\Flow\Package\Exception\InvalidPackagePathException(sprintf('The package classes path provided for package "%s" has a leading forward slash.', $packageKey), 1334841320);
|
||
}
|
||
if (!file_exists($packagePath . $manifestPath . 'composer.json')) {
|
typo3_src/typo3/sysext/cshmanual/Classes/Controller/HelpModuleController.php (revision ) | ||
---|---|---|
$iP = explode(':', $val);
|
||
$iPUrl = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('|', $val);
|
||
// URL reference:
|
||
if (substr($iPUrl[1], 0, 4) == 'http') {
|
||
if (strpos($iPUrl[1], 'http') === 0) {
|
||
$lines[] = '<a href="' . htmlspecialchars($iPUrl[1]) . '" target="_blank"><em>' . htmlspecialchars($iPUrl[0]) . '</em></a>';
|
||
} elseif (substr($iPUrl[1], 0, 5) == 'FILE:') {
|
||
} elseif (strpos($iPUrl[1], 'FILE:') === 0) {
|
||
$fileName = \TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName(substr($iPUrl[1], 5), 1, 1);
|
||
if ($fileName && @is_file($fileName)) {
|
||
$fileName = '../' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($fileName);
|
typo3_src/typo3/sysext/install/Classes/SystemEnvironment/Check.php (revision ) | ||
---|---|---|
protected function checkWindowsApacheThreadStackSize() {
|
||
if (
|
||
$this->isWindowsOs()
|
||
&& substr($_SERVER['SERVER_SOFTWARE'], 0, 6) === 'Apache'
|
||
&& strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') === 0
|
||
) {
|
||
$status = new Status\WarningStatus();
|
||
$status->setTitle('Windows apache thread stack size');
|
typo3_src/typo3/sysext/core/Classes/Html/HtmlParser.php (revision ) | ||
---|---|---|
$matches = array();
|
||
if (preg_match_all('/("[^"]*"|\'[^\']*\'|[^\\s"\'\\=]+|\\=)/s', $tag_tmp, $matches) > 0) {
|
||
foreach ($matches[1] as $part) {
|
||
$firstChar = substr($part, 0, 1);
|
||
$firstChar = $part{0};
|
||
if ($firstChar == '"' || $firstChar == '\'') {
|
||
$metaValue[] = $firstChar;
|
||
$value[] = substr($part, 1, -1);
|
||
... | ... | |
$tok = substr($tok, $eocPos + 3);
|
||
$inComment = FALSE;
|
||
$skipTag = TRUE;
|
||
} elseif (substr($tok, 0, 3) == '!--') {
|
||
} elseif (strpos($tok, '!--') === 0) {
|
||
if (($eocPos = strpos($tok, '-->')) === FALSE) {
|
||
// Comment started in this token but it does end in the same token. Set a flag to skip till the end of comment
|
||
$newContent[$c++] = '<' . $tok;
|
||
... | ... | |
$tok = substr($tok, $eocPos + 3);
|
||
$skipTag = TRUE;
|
||
}
|
||
$firstChar = substr($tok, 0, 1);
|
||
$firstChar = $tok{0};
|
||
// It is a tag... (first char is a-z0-9 or /) (fixed 19/01 2004). This also avoids triggering on <?xml..> and <!DOCTYPE..>
|
||
if (!$skipTag && preg_match('/[[:alnum:]\\/]/', $firstChar) == 1) {
|
||
$tagEnd = strpos($tok, '>');
|
||
... | ... | |
unset($tagAttrib[0][$attr]);
|
||
}
|
||
if ($params['prefixLocalAnchors']) {
|
||
if (substr($tagAttrib[0][$attr], 0, 1) == '#') {
|
||
if ($tagAttrib[0][$attr]{0} == '#') {
|
||
$prefix = GeneralUtility::getIndpEnv('TYPO3_REQUEST_URL');
|
||
$tagAttrib[0][$attr] = $prefix . $tagAttrib[0][$attr];
|
||
if ($params['prefixLocalAnchors'] == 2 && GeneralUtility::isFirstPartOfStr($prefix, GeneralUtility::getIndpEnv('TYPO3_SITE_URL'))) {
|
||
... | ... | |
}
|
||
if ($params['prefixRelPathWith']) {
|
||
$urlParts = parse_url($tagAttrib[0][$attr]);
|
||
if (!$urlParts['scheme'] && substr($urlParts['path'], 0, 1) != '/') {
|
||
if (!$urlParts['scheme'] && $urlParts['path']{0} != '/') {
|
||
// If it is NOT an absolute URL (by http: or starting "/")
|
||
$tagAttrib[0][$attr] = $params['prefixRelPathWith'] . $tagAttrib[0][$attr];
|
||
}
|
||
... | ... | |
public function prefixRelPath($prefix, $srcVal, $suffix = '') {
|
||
// Only prefix if it's not an absolute URL or
|
||
// only a link to a section within the page.
|
||
if (substr($srcVal, 0, 1) != '/' && substr($srcVal, 0, 1) != '#') {
|
||
if ($srcVal{0} != '/' && $srcVal{0} != '#') {
|
||
$urlParts = parse_url($srcVal);
|
||
// Only prefix URLs without a scheme
|
||
if (!$urlParts['scheme']) {
|
||
... | ... | |
next($contentParts);
|
||
// bypass the first
|
||
while (list($k, $tok) = each($contentParts)) {
|
||
$firstChar = substr($tok, 0, 1);
|
||
$firstChar = $tok{0};
|
||
if (trim($firstChar) !== '') {
|
||
$subparts = explode('>', $tok, 2);
|
||
$tagEnd = strlen($subparts[0]);
|
||
... | ... | |
// Endtags are just set lowercase right away
|
||
if ($endTag) {
|
||
$value = strtolower($value);
|
||
} elseif (substr($value, 0, 4) != '<!--') {
|
||
} elseif (strpos($value, '<!--') !== 0) {
|
||
// ... and comments are ignored.
|
||
// Finding inner value with out < >
|
||
$inValue = substr($value, 1, substr($value, -2) == '/>' ? -2 : -1);
|
typo3_src/typo3/sysext/backend/Classes/Controller/ShortcutFrameController.php (revision ) | ||
---|---|---|
* @todo Define visibility
|
||
*/
|
||
public function itemLabel($inlabel, $modName, $M_modName = '') {
|
||
if (substr($modName, 0, 5) == 'xMOD_') {
|
||
if (strpos($modName, 'xMOD_') === 0) {
|
||
$label = substr($modName, 5);
|
||
} else {
|
||
$split = explode('_', $modName);
|
typo3_src/typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php (revision ) | ||
---|---|---|
list($tagName) = explode(' ', $subparts[0], 2);
|
||
// adds/overrides attributes
|
||
foreach ($conf as $pkey => $val) {
|
||
if (substr($pkey, -1) != '.' && substr($pkey, 0, 1) != '_') {
|
||
if (substr($pkey, -1) != '.' && $pkey{0} != '_') {
|
||
$tmpVal = isset($conf[$pkey . '.']) ? $this->stdWrap($conf[$pkey], $conf[$pkey . '.']) : (string)$val;
|
||
if ($lowerCaseAttributes) {
|
||
$pkey = strtolower($pkey);
|
||
... | ... | |
$data = substr($theValue, $pointer, $len);
|
||
$tag = explode(' ', trim(substr($data, 1, -1)), 2);
|
||
$tag[0] = strtolower($tag[0]);
|
||
if (substr($tag[0], 0, 1) == '/') {
|
||
if ($tag[0]{0} == '/') {
|
||
$tag[0] = substr($tag[0], 1);
|
||
$tag['out'] = 1;
|
||
}
|
||
... | ... | |
$l = trim($l);
|
||
$attrib = array();
|
||
$nWrapped = 0;
|
||
if (substr($l, 0, 1) == '<' && substr($l, -1) == '>') {
|
||
if ($l{0} == '<' && substr($l, -1) == '>') {
|
||
$fwParts = explode('>', substr($l, 1), 2);
|
||
list($tagName, $tagParams) = explode(' ', $fwParts[0], 2);
|
||
if (!$fwParts[1]) {
|
||
... | ... | |
// Query Params:
|
||
$addQueryParams = $conf['addQueryString'] ? $this->getQueryArguments($conf['addQueryString.']) : '';
|
||
$addQueryParams .= isset($conf['additionalParams.']) ? trim($this->stdWrap($conf['additionalParams'], $conf['additionalParams.'])) : trim($conf['additionalParams']);
|
||
if ($addQueryParams == '&' || substr($addQueryParams, 0, 1) != '&') {
|
||
if ($addQueryParams == '&' || $addQueryParams{0} != '&') {
|
||
$addQueryParams = '';
|
||
}
|
||
if ($conf['useCacheHash']) {
|
||
... | ... | |
$lines = GeneralUtility::trimExplode(LF, $params, TRUE);
|
||
foreach ($lines as $val) {
|
||
$pair = explode('=', $val, 2);
|
||
if (!GeneralUtility::inList('#,/', substr(trim($pair[0]), 0, 1))) {
|
||
$paramArr[trim($pair[0])] = trim($pair[1]);
|
||
$pair[0] = trim($pair[0]);
|
||
if (!GeneralUtility::inList('#,/', $pair[0]{0})) {
|
||
$paramArr[$pair[0]] = trim($pair[1]);
|
||
}
|
||
}
|
||
return $paramArr;
|
||
... | ... | |
* @todo Define visibility
|
||
*/
|
||
public function mergeTSRef($confArr, $prop) {
|
||
if (substr($confArr[$prop], 0, 1) == '<') {
|
||
if ($confArr[$prop]{0} == '<') {
|
||
$key = trim(substr($confArr[$prop], 1));
|
||
$cF = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\TypoScript\\Parser\\TypoScriptParser');
|
||
// $name and $conf is loaded with the referenced values.
|
||
... | ... | |
$pid_uid_flag++;
|
||
}
|
||
// Static_* tables are allowed to be fetched from root page
|
||
if (substr($table, 0, 7) == 'static_') {
|
||
if (strpos($table, 'static_') === 0) {
|
||
$pid_uid_flag++;
|
||
}
|
||
if (trim($conf['pidInList'])) {
|
typo3_src/typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php (revision ) | ||
---|---|---|
public function _getProperties() {
|
||
$properties = get_object_vars($this);
|
||
foreach ($properties as $propertyName => $propertyValue) {
|
||
if (substr($propertyName, 0, 1) === '_') {
|
||
if ($propertyName{0} === '_') {
|
||
unset($properties[$propertyName]);
|
||
}
|
||
}
|
||
... | ... | |
$this->_cleanProperties = array();
|
||
$properties = get_object_vars($this);
|
||
foreach ($properties as $propertyName => $propertyValue) {
|
||
if (substr($propertyName, 0, 1) === '_') {
|
||
if ($propertyName{0} === '_') {
|
||
continue;
|
||
}
|
||
// Do not memorize "internal" properties
|
typo3_src/typo3/sysext/rsaauth/Classes/Backend/CommandLineBackend.php (revision ) | ||
---|---|---|
// Ok, we got the private key. Get the modulus.
|
||
$command = $this->opensslPath . ' rsa -noout -modulus -in ' . escapeshellarg($privateKeyFile);
|
||
$value = \TYPO3\CMS\Core\Utility\CommandUtility::exec($command);
|
||
if (substr($value, 0, 8) === 'Modulus=') {
|
||
if (strpos($value, 'Modulus=') === 0) {
|
||
$publicKey = substr($value, 8);
|
||
$keyPair->setExponent(self::DEFAULT_EXPONENT);
|
||
... | ... | |
if ($this->opensslPath) {
|
||
// If path exists, test that command runs and can produce output
|
||
$test = \TYPO3\CMS\Core\Utility\CommandUtility::exec($this->opensslPath . ' version');
|
||
$result = substr($test, 0, 8) == 'OpenSSL ';
|
||
$result = strpos($test, 'OpenSSL ') === 0;
|
||
}
|
||
return $result;
|
||
}
|
typo3_src/typo3/sysext/rtehtmlarea/Classes/RteHtmlAreaBase.php (revision ) | ||
---|---|---|
public function getPageConfigLabel($string, $JScharCode = 1) {
|
||
global $LANG, $TSFE, $TYPO3_CONF_VARS;
|
||
if ($this->is_FE()) {
|
||
if (substr($string, 0, 4) !== 'LLL:') {
|
||
if (strpos($string, 'LLL:') !== 0) {
|
||
// A pure string coming from Page TSConfig must be in utf-8
|
||
$label = $TSFE->csConvObj->conv($TSFE->sL(trim($string)), 'utf-8', $this->OutputCharset);
|
||
} else {
|
||
... | ... | |
$label = str_replace('"', '\\"', str_replace('\\\'', '\'', $label));
|
||
$label = $JScharCode ? $this->feJScharCode($label) : $label;
|
||
} else {
|
||
if (substr($string, 0, 4) !== 'LLL:') {
|
||
if (strpos($string, 'LLL:') !== 0) {
|
||
$label = $string;
|
||
} else {
|
||
$label = $LANG->sL(trim($string));
|
||
... | ... | |
}
|
||
public function getFullFileName($filename) {
|
||
if (substr($filename, 0, 4) == 'EXT:') {
|
||
if (strpos($filename, 'EXT:') === 0) {
|
||
// extension
|
||
list($extKey, $local) = explode('/', substr($filename, 4), 2);
|
||
$newFilename = '';
|
||
if ((string)$extKey !== '' && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey) && (string)$local !== '') {
|
||
$newFilename = ($this->is_FE() || $this->isFrontendEditActive() ? \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey) : $this->backPath . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extRelPath($extKey)) . $local;
|
||
}
|
||
} elseif (substr($filename, 0, 1) != '/') {
|
||
} elseif ($filename{0} != '/') {
|
||
$newFilename = ($this->is_FE() || $this->isFrontendEditActive() ? '' : $this->backPath . '../') . $filename;
|
||
} else {
|
||
$newFilename = ($this->is_FE() || $this->isFrontendEditActive() ? '' : $this->backPath . '../') . substr($filename, 1);
|
typo3_src/typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php (revision ) | ||
---|---|---|
if (!($this->searchRootPageIdList < 0)) {
|
||
$whereClause = ' AND ISEC.rl0 IN (' . $this->searchRootPageIdList . ') ';
|
||
}
|
||
if (substr($this->sections, 0, 4) == 'rl1_') {
|
||
if (strpos($this->sections, 'rl1_') === 0) {
|
||
$list = implode(',', \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', substr($this->sections, 4)));
|
||
$whereClause .= ' AND ISEC.rl1 IN (' . $list . ')';
|
||
$match = TRUE;
|
||
} elseif (substr($this->sections, 0, 4) == 'rl2_') {
|
||
} elseif (strpos($this->sections, 'rl2_') === 0) {
|
||
$list = implode(',', \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', substr($this->sections, 4)));
|
||
$whereClause .= ' AND ISEC.rl2 IN (' . $list . ')';
|
||
$match = TRUE;
|
||
... | ... | |
// If any of the ranking sortings are selected, we must make a
|
||
// join with the word/rel-table again, because we need to
|
||
// calculate ranking based on all search-words found.
|
||
if (substr($this->sortOrder, 0, 5) == 'rank_') {
|
||
if (strpos($this->sortOrder, 'rank_') === 0) {
|
||
switch ($this->sortOrder) {
|
||
case 'rank_flag':
|
||
// This gives priority to word-position (max-value) so that words in title, keywords, description counts more than in content.
|
typo3_src/typo3/sysext/setup/Classes/Controller/SetupModuleController.php (revision ) | ||
---|---|---|
$tabLabel = '';
|
||
foreach ($fieldArray as $fieldName) {
|
||
$more = '';
|
||
if (substr($fieldName, 0, 8) == '--div--;') {
|
||
if (strpos($fieldName, '--div--;') === 0) {
|
||
if ($firstTabLabel == '') {
|
||
// First tab
|
||
$tabLabel = $this->getLabel(substr($fieldName, 8), '', FALSE);
|
||
... | ... | |
* @return string HTML output.
|
||
*/
|
||
protected function getLabel($str, $key = '', $addLabelTag = TRUE, $altLabelTagId = '') {
|
||
if (substr($str, 0, 4) == 'LLL:') {
|
||
if (strpos($str, 'LLL:') === 0) {
|
||
$out = $GLOBALS['LANG']->sL($str);
|
||
} else {
|
||
$out = htmlspecialchars($str);
|
typo3_src/typo3/sysext/belog/Classes/Domain/Repository/LogEntryRepository.php (revision ) | ||
---|---|---|
return;
|
||
}
|
||
// Constraint for a group
|
||
if (substr($userOrGroup, 0, 3) === 'gr-') {
|
||
if (strpos($userOrGroup, 'gr-') === 0) {
|
||
$groupId = intval(substr($userOrGroup, 3));
|
||
$userIds = array();
|
||
foreach ($this->beUserList as $userId => $userData) {
|
||
... | ... | |
// If there are no group members -> use -1 as constraint to not find anything
|
||
$queryConstraints[] = $query->in('userid', array(-1));
|
||
}
|
||
} elseif (substr($userOrGroup, 0, 3) === 'us-') {
|
||
} elseif (strpos($userOrGroup, 'us-') === 0) {
|
||
$queryConstraints[] = $query->equals('userid', intval(substr($userOrGroup, 3)));
|
||
} elseif ($userOrGroup === '-1') {
|
||
$queryConstraints[] = $query->equals('userid', intval($GLOBALS['BE_USER']->user['uid']));
|
typo3_src/typo3/sysext/install/Classes/Service/ClearCacheService.php (revision ) | ||
---|---|---|
$tables = $database->admin_get_tables();
|
||
foreach ($tables as $table) {
|
||
$tableName = $table['Name'];
|
||
if (substr($tableName, 0, 3) === 'cf_') {
|
||
if (strpos($tableName, 'cf_') === 0) {
|
||
$database->exec_TRUNCATEquery($tableName);
|
||
}
|
||
}
|
typo3_src/typo3/sysext/core/Classes/Resource/ResourceCompressor.php (revision ) | ||
---|---|---|
// build the file path relatively to the PATH_site
|
||
$backPath = str_replace(TYPO3_mainDir, '', $this->backPath);
|
||
$file = str_replace($backPath, '', $filename);
|
||
if (substr($file, 0, 3) === '../') {
|
||
if (strpos($file, '../') === 0) {
|
||
$file = GeneralUtility::resolveBackPath(PATH_typo3 . $file);
|
||
} else {
|
||
$file = PATH_site . $file;
|
typo3_src/typo3/sysext/rsaauth/Classes/Hook/UserSetupHook.php (revision ) | ||
---|---|---|
public function decryptPassword(array $parameters) {
|
||
if ($this->isRsaAvailable()) {
|
||
$be_user_data = &$parameters['be_user_data'];
|
||
if (substr($be_user_data['password'], 0, 4) === 'rsa:' && substr($be_user_data['password2'], 0, 4) === 'rsa:') {
|
||
if (strpos($be_user_data['password'], 'rsa:') === 0 && strpos($be_user_data['password2'], 'rsa:') === 0) {
|
||
$backend = \TYPO3\CMS\Rsaauth\Backend\BackendFactory::getBackend();
|
||
/** @var $storage \TYPO3\CMS\Rsaauth\Storage\AbstractStorage */
|
||
$storage = \TYPO3\CMS\Rsaauth\Storage\StorageFactory::getStorage();
|
typo3_src/typo3/sysext/core/Classes/Cache/Backend/PdoBackend.php (revision ) | ||
---|---|---|
$this->databaseHandle = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('PDO', $this->dataSourceName, $this->username, $this->password);
|
||
}
|
||
$this->databaseHandle->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
|
||
if (substr($this->pdoDriver, 0, 5) === 'mysql') {
|
||
if (strpos($this->pdoDriver, 'mysql') === 0) {
|
||
$this->databaseHandle->exec('SET SESSION sql_mode=\'ANSI\';');
|
||
}
|
||
} catch (\PDOException $e) {
|
typo3_src/typo3/sysext/core/Classes/Mail/Rfc822AddressesParser.php (revision ) | ||
---|---|---|
// If the next char is a comma and this was a group, then
|
||
// there are more addresses, otherwise, if there are any more
|
||
// chars, then there is another address.
|
||
if ($is_group && substr($address, 0, 1) == ',') {
|
||
if ($is_group && $address{0} == ',') {
|
||
$address = trim(substr($address, 1));
|
||
return $address;
|
||
} elseif (strlen($address) > 0) {
|
||
... | ... | |
}
|
||
foreach ($phrase_parts as $part) {
|
||
// If quoted string:
|
||
if (substr($part, 0, 1) == '"') {
|
||
if ($part{0} == '"') {
|
||
if (!$this->_validateQuotedString($part)) {
|
||
return FALSE;
|
||
}
|
||
... | ... | |
}
|
||
$mailbox = trim($mailbox);
|
||
// Check for name + route-addr
|
||
if (substr($mailbox, -1) == '>' && substr($mailbox, 0, 1) != '<') {
|
||
if (substr($mailbox, -1) == '>' && $mailbox{0} != '<') {
|
||
$parts = explode('<', $mailbox);
|
||
$name = $this->_splitCheck($parts, '<');
|
||
$phrase = trim($name);
|
||
... | ... | |
}
|
||
} else {
|
||
// First snip angle brackets if present.
|
||
if (substr($mailbox, 0, 1) == '<' && substr($mailbox, -1) == '>') {
|
||
if ($mailbox{0} == '<' && substr($mailbox, -1) == '>') {
|
||
$addr_spec = substr($mailbox, 1, -1);
|
||
} else {
|
||
$addr_spec = $mailbox;
|
typo3_src/typo3/sysext/install/Classes/FolderStructure/RootNode.php (revision ) | ||
---|---|---|
if (!isset($structure['name'])
|
||
|| ($this->isWindowsOs() && substr($structure['name'], 1, 2) !== ':/')
|
||
|| (!$this->isWindowsOs() && substr($structure['name'], 0, 1) !== '/')
|
||
|| (!$this->isWindowsOs() && $structure['name']{0} !== '/')
|
||
) {
|
||
throw new \TYPO3\CMS\Install\FolderStructure\Exception\InvalidArgumentException(
|
||
'Root node expects absolute path as name',
|
typo3_src/typo3/sysext/core/Classes/TypoScript/TemplateService.php (revision ) | ||
---|---|---|
}
|
||
}
|
||
// If "Include before all static templates if root-flag is set" is set:
|
||
if ($row['static_file_mode'] == 3 && substr($templateID, 0, 4) == 'sys_' && $row['root']) {
|
||
if ($row['static_file_mode'] == 3 && strpos($templateID, 'sys_') === 0 && $row['root']) {
|
||
$this->addExtensionStatics($idList, $templateID, $pid, $row);
|
||
}
|
||
// Static Template Files (Text files from extensions): include_static_file is a list of static files to include (from extensions)
|
||
... | ... | |
$include_static_fileArr = GeneralUtility::trimExplode(',', $row['include_static_file'], TRUE);
|
||
// Traversing list
|
||
foreach ($include_static_fileArr as $ISF_file) {
|
||
if (substr($ISF_file, 0, 4) == 'EXT:') {
|
||
if (strpos($ISF_file, 'EXT:') === 0) {
|
||
list($ISF_extKey, $ISF_localPath) = explode('/', substr($ISF_file, 4), 2);
|
||
if ((string)$ISF_extKey !== '' && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($ISF_extKey) && (string)$ISF_localPath !== '') {
|
||
$ISF_localPath = rtrim($ISF_localPath, '/') . '/';
|
||
... | ... | |
}
|
||
// If "Default (include before if root flag is set)" is set OR
|
||
// "Always include before this template record" AND root-flag are set
|
||
if ($row['static_file_mode'] == 1 || $row['static_file_mode'] == 0 && substr($templateID, 0, 4) == 'sys_' && $row['root']) {
|
||
if ($row['static_file_mode'] == 1 || $row['static_file_mode'] == 0 && strpos($templateID, 'sys_') === 0 && $row['root']) {
|
||
$this->addExtensionStatics($idList, $templateID, $pid, $row);
|
||
}
|
||
// Include Static Template Records after all other TypoScript has been included.
|
||
... | ... | |
public function flattenSetup($setupArray, $prefix, $resourceFlag) {
|
||
if (is_array($setupArray)) {
|
||
foreach ($setupArray as $key => $val) {
|
||
if ($prefix || substr($key, 0, 16) != 'TSConstantEditor') {
|
||
if ($prefix || strpos($key, 'TSConstantEditor') !== 0) {
|
||
// We don't want 'TSConstantEditor' in the flattend setup on the first level (190201)
|
||
if (is_array($val)) {
|
||
$this->flattenSetup($val, $prefix . $key, $key == 'file.');
|
||
... | ... | |
if (isset($this->fileCache[$hash])) {
|
||
return $this->fileCache[$hash];
|
||
}
|
||
if (substr($file, 0, 4) === 'EXT:') {
|
||
if (strpos($file, 'EXT:') === 0) {
|
||
$newFile = '';
|
||
list($extKey, $script) = explode('/', substr($file, 4), 2);
|
||
if ($extKey && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey)) {
|
typo3_src/typo3/sysext/fluid/Classes/Compatibility/DocbookGeneratorService.php (revision ) | ||
---|---|---|
continue;
|
||
}
|
||
if (is_file($directory . $file)) {
|
||
if (substr($file, 0, 8) == 'Abstract') {
|
||
if (strpos($file, 'Abstract') === 0) {
|
||
continue;
|
||
}
|
||
$classNames[] = $namespace . substr($file, 0, -4);
|
typo3_src/typo3/sysext/core/Classes/Database/QueryGenerator.php (revision ) | ||
---|---|---|
$c = 0;
|
||
$arrCount = 0;
|
||
foreach ($queryConfig as $key => $conf) {
|
||
if (substr($conf['type'], 0, 6) == 'FIELD_') {
|
||
if (strpos($conf['type'], 'FIELD_') === 0) {
|
||
$fName = substr($conf['type'], 6);
|
||
$fType = $this->fields[$fName]['type'];
|
||
} elseif ($conf['type'] == 'newlevel') {
|
||
... | ... | |
$subscript = $parent . '[' . $key . ']';
|
||
$lineHTML = '';
|
||
$lineHTML .= $this->mkOperatorSelect($this->name . $subscript, $conf['operator'], $c, $conf['type'] != 'FIELD_');
|
||
if (substr($conf['type'], 0, 6) == 'FIELD_') {
|
||
if (strpos($conf['type'], 'FIELD_') === 0) {
|
||
$fName = substr($conf['type'], 6);
|
||
$this->fieldName = $fName;
|
||
$fType = $this->fields[$fName]['type'];
|
||
... | ... | |
}
|
||
if ($fieldSetup['type'] == 'multiple') {
|
||
foreach ($fieldSetup['items'] as $key => $val) {
|
||
if (substr($val[0], 0, 4) == 'LLL:') {
|
||
if (strpos($val[0], 'LLL:') === 0) {
|
||
$value = $GLOBALS['LANG']->sL($val[0]);
|
||
} else {
|
||
$value = $val[0];
|
||
... | ... | |
}
|
||
if ($fieldSetup['type'] == 'binary') {
|
||
foreach ($fieldSetup['items'] as $key => $val) {
|
||
if (substr($val[0], 0, 4) == 'LLL:') {
|
||
if (strpos($val[0], 'LLL:') === 0) {
|
||
$value = $GLOBALS['LANG']->sL($val[0]);
|
||
} else {
|
||
$value = $val[0];
|
||
... | ... | |
if ($fieldSetup['type'] == 'relation') {
|
||
if ($fieldSetup['items']) {
|
||
foreach ($fieldSetup['items'] as $key => $val) {
|
||
if (substr($val[0], 0, 4) == 'LLL:') {
|
||
if (strpos($val[0], 'LLL:') === 0) {
|
||
$value = $GLOBALS['LANG']->sL($val[0]);
|
||
} else {
|
||
$value = $val[0];
|
||
... | ... | |
$altLabelField = $GLOBALS['TCA'][$from_table]['ctrl']['label_alt'];
|
||
if ($GLOBALS['TCA'][$from_table]['columns'][$labelField]['config']['items']) {
|
||
foreach ($GLOBALS['TCA'][$from_table]['columns'][$labelField]['config']['items'] as $labelArray) {
|
||
if (substr($labelArray[0], 0, 4) == 'LLL:') {
|
||
if (strpos($labelArray[0], 'LLL:') === 0) {
|
||
$labelFieldSelect[$labelArray[1]] = $GLOBALS['LANG']->sL($labelArray[0]);
|
||
} else {
|
||
$labelFieldSelect[$labelArray[1]] = $labelArray[0];
|
||
... | ... | |
}
|
||
if ($GLOBALS['TCA'][$from_table]['columns'][$altLabelField]['config']['items']) {
|
||
foreach ($GLOBALS['TCA'][$from_table]['columns'][$altLabelField]['config']['items'] as $altLabelArray) {
|
||
if (substr($altLabelArray[0], 0, 4) == 'LLL:') {
|
||
if (strpos($altLabelArray[0], 'LLL:') === 0) {
|
||
$altLabelFieldSelect[$altLabelArray[1]] = $GLOBALS['LANG']->sL($altLabelArray[0]);
|
||
} else {
|
||
$altLabelFieldSelect[$altLabelArray[1]] = $altLabelArray[0];
|
typo3_src/typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php (revision ) | ||
---|---|---|
// First, check if cliMode is enabled:
|
||
if (TYPO3_REQUESTTYPE & TYPO3_REQUESTTYPE_CLI) {
|
||
if (!$this->user['uid']) {
|
||
if (substr($GLOBALS['MCONF']['name'], 0, 5) == '_CLI_') {
|
||
if (strpos($GLOBALS['MCONF']['name'], '_CLI_') === 0) {
|
||
$userName = strtolower($GLOBALS['MCONF']['name']);
|
||
$this->setBeUserByName($userName);
|
||
if ($this->user['uid']) {
|
typo3_src/typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php (revision ) | ||
---|---|---|
$parsedUrl = @parse_url($url);
|
||
if ($parsedUrl !== FALSE && !isset($parsedUrl['scheme']) && !isset($parsedUrl['host'])) {
|
||
// If the relative URL starts with a slash, we need to check if it's within the current site path
|
||
return !GeneralUtility::isFirstPartOfStr($parsedUrl['path'], '/') || GeneralUtility::isFirstPartOfStr($parsedUrl['path'], GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'));
|
||
return $parsedUrl['path']{0} !== '/' || GeneralUtility::isFirstPartOfStr($parsedUrl['path'], GeneralUtility::getIndpEnv('TYPO3_SITE_PATH'));
|
||
}
|
||
return FALSE;
|
||
}
|
typo3_src/typo3/sysext/backend/Classes/Module/ModuleLoader.php (revision ) | ||
---|---|---|
}
|
||
// Finally, setting the icon with correct path:
|
||
if (substr($defaultLabels['tabs_images']['tab'], 0, 3) == '../') {
|
||
if (strpos($defaultLabels['tabs_images']['tab'], '../') === 0) {
|
||
$defaultLabels['tabs_images']['tab'] = PATH_site . substr($defaultLabels['tabs_images']['tab'], 3);
|
||
} else {
|
||
$defaultLabels['tabs_images']['tab'] = PATH_typo3 . $defaultLabels['tabs_images']['tab'];
|
typo3_src/typo3/sysext/core/Classes/Core/ClassLoader.php (revision ) | ||
---|---|---|
* @return array|null
|
||
*/
|
||
protected function buildClassLoadingInformationForClassFromCorePackage($className) {
|
||
if (substr($className, 0, 14) === 'TYPO3\\CMS\\Core') {
|
||
if (strpos($className, 'TYPO3\\CMS\\Core') === 0) {
|
||
$classesFolder = substr($className, 15, 5) === 'Tests' ? '' : 'Classes/';
|
||
$classFilePath = PATH_typo3 . 'sysext/core/' . $classesFolder . str_replace('\\', '/', substr($className, 15)) . '.php';
|
||
if (@file_exists($classFilePath)) {
|
typo3_src/typo3/sysext/core/Classes/Database/PdoHelper.php (revision ) | ||
---|---|---|
static public function importSql(\PDO $databaseHandle, $pdoDriver, $pathAndFilename) {
|
||
$sql = file($pathAndFilename, FILE_IGNORE_NEW_LINES & FILE_SKIP_EMPTY_LINES);
|
||
// Remove MySQL style key length delimiters (yuck!) if we are not setting up a MySQL db
|
||
if (substr($pdoDriver, 0, 5) !== 'mysql') {
|
||
if (strpos($pdoDriver, 'mysql') !== 0) {
|
||
$sql = preg_replace('/"\\([0-9]+\\)/', '"', $sql);
|
||
}
|
||
$statement = '';
|
typo3_src/typo3/sysext/core/Classes/Utility/DiffUtility.php (revision ) | ||
---|---|---|
$c = intval($lValue);
|
||
$diffResArray[$c]['changeInfo'] = $lValue;
|
||
}
|
||
if (substr($lValue, 0, 1) == '<') {
|
||
if ($lValue{0} == '<') {
|
||
$differenceStr .= ($diffResArray[$c]['old'][] = substr($lValue, 2));
|
||
}
|
||
if (substr($lValue, 0, 1) == '>') {
|
||
if ($lValue{0} == '>') {
|
||
$differenceStr .= ($diffResArray[$c]['new'][] = substr($lValue, 2));
|
||
}
|
||
}
|
typo3_src/typo3/sysext/backend/Classes/Utility/BackendUtility.php (revision ) | ||
---|---|---|
$loopCheck = 100;
|
||
$output = ($fullOutput = '/');
|
||
$clause = trim($clause);
|
||
if ($clause !== '' && substr($clause, 0, 3) !== 'AND') {
|
||
if ($clause !== '' && strpos($clause, 'AND') !== 0) {
|
||
$clause = 'AND ' . $clause;
|
||
}
|
||
$data = self::BEgetRootLine($uid, $clause);
|
||
... | ... | |
$srcPointer = 'default';
|
||
}
|
||
// Get Data Source: Detect if it's a file reference and in that case read the file and parse as XML. Otherwise the value is expected to be XML.
|
||
if (substr($ds_array[$srcPointer], 0, 5) == 'FILE:') {
|
||
if (strpos($ds_array[$srcPointer], 'FILE:') === 0) {
|
||
$file = GeneralUtility::getFileAbsFileName(substr($ds_array[$srcPointer], 5));
|
||
if ($file && @is_file($file)) {
|
||
$dataStructArray = GeneralUtility::xml2array(GeneralUtility::getUrl($file));
|
typo3_src/typo3/sysext/lowlevel/Classes/View/DatabaseIntegrityView.php (revision ) | ||
---|---|---|
}
|
||
$addConditionCheck = GeneralUtility::_GP('qG_ins');
|
||
foreach ($OLD_MOD_SETTINGS as $key => $val) {
|
||
if (substr($key, 0, 5) == 'query' && $this->MOD_SETTINGS[$key] != $val && $key != 'queryLimit' && $key != 'use_listview') {
|
||
if (strpos($key, 'query') === 0 && $this->MOD_SETTINGS[$key] != $val && $key != 'queryLimit' && $key != 'use_listview') {
|
||
$setLimitToStart = 1;
|
||
if ($key == 'queryTable' && !$addConditionCheck) {
|
||
$this->MOD_SETTINGS['queryConfig'] = '';
|
typo3_src/typo3/sysext/viewpage/Classes/Controller/ViewModuleController.php (revision ) | ||
---|---|---|
$data['height'] = $conf['height'];
|
||
}
|
||
if (substr($conf['label'], 0, 4) !== 'LLL:') {
|
||
if (strpos($conf['label'], 'LLL:') !== 0) {
|
||
$label .= $conf['label'];
|
||
} else {
|
||
$label .= $GLOBALS['LANG']->sL(trim($conf['label']));
|
typo3_src/typo3/sysext/backend/Classes/Controller/Wizard/ListController.php (revision ) | ||
---|---|---|
// Get TSconfig for it.
|
||
$TSconfig = BackendUtility::getTCEFORM_TSconfig($this->table, is_array($origRow) ? $origRow : array('pid' => $this->P['pid']));
|
||
// Set [params][pid]
|
||
if (substr($this->P['params']['pid'], 0, 3) == '###' && substr($this->P['params']['pid'], -3) == '###') {
|
||
if (strpos($this->P['params']['pid'], '###') === 0 && substr($this->P['params']['pid'], -3) == '###') {
|
||
$this->pid = intval($TSconfig['_' . substr($this->P['params']['pid'], 3, -3)]);
|
||
} else {
|
||
$this->pid = intval($this->P['params']['pid']);
|
typo3_src/typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php (revision ) | ||
---|---|---|
$result = FALSE;
|
||
$normalizedExpression = $this->normalizeExpression($expression);
|
||
// First and last character must be square brackets (e.g. "[A]&&[B]":
|
||
if (substr($normalizedExpression, 0, 1) === '[' && substr($normalizedExpression, -1) === ']') {
|
||
if ($normalizedExpression{0} === '[' && substr($normalizedExpression, -1) === ']') {
|
||
$innerExpression = substr($normalizedExpression, 1, -1);
|
||
$orParts = explode(']||[', $innerExpression);
|
||
foreach ($orParts as $orPart) {
|
||
... | ... | |
$values = GeneralUtility::trimExplode(',', $value, TRUE);
|
||
foreach ($values as $test) {
|
||
if (strcspn($test, '=<>') == 0) {
|
||
switch (substr($test, 0, 1)) {
|
||
switch ($test{0}) {
|
||
case '=':
|
||
if (doubleval(substr($test, 1)) == $browserInfo['version']) {
|
||
return TRUE;
|
typo3_src/typo3/sysext/indexed_search/Classes/Controller/SearchController.php (revision ) | ||
---|---|---|
}
|
||
}
|
||
// Print a message telling which words in which sections we searched for
|
||
if (substr($this->searchData['sections'], 0, 2) == 'rl') {
|
||
if (strpos($this->searchData['sections'], 'rl') === 0) {
|
||
$result['searchedInSectionInfo'] = \TYPO3\CMS\Extbase\Utility\LocalizationUtility::translate('result.inSection', 'indexed_search') . ' "' . substr($this->getPathFromPageId(substr($this->searchData['sections'], 4)), 1) . '"';
|
||
}
|
||
return $result;
|
||
... | ... | |
$resultRows = $newResultRows;
|
||
$this->resultSections = array();
|
||
if ($freeIndexUid <= 0 && $this->searchData['group'] == 'sections') {
|
||
$rl2flag = substr($this->searchData['sections'], 0, 2) == 'rl';
|
||
$rl2flag = strpos($this->searchData['sections'], 'rl') === 0;
|
||
$sections = array();
|
||
foreach ($resultRows as $row) {
|
||
$id = $row['rl0'] . '-' . $row['rl1'] . ($rl2flag ? '-' . $row['rl2'] : '');
|
||
... | ... | |
} else {
|
||
// Default creation / finding of icon:
|
||
$icon = '';
|
||
if ($imageType === '0' || substr($imageType, 0, 2) == '0:') {
|
||
if ($imageType === '0' || strpos($imageType, '0:') === 0) {
|
||
if (is_array($specRowConf['pageIcon.'])) {
|
||
$this->iconFileNameCache[$imageType] = $this->cObj->IMAGE($specRowConf['pageIcon.']);
|
||
} else {
|
typo3_src/typo3/sysext/core/Classes/TypoScript/Parser/TypoScriptParser.php (revision ) | ||
---|---|---|
$tsContentsTillNextInclude = $parts[$i + 3];
|
||
// Resolve a possible relative paths if a parent file is given
|
||
if ($parentFilenameOrPath !== '' && GeneralUtility::isFirstPartOfStr($filename, '.')) {
|
||
if ($parentFilenameOrPath !== '' && $filename{0} === '.') {
|
||
$filename = PathUtility::getAbsolutePathOfRelativeReferencedFileOrPath($parentFilenameOrPath, $filename);
|
||
}
|
||
... | ... | |
*/
|
||
public static function includeFile($filename, $cycle_counter = 1, $returnFiles = FALSE, &$newString = '', array &$includedFiles = array(), $optionalProperties = '', $parentFilenameOrPath = '') {
|
||
// Resolve a possible relative paths if a parent file is given
|
||
if ($parentFilenameOrPath !== '' && GeneralUtility::isFirstPartOfStr($filename, '.')) {
|
||
if ($parentFilenameOrPath !== '' && $filename{0} === '.') {
|
||
$absfilename = PathUtility::getAbsolutePathOfRelativeReferencedFileOrPath($parentFilenameOrPath, $filename);
|
||
} else {
|
||
$absfilename = $filename;
|
||
... | ... | |
}
|
||
// Resolve a possible relative paths if a parent file is given
|
||
if ($parentFilenameOrPath !== '' && GeneralUtility::isFirstPartOfStr($dirPath, '.')) {
|
||
if ($parentFilenameOrPath !== '' && $dirPath{0} === '.') {
|
||
$absDirPath = PathUtility::getAbsolutePathOfRelativeReferencedFileOrPath($parentFilenameOrPath, $dirPath);
|
||
} else {
|
||
$absDirPath = $dirPath;
|
||
... | ... | |
// Write the content to the file
|
||
// Resolve a possible relative paths if a parent file is given
|
||
if ($parentFilenameOrPath !== '' && GeneralUtility::isFirstPartOfStr($fileName, '.')) {
|
||
if ($parentFilenameOrPath !== '' && $fileName{0} === '.') {
|
||
$realFileName = PathUtility::getAbsolutePathOfRelativeReferencedFileOrPath($parentFilenameOrPath, $fileName);
|
||
} else {
|
||
$realFileName = $fileName;
|
typo3_src/typo3/sysext/backend/Classes/Template/DocumentTemplate.php (revision ) | ||
---|---|---|
*/
|
||
public function sectionHeader($label, $sH = FALSE, $addAttrib = '') {
|
||
$tag = $sH ? 'h2' : 'h3';
|
||
if ($addAttrib && substr($addAttrib, 0, 1) !== ' ') {
|
||
if ($addAttrib && $addAttrib{0} !== ' ') {
|
||
$addAttrib = ' ' . $addAttrib;
|
||
}
|
||
$str = '
|
||
... | ... | |
* @todo Define visibility
|
||
*/
|
||
public function addStyleSheet($key, $href, $title = '', $relation = 'stylesheet') {
|
||
if (strpos($href, '://') !== FALSE || substr($href, 0, 1) === '/') {
|
||
if (strpos($href, '://') !== FALSE || $href{0} === '/') {
|
||
$file = $href;
|
||
} else {
|
||
$file = $this->backPath . $href;
|
||
... | ... | |
// Add all registered directories
|
||
foreach ($skinStylesheetDirs as $stylesheetDir) {
|
||
// for EXT:myskin/stylesheets/ syntax
|
||
if (substr($stylesheetDir, 0, 4) === 'EXT:') {
|
||
if (strpos($stylesheetDir, 'EXT:') === 0) {
|
||
list($extKey, $path) = explode('/', substr($stylesheetDir, 4), 2);
|
||
if (!empty($extKey) && ExtensionManagementUtility::isLoaded($extKey) && !empty($path)) {
|
||
$stylesheetDirectories[] = ExtensionManagementUtility::extRelPath($extKey) . $path;
|
typo3_src/typo3/sysext/rtehtmlarea/Classes/Controller/AccessibilityLinkController.php (revision ) | ||
---|---|---|
*/
|
||
public function removeAccessibilityIcon ($content, $conf) {
|
||
// If the link was not rendered
|
||
if (substr($content, 0, 3) !== '<a ' && substr($content, 0, 5) === '<img ') {
|
||
if (strpos($content, '<a ') !== 0 && strpos($content, '<img ') === 0) {
|
||
// Let's remove the accessibility icon, if there is one
|
||
$matches = array();
|
||
if (preg_match('/^<img .*>/', $content, $matches) === 1) {
|
||
... | ... | |
* Returns the full name of a file referenced in Page TSConfig
|
||
*/
|
||
protected function getFullFileName($filename) {
|
||
if (substr($filename, 0, 4) == 'EXT:') {
|
||
if (strpos($filename, 'EXT:') === 0) {
|
||
list($extKey, $local) = explode('/', substr($filename, 4), 2);
|
||
$newFilename = '';
|
||
if ((string)$extKey !== '' && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey) && (string)$local !== '') {
|
||
$newFilename = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extKey) . $local;
|
||
}
|
||
} elseif (substr($filename, 0, 1) != '/') {
|
||
} elseif ($filename{0} != '/') {
|
||
$newFilename = $filename;
|
||
} else {
|
||
$newFilename = substr($filename, 1);
|
typo3_src/typo3/sysext/extbase/Classes/Service/FlexFormService.php (revision ) | ||
---|---|---|
if (in_array($nodeKey, array('el', '_arrayContainer'))) {
|
||
return $this->walkFlexFormNode($nodeValue, $valuePointer);
|
||
}
|
||
if (substr($nodeKey, 0, 1) === '_') {
|
||
if ($nodeKey{0} === '_') {
|
||
continue;
|
||
}
|
||
if (strpos($nodeKey, '.')) {
|
typo3_src/typo3/sysext/install/Classes/Service/SqlSchemaMigrationService.php (revision ) | ||
---|---|---|
$table = '';
|
||
$total = array();
|
||
foreach ($lines as $value) {
|
||
if (substr($value, 0, 1) == '#') {
|
||
if ($value{0} == '#') {
|
||
// Ignore comments
|
||
continue;
|
||
}
|
||
... | ... | |
}
|
||
}
|
||
} else {
|
||
if (substr($value, 0, 1) == ')' && substr($value, -1) == ';') {
|
||
if ($value{0} == ')' && substr($value, -1) == ';') {
|
||
$ttype = array();
|
||
if (preg_match('/(ENGINE|TYPE)[ ]*=[ ]*([a-zA-Z]*)/', $value, $ttype)) {
|
||
$total[$table]['extra']['ENGINE'] = $ttype[2];
|
||
... | ... | |
$statementArray = array();
|
||
$statementArrayPointer = 0;
|
||
foreach ($sqlcodeArr as $line => $lineContent) {
|
||
$lineContent = trim($lineContent);
|
||
$is_set = 0;
|
||
// Auto_increment fields cannot have a default value!
|
||
if (stristr($lineContent, 'auto_increment')) {
|
||
$lineContent = preg_replace('/ default \'0\'/i', '', $lineContent);
|
||
}
|
||
if (!$removeNonSQL || trim($lineContent) !== '' && substr(trim($lineContent), 0, 1) != '#' && substr(trim($lineContent), 0, 2) != '--') {
|
||
if (!$removeNonSQL || $lineContent !== '' && $lineContent{0} != '#' && strpos($lineContent, '--') !== 0) {
|
||
// '--' is seen as mysqldump comments from server version 3.23.49
|
||
$statementArray[$statementArrayPointer] .= $lineContent;
|
||
$is_set = 1;
|
||
}
|
||
if (substr(trim($lineContent), -1) == ';') {
|
||
if (substr($lineContent, -1) == ';') {
|
||
if (isset($statementArray[$statementArrayPointer])) {
|
||
if (!trim($statementArray[$statementArrayPointer]) || $query_regex && !preg_match(('/' . $query_regex . '/i'), trim($statementArray[$statementArrayPointer]))) {
|
||
unset($statementArray[$statementArrayPointer]);
|
typo3_src/typo3/sysext/frontend/Classes/ContentObject/MediaContentObject.php (revision ) | ||
---|---|---|
$content = '';
|
||
// Add flex parameters to configuration
|
||
$flexParams = isset($conf['flexParams.']) ? $this->cObj->stdWrap($conf['flexParams'], $conf['flexParams.']) : $conf['flexParams'];
|
||
if (substr($flexParams, 0, 1) === '<') {
|
||
if ($flexParams{0} === '<') {
|
||
// It is a content element rather a TS object
|
||
$flexParams = \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array($flexParams, 'T3');
|
||
foreach ($flexParams['data'] as $sheetData) {
|
||
... | ... | |
$tmp = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode(LF, $rawTS);
|
||
if (count($tmp)) {
|
||
foreach ($tmp as $tsLine) {
|
||
if (substr($tsLine, 0, 1) != '#' && ($pos = strpos($tsLine, '.'))) {
|
||
if ($tsLine{0} != '#' && ($pos = strpos($tsLine, '.'))) {
|
||
$parts[0] = substr($tsLine, 0, $pos);
|
||
$parts[1] = substr($tsLine, $pos + 1);
|
||
$valueParts = \TYPO3\CMS\Core\Utility\GeneralUtility::trimExplode('=', $parts[1], TRUE);
|
typo3_src/typo3/sysext/backend/Classes/Controller/Wizard/AddController.php (revision ) | ||
---|---|---|
// Get TSconfig for it.
|
||
$TSconfig = BackendUtility::getTCEFORM_TSconfig($this->P['table'], is_array($origRow) ? $origRow : array('pid' => $this->P['pid']));
|
||
// Set [params][pid]
|
||
if (substr($this->P['params']['pid'], 0, 3) == '###' && substr($this->P['params']['pid'], -3) == '###') {
|
||
if (strpos($this->P['params']['pid'], '###') === 0 && substr($this->P['params']['pid'], -3) == '###') {
|
||
$this->pid = intval($TSconfig['_' . substr($this->P['params']['pid'], 3, -3)]);
|
||
} else {
|
||
$this->pid = intval($this->P['params']['pid']);
|
typo3_src/typo3/sysext/frontend/Classes/ContentObject/FormContentObject.php (revision ) | ||
---|---|---|
// field:
|
||
$fParts = explode(',', $parts[1]);
|
||
$fParts[0] = trim($fParts[0]);
|
||
if (substr($fParts[0], 0, 1) == '*') {
|
||
if ($fParts[0]{0} == '*') {
|
||
$confData['required'] = 1;
|
||
$fParts[0] = substr($fParts[0], 1);
|
||
}
|
||
... | ... | |
for ($a = 0; $a < $pCount; $a++) {
|
||
$valueParts[$a] = trim($valueParts[$a]);
|
||
// Finding default value
|
||
if (substr($valueParts[$a], 0, 1) == '*') {
|
||
if ($valueParts[$a]{0} == '*') {
|
||
$sel = 'selected';
|
||
$valueParts[$a] = substr($valueParts[$a], 1);
|
||
} else {
|
||
... | ... | |
$pCount = count($valueParts);
|
||
for ($a = 0; $a < $pCount; $a++) {
|
||
$valueParts[$a] = trim($valueParts[$a]);
|
||
if (substr($valueParts[$a], 0, 1) == '*') {
|
||
if ($valueParts[$a]{0} == '*') {
|
||
$sel = 'checked';
|
||
$valueParts[$a] = substr($valueParts[$a], 1);
|
||
} else {
|
typo3_src/typo3/sysext/core/Classes/DataHandling/DataHandler.php (revision ) | ||
---|---|---|
$OK = 1;
|
||
// If a NEW... id
|
||
if (strstr($pid_value, 'NEW')) {
|
||
if (substr($pid_value, 0, 1) == '-') {
|
||
if ($pid_value{0} == '-') {
|
||
$negFlag = -1;
|
||
$pid_value = substr($pid_value, 1);
|
||
} else {
|
||
... | ... | |
asort($actionCMDs[$key]);
|
||
$newValueArray = array();
|
||
foreach ($actionCMDs[$key] as $idx => $order) {
|
||
if (substr($idx, 0, 3) == 'ID-') {
|
||
if (strpos($idx, 'ID-') === 0) {
|
||
$idx = $this->newIndexMap[$idx];
|
||
}
|
||
// Just one reflection here: It is clear that when removing elements from a flexform, then we will get lost files unless we act on this delete operation by traversing and deleting files that were referred to.
|
||
... | ... | |
break;
|
||
case 'double2':
|
||
$value = preg_replace('/[^0-9,\\.-]/', '', $value);
|
||
$negative = substr($value, 0, 1) == '-';
|
||
$negative = $value{0} == '-';
|
||
$value = strtr($value, array(',' => '.', '-' => ''));
|
||
if (strpos($value, '.') === FALSE) {
|
||
$value .= '.0';
|
||
... | ... | |
$this->checkValue_flex_procInData_travDS($dataValues[$key]['el'][$ik][$theKey]['el'], is_array($dataValues_current[$key]['el'][$ik]) ? $dataValues_current[$key]['el'][$ik][$theKey]['el'] : array(), $uploadedFiles[$key]['el'][$ik][$theKey]['el'], $DSelements[$key]['el'][$theKey]['el'], $pParams, $callBackFunc, $structurePath . $key . '/el/' . $ik . '/' . $theKey . '/el/');
|
||
// If element is added dynamically in the flexform of TCEforms, we map the ID-string to the next numerical index we can have in that particular section of elements:
|
||
// The fact that the order changes is not important since order is controlled by a separately submitted index.
|
||
if (substr($ik, 0, 3) == 'ID-') {
|
||
if (strpos($ik, 'ID-') === 0) {
|
||
$newIndexCounter++;
|
||
// Set mapping index
|
||
$this->newIndexMap[$ik] = (is_array($dataValues_current[$key]['el']) && count($dataValues_current[$key]['el']) ? max(array_keys($dataValues_current[$key]['el'])) : 0) + $newIndexCounter;
|
typo3_src/typo3/sysext/extbase/Classes/Utility/ExtensionUtility.php (revision ) | ||
---|---|---|
static public function configureModule($moduleSignature, $modulePath) {
|
||
$moduleConfiguration = $GLOBALS['TBE_MODULES']['_configuration'][$moduleSignature];
|
||
$iconPathAndFilename = $moduleConfiguration['icon'];
|
||
if (substr($iconPathAndFilename, 0, 4) === 'EXT:') {
|
||
if (strpos($iconPathAndFilename, 'EXT:') === 0) {
|
||
list($extensionKey, $relativePath) = explode('/', substr($iconPathAndFilename, 4), 2);
|
||
$iconPathAndFilename = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extensionKey) . $relativePath;
|
||
}
|
typo3_src/typo3/sysext/core/Classes/Resource/Filter/FileNameFilter.php (revision ) | ||
---|---|---|
*/
|
||
static public function filterHiddenFilesAndFolders($itemName, $itemIdentifier, $parentIdentifier, array $additionalInformation, \TYPO3\CMS\Core\Resource\Driver\DriverInterface $driverInstance) {
|
||
// Only apply the filter if you want to hide the hidden files
|
||
if (self::$showHiddenFilesAndFolders === FALSE && substr($itemName, 0, 1) == '.') {
|
||
if (self::$showHiddenFilesAndFolders === FALSE && $itemName{0} == '.') {
|
||
return -1;
|
||
} else {
|
||
return TRUE;
|