[TASK] Use (int) instead of intval() or (integer) 40/26740/23
authorJo Hasenau <info@cybercraft.de>
Sat, 1 Feb 2014 20:49:09 +0000 (21:49 +0100)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Sat, 1 Feb 2014 21:13:21 +0000 (22:13 +0100)
This patch replaces most of around 1600 occurrences of
intval() and every (integer) in the whole core.
Additionally it changes GeneralUtility::intExplode to use references
and typecasting as well.
Some occurrences of strstr() together with intval() have been replaced
with strpos() as well.
And some superfluous intval calls have been removed or reduced
to a single one i.e. for protected variables or before loops.
Patch updated after Core CGL decision from 30.01.2014

Resolves: #54265
Releases: 6.2
Change-Id: Iba57ffad1f4233ffa1a9f7d3ca5bfe9d2b53f1e8
Reviewed-on: https://review.typo3.org/26740
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind
328 files changed:
typo3/class.browse_links.php
typo3/move_el.php
typo3/sysext/backend/Classes/ClickMenu/ClickMenu.php
typo3/sysext/backend/Classes/Clipboard/Clipboard.php
typo3/sysext/backend/Classes/Configuration/TranslationConfigurationProvider.php
typo3/sysext/backend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php
typo3/sysext/backend/Classes/ContextMenu/AbstractContextMenuDataProvider.php
typo3/sysext/backend/Classes/Controller/BackendController.php
typo3/sysext/backend/Classes/Controller/BackendLayoutWizardController.php
typo3/sysext/backend/Classes/Controller/ContentElement/ElementInformationController.php
typo3/sysext/backend/Classes/Controller/ContentElement/MoveElementController.php
typo3/sysext/backend/Classes/Controller/ContentElement/NewContentElementController.php
typo3/sysext/backend/Classes/Controller/EditDocumentController.php
typo3/sysext/backend/Classes/Controller/NewRecordController.php
typo3/sysext/backend/Classes/Controller/PageLayoutController.php
typo3/sysext/backend/Classes/Controller/PageTreeNavigationController.php
typo3/sysext/backend/Classes/Controller/Wizard/AddController.php
typo3/sysext/backend/Classes/Controller/Wizard/FormsController.php
typo3/sysext/backend/Classes/Controller/Wizard/ListController.php
typo3/sysext/backend/Classes/Controller/Wizard/RteController.php
typo3/sysext/backend/Classes/Controller/Wizard/TableController.php
typo3/sysext/backend/Classes/Form/DataPreprocessor.php
typo3/sysext/backend/Classes/Form/Element/InlineElement.php
typo3/sysext/backend/Classes/Form/Element/SuggestDefaultReceiver.php
typo3/sysext/backend/Classes/Form/Element/SuggestElement.php
typo3/sysext/backend/Classes/Form/Element/TreeElement.php
typo3/sysext/backend/Classes/Form/Element/ValueSlider.php
typo3/sysext/backend/Classes/Form/ElementConditionMatcher.php
typo3/sysext/backend/Classes/Form/FormDataTraverser.php
typo3/sysext/backend/Classes/Form/FormEngine.php
typo3/sysext/backend/Classes/Form/FrontendFormEngine.php
typo3/sysext/backend/Classes/FrontendBackendUserAuthentication.php
typo3/sysext/backend/Classes/History/RecordHistory.php
typo3/sysext/backend/Classes/Module/BaseScriptClass.php
typo3/sysext/backend/Classes/RecordList/AbstractRecordList.php
typo3/sysext/backend/Classes/Security/CategoryPermissionsAspect.php
typo3/sysext/backend/Classes/Sprite/SpriteGenerator.php
typo3/sysext/backend/Classes/Template/DocumentTemplate.php
typo3/sysext/backend/Classes/Toolbar/ShortcutToolbarItem.php
typo3/sysext/backend/Classes/Tree/Pagetree/Commands.php
typo3/sysext/backend/Classes/Tree/Pagetree/DataProvider.php
typo3/sysext/backend/Classes/Tree/Pagetree/ExtdirectTreeCommands.php
typo3/sysext/backend/Classes/Tree/Pagetree/PagetreeNode.php
typo3/sysext/backend/Classes/Tree/View/AbstractTreeView.php
typo3/sysext/backend/Classes/Tree/View/FolderTreeView.php
typo3/sysext/backend/Classes/Tree/View/PagePositionMap.php
typo3/sysext/backend/Classes/Utility/BackendUtility.php
typo3/sysext/backend/Classes/Utility/IconUtility.php
typo3/sysext/backend/Classes/View/BackendLayout/DefaultDataProvider.php
typo3/sysext/backend/Classes/View/BackendLayoutView.php
typo3/sysext/backend/Classes/View/PageLayout/Extdirect/ExtdirectPageCommands.php
typo3/sysext/backend/Classes/View/PageLayoutView.php
typo3/sysext/backend/Classes/View/PageTreeView.php
typo3/sysext/belog/Classes/Controller/WebInfoController.php
typo3/sysext/belog/Classes/Domain/Model/Constraint.php
typo3/sysext/belog/Classes/Domain/Model/LogEntry.php
typo3/sysext/belog/Classes/Domain/Repository/LogEntryRepository.php
typo3/sysext/beuser/Classes/Controller/BackendUserController.php
typo3/sysext/beuser/Classes/Domain/Repository/BackendUserRepository.php
typo3/sysext/beuser/Classes/Domain/Repository/BackendUserSessionRepository.php
typo3/sysext/beuser/Classes/Hook/SwitchBackUserHook.php
typo3/sysext/core/Classes/Authentication/AbstractUserAuthentication.php
typo3/sysext/core/Classes/Authentication/BackendUserAuthentication.php
typo3/sysext/core/Classes/Cache/Backend/FileBackend.php
typo3/sysext/core/Classes/Category/Collection/CategoryCollection.php
typo3/sysext/core/Classes/Charset/CharsetConverter.php
typo3/sysext/core/Classes/Collection/AbstractRecordCollection.php
typo3/sysext/core/Classes/Collection/RecordCollectionRepository.php
typo3/sysext/core/Classes/Collection/StaticRecordCollection.php
typo3/sysext/core/Classes/Configuration/TypoScript/ConditionMatching/AbstractConditionMatcher.php
typo3/sysext/core/Classes/Core/Bootstrap.php
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Classes/Database/DatabaseConnection.php
typo3/sysext/core/Classes/Database/PreparedStatement.php
typo3/sysext/core/Classes/Database/QueryGenerator.php
typo3/sysext/core/Classes/Database/QueryView.php
typo3/sysext/core/Classes/Database/ReferenceIndex.php
typo3/sysext/core/Classes/Database/RelationHandler.php
typo3/sysext/core/Classes/Database/SoftReferenceIndex.php
typo3/sysext/core/Classes/Error/ErrorHandler.php
typo3/sysext/core/Classes/FrontendEditing/FrontendEditingController.php
typo3/sysext/core/Classes/Html/HtmlParser.php
typo3/sysext/core/Classes/Html/RteHtmlParser.php
typo3/sysext/core/Classes/Imaging/GraphicalFunctions.php
typo3/sysext/core/Classes/Integrity/DatabaseIntegrityCheck.php
typo3/sysext/core/Classes/Localization/Parser/XliffParser.php
typo3/sysext/core/Classes/Locking/Locker.php
typo3/sysext/core/Classes/Log/LogRecord.php
typo3/sysext/core/Classes/Resource/AbstractRepository.php
typo3/sysext/core/Classes/Resource/Collection/CategoryBasedFileCollection.php
typo3/sysext/core/Classes/Resource/FileReference.php
typo3/sysext/core/Classes/Resource/FileRepository.php
typo3/sysext/core/Classes/Resource/Hook/FileInfoHook.php
typo3/sysext/core/Classes/Resource/Index/FileIndexRepository.php
typo3/sysext/core/Classes/Resource/Index/MetaDataRepository.php
typo3/sysext/core/Classes/Resource/ProcessedFileRepository.php
typo3/sysext/core/Classes/Resource/Processing/FileDeletionAspect.php
typo3/sysext/core/Classes/Resource/ResourceCompressor.php
typo3/sysext/core/Classes/Resource/ResourceFactory.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Resource/Service/FrontendContentAdapterService.php
typo3/sysext/core/Classes/Resource/Service/IndexerService.php
typo3/sysext/core/Classes/Resource/Service/UserFileMountService.php
typo3/sysext/core/Classes/TimeTracker/TimeTracker.php
typo3/sysext/core/Classes/Tree/TableConfiguration/DatabaseTreeDataProvider.php
typo3/sysext/core/Classes/Tree/TableConfiguration/TreeDataProviderFactory.php
typo3/sysext/core/Classes/TypoScript/ExtendedTemplateService.php
typo3/sysext/core/Classes/TypoScript/TemplateService.php
typo3/sysext/core/Classes/Utility/DiffUtility.php
typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php
typo3/sysext/core/Classes/Utility/GeneralUtility.php
typo3/sysext/core/Classes/Utility/MathUtility.php
typo3/sysext/core/Classes/Utility/RootlineUtility.php
typo3/sysext/core/Classes/Utility/VersionNumberUtility.php
typo3/sysext/core/Classes/Versioning/VersionState.php
typo3/sysext/core/Tests/Functional/DataHandling/InlineRelationalRecordEditing/AbstractTestCase.php
typo3/sysext/core/Tests/Unit/Utility/VersionNumberUtilityTest.php
typo3/sysext/css_styled_content/Classes/Controller/CssStyledContentController.php
typo3/sysext/dbal/Classes/Controller/ModuleController.php
typo3/sysext/dbal/Classes/Database/DatabaseConnection.php
typo3/sysext/dbal/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/extbase/Classes/Configuration/AbstractConfigurationManager.php
typo3/sysext/extbase/Classes/Configuration/BackendConfigurationManager.php
typo3/sysext/extbase/Classes/Core/ModuleRunner.php
typo3/sysext/extbase/Classes/DomainObject/AbstractDomainObject.php
typo3/sysext/extbase/Classes/Mvc/Controller/AbstractController.php
typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php
typo3/sysext/extbase/Classes/Persistence/Generic/Backend.php
typo3/sysext/extbase/Classes/Persistence/Generic/Mapper/DataMapper.php
typo3/sysext/extbase/Classes/Persistence/Generic/PropertyType.php
typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php
typo3/sysext/extbase/Classes/Persistence/Generic/Typo3QuerySettings.php
typo3/sysext/extbase/Classes/Property/Mapper.php
typo3/sysext/extbase/Classes/Property/TypeConverter/DateTimeConverter.php
typo3/sysext/extbase/Classes/Property/TypeConverter/IntegerConverter.php
typo3/sysext/extbase/Classes/Scheduler/Task.php
typo3/sysext/extbase/Classes/Service/CacheService.php
typo3/sysext/extbase/Classes/Service/ExtensionService.php
typo3/sysext/extbase/Classes/Utility/ArrayUtility.php
typo3/sysext/extensionmanager/Classes/Domain/Model/Extension.php
typo3/sysext/extensionmanager/Classes/Domain/Repository/ExtensionRepository.php
typo3/sysext/extensionmanager/Classes/Domain/Repository/RepositoryRepository.php
typo3/sysext/extensionmanager/Classes/Utility/Importer/ExtensionListUtility.php
typo3/sysext/extensionmanager/Classes/Utility/Repository/Helper.php
typo3/sysext/feedit/Classes/FrontendEditPanel.php
typo3/sysext/felogin/Classes/Controller/FrontendLoginController.php
typo3/sysext/filelist/Classes/FileList.php
typo3/sysext/fluid/Classes/Core/Parser/SyntaxTree/BooleanNode.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Security/IfHasRoleViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/TableListViewHelper.php
typo3/sysext/fluid/Classes/ViewHelpers/Be/Widget/Controller/PaginateController.php
typo3/sysext/fluid/Classes/ViewHelpers/Widget/Controller/PaginateController.php
typo3/sysext/form/Classes/Domain/Factory/TypoScriptFactory.php
typo3/sysext/form/Classes/Domain/Model/Attribute/AbstractAttribute.php
typo3/sysext/form/Classes/Domain/Model/Attribute/AttributesAttribute.php
typo3/sysext/form/Classes/Domain/Model/Attribute/CheckedAttribute.php
typo3/sysext/form/Classes/Domain/Model/Attribute/ColsAttribute.php
typo3/sysext/form/Classes/Domain/Model/Attribute/DisabledAttribute.php
typo3/sysext/form/Classes/Domain/Model/Attribute/MaxlengthAttribute.php
typo3/sysext/form/Classes/Domain/Model/Attribute/MultipleAttribute.php
typo3/sysext/form/Classes/Domain/Model/Attribute/ReadonlyAttribute.php
typo3/sysext/form/Classes/Domain/Model/Attribute/RowsAttribute.php
typo3/sysext/form/Classes/Domain/Model/Attribute/SelectedAttribute.php
typo3/sysext/form/Classes/Domain/Model/Attribute/SizeAttribute.php
typo3/sysext/form/Classes/Domain/Model/Attribute/TabindexAttribute.php
typo3/sysext/form/Classes/Domain/Model/Content.php
typo3/sysext/form/Classes/Domain/Model/Json/AbstractJsonElement.php
typo3/sysext/form/Classes/Domain/Model/Json/CheckboxGroupJsonElement.php
typo3/sysext/form/Classes/Domain/Model/Json/FormJsonElement.php
typo3/sysext/form/Classes/Domain/Model/Json/NameJsonElement.php
typo3/sysext/form/Classes/Domain/Model/Json/RadioGroupJsonElement.php
typo3/sysext/form/Classes/Domain/Model/Json/SelectJsonElement.php
typo3/sysext/form/Classes/Domain/Repository/ContentRepository.php
typo3/sysext/form/Classes/Filter/IntegerFilter.php
typo3/sysext/form/Classes/PostProcess/PostProcessor.php
typo3/sysext/form/Classes/Request.php
typo3/sysext/form/Classes/Utility/TypoScriptToJsonConverter.php
typo3/sysext/form/Classes/Validation/FileMaximumSizeValidator.php
typo3/sysext/form/Classes/Validation/FileMinimumSizeValidator.php
typo3/sysext/form/Classes/Validation/GreaterThanValidator.php
typo3/sysext/form/Classes/Validation/IntegerValidator.php
typo3/sysext/form/Classes/Validation/LengthValidator.php
typo3/sysext/form/Classes/View/Confirmation/Element/AbstractElementView.php
typo3/sysext/form/Classes/View/Form/Element/AbstractElementView.php
typo3/sysext/form/Classes/View/Mail/Html/Element/AbstractElementView.php
typo3/sysext/form/Classes/View/Mail/Plain/Element/AbstractElementView.php
typo3/sysext/frontend/Classes/Authentication/FrontendUserAuthentication.php
typo3/sysext/frontend/Classes/Category/Collection/CategoryCollection.php
typo3/sysext/frontend/Classes/Configuration/TypoScript/ConditionMatching/ConditionMatcher.php
typo3/sysext/frontend/Classes/ContentObject/ColumnsContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ContentContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ContentObjectRenderer.php
typo3/sysext/frontend/Classes/ContentObject/FilesContentObject.php
typo3/sysext/frontend/Classes/ContentObject/FormContentObject.php
typo3/sysext/frontend/Classes/ContentObject/HorizontalRulerContentObject.php
typo3/sysext/frontend/Classes/ContentObject/ImageTextContentObject.php
typo3/sysext/frontend/Classes/ContentObject/MediaContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/AbstractMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/GraphicalMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/Menu/ImageMenuContentObject.php
typo3/sysext/frontend/Classes/ContentObject/SearchResultContentObject.php
typo3/sysext/frontend/Classes/Controller/ShowImageController.php
typo3/sysext/frontend/Classes/Controller/TranslationStatusController.php
typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php
typo3/sysext/frontend/Classes/Imaging/GifBuilder.php
typo3/sysext/frontend/Classes/Page/FramesetRenderer.php
typo3/sysext/frontend/Classes/Page/PageGenerator.php
typo3/sysext/frontend/Classes/Page/PageRepository.php
typo3/sysext/frontend/Classes/Plugin/AbstractPlugin.php
typo3/sysext/frontend/Classes/View/AdminPanelView.php
typo3/sysext/func/Classes/Controller/PageFunctionsController.php
typo3/sysext/impexp/Classes/Controller/ImportExportController.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/impexp/Classes/LocalPageTree.php
typo3/sysext/impexp/Classes/Task/ImportExportTask.php
typo3/sysext/indexed_search/Classes/Controller/IndexedPagesController.php
typo3/sysext/indexed_search/Classes/Controller/IndexingStatisticsController.php
typo3/sysext/indexed_search/Classes/Controller/ModuleController.php
typo3/sysext/indexed_search/Classes/Controller/SearchController.php
typo3/sysext/indexed_search/Classes/Controller/SearchFormController.php
typo3/sysext/indexed_search/Classes/Domain/Repository/IndexSearchRepository.php
typo3/sysext/indexed_search/Classes/Example/CrawlerHook.php
typo3/sysext/indexed_search/Classes/FileContentParser.php
typo3/sysext/indexed_search/Classes/Hook/CrawlerHook.php
typo3/sysext/indexed_search/Classes/Indexer.php
typo3/sysext/indexed_search/Classes/ViewHelpers/PageBrowsingViewHelper.php
typo3/sysext/indexed_search/ext_localconf.php
typo3/sysext/info/Classes/Controller/InfoModuleController.php
typo3/sysext/install/Classes/Controller/Action/Tool/CleanUp.php
typo3/sysext/install/Classes/Updates/AddFlexFormsToAclUpdate.php
typo3/sysext/install/Classes/Updates/CompressionLevelUpdate.php
typo3/sysext/install/Classes/Updates/FilePermissionUpdate.php
typo3/sysext/install/Classes/Updates/FileTableSplittingUpdate.php
typo3/sysext/install/Classes/Updates/FilemountUpdateWizard.php
typo3/sysext/install/Classes/Updates/MediaFlexformUpdate.php
typo3/sysext/install/Classes/Updates/MigrateWorkspacesUpdate.php
typo3/sysext/install/Classes/Updates/ReferenceIntegrityUpdateWizard.php
typo3/sysext/install/Classes/Updates/RteMagicImagesUpdateWizard.php
typo3/sysext/linkvalidator/Classes/LinkAnalyzer.php
typo3/sysext/linkvalidator/Classes/Linktype/InternalLinktype.php
typo3/sysext/linkvalidator/Classes/Linktype/LinkHandler.php
typo3/sysext/linkvalidator/Classes/Report/LinkValidatorReport.php
typo3/sysext/linkvalidator/Classes/Task/ValidatorTask.php
typo3/sysext/linkvalidator/Classes/Task/ValidatorTaskAdditionalFieldProvider.php
typo3/sysext/lowlevel/Classes/CleanFlexformCommand.php
typo3/sysext/lowlevel/Classes/CleanerCommand.php
typo3/sysext/lowlevel/Classes/DeletedRecordsCommand.php
typo3/sysext/lowlevel/Classes/MissingRelationsCommand.php
typo3/sysext/lowlevel/Classes/OrphanRecordsCommand.php
typo3/sysext/lowlevel/Classes/VersionsCommand.php
typo3/sysext/lowlevel/Classes/View/DatabaseIntegrityView.php
typo3/sysext/opendocs/Classes/Controller/OpendocsController.php
typo3/sysext/perm/Classes/Controller/PermissionAjaxController.php
typo3/sysext/perm/Classes/Controller/PermissionModuleController.php
typo3/sysext/recordlist/Classes/Browser/ElementBrowser.php
typo3/sysext/recordlist/Classes/Controller/ElementBrowserController.php
typo3/sysext/recordlist/Classes/RecordList.php
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php
typo3/sysext/recycler/Classes/Controller/RecyclerAjaxController.php
typo3/sysext/recycler/Classes/Controller/RecyclerModuleController.php
typo3/sysext/recycler/Classes/Domain/Model/DeletedRecords.php
typo3/sysext/recycler/Classes/Utility/RecyclerUtility.php
typo3/sysext/reports/Classes/Report/Status/ConfigurationStatus.php
typo3/sysext/rsaauth/Classes/Backend/PhpBackend.php
typo3/sysext/rsaauth/Classes/Storage/SplitStorage.php
typo3/sysext/rtehtmlarea/Classes/BrowseLinks.php
typo3/sysext/rtehtmlarea/Classes/Controller/BrowseLinksController.php
typo3/sysext/rtehtmlarea/Classes/Controller/FrontendRteController.php
typo3/sysext/rtehtmlarea/Classes/Extension/Acronym.php
typo3/sysext/rtehtmlarea/Classes/FolderTree.php
typo3/sysext/rtehtmlarea/Classes/ImageFolderTree.php
typo3/sysext/rtehtmlarea/Classes/PageTree.php
typo3/sysext/rtehtmlarea/Classes/RteHtmlAreaBase.php
typo3/sysext/rtehtmlarea/Classes/SelectImage.php
typo3/sysext/rtehtmlarea/Classes/User.php
typo3/sysext/saltedpasswords/Classes/Salt/AbstractSalt.php
typo3/sysext/saltedpasswords/Classes/Salt/BlowfishSalt.php
typo3/sysext/saltedpasswords/Classes/SaltedPasswordService.php
typo3/sysext/saltedpasswords/Classes/Task/BulkUpdateFieldProvider.php
typo3/sysext/saltedpasswords/Tests/Unit/Salt/SaltFactoryTest.php
typo3/sysext/scheduler/Classes/Controller/SchedulerModuleController.php
typo3/sysext/scheduler/Classes/CronCommand/CronCommand.php
typo3/sysext/scheduler/Classes/CronCommand/NormalizeCommand.php
typo3/sysext/scheduler/Classes/Example/SleepTaskAdditionalFieldProvider.php
typo3/sysext/scheduler/Classes/Scheduler.php
typo3/sysext/scheduler/Classes/Task/AbstractTask.php
typo3/sysext/scheduler/Classes/Task/FileStorageExtractionAdditionalFieldProvider.php
typo3/sysext/scheduler/Classes/Task/FileStorageExtractionTask.php
typo3/sysext/scheduler/Classes/Task/FileStorageIndexingAdditionalFieldProvider.php
typo3/sysext/scheduler/Classes/Task/FileStorageIndexingTask.php
typo3/sysext/scheduler/Classes/Task/RecyclerGarbageCollectionAdditionalFieldProvider.php
typo3/sysext/scheduler/Classes/Task/RecyclerGarbageCollectionTask.php
typo3/sysext/scheduler/Classes/Task/TableGarbageCollectionAdditionalFieldProvider.php
typo3/sysext/scheduler/Documentation/DevelopersGuide/CreatingTasks/Index.rst
typo3/sysext/scheduler/cli/scheduler_cli_dispatch.php
typo3/sysext/setup/Classes/Controller/SetupModuleController.php
typo3/sysext/sv/Classes/AuthenticationService.php
typo3/sysext/sys_action/Classes/ActionList.php
typo3/sysext/sys_action/Classes/ActionTask.php
typo3/sysext/t3editor/Classes/CodeCompletion.php
typo3/sysext/t3editor/Classes/FormWizard.php
typo3/sysext/t3editor/Classes/Hook/FileEditHook.php
typo3/sysext/t3editor/Classes/Hook/TypoScriptTemplateInfoHook.php
typo3/sysext/t3editor/res/tsref/tsref.xml
typo3/sysext/taskcenter/Classes/Controller/TaskModuleController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateModuleController.php
typo3/sysext/tstemplate/Classes/Controller/TypoScriptTemplateObjectBrowserModuleFunctionController.php
typo3/sysext/version/Classes/Controller/VersionModuleController.php
typo3/sysext/version/Classes/Dependency/ElementEntity.php
typo3/sysext/version/Classes/Hook/DataHandlerHook.php
typo3/sysext/version/Classes/Hook/PreviewHook.php
typo3/sysext/version/Classes/Utility/WorkspacesUtility.php
typo3/sysext/viewpage/Classes/Controller/ViewModuleController.php
typo3/sysext/wizard_crpages/Classes/Controller/CreatePagesWizardModuleFunctionController.php
typo3/sysext/workspaces/Classes/Controller/AbstractController.php
typo3/sysext/workspaces/Classes/Controller/PreviewController.php
typo3/sysext/workspaces/Classes/Controller/ReviewController.php
typo3/sysext/workspaces/Classes/ExtDirect/ActionHandler.php
typo3/sysext/workspaces/Classes/ExtDirect/ExtDirectServer.php
typo3/sysext/workspaces/Classes/ExtDirect/ToolbarMenu.php
typo3/sysext/workspaces/Classes/ExtDirect/WorkspaceSelectorToolbarItem.php
typo3/sysext/workspaces/Classes/Hook/DataHandlerHook.php
typo3/sysext/workspaces/Classes/Service/AutoPublishService.php
typo3/sysext/workspaces/Classes/Service/GridDataService.php
typo3/sysext/workspaces/Classes/Service/StagesService.php
typo3/sysext/workspaces/Classes/Service/WorkspaceService.php
typo3/sysext/workspaces/Classes/Task/CleanupPreviewLinkTask.php

