Task #54517 » isFirstPartOfStr.patch
typo3_src/typo3/sysext/core/Classes/Utility/ClassNamingUtility.php (revision ) | ||
---|---|---|
$matches = array();
|
||
if (strpos($controllerObjectName, '\\') !== FALSE) {
|
||
if (substr($controllerObjectName, 0, 9) === 'TYPO3\\CMS') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($controllerObjectName, 'TYPO3\\CMS')) {
|
||
$extensionName = '^(?P<vendorName>[^\\\\]+\\\[^\\\\]+)\\\(?P<extensionName>[^\\\\]+)';
|
||
} else {
|
||
$extensionName = '^(?P<vendorName>[^\\\\]+)\\\\(?P<extensionName>[^\\\\]+)';
|
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($val[0], 'LLL:')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($val[0], 'LLL:')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($val[0], 'LLL:')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($labelArray[0], 'LLL:')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($altLabelArray[0], 'LLL:')) {
|
||
$altLabelFieldSelect[$altLabelArray[1]] = $GLOBALS['LANG']->sL($altLabelArray[0]);
|
||
} else {
|
||
$altLabelFieldSelect[$altLabelArray[1]] = $altLabelArray[0];
|
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($iPUrl[1], 'http')) {
|
||
$lines[] = '<a href="' . htmlspecialchars($iPUrl[1]) . '" target="_blank"><em>' . htmlspecialchars($iPUrl[0]) . '</em></a>';
|
||
} elseif (substr($iPUrl[1], 0, 5) == 'FILE:') {
|
||
} elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($iPUrl[1], 'FILE:')) {
|
||
$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'
|
||
&& \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($_SERVER['SERVER_SOFTWARE'], 'Apache')
|
||
) {
|
||
$status = new Status\WarningStatus();
|
||
$status->setTitle('Windows apache thread stack size');
|
typo3_src/typo3/sysext/core/Classes/Html/HtmlParser.php (revision ) | ||
---|---|---|
$tok = substr($tok, $eocPos + 3);
|
||
$inComment = FALSE;
|
||
$skipTag = TRUE;
|
||
} elseif (substr($tok, 0, 3) == '!--') {
|
||
} elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($tok, '!--')) {
|
||
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;
|
||
... | ... | |
unset($tagAttrib[0][$attr]);
|
||
}
|
||
if ($params['prefixLocalAnchors']) {
|
||
if (substr($tagAttrib[0][$attr], 0, 1) == '#') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($tagAttrib[0][$attr], '#')) {
|
||
$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'] && !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($urlParts['path'], '/')) {
|
||
// 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 (!\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($srcVal, '/') && !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($srcVal, '#')) {
|
||
$urlParts = parse_url($srcVal);
|
||
// Only prefix URLs without a scheme
|
||
if (!$urlParts['scheme']) {
|
||
... | ... | |
// Endtags are just set lowercase right away
|
||
if ($endTag) {
|
||
$value = strtolower($value);
|
||
} elseif (substr($value, 0, 4) != '<!--') {
|
||
} elseif (!\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($value, '<!--')) {
|
||
// ... and comments are ignored.
|
||
// Finding inner value with out < >
|
||
$inValue = substr($value, 1, substr($value, -2) == '/>' ? -2 : -1);
|
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) != '.' && !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($pkey, '_')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($tag[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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($l, '<') && 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 == '&' || !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($addQueryParams, '&')) {
|
||
$addQueryParams = '';
|
||
}
|
||
if ($conf['useCacheHash']) {
|
||
... | ... | |
* @todo Define visibility
|
||
*/
|
||
public function mergeTSRef($confArr, $prop) {
|
||
if (substr($confArr[$prop], 0, 1) == '<') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($confArr[$prop], '<')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($table, 'static_')) {
|
||
$pid_uid_flag++;
|
||
}
|
||
if (trim($conf['pidInList'])) {
|
typo3_src/typo3/sysext/core/Classes/Package/PackageManager.php (revision ) | ||
---|---|---|
foreach ($packagePaths as $packagePath => $composerManifestPath) {
|
||
$packagesBasePath = PATH_site;
|
||
foreach ($this->packagesBasePaths as $basePath) {
|
||
if (strpos($packagePath, $basePath) === 0) {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($packagePath, $basePath)) {
|
||
$packagesBasePath = $basePath;
|
||
break;
|
||
}
|
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 (!\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($string, 'LLL:')) {
|
||
// 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 (!\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($string, 'LLL:')) {
|
||
$label = $string;
|
||
} else {
|
||
$label = $LANG->sL(trim($string));
|
||
... | ... | |
}
|
||
public function getFullFileName($filename) {
|
||
if (substr($filename, 0, 4) == 'EXT:') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($filename, 'EXT:')) {
|
||
// 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 (!\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($filename, '/')) {
|
||
$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/extbase/Classes/Scheduler/FieldProvider.php (revision ) | ||
---|---|---|
if (strpos($className, '\\')) {
|
||
$classNameParts = explode('\\', $className);
|
||
// Skip vendor and product name for core classes
|
||
if (strpos($className, 'TYPO3\\CMS\\') === 0) {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($className, 'TYPO3\\CMS\\')) {
|
||
$classPartsToSkip = 2;
|
||
} else {
|
||
$classPartsToSkip = 1;
|
typo3_src/typo3/sysext/core/Classes/Resource/ResourceCompressor.php (revision ) | ||
---|---|---|
return $filename;
|
||
}
|
||
// if the file exists in the root path, just return the $filename
|
||
if (strpos($filename, $this->backPath) === 0) {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($filename, $this->backPath)) {
|
||
$file = str_replace($this->backPath, '', $filename);
|
||
if (is_file(GeneralUtility::resolveBackPath($this->rootPath . $file))) {
|
||
return $file;
|
||
... | ... | |
// 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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($file, '../')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($be_user_data['password'], 'rsa:') && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($be_user_data['password2'], 'rsa:')) {
|
||
$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/extbase/Classes/Persistence/Generic/Mapper/DataMapFactory.php (revision ) | ||
---|---|---|
if (strpos($className, '\\') !== FALSE) {
|
||
$classNameParts = explode('\\', $className, 6);
|
||
// Skip vendor and product name for core classes
|
||
if (strpos($className, 'TYPO3\\CMS\\') === 0) {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($className, 'TYPO3\\CMS\\')) {
|
||
$classPartsToSkip = 2;
|
||
} else {
|
||
$classPartsToSkip = 1;
|
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 && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($templateID, 'sys_') && $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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($ISF_file, 'EXT:')) {
|
||
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 && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($templateID, 'sys_') && $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 || !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($key, 'TSConstantEditor')) {
|
||
// 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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($file, 'EXT:')) {
|
||
$newFile = '';
|
||
list($extKey, $script) = explode('/', substr($file, 4), 2);
|
||
if ($extKey && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey)) {
|
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($GLOBALS['MCONF']['name'], '_CLI_')) {
|
||
$userName = strtolower($GLOBALS['MCONF']['name']);
|
||
$this->setBeUserByName($userName);
|
||
if ($this->user['uid']) {
|
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($conf['type'], 'FIELD_')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($conf['type'], 'FIELD_')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($val[0], 'LLL:')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($val[0], 'LLL:')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($val[0], 'LLL:')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($labelArray[0], 'LLL:')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($altLabelArray[0], 'LLL:')) {
|
||
$altLabelFieldSelect[$altLabelArray[1]] = $GLOBALS['LANG']->sL($altLabelArray[0]);
|
||
} else {
|
||
$altLabelFieldSelect[$altLabelArray[1]] = $altLabelArray[0];
|
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($defaultLabels['tabs_images']['tab'], '../')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($className, 'TYPO3\\CMS\\Core')) {
|
||
$classesFolder = substr($className, 15, 5) === 'Tests' ? '' : 'Classes/';
|
||
$classFilePath = PATH_typo3 . 'sysext/core/' . $classesFolder . str_replace('\\', '/', substr($className, 15)) . '.php';
|
||
if (@file_exists($classFilePath)) {
|
||
... | ... | |
}
|
||
if ($extensionKey && isset($this->packageClassesPaths[$extensionKey])) {
|
||
if (substr(strtolower($classNameWithoutVendorAndProduct), 0, 5) === 'tests') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr(strtolower($classNameWithoutVendorAndProduct), 'tests')) {
|
||
$classesPath = $this->packages[$extensionKey]->getPackagePath();
|
||
} else {
|
||
$classesPath = $this->packageClassesPaths[$extensionKey];
|
typo3_src/typo3/sysext/core/Classes/Utility/DiffUtility.php (revision ) | ||
---|---|---|
$c = intval($lValue);
|
||
$diffResArray[$c]['changeInfo'] = $lValue;
|
||
}
|
||
if (substr($lValue, 0, 1) == '<') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($lValue, '<')) {
|
||
$differenceStr .= ($diffResArray[$c]['old'][] = substr($lValue, 2));
|
||
}
|
||
if (substr($lValue, 0, 1) == '>') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($lValue, '>')) {
|
||
$differenceStr .= ($diffResArray[$c]['new'][] = substr($lValue, 2));
|
||
}
|
||
}
|
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($key, 'query') && $this->MOD_SETTINGS[$key] != $val && $key != 'queryLimit' && $key != 'use_listview') {
|
||
$setLimitToStart = 1;
|
||
if ($key == 'queryTable' && !$addConditionCheck) {
|
||
$this->MOD_SETTINGS['queryConfig'] = '';
|
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 !== '' && !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($clause, 'AND')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($ds_array[$srcPointer], 'FILE:')) {
|
||
$file = GeneralUtility::getFileAbsFileName(substr($ds_array[$srcPointer], 5));
|
||
if ($file && @is_file($file)) {
|
||
$dataStructArray = GeneralUtility::xml2array(GeneralUtility::getUrl($file));
|
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 (!\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($content, '<a ') && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($content, '<img ')) {
|
||
// 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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($filename, 'EXT:')) {
|
||
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 (!\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($filename, '/')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($nodeKey, '_')) {
|
||
continue;
|
||
}
|
||
if (strpos($nodeKey, '.')) {
|
typo3_src/typo3/sysext/install/Classes/Controller/Action/Tool/CleanUp.php (revision ) | ||
---|---|---|
|| substr($absoluteFile, -4) === '.css'
|
||
|| substr($absoluteFile, -3) === '.js'
|
||
|| substr($absoluteFile, -5) === '.gzip'
|
||
|| substr(basename($absoluteFile), 0, 8) === 'installTool'
|
||
|| \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr(basename($absoluteFile), 'installTool')
|
||
) {
|
||
if ($numberOfFilesToDelete && $deleteCounter < $numberOfFilesToDelete) {
|
||
$deleteCounter++;
|
typo3_src/typo3/sysext/install/Classes/Controller/Action/Tool/AllConfiguration.php (revision ) | ||
---|---|---|
if (preg_match('/["\']([[:alnum:]_-]*)["\'][[:space:]]*=>(.*)/i', $lc, $reg)) {
|
||
preg_match('/,[\\t\\s]*\\/\\/(.*)/i', $reg[2], $creg);
|
||
$theComment = trim($creg[1]);
|
||
if (substr(strtolower(trim($reg[2])), 0, 5) == 'array' && $reg[1] === strtoupper($reg[1])) {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr(strtolower(trim($reg[2])), 'array') && $reg[1] === strtoupper($reg[1])) {
|
||
$mainKey = trim($reg[1]);
|
||
} elseif ($mainKey) {
|
||
$commentArray[$mainKey][$reg[1]] = $theComment;
|
typo3_src/typo3/sysext/core/Classes/Database/SqlParser.php (revision ) | ||
---|---|---|
// Field type:
|
||
if ($result['fieldType'] = $this->nextPart($parseString, '^(int|smallint|tinyint|mediumint|bigint|double|numeric|decimal|float|varchar|char|text|tinytext|mediumtext|longtext|blob|tinyblob|mediumblob|longblob)([[:space:],]+|\\()')) {
|
||
// Looking for value:
|
||
if (substr($parseString, 0, 1) == '(') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($parseString, '(')) {
|
||
$parseString = substr($parseString, 1);
|
||
if ($result['value'] = $this->nextPart($parseString, '^([^)]*)')) {
|
||
$parseString = ltrim(substr($parseString, 1));
|
typo3_src/typo3/sysext/recycler/Classes/Controller/RecyclerModuleController.php (revision ) | ||
---|---|---|
$labelPattern = '#^' . preg_quote($selectionPrefix, '#') . '(' . preg_quote($stripFromSelectionName, '#') . ')?#';
|
||
// Iterate through all locallang lables:
|
||
foreach ($labels as $label => $value) {
|
||
if (strpos($label, $selectionPrefix) === 0) {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($label, $selectionPrefix)) {
|
||
$key = preg_replace($labelPattern, '', $label);
|
||
$extraction[$key] = $value;
|
||
}
|
typo3_src/typo3/sysext/reports/Classes/Report/Status/Status.php (revision ) | ||
---|---|---|
$secondaryStatuses = array();
|
||
foreach ($statusCollection as $statusProviderId => $collection) {
|
||
$label = '';
|
||
if (strpos($statusProviderId, 'LLL:') === 0) {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($statusProviderId, 'LLL:')) {
|
||
// Label provided by extension
|
||
$label = $GLOBALS['LANG']->sL($statusProviderId);
|
||
} else {
|
typo3_src/typo3/sysext/extbase/Classes/Service/ImageService.php (revision ) | ||
---|---|---|
* @return FileInterface|FileReference|\TYPO3\CMS\Core\Resource\Folder
|
||
*/
|
||
protected function getImageFromSourceString($src, $treatIdAsReference) {
|
||
if ($this->environmentService->isEnvironmentInBackendMode() && substr($src, 0, 3) === '../') {
|
||
if ($this->environmentService->isEnvironmentInBackendMode() && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($src, '../')) {
|
||
$src = substr($src, 3);
|
||
}
|
||
if (MathUtility::canBeInterpretedAsInteger($src)) {
|
typo3_src/typo3/sysext/extbase/Classes/Mvc/Controller/Arguments.php (revision ) | ||
---|---|---|
* @return void
|
||
*/
|
||
public function __call($methodName, array $arguments) {
|
||
if (substr($methodName, 0, 3) !== 'set') {
|
||
if (!\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($methodName, 'set')) {
|
||
throw new \LogicException('Unknown method "' . $methodName . '".', 1210858451);
|
||
}
|
||
$firstLowerCaseArgumentName = $this->translateToLongArgumentName(strtolower($methodName[3]) . substr($methodName, 4));
|
typo3_src/typo3/sysext/backend/Classes/Form/FormEngine.php (revision ) | ||
---|---|---|
'inline' => array('appearance', 'behaviour', 'foreign_label', 'foreign_selector', 'foreign_unique', 'maxitems', 'minitems', 'size', 'autoSizeMax', 'symmetric_label', 'readOnly')
|
||
);
|
||
// Create instance of InlineElement only if this a non-IRRE-AJAX call:
|
||
if (!isset($GLOBALS['ajaxID']) || strpos($GLOBALS['ajaxID'], 'TYPO3\\CMS\\Backend\\Form\\Element\\InlineElement::') !== 0) {
|
||
if (!isset($GLOBALS['ajaxID']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($GLOBALS['ajaxID'], 'TYPO3\\CMS\\Backend\\Form\\Element\\InlineElement::')) {
|
||
$this->inline = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\Element\\InlineElement');
|
||
}
|
||
// Create instance of \TYPO3\CMS\Backend\Form\Element\SuggestElement only if this a non-Suggest-AJAX call:
|
||
if (!isset($GLOBALS['ajaxID']) || strpos($GLOBALS['ajaxID'], 'TYPO3\\CMS\\Backend\\Form\\Element\\SuggestElement::') !== 0) {
|
||
if (!isset($GLOBALS['ajaxID']) || !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($GLOBALS['ajaxID'], 'TYPO3\\CMS\\Backend\\Form\\Element\\SuggestElement::')) {
|
||
$this->suggest = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\Element\\SuggestElement');
|
||
}
|
||
// Prepare user defined objects (if any) for hooks which extend this function:
|
||
... | ... | |
$tabIdentString = 'TCEforms:' . $table . ':' . $row['uid'];
|
||
$tabIdentStringMD5 = $GLOBALS['TBE_TEMPLATE']->getDynTabMenuId($tabIdentString);
|
||
// Remember that were currently working on the general tab:
|
||
if (isset($fields[0]) && strpos($fields[0], '--div--') !== 0) {
|
||
if (isset($fields[0]) && !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($fields[0], '--div--')) {
|
||
$this->pushToDynNestedStack('tab', $tabIdentStringMD5 . '-1');
|
||
}
|
||
}
|
||
... | ... | |
$bit = substr($bitKey, 1);
|
||
if (MathUtility::canBeInterpretedAsInteger($bit)) {
|
||
$bit = MathUtility::forceIntegerInRange($bit, 0, 30);
|
||
if (substr($bitKey, 0, 1) == '-' && !($sTValue & pow(2, $bit)) || substr($bitKey, 0, 1) == '+' && $sTValue & pow(2, $bit)) {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($bitKey, '-') && !($sTValue & pow(2, $bit)) || \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($bitKey, '+') && $sTValue & pow(2, $bit)) {
|
||
$excludeElements = array_merge($excludeElements, GeneralUtility::trimExplode(',', $eList, TRUE));
|
||
}
|
||
}
|
||
... | ... | |
if (is_array($wizConf) && !$this->disableWizards) {
|
||
$parametersOfWizards = &$specConf['wizards']['parameters'];
|
||
foreach ($wizConf as $wid => $wConf) {
|
||
if (substr($wid, 0, 1) != '_' && (!$wConf['enableByTypeConfig'] || is_array($parametersOfWizards) && in_array($wid, $parametersOfWizards)) && ($RTE || !$wConf['RTEonly'])) {
|
||
if (!\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($wid, '_') && (!$wConf['enableByTypeConfig'] || is_array($parametersOfWizards) && in_array($wid, $parametersOfWizards)) && ($RTE || !$wConf['RTEonly'])) {
|
||
// Title / icon:
|
||
$iTitle = htmlspecialchars($this->sL($wConf['title']));
|
||
if ($wConf['icon']) {
|
||
... | ... | |
$params['md5ID'] = $md5ID;
|
||
$params['returnUrl'] = $this->thisReturnUrl();
|
||
// Resolving script filename and setting URL.
|
||
if (substr($wConf['script'], 0, 4) === 'EXT:') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($wConf['script'], 'EXT:')) {
|
||
$wScript = GeneralUtility::getFileAbsFileName($wConf['script']);
|
||
if ($wScript) {
|
||
$wScript = '../' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($wScript);
|
||
... | ... | |
* @todo Define visibility
|
||
*/
|
||
public function getIcon($icon) {
|
||
if (substr($icon, 0, 4) == 'EXT:') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($icon, 'EXT:')) {
|
||
$file = GeneralUtility::getFileAbsFileName($icon);
|
||
if ($file) {
|
||
$file = \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($file);
|
||
$selIconFile = $this->backPath . '../' . $file;
|
||
$selIconInfo = @getimagesize((PATH_site . $file));
|
||
}
|
||
} elseif (substr($icon, 0, 3) == '../') {
|
||
} elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($icon, '../')) {
|
||
$selIconFile = $this->backPath . GeneralUtility::resolveBackPath($icon);
|
||
$selIconInfo = @getimagesize((PATH_site . GeneralUtility::resolveBackPath(substr($icon, 3))));
|
||
} elseif (substr($icon, 0, 4) == 'ext/' || substr($icon, 0, 7) == 'sysext/') {
|
||
} elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($icon, 'ext/') || \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($icon, 'sysext/')) {
|
||
$selIconFile = $this->backPath . $icon;
|
||
$selIconInfo = @getimagesize((PATH_typo3 . $icon));
|
||
} else {
|
||
... | ... | |
$style = trim($this->fieldStyle['all']);
|
||
}
|
||
// Check class prefixed:
|
||
if (substr($style, 0, 6) == 'CLASS:') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($style, 'CLASS:')) {
|
||
$out = $class ? trim(substr($style, 6)) : '';
|
||
} else {
|
||
$out = !$class ? $style : '';
|
||
... | ... | |
return '';
|
||
}
|
||
// Check if we have a reference to another field value from the current record
|
||
if (substr($value, 0, 6) === '__row|') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($value, '__row|')) {
|
||
/** @var \TYPO3\CMS\Backend\Form\FormDataTraverser $traverser */
|
||
$traverseFields = GeneralUtility::trimExplode('|', substr($value, 6));
|
||
$traverser = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormDataTraverser', $this);
|
typo3_src/typo3/sysext/extbase/Classes/Persistence/Repository.php (revision ) | ||
---|---|---|
* @api
|
||
*/
|
||
public function __call($methodName, $arguments) {
|
||
if (substr($methodName, 0, 6) === 'findBy' && strlen($methodName) > 7) {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($methodName, 'findBy') && strlen($methodName) > 7) {
|
||
$propertyName = lcfirst(substr($methodName, 6));
|
||
$query = $this->createQuery();
|
||
$result = $query->matching($query->equals($propertyName, $arguments[0]))->execute();
|
||
return $result;
|
||
} elseif (substr($methodName, 0, 9) === 'findOneBy' && strlen($methodName) > 10) {
|
||
} elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($methodName, 'findOneBy') && strlen($methodName) > 10) {
|
||
$propertyName = lcfirst(substr($methodName, 9));
|
||
$query = $this->createQuery();
|
||
... | ... | |
return isset($result[0]) ? $result[0] : NULL;
|
||
}
|
||
} elseif (substr($methodName, 0, 7) === 'countBy' && strlen($methodName) > 8) {
|
||
} elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($methodName, 'countBy') && strlen($methodName) > 8) {
|
||
$propertyName = lcfirst(substr($methodName, 7));
|
||
$query = $this->createQuery();
|
||
$result = $query->matching($query->equals($propertyName, $arguments[0]))->execute()->count();
|
typo3_src/typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php (revision ) | ||
---|---|---|
$onClickEvent .= 'browse_links_setTarget(\'' . $v[($k2i . '.')]['target'] . '\');';
|
||
}
|
||
$v[$k2i . '.']['url'] = str_replace('###_URL###', $this->siteURL, $v[$k2i . '.']['url']);
|
||
if (substr($v[$k2i . '.']['url'], 0, 7) == 'http://' || substr($v[$k2i . '.']['url'], 0, 7) == 'mailto:') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($v[$k2i . '.']['url'], 'http://') || \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($v[$k2i . '.']['url'], 'mailto:')) {
|
||
$onClickEvent .= 'cur_href=unescape(\'' . rawurlencode($v[($k2i . '.')]['url']) . '\');link_current();';
|
||
} else {
|
||
$onClickEvent .= 'link_spec(unescape(\'' . $this->siteURL . rawurlencode($v[($k2i . '.')]['url']) . '\'));';
|
typo3_src/typo3/sysext/core/Classes/Cache/Backend/MemcachedBackend.php (revision ) | ||
---|---|---|
$this->memcache = new \Memcache();
|
||
$defaultPort = ini_get('memcache.default_port');
|
||
foreach ($this->servers as $server) {
|
||
if (substr($server, 0, 7) == 'unix://') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($server, 'unix://')) {
|
||
$host = $server;
|
||
$port = 0;
|
||
} else {
|
||
if (substr($server, 0, 6) === 'tcp://') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($server, 'tcp://')) {
|
||
$server = substr($server, 6);
|
||
}
|
||
if (strpos($server, ':') !== FALSE) {
|
||
... | ... | |
*/
|
||
public function get($entryIdentifier) {
|
||
$value = $this->memcache->get($this->identifierPrefix . $entryIdentifier);
|
||
if (substr($value, 0, 14) === 'TYPO3*chunked:') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($value, 'TYPO3*chunked:')) {
|
||
list(, $chunkCount) = explode(':', $value);
|
||
$value = '';
|
||
for ($chunkNumber = 1; $chunkNumber < $chunkCount; $chunkNumber++) {
|
typo3_src/typo3/sysext/core/Classes/Utility/ExtensionManagementUtility.php (revision ) | ||
---|---|---|
* @internal
|
||
*/
|
||
static public function getCN($key) {
|
||
return substr($key, 0, 5) == 'user_' ? 'user_' . str_replace('_', '', substr($key, 5)) : 'tx_' . str_replace('_', '', $key);
|
||
return \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($key, 'user_') ? 'user_' . str_replace('_', '', substr($key, 5)) : 'tx_' . str_replace('_', '', $key);
|
||
}
|
||
/**
|
||
... | ... | |
static public function configureModule($moduleSignature, $modulePath) {
|
||
$moduleConfiguration = $GLOBALS['TBE_MODULES']['_configuration'][$moduleSignature];
|
||
$iconPathAndFilename = $moduleConfiguration['icon'];
|
||
if (substr($iconPathAndFilename, 0, 4) === 'EXT:') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($iconPathAndFilename, 'EXT:')) {
|
||
list($extensionKey, $relativePath) = explode('/', substr($iconPathAndFilename, 4), 2);
|
||
$iconPathAndFilename = self::extPath($extensionKey) . $relativePath;
|
||
}
|
typo3_src/typo3/sysext/core/Classes/Charset/CharsetConverter.php (revision ) | ||
---|---|---|
$detectedType = '';
|
||
foreach ($lines as $value) {
|
||
// Comment line or blanks are ignored.
|
||
if (trim($value) && substr($value, 0, 1) != '#') {
|
||
if (trim($value) && !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($value, '#')) {
|
||
// Detect type if not done yet: (Done on first real line)
|
||
// The "whitespaced" type is on the syntax "0x0A 0x000A #LINE FEED" while "ms-token" is like "B9 = U+00B9 : SUPERSCRIPT ONE"
|
||
if (!$detectedType) {
|
typo3_src/typo3/sysext/core/Classes/Page/PageRenderer.php (revision ) | ||
---|---|---|
foreach ($labels as $label => $value) {
|
||
if ($selectionPrefix === '') {
|
||
$labelsFromFile[$label] = $value;
|
||
} elseif (strpos($label, $selectionPrefix) === 0) {
|
||
} elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($label, $selectionPrefix)) {
|
||
preg_replace($labelPattern, '', $label);
|
||
$labelsFromFile[$label] = $value;
|
||
}
|
typo3_src/typo3/sysext/impexp/Classes/ImportExport.php (revision ) | ||
---|---|---|
foreach ($pidsFromTree as $origPid => $newPid) {
|
||
if ($newPid >= 0 && $this->dontIgnorePid('pages', $origPid)) {
|
||
// If the page had a new id (because it was created) use that instead!
|
||
if (substr($this->import_newId_pids[$origPid], 0, 3) === 'NEW') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($this->import_newId_pids[$origPid], 'NEW')) {
|
||
if ($this->import_mapId['pages'][$origPid]) {
|
||
$mappedPid = $this->import_mapId['pages'][$origPid];
|
||
$cmd_data['pages'][$mappedPid]['move'] = $newPid;
|
typo3_src/typo3/sysext/frontend/Classes/Page/PageGenerator.php (revision ) | ||
---|---|---|
}
|
||
if ($ss) {
|
||
if ($GLOBALS['TSFE']->pSetup['includeCSS.'][$key . '.']['import']) {
|
||
if (!$GLOBALS['TSFE']->pSetup['includeCSS.'][($key . '.')]['external'] && substr($ss, 0, 1) != '/') {
|
||
if (!$GLOBALS['TSFE']->pSetup['includeCSS.'][($key . '.')]['external'] && !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($ss, '/')) {
|
||
// To fix MSIE 6 that cannot handle these as relative paths (according to Ben v Ende)
|
||
$ss = GeneralUtility::dirname(GeneralUtility::getIndpEnv('SCRIPT_NAME')) . '/' . $ss;
|
||
}
|
typo3_src/typo3/sysext/backend/Classes/Toolbar/ShortcutToolbarItem.php (revision ) | ||
---|---|---|
*/
|
||
protected function getShortcutIconTitle($shortcutLabel, $moduleName, $parentModuleName = '') {
|
||
$title = '';
|
||
if (substr($moduleName, 0, 5) == 'xMOD_') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($moduleName, 'xMOD_')) {
|
||
$title = substr($moduleName, 5);
|
||
} else {
|
||
$splitModuleName = explode('_', $moduleName);
|
typo3_src/typo3/sysext/rsaauth/Classes/RsaAuthService.php (revision ) | ||
---|---|---|
// Decrypt the password
|
||
$password = $loginData['uident'];
|
||
$key = $storage->get();
|
||
if ($key != NULL && substr($password, 0, 4) === 'rsa:') {
|
||
if ($key != NULL && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($password, 'rsa:')) {
|
||
// Decode password and store it in loginData
|
||
$decryptedPassword = $this->backend->decrypt($key, substr($password, 4));
|
||
if ($decryptedPassword !== NULL) {
|
typo3_src/typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php (revision ) | ||
---|---|---|
public function enableDisableItems($menuItems) {
|
||
if ($this->iParts[3]) {
|
||
// Detect "only" mode: (only showing listed items)
|
||
if (substr($this->iParts[3], 0, 1) == '+') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($this->iParts[3], '+')) {
|
||
$this->iParts[3] = substr($this->iParts[3], 1);
|
||
$only = TRUE;
|
||
} else {
|
typo3_src/typo3/sysext/saltedpasswords/Classes/SaltedPasswordService.php (revision ) | ||
---|---|---|
// Instanciate default method class
|
||
$this->objInstanceSaltedPW = \TYPO3\CMS\Saltedpasswords\Salt\SaltFactory::getSaltingInstance(substr($user['password'], 1));
|
||
// md5
|
||
if (substr($user['password'], 0, 1) === 'M') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($user['password'], 'M')) {
|
||
$validPasswd = $this->objInstanceSaltedPW->checkPassword(md5($password), substr($user['password'], 1));
|
||
} else {
|
||
$validPasswd = $this->objInstanceSaltedPW->checkPassword($password, substr($user['password'], 1));
|
typo3_src/typo3/sysext/frontend/Classes/Page/PageRepository.php (revision ) | ||
---|---|---|
// If relative path, prefix Site URL:
|
||
$uI = parse_url($redirectTo);
|
||
// Relative path assumed now.
|
||
if (!$uI['scheme'] && substr($redirectTo, 0, 1) != '/') {
|
||
if (!$uI['scheme'] && !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($redirectTo, '/')) {
|
||
$redirectTo = GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . $redirectTo;
|
||
}
|
||
return $redirectTo;
|
typo3_src/typo3/sysext/backend/Classes/View/ThumbnailView.php (revision ) | ||
---|---|---|
// We assume the FilePath to be a relative file path (as in backwards compatibility mode)
|
||
$relativeFilePath = $filePathOrCombinedFileIdentifier;
|
||
// The incoming relative path is relative to the typo3/ directory, but we need it relative to PATH_site. This is corrected here:
|
||
if (substr($relativeFilePath, 0, 3) == '../') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($relativeFilePath, '../')) {
|
||
$relativeFilePath = substr($relativeFilePath, 3);
|
||
} else {
|
||
$relativeFilePath = 'typo3/' . $relativeFilePath;
|
typo3_src/typo3/sysext/backend/Classes/Form/Element/InlineElement.php (revision ) | ||
---|---|---|
public function renderForeignRecordHeaderControl($parentUid, $foreign_table, $rec, $config = array(), $isVirtualRecord = FALSE) {
|
||
// Initialize:
|
||
$cells = array();
|
||
$isNewItem = substr($rec['uid'], 0, 3) == 'NEW';
|
||
$isNewItem = \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($rec['uid'], 'NEW');
|
||
$tcaTableCtrl = &$GLOBALS['TCA'][$foreign_table]['ctrl'];
|
||
$tcaTableCols = &$GLOBALS['TCA'][$foreign_table]['columns'];
|
||
$isPagesTable = $foreign_table == 'pages' ? TRUE : FALSE;
|
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 || !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($key, 'TSConstantEditor')) {
|
||
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' || !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($depth, '_')) {
|
||
$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 = \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($row['templateID'], '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));
|
||
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 && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($string, '##') . $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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($retArr['paramstr'], '-')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($imgConf, 'gfx/')) {
|
||
$iFile = $this->ext_localGfxPrefix . $imgConf;
|
||
$tFile = $this->ext_localWebGfxPrefix . $imgConf;
|
||
} elseif (substr($imgConf, 0, 4) == 'EXT:') {
|
||
} elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($imgConf, 'EXT:')) {
|
||
$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' && !\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($params['value'], '{$')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($line, '[')) {
|
||
} elseif (strcspn($line, '}#/') != 0) {
|
||
$varL = strcspn($line, ' {=<');
|
||
... | ... | |
break;
|
||
}
|
||
$this->lastComment = '';
|
||
} elseif (substr($line, 0, 1) == '}') {
|
||
} elseif (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($line, '}')) {
|
||
$this->lastComment = '';
|
||
$this->ext_inBrace--;
|
||
if ($this->ext_inBrace < 0) {
|
typo3_src/typo3/sysext/install/Classes/FolderStructure/AbstractNode.php (revision ) | ||
---|---|---|
$path = $this->getAbsolutePath();
|
||
}
|
||
$pathSiteWithoutTrailingSlash = substr(PATH_site, 0, -1);
|
||
if (strpos($path, $pathSiteWithoutTrailingSlash, 0) !== 0) {
|
||
if (!\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($path, $pathSiteWithoutTrailingSlash, 0)) {
|
||
throw new \TYPO3\CMS\Install\FolderStructure\Exception\InvalidArgumentException(
|
||
'PATH_site is not first part of given path',
|
||
1366398198
|
typo3_src/typo3/sysext/extbase/Classes/Object/Container/ClassInfoFactory.php (revision ) | ||
---|---|---|
*/
|
||
private function isNameOfInjectMethod($methodName) {
|
||
if (
|
||
substr($methodName, 0, 6) === 'inject'
|
||
\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($methodName, 'inject')
|
||
&& $methodName[6] === strtoupper($methodName[6])
|
||
&& $methodName !== 'injectSettings'
|
||
) {
|
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) && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($manifest->type, 'typo3-cms-')) {
|
||
$relativePackagePath = substr($packagePath, strlen($packagesBasePath));
|
||
$packageKey = substr($relativePackagePath, strpos($relativePackagePath, '/') + 1, -1);
|
||
/**
|
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($cmd, 'row_')) {
|
||
switch ($cmd) {
|
||
case 'row_remove':
|
||
unset($this->TABLECFG['c'][$kk]);
|
||
... | ... | |
}
|
||
ksort($this->TABLECFG['c']);
|
||
}
|
||
if (substr($cmd, 0, 4) == 'col_') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($cmd, 'col_')) {
|
||
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 && \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($vParts[$a], $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/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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($iconfile, '../')) {
|
||
$absfile = PATH_site . substr($iconfile, 3);
|
||
} else {
|
||
$absfile = PATH_typo3 . $iconfile;
|
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($modName, 'xMOD_')) {
|
||
$label = substr($modName, 5);
|
||
} else {
|
||
$split = explode('_', $modName);
|
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($propertyName, '_')) {
|
||
unset($properties[$propertyName]);
|
||
}
|
||
}
|
||
... | ... | |
$this->_cleanProperties = array();
|
||
$properties = get_object_vars($this);
|
||
foreach ($properties as $propertyName => $propertyValue) {
|
||
if (substr($propertyName, 0, 1) === '_') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($propertyName, '_')) {
|
||
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($value, 'Modulus=')) {
|
||
$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 = \TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($test, 'OpenSSL ');
|
||
}
|
||
return $result;
|
||
}
|
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($this->sections, 'rl1_')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($this->sections, 'rl2_')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($this->sortOrder, 'rank_')) {
|
||
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/belog/Classes/Domain/Repository/LogEntryRepository.php (revision ) | ||
---|---|---|
return;
|
||
}
|
||
// Constraint for a group
|
||
if (substr($userOrGroup, 0, 3) === 'gr-') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($userOrGroup, 'gr-')) {
|
||
$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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($userOrGroup, 'us-')) {
|
||
$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/backend/Classes/View/BackendLayoutView.php (revision ) | ||
---|---|---|
protected function determinePageId($tableName, array $data) {
|
||
$pageId = NULL;
|
||
if (strpos($data['uid'], 'NEW') === 0) {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($data['uid'], 'NEW')) {
|
||
// negative uid_pid values of content elements indicate that the element has been inserted after an existing element
|
||
// so there is no pid to get the backendLayout for and we have to get that first
|
||
if ($data['pid'] < 0) {
|
typo3_src/typo3/sysext/setup/Classes/Controller/SetupModuleController.php (revision ) | ||
---|---|---|
$tabLabel = '';
|
||
foreach ($fieldArray as $fieldName) {
|
||
$more = '';
|
||
if (substr($fieldName, 0, 8) == '--div--;') {
|
||
if (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($fieldName, '--div--;')) {
|
||
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($str, 'LLL:')) {
|
||
$out = $GLOBALS['LANG']->sL($str);
|
||
} else {
|
||
$out = htmlspecialchars($str);
|
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 (\TYPO3\CMS\Core\Utility\GeneralUtility::isFirstPartOfStr($tableName, 'cf_')) {
|
||
$database->exec_TRUNCATEquery($tableName);
|
||
}
|
||
}
|
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);
|
- « Previous
- 1
- …
- 5
- 6
- 7
- Next »