index cd6f9ed..4cf1670 100644 (file)
@@ -51,7 +51,7 @@ class localPageTree extends \TYPO3\CMS\Backend\Tree\View\BrowseTreeView {
         * @todo Define visibility
         */
        public function printTree($treeArr = '') {
-               $titleLen = intval($GLOBALS['BE_USER']->uc['titleLen']);
+               $titleLen = (int)$GLOBALS['BE_USER']->uc['titleLen'];
                if (!is_array($treeArr)) {
                        $treeArr = $this->tree;
                }
@@ -315,4 +315,4 @@ class TBE_FolderTree extends localFolderTree {
                }
        }
 
-}
\ No newline at end of file
+}
index de5feb6..0b97a12 100644 (file)
@@ -87,7 +87,7 @@ class ext_posMap_pages extends \TYPO3\CMS\Backend\Tree\View\PagePositionMap {
         * @todo Define visibility
         */
        public function linkPageTitle($str, $rec) {
-               $url = \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('uid' => intval($rec['uid']), 'moveUid' => $GLOBALS['SOBE']->moveUid));
+               $url = \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('uid' => (int)$rec['uid'], 'moveUid' => $GLOBALS['SOBE']->moveUid));
                return '<a href="' . htmlspecialchars($url) . '">' . $str . '</a>';
        }
 
@@ -127,7 +127,7 @@ class ext_posMap_tt_content extends \TYPO3\CMS\Backend\Tree\View\PagePositionMap
         * @todo Define visibility
         */
        public function linkPageTitle($str, $rec) {
-               $url = \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('uid' => intval($rec['uid']), 'moveUid' => $GLOBALS['SOBE']->moveUid));
+               $url = \TYPO3\CMS\Core\Utility\GeneralUtility::linkThisScript(array('uid' => (int)$rec['uid'], 'moveUid' => $GLOBALS['SOBE']->moveUid));
                return '<a href="' . htmlspecialchars($url) . '">' . $str . '</a>';
        }
 
index d534c9f..5ea997a 100644 (file)
@@ -150,7 +150,7 @@ class ClickMenu {
         */
        public function init() {
                // Setting GPvars:
-               $this->cmLevel = intval(GeneralUtility::_GP('cmLevel'));
+               $this->cmLevel = (int)GeneralUtility::_GP('cmLevel');
                $this->CB = GeneralUtility::_GP('CB');
                if (GeneralUtility::_GP('ajax')) {
                        $this->ajax = 1;
@@ -223,7 +223,7 @@ class ClickMenu {
         * @todo Define visibility
         */
        public function printDBClickMenu($table, $uid) {
-               $uid = intval($uid);
+               $uid = (int)$uid;
                // Get record:
                $this->rec = BackendUtility::getRecordWSOL($table, $uid);
                $menuItems = array();
@@ -241,7 +241,7 @@ class ClickMenu {
                $l10nOverlay = FALSE;
                // Should only be performed for overlay-records within the same table
                if (BackendUtility::isTableLocalizable($table) && !isset($GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'])) {
-                       $l10nOverlay = intval($this->rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]) != 0;
+                       $l10nOverlay = (int)$this->rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] != 0;
                }
                // If record found (or root), go ahead and fill the $menuItems array which will contain data for the elements to render.
                if (is_array($this->rec) || $root) {
@@ -522,7 +522,7 @@ class ClickMenu {
         */
        public function DB_moveWizard($table, $uid, $rec) {
                // Hardcoded field for tt_content elements.
-               $url = 'move_el.php?table=' . $table . '&uid=' . $uid . ($table == 'tt_content' ? '&sys_language_uid=' . intval($rec['sys_language_uid']) : '');
+               $url = 'move_el.php?table=' . $table . '&uid=' . $uid . ($table == 'tt_content' ? '&sys_language_uid=' . (int)$rec['sys_language_uid'] : '');
                return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_moveWizard' . ($table == 'pages' ? '_page' : ''))), $this->excludeIcon(IconUtility::getSpriteIcon('actions-' . ($table === 'pages' ? 'page' : 'document') . '-move')), $this->urlRefForCM($url, 'returnUrl'), 0);
        }
 
@@ -541,7 +541,7 @@ class ClickMenu {
                $tmpTSc = BackendUtility::getModTSconfig($this->pageinfo['uid'], 'mod.web_list');
                $tmpTSc = $tmpTSc['properties']['newContentWiz.']['overrideWithExtension'];
                $newContentWizScriptPath = ExtensionManagementUtility::isLoaded($tmpTSc) ? ExtensionManagementUtility::extRelPath($tmpTSc) . 'mod1/db_new_content_el.php' : 'sysext/cms/layout/db_new_content_el.php';
-               $url = $table == 'pages' || !ExtensionManagementUtility::isLoaded('cms') ? 'db_new.php?id=' . $uid . '&pagesOnly=1' : $newContentWizScriptPath . '?id=' . $rec['pid'] . '&sys_language_uid=' . intval($rec['sys_language_uid']);
+               $url = $table == 'pages' || !ExtensionManagementUtility::isLoaded('cms') ? 'db_new.php?id=' . $uid . '&pagesOnly=1' : $newContentWizScriptPath . '?id=' . $rec['pid'] . '&sys_language_uid=' . (int)$rec['sys_language_uid'];
                return $this->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLL('CM_newWizard')), $this->excludeIcon(IconUtility::getSpriteIcon('actions-' . ($table === 'pages' ? 'page' : 'document') . '-new')), $this->urlRefForCM($url, 'returnUrl'), 0);
        }
 
@@ -594,7 +594,7 @@ class ClickMenu {
                        $theIcon = 'actions-page-open';
                        $this->editPageIconSet = 1;
                        if ($GLOBALS['BE_USER']->uc['classicPageEditMode'] || !ExtensionManagementUtility::isLoaded('cms')) {
-                               $addParam = '&editRegularContentFromId=' . intval($this->iParts[1]);
+                               $addParam = '&editRegularContentFromId=' . (int)$this->iParts[1];
                        } else {
                                $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'alt_doc.php?returnUrl=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'&edit[' . $table . '][' . $uid . ']=edit' . $addParam . '\';}';
                        }
@@ -617,7 +617,7 @@ class ClickMenu {
        public function DB_new($table, $uid) {
                $editOnClick = '';
                $loc = 'top.content.list_frame';
-               $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'' . ($this->listFrame ? 'alt_doc.php?returnUrl=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'&edit[' . $table . '][-' . $uid . ']=new\'' : 'db_new.php?id=' . intval($uid) . '\'') . ';}';
+               $editOnClick = 'if(' . $loc . '){' . $loc . '.location.href=top.TS.PATH_typo3+\'' . ($this->listFrame ? 'alt_doc.php?returnUrl=\'+top.rawurlencode(' . $this->frameLocation(($loc . '.document')) . '.pathname+' . $this->frameLocation(($loc . '.document')) . '.search)+\'&edit[' . $table . '][-' . $uid . ']=new\'' : 'db_new.php?id=' . (int)$uid . '\'') . ';}';
                return $this->linkItem($this->label('new'), $this->excludeIcon(IconUtility::getSpriteIcon('actions-' . ($table === 'pages' ? 'page' : 'document') . '-new')), $editOnClick . 'return hideCM();');
        }
 
@@ -674,7 +674,7 @@ class ClickMenu {
                                var useNode = {
                                        attributes: {
                                                nodeData: {
-                                                       id: ' . intval($page_id) . '
+                                                       id: ' . (int)$page_id . '
                                                }
                                        }
                                };
index 03650c9..e2c12e4 100644 (file)
@@ -387,7 +387,7 @@ class Clipboard {
                                                                <tr>
                                                                        <td class="' . $bgColClass . '">' . $this->linkItemText(IconUtility::getSpriteIconForRecord($table, $rec, array('style' => 'margin: 0 20px;', 'title' => htmlspecialchars(BackendUtility::getRecordIconAltText($rec, $table)))), $rec, $table) . '</td>
                                                                        <td class="' . $bgColClass . '" nowrap="nowrap" width="95%">&nbsp;' . $this->linkItemText(htmlspecialchars(GeneralUtility::fixed_lgd_cs(BackendUtility::getRecordTitle($table, $rec), $GLOBALS['BE_USER']->uc['titleLen'])), $rec, $table) . ($pad == 'normal' ? ' <strong>(' . ($this->clipData['normal']['mode'] == 'copy' ? $this->clLabel('copy', 'cm') : $this->clLabel('cut', 'cm')) . ')</strong>' : '') . '&nbsp;</td>
-                                                                       <td class="' . $bgColClass . '" align="center" nowrap="nowrap">' . '<a href="#" onclick="' . htmlspecialchars(('top.launchView(\'' . $table . '\', \'' . intval($uid) . '\'); return false;')) . '">' . IconUtility::getSpriteIcon('actions-document-info', array('title' => $this->clLabel('info', 'cm'))) . '</a>' . '<a href="' . htmlspecialchars($this->removeUrl($table, $uid)) . '#clip_head">' . IconUtility::getSpriteIcon('actions-selection-delete', array('title' => $this->clLabel('removeItem'))) . '</a>' . '</td>
+                                                                       <td class="' . $bgColClass . '" align="center" nowrap="nowrap">' . '<a href="#" onclick="' . htmlspecialchars(('top.launchView(\'' . $table . '\', \'' . (int)$uid . '\'); return false;')) . '">' . IconUtility::getSpriteIcon('actions-document-info', array('title' => $this->clLabel('info', 'cm'))) . '</a>' . '<a href="' . htmlspecialchars($this->removeUrl($table, $uid)) . '#clip_head">' . IconUtility::getSpriteIcon('actions-selection-delete', array('title' => $this->clLabel('removeItem'))) . '</a>' . '</td>
                                                                </tr>';
                                                        $localizationData = $this->getLocalizations($table, $rec, $bgColClass, $pad);
                                                        if ($localizationData) {
@@ -427,7 +427,7 @@ class Clipboard {
                $tcaCtrl = $GLOBALS['TCA'][$table]['ctrl'];
                if ($table != 'pages' && BackendUtility::isTableLocalizable($table) && !$tcaCtrl['transOrigPointerTable']) {
                        $where = array();
-                       $where[] = $tcaCtrl['transOrigPointerField'] . '=' . intval($parentRec['uid']);
+                       $where[] = $tcaCtrl['transOrigPointerField'] . '=' . (int)$parentRec['uid'];
                        $where[] = $tcaCtrl['languageField'] . '<>0';
                        if (isset($tcaCtrl['delete']) && $tcaCtrl['delete']) {
                                $where[] = $tcaCtrl['delete'] . '=0';
@@ -880,7 +880,7 @@ class Clipboard {
         */
        public function makePasteCmdArray($ref, $CMD, array $update = NULL) {
                list($pTable, $pUid) = explode('|', $ref);
-               $pUid = intval($pUid);
+               $pUid = (int)$pUid;
                // pUid must be set and if pTable is not set (that means paste ALL elements)
                // the uid MUST be positive/zero (pointing to page id)
                if ($pTable || $pUid >= 0) {
index 05ff63f..5eff0f8 100644 (file)
@@ -110,7 +110,7 @@ class TranslationConfigurationProvider {
                                        if ($trTable !== $table || $row[$GLOBALS['TCA'][$table]['ctrl']['languageField']] <= 0) {
                                                if ($trTable !== $table || $row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] == 0) {
                                                        // Look for translations of this record, index by language field value:
-                                                       $translationsTemp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($selFieldList ? $selFieldList : 'uid,' . $GLOBALS['TCA'][$trTable]['ctrl']['languageField'], $trTable, $GLOBALS['TCA'][$trTable]['ctrl']['transOrigPointerField'] . '=' . intval($uid) . ' AND pid=' . intval(($table === 'pages' ? $row['uid'] : $row['pid'])) . ' AND ' . $GLOBALS['TCA'][$trTable]['ctrl']['languageField'] . (!$sys_language_uid ? '>0' : '=' . intval($sys_language_uid)) . BackendUtility::deleteClause($trTable) . BackendUtility::versioningPlaceholderClause($trTable));
+                                                       $translationsTemp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($selFieldList ? $selFieldList : 'uid,' . $GLOBALS['TCA'][$trTable]['ctrl']['languageField'], $trTable, $GLOBALS['TCA'][$trTable]['ctrl']['transOrigPointerField'] . '=' . (int)$uid . ' AND pid=' . (int)($table === 'pages' ? $row['uid'] : $row['pid']) . ' AND ' . $GLOBALS['TCA'][$trTable]['ctrl']['languageField'] . (!$sys_language_uid ? '>0' : '=' . (int)$sys_language_uid) . BackendUtility::deleteClause($trTable) . BackendUtility::versioningPlaceholderClause($trTable));
                                                        $translations = array();
                                                        $translations_errors = array();
                                                        foreach ($translationsTemp as $r) {
index ac4e3bf..ca89313 100644 (file)
@@ -142,7 +142,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
                $editStatement = GeneralUtility::_GP('edit');
                $commandStatement = GeneralUtility::_GP('cmd');
                // Determine id from module that was called with an id:
-               if ($id = intval(GeneralUtility::_GP('id'))) {
+               if ($id = (int)GeneralUtility::_GP('id')) {
                        $pageId = $id;
                } elseif (is_array($editStatement)) {
                        list($table, $uidAndAction) = each($editStatement);
@@ -185,7 +185,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
         */
        protected function getPageIdByRecord($table, $id, $ignoreTable = FALSE) {
                $pageId = 0;
-               $id = (int) $id;
+               $id = (int)$id;
                if ($table && $id) {
                        if (($ignoreTable || $table === 'pages') && $id >= 0) {
                                $pageId = $id;
@@ -206,7 +206,7 @@ class ConditionMatcher extends \TYPO3\CMS\Core\Configuration\TypoScript\Conditio
         */
        protected function isNewPageWithPageId($pageId) {
                if (isset($GLOBALS['SOBE']) && $GLOBALS['SOBE'] instanceof \TYPO3\CMS\Backend\Controller\EditDocumentController) {
-                       $pageId = intval($pageId);
+                       $pageId = (int)$pageId;
                        $elementsData = $GLOBALS['SOBE']->elementsData;
                        $data = $GLOBALS['SOBE']->data;
                        // If saving a new page record:
index 44fd31d..bf9768c 100644 (file)
@@ -205,7 +205,7 @@ abstract class AbstractContextMenuDataProvider {
                                        $action->setClass(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconClasses($actionConfiguration['spriteIcon']));
                                }
                        }
-                       $actionCollection->offsetSet($level . intval($index), $action);
+                       $actionCollection->offsetSet($level . (int)$index, $action);
                        $actionCollection->ksort();
                }
                return $actionCollection;
index 0bbfac3..d5698cf 100644 (file)
@@ -85,7 +85,7 @@ class BackendController {
         */
        public function __construct() {
                // Set debug flag for BE development only
-               $this->debug = intval($GLOBALS['TYPO3_CONF_VARS']['BE']['debug']) === 1;
+               $this->debug = (int)$GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] === 1;
                // Initializes the backend modules structure for use later.
                $this->moduleLoader = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Module\\ModuleLoader');
                $this->moduleLoader->load($GLOBALS['TBE_MODULES']);
@@ -129,8 +129,8 @@ class BackendController {
                $this->toolbarItems = array();
                $this->initializeCoreToolbarItems();
                $this->menuWidth = $this->menuWidthDefault;
-               if (isset($GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW']) && (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'] != (int) $this->menuWidth) {
-                       $this->menuWidth = (int) $GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'];
+               if (isset($GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW']) && (int)$GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'] != (int)$this->menuWidth) {
+                       $this->menuWidth = (int)$GLOBALS['TBE_STYLES']['dims']['leftMenuFrameW'];
                }
                $this->executeHook('constructPostProcess');
        }
@@ -484,8 +484,8 @@ class BackendController {
                        'veriCode' => $GLOBALS['BE_USER']->veriCode(),
                        'denyFileTypes' => PHP_EXTENSIONS_DEFAULT,
                        'moduleMenuWidth' => $this->menuWidth - 1,
-                       'topBarHeight' => isset($GLOBALS['TBE_STYLES']['dims']['topFrameH']) ? intval($GLOBALS['TBE_STYLES']['dims']['topFrameH']) : 30,
-                       'showRefreshLoginPopup' => isset($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) ? intval($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) : FALSE,
+                       'topBarHeight' => isset($GLOBALS['TBE_STYLES']['dims']['topFrameH']) ? (int)$GLOBALS['TBE_STYLES']['dims']['topFrameH'] : 30,
+                       'showRefreshLoginPopup' => isset($GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup']) ? (int)$GLOBALS['TYPO3_CONF_VARS']['BE']['showRefreshLoginPopup'] : FALSE,
                        'listModulePath' => ExtensionManagementUtility::isLoaded('recordlist') ? ExtensionManagementUtility::extRelPath('recordlist') . 'mod1/' : '',
                        'debugInWindow' => $GLOBALS['BE_USER']->uc['debugInWindow'] ? 1 : 0,
                        'ContextHelpWindows' => array(
@@ -516,7 +516,7 @@ class BackendController {
         *
         * Used in main modules with a frameset for submodules to keep the ID between modules
         * Typically that is set by something like this in a Web>* sub module:
-        *              if (top.fsMod) top.fsMod.recentIds["web"] = "\'.intval($this->id).\'";
+        *              if (top.fsMod) top.fsMod.recentIds["web"] = "\'.(int)$this->id.\'";
         *              if (top.fsMod) top.fsMod.recentIds["file"] = "...(file reference/string)...";
         */
        function fsModules() {  //
@@ -564,13 +564,13 @@ class BackendController {
                                // Setting JS code to open editing:
                                $this->js .= '
                // Load page to edit:
-       window.setTimeout("top.loadEditId(' . intval($editRecord['uid']) . ');", 500);
+       window.setTimeout("top.loadEditId(' . (int)$editRecord['uid'] . ');", 500);
                        ';
                                // Checking page edit parameter:
                                if (!$GLOBALS['BE_USER']->getTSConfigVal('options.bookmark_onEditId_dontSetPageTree')) {
                                        $bookmarkKeepExpanded = $GLOBALS['BE_USER']->getTSConfigVal('options.bookmark_onEditId_keepExistingExpanded');
                                        // Expanding page tree:
-                                       BackendUtility::openPageTree(intval($editRecord['pid']), !$bookmarkKeepExpanded);
+                                       BackendUtility::openPageTree((int)$editRecord['pid'], !$bookmarkKeepExpanded);
                                }
                        } else {
                                $this->js .= '
index 979c4cb..d4871ba 100644 (file)
@@ -74,7 +74,7 @@ class BackendLayoutWizardController {
                        throw new \InvalidArgumentException('Hmac Validation failed for backend_layout wizard', 1385811397);
                }
                $this->md5ID = $this->P['md5ID'];
-               $uid = intval($this->P['uid']);
+               $uid = (int)$this->P['uid'];
                // Initialize document object:
                $this->doc = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Template\\DocumentTemplate');
                $this->doc->backPath = $GLOBALS['BACK_PATH'];
@@ -102,7 +102,7 @@ class BackendLayoutWizardController {
                );
                $pageRenderer->addInlineLanguageLabelArray($languageLabels);
                // Select record
-               $record = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($this->P['field'], $this->P['table'], 'uid=' . intval($this->P['uid']));
+               $record = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($this->P['field'], $this->P['table'], 'uid=' . (int)$this->P['uid']);
                if (trim($record[0][$this->P['field']]) == '') {
                        $t3GridData = '[[{colspan:1,rowspan:1,spanned:false,name:\'\'}]]';
                        $colCount = 1;
@@ -132,10 +132,10 @@ class BackendLayoutWizardController {
                                                        $cellString = '{';
                                                        $cellData = array();
                                                        if (isset($column['colspan'])) {
-                                                               $cellData[] = 'colspan:' . intval($column['colspan']);
-                                                               $columnColSpan = intval($column['colspan']);
+                                                               $cellData[] = 'colspan:' . (int)$column['colspan'];
+                                                               $columnColSpan = (int)$column['colspan'];
                                                                if (isset($column['rowspan'])) {
-                                                                       $columnRowSpan = intval($column['rowspan']);
+                                                                       $columnRowSpan = (int)$column['rowspan'];
                                                                        for ($spanRow = 0; $spanRow < $columnRowSpan; $spanRow++) {
                                                                                for ($spanColumn = 0; $spanColumn < $columnColSpan; $spanColumn++) {
                                                                                        $spannedMatrix[$i + $spanRow][$j + $spanColumn] = 1;
@@ -149,14 +149,14 @@ class BackendLayoutWizardController {
                                                        } else {
                                                                $cellData[] = 'colspan:1';
                                                                if (isset($column['rowspan'])) {
-                                                                       $columnRowSpan = intval($column['rowspan']);
+                                                                       $columnRowSpan = (int)$column['rowspan'];
                                                                        for ($spanRow = 0; $spanRow < $columnRowSpan; $spanRow++) {
                                                                                $spannedMatrix[$i + $spanRow][$j] = 1;
                                                                        }
                                                                }
                                                        }
                                                        if (isset($column['rowspan'])) {
-                                                               $cellData[] = 'rowspan:' . intval($column['rowspan']);
+                                                               $cellData[] = 'rowspan:' . (int)$column['rowspan'];
                                                        } else {
                                                                $cellData[] = 'rowspan:1';
                                                        }
index abbdc0e..91a7836 100644 (file)
@@ -143,7 +143,7 @@ class ElementInformationController {
         */
        protected function initDatabaseRecord() {
                $this->type = 'db';
-               $this->uid = intval($this->uid);
+               $this->uid = (int)$this->uid;
 
                // Check permissions and uid value:
                if ($this->uid && $GLOBALS['BE_USER']->check('tables_select', $this->table)) {
@@ -313,7 +313,7 @@ class ElementInformationController {
                foreach ($extraFields as $name => $value) {
                        $rowValue = BackendUtility::getProcessedValueExtra($this->table, $name, $this->row[$name]);
                        if ($name === 'cruser_id' && $rowValue) {
-                               $userTemp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('username, realName', 'be_users', 'uid = ' . intval($rowValue));
+                               $userTemp = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('username, realName', 'be_users', 'uid = ' . (int)$rowValue);
                                if ($userTemp[0]['username'] !== '') {
                                        $rowValue = $userTemp[0]['username'];
                                        if ($userTemp[0]['realName'] !== '') {
@@ -503,7 +503,7 @@ class ElementInformationController {
                $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                        '*',
                        'sys_refindex',
-                       'ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($selectTable, 'sys_refindex') . ' AND ref_uid=' . intval($selectUid) . ' AND deleted=0'
+                       'ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($selectTable, 'sys_refindex') . ' AND ref_uid=' . (int)$selectUid . ' AND deleted=0'
                );
 
                // Compile information for title tag:
@@ -552,7 +552,7 @@ class ElementInformationController {
                $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
                        '*',
                        'sys_refindex',
-                       'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex') . ' AND recuid=' . intval($ref)
+                       'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex') . ' AND recuid=' . (int)$ref
                );
 
                // Compile information for title tag:
index 7276cfa..4211ef2 100644 (file)
@@ -112,8 +112,8 @@ class MoveElementController {
         */
        public function init() {
                // Setting internal vars:
-               $this->sys_language = intval(GeneralUtility::_GP('sys_language'));
-               $this->page_id = intval(GeneralUtility::_GP('uid'));
+               $this->sys_language = (int)GeneralUtility::_GP('sys_language');
+               $this->page_id = (int)GeneralUtility::_GP('uid');
                $this->table = GeneralUtility::_GP('table');
                $this->R_URI = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
                $this->input_moveUid = GeneralUtility::_GP('moveUid');
@@ -167,7 +167,7 @@ class MoveElementController {
                                                $pidPageInfo = BackendUtility::readPageAccess($pageinfo['pid'], $this->perms_clause);
                                                if (is_array($pidPageInfo)) {
                                                        if ($GLOBALS['BE_USER']->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) {
-                                                               $code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('uid' => intval($pageinfo['pid']), 'moveUid' => $this->moveUid))) . '">' . IconUtility::getSpriteIcon('actions-view-go-up') . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
+                                                               $code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('uid' => (int)$pageinfo['pid'], 'moveUid' => $this->moveUid))) . '">' . IconUtility::getSpriteIcon('actions-view-go-up') . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
                                                        } else {
                                                                $code .= IconUtility::getSpriteIconForRecord('pages', $pidPageInfo) . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '<br />';
                                                        }
@@ -215,7 +215,7 @@ class MoveElementController {
                                                if (is_array($pidPageInfo)) {
                                                        if ($GLOBALS['BE_USER']->isInWebMount($pidPageInfo['pid'], $this->perms_clause)) {
                                                                $code .= '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array(
-                                                                       'uid' => intval($pageinfo['pid']),
+                                                                       'uid' => (int)$pageinfo['pid'],
                                                                        'moveUid' => $this->moveUid
                                                                ))) . '">' . IconUtility::getSpriteIcon('actions-view-go-up') . BackendUtility::getRecordTitle('pages', $pidPageInfo, TRUE) . '</a><br />';
                                                        } else {
index 3b56d53..fcde1af 100644 (file)
@@ -120,11 +120,11 @@ class NewContentElementController {
                        $this->include_once = array_merge($this->include_once, $GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses']);
                }
                // Setting internal vars:
-               $this->id = intval(GeneralUtility::_GP('id'));
-               $this->sys_language = intval(GeneralUtility::_GP('sys_language_uid'));
+               $this->id = (int)GeneralUtility::_GP('id');
+               $this->sys_language = (int)GeneralUtility::_GP('sys_language_uid');
                $this->R_URI = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
                $this->colPos = GeneralUtility::_GP('colPos');
-               $this->uid_pid = intval(GeneralUtility::_GP('uid_pid'));
+               $this->uid_pid = (int)GeneralUtility::_GP('uid_pid');
                $this->MCONF['name'] = 'xMOD_db_new_content_el';
                $this->modTSconfig = BackendUtility::getModTSconfig($this->id, 'mod.wizards.newContentElement');
                $config = BackendUtility::getPagesTSconfig($this->id);
index aa517a4..e518e18 100644 (file)
@@ -763,7 +763,7 @@ class EditDocumentController {
                                                                // NOTICE: the id values in this case points to the page uid onto which the
                                                                // record should be create OR (if the id is negativ) to a record from the
                                                                // same table AFTER which to create the record.
-                                                               if (intval($theUid)) {
+                                                               if ((int)$theUid) {
                                                                        // Find parent page on which the new record reside
                                                                        // Less than zero - find parent page
                                                                        if ($theUid < 0) {
@@ -964,7 +964,7 @@ class EditDocumentController {
                                        $buttons['delete'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '" title="' . $GLOBALS['LANG']->getLL('deleteItem', TRUE) . '">' . IconUtility::getSpriteIcon('actions-edit-delete') . '</a>';
                                }
                                // Undo:
-                               $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->firstEl['table'], 'sys_history') . ' AND recuid=' . intval($this->firstEl['uid']), '', 'tstamp DESC', '1');
+                               $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->firstEl['table'], 'sys_history') . ' AND recuid=' . (int)$this->firstEl['uid'], '', 'tstamp DESC', '1');
                                if ($undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes)) {
                                        $aOnClick = 'window.location.href=\'show_rechis.php?element=' . rawurlencode(($this->firstEl['table'] . ':' . $this->firstEl['uid'])) . '&revert=ALL_FIELDS&sumUp=-1&returnUrl=' . rawurlencode($this->R_URI) . '\'; return false;';
                                        $buttons['undo'] = '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"' . ' title="' . htmlspecialchars(sprintf($GLOBALS['LANG']->getLL('undoLastChange'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME'] - $undoButtonR['tstamp']), $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')))) . '">' . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>';
@@ -1157,7 +1157,7 @@ class EditDocumentController {
                                        }
                                        if ($rowCurrent[$transOrigPointerField] || $currentLanguage === '0') {
                                                // Get record in other languages to see what's already available
-                                               $translations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($fetchFields, $table, 'pid=' . intval($pid) . ' AND ' . $languageField . '>0' . ' AND ' . $transOrigPointerField . '=' . intval($rowsByLang[0]['uid']) . BackendUtility::deleteClause($table) . BackendUtility::versioningPlaceholderClause($table));
+                                               $translations = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows($fetchFields, $table, 'pid=' . (int)$pid . ' AND ' . $languageField . '>0' . ' AND ' . $transOrigPointerField . '=' . (int)$rowsByLang[0]['uid'] . BackendUtility::deleteClause($table) . BackendUtility::versioningPlaceholderClause($table));
                                                foreach ($translations as $row) {
                                                        $rowsByLang[$row[$languageField]] = $row;
                                                }
@@ -1201,7 +1201,7 @@ class EditDocumentController {
        public function localizationRedirect($justLocalized) {
                list($table, $orig_uid, $language) = explode(':', $justLocalized);
                if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']) {
-                       $localizedRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid', $table, $GLOBALS['TCA'][$table]['ctrl']['languageField'] . '=' . intval($language) . ' AND ' . $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] . '=' . intval($orig_uid) . BackendUtility::deleteClause($table) . BackendUtility::versioningPlaceholderClause($table));
+                       $localizedRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('uid', $table, $GLOBALS['TCA'][$table]['ctrl']['languageField'] . '=' . (int)$language . ' AND ' . $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] . '=' . (int)$orig_uid . BackendUtility::deleteClause($table) . BackendUtility::versioningPlaceholderClause($table));
                        if (is_array($localizedRecord)) {
                                // Create parameters and finally run the classic page module for creating a new page translation
                                $params = '&edit[' . $table . '][' . $localizedRecord['uid'] . ']=edit';
@@ -1236,7 +1236,7 @@ class EditDocumentController {
                );
                $exQ = $GLOBALS['BE_USER']->isAdmin() ? '' : ' AND sys_language.hidden=0';
                if ($id) {
-                       $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('sys_language.*', 'pages_language_overlay,sys_language', 'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . intval($id) . BackendUtility::deleteClause('pages_language_overlay') . $exQ, 'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag', 'sys_language.title');
+                       $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('sys_language.*', 'pages_language_overlay,sys_language', 'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . (int)$id . BackendUtility::deleteClause('pages_language_overlay') . $exQ, 'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag', 'sys_language.title');
                } else {
                        $rows = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('sys_language.*', 'sys_language', 'sys_language.hidden=0', '', 'sys_language.title');
                }
@@ -1347,7 +1347,7 @@ class EditDocumentController {
         */
        public function editRegularContentFromId() {
                if (ExtensionManagementUtility::isLoaded('cms')) {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'tt_content', 'pid=' . intval($this->editRegularContentFromId) . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content') . ' AND colPos=0 AND sys_language_uid=0', '', 'sorting');
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', 'tt_content', 'pid=' . (int)$this->editRegularContentFromId . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content') . ' AND colPos=0 AND sys_language_uid=0', '', 'sorting');
                        if ($GLOBALS['TYPO3_DB']->sql_num_rows($res)) {
                                $ecUids = array();
                                while ($ecRec = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
index 033e169..e943b49 100644 (file)
@@ -183,7 +183,7 @@ class NewRecordController {
                }
                // Setting GPvars:
                // The page id to operate from
-               $this->id = intval(GeneralUtility::_GP('id'));
+               $this->id = (int)GeneralUtility::_GP('id');
                $this->returnUrl = GeneralUtility::sanitizeLocalUrl(GeneralUtility::_GP('returnUrl'));
                $this->pagesOnly = GeneralUtility::_GP('pagesOnly');
                // Create instance of template class for output
@@ -605,7 +605,7 @@ class NewRecordController {
                if ($table == 'pages' && $GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable'] && isset($GLOBALS['TCA'][$GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable']]) && $addContentTable) {
                        $parameters .= '&edit[' . $GLOBALS['TYPO3_CONF_VARS']['SYS']['contentTable'] . '][prev]=new&returnNewPageId=1';
                } elseif ($table == 'pages_language_overlay') {
-                       $parameters .= '&overrideVals[pages_language_overlay][doktype]=' . (int) $this->pageinfo['doktype'];
+                       $parameters .= '&overrideVals[pages_language_overlay][doktype]=' . (int)$this->pageinfo['doktype'];
                }
                $onClick = BackendUtility::editOnClick($parameters, '', $this->returnUrl);
                return '<a href="#" onclick="' . htmlspecialchars($onClick) . '">' . $linkText . '</a>';
@@ -632,7 +632,7 @@ class NewRecordController {
                        return FALSE;
                }
                // Checking doktype:
-               $doktype = intval($pid_row['doktype']);
+               $doktype = (int)$pid_row['doktype'];
                if (!($allowedTableList = $GLOBALS['PAGES_TYPES'][$doktype]['allowedTables'])) {
                        $allowedTableList = $GLOBALS['PAGES_TYPES']['default']['allowedTables'];
                }
index 686c384..8c791e1 100644 (file)
@@ -232,7 +232,7 @@ class PageLayoutController {
                $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                $this->backPath = $GLOBALS['BACK_PATH'];
                // GPvars:
-               $this->id = intval(GeneralUtility::_GP('id'));
+               $this->id = (int)GeneralUtility::_GP('id');
                $this->pointer = GeneralUtility::_GP('pointer');
                $this->imagemode = GeneralUtility::_GP('imagemode');
                $this->clear_cache = GeneralUtility::_GP('clear_cache');
@@ -249,7 +249,7 @@ class PageLayoutController {
                // Initialize menu
                $this->menuConfig();
                // Setting sys language from session var:
-               $this->current_sys_language = intval($this->MOD_SETTINGS['language']);
+               $this->current_sys_language = (int)$this->MOD_SETTINGS['language'];
                // CSH / Descriptions:
                $this->descrTable = '_MOD_' . $this->MCONF['name'];
        }
@@ -369,10 +369,10 @@ class PageLayoutController {
                }
                // If content from different pid is displayed
                if ($this->pageinfo['content_from_pid']) {
-                       $contentPage = BackendUtility::getRecord('pages', intval($this->pageinfo['content_from_pid']));
+                       $contentPage = BackendUtility::getRecord('pages', (int)$this->pageinfo['content_from_pid']);
                        $title = BackendUtility::getRecordTitle('pages', $contentPage);
                        $linkToPid = $this->local_linkThisScript(array('id' => $this->pageinfo['content_from_pid']));
-                       $link = '<a href="' . $linkToPid . '">' . htmlspecialchars($title) . ' (PID ' . intval($this->pageinfo['content_from_pid']) . ')</a>';
+                       $link = '<a href="' . $linkToPid . '">' . htmlspecialchars($title) . ' (PID ' . (int)$this->pageinfo['content_from_pid'] . ')</a>';
                        $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', sprintf($GLOBALS['LANG']->getLL('content_from_pid_title'), $link), '', FlashMessage::INFO);
                        $content .= $flashMessage->render();
                }
@@ -388,8 +388,8 @@ class PageLayoutController {
                        $overlayRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
                                'title',
                                'pages_language_overlay',
-                               'pid = ' . intval($this->id) .
-                                               ' AND sys_language_uid = ' . intval($this->current_sys_language) .
+                               'pid = ' . (int)$this->id .
+                                               ' AND sys_language_uid = ' . (int)$this->current_sys_language .
                                                BackendUtility::deleteClause('pages_language_overlay') .
                                                BackendUtility::versioningPlaceholderClause('pages_language_overlay'),
                                '',
@@ -425,8 +425,8 @@ class PageLayoutController {
                        // JavaScript:
                        $this->doc->JScode = '<script type="text/javascript" ' . 'src="' . GeneralUtility::createVersionNumberedFilename(($GLOBALS['BACK_PATH'] . 'js/jsfunc.updateform.js')) . '">' . '</script>';
                        $this->doc->JScode .= $this->doc->wrapScriptTags('
-                               if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
-                               if (top.fsMod) top.fsMod.navFrameHighlightedID["web"] = "pages' . intval($this->id) . '_"+top.fsMod.currentBank; ' . intval($this->id) . ';
+                               if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int)$this->id . ';
+                               if (top.fsMod) top.fsMod.navFrameHighlightedID["web"] = "pages' . (int)$this->id . '_"+top.fsMod.currentBank; ' . (int)$this->id . ';
                                function jumpToUrl(URL,formEl) {        //
                                        if (document.editform && TBE_EDITOR.isFormChanged)      {       // Check if the function exists... (works in all browsers?)
                                                if (!TBE_EDITOR.isFormChanged())        {       //
@@ -560,7 +560,7 @@ class PageLayoutController {
                        $this->doc->backPath = $GLOBALS['BACK_PATH'];
                        $this->doc->setModuleTemplate('EXT:backend/Resources/Private/Templates/db_layout.html');
                        $this->doc->JScode = $this->doc->wrapScriptTags('
-                               if (top.fsMod) top.fsMod.recentIds["web"] = ' . intval($this->id) . ';
+                               if (top.fsMod) top.fsMod.recentIds["web"] = ' . (int)$this->id . ';
                        ');
                        $flashMessage = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('clickAPage_content'), $GLOBALS['LANG']->getLL('clickAPage_header'), FlashMessage::INFO);
                        $body = $flashMessage->render();
@@ -613,7 +613,7 @@ class PageLayoutController {
                $edit_record = $this->edit_record;
                // If a command to edit all records in a column is issue, then select all those elements, and redirect to alt_doc.php:
                if (substr($edit_record, 0, 9) == '_EDIT_COL') {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'pid=' . intval($this->id) . ' AND colPos=' . intval(substr($edit_record, 10)) . ' AND sys_language_uid=' . intval($this->current_sys_language) . ($this->MOD_SETTINGS['tt_content_showHidden'] ? '' : BackendUtility::BEenableFields('tt_content')) . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content'), '', 'sorting');
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'pid=' . (int)$this->id . ' AND colPos=' . (int)substr($edit_record, 10) . ' AND sys_language_uid=' . (int)$this->current_sys_language . ($this->MOD_SETTINGS['tt_content_showHidden'] ? '' : BackendUtility::BEenableFields('tt_content')) . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content'), '', 'sorting');
                        $idListA = array();
                        while ($cRow = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                $idListA[] = $cRow['uid'];
@@ -623,7 +623,7 @@ class PageLayoutController {
                }
                // If the former record edited was the creation of a NEW record, this will look up the created records uid:
                if ($this->new_unique_uid) {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_log', 'userid=' . intval($GLOBALS['BE_USER']->user['uid']) . ' AND NEWid=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->new_unique_uid, 'sys_log'));
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_log', 'userid=' . (int)$GLOBALS['BE_USER']->user['uid'] . ' AND NEWid=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->new_unique_uid, 'sys_log'));
                        $sys_log_row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                        if (is_array($sys_log_row)) {
                                $edit_record = $sys_log_row['tablename'] . ':' . $sys_log_row['recuid'];
@@ -634,19 +634,19 @@ class PageLayoutController {
                $is_selected = 0;
                $languageOverlayRecord = '';
                if ($this->current_sys_language) {
-                       list($languageOverlayRecord) = BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $this->id, 'AND sys_language_uid=' . intval($this->current_sys_language));
+                       list($languageOverlayRecord) = BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $this->id, 'AND sys_language_uid=' . (int)$this->current_sys_language);
                }
                if (is_array($languageOverlayRecord)) {
                        $inValue = 'pages_language_overlay:' . $languageOverlayRecord['uid'];
-                       $is_selected += intval($edit_record == $inValue);
+                       $is_selected += (int)$edit_record == $inValue;
                        $opt[] = '<option value="' . $inValue . '"' . ($edit_record == $inValue ? ' selected="selected"' : '') . '>[ ' . $GLOBALS['LANG']->getLL('editLanguageHeader', TRUE) . ' ]</option>';
                } else {
                        $inValue = 'pages:' . $this->id;
-                       $is_selected += intval($edit_record == $inValue);
+                       $is_selected += (int)$edit_record == $inValue;
                        $opt[] = '<option value="' . $inValue . '"' . ($edit_record == $inValue ? ' selected="selected"' : '') . '>[ ' . $GLOBALS['LANG']->getLL('editPageProperties', TRUE) . ' ]</option>';
                }
                // Selecting all content elements from this language and allowed colPos:
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'pid=' . intval($this->id) . ' AND sys_language_uid=' . intval($this->current_sys_language) . ' AND colPos IN (' . $this->colPosList . ')' . ($this->MOD_SETTINGS['tt_content_showHidden'] ? '' : BackendUtility::BEenableFields('tt_content')) . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content'), '', 'colPos,sorting');
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'pid=' . (int)$this->id . ' AND sys_language_uid=' . (int)$this->current_sys_language . ' AND colPos IN (' . $this->colPosList . ')' . ($this->MOD_SETTINGS['tt_content_showHidden'] ? '' : BackendUtility::BEenableFields('tt_content')) . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content'), '', 'colPos,sorting');
                $colPos = NULL;
                $first = 1;
                // Page is the pid if no record to put this after.
@@ -666,7 +666,7 @@ class PageLayoutController {
                                        $opt[] = '<option value="_EDIT_COL:' . $colPos . '">__' . $GLOBALS['LANG']->sL(BackendUtility::getLabelFromItemlist('tt_content', 'colPos', $colPos), TRUE) . ':__</option>';
                                }
                                $inValue = 'tt_content:' . $cRow['uid'];
-                               $is_selected += intval($edit_record == $inValue);
+                               $is_selected += (int)$edit_record == $inValue;
                                $opt[] = '<option value="' . $inValue . '"' . ($edit_record == $inValue ? ' selected="selected"' : '') . '>' . htmlspecialchars(GeneralUtility::fixed_lgd_cs(($cRow['header'] ? $cRow['header'] : '[' . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:labels.no_title') . '] ' . strip_tags($cRow['bodytext'])), $GLOBALS['BE_USER']->uc['titleLen'])) . '</option>';
                                $prev = -$cRow['uid'];
                        }
@@ -675,7 +675,7 @@ class PageLayoutController {
                if (!$edit_record) {
                        $edit_record = 'tt_content:new/' . $prev . '/' . $colPos;
                        $inValue = 'tt_content:new/' . $prev . '/' . $colPos;
-                       $is_selected += intval($edit_record == $inValue);
+                       $is_selected += (int)$edit_record == $inValue;
                        $opt[] = '<option value="' . $inValue . '"' . ($edit_record == $inValue ? ' selected="selected"' : '') . '>[ ' . $GLOBALS['LANG']->getLL('newLabel', 1) . ' ]</option>';
                }
                // If none is yet selected...
@@ -689,7 +689,7 @@ class PageLayoutController {
                $this->deleteButton = MathUtility::canBeInterpretedAsInteger($this->eRParts[1]) && $edit_record && ($this->eRParts[0] != 'pages' && $this->EDIT_CONTENT || $this->eRParts[0] == 'pages' && $this->CALC_PERMS & 4);
                // If undo-button should be rendered (depends on available items in sys_history)
                $this->undoButton = 0;
-               $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->eRParts[0], 'sys_history') . ' AND recuid=' . intval($this->eRParts[1]), '', 'tstamp DESC', '1');
+               $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->eRParts[0], 'sys_history') . ' AND recuid=' . (int)$this->eRParts[1], '', 'tstamp DESC', '1');
                if ($this->undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes)) {
                        $this->undoButton = 1;
                }
@@ -727,8 +727,8 @@ class PageLayoutController {
                        $trData = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\DataPreprocessor');
                        $trData->addRawData = TRUE;
                        $trData->defVals[$this->eRParts[0]] = array(
-                               'colPos' => intval($ex_colPos),
-                               'sys_language_uid' => intval($this->current_sys_language)
+                               'colPos' => (int)$ex_colPos,
+                               'sys_language_uid' => (int)$this->current_sys_language
                        );
                        $trData->disableRTE = $this->MOD_SETTINGS['disableRTE'];
                        $trData->lockRecords = 1;
@@ -740,7 +740,7 @@ class PageLayoutController {
                        if ($uidVal == 'new') {
                                $new_unique_uid = uniqid('NEW');
                                $rec['uid'] = $new_unique_uid;
-                               $rec['pid'] = intval($ex_pid) ?: $this->id;
+                               $rec['pid'] = (int)$ex_pid ?: $this->id;
                                $recordAccess = TRUE;
                        } else {
                                $rec['uid'] = $uidVal;
@@ -914,7 +914,7 @@ class PageLayoutController {
                                // The order of the rows: Default is left(1), Normal(0), right(2), margin(3)
                                $dblist->tt_contentConfig['cols'] = implode(',', $colList);
                                $dblist->tt_contentConfig['showHidden'] = $this->MOD_SETTINGS['tt_content_showHidden'];
-                               $dblist->tt_contentConfig['sys_language_uid'] = intval($this->current_sys_language);
+                               $dblist->tt_contentConfig['sys_language_uid'] = (int)$this->current_sys_language;
                                // If the function menu is set to "Language":
                                if ($this->MOD_SETTINGS['function'] == 2) {
                                        $dblist->tt_contentConfig['single'] = 0;
@@ -1051,8 +1051,8 @@ class PageLayoutController {
                                        $overlayRecord = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
                                                'uid',
                                                'pages_language_overlay',
-                                               'pid = ' . intval($this->id) . ' ' .
-                                               'AND sys_language_uid = ' . intval($this->current_sys_language) .
+                                               'pid = ' . (int)$this->id . ' ' .
+                                               'AND sys_language_uid = ' . (int)$this->current_sys_language .
                                                BackendUtility::deleteClause('pages_language_overlay') .
                                                BackendUtility::versioningPlaceholderClause('pages_language_overlay'),
                                                '',
@@ -1133,7 +1133,7 @@ class PageLayoutController {
                return $GLOBALS['TYPO3_DB']->exec_SELECTcountRows(
                        'uid',
                        'tt_content',
-                       'pid=' . intval($this->id) . ' AND sys_language_uid=' . intval($this->current_sys_language) . BackendUtility::BEenableFields('tt_content', 1) . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content')
+                       'pid=' . (int)$this->id . ' AND sys_language_uid=' . (int)$this->current_sys_language . BackendUtility::BEenableFields('tt_content', 1) . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content')
                );
        }
 
@@ -1165,7 +1165,7 @@ class PageLayoutController {
                        return $GLOBALS['TYPO3_DB']->exec_SELECTquery(
                                'sys_language.*',
                                'pages_language_overlay,sys_language',
-                               'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . intval($id) . $exQ .
+                               'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . (int)$id . $exQ .
                                        BackendUtility::versioningPlaceholderClause('pages_language_overlay'),
                                'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag',
                                'sys_language.title'
index 76b5ceb..36ede85 100644 (file)
@@ -316,7 +316,7 @@ class PageTreeNavigationController {
                        }
                }
                // Getting temporary mount point ID:
-               $temporaryMountPoint = intval($GLOBALS['BE_USER']->getSessionData('pageTree_temporaryMountPoint'));
+               $temporaryMountPoint = (int)$GLOBALS['BE_USER']->getSessionData('pageTree_temporaryMountPoint');
                // If mount point ID existed and is within users real mount points, then set it temporarily:
                if ($temporaryMountPoint > 0 && $GLOBALS['BE_USER']->isInWebMount($temporaryMountPoint)) {
                        if ($this->active_tempMountPoint = BackendUtility::readPageAccess($temporaryMountPoint, $GLOBALS['BE_USER']->getPagePermsClause(1))) {
@@ -336,7 +336,7 @@ class PageTreeNavigationController {
         * @todo Define visibility
         */
        public function settingTemporaryMountPoint($pageId) {
-               $GLOBALS['BE_USER']->setAndSaveSessionData('pageTree_temporaryMountPoint', intval($pageId));
+               $GLOBALS['BE_USER']->setAndSaveSessionData('pageTree_temporaryMountPoint', (int)$pageId);
        }
 
        /**********************************
index e5c6497..5087504 100644 (file)
@@ -110,9 +110,9 @@ class AddController {
                $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) == '###') {
-                       $this->pid = intval($TSconfig['_' . substr($this->P['params']['pid'], 3, -3)]);
+                       $this->pid = (int)$TSconfig['_' . substr($this->P['params']['pid'], 3, -3)];
                } else {
-                       $this->pid = intval($this->P['params']['pid']);
+                       $this->pid = (int)$this->P['params']['pid'];
                }
                // Return if new record as parent (not possibly/allowed)
                if ($this->pid > 0) {
@@ -125,7 +125,7 @@ class AddController {
                        if (is_array($eC[$this->table]) && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->P['uid'])) {
                                // Getting id and cmd from returning editConf array.
                                reset($eC[$this->table]);
-                               $this->id = intval(key($eC[$this->table]));
+                               $this->id = (int)key($eC[$this->table]);
                                $cmd = current($eC[$this->table]);
                                // ... and if everything seems OK we will register some classes for inclusion and instruct the object to perform processing later.
                                if ($this->P['params']['setValue'] && $cmd == 'edit' && $this->id && $this->P['table'] && $this->P['field'] && $this->P['uid']) {
index a0259d2..53a7d9f 100644 (file)
@@ -675,11 +675,11 @@ class FormsController {
                                        $tArr = array('', '', '', '', '', '');
                                        switch ((string) $vv['type']) {
                                                case 'textarea':
-                                                       if (intval($vv['cols'])) {
-                                                               $tArr[0] = intval($vv['cols']);
+                                                       if ((int)$vv['cols']) {
+                                                               $tArr[0] = (int)$vv['cols'];
                                                        }
-                                                       if (intval($vv['rows'])) {
-                                                               $tArr[1] = intval($vv['rows']);
+                                                       if ((int)$vv['rows']) {
+                                                               $tArr[1] = (int)$vv['rows'];
                                                        }
                                                        if (trim($vv['extra'])) {
                                                                $tArr[2] = trim($vv['extra']);
@@ -692,11 +692,11 @@ class FormsController {
                                                        break;
                                                case 'input':
                                                case 'password':
-                                                       if (intval($vv['size'])) {
-                                                               $tArr[0] = intval($vv['size']);
+                                                       if ((int)$vv['size']) {
+                                                               $tArr[0] = (int)$vv['size'];
                                                        }
-                                                       if (intval($vv['max'])) {
-                                                               $tArr[1] = intval($vv['max']);
+                                                       if ((int)$vv['max']) {
+                                                               $tArr[1] = (int)$vv['max'];
                                                        }
                                                        if (strlen($vv['specialEval'])) {
                                                                // Preset blank default value so position 3 can get a value...
@@ -705,13 +705,13 @@ class FormsController {
                                                        }
                                                        break;
                                                case 'file':
-                                                       if (intval($vv['size'])) {
-                                                               $tArr[0] = intval($vv['size']);
+                                                       if ((int)$vv['size']) {
+                                                               $tArr[0] = (int)$vv['size'];
                                                        }
                                                        break;
                                                case 'select':
-                                                       if (intval($vv['size'])) {
-                                                               $tArr[0] = intval($vv['size']);
+                                                       if ((int)$vv['size']) {
+                                                               $tArr[0] = (int)$vv['size'];
                                                        }
                                                        if ($vv['autosize']) {
                                                                $tArr[0] = 'auto';
@@ -766,6 +766,7 @@ class FormsController {
        public function cfgString2CfgArray($cfgStr) {
                // Traverse the number of form elements:
                $tLines = explode(LF, $cfgStr);
+               $attachmentCounter = 0;
                foreach ($tLines as $k => $v) {
                        // Initialize:
                        $confData = array();
@@ -792,7 +793,7 @@ class FormsController {
                                                // Attachment names...
                                                if ($confData['type'] == 'file') {
                                                        $confData['fieldname'] = 'attachment' . $attachmentCounter;
-                                                       $attachmentCounter = intval($attachmentCounter) + 1;
+                                                       $attachmentCounter = (int)$attachmentCounter + 1;
                                                }
                                        } else {
                                                $confData['fieldname'] = str_replace(' ', '_', trim($typeParts[0]));
@@ -823,9 +824,9 @@ class FormsController {
                                                        $confData['size'] = $fParts[1];
                                                        break;
                                                case 'select':
-                                                       $confData['size'] = intval($fParts[1]) ? $fParts[1] : '';
-                                                       $confData['autosize'] = strtolower(trim($fParts[1])) == 'auto' ? 1 : 0;
-                                                       $confData['multiple'] = strtolower(trim($fParts[2])) == 'm' ? 1 : 0;
+                                                       $confData['size'] = (int)$fParts[1] ? $fParts[1] : '';
+                                                       $confData['autosize'] = strtolower(trim($fParts[1])) === 'auto' ? 1 : 0;
+                                                       $confData['multiple'] = strtolower(trim($fParts[2])) === 'm' ? 1 : 0;
                                                        break;
                                        }
                                }
index bff309c..1f51751 100644 (file)
@@ -87,9 +87,9 @@ class ListController {
                $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) == '###') {
-                       $this->pid = intval($TSconfig['_' . substr($this->P['params']['pid'], 3, -3)]);
+                       $this->pid = (int)$TSconfig['_' . substr($this->P['params']['pid'], 3, -3)];
                } else {
-                       $this->pid = intval($this->P['params']['pid']);
+                       $this->pid = (int)$this->P['params']['pid'];
                }
                // Make redirect:
                // If pid is blank OR if id is set, then return...
index 510ecda..5e8e14e 100644 (file)
@@ -224,7 +224,7 @@ class RteController {
                        $closeUrl = GeneralUtility::sanitizeLocalUrl($this->P['returnUrl']);
                        // Getting settings for the undo button:
                        $undoButton = 0;
-                       $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->P['table'], 'sys_history') . ' AND recuid=' . intval($this->P['uid']), '', 'tstamp DESC', '1');
+                       $undoRes = $GLOBALS['TYPO3_DB']->exec_SELECTquery('tstamp', 'sys_history', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($this->P['table'], 'sys_history') . ' AND recuid=' . (int)$this->P['uid'], '', 'tstamp DESC', '1');
                        if ($undoButtonR = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($undoRes)) {
                                $undoButton = 1;
                        }
index ff4e798..ee78db2 100644 (file)
@@ -253,8 +253,8 @@ class TableController {
                // Get delimiter settings
                $flexForm = GeneralUtility::xml2array($row['pi_flexform']);
                if (is_array($flexForm)) {
-                       $this->tableParsing_quote = $flexForm['data']['s_parsing']['lDEF']['tableparsing_quote']['vDEF'] ? chr(intval($flexForm['data']['s_parsing']['lDEF']['tableparsing_quote']['vDEF'])) : '';
-                       $this->tableParsing_delimiter = $flexForm['data']['s_parsing']['lDEF']['tableparsing_delimiter']['vDEF'] ? chr(intval($flexForm['data']['s_parsing']['lDEF']['tableparsing_delimiter']['vDEF'])) : '|';
+                       $this->tableParsing_quote = $flexForm['data']['s_parsing']['lDEF']['tableparsing_quote']['vDEF'] ? chr((int)$flexForm['data']['s_parsing']['lDEF']['tableparsing_quote']['vDEF']) : '';
+                       $this->tableParsing_delimiter = $flexForm['data']['s_parsing']['lDEF']['tableparsing_delimiter']['vDEF'] ? chr((int)$flexForm['data']['s_parsing']['lDEF']['tableparsing_delimiter']['vDEF']) : '|';
                }
                // If some data has been submitted, then construct
                if (isset($this->TABLECFG['c'])) {
index c931348..1a9fc1b 100644 (file)
@@ -106,7 +106,7 @@ class DataPreprocessor {
         * @todo Define visibility
         */
        public function fetchRecord($table, $idList, $operation) {
-               if ((string)$idList == 'prev') {
+               if ((string)$idList === 'prev') {
                        $idList = $this->prevPageID;
                }
                if ($GLOBALS['TCA'][$table]) {
@@ -134,7 +134,7 @@ class DataPreprocessor {
                                                        $pid = $record['pid'];
                                                        unset($record);
                                                } else {
-                                                       $pid = intval($id);
+                                                       $pid = (int)$id;
                                                }
                                                $pageTS = BackendUtility::getPagesTSconfig($pid);
                                                if (isset($pageTS['TCAdefaults.'])) {
@@ -173,9 +173,9 @@ class DataPreprocessor {
                                                // Finally, call renderRecord:
                                                $this->renderRecord($table, uniqid('NEW'), $id, $newRow);
                                        } else {
-                                               $id = intval($id);
+                                               $id = (int)$id;
                                                // Fetch database values
-                                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'uid=' . intval($id) . BackendUtility::deleteClause($table));
+                                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'uid=' . $id . BackendUtility::deleteClause($table));
                                                if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                                        BackendUtility::fixVersioningPid($table, $row);
                                                        $this->renderRecord($table, $id, $row['pid'], $row);
@@ -387,7 +387,7 @@ class DataPreprocessor {
                // New data set, ready for interface (list of values, rawurlencoded)
                $dataAcc = array();
                // For list selectors (multi-value):
-               if (intval($fieldConfig['config']['maxitems']) > 1) {
+               if ((int)$fieldConfig['config']['maxitems'] > 1) {
                        // Add regular elements:
                        if (!is_array($fieldConfig['config']['items'])) {
                                $fieldConfig['config']['items'] = array();
index 0cbb5ac..6f4a132 100644 (file)
@@ -190,7 +190,7 @@ class InlineElement {
                $config = $PA['fieldConf']['config'];
                $foreign_table = $config['foreign_table'];
                if (BackendUtility::isTableLocalizable($table)) {
-                       $language = intval($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]);
+                       $language = (int)$row[$GLOBALS['TCA'][$table]['ctrl']['languageField']];
                }
                $minitems = MathUtility::forceIntegerInRange($config['minitems'], 0);
                $maxitems = MathUtility::forceIntegerInRange($config['maxitems'], 0);
@@ -452,7 +452,7 @@ class InlineElement {
                        if ($isVirtualRecord) {
                                $class .= ' t3-form-field-container-inline-placeHolder';
                        }
-                       if (isset($rec['hidden']) && intval($rec['hidden'])) {
+                       if (isset($rec['hidden']) && (int)$rec['hidden']) {
                                $class .= ' t3-form-field-container-inline-hidden';
                        }
                        $out = '<div class="t3-form-field-record-inline" id="' . $objectId . '_fields" data-expandSingle="' . ($config['appearance']['expandSingle'] ? 1 : 0) . '" data-returnURL="' . htmlspecialchars(GeneralUtility::getIndpEnv('REQUEST_URI')) . '">' . $fields . $combination . '</div>';
@@ -836,7 +836,7 @@ class InlineElement {
                        }
                        // Put together the selector box:
                        $selector_itemListStyle = isset($config['itemListStyle']) ? ' style="' . htmlspecialchars($config['itemListStyle']) . '"' : ' style="' . $this->fObj->defaultMultipleSelectorStyle . '"';
-                       $size = intval($conf['size']);
+                       $size = (int)$conf['size'];
                        $size = $conf['autoSizeMax'] ? MathUtility::forceIntegerInRange(count($selItems) + 1, MathUtility::forceIntegerInRange($size, 1), $conf['autoSizeMax']) : $size;
                        $onChange = 'return inline.importNewRecord(\'' . $this->inlineNames['object'] . self::Structure_Separator . $conf['foreign_table'] . '\')';
                        $item = '
@@ -1054,7 +1054,7 @@ class InlineElement {
                // Initialize TCEforms (rendering the forms)
                $GLOBALS['SOBE']->tceforms = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Form\\FormEngine');
                $GLOBALS['SOBE']->tceforms->inline = $this;
-               $GLOBALS['SOBE']->tceforms->RTEcounter = intval(array_shift($ajaxArguments));
+               $GLOBALS['SOBE']->tceforms->RTEcounter = (int)array_shift($ajaxArguments);
                $GLOBALS['SOBE']->tceforms->initDefaultBEMode();
                $GLOBALS['SOBE']->tceforms->palettesCollapsed = !$GLOBALS['SOBE']->MOD_SETTINGS['showPalettes'];
                $GLOBALS['SOBE']->tceforms->disableRTE = $GLOBALS['SOBE']->MOD_SETTINGS['disableRTE'];
@@ -1409,8 +1409,8 @@ class InlineElement {
                $foreignTable = $config['foreign_table'];
                $localizationMode = BackendUtility::getInlineLocalizationMode($table, $config);
                if ($localizationMode != FALSE) {
-                       $language = intval($row[$GLOBALS['TCA'][$table]['ctrl']['languageField']]);
-                       $transOrigPointer = intval($row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]);
+                       $language = (int)$row[$GLOBALS['TCA'][$table]['ctrl']['languageField']];
+                       $transOrigPointer = (int)$row[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']];
                        $transOrigTable = BackendUtility::getOriginalTranslationTable($table);
 
                        if ($language > 0 && $transOrigPointer) {
index fb7019c..631a41f 100644 (file)
@@ -118,7 +118,7 @@ class SuggestDefaultReceiver {
                // get a list of all the pages that should be looked on
                if (isset($config['pidList'])) {
                        $allowedPages = ($pageIds = GeneralUtility::trimExplode(',', $config['pidList']));
-                       $depth = intval($config['pidDepth']);
+                       $depth = (int)$config['pidDepth'];
                        foreach ($pageIds as $pageId) {
                                if ($pageId > 0) {
                                        \TYPO3\CMS\Core\Utility\ArrayUtility::mergeRecursiveWithOverrule($allowedPages, $this->getAllSubpagesOfPage($pageId, $depth));
@@ -217,7 +217,7 @@ class SuggestDefaultReceiver {
        protected function prepareSelectStatement() {
                $searchWholePhrase = $this->config['searchWholePhrase'];
                $searchString = $this->params['value'];
-               $searchUid = intval($searchString);
+               $searchUid = (int)$searchString;
                if (strlen($searchString)) {
                        $searchString = $GLOBALS['TYPO3_DB']->quoteStr($searchString, $this->table);
                        $likeCondition = ' LIKE \'' . ($searchWholePhrase ? '%' : '') . $GLOBALS['TYPO3_DB']->escapeStrForLike($searchString, $this->table) . '%\'';
index 5ec6082..76258a6 100644 (file)
@@ -89,11 +89,11 @@ class SuggestElement {
                </div>';
                // Get minimumCharacters from TCA
                if (isset($config['fieldConf']['config']['wizards']['suggest']['default']['minimumCharacters'])) {
-                       $minChars = intval($config['fieldConf']['config']['wizards']['suggest']['default']['minimumCharacters']);
+                       $minChars = (int)$config['fieldConf']['config']['wizards']['suggest']['default']['minimumCharacters'];
                }
                // Overwrite it with minimumCharacters from TSConfig (TCEFORM) if given
                if (isset($config['fieldTSConfig']['suggest.']['default.']['minimumCharacters'])) {
-                       $minChars = intval($config['fieldTSConfig']['suggest.']['default.']['minimumCharacters']);
+                       $minChars = (int)$config['fieldTSConfig']['suggest.']['default.']['minimumCharacters'];
                }
                $minChars = $minChars > 0 ? $minChars : 2;
 
@@ -249,8 +249,8 @@ class SuggestElement {
                        }
                        if (isset($config['addWhere'])) {
                                $config['addWhere'] = strtr(' ' . $config['addWhere'], array(
-                                       '###THIS_UID###' => intval($uid),
-                                       '###CURRENT_PID###' => intval($pageId)
+                                       '###THIS_UID###' => (int)$uid,
+                                       '###CURRENT_PID###' => (int)$pageId
                                ));
                        }
                        // instantiate the class that should fetch the records for this $queryTable
index 2f5b171..cba65d3 100644 (file)
@@ -80,7 +80,7 @@ class TreeElement {
                }
                $allowedUids = array();
                foreach ($possibleSelectboxItems as $item) {
-                       if (intval($item[1]) > 0) {
+                       if ((int)$item[1] > 0) {
                                $allowedUids[] = $item[1];
                        }
                }
@@ -115,13 +115,13 @@ class TreeElement {
                $itemArray[] = $treeData;
                $treeData = json_encode($itemArray);
                $id = md5($PA['itemFormElName']);
-               if (isset($PA['fieldConf']['config']['size']) && intval($PA['fieldConf']['config']['size']) > 0) {
-                       $height = intval($PA['fieldConf']['config']['size']) * 20;
+               if (isset($PA['fieldConf']['config']['size']) && (int)$PA['fieldConf']['config']['size'] > 0) {
+                       $height = (int)$PA['fieldConf']['config']['size'] * 20;
                } else {
                        $height = 280;
                }
-               if (isset($PA['fieldConf']['config']['autoSizeMax']) && intval($PA['fieldConf']['config']['autoSizeMax']) > 0) {
-                       $autoSizeMax = intval($PA['fieldConf']['config']['autoSizeMax']) * 20;
+               if (isset($PA['fieldConf']['config']['autoSizeMax']) && (int)$PA['fieldConf']['config']['autoSizeMax'] > 0) {
+                       $autoSizeMax = (int)$PA['fieldConf']['config']['autoSizeMax'] * 20;
                }
                $header = FALSE;
                $expanded = FALSE;
@@ -131,7 +131,7 @@ class TreeElement {
                        $header = $appearance['showHeader'] ? TRUE : FALSE;
                        $expanded = $appearance['expandAll'] === TRUE;
                        if (isset($appearance['width'])) {
-                               $width = intval($appearance['width']);
+                               $width = (int)$appearance['width'];
                        }
                }
                $onChange = '';
@@ -161,7 +161,7 @@ class TreeElement {
                        TYPO3.Components.Tree.StandardTreeItemData["' . $id . '"] = ' . $treeData . ';
                        var tree' . $id . ' = new TYPO3.Components.Tree.StandardTree({
                                id: "' . $id . '",
-                               showHeader: ' . intval($header) . ',
+                               showHeader: ' . (int)$header . ',
                                onChange: "' . $onChange . '",
                                countSelectedNodes: ' . count($selectedNodes) . ',
                                width: ' . $width . ',
@@ -190,7 +190,7 @@ class TreeElement {
                                                }
                                        }
                                },
-                               tcaMaxItems: ' . ($PA['fieldConf']['config']['maxitems'] ? intval($PA['fieldConf']['config']['maxitems']) : 99999) . ',
+                               tcaMaxItems: ' . ($PA['fieldConf']['config']['maxitems'] ? (int)$PA['fieldConf']['config']['maxitems'] : 99999) . ',
                                tcaSelectRecursiveAllowed: ' . ($appearance['allowRecursiveMode'] ? 'true' : 'false') . ',
                                tcaSelectRecursive: false,
                                tcaExclusiveKeys: "' . ($PA['fieldConf']['config']['exclusiveKeys'] ? $PA['fieldConf']['config']['exclusiveKeys'] : '') . '",
index e8ceb3d..9e94233 100644 (file)
@@ -63,21 +63,21 @@ class ValueSlider {
                $max = 10000;
                // Use the range property, if defined, to set min and max values
                if (isset($params['fieldConfig']['range'])) {
-                       $min = isset($params['fieldConfig']['range']['lower']) ? intval($params['fieldConfig']['range']['lower']) : 0;
-                       $max = isset($params['fieldConfig']['range']['upper']) ? intval($params['fieldConfig']['range']['upper']) : 10000;
+                       $min = isset($params['fieldConfig']['range']['lower']) ? (int)$params['fieldConfig']['range']['lower'] : 0;
+                       $max = isset($params['fieldConfig']['range']['upper']) ? (int)$params['fieldConfig']['range']['upper'] : 10000;
                }
                $elementType = $params['fieldConfig']['type'];
                $step = $params['wConf']['step'] ?: 1;
-               $width = intval($params['wConf']['width']) ?: 400;
+               $width = (int)$params['wConf']['width'] ?: 400;
                $type = 'null';
                if (isset($params['fieldConfig']['eval'])) {
                        $eval = GeneralUtility::trimExplode(',', $params['fieldConfig']['eval'], TRUE);
                        if (in_array('time', $eval)) {
                                $type = 'time';
-                               $value = (int) $value;
+                               $value = (int)$value;
                        } elseif (in_array('int', $eval)) {
                                $type = 'int';
-                               $value = (int) $value;
+                               $value = (int)$value;
                        } elseif (in_array('double2', $eval)) {
                                $type = 'double';
                                $value = (double) $value;
@@ -85,7 +85,7 @@ class ValueSlider {
                }
                if (isset($params['fieldConfig']['items'])) {
                        $type = 'array';
-                       $value = (int) $value;
+                       $value = (int)$value;
                }
                $callback = $params['fieldChangeFunc']['TBE_EDITOR_fieldChanged'];
                $getField = $params['fieldChangeFunc']['typo3form.fieldGet'];
index a4e4dab..eb61831 100644 (file)
@@ -242,7 +242,7 @@ class ElementConditionMatcher {
                                break;
                        case 'BIT':
                        case '!BIT':
-                               $result = (intval($fieldValue) & $operand) ? TRUE : FALSE;
+                               $result = ((int)$fieldValue & $operand) ? TRUE : FALSE;
                                if ($operator{0} === '!') {
                                        $result = !$result;
                                }
@@ -292,9 +292,9 @@ class ElementConditionMatcher {
                list($operator, $operand) = explode(':', $condition, 2);
                if ($operator === 'NEW') {
                        if (strtoupper($operand) === 'TRUE') {
-                               $result = !(intval($this->record['uid']) > 0);
+                               $result = !((int)$this->record['uid'] > 0);
                        } elseif (strtoupper($operand) === 'FALSE') {
-                               $result = (intval($this->record['uid']) > 0);
+                               $result = ((int)$this->record['uid'] > 0);
                        }
                }
                return $result;
@@ -311,10 +311,10 @@ class ElementConditionMatcher {
                $result = FALSE;
                list($operator, $operand) = explode(':', $condition, 2);
                if ($operator === 'IS') {
-                       $isNewRecord = !(intval($this->record['uid']) > 0);
+                       $isNewRecord = !((int)$this->record['uid'] > 0);
                        // Detection of version can be done be detecting the workspace of the user
                        $isUserInWorkspace = $this->getBackendUser()->workspace > 0;
-                       if (intval($this->record['pid']) == -1 || intval($this->record['_ORIG_pid']) == -1) {
+                       if ((int)$this->record['pid'] === -1 || (int)$this->record['_ORIG_pid'] === -1) {
                                $isRecordDetectedAsVersion = TRUE;
                        } else {
                                $isRecordDetectedAsVersion = FALSE;
index 4c5da28..aa95caf 100644 (file)
@@ -122,7 +122,7 @@ class FormDataTraverser {
        protected function initializeOriginalLanguageUid() {
                $fieldCtrlConfig = $GLOBALS['TCA'][$this->currentTable]['ctrl'];
                if (!empty($fieldCtrlConfig['languageField']) && isset($this->currentRow[$fieldCtrlConfig['languageField']])) {
-                       $this->originalLanguageUid = intval($this->currentRow[$fieldCtrlConfig['languageField']]);
+                       $this->originalLanguageUid = (int)$this->currentRow[$fieldCtrlConfig['languageField']];
                } else {
                        $this->originalLanguageUid = FALSE;
                }
@@ -290,7 +290,7 @@ class FormDataTraverser {
                $values = GeneralUtility::trimExplode(',', $value);
                $selectedValues = array();
 
-               if ($maxItems !== NULL && (count($values) > intval($maxItems))) {
+               if ($maxItems !== NULL && (count($values) > (int)$maxItems)) {
                        return $selectedValues;
                }
 
@@ -395,7 +395,7 @@ class FormDataTraverser {
                        if (!isset($currentRow[$languageField])) {
                                continue;
                        }
-                       if (intval($currentRow[$languageField]) === $this->originalLanguageUid) {
+                       if ((int)$currentRow[$languageField] === $this->originalLanguageUid) {
                                $foundRows[] = $currentRow;
                        }
                }
@@ -407,4 +407,4 @@ class FormDataTraverser {
 
                return $relatedRow;
        }
-}
\ No newline at end of file
+}
index 144d0b1..7125a1d 100644 (file)
@@ -767,17 +767,17 @@ class FormEngine {
                                                // Getting the style information out:
                                                $color_style_parts = GeneralUtility::trimExplode('-', $parts[4]);
                                                if ($color_style_parts[0] !== '') {
-                                                       $this->setColorScheme($GLOBALS['TBE_STYLES']['colorschemes'][intval($color_style_parts[0])]);
+                                                       $this->setColorScheme($GLOBALS['TBE_STYLES']['colorschemes'][(int)$color_style_parts[0]]);
                                                }
                                                if ($color_style_parts[1] !== '') {
-                                                       $this->fieldStyle = $GLOBALS['TBE_STYLES']['styleschemes'][intval($color_style_parts[1])];
+                                                       $this->fieldStyle = $GLOBALS['TBE_STYLES']['styleschemes'][(int)$color_style_parts[1]];
                                                        if (!isset($this->fieldStyle)) {
                                                                $this->fieldStyle = $GLOBALS['TBE_STYLES']['styleschemes'][0];
                                                        }
                                                }
                                                if ($color_style_parts[2] !== '') {
                                                        $this->wrapBorder($out_array[$out_sheet], $out_pointer);
-                                                       $this->borderStyle = $GLOBALS['TBE_STYLES']['borderschemes'][intval($color_style_parts[2])];
+                                                       $this->borderStyle = $GLOBALS['TBE_STYLES']['borderschemes'][(int)$color_style_parts[2]];
                                                        if (!isset($this->borderStyle)) {
                                                                $this->borderStyle = $GLOBALS['TBE_STYLES']['borderschemes'][0];
                                                        }
@@ -1307,10 +1307,10 @@ class FormEngine {
                        }
                        $dateRange = '';
                        if (isset($config['range']['lower'])) {
-                               $dateRange .= ' lower-' . intval($config['range']['lower']);
+                               $dateRange .= ' lower-' . (int)$config['range']['lower'];
                        }
                        if (isset($config['range']['upper'])) {
-                               $dateRange .= ' upper-' . intval($config['range']['upper']);
+                               $dateRange .= ' upper-' . (int)$config['range']['upper'];
                        }
                        $inputId = uniqid('tceforms-' . $class . 'field-');
                        $cssClasses[] = 'tceforms-textfield tceforms-' . $class . 'field' . $dateRange;
@@ -1647,8 +1647,8 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                if (!count($selItems)) {
                        $selItems[] = array('', '');
                }
-               $thisValue = intval($PA['itemFormElValue']);
-               $cols = intval($config['cols']);
+               $thisValue = (int)$PA['itemFormElValue'];
+               $cols = (int)$config['cols'];
                $selItemsCount = count($selItems);
                if ($cols > 1) {
                        $item .= '<table border="0" cellspacing="0" cellpadding="0" class="typo3-TCEforms-checkboxArray">';
@@ -1752,7 +1752,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                // Creating the label for the "No Matching Value" entry.
                $nMV_label = isset($PA['fieldTSConfig']['noMatchingValue_label']) ? $this->sL($PA['fieldTSConfig']['noMatchingValue_label']) : '[ ' . $this->getLL('l_noMatchingValue') . ' ]';
                // Prepare some values:
-               $maxitems = intval($config['maxitems']);
+               $maxitems = (int)$config['maxitems'];
                // If a SINGLE selector box...
                if ($maxitems <= 1 && $config['renderMode'] !== 'tree') {
                        $item = $this->getSingleField_typeSelect_single($table, $field, $row, $PA, $config, $selItems, $nMV_label);
@@ -1895,7 +1895,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                $opt = array();
                $selicons = array();
                $onlySelectedIconShown = 0;
-               $size = intval($config['size']);
+               $size = (int)$config['size'];
                // Style set on <select/>
                $selectedStyle = '';
                $item = '';
@@ -2003,7 +2003,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                // Create icon table:
                if (count($selicons) && !$config['noIconsBelowSelect']) {
                        $item .= '<table border="0" cellpadding="0" cellspacing="0" class="typo3-TCEforms-selectIcons">';
-                       $selicon_cols = intval($config['selicon_cols']);
+                       $selicon_cols = (int)$config['selicon_cols'];
                        if (!$selicon_cols) {
                                $selicon_cols = count($selicons);
                        }
@@ -2219,7 +2219,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                // Compile selector box:
                $sOnChange = implode('', $PA['fieldChangeFunc']);
                $selector_itemListStyle = isset($config['itemListStyle']) ? ' style="' . htmlspecialchars($config['itemListStyle']) . '"' : ' style="' . $this->defaultMultipleSelectorStyle . '"';
-               $size = intval($config['size']);
+               $size = (int)$config['size'];
                $cssPrefix = $size === 1 ? 'tceforms-select' : 'tceforms-multiselect';
                $size = $config['autoSizeMax'] ? MathUtility::forceIntegerInRange(count($selItems) + 1, MathUtility::forceIntegerInRange($size, 1), $config['autoSizeMax']) : $size;
                $selectBox = '<select id="' . uniqid($cssPrefix) . '" name="' . $PA['itemFormElName'] . '[]"' . $this->insertDefStyle('select', $cssPrefix) . ($size ? ' size="' . $size . '"' : '') . ' multiple="multiple" onchange="' . htmlspecialchars($sOnChange) . '"' . $PA['onFocus'] . $selector_itemListStyle . $disabled . '>
@@ -2332,7 +2332,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                        }
                        // Put together the selector box:
                        $selector_itemListStyle = isset($config['itemListStyle']) ? ' style="' . htmlspecialchars($config['itemListStyle']) . '"' : ' style="' . $this->defaultMultipleSelectorStyle . '"';
-                       $size = intval($config['size']);
+                       $size = (int)$config['size'];
                        $size = $config['autoSizeMax'] ? MathUtility::forceIntegerInRange(count($itemArray) + 1, MathUtility::forceIntegerInRange($size, 1), $config['autoSizeMax']) : $size;
                        if ($config['exclusiveKeys']) {
                                $sOnChange = 'setFormValueFromBrowseWin(\'' . $PA['itemFormElName'] . '\',this.options[this.selectedIndex].value, this.options[this.selectedIndex].text, this.options[this.selectedIndex].title,\'' . $config['exclusiveKeys'] . '\'); ';
@@ -2408,7 +2408,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                $config = $PA['fieldConf']['config'];
                $internal_type = $config['internal_type'];
                $show_thumbs = $config['show_thumbs'];
-               $size = intval($config['size']);
+               $size = (int)$config['size'];
                $maxitems = MathUtility::forceIntegerInRange($config['maxitems'], 0);
                if (!$maxitems) {
                        $maxitems = 100000;
@@ -2676,7 +2676,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                if ($config['format']) {
                        $itemValue = $this->formatValue($config, $itemValue);
                }
-               $rows = intval($config['rows']);
+               $rows = (int)$config['rows'];
                if ($rows > 1) {
                        if (!$config['pass_content']) {
                                $itemValue = nl2br(htmlspecialchars($itemValue));
@@ -2764,7 +2764,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                        // Look up page overlays:
                        $checkPageLanguageOverlay = $GLOBALS['BE_USER']->getTSConfigVal('options.checkPageLanguageOverlay') ? TRUE : FALSE;
                        if ($checkPageLanguageOverlay) {
-                               $pageOverlays = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'pages_language_overlay', 'pid=' . intval($row['pid']) . BackendUtility::deleteClause('pages_language_overlay') . BackendUtility::versioningPlaceholderClause('pages_language_overlay'), '', '', '', 'sys_language_uid');
+                               $pageOverlays = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'pages_language_overlay', 'pid=' . (int)$row['pid'] . BackendUtility::deleteClause('pages_language_overlay') . BackendUtility::versioningPlaceholderClause('pages_language_overlay'), '', '', '', 'sys_language_uid');
                        }
                        $languages = $this->getAvailableLanguages();
                        foreach ($languages as $lInfo) {
@@ -3288,7 +3288,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                                $itemValue = md5($itemValue);
                                break;
                        case 'filesize':
-                               $value = GeneralUtility::formatSize(intval($itemValue));
+                               $value = GeneralUtility::formatSize((int)$itemValue);
                                if ($config['format.']['appendByteSize']) {
                                        $value .= ' (' . $itemValue . ')';
                                }
@@ -3652,10 +3652,10 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
         */
        public function registerDefaultLanguageData($table, $rec) {
                // Add default language:
-               if ($GLOBALS['TCA'][$table]['ctrl']['languageField'] && $rec[$GLOBALS['TCA'][$table]['ctrl']['languageField']] > 0 && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] && intval($rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]) > 0) {
+               if ($GLOBALS['TCA'][$table]['ctrl']['languageField'] && $rec[$GLOBALS['TCA'][$table]['ctrl']['languageField']] > 0 && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] && (int)$rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']] > 0) {
                        $lookUpTable = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'] ? $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable'] : $table;
                        // Get data formatted:
-                       $this->defaultLanguageData[$table . ':' . $rec['uid']] = BackendUtility::getRecordWSOL($lookUpTable, intval($rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]));
+                       $this->defaultLanguageData[$table . ':' . $rec['uid']] = BackendUtility::getRecordWSOL($lookUpTable, (int)$rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]);
                        // Get data for diff:
                        if ($GLOBALS['TCA'][$table]['ctrl']['transOrigDiffSourceField']) {
                                $this->defaultLanguageData_diff[$table . ':' . $rec['uid']] = unserialize($rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigDiffSourceField']]);
@@ -3665,9 +3665,9 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                        foreach ($prLang as $prL) {
                                /** @var $t8Tools \TYPO3\CMS\Backend\Configuration\TranslationConfigurationProvider */
                                $t8Tools = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Configuration\\TranslationConfigurationProvider');
-                               $tInfo = $t8Tools->translationInfo($lookUpTable, intval($rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']]), $prL['uid']);
+                               $tInfo = $t8Tools->translationInfo($lookUpTable, (int)$rec[$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField']], $prL['uid']);
                                if (is_array($tInfo['translations']) && is_array($tInfo['translations'][$prL['uid']])) {
-                                       $this->additionalPreviewLanguageData[$table . ':' . $rec['uid']][$prL['uid']] = BackendUtility::getRecordWSOL($table, intval($tInfo['translations'][$prL['uid']]['uid']));
+                                       $this->additionalPreviewLanguageData[$table . ':' . $rec['uid']][$prL['uid']] = BackendUtility::getRecordWSOL($table, (int)$tInfo['translations'][$prL['uid']]['uid']);
                                }
                        }
                }
@@ -4260,7 +4260,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                                $outStr = '';
                                $vAlign = $wizConf['_VALIGN'] ? ' style="vertical-align:' . $wizConf['_VALIGN'] . '"' : '';
                                if (count($outArr) > 1 || $wizConf['_PADDING']) {
-                                       $dist = intval($wizConf['_DISTANCE']);
+                                       $dist = (int)$wizConf['_DISTANCE'];
                                        if ($wizConf['_VERTICAL']) {
                                                $dist = $dist ? '<tr><td><img src="clear.gif" width="1" height="' . $dist . '" alt="" /></td></tr>' : '';
                                                $outStr = '<tr><td>' . implode(('</td></tr>' . $dist . '<tr><td>'), $outArr) . '</td></tr>';
@@ -4268,7 +4268,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                                                $dist = $dist ? '<td><img src="clear.gif" height="1" width="' . $dist . '" alt="" /></td>' : '';
                                                $outStr = '<tr><td' . $vAlign . '>' . implode(('</td>' . $dist . '<td' . $vAlign . '>'), $outArr) . '</td></tr>';
                                        }
-                                       $outStr = '<table border="0" cellpadding="' . intval($wizConf['_PADDING']) . '" cellspacing="' . intval($wizConf['_PADDING']) . '">' . $outStr . '</table>';
+                                       $outStr = '<table border="0" cellpadding="' . (int)$wizConf['_PADDING'] . '" cellspacing="' . (int)$wizConf['_PADDING'] . '">' . $outStr . '</table>';
                                } else {
                                        $outStr = implode('', $outArr);
                                }
@@ -5661,7 +5661,7 @@ TBE_EDITOR.customEvalFunctions[\'' . $evalData . '\'] = function(value) {
                        TBE_EDITOR.images.sel.src = "' . IconUtility::skinImg($this->backPath, 'gfx/content_selected.gif', '', 1) . '";
                        TBE_EDITOR.images.clear.src = "' . $this->backPath . 'clear.gif";
 
-                       TBE_EDITOR.auth_timeout_field = ' . intval($GLOBALS['BE_USER']->auth_timeout_field) . ';
+                       TBE_EDITOR.auth_timeout_field = ' . (int)$GLOBALS['BE_USER']->auth_timeout_field . ';
                        TBE_EDITOR.formname = "' . $formname . '";
                        TBE_EDITOR.formnameUENC = "' . rawurlencode($formname) . '";
                        TBE_EDITOR.backPath = "' . addslashes($this->backPath) . '";
index 14f409f..c5a6187 100644 (file)
@@ -68,7 +68,7 @@ class FrontendFormEngine extends \TYPO3\CMS\Backend\Form\FormEngine {
                        $iRow[] = '<td valign="top">' . '<img name="req_' . $content['TABLE'] . '_' . $content['ID'] . '_' . $content['FIELD'] . '" src="clear.gif" width="10" height="10" alt="" />' . '<img name="cm_' . $content['TABLE'] . '_' . $content['ID'] . '_' . $content['FIELD'] . '" src="clear.gif" width="7" height="10" alt="" />' . '</td><td nowrap="nowrap" valign="top">' . $content['ITEM'] . $content['HELP_ICON'] . '</td>';
                }
                $out = '<table border="0" cellpadding="0" cellspacing="0">
-                       <tr><td><img src="clear.gif" width="' . intval($this->paletteMargin) . '" height="1" alt="" /></td>' . implode('', $hRow) . '</tr>
+                       <tr><td><img src="clear.gif" width="' . (int)$this->paletteMargin . '" height="1" alt="" /></td>' . implode('', $hRow) . '</tr>
                        <tr><td></td>' . implode('', $iRow) . '</tr>
                </table>';
                return $out;
index b307c2d..bf5b596 100644 (file)
@@ -200,7 +200,7 @@ class FrontendBackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\B
                        }
                }
                // Check SSL (https)
-               if (intval($GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL']) && $GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL'] != 3) {
+               if ((int)$GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL'] && $GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSL'] !== 3) {
                        if (!GeneralUtility::getIndpEnv('TYPO3_SSL')) {
                                return FALSE;
                        }
@@ -242,9 +242,9 @@ class FrontendBackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\B
         * @return string Returns the list with a comma in the end (if any pages selected!)
         */
        public function extGetTreeList($id, $depth, $begin = 0, $perms_clause) {
-               $depth = intval($depth);
-               $begin = intval($begin);
-               $id = intval($id);
+               $depth = (int)$depth;
+               $begin = (int)$begin;
+               $id = (int)$id;
                $theList = '';
                if ($id && $depth > 0) {
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,title', 'pages', 'pid=' . $id . ' AND doktype IN (' . $GLOBALS['TYPO3_CONF_VARS']['FE']['content_doktypes'] . ') AND deleted=0 AND ' . $perms_clause);
@@ -270,7 +270,7 @@ class FrontendBackendUserAuthentication extends \TYPO3\CMS\Core\Authentication\B
         */
        public function extGetNumberOfCachedPages($pageId) {
                $pageCache = $GLOBALS['typo3CacheManager']->getCache('cache_pages');
-               $pageCacheEntries = $pageCache->getByTag('pageId_' . (int) $pageId);
+               $pageCacheEntries = $pageCache->getByTag('pageId_' . (int)$pageId);
                return count($pageCacheEntries);
        }
 
index 5bd675f..2145ea5 100644 (file)
@@ -140,7 +140,7 @@ class RecordHistory {
                        $this->showInsertDelete = 0;
                        $this->showSubElements = 0;
                        $element = explode(':', $this->element);
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_history', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($element[0], 'sys_history') . ' AND recuid=' . intval($element[1]), '', 'uid DESC', '1');
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_history', 'tablename=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($element[0], 'sys_history') . ' AND recuid=' . (int)$element[1], '', 'uid DESC', '1');
                        $record = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                        $this->lastSyslogId = $record['sys_log_uid'];
                        $this->createChangeLog();
@@ -182,9 +182,10 @@ class RecordHistory {
         * @todo Define visibility
         */
        public function toggleHighlight($uid) {
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('snapshot', 'sys_history', 'uid=' . intval($uid));
+               $uid = (int)$uid;
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('snapshot', 'sys_history', 'uid=' . $uid);
                $tmp = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
-               $GLOBALS['TYPO3_DB']->exec_UPDATEquery('sys_history', 'uid=' . intval($uid), array('snapshot' => !$tmp['snapshot']));
+               $GLOBALS['TYPO3_DB']->exec_UPDATEquery('sys_history', 'uid=' . $uid, array('snapshot' => !$tmp['snapshot']));
        }
 
        /**
@@ -353,14 +354,14 @@ class RecordHistory {
                }
                // set values correctly
                if ($currentSelection['maxSteps'] != 'marked') {
-                       $this->maxSteps = $currentSelection['maxSteps'] ? intval($currentSelection['maxSteps']) : '';
+                       $this->maxSteps = $currentSelection['maxSteps'] ? (int)$currentSelection['maxSteps'] : '';
                } else {
                        $this->showMarked = TRUE;
                        $this->maxSteps = FALSE;
                }
-               $this->showDiff = intval($currentSelection['showDiff']);
-               $this->showSubElements = intval($currentSelection['showSubElements']);
-               $this->showInsertDelete = intval($currentSelection['showInsertDelete']);
+               $this->showDiff = (int)$currentSelection['showDiff'];
+               $this->showSubElements = (int)$currentSelection['showSubElements'];
+               $this->showInsertDelete = (int)$currentSelection['showInsertDelete'];
                $content = '';
                // Get link to page history if the element history is shown
                $elParts = explode(':', $this->element);
@@ -653,7 +654,7 @@ class RecordHistory {
                if ($elParts[0] == 'pages' && $this->showSubElements && $this->hasPageAccess('pages', $elParts[1])) {
                        foreach ($GLOBALS['TCA'] as $tablename => $value) {
                                // check if there are records on the page
-                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $tablename, 'pid=' . intval($elParts[1]));
+                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid', $tablename, 'pid=' . (int)$elParts[1]);
                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                        // if there is history data available, merge it into changelog
                                        if ($newChangeLog = $this->getHistoryData($tablename, $row['uid'])) {
@@ -687,7 +688,7 @@ class RecordHistory {
                        // Selecting the $this->maxSteps most recent states:
                        $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('sys_history.*, sys_log.userid', 'sys_history, sys_log', 'sys_history.sys_log_uid = sys_log.uid
                                                        AND sys_history.tablename = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_history') . '
-                                                       AND sys_history.recuid = ' . intval($uid), '', 'sys_log.uid DESC', $this->maxSteps);
+                                                       AND sys_history.recuid = ' . (int)$uid, '', 'sys_log.uid DESC', $this->maxSteps);
                        // Traversing the result, building up changesArray / changeLog:
                        $changeLog = array();
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
@@ -718,7 +719,7 @@ class RecordHistory {
                                $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid, userid, action, tstamp', 'sys_log', 'type = 1
                                                        AND (action=1 OR action=3)
                                                        AND tablename = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_log') . '
-                                                       AND recuid = ' . intval($uid), '', 'uid DESC', $this->maxSteps);
+                                                       AND recuid = ' . (int)$uid, '', 'uid DESC', $this->maxSteps);
                                while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                        if ($row['uid'] < $this->lastSyslogId && $this->lastSyslogId) {
                                                continue;
@@ -851,7 +852,7 @@ class RecordHistory {
        public function resolveShUid() {
                if ($this->getArgument('sh_uid')) {
                        $sh_uid = $this->getArgument('sh_uid');
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_history', 'uid=' . intval($sh_uid));
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_history', 'uid=' . (int)$sh_uid);
                        $record = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                        $this->element = $record['tablename'] . ':' . $record['recuid'];
                        $this->lastSyslogId = $record['sys_log_uid'] - 1;
@@ -866,7 +867,7 @@ class RecordHistory {
         * @return boolean
         */
        protected function hasPageAccess($table, $uid) {
-               $uid = intval($uid);
+               $uid = (int)$uid;
 
                if ($table === 'pages') {
                        $pageId = $uid;
@@ -946,7 +947,7 @@ class RecordHistory {
                        case 'diff':
                        case 'highlight':
                        case 'sh_uid':
-                               $value = intval($value);
+                               $value = (int)$value;
                                break;
                        case 'settings':
                                if (!is_array($value)) {
index 387459f..a7eafb3 100644 (file)
@@ -216,7 +216,7 @@ class BaseScriptClass {
                if (!$this->MCONF['name']) {
                        $this->MCONF = $GLOBALS['MCONF'];
                }
-               $this->id = intval(GeneralUtility::_GP('id'));
+               $this->id = (int)GeneralUtility::_GP('id');
                $this->CMD = GeneralUtility::_GP('CMD');
                $this->perms_clause = $GLOBALS['BE_USER']->getPagePermsClause(1);
                $this->menuConfig();
index dda2723..4a3f137 100644 (file)
@@ -390,7 +390,7 @@ abstract class AbstractRecordList {
         */
        public function initializeLanguages() {
                // Look up page overlays:
-               $this->pageOverlays = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'pages_language_overlay', 'pid=' . intval($this->id) . BackendUtility::deleteClause('pages_language_overlay') . BackendUtility::versioningPlaceholderClause('pages_language_overlay'), '', '', '', 'sys_language_uid');
+               $this->pageOverlays = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'pages_language_overlay', 'pid=' . (int)$this->id . BackendUtility::deleteClause('pages_language_overlay') . BackendUtility::versioningPlaceholderClause('pages_language_overlay'), '', '', '', 'sys_language_uid');
                $this->languageIconTitles = $this->getTranslateTools()->getSystemLanguages($this->id, $this->backPath);
        }
 
index 3b91149..6872210 100644 (file)
@@ -87,7 +87,7 @@ class CategoryPermissionsAspect {
 
                                foreach ($categoryMountPoints as $categoryMountPoint) {
 
-                                       $treeNode = $this->lookUpCategoryMountPointInTreeNodes((int) $categoryMountPoint, $treeNodeCollection);
+                                       $treeNode = $this->lookUpCategoryMountPointInTreeNodes((int)$categoryMountPoint, $treeNodeCollection);
                                        if (!is_null($treeNode)) {
                                                $securedTreeNodeCollection->append($treeNode);
                                        }
@@ -114,7 +114,7 @@ class CategoryPermissionsAspect {
                foreach ($treeNodeCollection as $treeNode) {
 
                        /** @var \TYPO3\CMS\Backend\Tree\TreeNode $treeNode */
-                       if ((int) $treeNode->getId() === $categoryMountPoint) {
+                       if ((int)$treeNode->getId() === $categoryMountPoint) {
                                $result = $treeNode;
                                break;
                        }
index b324c36..054ae6a 100644 (file)
@@ -278,7 +278,7 @@ class SpriteGenerator {
         * @return SpriteGenerator An instance of $this, to enable "chaining".
         */
        public function setIconSpace($value) {
-               $this->space = intval($value);
+               $this->space = (int)$value;
                return $this;
        }
 
index 0525585..349e5b4 100644 (file)
@@ -441,7 +441,7 @@ class DocumentTemplate {
                                $this->pageRenderer->addJsFile($GLOBALS['BACK_PATH'] . $file);
                        }
                }
-               if (intval($GLOBALS['TYPO3_CONF_VARS']['BE']['debug']) === 1) {
+               if ((int)$GLOBALS['TYPO3_CONF_VARS']['BE']['debug'] === 1) {
                        $this->pageRenderer->enableDebugMode();
                }
                return $this->pageRenderer;
@@ -1023,7 +1023,7 @@ class DocumentTemplate {
         * @todo Define visibility
         */
        public function divider($dist) {
-               $dist = intval($dist);
+               $dist = (int)$dist;
                $str = '
 
        <!-- DIVIDER -->
@@ -1044,7 +1044,7 @@ class DocumentTemplate {
                        return '
 
        <!-- Spacer element -->
-       <div style="padding-top: ' . intval($dist) . 'px;"></div>
+       <div style="padding-top: ' . (int)$dist . 'px;"></div>
 ';
                }
        }
@@ -1799,7 +1799,7 @@ class DocumentTemplate {
                                <script type="text/javascript">
                                        DTM_array["' . $id . '"] = new Array();
                                        ' . implode('', $JSinit) . '
-                                       ' . ($toggle <= 0 ? 'DTM_activate("' . $id . '", top.DTM_currentTabs["' . $id . '"]?top.DTM_currentTabs["' . $id . '"]:' . intval($defaultTabIndex) . ', 0);' : '') . '
+                                       ' . ($toggle <= 0 ? 'DTM_activate("' . $id . '", top.DTM_currentTabs["' . $id . '"]?top.DTM_currentTabs["' . $id . '"]:' . (int)$defaultTabIndex . ', 0);' : '') . '
                                </script>
 
                                ';
index ea8d767..03370b3 100644 (file)
@@ -280,7 +280,7 @@ class ShortcutToolbarItem implements \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookI
                        $shortcut['group'] = $shortcutGroup;
                        $shortcut['icon'] = $this->getShortcutIcon($row, $shortcut);
                        $shortcut['iconTitle'] = $this->getShortcutIconTitle($shortcutLabel, $row['module_name'], $row['M_module_name']);
-                       $shortcut['action'] = 'jump(unescape(\'' . rawurlencode($row['url']) . '\'),\'' . implode('_', $moduleParts) . '\',\'' . $moduleParts[0] . '\', ' . intval($pageId) . ');';
+                       $shortcut['action'] = 'jump(unescape(\'' . rawurlencode($row['url']) . '\'),\'' . implode('_', $moduleParts) . '\',\'' . $moduleParts[0] . '\', ' . (int)$pageId . ');';
                        $lastGroup = $row['sc_group'];
                        $shortcuts[] = $shortcut;
                }
@@ -312,7 +312,7 @@ class ShortcutToolbarItem implements \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookI
        protected function getShortcutById($shortcutId) {
                $returnShortcut = FALSE;
                foreach ($this->shortcuts as $shortcut) {
-                       if ($shortcut['raw']['uid'] == (int) $shortcutId) {
+                       if ($shortcut['raw']['uid'] == (int)$shortcutId) {
                                $returnShortcut = $shortcut;
                                continue;
                        }
@@ -382,7 +382,7 @@ class ShortcutToolbarItem implements \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookI
                $shortcutGroups = $this->shortcutGroups;
                if (!$GLOBALS['BE_USER']->isAdmin()) {
                        foreach ($shortcutGroups as $groupId => $groupName) {
-                               if (intval($groupId) < 0) {
+                               if ((int)$groupId < 0) {
                                        unset($shortcutGroups[$groupId]);
                                }
                        }
@@ -399,7 +399,7 @@ class ShortcutToolbarItem implements \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookI
         * @return void
         */
        public function deleteAjaxShortcut($params = array(), \TYPO3\CMS\Core\Http\AjaxRequestHandler &$ajaxObj = NULL) {
-               $shortcutId = (int) GeneralUtility::_POST('shortcutId');
+               $shortcutId = (int)GeneralUtility::_POST('shortcutId');
                $fullShortcut = $this->getShortcutById($shortcutId);
                $ajaxReturn = 'failed';
                if ($fullShortcut['raw']['userid'] == $GLOBALS['BE_USER']->user['uid']) {
@@ -492,12 +492,12 @@ class ShortcutToolbarItem implements \TYPO3\CMS\Backend\Toolbar\ToolbarItemHookI
         * @return void
         */
        public function setAjaxShortcut($params = array(), \TYPO3\CMS\Core\Http\AjaxRequestHandler &$ajaxObj = NULL) {
-               $shortcutId = (int) GeneralUtility::_POST('shortcutId');
+               $shortcutId = (int)GeneralUtility::_POST('shortcutId');
                $shortcutName = strip_tags(GeneralUtility::_POST('value'));
-               $shortcutGroupId = (int) GeneralUtility::_POST('shortcut-group');
+               $shortcutGroupId = (int)GeneralUtility::_POST('shortcut-group');
                if ($shortcutGroupId > 0 || $GLOBALS['BE_USER']->isAdmin()) {
                        // Users can delete only their own shortcuts (except admins)
-                       $addUserWhere = !$GLOBALS['BE_USER']->isAdmin() ? ' AND userid=' . intval($GLOBALS['BE_USER']->user['uid']) : '';
+                       $addUserWhere = !$GLOBALS['BE_USER']->isAdmin() ? ' AND userid=' . (int)$GLOBALS['BE_USER']->user['uid'] : '';
                        $fieldValues = array(
                                'description' => $shortcutName,
                                'sc_group' => $shortcutGroupId
index 9048540..5efcea7 100644 (file)
@@ -168,8 +168,8 @@ class Commands {
         */
        static public function createNode(\TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode $parentNode, $targetId, $pageType) {
                $placeholder = 'NEW12345';
-               $pid = intval($parentNode->getWorkspaceId());
-               $targetId = intval($targetId);
+               $pid = (int)$parentNode->getWorkspaceId();
+               $targetId = (int)$targetId;
 
                // Use page TsConfig as default page initialization
                $pageTs = BackendUtility::getPagesTSconfig($pid);
@@ -249,7 +249,7 @@ class Commands {
         */
        static public function getMountPointPath($uid = -1) {
                if ($uid === -1) {
-                       $uid = intval($GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint']);
+                       $uid = (int)$GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint'];
                }
                if ($uid <= 0) {
                        return '';
@@ -290,7 +290,7 @@ class Commands {
         * @return string
         */
        static public function getDomainName($uid) {
-               $whereClause = 'pid=' . intval($uid) . BackendUtility::deleteClause('sys_domain') . BackendUtility::BEenableFields('sys_domain');
+               $whereClause = 'pid=' . (int)$uid . BackendUtility::deleteClause('sys_domain') . BackendUtility::BEenableFields('sys_domain');
                $domain = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow('domainName', 'sys_domain', $whereClause, '', 'sorting');
                return is_array($domain) ? htmlspecialchars($domain['domainName']) : '';
        }
@@ -308,7 +308,7 @@ class Commands {
                        self::$addIdAsPrefix = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showPageIdWithTitle');
                        self::$addDomainName = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showDomainNameWithTitle');
                        self::$backgroundColors = $GLOBALS['BE_USER']->getTSConfigProp('options.pageTree.backgroundColor');
-                       self::$titleLength = intval($GLOBALS['BE_USER']->uc['titleLen']);
+                       self::$titleLength = (int)$GLOBALS['BE_USER']->uc['titleLen'];
                }
                /** @var $subNode \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
                $subNode = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\Pagetree\\PagetreeNode');
index 18b3ec6..fe81e3b 100644 (file)
@@ -82,7 +82,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                if ($nodeLimit === NULL) {
                        $nodeLimit = $GLOBALS['TYPO3_CONF_VARS']['BE']['pageTree']['preloadLimit'];
                }
-               $this->nodeLimit = abs(intval($nodeLimit));
+               $this->nodeLimit = abs((int)$nodeLimit);
 
                $this->showRootlineAboveMounts = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showPathAboveMounts');
 
@@ -129,9 +129,9 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                $subpages = $this->getSubpages($node->getId());
                // check if fetching subpages the "root"-page
                // and in case of a virtual root return the mountpoints as virtual "subpages"
-               if (intval($node->getId()) === 0) {
+               if ((int)$node->getId() === 0) {
                        // check no temporary mountpoint is used
-                       if (!intval($GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint'])) {
+                       if (!(int)$GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint']) {
                                $mountPoints = array_map('intval', $GLOBALS['BE_USER']->returnWebmounts());
                                $mountPoints = array_unique($mountPoints);
                                if (!in_array(0, $mountPoints)) {
@@ -211,7 +211,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                        return $nodeCollection;
                }
                // check no temporary mountpoint is used
-               $mountPoints = intval($GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint']);
+               $mountPoints = (int)$GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint'];
                if (!$mountPoints) {
                        $mountPoints = array_map('intval', $GLOBALS['BE_USER']->returnWebmounts());
                        $mountPoints = array_unique($mountPoints);
@@ -220,10 +220,10 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                }
                $isNumericSearchFilter = is_numeric($searchFilter) && $searchFilter > 0;
                $searchFilterQuoted = preg_quote($searchFilter, '/');
-               $nodeId = intval($node->getId());
+               $nodeId = (int)$node->getId();
                $processedRecordIds = array();
                foreach ($records as $record) {
-                       if (intval($record['t3ver_wsid']) !== intval($GLOBALS['BE_USER']->workspace) && intval($record['t3ver_wsid']) !== 0) {
+                       if ((int)$record['t3ver_wsid'] !== (int)$GLOBALS['BE_USER']->workspace && (int)$record['t3ver_wsid'] !== 0) {
                                continue;
                        }
                        $liveVersion = BackendUtility::getLiveVersionOfRecord('pages', $record['uid'], 'uid');
@@ -232,7 +232,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                        }
 
                        $record = Commands::getNodeRecord($record['uid'], FALSE);
-                       if (intval($record['pid']) === -1
+                       if ((int)$record['pid'] === -1
                                || in_array($record['uid'], $this->hiddenRecords)
                                || in_array($record['uid'], $processedRecordIds)
                        ) {
@@ -248,7 +248,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                        if ($mountPoints != array(0)) {
                                $isInsideMountPoints = FALSE;
                                foreach ($rootline as $rootlineElement) {
-                                       if (in_array(intval($rootlineElement['uid']), $mountPoints, TRUE)) {
+                                       if (in_array((int)$rootlineElement['uid'], $mountPoints, TRUE)) {
                                                $isInsideMountPoints = TRUE;
                                                break;
                                        }
@@ -262,25 +262,26 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                        $amountOfRootlineElements = count($rootline);
                        for ($i = 0; $i < $amountOfRootlineElements; ++$i) {
                                $rootlineElement = $rootline[$i];
-                               $isInWebMount = $GLOBALS['BE_USER']->isInWebMount($rootlineElement['uid']);
+                               $rootlineElement['uid'] = (int)$rootlineElement['uid'];
+                               $isInWebMount = (int)$GLOBALS['BE_USER']->isInWebMount($rootlineElement['uid']);
                                if (!$isInWebMount
-                                       || (intval($rootlineElement['uid']) === intval($mountPoints[0])
-                                               && intval($rootlineElement['uid']) !== intval($isInWebMount))
+                                       || ($rootlineElement['uid'] === (int)$mountPoints[0]
+                                               && $rootlineElement['uid'] !== $isInWebMount)
                                ) {
                                        continue;
                                }
-                               if (intval($rootlineElement['pid']) === $nodeId
-                                       || intval($rootlineElement['uid']) === $nodeId
-                                       || (intval($rootlineElement['uid']) === intval($isInWebMount)
-                                               && in_array(intval($rootlineElement['uid']), $mountPoints, TRUE))
+                               if ($rootlineElement['pid'] === $nodeId
+                                       || $rootlineElement['uid'] === $nodeId
+                                       || ($rootlineElement['uid'] === $isInWebMount
+                                               && in_array($rootlineElement['uid'], $mountPoints, TRUE))
                                ) {
                                        $inFilteredRootline = TRUE;
                                }
-                               if (!$inFilteredRootline || intval($rootlineElement['uid']) === intval($mountPoint)) {
+                               if (!$inFilteredRootline || $rootlineElement['uid'] === $mountPoint) {
                                        continue;
                                }
                                $rootlineElement = Commands::getNodeRecord($rootlineElement['uid'], FALSE);
-                               $ident = intval($rootlineElement['sorting']) . intval($rootlineElement['uid']);
+                               $ident = (int)$rootlineElement['sorting'] . $rootlineElement['uid'];
                                if ($reference && $reference->offsetExists($ident)) {
                                        /** @var $refNode \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
                                        $refNode = $reference->offsetGet($ident);
@@ -294,7 +295,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                                } else {
                                        $refNode = Commands::getNewNode($rootlineElement, $mountPoint);
                                        $replacement = '<span class="typo3-pagetree-filteringTree-highlight">$1</span>';
-                                       if ($isNumericSearchFilter && intval($rootlineElement['uid']) === intval($searchFilter)) {
+                                       if ($isNumericSearchFilter && $rootlineElement['uid'] === (int)$searchFilter) {
                                                $text = str_replace('$1', $refNode->getText(), $replacement);
                                        } else {
                                                $text = preg_replace('/(' . $searchFilterQuoted . ')/i', $replacement, $refNode->getText());
@@ -307,7 +308,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                                                foreach ($childNodes as $childNode) {
                                                        /** @var $childNode \TYPO3\CMS\Backend\Tree\Pagetree\PagetreeNode */
                                                        $childRecord = $childNode->getRecord();
-                                                       $childIdent = intval($childRecord['sorting']) . intval($childRecord['uid']);
+                                                       $childIdent = (int)$childRecord['sorting'] . (int)$childRecord['uid'];
                                                        $childCollection->offsetSet($childIdent, $childNode);
                                                }
                                                $refNode->setChildNodes($childNodes);
@@ -339,7 +340,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
                $nodeCollection = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\Pagetree\\PagetreeNodeCollection');
                $isTemporaryMountPoint = FALSE;
                $rootNodeIsVirtual = FALSE;
-               $mountPoints = intval($GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint']);
+               $mountPoints = (int)$GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint'];
                if (!$mountPoints) {
                        $mountPoints = array_map('intval', $GLOBALS['BE_USER']->returnWebmounts());
                        $mountPoints = array_unique($mountPoints);
@@ -423,7 +424,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
        protected function getWhereClause($id, $searchFilter = '') {
                $where = $GLOBALS['BE_USER']->getPagePermsClause(1) . BackendUtility::deleteClause('pages') . BackendUtility::versioningPlaceholderClause('pages');
                if (is_numeric($id) && $id >= 0) {
-                       $where .= ' AND pid= ' . $GLOBALS['TYPO3_DB']->fullQuoteStr(intval($id), 'pages');
+                       $where .= ' AND pid= ' . $GLOBALS['TYPO3_DB']->fullQuoteStr((int)$id, 'pages');
                }
 
                $excludedDoktypes = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.excludeDoktypes');
@@ -434,7 +435,7 @@ class DataProvider extends \TYPO3\CMS\Backend\Tree\AbstractTreeDataProvider {
 
                if ($searchFilter !== '') {
                        if (is_numeric($searchFilter) && $searchFilter > 0) {
-                               $searchWhere .= 'uid = ' . intval($searchFilter) . ' OR ';
+                               $searchWhere .= 'uid = ' . (int)$searchFilter . ' OR ';
                        }
                        $searchFilter = $GLOBALS['TYPO3_DB']->fullQuoteStr('%' . $searchFilter . '%', 'pages');
                        $useNavTitle = $GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.showNavTitle');
index 2842b0a..6f052dc 100644 (file)
@@ -151,7 +151,7 @@ class ExtdirectTreeCommands {
                $node = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Tree\\Pagetree\\PagetreeNode', (array) $nodeData);
                try {
                        Commands::updateNodeLabel($node, $updatedLabel);
-                       $shortendedText = GeneralUtility::fixed_lgd_cs($updatedLabel, intval($GLOBALS['BE_USER']->uc['titleLen']));
+                       $shortendedText = GeneralUtility::fixed_lgd_cs($updatedLabel, (int)$GLOBALS['BE_USER']->uc['titleLen']);
                        $returnValue = array(
                                'editableText' => $updatedLabel,
                                'updatedText' => htmlspecialchars($shortendedText)
@@ -355,7 +355,7 @@ class ExtdirectTreeCommands {
                if (count($mountPoints) == 0) {
                        $mountPoints = array(0);
                }
-               $mountPoints[] = intval($GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint']);
+               $mountPoints[] = (int)$GLOBALS['BE_USER']->uc['pageTree_temporaryMountPoint'];
                $mountPoints = array_unique($mountPoints);
                /** @var $userSettings \TYPO3\CMS\Backend\User\ExtDirect\BackendUserSettingsDataProvider */
                $userSettings = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\User\\ExtDirect\\BackendUserSettingsDataProvider');
@@ -364,7 +364,7 @@ class ExtdirectTreeCommands {
                $rootline = BackendUtility::BEgetRootLine($nodeId, '', $GLOBALS['BE_USER']->workspace != 0);
                $rootlineIds = array();
                foreach ($rootline as $pageData) {
-                       $rootlineIds[] = intval($pageData['uid']);
+                       $rootlineIds[] = (int)$pageData['uid'];
                }
                foreach ($mountPoints as $mountPoint) {
                        if (!in_array($mountPoint, $rootlineIds, TRUE)) {
index 342a702..228c77d 100644 (file)
@@ -104,7 +104,7 @@ class PagetreeNode extends \TYPO3\CMS\Backend\Tree\ExtDirectNode {
         * @return void
         */
        public function setWorkspaceId($workspaceId) {
-               $this->workspaceId = intval($workspaceId);
+               $this->workspaceId = (int)$workspaceId;
        }
 
        /**
@@ -123,7 +123,7 @@ class PagetreeNode extends \TYPO3\CMS\Backend\Tree\ExtDirectNode {
         * @return void
         */
        public function setMountPoint($mountPoint) {
-               $this->mountPoint = intval($mountPoint);
+               $this->mountPoint = (int)$mountPoint;
        }
 
        /**
index 24a9a33..43f5a7d 100644 (file)
@@ -398,7 +398,6 @@ abstract class AbstractTreeView {
                // Get stored tree structure AND updating it if needed according to incoming PM GET var.
                $this->initializePositionSaving();
                // Init done:
-               $titleLen = intval($this->BE_USER->uc['titleLen']);
                $treeArr = array();
                // Traverse mounts:
                foreach ($this->MOUNTS as $idx => $uid) {
@@ -451,7 +450,7 @@ abstract class AbstractTreeView {
         * @todo Define visibility
         */
        public function printTree($treeArr = '') {
-               $titleLen = intval($this->BE_USER->uc['titleLen']);
+               $titleLen = (int)$this->BE_USER->uc['titleLen'];
                if (!is_array($treeArr)) {
                        $treeArr = $this->tree;
                }
@@ -763,7 +762,7 @@ abstract class AbstractTreeView {
                // Buffer for id hierarchy is reset:
                $this->buffer_idH = array();
                // Init vars
-               $depth = intval($depth);
+               $depth = (int)$depth;
                $HTML = '';
                $a = 0;
                $res = $this->getDataInit($uid, $subCSSclass);
index bb4763a..a8d07af 100644 (file)
@@ -127,7 +127,7 @@ class FolderTreeView extends \TYPO3\CMS\Backend\Tree\View\AbstractTreeView {
                        // Activates dynamic AJAX based tree
                        $scopeData = serialize($this->scope);
                        $scopeHash = GeneralUtility::hmac($scopeData);
-                       $js = htmlspecialchars('Tree.load(\'' . $cmd . '\', ' . intval($isExpand) . ', this, \'' . $scopeData . '\', \'' . $scopeHash . '\');');
+                       $js = htmlspecialchars('Tree.load(\'' . $cmd . '\', ' . (int)$isExpand . ', this, \'' . $scopeData . '\', \'' . $scopeHash . '\');');
                        return '<a class="pm" onclick="' . $js . '">' . $icon . '</a>';
                } else {
                        return $icon;
@@ -344,7 +344,7 @@ class FolderTreeView extends \TYPO3\CMS\Backend\Tree\View\AbstractTreeView {
         * @see getBrowsableTree()
         */
        public function getFolderTree(\TYPO3\CMS\Core\Resource\Folder $folderObject, $depth = 999, $type = '') {
-               $depth = intval($depth);
+               $depth = (int)$depth;
 
                // This generates the directory tree
                /* array of \TYPO3\CMS\Core\Resource\Folder */
@@ -439,7 +439,7 @@ class FolderTreeView extends \TYPO3\CMS\Backend\Tree\View\AbstractTreeView {
                $doExpand = FALSE;
                $doCollapse = FALSE;
                $ajaxOutput = '';
-               $titleLength = intval($this->BE_USER->uc['titleLen']);
+               $titleLength = (int)$this->BE_USER->uc['titleLen'];
                if (!is_array($treeItems)) {
                        $treeItems = $this->tree;
                }
index 9532ba8..5693397 100644 (file)
@@ -373,7 +373,7 @@ class PagePositionMap {
                $colPosArray = GeneralUtility::trimExplode(',', $colPosList, TRUE);
                $lines = array();
                foreach ($colPosArray as $kk => $vv) {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'pid=' . intval($pid) . ($showHidden ? '' : BackendUtility::BEenableFields('tt_content')) . ' AND colPos=' . intval($vv) . ((string)$this->cur_sys_language !== '' ? ' AND sys_language_uid=' . intval($this->cur_sys_language) : '') . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content'), '', 'sorting');
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'tt_content', 'pid=' . (int)$pid . ($showHidden ? '' : BackendUtility::BEenableFields('tt_content')) . ' AND colPos=' . (int)$vv . ((string)$this->cur_sys_language !== '' ? ' AND sys_language_uid=' . (int)$this->cur_sys_language : '') . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content'), '', 'sorting');
                        $lines[$vv] = array();
                        $lines[$vv][] = $this->insertPositionIcon('', $vv, $kk, $moveUid, $pid);
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
@@ -404,8 +404,8 @@ class PagePositionMap {
                $backendLayout = GeneralUtility::callUserFunction('TYPO3\\CMS\\Backend\\View\\BackendLayoutView->getSelectedBackendLayout', $pid, $this);
                if (isset($backendLayout['__config']['backend_layout.'])) {
                        $table = '<div class="t3-gridContainer"><table border="0" cellspacing="0" cellpadding="0" id="typo3-ttContentList">';
-                       $colCount = intval($backendLayout['__config']['backend_layout.']['colCount']);
-                       $rowCount = intval($backendLayout['__config']['backend_layout.']['rowCount']);
+                       $colCount = (int)$backendLayout['__config']['backend_layout.']['colCount'];
+                       $rowCount = (int)$backendLayout['__config']['backend_layout.']['rowCount'];
                        $table .= '<colgroup>';
                        for ($i = 0; $i < $colCount; $i++) {
                                $table .= '<col style="width:' . 100 / $colCount . '%"></col>';
@@ -425,7 +425,7 @@ class PagePositionMap {
                                                continue;
                                        }
                                        // Which tt_content colPos should be displayed inside this cell
-                                       $columnKey = intval($columnConfig['colPos']);
+                                       $columnKey = (int)$columnConfig['colPos'];
                                        $head = '';
                                        $params = array();
                                        $params['pid'] = $pid;
@@ -567,7 +567,7 @@ class PagePositionMap {
         * @todo Define visibility
         */
        public function wrapRecordTitle($str, $row) {
-               return '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('uid' => intval($row['uid']), 'moveUid' => ''))) . '">' . $str . '</a>';
+               return '<a href="' . htmlspecialchars(GeneralUtility::linkThisScript(array('uid' => (int)$row['uid'], 'moveUid' => ''))) . '">' . $str . '</a>';
        }
 
 }
index 34917e4..5e44b5c 100644 (file)
@@ -88,7 +88,7 @@ class BackendUtility {
         */
        static public function getRecord($table, $uid, $fields = '*', $where = '', $useDeleteClause = TRUE) {
                if ($GLOBALS['TCA'][$table]) {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $table, 'uid=' . intval($uid) . ($useDeleteClause ? self::deleteClause($table) : '') . $where);
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $table, 'uid=' . (int)$uid . ($useDeleteClause ? self::deleteClause($table) : '') . $where);
                        $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                        $GLOBALS['TYPO3_DB']->sql_free_result($res);
                        if ($row) {
@@ -216,7 +216,7 @@ class BackendUtility {
                                $val = strrev($val);
                                $parts = explode('_', $val, 2);
                                if ((string) trim($parts[0]) != '') {
-                                       $theID = intval(strrev($parts[0]));
+                                       $theID = (int)strrev($parts[0]);
                                        $theTable = trim($parts[1]) ? strrev(trim($parts[1])) : $default_tablename;
                                        if ($theTable == $tablename) {
                                                $list[] = $theID;
@@ -277,7 +277,7 @@ class BackendUtility {
                $recordLocalization = FALSE;
                if (self::isTableLocalizable($table)) {
                        $tcaCtrl = $GLOBALS['TCA'][$table]['ctrl'];
-                       $recordLocalization = self::getRecordsByField($table, $tcaCtrl['transOrigPointerField'], $uid, 'AND ' . $tcaCtrl['languageField'] . '=' . intval($language) . ($andWhereClause ? ' ' . $andWhereClause : ''), '', '', '1');
+                       $recordLocalization = self::getRecordsByField($table, $tcaCtrl['transOrigPointerField'], $uid, 'AND ' . $tcaCtrl['languageField'] . '=' . (int)$language . ($andWhereClause ? ' ' . $andWhereClause : ''), '', '', '1');
                }
                return $recordLocalization;
        }
@@ -360,7 +360,7 @@ class BackendUtility {
                if (is_array($getPageForRootline_cache[$ident])) {
                        $row = $getPageForRootline_cache[$ident];
                } else {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('pid,uid,title,TSconfig,is_siteroot,storage_pid,t3ver_oid,t3ver_wsid,t3ver_state,t3ver_stage,backend_layout_next_level', 'pages', 'uid=' . intval($uid) . ' ' . self::deleteClause('pages') . ' ' . $clause);
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('pid,uid,title,TSconfig,is_siteroot,storage_pid,t3ver_oid,t3ver_wsid,t3ver_state,t3ver_stage,backend_layout_next_level', 'pages', 'uid=' . (int)$uid . ' ' . self::deleteClause('pages') . ' ' . $clause);
                        $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                        if ($row) {
                                $newLocation = FALSE;
@@ -680,7 +680,7 @@ class BackendUtility {
         */
        static public function readPageAccess($id, $perms_clause) {
                if ((string) $id != '') {
-                       $id = intval($id);
+                       $id = (int)$id;
                        if (!$id) {
                                if ($GLOBALS['BE_USER']->isAdmin()) {
                                        $path = '/';
@@ -693,7 +693,7 @@ class BackendUtility {
                                        self::workspaceOL('pages', $pageinfo);
                                        if (is_array($pageinfo)) {
                                                self::fixVersioningPid('pages', $pageinfo);
-                                               list($pageinfo['_thePath'], $pageinfo['_thePathFull']) = self::getRecordPath(intval($pageinfo['uid']), $perms_clause, 15, 1000);
+                                               list($pageinfo['_thePath'], $pageinfo['_thePathFull']) = self::getRecordPath((int)$pageinfo['uid'], $perms_clause, 15, 1000);
                                                return $pageinfo;
                                        }
                                }
@@ -933,7 +933,7 @@ class BackendUtility {
                                // Used to avoid looping, if any should happen.
                                $subFieldPointer = $conf['ds_pointerField_searchParent_subField'];
                                while (!$srcPointer) {
-                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,' . $ds_pointerField . ',' . $ds_searchParentField . ($subFieldPointer ? ',' . $subFieldPointer : ''), $table, 'uid=' . intval($newRecordPidValue ?: $rr[$ds_searchParentField]) . self::deleteClause($table));
+                                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid,' . $ds_pointerField . ',' . $ds_searchParentField . ($subFieldPointer ? ',' . $subFieldPointer : ''), $table, 'uid=' . (int)($newRecordPidValue ?: $rr[$ds_searchParentField]) . self::deleteClause($table));
                                        $newRecordPidValue = 0;
                                        $rr = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                                        $GLOBALS['TYPO3_DB']->sql_free_result($res);
@@ -1131,7 +1131,7 @@ class BackendUtility {
        static public function getPagesTSconfig($id, $rootLine = NULL, $returnPartArray = FALSE) {
                static $pagesTSconfig_cache = array();
 
-               $id = intval($id);
+               $id = (int)$id;
                if ($returnPartArray === FALSE
                        && $rootLine === NULL
                        && isset($pagesTSconfig_cache[$id])
@@ -1196,7 +1196,7 @@ class BackendUtility {
         * @see implodeTSParams(), getPagesTSconfig()
         */
        static public function updatePagesTSconfig($id, $pageTS, $TSconfPrefix, $impParams = '') {
-               $id = intval($id);
+               $id = (int)$id;
                if (is_array($pageTS) && $id > 0) {
                        if (!is_array($impParams)) {
                                $impParams = self::implodeTSParams(self::getPagesTSconfig($id));
@@ -1232,7 +1232,7 @@ class BackendUtility {
                                $TSlines = array_reverse($TSlines);
                                // Store those changes
                                $TSconf = implode(LF, $TSlines);
-                               $GLOBALS['TYPO3_DB']->exec_UPDATEquery('pages', 'uid=' . intval($id), array('TSconfig' => $TSconf));
+                               $GLOBALS['TYPO3_DB']->exec_UPDATEquery('pages', 'uid=' . (int)$id, array('TSconfig' => $TSconf));
                        }
                }
        }
@@ -1428,7 +1428,7 @@ class BackendUtility {
         * @return string Formatted time
         */
        static public function date($tstamp) {
-               return date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], (int) $tstamp);
+               return date($GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], (int)$tstamp);
        }
 
        /**
@@ -1536,7 +1536,7 @@ class BackendUtility {
                $sizeParts = array(64, 64);
                if ($size = trim($size)) {
                        $sizeParts = explode('x', $size . 'x' . $size);
-                       if (!intval($sizeParts[0])) {
+                       if (!(int)$sizeParts[0]) {
                                $size = '';
                        }
                }
@@ -1549,7 +1549,7 @@ class BackendUtility {
                                'sys_file_reference',
                                'tablenames = ' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_file_reference')
                                        . ' AND fieldname=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($field, 'sys_file_reference')
-                                       . ' AND uid_foreign=' . intval($row['uid'])
+                                       . ' AND uid_foreign=' . (int)$row['uid']
                                        . self::deleteClause('sys_file_reference')
                                        . self::versioningPlaceholderClause('sys_file_reference'),
                                '',
@@ -1689,9 +1689,9 @@ class BackendUtility {
                        $parts[] = $GLOBALS['LANG']->sL($GLOBALS['TCA']['pages']['columns']['url']['label']) . ' ' . $row['url'];
                } elseif ($row['doktype'] == PageRepository::DOKTYPE_SHORTCUT) {
                        if ($perms_clause) {
-                               $label = self::getRecordPath(intval($row['shortcut']), $perms_clause, 20);
+                               $label = self::getRecordPath((int)$row['shortcut'], $perms_clause, 20);
                        } else {
-                               $row['shortcut'] = intval($row['shortcut']);
+                               $row['shortcut'] = (int)$row['shortcut'];
                                $lRec = self::getRecordWSOL('pages', $row['shortcut'], 'title');
                                $label = $lRec['title'] . ' (id=' . $row['shortcut'] . ')';
                        }
@@ -1701,9 +1701,9 @@ class BackendUtility {
                        $parts[] = $GLOBALS['LANG']->sL($GLOBALS['TCA']['pages']['columns']['shortcut']['label']) . ' ' . $label;
                } elseif ($row['doktype'] == PageRepository::DOKTYPE_MOUNTPOINT) {
                        if ($perms_clause) {
-                               $label = self::getRecordPath(intval($row['mount_pid']), $perms_clause, 20);
+                               $label = self::getRecordPath((int)$row['mount_pid'], $perms_clause, 20);
                        } else {
-                               $lRec = self::getRecordWSOL('pages', intval($row['mount_pid']), 'title');
+                               $lRec = self::getRecordWSOL('pages', (int)$row['mount_pid'], 'title');
                                $label = $lRec['title'];
                        }
                        $parts[] = $GLOBALS['LANG']->sL($GLOBALS['TCA']['pages']['columns']['mount_pid']['label']) . ' ' . $label;
@@ -2091,7 +2091,7 @@ class BackendUtility {
                                                                $rParts = GeneralUtility::trimExplode(',', $value, TRUE);
                                                                $lA = array();
                                                                foreach ($rParts as $rVal) {
-                                                                       $rVal = intval($rVal);
+                                                                       $rVal = (int)$rVal;
                                                                        if ($rVal > 0) {
                                                                                $r = self::getRecordWSOL($theColConf['foreign_table'], $rVal);
                                                                        } else {
@@ -2688,7 +2688,7 @@ class BackendUtility {
                                $domain = rtrim(GeneralUtility::getIndpEnv('TYPO3_SITE_URL'), '/');
                        }
                        // Append port number if lockSSLPort is not the standard port 443
-                       $portNumber = intval($GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSLPort']);
+                       $portNumber = (int)$GLOBALS['TYPO3_CONF_VARS']['BE']['lockSSLPort'];
                        if ($portNumber > 0 && $portNumber !== 443 && $portNumber < 65536 && $protocol === 'https') {
                                $domain .= ':' . strval($portNumber);
                        }
@@ -3062,7 +3062,7 @@ class BackendUtility {
         */
        static public function lockRecords($table = '', $uid = 0, $pid = 0) {
                if (isset($GLOBALS['BE_USER']->user['uid'])) {
-                       $user_id = intval($GLOBALS['BE_USER']->user['uid']);
+                       $user_id = (int)$GLOBALS['BE_USER']->user['uid'];
                        if ($table && $uid) {
                                $fields_values = array(
                                        'userid' => $user_id,
@@ -3075,7 +3075,7 @@ class BackendUtility {
                                );
                                $GLOBALS['TYPO3_DB']->exec_INSERTquery('sys_lockedrecords', $fields_values);
                        } else {
-                               $GLOBALS['TYPO3_DB']->exec_DELETEquery('sys_lockedrecords', 'userid=' . intval($user_id));
+                               $GLOBALS['TYPO3_DB']->exec_DELETEquery('sys_lockedrecords', 'userid=' . (int)$user_id);
                        }
                }
        }
@@ -3093,7 +3093,7 @@ class BackendUtility {
        static public function isRecordLocked($table, $uid) {
                if (!is_array($GLOBALS['LOCKED_RECORDS'])) {
                        $GLOBALS['LOCKED_RECORDS'] = array();
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_lockedrecords', 'sys_lockedrecords.userid<>' . intval($GLOBALS['BE_USER']->user['uid']) . '
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'sys_lockedrecords', 'sys_lockedrecords.userid<>' . (int)$GLOBALS['BE_USER']->user['uid'] . '
                                                                AND sys_lockedrecords.tstamp > ' . ($GLOBALS['EXEC_TIME'] - 2 * 3600));
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                // Get the type of the user that locked this record:
@@ -3224,12 +3224,12 @@ class BackendUtility {
                                '###PAGE_TSCONFIG_STR###'
                        ),
                        array(
-                               intval($tsConfig['_CURRENT_PID']),
-                               intval($tsConfig['_THIS_UID']),
-                               intval($tsConfig['_THIS_CID']),
-                               intval($tsConfig['_STORAGE_PID']),
-                               intval($tsConfig['_SITEROOT']),
-                               intval($tsConfig[$field]['PAGE_TSCONFIG_ID']),
+                               (int)$tsConfig['_CURRENT_PID'],
+                               (int)$tsConfig['_THIS_UID'],
+                               (int)$tsConfig['_THIS_CID'],
+                               (int)$tsConfig['_STORAGE_PID'],
+                               (int)$tsConfig['_SITEROOT'],
+                               (int)$tsConfig[$field]['PAGE_TSCONFIG_ID'],
                                $GLOBALS['TYPO3_DB']->cleanIntList($tsConfig[$field]['PAGE_TSCONFIG_IDLIST']),
                                $GLOBALS['TYPO3_DB']->quoteStr($tsConfig[$field]['PAGE_TSCONFIG_STR'], $table)
                        ),
@@ -3274,10 +3274,10 @@ class BackendUtility {
                $rootLine = self::BEgetRootLine($TScID, '', TRUE);
                foreach ($rootLine as $rC) {
                        if (!$res['_STORAGE_PID']) {
-                               $res['_STORAGE_PID'] = intval($rC['storage_pid']);
+                               $res['_STORAGE_PID'] = (int)$rC['storage_pid'];
                        }
                        if (!$res['_SITEROOT']) {
-                               $res['_SITEROOT'] = $rC['is_siteroot'] ? intval($rC['uid']) : 0;
+                               $res['_SITEROOT'] = $rC['is_siteroot'] ? (int)$rC['uid'] : 0;
                        }
                }
                return $res;
@@ -3299,7 +3299,7 @@ class BackendUtility {
        static public function getTSconfig_pidValue($table, $uid, $pid) {
                // If pid is an integer this takes precedence in our lookup.
                if (MathUtility::canBeInterpretedAsInteger($pid)) {
-                       $thePidValue = intval($pid);
+                       $thePidValue = (int)$pid;
                        // If ref to another record, look that record up.
                        if ($thePidValue < 0) {
                                $pidRec = self::getRecord($table, abs($thePidValue), 'pid');
@@ -3556,7 +3556,7 @@ class BackendUtility {
                                        return '';
                                }
                        } else {
-                               $condition = 'ref_uid=' . intval($ref);
+                               $condition = 'ref_uid=' . (int)$ref;
                        }
                        $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('*', 'sys_refindex', 'ref_table=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($table, 'sys_refindex') . ' AND ' . $condition . ' AND deleted=0');
                }
@@ -3573,7 +3573,7 @@ class BackendUtility {
         */
        static public function translationCount($table, $ref, $msg = '') {
                if (empty($GLOBALS['TCA'][$table]['ctrl']['transForeignTable']) && $GLOBALS['TCA'][$table]['ctrl']['languageField'] && $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] && !$GLOBALS['TCA'][$table]['ctrl']['transOrigPointerTable']) {
-                       $where = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] . '=' . intval($ref) . ' AND ' . $GLOBALS['TCA'][$table]['ctrl']['languageField'] . '<>0';
+                       $where = $GLOBALS['TCA'][$table]['ctrl']['transOrigPointerField'] . '=' . (int)$ref . ' AND ' . $GLOBALS['TCA'][$table]['ctrl']['languageField'] . '<>0';
                        if (!empty($GLOBALS['TCA'][$table]['ctrl']['delete'])) {
                                $where .= ' AND ' . $GLOBALS['TCA'][$table]['ctrl']['delete'] . '=0';
                        }
@@ -3608,7 +3608,7 @@ class BackendUtility {
                                $outputRows[] = $row;
                        } else {
                                // Select UID version:
-                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $table, 'uid=' . intval($uid) . ($includeDeletedRecords ? '' : self::deleteClause($table)));
+                               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $table, 'uid=' . (int)$uid . ($includeDeletedRecords ? '' : self::deleteClause($table)));
                                // Add rows to output array:
                                if ($res) {
                                        $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
@@ -3621,7 +3621,7 @@ class BackendUtility {
                                }
                        }
                        // Select all offline versions of record:
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $table, 'pid=-1 AND uid<>' . intval($uid) . ' AND t3ver_oid=' . intval($uid) . ($workspace != 0 ? ' AND t3ver_wsid=' . intval($workspace) : '') . ($includeDeletedRecords ? '' : self::deleteClause($table)), '', 't3ver_id DESC');
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery($fields, $table, 'pid=-1 AND uid<>' . (int)$uid . ' AND t3ver_oid=' . (int)$uid . ($workspace != 0 ? ' AND t3ver_wsid=' . (int)$workspace : '') . ($includeDeletedRecords ? '' : self::deleteClause($table)), '', 't3ver_id DESC');
                        // Add rows to output array:
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                                $outputRows[] = $row;
@@ -3715,7 +3715,7 @@ class BackendUtility {
                                // If version was found, swap the default record with that one.
                                if (is_array($wsAlt)) {
                                        // Check if this is in move-state:
-                                       if ($previewMovePlaceholders && !$movePldSwap && ($table == 'pages' || (int) $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) && $unsetMovePointers) {
+                                       if ($previewMovePlaceholders && !$movePldSwap && ($table == 'pages' || (int)$GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) && $unsetMovePointers) {
                                                // Only for WS ver 2... (moving)
                                                // If t3ver_state is not found, then find it... (but we like best if it is here...)
                                                if (!isset($wsAlt['t3ver_state'])) {
@@ -3768,7 +3768,7 @@ class BackendUtility {
         */
        static public function movePlhOL($table, &$row) {
                // Only for WS ver 2... (moving)
-               if ($table == 'pages' || (int) $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) {
+               if ($table == 'pages' || (int)$GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) {
                        // If t3ver_move_id or t3ver_state is not found, then find it... (but we like best if it is here...)
                        if (!isset($row['t3ver_move_id']) || !isset($row['t3ver_state'])) {
                                $moveIDRec = self::getRecord($table, $row['uid'], 't3ver_move_id, t3ver_state');
@@ -3802,7 +3802,7 @@ class BackendUtility {
                if (ExtensionManagementUtility::isLoaded('version')) {
                        if ($workspace !== 0 && $GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
                                // Select workspace version of record:
-                               $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow($fields, $table, 'pid=-1 AND ' . 't3ver_oid=' . intval($uid) . ' AND ' . 't3ver_wsid=' . intval($workspace) . self::deleteClause($table));
+                               $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow($fields, $table, 'pid=-1 AND ' . 't3ver_oid=' . (int)$uid . ' AND ' . 't3ver_wsid=' . (int)$workspace . self::deleteClause($table));
                                if (is_array($row)) {
                                        return $row;
                                }
@@ -3853,7 +3853,7 @@ class BackendUtility {
         */
        static public function versioningPlaceholderClause($table) {
                if ($GLOBALS['TCA'][$table] && $GLOBALS['TCA'][$table]['ctrl']['versioningWS']) {
-                       $currentWorkspace = intval($GLOBALS['BE_USER']->workspace);
+                       $currentWorkspace = (int)$GLOBALS['BE_USER']->workspace;
                        return ' AND (' . $table . '.t3ver_state <= ' . new VersionState(VersionState::DEFAULT_STATE) . ' OR ' . $table . '.t3ver_wsid = ' . $currentWorkspace . ')';
                }
        }
@@ -3871,7 +3871,7 @@ class BackendUtility {
                        if (is_null($workspaceId)) {
                                $workspaceId = $GLOBALS['BE_USER']->workspace;
                        }
-                       $workspaceId = intval($workspaceId);
+                       $workspaceId = (int)$workspaceId;
                        $pidOperator = $workspaceId === 0 ? '!=' : '=';
                        $whereClause = ' AND ' . $table . '.t3ver_wsid=' . $workspaceId . ' AND ' . $table . '.pid' . $pidOperator . '-1';
                }
@@ -3892,7 +3892,7 @@ class BackendUtility {
                                if ($tableName != 'pages' && $cfg['ctrl']['versioningWS']) {
                                        // Select all records from this table in the database from the workspace
                                        // This joins the online version with the offline version as tables A and B
-                                       $output[$tableName] = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('B.uid as live_uid, A.uid as offline_uid', $tableName . ' A,' . $tableName . ' B', 'A.pid=-1' . ' AND B.pid=' . intval($pageId) . ' AND A.t3ver_wsid=' . intval($workspace) . ' AND A.t3ver_oid=B.uid' . self::deleteClause($tableName, 'A') . self::deleteClause($tableName, 'B'));
+                                       $output[$tableName] = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('B.uid as live_uid, A.uid as offline_uid', $tableName . ' A,' . $tableName . ' B', 'A.pid=-1' . ' AND B.pid=' . (int)$pageId . ' AND A.t3ver_wsid=' . (int)$workspace . ' AND A.t3ver_oid=B.uid' . self::deleteClause($tableName, 'A') . self::deleteClause($tableName, 'B'));
                                        if (!is_array($output[$tableName]) || !count($output[$tableName])) {
                                                unset($output[$tableName]);
                                        }
@@ -3927,13 +3927,13 @@ class BackendUtility {
         */
        static public function getMovePlaceholder($table, $uid, $fields = '*') {
                $workspace = $GLOBALS['BE_USER']->workspace;
-               if ($workspace !== 0 && $GLOBALS['TCA'][$table] && (int) $GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) {
+               if ($workspace !== 0 && $GLOBALS['TCA'][$table] && (int)$GLOBALS['TCA'][$table]['ctrl']['versioningWS'] >= 2) {
                        // Select workspace version of record:
                        $row = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow(
                                $fields,
                                $table,
                                'pid<>-1 AND t3ver_state=' . new VersionState(VersionState::MOVE_PLACEHOLDER) . ' AND t3ver_move_id='
-                                       . intval($uid) . ' AND t3ver_wsid=' . intval($workspace) . self::deleteClause($table)
+                                       . (int)$uid . ' AND t3ver_wsid=' . (int)$workspace . self::deleteClause($table)
                        );
                        if (is_array($row)) {
                                return $row;
index 57e112e..ae17fbc 100644 (file)
@@ -214,18 +214,18 @@ class IconUtility {
                        }
                        // If a "starttime" is set and higher than current time:
                        if ($enCols['starttime']) {
-                               if ($GLOBALS['EXEC_TIME'] < intval($row[$enCols['starttime']])) {
+                               if ($GLOBALS['EXEC_TIME'] < (int)$row[$enCols['starttime']]) {
                                        $timing = TRUE;
                                        // And if "endtime" is NOT set:
-                                       if (intval($row[$enCols['endtime']]) == 0) {
+                                       if ((int)$row[$enCols['endtime']] === 0) {
                                                $futuretiming = TRUE;
                                        }
                                }
                        }
                        // If an "endtime" is set:
                        if ($enCols['endtime']) {
-                               if (intval($row[$enCols['endtime']]) > 0) {
-                                       if (intval($row[$enCols['endtime']]) < $GLOBALS['EXEC_TIME']) {
+                               if ((int)$row[$enCols['endtime']] > 0) {
+                                       if ((int)$row[$enCols['endtime']] < $GLOBALS['EXEC_TIME']) {
                                                // End-timing applies at this point.
                                                $timing = TRUE;
                                        } else {
@@ -848,13 +848,13 @@ class IconUtility {
                                $status['hidden'] = TRUE;
                        }
                        // If a "starttime" is set and higher than current time:
-                       if ($tcaCtrl['enablecolumns']['starttime'] && $GLOBALS['EXEC_TIME'] < intval($row[$tcaCtrl['enablecolumns']['starttime']])) {
+                       if ($tcaCtrl['enablecolumns']['starttime'] && $GLOBALS['EXEC_TIME'] < (int)$row[$tcaCtrl['enablecolumns']['starttime']]) {
                                $status['starttime'] = TRUE;
                        }
                        // If an "endtime" is set
                        if ($tcaCtrl['enablecolumns']['endtime']) {
-                               if (intval($row[$tcaCtrl['enablecolumns']['endtime']]) > 0) {
-                                       if (intval($row[$tcaCtrl['enablecolumns']['endtime']]) < $GLOBALS['EXEC_TIME']) {
+                               if ((int)$row[$tcaCtrl['enablecolumns']['endtime']] > 0) {
+                                       if ((int)$row[$tcaCtrl['enablecolumns']['endtime']] < $GLOBALS['EXEC_TIME']) {
                                                // End-timing applies at this point.
                                                $status['endtime'] = TRUE;
                                        } else {
index d0ab73d..ecdc449 100644 (file)
@@ -76,7 +76,7 @@ class DefaultDataProvider implements DataProviderInterface {
                $data = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
                        '*',
                        'backend_layout',
-                       'uid=' . intval($identifier) . BackendUtility::BEenableFields('backend_layout') . BackendUtility::deleteClause('backend_layout')
+                       'uid=' . (int)$identifier . BackendUtility::BEenableFields('backend_layout') . BackendUtility::deleteClause('backend_layout')
                );
                if (is_array($data)) {
                        $backendLayout = $this->createBackendLayout($data);
@@ -145,9 +145,9 @@ class DefaultDataProvider implements DataProviderInterface {
                        '*',
                        'backend_layout',
                                '(
-                                       ( ' . intval($pageTsConfigId[$fieldName]) . ' = 0 AND ' . intval($storagePid) . ' = 0 )
-                                       OR ( backend_layout.pid = ' . intval($pageTsConfigId[$fieldName]) . ' OR backend_layout.pid = ' . intval($storagePid) . ' )
-                                       OR ( ' . intval($pageTsConfigId[$fieldName]) . ' = 0 AND backend_layout.pid = ' . intval($pageUid) . ' )
+                                       ( ' . (int)$pageTsConfigId[$fieldName] . ' = 0 AND ' . (int)$storagePid . ' = 0 )
+                                       OR ( backend_layout.pid = ' . (int)$pageTsConfigId[$fieldName] . ' OR backend_layout.pid = ' . (int)$storagePid . ' )
+                                       OR ( ' . (int)$pageTsConfigId[$fieldName] . ' = 0 AND backend_layout.pid = ' . (int)$pageUid . ' )
                                ) ' . BackendUtility::BEenableFields('backend_layout') . BackendUtility::deleteClause('backend_layout'),
                        '',
                        'sorting ASC'
@@ -170,7 +170,7 @@ class DefaultDataProvider implements DataProviderInterface {
                $storagePid = 0;
 
                if (!empty($pageTsConfig['TCEFORM.']['pages.']['_STORAGE_PID'])) {
-                       $storagePid = (int) $pageTsConfig['TCEFORM.']['pages.']['_STORAGE_PID'];
+                       $storagePid = (int)$pageTsConfig['TCEFORM.']['pages.']['_STORAGE_PID'];
                }
 
                return $storagePid;
@@ -189,11 +189,11 @@ class DefaultDataProvider implements DataProviderInterface {
                );
 
                if (!empty($pageTsConfig['TCEFORM.']['pages.']['backend_layout.']['PAGE_TSCONFIG_ID'])) {
-                       $pageTsConfigIds['backend_layout'] = (int) $pageTsConfig['TCEFORM.']['pages.']['backend_layout.']['PAGE_TSCONFIG_ID'];
+                       $pageTsConfigIds['backend_layout'] = (int)$pageTsConfig['TCEFORM.']['pages.']['backend_layout.']['PAGE_TSCONFIG_ID'];
                }
 
                if (!empty($pageTsConfig['TCEFORM.']['pages.']['backend_layout_next_level.']['PAGE_TSCONFIG_ID'])) {
-                       $pageTsConfigIds['backend_layout_next_level'] = (int) $pageTsConfig['TCEFORM.']['pages.']['backend_layout_next_level.']['PAGE_TSCONFIG_ID'];
+                       $pageTsConfigIds['backend_layout_next_level'] = (int)$pageTsConfig['TCEFORM.']['pages.']['backend_layout_next_level.']['PAGE_TSCONFIG_ID'];
                }
 
                return $pageTsConfigIds;
index 9a9a49e..d1236ac 100644 (file)
@@ -396,7 +396,7 @@ class BackendLayoutView implements \TYPO3\CMS\Core\SingletonInterface {
                $page = $this->getDatabaseConnection()->exec_SELECTgetSingleRow(
                        'uid, pid, backend_layout',
                        'pages',
-                       'uid=' . intval($pageId)
+                       'uid=' . (int)$pageId
                );
                BackendUtility::workspaceOL('pages', $page);
                return $page;
index a11a698..09beaa8 100644 (file)
@@ -54,11 +54,11 @@ class ExtdirectPageCommands {
                $targetPage = 0;
                list($_, $table, $uid) = GeneralUtility::trimExplode('-', $sourceElement);
                if ($table === 'tt_content' && MathUtility::canBeInterpretedAsInteger($uid)) {
-                       $moveElementUid = intval($uid);
+                       $moveElementUid = (int)$uid;
                }
                list($_, $table, $uid) = GeneralUtility::trimExplode('-', $destinationElement);
                if ($table === 'tt_content' && MathUtility::canBeInterpretedAsInteger($uid)) {
-                       $afterElementUid = intval($uid);
+                       $afterElementUid = (int)$uid;
                } else {
                        // it's dropped in an empty column
                        $afterElementUid = -1;
@@ -67,8 +67,8 @@ class ExtdirectPageCommands {
                if ($prefix === 'colpos' && MathUtility::canBeInterpretedAsInteger($column) &&
                                $prefix2 === 'page' && MathUtility::canBeInterpretedAsInteger($page)
                ) {
-                       $targetColumn = intval($column);
-                       $targetPage = intval($page);
+                       $targetColumn = (int)$column;
+                       $targetPage = (int)$page;
                }
                // move to empty column
                if ($afterElementUid === -1) {
index 1508481..342d8b3 100644 (file)
@@ -250,7 +250,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                        // The root has a pseudo record in pageinfo...
                        $row = $GLOBALS['SOBE']->pageinfo;
                } else {
-                       $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'uid=' . intval($id) . $delClause);
+                       $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'uid=' . (int)$id . $delClause);
                        $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result);
                        BackendUtility::workspaceOL('pages', $row);
                }
@@ -271,7 +271,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                        $this->fieldArray = explode(',', 'title,uid,alias,starttime,endtime,fe_group,target,url,shortcut,shortcut_mode');
                        }
                        // Getting select-depth:
-                       $depth = intval($GLOBALS['SOBE']->MOD_SETTINGS['pages_levels']);
+                       $depth = (int)$GLOBALS['SOBE']->MOD_SETTINGS['pages_levels'];
                        // Half line is drawn
                        $theData = array();
                        $theData['subject'] = $this->widthGif;
@@ -400,11 +400,13 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                        $langListArr = GeneralUtility::intExplode(',', $langList);
                        $defLanguageCount = array();
                        $defLangBinding = array();
+                       $grid = '';
                        // For each languages... :
                        // If not languageMode, then we'll only be through this once.
                        foreach ($langListArr as $lP) {
-                               if (count($langListArr) === 1 || $lP == 0) {
-                                       $showLanguage = ' AND sys_language_uid IN (' . intval($lP) . ',-1)';
+                               $lP = (int)$lP;
+                               if (count($langListArr) === 1 || $lP === 0) {
+                                       $showLanguage = ' AND sys_language_uid IN (' . $lP . ',-1)';
                                } else {
                                        $showLanguage = ' AND sys_language_uid=' . $lP;
                                }
@@ -525,8 +527,8 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                        // GRID VIEW:
                                        $grid .= '<div class="t3-gridContainer"><table border="0" cellspacing="0" cellpadding="0" width="100%" height="100%" class="t3-page-columns t3-gridTable">';
                                        // Add colgroups
-                                       $colCount = intval($backendLayout['__config']['backend_layout.']['colCount']);
-                                       $rowCount = intval($backendLayout['__config']['backend_layout.']['rowCount']);
+                                       $colCount = (int)$backendLayout['__config']['backend_layout.']['colCount'];
+                                       $rowCount = (int)$backendLayout['__config']['backend_layout.']['rowCount'];
                                        $grid .= '<colgroup>';
                                        for ($i = 0; $i < $colCount; $i++) {
                                                $grid .= '<col style="width:' . 100 / $colCount . '%"></col>';
@@ -545,10 +547,10 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                                                continue;
                                                        }
                                                        // Which tt_content colPos should be displayed inside this cell
-                                                       $columnKey = intval($columnConfig['colPos']);
+                                                       $columnKey = (int)$columnConfig['colPos'];
                                                        // Render the grid cell
-                                                       $colSpan = intval($columnConfig['colspan']);
-                                                       $rowSpan = intval($columnConfig['rowspan']);
+                                                       $colSpan = (int)$columnConfig['colspan'];
+                                                       $rowSpan = (int)$columnConfig['rowspan'];
                                                        $grid .= '<td valign="top"' .
                                                                ($colSpan > 0 ? ' colspan="' . $colSpan . '"' : '') .
                                                                ($rowSpan > 0 ? ' rowspan="' . $rowSpan . '"' : '') .
@@ -591,6 +593,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                $sCont = array();
                                foreach ($langListArr as $lP) {
                                        // Header:
+                                       $lP = (int)$lP;
                                        $cCont[$lP] = '
                                                <td valign="top" class="t3-page-lang-column">
                                                        <h3>' . htmlspecialchars($this->tt_contentConfig['languageCols'][$lP]) . '</h3>
@@ -600,7 +603,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                        $viewLink = '<a href="#" onclick="' . htmlspecialchars(BackendUtility::viewOnClick($this->id, $this->backPath, BackendUtility::BEgetRootLine($this->id), '', '', ('&L=' . $lP))) . '">' . IconUtility::getSpriteIcon('actions-document-view') . '</a>';
                                        // Language overlay page header:
                                        if ($lP) {
-                                               list($lpRecord) = BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $id, 'AND sys_language_uid=' . intval($lP));
+                                               list($lpRecord) = BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $id, 'AND sys_language_uid=' . $lP);
                                                BackendUtility::workspaceOL('pages_language_overlay', $lpRecord);
                                                $params = '&edit[pages_language_overlay][' . $lpRecord['uid'] . ']=edit&overrideVals[pages_language_overlay][sys_language_uid]=' . $lP;
                                                $lPLabel = $GLOBALS['SOBE']->doc->wrapClickMenuOnIcon(IconUtility::getSpriteIconForRecord('pages_language_overlay', $lpRecord), 'pages_language_overlay', $lpRecord['uid']) . $viewLink . ($GLOBALS['BE_USER']->check('tables_modify', 'pages_language_overlay') ? '<a href="#" onclick="' . htmlspecialchars(BackendUtility::editOnClick($params, $this->backPath)) . '" title="' . $GLOBALS['LANG']->getLL('edit', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-open') . '</a>' : '') . htmlspecialchars(GeneralUtility::fixed_lgd_cs($lpRecord['title'], 20));
@@ -687,8 +690,8 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                        $numberOfContentElementsInColumn = count($rowArr);
                                        $rowOut = '';
                                        // If it turns out that there are not content elements in the column, then display a big button which links directly to the wizard script:
-                                       if ($this->doEdit && $this->option_showBigButtons && !intval($key) && $numberOfContentElementsInColumn == 0) {
-                                               $onClick = 'window.location.href=\'db_new_content_el.php?id=' . $id . '&colPos=' . intval($key) . '&sys_language_uid=' . $lP . '&uid_pid=' . $id . '&returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')) . '\';';
+                                       if ($this->doEdit && $this->option_showBigButtons && !(int)$key && $numberOfContentElementsInColumn == 0) {
+                                               $onClick = 'window.location.href=\'db_new_content_el.php?id=' . $id . '&colPos=' . (int)$key . '&sys_language_uid=' . $lP . '&uid_pid=' . $id . '&returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')) . '\';';
                                                $theNewButton = $GLOBALS['SOBE']->doc->t3Button($onClick, $GLOBALS['LANG']->getLL('newPageContent'));
                                                $theNewButton = '<img src="clear.gif" width="1" height="5" alt="" /><br />' . $theNewButton;
                                        } else {
@@ -761,7 +764,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                }
                        } else {
                                if ($this->doEdit && $GLOBALS['BE_USER']->check('tables_modify', 'pages_language_overlay')) {
-                                       list($languageOverlayRecord) = BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $id, 'AND sys_language_uid=' . intval($GLOBALS['SOBE']->current_sys_language));
+                                       list($languageOverlayRecord) = BackendUtility::getRecordsByField('pages_language_overlay', 'pid', $id, 'AND sys_language_uid=' . (int)$GLOBALS['SOBE']->current_sys_language);
                                        $bArray[0] = $GLOBALS['SOBE']->doc->t3Button(BackendUtility::editOnClick('&edit[pages_language_overlay][' . $languageOverlayRecord['uid'] . ']=edit', $this->backPath, ''), $GLOBALS['LANG']->getLL('editPageProperties_curLang'));
                                }
                        }
@@ -992,7 +995,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
        public function pages_getTree($theRows, $pid, $qWhere, $treeIcons, $depth) {
                $depth--;
                if ($depth >= 0) {
-                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'pid=' . intval($pid) . $qWhere, '', 'sorting');
+                       $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'pid=' . (int)$pid . $qWhere, '', 'sorting');
                        $c = 0;
                        $rc = $GLOBALS['TYPO3_DB']->sql_num_rows($res);
                        while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
@@ -1007,7 +1010,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                                }
                        }
                } else {
-                       $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'pages', 'pid=' . intval($pid) . $qWhere);
+                       $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', 'pages', 'pid=' . (int)$pid . $qWhere);
                        if ($count) {
                                $this->plusPages[$pid] = $count;
                        }
@@ -1416,7 +1419,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
        public function getNonTranslatedTTcontentUids($defLanguageCount, $id, $lP) {
                if ($lP && count($defLanguageCount)) {
                        // Select all translations here:
-                       $queryParts = $this->makeQueryArray('tt_content', $id, 'AND sys_language_uid=' . intval($lP) . ' AND l18n_parent IN (' . implode(',', $defLanguageCount) . ')');
+                       $queryParts = $this->makeQueryArray('tt_content', $id, 'AND sys_language_uid=' . (int)$lP . ' AND l18n_parent IN (' . implode(',', $defLanguageCount) . ')');
                        $result = $GLOBALS['TYPO3_DB']->exec_SELECT_queryArray($queryParts);
                        // Flip uids:
                        $defLanguageCount = array_flip($defLanguageCount);
@@ -1562,7 +1565,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                        }
                        // If any languages are left, make selector:
                        if (count($langSelItems) > 1) {
-                               $onChangeContent = 'window.location.href=\'' . $this->backPath . 'alt_doc.php?&edit[pages_language_overlay][' . $id . ']=new&overrideVals[pages_language_overlay][doktype]=' . (int) $this->pageRecord['doktype'] . '&overrideVals[pages_language_overlay][sys_language_uid]=\'+this.options[this.selectedIndex].value+\'&returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')) . '\'';
+                               $onChangeContent = 'window.location.href=\'' . $this->backPath . 'alt_doc.php?&edit[pages_language_overlay][' . $id . ']=new&overrideVals[pages_language_overlay][doktype]=' . (int)$this->pageRecord['doktype'] . '&overrideVals[pages_language_overlay][sys_language_uid]=\'+this.options[this.selectedIndex].value+\'&returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')) . '\'';
                                return $GLOBALS['LANG']->getLL('new_language', TRUE) . ': <select name="createNewLanguage" onchange="' . htmlspecialchars($onChangeContent) . '">
                                                ' . implode('', $langSelItems) . '
                                        </select><br /><br />';
@@ -1657,9 +1660,9 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
         */
        public function numberOfRecords($table, $pid) {
                if ($GLOBALS['TCA'][$table]) {
-                       $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', $table, 'pid=' . intval($pid) . BackendUtility::deleteClause($table) . BackendUtility::versioningPlaceholderClause($table));
+                       $count = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', $table, 'pid=' . (int)$pid . BackendUtility::deleteClause($table) . BackendUtility::versioningPlaceholderClause($table));
                }
-               return intval($count);
+               return (int)$count;
        }
 
        /**
@@ -1876,7 +1879,7 @@ class PageLayoutView extends \TYPO3\CMS\Recordlist\RecordList\AbstractDatabaseRe
                        // Check access and whether the proper extensions are loaded:
                        if ($GLOBALS['BE_USER']->check('tables_select', $tName) && (\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($tName) || GeneralUtility::inList('fe_users,tt_content', $tName) || isset($this->externalTables[$tName]))) {
                                // Make query to count records from page:
-                               $c = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', $tName, 'pid=' . intval($id) . BackendUtility::deleteClause($tName) . BackendUtility::versioningPlaceholderClause($tName));
+                               $c = $GLOBALS['TYPO3_DB']->exec_SELECTcountRows('uid', $tName, 'pid=' . (int)$id . BackendUtility::deleteClause($tName) . BackendUtility::versioningPlaceholderClause($tName));
                                // If records were found (or if "tt_content" is the table...):
                                if ($c || GeneralUtility::inList('tt_content', $tName)) {
                                        // Add row to menu:
index d8c615f..eb3b1a6 100644 (file)
@@ -164,7 +164,7 @@ class PageTreeView extends \TYPO3\CMS\Backend\Tree\View\BrowseTreeView {
         * @todo Define visibility
         */
        public function printTree($treeArr = '') {
-               $titleLen = intval($this->BE_USER->uc['titleLen']);
+               $titleLen = (int)$this->BE_USER->uc['titleLen'];
                if (!is_array($treeArr)) {
                        $treeArr = $this->tree;
                }
@@ -294,7 +294,7 @@ class PageTreeView extends \TYPO3\CMS\Backend\Tree\View\BrowseTreeView {
        public function PMiconATagWrap($icon, $cmd, $isExpand = TRUE) {
                if ($this->thisScript) {
                        // Activate dynamic ajax-based tree
-                       $js = htmlspecialchars('Tree.load(\'' . $cmd . '\', ' . intval($isExpand) . ', this);');
+                       $js = htmlspecialchars('Tree.load(\'' . $cmd . '\', ' . (int)$isExpand . ', this);');
                        return '<a class="pm" onclick="' . $js . '">' . $icon . '</a>';
                } else {
                        return $icon;
@@ -312,7 +312,7 @@ class PageTreeView extends \TYPO3\CMS\Backend\Tree\View\BrowseTreeView {
                // Get stored tree structure AND updating it if needed according to incoming PM GET var.
                $this->initializePositionSaving();
                // Init done:
-               $titleLen = intval($this->BE_USER->uc['titleLen']);
+               $titleLen = (int)$this->BE_USER->uc['titleLen'];
                $treeArr = array();
                // Traverse mounts:
                foreach ($this->MOUNTS as $idx => $uid) {
@@ -373,7 +373,7 @@ class PageTreeView extends \TYPO3\CMS\Backend\Tree\View\BrowseTreeView {
                // Buffer for id hierarchy is reset:
                $this->buffer_idH = array();
                // Init vars
-               $depth = intval($depth);
+               $depth = (int)$depth;
                $HTML = '';
                $a = 0;
                $res = $this->getDataInit($uid, $subCSSclass);
index a06320c..b486acc 100644 (file)
@@ -40,7 +40,7 @@ class WebInfoController extends \TYPO3\CMS\Belog\Controller\AbstractController {
         */
        public function initializeAction() {
                $this->isInPageContext = TRUE;
-               $this->pageId = intval(\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'));
+               $this->pageId = (int)\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id');
        }
 
 }
index 45838fa..da1eeea 100644 (file)
@@ -157,7 +157,7 @@ class Constraint extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity {
         * @return void
         */
        public function setNumber($number) {
-               $this->number = intval($number)