Use `prepare()` instand of `prepareStatement()`
authorCyperghost <olaf_schmitz_1@t-online.de>
Fri, 18 Oct 2024 09:38:20 +0000 (11:38 +0200)
committerCyperghost <olaf_schmitz_1@t-online.de>
Fri, 18 Oct 2024 09:38:20 +0000 (11:38 +0200)
Don't use `WCF_N` anymore

377 files changed:
wcfsetup/install/files/acp/update_com.woltlab.wcf_6.1_spider_step1.php
wcfsetup/install/files/lib/acp/action/InstallPackageAction.class.php
wcfsetup/install/files/lib/acp/action/UserExportGdprAction.class.php
wcfsetup/install/files/lib/acp/action/UserQuickSearchAction.class.php
wcfsetup/install/files/lib/acp/form/ApplicationManagementForm.class.php
wcfsetup/install/files/lib/acp/form/BBCodeEditForm.class.php
wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php
wcfsetup/install/files/lib/acp/form/DataImportForm.class.php
wcfsetup/install/files/lib/acp/form/LabelGroupAddForm.class.php
wcfsetup/install/files/lib/acp/form/LabelGroupEditForm.class.php
wcfsetup/install/files/lib/acp/form/MenuAddForm.class.php
wcfsetup/install/files/lib/acp/form/NoticeEditForm.class.php
wcfsetup/install/files/lib/acp/form/NotificationPresetSettingsForm.class.php
wcfsetup/install/files/lib/acp/form/PageAddForm.class.php
wcfsetup/install/files/lib/acp/form/SmileyAddForm.class.php
wcfsetup/install/files/lib/acp/form/StyleAddForm.class.php
wcfsetup/install/files/lib/acp/form/TagEditForm.class.php
wcfsetup/install/files/lib/acp/form/TemplateAddForm.class.php
wcfsetup/install/files/lib/acp/form/TemplateGroupAddForm.class.php
wcfsetup/install/files/lib/acp/form/TrophyEditForm.class.php
wcfsetup/install/files/lib/acp/form/UserAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserAssignToGroupForm.class.php
wcfsetup/install/files/lib/acp/form/UserEditForm.class.php
wcfsetup/install/files/lib/acp/form/UserEmailAddressExportForm.class.php
wcfsetup/install/files/lib/acp/form/UserGroupOptionForm.class.php
wcfsetup/install/files/lib/acp/form/UserMergeForm.class.php
wcfsetup/install/files/lib/acp/form/UserOptionAddForm.class.php
wcfsetup/install/files/lib/acp/form/UserOptionSetDefaultsForm.class.php
wcfsetup/install/files/lib/acp/form/UserSearchForm.class.php
wcfsetup/install/files/lib/acp/page/ArticleListPage.class.php
wcfsetup/install/files/lib/acp/page/BoxListPage.class.php
wcfsetup/install/files/lib/acp/page/CronjobLogListPage.class.php
wcfsetup/install/files/lib/acp/page/LabelGroupListPage.class.php
wcfsetup/install/files/lib/acp/page/LabelListPage.class.php
wcfsetup/install/files/lib/acp/page/LanguageListPage.class.php
wcfsetup/install/files/lib/acp/page/LicensePage.class.php
wcfsetup/install/files/lib/acp/page/MenuListPage.class.php
wcfsetup/install/files/lib/acp/page/PackagePage.class.php
wcfsetup/install/files/lib/acp/page/PageListPage.class.php
wcfsetup/install/files/lib/acp/page/PaidSubscriptionTransactionLogListPage.class.php
wcfsetup/install/files/lib/acp/page/PaidSubscriptionUserListPage.class.php
wcfsetup/install/files/lib/acp/page/StyleListPage.class.php
wcfsetup/install/files/lib/acp/page/SystemCheckPage.class.php
wcfsetup/install/files/lib/acp/page/TagListPage.class.php
wcfsetup/install/files/lib/acp/page/TemplateGroupListPage.class.php
wcfsetup/install/files/lib/acp/page/UserGroupListPage.class.php
wcfsetup/install/files/lib/acp/page/UserListPage.class.php
wcfsetup/install/files/lib/acp/page/UserOptionCategoryListPage.class.php
wcfsetup/install/files/lib/acp/page/UserOptionListPage.class.php
wcfsetup/install/files/lib/acp/page/UserRankListPage.class.php
wcfsetup/install/files/lib/acp/page/UserTrophyListPage.class.php
wcfsetup/install/files/lib/data/AbstractDatabaseObjectAction.class.php
wcfsetup/install/files/lib/data/DatabaseObject.class.php
wcfsetup/install/files/lib/data/DatabaseObjectEditor.class.php
wcfsetup/install/files/lib/data/DatabaseObjectList.class.php
wcfsetup/install/files/lib/data/I18nDatabaseObjectList.class.php
wcfsetup/install/files/lib/data/TFastCreate.class.php
wcfsetup/install/files/lib/data/TMultiCategoryObject.class.php
wcfsetup/install/files/lib/data/acp/session/ACPSession.class.php
wcfsetup/install/files/lib/data/acp/session/ACPSessionEditor.class.php
wcfsetup/install/files/lib/data/acp/session/log/ACPSessionLog.class.php
wcfsetup/install/files/lib/data/acp/session/log/ACPSessionLogList.class.php
wcfsetup/install/files/lib/data/ad/AdAction.class.php
wcfsetup/install/files/lib/data/ad/AdEditor.class.php
wcfsetup/install/files/lib/data/application/ApplicationAction.class.php
wcfsetup/install/files/lib/data/article/Article.class.php
wcfsetup/install/files/lib/data/article/ArticleAction.class.php
wcfsetup/install/files/lib/data/article/ArticleEditor.class.php
wcfsetup/install/files/lib/data/article/TaggedArticleList.class.php
wcfsetup/install/files/lib/data/article/ViewableArticle.class.php
wcfsetup/install/files/lib/data/article/ViewableArticleList.class.php
wcfsetup/install/files/lib/data/article/category/ArticleCategory.class.php
wcfsetup/install/files/lib/data/article/category/ArticleCategoryCache.class.php
wcfsetup/install/files/lib/data/article/content/ArticleContent.class.php
wcfsetup/install/files/lib/data/attachment/AdministrativeAttachmentList.class.php
wcfsetup/install/files/lib/data/attachment/AttachmentEditor.class.php
wcfsetup/install/files/lib/data/attachment/GroupedAttachmentList.class.php
wcfsetup/install/files/lib/data/bbcode/BBCode.class.php
wcfsetup/install/files/lib/data/bbcode/BBCodeAction.class.php
wcfsetup/install/files/lib/data/blacklist/entry/BlacklistEntry.class.php
wcfsetup/install/files/lib/data/blacklist/entry/BlacklistEntryAction.class.php
wcfsetup/install/files/lib/data/box/Box.class.php
wcfsetup/install/files/lib/data/box/BoxAction.class.php
wcfsetup/install/files/lib/data/box/content/BoxContent.class.php
wcfsetup/install/files/lib/data/category/CategoryAction.class.php
wcfsetup/install/files/lib/data/category/CategoryEditor.class.php
wcfsetup/install/files/lib/data/comment/response/LikeableCommentResponseProvider.class.php
wcfsetup/install/files/lib/data/contact/option/ContactOptionAction.class.php
wcfsetup/install/files/lib/data/contact/recipient/ContactRecipientAction.class.php
wcfsetup/install/files/lib/data/cronjob/CronjobEditor.class.php
wcfsetup/install/files/lib/data/cronjob/log/CronjobLogEditor.class.php
wcfsetup/install/files/lib/data/label/LabelAction.class.php
wcfsetup/install/files/lib/data/label/LabelEditor.class.php
wcfsetup/install/files/lib/data/label/group/LabelGroupAction.class.php
wcfsetup/install/files/lib/data/language/LanguageEditor.class.php
wcfsetup/install/files/lib/data/like/Like.class.php
wcfsetup/install/files/lib/data/like/LikeAction.class.php
wcfsetup/install/files/lib/data/like/object/LikeObject.class.php
wcfsetup/install/files/lib/data/media/Media.class.php
wcfsetup/install/files/lib/data/media/MediaAction.class.php
wcfsetup/install/files/lib/data/media/MediaList.class.php
wcfsetup/install/files/lib/data/media/ViewableMediaList.class.php
wcfsetup/install/files/lib/data/menu/MenuEditor.class.php
wcfsetup/install/files/lib/data/menu/item/MenuItemAction.class.php
wcfsetup/install/files/lib/data/menu/item/MenuItemEditor.class.php
wcfsetup/install/files/lib/data/moderation/queue/ModerationQueue.class.php
wcfsetup/install/files/lib/data/moderation/queue/ModerationQueueAction.class.php
wcfsetup/install/files/lib/data/moderation/queue/ViewableModerationQueueList.class.php
wcfsetup/install/files/lib/data/notice/Notice.class.php
wcfsetup/install/files/lib/data/notice/NoticeAction.class.php
wcfsetup/install/files/lib/data/notice/NoticeEditor.class.php
wcfsetup/install/files/lib/data/option/Option.class.php
wcfsetup/install/files/lib/data/option/OptionEditor.class.php
wcfsetup/install/files/lib/data/package/Package.class.php
wcfsetup/install/files/lib/data/package/installation/queue/PackageInstallationQueue.class.php
wcfsetup/install/files/lib/data/package/update/PackageUpdateAction.class.php
wcfsetup/install/files/lib/data/package/update/server/PackageUpdateServer.class.php
wcfsetup/install/files/lib/data/package/update/server/PackageUpdateServerList.class.php
wcfsetup/install/files/lib/data/page/Page.class.php
wcfsetup/install/files/lib/data/page/PageAction.class.php
wcfsetup/install/files/lib/data/page/PageEditor.class.php
wcfsetup/install/files/lib/data/page/content/PageContent.class.php
wcfsetup/install/files/lib/data/paid/subscription/PaidSubscriptionEditor.class.php
wcfsetup/install/files/lib/data/paid/subscription/transaction/log/PaidSubscriptionTransactionLog.class.php
wcfsetup/install/files/lib/data/paid/subscription/user/PaidSubscriptionUser.class.php
wcfsetup/install/files/lib/data/poll/PollAction.class.php
wcfsetup/install/files/lib/data/poll/PollEditor.class.php
wcfsetup/install/files/lib/data/reaction/ReactionAction.class.php
wcfsetup/install/files/lib/data/reaction/type/ReactionTypeAction.class.php
wcfsetup/install/files/lib/data/search/keyword/SearchKeywordAction.class.php
wcfsetup/install/files/lib/data/stat/daily/StatDailyAction.class.php
wcfsetup/install/files/lib/data/style/Style.class.php
wcfsetup/install/files/lib/data/style/StyleAction.class.php
wcfsetup/install/files/lib/data/style/StyleEditor.class.php
wcfsetup/install/files/lib/data/tag/Tag.class.php
wcfsetup/install/files/lib/data/tag/TagAction.class.php
wcfsetup/install/files/lib/data/tag/TagEditor.class.php
wcfsetup/install/files/lib/data/template/Template.class.php
wcfsetup/install/files/lib/data/template/TemplateEditor.class.php
wcfsetup/install/files/lib/data/template/TemplateList.class.php
wcfsetup/install/files/lib/data/template/group/TemplateGroup.class.php
wcfsetup/install/files/lib/data/template/group/TemplateGroupAction.class.php
wcfsetup/install/files/lib/data/template/group/TemplateGroupEditor.class.php
wcfsetup/install/files/lib/data/trophy/TrophyAction.class.php
wcfsetup/install/files/lib/data/trophy/TrophyEditor.class.php
wcfsetup/install/files/lib/data/unfurl/url/UnfurlUrl.class.php
wcfsetup/install/files/lib/data/unfurl/url/UnfurlUrlAction.class.php
wcfsetup/install/files/lib/data/unfurl/url/UnfurlUrlList.class.php
wcfsetup/install/files/lib/data/user/TeamList.class.php
wcfsetup/install/files/lib/data/user/User.class.php
wcfsetup/install/files/lib/data/user/UserAction.class.php
wcfsetup/install/files/lib/data/user/UserEditor.class.php
wcfsetup/install/files/lib/data/user/UserList.class.php
wcfsetup/install/files/lib/data/user/UserProfile.class.php
wcfsetup/install/files/lib/data/user/UserProfileAction.class.php
wcfsetup/install/files/lib/data/user/UserProfileList.class.php
wcfsetup/install/files/lib/data/user/authentication/failure/UserAuthenticationFailure.class.php
wcfsetup/install/files/lib/data/user/avatar/UserAvatarEditor.class.php
wcfsetup/install/files/lib/data/user/follow/UserFollow.class.php
wcfsetup/install/files/lib/data/user/follow/UserFollowAction.class.php
wcfsetup/install/files/lib/data/user/follow/UserFollowerList.class.php
wcfsetup/install/files/lib/data/user/follow/UserFollowingAction.class.php
wcfsetup/install/files/lib/data/user/follow/UserFollowingList.class.php
wcfsetup/install/files/lib/data/user/group/UserGroup.class.php
wcfsetup/install/files/lib/data/user/group/UserGroupAction.class.php
wcfsetup/install/files/lib/data/user/group/UserGroupEditor.class.php
wcfsetup/install/files/lib/data/user/group/option/UserGroupOptionAction.class.php
wcfsetup/install/files/lib/data/user/ignore/UserIgnore.class.php
wcfsetup/install/files/lib/data/user/ignore/UserIgnoreAction.class.php
wcfsetup/install/files/lib/data/user/ignore/ViewableUserIgnoreList.class.php
wcfsetup/install/files/lib/data/user/notification/UserNotification.class.php
wcfsetup/install/files/lib/data/user/notification/event/UserNotificationEventAction.class.php
wcfsetup/install/files/lib/data/user/notification/event/recipient/UserNotificationEventRecipientList.class.php
wcfsetup/install/files/lib/data/user/object/watch/UserObjectWatch.class.php
wcfsetup/install/files/lib/data/user/online/UsersOnlineList.class.php
wcfsetup/install/files/lib/data/user/option/UserOptionEditor.class.php
wcfsetup/install/files/lib/data/user/option/category/UserOptionCategory.class.php
wcfsetup/install/files/lib/data/user/option/category/UserOptionCategoryAction.class.php
wcfsetup/install/files/lib/data/user/profile/menu/item/UserProfileMenuItemAction.class.php
wcfsetup/install/files/lib/data/user/profile/menu/item/UserProfileMenuItemEditor.class.php
wcfsetup/install/files/lib/data/user/profile/visitor/UserProfileVisitor.class.php
wcfsetup/install/files/lib/data/user/profile/visitor/UserProfileVisitorAction.class.php
wcfsetup/install/files/lib/data/user/profile/visitor/UserProfileVisitorList.class.php
wcfsetup/install/files/lib/data/user/trophy/UserTrophyAction.class.php
wcfsetup/install/files/lib/data/user/trophy/UserTrophyList.class.php
wcfsetup/install/files/lib/form/NotificationSettingsForm.class.php
wcfsetup/install/files/lib/form/NotificationUnsubscribeForm.class.php
wcfsetup/install/files/lib/form/SearchForm.class.php
wcfsetup/install/files/lib/form/UserSearchForm.class.php
wcfsetup/install/files/lib/page/AbstractArticlePage.class.php
wcfsetup/install/files/lib/page/ArticleListPage.class.php
wcfsetup/install/files/lib/page/CategoryArticleListPage.class.php
wcfsetup/install/files/lib/page/CategoryTrophyListPage.class.php
wcfsetup/install/files/lib/page/TrophyListPage.class.php
wcfsetup/install/files/lib/page/TrophyPage.class.php
wcfsetup/install/files/lib/page/UnreadArticleListPage.class.php
wcfsetup/install/files/lib/system/WCFSetup.class.php
wcfsetup/install/files/lib/system/acl/ACLHandler.class.php
wcfsetup/install/files/lib/system/acl/simple/SimpleAclHandler.class.php
wcfsetup/install/files/lib/system/acp/dashboard/box/SystemInfoAcpDashboardBox.class.php
wcfsetup/install/files/lib/system/application/ApplicationHandler.class.php
wcfsetup/install/files/lib/system/attachment/AttachmentHandler.class.php
wcfsetup/install/files/lib/system/background/job/NotificationEmailDeliveryBackgroundJob.class.php
wcfsetup/install/files/lib/system/background/job/UnfurlUrlBackgroundJob.class.php
wcfsetup/install/files/lib/system/box/ArticleCommentListBoxController.class.php
wcfsetup/install/files/lib/system/box/BoxHandler.class.php
wcfsetup/install/files/lib/system/box/ProfileCommentListBoxController.class.php
wcfsetup/install/files/lib/system/box/StaffOnlineListBoxController.class.php
wcfsetup/install/files/lib/system/box/UserTrophyListBoxController.class.php
wcfsetup/install/files/lib/system/box/command/CreateBoxToPageAssignments.class.php
wcfsetup/install/files/lib/system/bulk/processing/user/AbstractUserBulkProcessingAction.class.php
wcfsetup/install/files/lib/system/cache/builder/ArticleCategoryLabelCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/BBCodeCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/CategoryCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/ClipboardPageCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/CronjobCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/EventListenerCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/ObjectTypeCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/OptionCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/PageCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/SimpleAclCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/SmileyCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/StyleCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/TagCloudCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/UserBirthdayCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/UserGroupPermissionCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/UserMenuCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/UserNotificationEventCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/UserStatsCacheBuilder.class.php
wcfsetup/install/files/lib/system/cache/builder/WhoWasOnlineCacheBuilder.class.php
wcfsetup/install/files/lib/system/category/AbstractCategoryType.class.php
wcfsetup/install/files/lib/system/category/TrophyCategoryType.class.php
wcfsetup/install/files/lib/system/cli/command/ImportCLICommand.class.php
wcfsetup/install/files/lib/system/clipboard/ClipboardHandler.class.php
wcfsetup/install/files/lib/system/clipboard/action/UserClipboardAction.class.php
wcfsetup/install/files/lib/system/comment/CommentHandler.class.php
wcfsetup/install/files/lib/system/condition/UserGroupCondition.class.php
wcfsetup/install/files/lib/system/condition/UserTrophyCondition.class.php
wcfsetup/install/files/lib/system/cronjob/AttachmentCleanUpCronjob.class.php
wcfsetup/install/files/lib/system/cronjob/BackgroundQueueCleanUpCronjob.class.php
wcfsetup/install/files/lib/system/cronjob/CronjobScheduler.class.php
wcfsetup/install/files/lib/system/cronjob/DailyMailNotificationCronjob.class.php
wcfsetup/install/files/lib/system/cronjob/ExpiringPaidSubscriptionUserCronjob.class.php
wcfsetup/install/files/lib/system/cronjob/ModerationQueueCronjob.class.php
wcfsetup/install/files/lib/system/cronjob/PruneIpAddressesCronjob.class.php
wcfsetup/install/files/lib/system/cronjob/StatDailyBuilderCronjob.class.php
wcfsetup/install/files/lib/system/cronjob/UserBanCronjob.class.php
wcfsetup/install/files/lib/system/cronjob/UserQuitCronjob.class.php
wcfsetup/install/files/lib/system/database/MySQLDatabase.class.php
wcfsetup/install/files/lib/system/database/editor/MySQLDatabaseEditor.class.php
wcfsetup/install/files/lib/system/database/util/SQLParser.class.php
wcfsetup/install/files/lib/system/devtools/pip/TMultiXmlGuiPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/devtools/pip/TXmlGuiPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/edit/EditHistoryManager.class.php
wcfsetup/install/files/lib/system/event/listener/AbstractUserActionRenameListener.class.php
wcfsetup/install/files/lib/system/event/listener/AbstractUserMergeListener.class.php
wcfsetup/install/files/lib/system/exporter/AbstractExporter.class.php
wcfsetup/install/files/lib/system/form/builder/field/option/OptionFormField.class.php
wcfsetup/install/files/lib/system/form/builder/field/user/group/option/UserGroupOptionFormField.class.php
wcfsetup/install/files/lib/system/html/input/node/HtmlInputNodeTextParser.class.php
wcfsetup/install/files/lib/system/importer/AbstractACLImporter.class.php
wcfsetup/install/files/lib/system/importer/AbstractCommentResponseImporter.class.php
wcfsetup/install/files/lib/system/importer/AbstractImporter.class.php
wcfsetup/install/files/lib/system/importer/AbstractLikeImporter.class.php
wcfsetup/install/files/lib/system/importer/AbstractPollOptionVoteImporter.class.php
wcfsetup/install/files/lib/system/importer/ArticleImporter.class.php
wcfsetup/install/files/lib/system/importer/ImportHandler.class.php
wcfsetup/install/files/lib/system/importer/LabelGroupImporter.class.php
wcfsetup/install/files/lib/system/importer/MediaImporter.class.php
wcfsetup/install/files/lib/system/importer/SmileyImporter.class.php
wcfsetup/install/files/lib/system/importer/TrophyImporter.class.php
wcfsetup/install/files/lib/system/importer/UserAvatarImporter.class.php
wcfsetup/install/files/lib/system/importer/UserFollowerImporter.class.php
wcfsetup/install/files/lib/system/importer/UserImporter.class.php
wcfsetup/install/files/lib/system/importer/UserOptionImporter.class.php
wcfsetup/install/files/lib/system/label/LabelHandler.class.php
wcfsetup/install/files/lib/system/language/LanguageFactory.class.php
wcfsetup/install/files/lib/system/like/LikeHandler.class.php
wcfsetup/install/files/lib/system/log/modification/AbstractModificationLogHandler.class.php
wcfsetup/install/files/lib/system/message/embedded/object/MediaMessageEmbeddedObjectHandler.class.php
wcfsetup/install/files/lib/system/message/embedded/object/MessageEmbeddedObjectManager.class.php
wcfsetup/install/files/lib/system/moderation/queue/AbstractCommentResponseModerationQueueHandler.class.php
wcfsetup/install/files/lib/system/moderation/queue/AbstractModerationQueueHandler.class.php
wcfsetup/install/files/lib/system/moderation/queue/AbstractModerationQueueManager.class.php
wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueManager.class.php
wcfsetup/install/files/lib/system/moderation/queue/ModerationQueueReportManager.class.php
wcfsetup/install/files/lib/system/option/UseroptionsOptionType.class.php
wcfsetup/install/files/lib/system/package/ACPTemplatesFileHandler.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationFormManager.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationNodeBuilder.class.php
wcfsetup/install/files/lib/system/package/PackageInstallationSQLParser.class.php
wcfsetup/install/files/lib/system/package/PackageUninstallationDispatcher.class.php
wcfsetup/install/files/lib/system/package/TemplatesFileHandler.class.php
wcfsetup/install/files/lib/system/package/plugin/ACLOptionPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/ACPSearchProviderPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/AbstractMenuPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/AbstractOptionPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/AbstractPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/AbstractXMLPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/BBCodePackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/BoxPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/ClipboardActionPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/CoreObjectPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/CronjobPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/EventListenerPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/LanguagePackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/MediaProviderPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/MenuItemPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/MenuPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/ObjectTypeDefinitionPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/ObjectTypePackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/OptionPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/PIPPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/PagePackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/SmileyPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/TemplateListenerPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/UserGroupOptionPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/UserNotificationEventPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/UserOptionPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/package/plugin/UserProfileMenuPackageInstallationPlugin.class.php
wcfsetup/install/files/lib/system/page/handler/ArticlePageHandler.class.php
wcfsetup/install/files/lib/system/page/handler/ContactFormPageHandler.class.php
wcfsetup/install/files/lib/system/page/handler/TDecoratedCategoryLookupPageHandler.class.php
wcfsetup/install/files/lib/system/page/handler/TrophyPageHandler.class.php
wcfsetup/install/files/lib/system/poll/PollManager.class.php
wcfsetup/install/files/lib/system/reaction/ReactionHandler.class.php
wcfsetup/install/files/lib/system/search/AbstractSearchIndexManager.class.php
wcfsetup/install/files/lib/system/search/ArticleSearch.class.php
wcfsetup/install/files/lib/system/search/PageSearch.class.php
wcfsetup/install/files/lib/system/search/SearchHandler.class.php
wcfsetup/install/files/lib/system/search/SearchIndexManager.class.php
wcfsetup/install/files/lib/system/search/acp/MenuItemACPSearchResultProvider.class.php
wcfsetup/install/files/lib/system/search/acp/OptionACPSearchResultProvider.class.php
wcfsetup/install/files/lib/system/search/acp/PackageACPSearchResultProvider.class.php
wcfsetup/install/files/lib/system/search/acp/TrophyACPSearchResultProvider.class.php
wcfsetup/install/files/lib/system/search/acp/UserACPSearchResultProvider.class.php
wcfsetup/install/files/lib/system/search/acp/UserGroupOptionACPSearchResultProvider.class.php
wcfsetup/install/files/lib/system/search/mysql/MysqlSearchEngine.class.php
wcfsetup/install/files/lib/system/search/mysql/MysqlSearchIndexManager.class.php
wcfsetup/install/files/lib/system/sitemap/object/MultilingualPageSitemapObject.class.php
wcfsetup/install/files/lib/system/stat/AbstractCommentStatDailyHandler.class.php
wcfsetup/install/files/lib/system/stat/AbstractDiskUsageStatDailyHandler.class.php
wcfsetup/install/files/lib/system/stat/AbstractStatDailyHandler.class.php
wcfsetup/install/files/lib/system/stat/AttachmentDiskUsageStatDailyHandler.class.php
wcfsetup/install/files/lib/system/stat/AttachmentStatDailyHandler.class.php
wcfsetup/install/files/lib/system/stat/LikeStatDailyHandler.class.php
wcfsetup/install/files/lib/system/stat/UserStatDailyHandler.class.php
wcfsetup/install/files/lib/system/style/StyleCompiler.class.php
wcfsetup/install/files/lib/system/tagging/TagEngine.class.php
wcfsetup/install/files/lib/system/template/EmailTemplateEngine.class.php
wcfsetup/install/files/lib/system/trophy/condition/TrophyConditionHandler.class.php
wcfsetup/install/files/lib/system/user/activity/event/ArticleCommentResponseUserActivityEvent.class.php
wcfsetup/install/files/lib/system/user/activity/event/ArticleCommentUserActivityEvent.class.php
wcfsetup/install/files/lib/system/user/activity/event/UserActivityEventHandler.class.php
wcfsetup/install/files/lib/system/user/activity/point/UserActivityPointHandler.class.php
wcfsetup/install/files/lib/system/user/collapsible/content/UserCollapsibleContentHandler.class.php
wcfsetup/install/files/lib/system/user/command/CreateRegistrationNotification.class.php
wcfsetup/install/files/lib/system/user/group/assignment/UserGroupAssignmentHandler.class.php
wcfsetup/install/files/lib/system/user/notification/UserNotificationHandler.class.php
wcfsetup/install/files/lib/system/user/notification/event/TReactionUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/event/TTestableModerationQueueUserNotificationEvent.class.php
wcfsetup/install/files/lib/system/user/notification/object/type/TMultiRecipientModerationQueueCommentUserNotificationObjectType.class.php
wcfsetup/install/files/lib/system/user/notification/object/type/TMultiRecipientPageCommentUserNotificationObjectType.class.php
wcfsetup/install/files/lib/system/user/notification/object/type/UserProfileCommentUserNotificationObjectType.class.php
wcfsetup/install/files/lib/system/user/object/watch/UserObjectWatchHandler.class.php
wcfsetup/install/files/lib/system/version/VersionTracker.class.php
wcfsetup/install/files/lib/system/worker/AbstractRebuildDataWorker.class.php
wcfsetup/install/files/lib/system/worker/ArticleRebuildDataWorker.class.php
wcfsetup/install/files/lib/system/worker/ImportWorker.class.php
wcfsetup/install/files/lib/system/worker/MailWorker.class.php
wcfsetup/install/files/lib/system/worker/PollRebuildDataWorker.class.php
wcfsetup/install/files/lib/system/worker/SitemapRebuildWorker.class.php
wcfsetup/install/files/lib/system/worker/StatDailyRebuildDataWorker.class.php
wcfsetup/install/files/lib/system/worker/UserActivityPointUpdateEventsWorker.class.php
wcfsetup/install/files/lib/system/worker/UserRebuildDataWorker.class.php
wcfsetup/install/files/lib/util/MessageUtil.class.php
wcfsetup/install/files/lib/util/UserUtil.class.php

index cf916429987f799359d1f4bfd0ae5d736cebf1d4..28958c96aafecfed3d19323b2896d0f085a4d154 100644 (file)
@@ -17,7 +17,7 @@ use wcf\system\database\table\PartialDatabaseTable;
 use wcf\system\WCF;
 
 $tableNames = WCF::getDB()->getEditor()->getTableNames();
-if (!\in_array('wcf' . WCF_N . '_spider', $tableNames)) {
+if (!\in_array('wcf1_spider', $tableNames)) {
     // The table `wcf1_spider` will be removed by a database PIP that is
     // executed after this script.
     return;
index f8dd8f7f61a04c82cb8c29e308235e5982f72e41..cef970087edd9f18b1b42fb536154213a1e70721 100755 (executable)
@@ -176,9 +176,9 @@ class InstallPackageAction extends AbstractSecureAction
     {
         // get domain path
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_application
+                FROM    wcf1_application
                 WHERE   packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([1]);
 
         /** @var Application $application */
index 677409f2c1eb9698dc857d6fc60adaf7c9f5934d..2544d0c7616bce32e5f01e7145c0dbb18ae8aa40 100644 (file)
@@ -155,15 +155,15 @@ final class UserExportGdprAction extends AbstractAction
         parent::execute();
 
         $this->ipAddresses = [
-            'com.woltlab.blog' => ['blog' . WCF_N . '_entry '],
-            'com.woltlab.calendar' => ['calendar' . WCF_N . '_event'],
+            'com.woltlab.blog' => ['blog1_entry '],
+            'com.woltlab.calendar' => ['calendar1_event'],
             'com.woltlab.filebase' => [
-                'filebase' . WCF_N . '_file',
+                'filebase1_file',
             ],
             'com.woltlab.gallery' => [],
             // intentionally left empty, the image table is queried manually
-            'com.woltlab.wbb' => ['wbb' . WCF_N . '_post'],
-            'com.woltlab.wcf.conversation' => ['wcf' . WCF_N . '_conversation_message'],
+            'com.woltlab.wbb' => ['wbb1_post'],
+            'com.woltlab.wcf.conversation' => ['wcf1_conversation_message'],
         ];
 
         // content
@@ -173,7 +173,7 @@ final class UserExportGdprAction extends AbstractAction
                 'userOptions' => [],
                 'ipAddresses' => [],
                 'paidSubscriptionTransactionLog' => $this->dumpTable(
-                    'wcf' . WCF_N . '_paid_subscription_transaction_log',
+                    'wcf1_paid_subscription_transaction_log',
                     'userID'
                 ),
             ],
@@ -210,12 +210,12 @@ final class UserExportGdprAction extends AbstractAction
             if ($package === 'com.woltlab.filebase') {
                 $ipAddresses = \array_merge(
                     $ipAddresses,
-                    $this->exportIpAddresses('filebase' . WCF_N . '_file_version', 'ipAddress', 'uploadTime', 'userID')
+                    $this->exportIpAddresses('filebase1_file_version', 'ipAddress', 'uploadTime', 'userID')
                 );
             } elseif ($package === 'com.woltlab.gallery') {
                 $ipAddresses = \array_merge(
                     $ipAddresses,
-                    $this->exportIpAddresses('gallery' . WCF_N . '_image', 'ipAddress', 'uploadTime', 'userID')
+                    $this->exportIpAddresses('gallery1_image', 'ipAddress', 'uploadTime', 'userID')
                 );
             }
 
@@ -257,7 +257,7 @@ final class UserExportGdprAction extends AbstractAction
                 FROM    {$databaseTable}
                 WHERE   {$userIDColumn} = ?
                     AND {$ipAddressColumn} <> ''";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->user->userID]);
 
         return $this->fetchIpAddresses($statement, $ipAddressColumn, $timeColumn);
@@ -268,7 +268,7 @@ final class UserExportGdprAction extends AbstractAction
         $sql = "SELECT  *
                 FROM    {$tableName}
                 WHERE   {$userIDColumn} = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->user->userID]);
 
         $data = [];
@@ -305,7 +305,7 @@ final class UserExportGdprAction extends AbstractAction
         ];
 
         $data['session'] = $this->exportIpAddresses(
-            'wcf' . WCF_N . '_user_session',
+            'wcf1_user_session',
             'ipAddress',
             'lastActivityTime',
             'userID'
@@ -314,7 +314,7 @@ final class UserExportGdprAction extends AbstractAction
         // we can ignore the wcfN_acp_session_access_log table because it is directly related
         // to the wcfN_acp_session_log table and ACP sessions are bound to the ip address
         $data['acpSessionLog'] = $this->exportIpAddresses(
-            'wcf' . WCF_N . '_acp_session_log',
+            'wcf1_acp_session_log',
             'ipAddress',
             'lastActivityTime',
             'userID'
index 9532209b27d568a025055fe6e8a51e0f681689cf..2dcf9aee08534b8dfc4a67d9760060921733b609 100644 (file)
@@ -97,11 +97,11 @@ final class UserQuickSearchAction extends AbstractAction
         switch ($this->mode) {
             case 'banned':
                 $sql = "SELECT      user_table.userID
-                        FROM        wcf" . WCF_N . "_user user_table
-                        LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
+                        FROM        wcf1_user user_table
+                        LEFT JOIN   wcf1_user_option_value option_value
                         ON          option_value.userID = user_table.userID
                         WHERE       banned = ?";
-                $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
+                $statement = WCF::getDB()->prepare($sql, $this->maxResults);
                 $statement->execute([1]);
                 $this->matches = $statement->fetchAll(\PDO::FETCH_COLUMN);
                 break;
@@ -111,11 +111,11 @@ final class UserQuickSearchAction extends AbstractAction
                 $this->sortField = 'registrationDate';
                 $this->sortOrder = 'DESC';
                 $sql = "SELECT      user_table.userID
-                        FROM        wcf" . WCF_N . "_user user_table
-                        LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
+                        FROM        wcf1_user user_table
+                        LEFT JOIN   wcf1_user_option_value option_value
                         ON          option_value.userID = user_table.userID
                         ORDER BY    user_table.registrationDate DESC";
-                $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
+                $statement = WCF::getDB()->prepare($sql, $this->maxResults);
                 $statement->execute();
                 $this->matches = $statement->fetchAll(\PDO::FETCH_COLUMN);
                 break;
@@ -124,12 +124,12 @@ final class UserQuickSearchAction extends AbstractAction
                 $this->sortField = 'registrationDate';
                 $this->sortOrder = 'DESC';
                 $sql = "SELECT      user_table.userID
-                        FROM        wcf" . WCF_N . "_user user_table
-                        LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
+                        FROM        wcf1_user user_table
+                        LEFT JOIN   wcf1_user_option_value option_value
                         ON          option_value.userID = user_table.userID
                         WHERE       activationCode <> ?
                         ORDER BY    user_table.registrationDate DESC";
-                $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
+                $statement = WCF::getDB()->prepare($sql, $this->maxResults);
                 $statement->execute([0]);
                 $this->matches = $statement->fetchAll(\PDO::FETCH_COLUMN);
                 break;
@@ -145,34 +145,34 @@ final class UserQuickSearchAction extends AbstractAction
                 $this->sortField = 'registrationDate';
                 $this->sortOrder = 'DESC';
                 $sql = "SELECT      user_table.userID
-                        FROM        wcf" . WCF_N . "_user user_table
-                        LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
+                        FROM        wcf1_user user_table
+                        LEFT JOIN   wcf1_user_option_value option_value
                         ON          option_value.userID = user_table.userID
                         " . $conditionBuilder . "
                         ORDER BY    user_table.registrationDate DESC";
-                $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
+                $statement = WCF::getDB()->prepare($sql, $this->maxResults);
                 $statement->execute($conditionBuilder->getParameters());
                 $this->matches = $statement->fetchAll(\PDO::FETCH_COLUMN);
                 break;
 
             case 'disabledAvatars':
                 $sql = "SELECT      user_table.userID
-                        FROM        wcf" . WCF_N . "_user user_table
-                        LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
+                        FROM        wcf1_user user_table
+                        LEFT JOIN   wcf1_user_option_value option_value
                         ON          option_value.userID = user_table.userID
                         WHERE       disableAvatar = ?";
-                $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
+                $statement = WCF::getDB()->prepare($sql, $this->maxResults);
                 $statement->execute([1]);
                 $this->matches = $statement->fetchAll(\PDO::FETCH_COLUMN);
                 break;
 
             case 'disabledSignatures':
                 $sql = "SELECT      user_table.userID
-                        FROM        wcf" . WCF_N . "_user user_table
-                        LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
+                        FROM        wcf1_user user_table
+                        LEFT JOIN   wcf1_user_option_value option_value
                         ON          option_value.userID = user_table.userID
                         WHERE       disableSignature = ?";
-                $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
+                $statement = WCF::getDB()->prepare($sql, $this->maxResults);
                 $statement->execute([1]);
                 $this->matches = $statement->fetchAll(\PDO::FETCH_COLUMN);
                 break;
index 9ebe0c8e7e534fce96c80914bd7b62a99f6c06e3..d95609f2c4ca8a4a9f26a54fc2f54c123d5d4fbc 100644 (file)
@@ -161,20 +161,20 @@ final class ApplicationManagementForm extends AbstractForm
         parent::save();
 
         if (!ENABLE_ENTERPRISE_MODE || WCF::getUser()->hasOwnerAccess()) {
-            $sql = "UPDATE  wcf" . WCF_N . "_application
+            $sql = "UPDATE  wcf1_application
                     SET     domainName = ?,
                             cookieDomain = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $this->domainName,
                 $this->cookieDomain,
             ]);
         }
 
-        $sql = "UPDATE  wcf" . WCF_N . "_application
+        $sql = "UPDATE  wcf1_application
                 SET     landingPageID = ?
                 WHERE   packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($this->landingPageID as $packageID => $landingPageID) {
             $statement->execute([
                 $landingPageID ?: null,
index 847004888374a28ceee4eafd2192fff81a40a4fb..bf376193e30f7d3201155ef1b2c61b6d25265848 100644 (file)
@@ -138,9 +138,9 @@ class BBCodeEditForm extends BBCodeAddForm
         $this->objectAction->executeAction();
 
         // clear existing attributes
-        $sql = "DELETE FROM wcf" . WCF_N . "_bbcode_attribute
+        $sql = "DELETE FROM wcf1_bbcode_attribute
                 WHERE       bbcodeID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->bbcodeID]);
 
         foreach ($this->attributes as $attribute) {
index a9221c653e57acf4a2197d9cf2a9547911ed4710..a594edb0bb4028509b027202b1a12836bcb5513f 100644 (file)
@@ -541,9 +541,9 @@ class BoxAddForm extends AbstractForm
             $conditionBuilder = new PreparedStatementConditionBuilder();
             $conditionBuilder->add('pageID IN (?)', [$this->pageIDs]);
             $sql = "SELECT  pageID
-                    FROM    wcf" . WCF_N . "_page
+                    FROM    wcf1_page
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
             $this->pageIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
         }
index 052e8d50464dc34ff4c323584e95ecb082ed67e9..605c28098988da713f77ba8ed236f5adf15ec7e8 100644 (file)
@@ -318,8 +318,8 @@ class DataImportForm extends AbstractForm
         if (empty($_POST)) {
             if (!$this->exporterName) {
                 $sql = "SELECT  COUNT(*)
-                        FROM    wcf" . WCF_N . "_import_mapping";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                        FROM    wcf1_import_mapping";
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute();
 
                 if ($statement->fetchSingleColumn()) {
index 2e10bcef9b9f924fdcaf04267f38b3611c12cc8f..78282d5105d029a4bc22b2e489a909b786d8e56f 100644 (file)
@@ -264,18 +264,18 @@ class LabelGroupAddForm extends AbstractForm
 
         // remove old relations
         if ($groupID !== null) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_label_group_to_object
+            $sql = "DELETE FROM wcf1_label_group_to_object
                     WHERE       groupID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$groupID]);
         }
 
         // insert new relations
         if (!empty($this->objectTypes)) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_label_group_to_object
+            $sql = "INSERT INTO wcf1_label_group_to_object
                                 (groupID, objectTypeID, objectID)
                     VALUES      (?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($this->objectTypes as $objectTypeID => $data) {
                 foreach ($data as $objectID) {
index 821a8dcfe39472ae36b9d82b0a476de58a66c79f..175d5a4781aa70d7d95ca95421f83a02eceef57a 100644 (file)
@@ -145,9 +145,9 @@ class LabelGroupEditForm extends LabelGroupAddForm
         if (empty($_POST)) {
             // read database values
             $sql = "SELECT  objectTypeID, objectID
-                    FROM    wcf" . WCF_N . "_label_group_to_object
+                    FROM    wcf1_label_group_to_object
                     WHERE   groupID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->groupID]);
 
             $data = [];
index d8dfcd747ea0cf831dde979dad67ff5e81774094..51c369c0759ccb7b541a35d39553a59a6f6dc4b5 100644 (file)
@@ -156,9 +156,9 @@ class MenuAddForm extends AbstractForm
             $conditionBuilder = new PreparedStatementConditionBuilder();
             $conditionBuilder->add('pageID IN (?)', [$this->pageIDs]);
             $sql = "SELECT  pageID
-                    FROM    wcf" . WCF_N . "_page
+                    FROM    wcf1_page
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
             $this->pageIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
         }
index ec99b99d1665501d64d58776d0c378a2eb26c0e5..e313b8eab24020329633785597115c7532dacc96 100644 (file)
@@ -183,9 +183,9 @@ class NoticeEditForm extends NoticeAddForm
         );
 
         if ($this->resetIsDismissed) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_notice_dismissed
+            $sql = "DELETE FROM wcf1_notice_dismissed
                     WHERE       noticeID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $this->notice->noticeID,
             ]);
index b55dc2c74bcb583ad2468e2470f958e41bf0208d..76afa72d4306b23f5b62bff33070fc251ebc4a14 100644 (file)
@@ -207,16 +207,16 @@ class NotificationPresetSettingsForm extends AbstractForm
 
                     if ($this->applyChangesToExistingUsers) {
                         if (!$preset) {
-                            $sql = "DELETE FROM wcf" . WCF_N . "_user_notification_event_to_user
+                            $sql = "DELETE FROM wcf1_user_notification_event_to_user
                                     WHERE       eventID = ?";
-                            $statement = WCF::getDB()->prepareStatement($sql);
+                            $statement = WCF::getDB()->prepare($sql);
                             $statement->execute([$event->eventID]);
                         } else {
-                            $sql = "REPLACE INTO    wcf" . WCF_N . "_user_notification_event_to_user
+                            $sql = "REPLACE INTO    wcf1_user_notification_event_to_user
                                                     (userID, eventID, mailNotificationType)
                                     SELECT          userID, ?, ?
-                                    FROM            wcf" . WCF_N . "_user";
-                            $statement = WCF::getDB()->prepareStatement($sql);
+                                    FROM            wcf1_user";
+                            $statement = WCF::getDB()->prepare($sql);
                             $statement->execute([$event->eventID, $presetMailNotificationType]);
                         }
                     }
index 8b7e8050a6488842dbd61d755633840725051754..4689936b0003a89e0b5ddbd8a132618166b6c71f 100644 (file)
@@ -674,9 +674,9 @@ class PageAddForm extends AbstractForm
             }
 
             $sql = "SELECT  MAX(showOrder)
-                    FROM    wcf" . WCF_N . "_menu_item
+                    FROM    wcf1_menu_item
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
             $maxShowOrder = $statement->fetchSingleColumn() ?? 0;
 
index 53fc4c47be362c46ec9c0aff4be17bbc941db8ab..45328828c92f4fbed771e66b9a185cf76954368e 100644 (file)
@@ -364,9 +364,9 @@ class SmileyAddForm extends AbstractForm
             $conditionBuilder->add('smileyID <> ?', [$this->smiley->smileyID]);
         }
         $sql = "SELECT  smileyCode, aliases
-                FROM    wcf" . WCF_N . "_smiley
+                FROM    wcf1_smiley
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         $aliases = \explode("\n", $this->aliases);
index 9d8b370e2e2682bf0afd2c237390b1cf7c564d6c..132e8c31d46c7329f7e018f1b39c264083c69bba 100644 (file)
@@ -634,8 +634,8 @@ class StyleAddForm extends AbstractForm
 
         // get available variables
         $sql = "SELECT  variableName
-                FROM    wcf" . WCF_N . "_style_variable";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_style_variable";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $variables = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -822,8 +822,8 @@ class StyleAddForm extends AbstractForm
     protected function readStyleVariables()
     {
         $sql = "SELECT  variableName, defaultValue
-                FROM    wcf" . WCF_N . "_style_variable";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_style_variable";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $this->variables = $statement->fetchMap('variableName', 'defaultValue');
     }
index 3455201090e57d82717c399caf69131aef462130..754a8f5af18f343a97dd29bf7bf360405c0cb20b 100644 (file)
@@ -74,10 +74,10 @@ class TagEditForm extends TagAddForm
 
         if ($this->tagObj->synonymFor === null) {
             // remove synonyms first
-            $sql = "UPDATE  wcf" . WCF_N . "_tag
+            $sql = "UPDATE  wcf1_tag
                     SET     synonymFor = ?
                     WHERE   synonymFor = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 null,
                 $this->tagID,
index a66f3aeb0cb5d9bbe5f22fb802aa8d26a30414f2..b6bb3fa9ed7e4c83d4d9e1294ff1702abf185a93 100644 (file)
@@ -152,9 +152,9 @@ class TemplateAddForm extends AbstractFormBuilderForm
                                 }
 
                                 $sql = "SELECT  COUNT(*)
-                                        FROM    wcf" . WCF_N . "_template
+                                        FROM    wcf1_template
                                         " . $conditionBuilder;
-                                $statement = WCF::getDB()->prepareStatement($sql);
+                                $statement = WCF::getDB()->prepare($sql);
                                 $statement->execute($conditionBuilder->getParameters());
 
                                 if ($statement->fetchSingleColumn()) {
@@ -219,10 +219,10 @@ class TemplateAddForm extends AbstractFormBuilderForm
                                 $parameters['data']['application'] = $this->copiedTemplate->application;
                             } else {
                                 $sql = "SELECT  packageID
-                                    FROM    wcf" . WCF_N . "_template
+                                    FROM    wcf1_template
                                     WHERE   templateName = ?
                                         AND templateGroupID IS NULL";
-                                $statement = WCF::getDB()->prepareStatement($sql);
+                                $statement = WCF::getDB()->prepare($sql);
                                 $statement->execute([
                                     $parameters['data']['templateName']
                                 ]);
index 2a7647e6e4fad460c25b6a843f8700758fc29eca..fc829f55b69c3fdfee54921f57ae474c3eb8ea48 100644 (file)
@@ -100,9 +100,9 @@ class TemplateGroupAddForm extends AbstractForm
         }
 
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_template_group
+                FROM    wcf1_template_group
                 WHERE   templateGroupName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->templateGroupName]);
 
         if ($statement->fetchSingleColumn()) {
@@ -124,9 +124,9 @@ class TemplateGroupAddForm extends AbstractForm
         }
 
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_template_group
+                FROM    wcf1_template_group
                 WHERE   templateGroupFolderName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->templateGroupFolderName]);
 
         if ($statement->fetchSingleColumn()) {
index c5be4d0bfac44f15f7462f26ed71fbd1b05495f7..475fa62f65fbecd23ecdfb35e3e9a838167a9174 100644 (file)
@@ -209,9 +209,9 @@ class TrophyEditForm extends TrophyAddForm
 
         // reset special trophies, if trophy is disabled
         if ($this->isDisabled) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_user_special_trophy
+            $sql = "DELETE FROM wcf1_user_special_trophy
                     WHERE       trophyID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->trophyID]);
 
             UserStorageHandler::getInstance()->resetAll('specialTrophies');
@@ -222,10 +222,10 @@ class TrophyEditForm extends TrophyAddForm
             $conditionBuilder = new PreparedStatementConditionBuilder();
             $conditionBuilder->add('trophyID = ?', [$this->trophyID]);
             $sql = "SELECT      COUNT(*) as count, userID
-                    FROM        wcf" . WCF_N . "_user_trophy
+                    FROM        wcf1_user_trophy
                     " . $conditionBuilder . "
                     GROUP BY    userID";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
 
             while ($row = $statement->fetchArray()) {
index fd1094c61f5d9d3fb9d71c525b90dd88f2c050c1..afce997d975f2f3e90ec74a70129747c46d8dfde 100644 (file)
@@ -226,9 +226,9 @@ class UserAddForm extends UserOptionListForm
             $conditions->add("groupType NOT IN (?)", [[UserGroup::GUESTS, UserGroup::EVERYONE, UserGroup::USERS]]);
 
             $sql = "SELECT  groupID
-                    FROM    wcf" . WCF_N . "_user_group
+                    FROM    wcf1_user_group
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             $this->groupIDs = [];
             while ($row = $statement->fetchArray()) {
index 50ce3a51600dccbda337dc122b13ab60d9152a87..0267fbcfb349e2f4ccc21771630c4bf74646d520 100755 (executable)
@@ -133,9 +133,9 @@ class UserAssignToGroupForm extends AbstractForm
         $conditions->add("userID IN (?)", [$this->userIDs]);
 
         $sql = "SELECT  userID, groupID
-                FROM    wcf" . WCF_N . "_user_to_group
+                FROM    wcf1_user_to_group
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $groups = $statement->fetchMap('userID', 'groupID', false);
 
index 052a05cd949e465f412225fd87bc602e8176bf4b..c2aca3f0f08da1f1748821fde7128c56e1726d68 100755 (executable)
@@ -527,9 +527,9 @@ class UserEditForm extends UserAddForm
         }
 
         // remove assignments
-        $sql = "DELETE FROM wcf" . WCF_N . "_moderation_queue_to_user
+        $sql = "DELETE FROM wcf1_moderation_queue_to_user
                 WHERE       userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->user->userID]);
 
         // reset moderation count
index 385d7789574a7e92d3ae8a6d54c00078f5afca94..447e6133a40dc1acc2caf039cda64aa464fada6d 100755 (executable)
@@ -128,18 +128,18 @@ class UserEmailAddressExportForm extends AbstractForm
 
         // count users
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_user
+                FROM    wcf1_user
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $count = $statement->fetchSingleColumn();
 
         // get users
         $sql = "SELECT      email
-                FROM        wcf" . WCF_N . "_user
+                FROM        wcf1_user
                 " . $conditions . "
                 ORDER BY    email";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         $i = 0;
index 00133482c206ffdd79c5b5e30fcfea2a2230edef..36fa73076562ce165e2af5baaf834c4318aca950 100644 (file)
@@ -230,9 +230,9 @@ class UserGroupOptionForm extends AbstractForm
             $conditions->add("optionID = ?", [$this->userGroupOption->optionID]);
 
             $sql = "SELECT  groupID, optionValue
-                    FROM    wcf" . WCF_N . "_user_group_option_value
+                    FROM    wcf1_user_group_option_value
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             $this->values = $statement->fetchMap('groupID', 'optionValue');
         }
index 2dcf3dc0aec3ad70bf12142801a534f8e96a6fb2..00124ae78db35f0ed817aaefadd1b69d1b70b704 100644 (file)
@@ -125,28 +125,28 @@ class UserMergeForm extends AbstractForm
         // poll_option_vote
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE IGNORE   wcf" . WCF_N . "_poll_option_vote
+        $sql = "UPDATE IGNORE   wcf1_poll_option_vote
                 SET             userID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // comment
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE  wcf" . WCF_N . "_comment
+        $sql = "UPDATE  wcf1_comment
                 SET     userID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // comment_response
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE  wcf" . WCF_N . "_comment_response
+        $sql = "UPDATE  wcf1_comment_response
                 SET     userID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // profile comments
@@ -157,119 +157,119 @@ class UserMergeForm extends AbstractForm
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("objectTypeID = ?", [$objectType->objectTypeID]);
         $conditions->add("objectID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE  wcf" . WCF_N . "_comment
+        $sql = "UPDATE  wcf1_comment
                 SET     objectID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // like (userID)
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE IGNORE   wcf" . WCF_N . "_like
+        $sql = "UPDATE IGNORE   wcf1_like
                 SET             userID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
         // like (objectUserID)
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("objectUserID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE  wcf" . WCF_N . "_like
+        $sql = "UPDATE  wcf1_like
                 SET     objectUserID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // like_object
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("objectUserID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE  wcf" . WCF_N . "_like_object
+        $sql = "UPDATE  wcf1_like_object
                 SET     objectUserID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // user_follow (userID)
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$this->mergedUserIDs]);
         $conditions->add("followUserID <> ?", [$this->destinationUserID]);
-        $sql = "UPDATE IGNORE   wcf" . WCF_N . "_user_follow
+        $sql = "UPDATE IGNORE   wcf1_user_follow
                 SET             userID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
         // user_follow (followUserID)
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("followUserID IN (?)", [$this->mergedUserIDs]);
         $conditions->add("userID <> ?", [$this->destinationUserID]);
-        $sql = "UPDATE IGNORE   wcf" . WCF_N . "_user_follow
+        $sql = "UPDATE IGNORE   wcf1_user_follow
                 SET             followUserID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // user_ignore (userID)
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$this->mergedUserIDs]);
         $conditions->add("ignoreUserID <> ?", [$this->destinationUserID]);
-        $sql = "UPDATE IGNORE   wcf" . WCF_N . "_user_ignore
+        $sql = "UPDATE IGNORE   wcf1_user_ignore
                 SET             userID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
         // user_ignore (ignoreUserID)
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("ignoreUserID IN (?)", [$this->mergedUserIDs]);
         $conditions->add("userID <> ?", [$this->destinationUserID]);
-        $sql = "UPDATE IGNORE   wcf" . WCF_N . "_user_ignore
+        $sql = "UPDATE IGNORE   wcf1_user_ignore
                 SET             ignoreUserID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // user_object_watch
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE IGNORE   wcf" . WCF_N . "_user_object_watch
+        $sql = "UPDATE IGNORE   wcf1_user_object_watch
                 SET             userID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // user_activity_event
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE  wcf" . WCF_N . "_user_activity_event
+        $sql = "UPDATE  wcf1_user_activity_event
                 SET     userID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // attachments
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE  wcf" . WCF_N . "_attachment
+        $sql = "UPDATE  wcf1_attachment
                 SET     userID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // modification_log
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE  wcf" . WCF_N . "_modification_log
+        $sql = "UPDATE  wcf1_modification_log
                 SET     userID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // user notifications
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("authorID IN (?)", [$this->mergedUserIDs]);
-        $sql = "UPDATE IGNORE   wcf" . WCF_N . "_user_notification_author
+        $sql = "UPDATE IGNORE   wcf1_user_notification_author
                 SET             authorID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$this->destinationUserID], $conditions->getParameters()));
 
         // delete merged users
index d7e0e42611454f4a1176694617ca905897b4ca13..1a2f1c0e125643dd6994b34ff64c51b213ce7fcd 100644 (file)
@@ -306,9 +306,9 @@ class UserOptionAddForm extends AbstractForm
             throw new UserInputException('categoryName');
         }
         $sql = "SELECT  categoryID
-                FROM    wcf" . WCF_N . "_user_option_category
+                FROM    wcf1_user_option_category
                 WHERE   categoryName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->categoryName]);
         if ($statement->fetchArray() === false) {
             throw new UserInputException('categoryName');
index caf81ff8e3f763a7ec1af2fc28edb3f3af416a32..84ea66f8f823e3a7a36e7f20ee0800a70e75cd7e 100644 (file)
@@ -89,9 +89,9 @@ class UserOptionSetDefaultsForm extends AbstractForm
 
             // get changed options
             $sql = "SELECT  optionID, defaultValue
-                    FROM    wcf" . WCF_N . "_user_option
+                    FROM    wcf1_user_option
                     WHERE   optionID IN (?" . \str_repeat(', ?', \count($optionIDs) - 1) . ")";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($optionIDs);
             $optionIDs = $optionValues = [];
             while ($row = $statement->fetchArray()) {
@@ -102,18 +102,18 @@ class UserOptionSetDefaultsForm extends AbstractForm
             }
 
             if (!empty($optionIDs)) {
-                $sql = "UPDATE  wcf" . WCF_N . "_user_option_value
+                $sql = "UPDATE  wcf1_user_option_value
                         SET     userOption" . \implode(' = ?, userOption', $optionIDs) . " = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute(\array_merge($optionValues));
             }
         }
 
         // save values
-        $sql = "UPDATE  wcf" . WCF_N . "_user_option
+        $sql = "UPDATE  wcf1_user_option
                 SET     defaultValue = ?
                 WHERE   optionID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($saveOptions as $optionID => $value) {
             $statement->execute([$value, $optionID]);
         }
index 9e3dc40bfd628161c5e151391e2c736a8c003de4..d639b8b96afc5fd430243fa4b04c8b32d797ba7c 100755 (executable)
@@ -288,7 +288,7 @@ class UserSearchForm extends UserOptionListForm
     {
         $this->userList = new UserList();
         $this->userList->sqlConditionJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+            LEFT JOIN   wcf1_user_option_value user_option_value
             ON          user_option_value.userID = user_table.userID";
         $this->userList->sqlLimit = $this->maxResults;
 
index 4820570080d4d9581159eb6336ca2e8977a1a867..9dfc855b2dc0b1c5652276d2bf4e8ff799ad92b8 100644 (file)
@@ -161,7 +161,7 @@ class ArticleListPage extends SortablePage
             $this->objectList->getConditionBuilder()->add(
                 'article.articleID IN (
                     SELECT  articleID
-                    FROM    wcf' . WCF_N . '_article_content
+                    FROM    wcf1_article_content
                     WHERE   title LIKE ?
                 )',
                 ['%' . $this->title . '%']
@@ -171,7 +171,7 @@ class ArticleListPage extends SortablePage
             $this->objectList->getConditionBuilder()->add(
                 'article.articleID IN (
                     SELECT  articleID
-                    FROM    wcf' . WCF_N . '_article_content
+                    FROM    wcf1_article_content
                     WHERE   content LIKE ?
                 )',
                 ['%' . $this->content . '%']
@@ -180,7 +180,7 @@ class ArticleListPage extends SortablePage
 
         $this->objectList->sqlSelects = "(
             SELECT  title
-            FROM    wcf" . WCF_N . "_article_content
+            FROM    wcf1_article_content
             WHERE   articleID = article.articleID
                 AND (
                         languageID IS NULL
index f828e87bad4b4c94897445c06b7abea4ff405fc9..638257dac51bc173efc7a236653fd20c9c20be08 100644 (file)
@@ -140,7 +140,7 @@ class BoxListPage extends SortablePage
             $this->objectList->getConditionBuilder()->add(
                 'box.boxID IN (
                     SELECT  boxID
-                    FROM    wcf' . WCF_N . '_box_content
+                    FROM    wcf1_box_content
                     WHERE   title LIKE ?
                 )',
                 ['%' . $this->title . '%']
@@ -150,7 +150,7 @@ class BoxListPage extends SortablePage
             $this->objectList->getConditionBuilder()->add(
                 'box.boxID IN (
                     SELECT  boxID
-                    FROM    wcf' . WCF_N . '_box_content
+                    FROM    wcf1_box_content
                     WHERE   content LIKE ?
                 )',
                 ['%' . $this->content . '%']
index c3d6f0f92e5fd5d6e16ea80aaa85fb86a9eb7e2c..2c7bc8b99c06c38f778077d928571bdbe9de0b42 100755 (executable)
@@ -93,7 +93,7 @@ class CronjobLogListPage extends SortablePage
 
         $this->objectList->sqlSelects = "cronjob.*";
         $this->objectList->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_cronjob cronjob
+            LEFT JOIN   wcf1_cronjob cronjob
             ON          cronjob.cronjobID = cronjob_log.cronjobID";
 
         if ($this->cronjobID) {
index ac224caf617310d69fc599ef72fedd07f5195aee..b375e1f68435486c7238ebca1ae87c8bf1e90b0e 100644 (file)
@@ -102,7 +102,7 @@ class LabelGroupListPage extends SortablePage
 
         $this->objectList->sqlSelects .= '(
             SELECT  COUNT(*)
-            FROM    wcf' . WCF_N . '_label
+            FROM    wcf1_label
             WHERE   groupID = label_group.groupID
         ) AS labels';
 
index 84d30e0c5e695001af70593611d7b6689b318300..57870b060856540711139308c08269af596ae2db 100644 (file)
@@ -110,7 +110,7 @@ class LabelListPage extends SortablePage
 
         $this->objectList->sqlSelects = "label_group.groupName, label_group.groupDescription";
         $this->objectList->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_label_group label_group
+            LEFT JOIN   wcf1_label_group label_group
             ON          label_group.groupID = label.groupID";
         if ($this->labelGroup) {
             $this->objectList->getConditionBuilder()->add('label.groupID = ?', [$this->labelGroup->groupID]);
index e67500e3998c419bd98254620956d0aadd336435..53f1f72fca8af2b41007220a80c0421ec8559c1b 100644 (file)
@@ -51,15 +51,15 @@ class LanguageListPage extends SortablePage
 
         $this->objectList->sqlSelects = "(
             SELECT  COUNT(*)
-            FROM    wcf" . WCF_N . "_user user
+            FROM    wcf1_user user
             WHERE   languageID = language.languageID
         ) AS users, (
             SELECT  COUNT(*)
-            FROM    wcf" . WCF_N . "_language_item
+            FROM    wcf1_language_item
             WHERE   languageID = language.languageID
         ) AS variables, (
             SELECT  COUNT(*)
-            FROM    wcf" . WCF_N . "_language_item
+            FROM    wcf1_language_item
             WHERE   languageID = language.languageID
                 AND languageCustomItemValue IS NOT NULL
         ) AS customVariables";
index 40b9fddfb7d7cfb2a074326e6e9e6e0421357e24..fd2f754cf5c4e15b643f14d44bafc8512d0faf87 100644 (file)
@@ -252,16 +252,16 @@ final class LicensePage extends AbstractPage
 
         // get installed packages
         $sql = "SELECT  package, packageVersion
-                FROM    wcf" . WCF_N . "_package";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_package";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $installedPackages = $statement->fetchMap('package', 'packageVersion');
 
         // get excluded packages (of installed packages)
         $excludedPackagesOfInstalledPackages = [];
         $sql = "SELECT  excludedPackage, excludedPackageVersion
-                FROM    wcf" . WCF_N . "_package_exclusion";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_package_exclusion";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             if (!isset($excludedPackagesOfInstalledPackages[$row['excludedPackage']])) {
@@ -300,9 +300,9 @@ final class LicensePage extends AbstractPage
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("packageUpdateID IN (?)", [\array_keys($packageUpdates)]);
         $sql = "SELECT  packageUpdateID, packageUpdateServerID, package
-                FROM    wcf" . WCF_N . "_package_update
+                FROM    wcf1_package_update
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $possiblePackages = [];
         while ($row = $statement->fetchArray()) {
@@ -349,9 +349,9 @@ final class LicensePage extends AbstractPage
                 $conditions->add("packageUpdateVersionID IN (?)", [$packageUpdateVersionIDs]);
 
                 $sql = "SELECT  packageUpdateVersionID, packageUpdateID, packageVersion
-                        FROM    wcf" . WCF_N . "_package_update_version
+                        FROM    wcf1_package_update_version
                         " . $conditions;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditions->getParameters());
                 $packageVersions = [];
                 while ($row = $statement->fetchArray()) {
@@ -429,15 +429,15 @@ final class LicensePage extends AbstractPage
         $conditions->add(
             "packageUpdateVersionID IN (
                 SELECT  packageUpdateVersionID
-                FROM    wcf" . WCF_N . "_package_update_version
+                FROM    wcf1_package_update_version
                 WHERE   packageUpdateID = ?
             )",
             [$packageUpdateID]
         );
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_package_update_exclusion
+                FROM    wcf1_package_update_exclusion
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $excludedPackages = [];
         while ($row = $statement->fetchArray()) {
@@ -469,11 +469,11 @@ final class LicensePage extends AbstractPage
         );
         $sql = "SELECT      pu.package, pu.packageUpdateServerID, puv.packageUpdateVersionID,
                             puv.packageUpdateID, puv.packageVersion, puv.isAccessible
-                FROM        wcf" . WCF_N . "_package_update_version puv
-                LEFT JOIN   wcf" . WCF_N . "_package_update pu
+                FROM        wcf1_package_update_version puv
+                LEFT JOIN   wcf1_package_update pu
                 ON          pu.packageUpdateID = puv.packageUpdateID
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $packageVersions = [];
         while ($row = $statement->fetchArray()) {
@@ -588,9 +588,9 @@ final class LicensePage extends AbstractPage
         // validate dependencies
         foreach ($packageUpdates as $packageUpdateData) {
             $sql = "SELECT  package, minversion
-                    FROM    wcf" . WCF_N . "_package_update_requirement
+                    FROM    wcf1_package_update_requirement
                     WHERE   packageUpdateVersionID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$packageUpdateData['accessible']]);
             $requirements = [];
             while ($row = $statement->fetchArray()) {
@@ -616,9 +616,9 @@ final class LicensePage extends AbstractPage
             $conditions = new PreparedStatementConditionBuilder();
             $conditions->add("package IN (?)", [\array_keys($requirements)]);
             $sql = "SELECT  packageUpdateID, package
-                    FROM    wcf" . WCF_N . "_package_update
+                    FROM    wcf1_package_update
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             while ($row = $statement->fetchArray()) {
                 if (!\in_array($row['package'], $openRequirements)) {
index 9e4981e37dc9d43454e655941955040c5782dc9b..22788ccbccb3993c34f6e2ec0c3a5180f1eba321 100644 (file)
@@ -56,15 +56,15 @@ class MenuListPage extends SortablePage
 
         $this->objectList->sqlSelects .= '(
             SELECT  COUNT(*)
-            FROM    wcf' . WCF_N . '_menu_item
+            FROM    wcf1_menu_item
             WHERE   menuID = menu.menuID
         ) AS items, (
             SELECT  position
-            FROM    wcf' . WCF_N . '_box
+            FROM    wcf1_box
             WHERE   menuID = menu.menuID
         ) AS position, (
             SELECT  showOrder
-            FROM    wcf' . WCF_N . '_box
+            FROM    wcf1_box
             WHERE   menuID = menu.menuID
         ) AS showOrder';
     }
index c9533edf6f5c5651c4993c4ac73f829142902c4c..6b4aa753c45806db06fea4aa248446ed4d6c6532 100755 (executable)
@@ -76,10 +76,10 @@ class PackagePage extends AbstractPage
         parent::readData();
 
         $sql = "SELECT  pluginStoreFileID
-                FROM    wcf" . WCF_N . "_package_update
+                FROM    wcf1_package_update
                 WHERE   package = ?
                     AND pluginStoreFileID <> 0";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->package->package]);
         $this->pluginStoreFileID = \intval($statement->fetchSingleColumn());
     }
index 8e37066073774dd7b5893fcf5d652eb0d1826ed0..2592e388a0ef6601f38e0ca8c059f955c0c05ed1 100644 (file)
@@ -158,7 +158,7 @@ class PageListPage extends SortablePage
             $this->objectList->getConditionBuilder()->add(
                 'page.pageID IN (
                     SELECT  pageID
-                    FROM    wcf' . WCF_N . '_page_content
+                    FROM    wcf1_page_content
                     WHERE   title LIKE ?
                 )',
                 ['%' . $this->title . '%']
@@ -168,7 +168,7 @@ class PageListPage extends SortablePage
             $this->objectList->getConditionBuilder()->add(
                 'page.pageID IN (
                     SELECT  pageID
-                    FROM    wcf' . WCF_N . '_page_content
+                    FROM    wcf1_page_content
                     WHERE   content LIKE ?
                 )',
                 ['%' . $this->content . '%']
index 3c906af1908c27b36c1f29ade0cdb644aa6bec1b..42d23937cb2632cb6ef552c71c29b2e1ede187d4 100644 (file)
@@ -116,7 +116,7 @@ class PaidSubscriptionTransactionLogListPage extends SortablePage
             $this->objectList->getConditionBuilder()->add(
                 'paid_subscription_transaction_log.userID IN (
                     SELECT  userID
-                    FROM    wcf' . WCF_N . '_user
+                    FROM    wcf1_user
                     WHERE   username LIKE ?
                 )',
                 ['%' . $this->username . '%']
@@ -131,9 +131,9 @@ class PaidSubscriptionTransactionLogListPage extends SortablePage
 
         $this->objectList->sqlSelects = 'user_table.username, paid_subscription.title';
         $this->objectList->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = paid_subscription_transaction_log.userID
-            LEFT JOIN   wcf" . WCF_N . "_paid_subscription paid_subscription
+            LEFT JOIN   wcf1_paid_subscription paid_subscription
             ON          paid_subscription.subscriptionID = paid_subscription_transaction_log.subscriptionID";
     }
 
index ad67074eac180827d567ac21c056237faf7686ca..de8221478b39e95a43a5c3748bdc567c676ac947 100644 (file)
@@ -87,7 +87,7 @@ class PaidSubscriptionUserListPage extends SortablePage
             $this->objectList->getConditionBuilder()->add(
                 'paid_subscription_user.userID IN (
                     SELECT  userID
-                    FROM    wcf' . WCF_N . '_user
+                    FROM    wcf1_user
                     WHERE   username LIKE ?
                 )',
                 ['%' . $this->username . '%']
@@ -103,9 +103,9 @@ class PaidSubscriptionUserListPage extends SortablePage
         $this->objectList->getConditionBuilder()->add('paid_subscription_user.isActive = ?', [1]);
         $this->objectList->sqlSelects = 'user_table.username, paid_subscription.title';
         $this->objectList->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = paid_subscription_user.userID
-            LEFT JOIN   wcf" . WCF_N . "_paid_subscription paid_subscription
+            LEFT JOIN   wcf1_paid_subscription paid_subscription
             ON          paid_subscription.subscriptionID = paid_subscription_user.subscriptionID";
     }
 
index 3170b52b449cd20ea7ec22fd793014739b8106af..a59ba74de6cbb139cb04c718aff4371106be9474 100644 (file)
@@ -50,7 +50,7 @@ class StyleListPage extends MultipleLinkPage
 
         $this->objectList->sqlSelects = "(
             SELECT  COUNT(*)
-            FROM    wcf" . WCF_N . "_user
+            FROM    wcf1_user
             WHERE   styleID = style.styleID
         ) AS users";
     }
index 450f2b8e0e226195608737d29bc599157a36c3db..c3fc12f02f131ed40b7abdb0b474c1c2dca54e89 100644 (file)
@@ -85,33 +85,33 @@ class SystemCheckPage extends AbstractPage
     ];
 
     public $foreignKeys = [
-        'wcf' . WCF_N . '_user' => [
+        'wcf1_user' => [
             'avatarID' => [
-                'referenceTable' => 'wcf' . WCF_N . '_user_avatar',
+                'referenceTable' => 'wcf1_user_avatar',
                 'referenceColumn' => 'avatarID',
             ],
         ],
-        'wcf' . WCF_N . '_comment' => [
+        'wcf1_comment' => [
             'userID' => [
-                'referenceTable' => 'wcf' . WCF_N . '_user',
+                'referenceTable' => 'wcf1_user',
                 'referenceColumn' => 'userID',
             ],
             'objectTypeID' => [
-                'referenceTable' => 'wcf' . WCF_N . '_object_type',
+                'referenceTable' => 'wcf1_object_type',
                 'referenceColumn' => 'objectTypeID',
             ],
         ],
-        'wcf' . WCF_N . '_moderation_queue' => [
+        'wcf1_moderation_queue' => [
             'objectTypeID' => [
-                'referenceTable' => 'wcf' . WCF_N . '_object_type',
+                'referenceTable' => 'wcf1_object_type',
                 'referenceColumn' => 'objectTypeID',
             ],
             'assignedUserID' => [
-                'referenceTable' => 'wcf' . WCF_N . '_user',
+                'referenceTable' => 'wcf1_user',
                 'referenceColumn' => 'userID',
             ],
             'userID' => [
-                'referenceTable' => 'wcf' . WCF_N . '_user',
+                'referenceTable' => 'wcf1_user',
                 'referenceColumn' => 'userID',
             ],
         ],
@@ -243,13 +243,13 @@ class SystemCheckPage extends AbstractPage
 
         // check for MySQL Native driver
         $sql = "SELECT 1";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $this->results['mysql']['mysqlnd'] = ($statement->fetchSingleColumn() === 1);
 
         // check innodb support
         $sql = "SHOW ENGINES";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             if ($row['Engine'] == 'InnoDB' && \in_array($row['Support'], ['DEFAULT', 'YES'])) {
@@ -279,13 +279,13 @@ class SystemCheckPage extends AbstractPage
         $sql = "SELECT  COUNT(*)
                 FROM    INFORMATION_SCHEMA.KEY_COLUMN_USAGE
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         $this->results['mysql']['foreignKeys'] = $statement->fetchSingleColumn() == $expectedForeignKeyCount;
 
         $sql = "SELECT  @@innodb_buffer_pool_size";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $this->results['mysql']['bufferPool']['value'] = $statement->fetchSingleColumn();
         if ($this->results['mysql']['bufferPool']['value'] > 134217728) {
index 96ee59c802921e936ae3022792f167161b47dfd5..f594702d43e8dcafa06a02c8b7a940afaaba5136 100644 (file)
@@ -89,16 +89,16 @@ class TagListPage extends SortablePage
 
         $this->objectList->sqlSelects = "(
             SELECT  COUNT(*)
-            FROM    wcf" . WCF_N . "_tag_to_object t2o
+            FROM    wcf1_tag_to_object t2o
             WHERE   t2o.tagID = tag.tagID
         ) AS usageCount";
         $this->objectList->sqlSelects .= ", language.languageName, language.languageCode";
         $this->objectList->sqlSelects .= ", synonym.name AS synonymName";
 
         $this->objectList->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_language language
+            LEFT JOIN   wcf1_language language
             ON          tag.languageID = language.languageID
-            LEFT JOIN   wcf" . WCF_N . "_tag synonym
+            LEFT JOIN   wcf1_tag synonym
             ON          tag.synonymFor = synonym.tagID";
 
         if ($this->search !== '') {
index d9ba15773ff7d64b042150f98291762e2c0fc488..969f2180b4c092296b93a06e7d0bf6fd54df6a49 100644 (file)
@@ -57,12 +57,12 @@ class TemplateGroupListPage extends SortablePage
         $this->objectList->sqlSelects = "
             (
                 SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_template
+                FROM    wcf1_template
                 WHERE   templateGroupID = template_group.templateGroupID
             ) AS templates,
             (
                 SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_style
+                FROM    wcf1_style
                 WHERE   templateGroupID = template_group.templateGroupID
             ) AS styles";
     }
index 4bcb32e02d3118e5df05367ef97ad6cfbfbf38d4..3e4443c4acff6b8b1fff7c56ed5ca12e70715353 100755 (executable)
@@ -73,7 +73,7 @@ class UserGroupListPage extends SortablePage
         }
         $this->objectList->sqlSelects .= "(
             SELECT  COUNT(*)
-            FROM    wcf" . WCF_N . "_user_to_group
+            FROM    wcf1_user_to_group
             WHERE   groupID = user_group.groupID
         ) AS members";
     }
index da8ee25207da978c5e4e35ee474c5015162a05aa..311b427838e0f2d1b4e18febf2ed27ae7a1f7511 100755 (executable)
@@ -242,9 +242,9 @@ class UserListPage extends SortablePage
         EventHandler::getInstance()->fireAction($this, 'countItems');
 
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_user user_table
+                FROM    wcf1_user user_table
                 " . $this->conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($this->conditions->getParameters());
 
         return $statement->fetchSingleColumn();
@@ -257,14 +257,14 @@ class UserListPage extends SortablePage
     {
         // get user ids
         $sql = "SELECT      user_table.userID
-                FROM        wcf" . WCF_N . "_user user_table
+                FROM        wcf1_user user_table
                 " . (isset($this->options[$this->sortField]) ? "
-                    LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+                    LEFT JOIN   wcf1_user_option_value user_option_value
                     ON          user_option_value.userID = user_table.userID
                     " : '') . "
                 " . $this->conditions . "
                 ORDER BY    " . (($this->sortField != 'email' && isset($this->options[$this->sortField])) ? 'user_option_value.userOption' . $this->options[$this->sortField]->optionID : $this->sortField) . " " . $this->sortOrder;
-        $statement = WCF::getDB()->prepareStatement(
+        $statement = WCF::getDB()->prepare(
             $sql,
             $this->itemsPerPage,
             ($this->pageNo - 1) * $this->itemsPerPage
@@ -279,21 +279,21 @@ class UserListPage extends SortablePage
             $conditions->add("user_table.userID IN (?)", [$userIDs]);
 
             $sql = "SELECT  userID, groupID
-                    FROM    wcf" . WCF_N . "_user_to_group user_table
+                    FROM    wcf1_user_to_group user_table
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             $userToGroups = $statement->fetchMap('userID', 'groupID', false);
 
             $sql = "SELECT      user_avatar.*, option_value.*, user_table.*
-                    FROM        wcf" . WCF_N . "_user user_table
-                    LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
+                    FROM        wcf1_user user_table
+                    LEFT JOIN   wcf1_user_option_value option_value
                     ON          option_value.userID = user_table.userID
-                    LEFT JOIN   wcf" . WCF_N . "_user_avatar user_avatar
+                    LEFT JOIN   wcf1_user_avatar user_avatar
                     ON          user_avatar.avatarID = user_table.avatarID
                     " . $conditions . "
                     ORDER BY    " . (($this->sortField != 'email' && isset($this->options[$this->sortField])) ? 'option_value.userOption' . $this->options[$this->sortField]->optionID : 'user_table.' . $this->sortField) . " " . $this->sortOrder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             while ($row = $statement->fetchArray()) {
                 $groupIDs = ($userToGroups[$row['userID']] ?? []);
@@ -365,11 +365,11 @@ class UserListPage extends SortablePage
     {
         // get user search from database
         $sql = "SELECT  searchData
-                FROM    wcf" . WCF_N . "_search
+                FROM    wcf1_search
                 WHERE   searchID = ?
                     AND userID = ?
                     AND searchType = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $this->searchID,
             WCF::getUser()->userID,
index 561211f9509420f5f9dbf574ac030423130676d5..2841acf31fc9d849d8d728f88f13d83919e11eaa 100644 (file)
@@ -50,7 +50,7 @@ class UserOptionCategoryListPage extends SortablePage
 
         $this->objectList->sqlSelects = "(
             SELECT  COUNT(*)
-            FROM    wcf" . WCF_N . "_user_option
+            FROM    wcf1_user_option
             WHERE   categoryName = user_option_category.categoryName
         ) AS userOptions";
         $this->objectList->getConditionBuilder()->add('user_option_category.parentCategoryName = ?', ['profile']);
index 7f168bb752e663cf244590a1ffe37af7d58730d8..929cd7b60d57f6fcd5eacf3ae589677000eb5515 100644 (file)
@@ -51,7 +51,7 @@ class UserOptionListPage extends SortablePage
         $this->objectList->getConditionBuilder()->add(
             "option_table.categoryName IN (
                 SELECT  categoryName
-                FROM    wcf" . WCF_N . "_user_option_category
+                FROM    wcf1_user_option_category
                 WHERE   parentCategoryName = ?
             )",
             ['profile']
index ddd3e9f893ff86d800996ad129cb7d4c096a8f54..366c4ff65a519f52cc6bc96187ee982119653c51 100644 (file)
@@ -55,7 +55,7 @@ class UserRankListPage extends SortablePage
 
         $this->objectList->sqlSelects .= (!empty($this->objectList->sqlSelects) ? ', ' : '') . 'user_group.groupName';
         $this->objectList->sqlJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_user_group user_group
+            LEFT JOIN   wcf1_user_group user_group
             ON          user_group.groupID = user_rank.groupID';
     }
 }
index c0b88c50e590bcf9d69509805003b846ba57163c..00d6f30dace82553c25831d54b49a648fb339e89 100644 (file)
@@ -99,7 +99,7 @@ class UserTrophyListPage extends SortablePage
     {
         parent::initObjectList();
 
-        $this->objectList->sqlJoins .= ' LEFT JOIN wcf' . WCF_N . '_user users ON (users.userID = user_trophy.userID)';
+        $this->objectList->sqlJoins .= ' LEFT JOIN wcf1_user users ON (users.userID = user_trophy.userID)';
         if ($this->trophyID) {
             $this->objectList->getConditionBuilder()->add('user_trophy.trophyID = ?', [$this->trophyID]);
         }
@@ -108,7 +108,7 @@ class UserTrophyListPage extends SortablePage
             $this->objectList->getConditionBuilder()->add(
                 'user_trophy.userID IN (
                     SELECT  userID
-                    FROM    wcf' . WCF_N . '_user
+                    FROM    wcf1_user
                     WHERE   username LIKE ?
                 )',
                 ['%' . $this->username . '%']
index dc4639a666c9b0ff4123afb5aa379c6741f8d770..5d48507e2c8254e8510c604d97d18fe3da06eb9d 100644 (file)
@@ -415,7 +415,7 @@ abstract class AbstractDatabaseObjectAction implements IDatabaseObjectAction, ID
         $sql = "SELECT  *
                 FROM    " . $tableName . "
                 WHERE   " . $indexName . " IN (" . \str_repeat('?,', \count($this->objectIDs) - 1) . "?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($this->objectIDs);
         while ($object = $statement->fetchObject($baseClass)) {
             $this->objects[] = new $this->className($object);
index 1bb5e6cbea04528c34e80aab1e2ccc4889da9689..b7d7c6e3ec83d3ea0d6bbf7681ae017b00a7476e 100644 (file)
@@ -62,7 +62,7 @@ abstract class DatabaseObject implements IIDObject, IStorableObject
             $sql = "SELECT  *
                     FROM    " . static::getDatabaseTableName() . "
                     WHERE   " . static::getDatabaseTableIndexName() . " = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$id]);
             $row = $statement->fetchArray();
 
@@ -135,20 +135,22 @@ abstract class DatabaseObject implements IIDObject, IStorableObject
         $classParts = \explode('\\', $className);
 
         if (static::$databaseTableName !== '') {
-            return $classParts[0] . WCF_N . '_' . static::$databaseTableName;
+            return $classParts[0] . '1_' . static::$databaseTableName;
         }
 
         static $databaseTableNames = [];
         if (!isset($databaseTableNames[$className])) {
-            $databaseTableNames[$className] = $classParts[0] . WCF_N . '_' . \strtolower(\implode(
-                '_',
-                \preg_split(
-                    '~(?=[A-Z](?=[a-z]))~',
-                    \array_pop($classParts),
-                    -1,
-                    \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY
-                )
-            ));
+            $databaseTableNames[$className] = $classParts[0] . '1_' . \strtolower(
+                    \implode(
+                        '_',
+                        \preg_split(
+                            '~(?=[A-Z](?=[a-z]))~',
+                            \array_pop($classParts),
+                            -1,
+                            \PREG_SPLIT_DELIM_CAPTURE | \PREG_SPLIT_NO_EMPTY
+                        )
+                    )
+                );
         }
 
         return $databaseTableNames[$className];
index 454551e4b09d722c9e3669f7314ffc1fe149997b..f9d07b0472657be947de43548042bbbf8e763840 100644 (file)
@@ -50,7 +50,7 @@ abstract class DatabaseObjectEditor extends DatabaseObjectDecorator implements I
         $sql = "UPDATE  " . static::getDatabaseTableName() . "
                 SET     " . $updateSQL . "
                 WHERE   " . static::getDatabaseTableIndexName() . " = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($statementParameters);
     }
 
@@ -77,7 +77,7 @@ abstract class DatabaseObjectEditor extends DatabaseObjectDecorator implements I
         $sql = "UPDATE  " . static::getDatabaseTableName() . "
                 SET     " . $updateSQL . "
                 WHERE   " . static::getDatabaseTableIndexName() . " = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($statementParameters);
     }
 
@@ -108,7 +108,7 @@ abstract class DatabaseObjectEditor extends DatabaseObjectDecorator implements I
 
             $sql = "DELETE FROM " . static::getDatabaseTableName() . "
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
             $affectedCount += $statement->getAffectedRows();
         }
index b5845e96ce023fa7a6c1be55e87499abcb07f36f..73181ac403d223c82ed8025aef72fc175cff9a9d 100644 (file)
@@ -149,7 +149,7 @@ abstract class DatabaseObjectList implements \Countable, ITraversableObject
                 FROM    " . $this->getDatabaseTableName() . " " . $this->getDatabaseTableAlias() . "
                 " . $this->sqlConditionJoins . "
                 " . $this->getConditionBuilder();
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($this->getConditionBuilder()->getParameters());
 
         return $statement->fetchSingleColumn();
@@ -166,7 +166,7 @@ abstract class DatabaseObjectList implements \Countable, ITraversableObject
                 " . $this->sqlConditionJoins . "
                 " . $this->getConditionBuilder() . "
                 " . (!empty($this->sqlOrderBy) ? "ORDER BY " . $this->sqlOrderBy : '');
-        $statement = WCF::getDB()->prepareStatement($sql, $this->sqlLimit, $this->sqlOffset);
+        $statement = WCF::getDB()->prepare($sql, $this->sqlLimit, $this->sqlOffset);
         $statement->execute($this->getConditionBuilder()->getParameters());
         $this->objectIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
     }
@@ -189,7 +189,7 @@ abstract class DatabaseObjectList implements \Countable, ITraversableObject
                             " . $this->sqlJoins . "
                     WHERE   " . $this->getDatabaseTableAlias() . "." . $this->getDatabaseTableIndexName() . " IN ({$objectIdPlaceholder})
                             " . (!empty($this->sqlOrderBy) ? "ORDER BY " . $this->sqlOrderBy : '');
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($this->objectIDs);
             $this->objects = $statement->fetchObjects(($this->objectClassName ?: $this->className));
         } else {
@@ -199,7 +199,7 @@ abstract class DatabaseObjectList implements \Countable, ITraversableObject
                     " . $this->sqlJoins . "
                     " . $this->getConditionBuilder() . "
                     " . (!empty($this->sqlOrderBy) ? "ORDER BY " . $this->sqlOrderBy : '');
-            $statement = WCF::getDB()->prepareStatement($sql, $this->sqlLimit, $this->sqlOffset);
+            $statement = WCF::getDB()->prepare($sql, $this->sqlLimit, $this->sqlOffset);
             $statement->execute($this->getConditionBuilder()->getParameters());
             $this->objects = $statement->fetchObjects(($this->objectClassName ?: $this->className));
         }
index 27dbebd97420d5eb589768c665f00c3bf5a78859..191c2955a9c80078c64aa9b9503a1aaa7998f526 100644 (file)
@@ -54,7 +54,7 @@ abstract class I18nDatabaseObjectList extends DatabaseObjectList
 
                 $this->sqlSelects .= (!empty($this->sqlSelects) ? ', ' : '') . "COALESCE(" . $matchTable . ".languageItemValue, " . $this->getDatabaseTableAlias() . "." . $key . ") AS " . $value;
                 $this->sqlJoins .= "
-                    LEFT JOIN   wcf" . WCF_N . "_language_item " . $matchTable . "
+                    LEFT JOIN   wcf1_language_item " . $matchTable . "
                     ON          " . $matchTable . ".languageItem = " . $this->getDatabaseTableAlias() . "." . $key . "
                             AND " . $matchTable . ".languageID = " . $languageID;
             }
index 79421d029e246282d92257c9d2ccab8643c9026d..18e68d687c9341683dd8184ff73b388ae29e483c 100644 (file)
@@ -39,7 +39,7 @@ trait TFastCreate
         $sql = "INSERT INTO " . static::getDatabaseTableName() . "
                             (" . $keys . ")
                 VALUES      (" . $values . ")";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($statementParameters);
 
         // return new object
index 924f89d25d5ddd95416fba5d8d8177c808d4003c..47937c1f4f8f45eac99b2c770d2e8efeb3b4f231 100644 (file)
@@ -74,14 +74,14 @@ trait TMultiCategoryObject
                 }
             } else {
                 $sql = "SELECT      categoryID
-                        FROM        wcf" . WCF_N . "_category
+                        FROM        wcf1_category
                         WHERE       categoryID IN (
                                         SELECT  categoryID
                                         FROM    " . static::getCategoryMappingDatabaseTableName() . "
                                         WHERE   " . static::getDatabaseTableIndexName() . " = ?
                                     )
                         ORDER BY    parentCategoryID, showOrder";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([$this->getObjectID()]);
                 while ($categoryID = $statement->fetchColumn()) {
                     /** @noinspection PhpUndefinedMethodInspection */
index 30743ba9286884710bdaedd4369b3172b73e49b0..3437c9c847ef0d0af1ac27ea0aa4ab06b6f57df6 100644 (file)
@@ -51,7 +51,7 @@ class ACPSession extends DatabaseObject
         $sql = "SELECT  *
                 FROM    " . static::getDatabaseTableName() . "
                 WHERE   userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$userID]);
 
         return $statement->fetchObject(static::class);
index 9693cb264831b3ef4069ffde3f6a496015712499..684965846ff8999e2e164c384f80781df7e7944c 100644 (file)
@@ -63,7 +63,7 @@ class ACPSessionEditor extends DatabaseObjectEditor
 
         $sql = "DELETE FROM " . \call_user_func([static::$baseClass, 'getDatabaseTableName']) . "
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
     }
 
index 5dbdfdaa8a33e897834a3288cd74ddae30841611..1ce711238fc929cd76d32339231f46120263dcd4 100644 (file)
@@ -39,11 +39,11 @@ class ACPSessionLog extends DatabaseObject
     {
         if ($id !== null) {
             $sql = "SELECT      acp_session_log.*, user_table.username, 0 AS active
-                    FROM        wcf" . WCF_N . "_acp_session_log acp_session_log
-                    LEFT JOIN   wcf" . WCF_N . "_user user_table
+                    FROM        wcf1_acp_session_log acp_session_log
+                    LEFT JOIN   wcf1_user user_table
                     ON          user_table.userID = acp_session_log.userID
                     WHERE       acp_session_log.sessionLogID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$id]);
             $row = $statement->fetchArray();
         } elseif ($object !== null) {
index f6fcf2ec1eb8e4e09aca3adee237a6f446e483b9..f440b012f4735a9d22a416004f05fbbc71f8e632 100644 (file)
@@ -37,12 +37,12 @@ class ACPSessionLogList extends DatabaseObjectList
             0 AS active,
             (
                 SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_acp_session_access_log
+                FROM    wcf1_acp_session_access_log
                 WHERE   sessionLogID = " . $this->getDatabaseTableAlias() . ".sessionLogID
             ) AS accesses";
 
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = " . $this->getDatabaseTableAlias() . ".userID";
 
         parent::readObjects();
index fd91ad4951892cd67b69f33ed0196bd81c6c0c92..b3b890fd156dd15281b48ee1fc4ccc8300082951 100644 (file)
@@ -111,10 +111,10 @@ class AdAction extends AbstractDatabaseObjectAction implements ISortableAction,
      */
     public function updatePosition()
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_ad
+        $sql = "UPDATE  wcf1_ad
                 SET     showOrder = ?
                 WHERE   adID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         $showOrder = $this->parameters['data']['offset'];
         WCF::getDB()->beginTransaction();
index 25711c2bc5b9d2fb445107aac34a5e98a7811d3a..1fdbccc7705f82a358dcebc1f3bebe8d21f823c4 100644 (file)
@@ -35,9 +35,9 @@ class AdEditor extends DatabaseObjectEditor implements IEditableCachedObject
     public function setShowOrder($showOrder = 0)
     {
         $sql = "SELECT  MAX(showOrder)
-                FROM    wcf" . WCF_N . "_ad
+                FROM    wcf1_ad
                 WHERE   objectTypeID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $this->objectTypeID,
         ]);
@@ -50,11 +50,11 @@ class AdEditor extends DatabaseObjectEditor implements IEditableCachedObject
             $newShowOrder = $maxShowOrder + 1;
         } else {
             // shift other ads
-            $sql = "UPDATE  wcf" . WCF_N . "_ad
+            $sql = "UPDATE  wcf1_ad
                     SET     showOrder = showOrder + 1
                     WHERE   objectTypeID = ?
                             AND showOrder >= ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $this->objectTypeID,
                 $showOrder,
index c557b21a2ab09c97ee6ef9cd8442c1d24afe6e31..c91c4436180bc975d97b506fcbbc8c06bb60c341 100644 (file)
@@ -41,10 +41,10 @@ class ApplicationAction extends AbstractDatabaseObjectAction
             $this->readObjects();
         }
 
-        $sql = "UPDATE  wcf" . WCF_N . "_application
+        $sql = "UPDATE  wcf1_application
                 SET     cookieDomain = ?
                 WHERE   packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         // calculate cookie domain
         $regex = new Regex(':[0-9]+');
index c05d015c40c8580f327a6ca53a354de1df2f6cff..93de809aac2c117e35b4168cc2e34a763092e095 100644 (file)
@@ -285,9 +285,9 @@ class Article extends DatabaseObject implements ILinkableObject, IUserContent
             $this->articleContents = [];
 
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_article_content
+                    FROM    wcf1_article_content
                     WHERE   articleID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->articleID]);
             while ($row = $statement->fetchArray()) {
                 $this->articleContents[$row['languageID'] ?: 0] = new ArticleContent(null, $row);
@@ -307,9 +307,9 @@ class Article extends DatabaseObject implements ILinkableObject, IUserContent
         if ($this->languageLinks === null) {
             $this->languageLinks = [];
             $sql = "SELECT  articleContentID, title, languageID
-                    FROM    wcf" . WCF_N . "_article_content
+                    FROM    wcf1_article_content
                     WHERE   articleID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->articleID]);
             while ($row = $statement->fetchArray()) {
                 $this->languageLinks[$row['languageID'] ?: 0] = new ArticleContent(null, $row);
index c45b7573d53a2d7c0b1b80d9485415bbad20566c..eadee4e7dd6893d3e335b9b68a72e3634586d5c3 100644 (file)
@@ -359,11 +359,11 @@ class ArticleAction extends AbstractDatabaseObjectAction
 
         // update author in recent activities
         if (isset($this->parameters['data']['userID'])) {
-            $sql = "UPDATE  wcf" . WCF_N . "_user_activity_event
+            $sql = "UPDATE  wcf1_user_activity_event
                     SET     userID = ?
                     WHERE   objectTypeID = ?
                         AND objectID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($this->objects as $articleEditor) {
                 if ($articleEditor->userID != $this->parameters['data']['userID']) {
@@ -890,14 +890,14 @@ class ArticleAction extends AbstractDatabaseObjectAction
     public function search()
     {
         $sql = "SELECT      articleID
-                FROM        wcf" . WCF_N . "_article_content
+                FROM        wcf1_article_content
                 WHERE       title LIKE ?
                         AND (
                                 languageID = ?
                                 OR languageID IS NULL
                             )
                 ORDER BY    title";
-        $statement = WCF::getDB()->prepareStatement($sql, 5);
+        $statement = WCF::getDB()->prepare($sql, 5);
         $statement->execute([
             '%' . $this->parameters['searchString'] . '%',
             WCF::getLanguage()->languageID,
index fb730301fc6f1b53492c70550b4a5370ca7025d2..1dd11f4b38236d2c883d793414d124c0c1a8865d 100644 (file)
@@ -32,10 +32,10 @@ class ArticleEditor extends DatabaseObjectEditor
      */
     public static function updateArticleCounter(array $users)
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_user
+        $sql = "UPDATE  wcf1_user
                 SET     articles = articles + ?
                 WHERE   userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($users as $userID => $articles) {
             $statement->execute([$articles, $userID]);
         }
index be123346c6cbbecab1e10c4cae315b0831dc34cc..7b6369ee849149e249ad55b87c78744843f31d2c 100644 (file)
@@ -32,7 +32,7 @@ class TaggedArticleList extends AccessibleArticleList
         );
         $this->getConditionBuilder()->add("article.articleID IN (
             SELECT  articleID
-            FROM    wcf" . WCF_N . "_article_content
+            FROM    wcf1_article_content
             WHERE   articleContentID IN ({$subselect['sql']})
         )", $subselect['parameters']);
     }
index 2af6d025a3bbd5de527fb9d4b27f21d389414034..ee6f8dde9554e5473241e0caca1c12be5276eaaa 100644 (file)
@@ -257,13 +257,13 @@ class ViewableArticle extends DatabaseObjectDecorator
                         $conditionBuilder->add('(article.time > tracked_visit.visitTime OR tracked_visit.visitTime IS NULL)');
 
                         $sql = "SELECT      COUNT(*)
-                                FROM        wcf" . WCF_N . "_article article
-                                LEFT JOIN   wcf" . WCF_N . "_tracked_visit tracked_visit
+                                FROM        wcf1_article article
+                                LEFT JOIN   wcf1_tracked_visit tracked_visit
                                 ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . "
                                         AND tracked_visit.objectID = article.articleID
                                         AND tracked_visit.userID = " . WCF::getUser()->userID . "
                                 " . $conditionBuilder;
-                        $statement = WCF::getDB()->prepareStatement($sql);
+                        $statement = WCF::getDB()->prepare($sql);
                         $statement->execute($conditionBuilder->getParameters());
                         self::$unreadArticles = $statement->fetchSingleColumn();
                     }
@@ -383,13 +383,13 @@ class ViewableArticle extends DatabaseObjectDecorator
         $conditionBuilder->add('(article.time > tracked_visit.visitTime OR tracked_visit.visitTime IS NULL)');
 
         $sql = "SELECT      COUNT(*)
-                FROM        wcf" . WCF_N . "_article article
-                LEFT JOIN   wcf" . WCF_N . "_tracked_visit tracked_visit
+                FROM        wcf1_article article
+                LEFT JOIN   wcf1_tracked_visit tracked_visit
                 ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . "
                         AND tracked_visit.objectID = article.articleID
                         AND tracked_visit.userID = " . WCF::getUser()->userID . "
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         return $statement->fetchSingleColumn();
@@ -424,13 +424,13 @@ class ViewableArticle extends DatabaseObjectDecorator
                         $conditionBuilder->add('(article.time > tracked_visit.visitTime OR tracked_visit.visitTime IS NULL)');
 
                         $sql = "SELECT      COUNT(*)
-                                FROM        wcf" . WCF_N . "_article article
-                                LEFT JOIN   wcf" . WCF_N . "_tracked_visit tracked_visit
+                                FROM        wcf1_article article
+                                LEFT JOIN   wcf1_tracked_visit tracked_visit
                                 ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . "
                                         AND tracked_visit.objectID = article.articleID
                                         AND tracked_visit.userID = " . WCF::getUser()->userID . "
                                 " . $conditionBuilder;
-                        $statement = WCF::getDB()->prepareStatement($sql);
+                        $statement = WCF::getDB()->prepare($sql);
                         $statement->execute($conditionBuilder->getParameters());
                         self::$unreadWatchedArticles = $statement->fetchSingleColumn();
                     }
index 361f991acfccea62e5c8f3d3519d4784cc97dbd1..f7c27db127b0078c328c42a0ad98607c34f01ffc 100644 (file)
@@ -57,7 +57,7 @@ class ViewableArticleList extends ArticleList
             }
             $this->sqlSelects .= 'tracked_visit.visitTime';
             $this->sqlJoins .= "
-                LEFT JOIN   wcf" . WCF_N . "_tracked_visit tracked_visit
+                LEFT JOIN   wcf1_tracked_visit tracked_visit
                 ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . "
                         AND tracked_visit.objectID = article.articleID
                         AND tracked_visit.userID = " . WCF::getUser()->userID;
@@ -68,7 +68,7 @@ class ViewableArticleList extends ArticleList
         }
         $this->sqlSelects .= "like_object.cachedReactions";
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_like_object like_object
+            LEFT JOIN   wcf1_like_object like_object
             ON          like_object.objectTypeID = " . ReactionHandler::getInstance()->getObjectType('com.woltlab.wcf.likeableArticle')->objectTypeID . "
                     AND like_object.objectID = article.articleID";
     }
index b203c54f7197e558d9c7eeb527574c1daff4d984..d8b686d7479541df8ebf775fcb974e4660343b50 100644 (file)
@@ -241,10 +241,10 @@ class ArticleCategory extends AbstractDecoratedCategory implements IAccessibleOb
                     $objectTypeID = UserObjectWatchHandler::getInstance()->getObjectTypeID('com.woltlab.wcf.article.category');
 
                     $sql = "SELECT  objectID
-                            FROM    wcf" . WCF_N . "_user_object_watch
+                            FROM    wcf1_user_object_watch
                             WHERE   objectTypeID = ?
                                 AND userID = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([$objectTypeID, WCF::getUser()->userID]);
                     self::$subscribedCategories = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
index b81347c42de21db58fe6f923fc4521cb914ef14c..1472b26c789ed4727a9d85526a0420f759aafc87 100644 (file)
@@ -39,10 +39,10 @@ class ArticleCategoryCache extends SingletonFactory
         }
 
         $sql = "SELECT      COUNT(*) AS count, categoryID
-                FROM        wcf" . WCF_N . "_article
+                FROM        wcf1_article
                 " . $conditionBuilder . "
                 GROUP BY    categoryID";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
         $articles = $statement->fetchMap('categoryID', 'count');
 
index 43b52731101e61a0476971f2779d61372f36b3d8..b7dabac60fa34274ad2dea2ea61773c640cf3206 100644 (file)
@@ -208,17 +208,17 @@ class ArticleContent extends DatabaseObject implements ILinkableObject, IRouteCo
     {
         if ($languageID !== null) {
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_article_content
+                    FROM    wcf1_article_content
                     WHERE   articleID = ?
                         AND languageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$articleID, $languageID]);
         } else {
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_article_content
+                    FROM    wcf1_article_content
                     WHERE   articleID = ?
                         AND languageID IS NULL";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$articleID]);
         }
 
index 3aea4be7abe75109e85d8408294f8d2cda0c0ef5..5e88e3699234adc31659e8d8cc69b74e6cd106d9 100644 (file)
@@ -34,7 +34,7 @@ class AdministrativeAttachmentList extends AttachmentList
 
         $this->sqlSelects = 'user_table.username';
         $this->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = attachment.userID";
     }
 
@@ -69,9 +69,9 @@ class AdministrativeAttachmentList extends AttachmentList
     {
         $fileTypes = [];
         $sql = "SELECT  DISTINCT attachment.fileType
-                FROM    wcf" . WCF_N . "_attachment attachment
+                FROM    wcf1_attachment attachment
                 " . $this->getConditionBuilder();
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($this->getConditionBuilder()->getParameters());
         while ($row = $statement->fetchArray()) {
             if ($row['fileType']) {
@@ -94,9 +94,9 @@ class AdministrativeAttachmentList extends AttachmentList
         $sql = "SELECT  COUNT(*) AS count,
                         COALESCE(SUM(attachment.filesize), 0) AS size,
                         COALESCE(SUM(downloads), 0) AS downloads
-                FROM    wcf" . WCF_N . "_attachment attachment
+                FROM    wcf1_attachment attachment
                 " . $this->getConditionBuilder();
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($this->getConditionBuilder()->getParameters());
 
         return $statement->fetchArray();
index 4fc95f9d6ae862e110ad945ad322f24cfe5d1563..be58fdddb7dd7036284ee688682bbffda17eaafc 100644 (file)
@@ -31,9 +31,9 @@ class AttachmentEditor extends DatabaseObjectEditor
      */
     public function delete()
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_attachment
+        $sql = "DELETE FROM wcf1_attachment
                 WHERE       attachmentID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->attachmentID]);
 
         $this->deleteFiles();
@@ -49,9 +49,9 @@ class AttachmentEditor extends DatabaseObjectEditor
         $conditionBuilder->add("attachmentID IN (?)", [$objectIDs]);
 
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_attachment
+                FROM    wcf1_attachment
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
         while ($attachment = $statement->fetchObject(static::$baseClass)) {
             $editor = new self($attachment);
index 6f38520a17daaa3b6e58e8661b0ac2008ba74a79..8100de9d724414a41c7102c93bf484741492297c 100644 (file)
@@ -53,7 +53,7 @@ class GroupedAttachmentList extends AttachmentList
         $this->getConditionBuilder()->add(
             '(
                 SELECT  DISTINCT embeddedObjectID
-                FROM    wcf' . WCF_N . '_message_embedded_object
+                FROM    wcf1_message_embedded_object
                 WHERE   messageObjectTypeID = ?
                     AND messageID = attachment.objectID
                     AND embeddedObjectTypeID = ?
index 09297e434e7b16aa8a54cf0b7a716b40e506e5f2..fe8f50bfdea5eda8cad11e1db1858bd50949d8b6 100644 (file)
@@ -103,9 +103,9 @@ class BBCode extends ProcessibleDatabaseObject implements IRouteController
     public static function getBBCodeByTag($tag)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_bbcode
+                FROM    wcf1_bbcode
                 WHERE   bbcodeTag = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$tag]);
         $row = $statement->fetchArray();
         if (!$row) {
index dd3a617b13a36ad79a6d9668d8929f2665ba4dee..e53369159ff92f1b47bbe150a8df8d800e6ef83b 100644 (file)
@@ -52,9 +52,9 @@ class BBCodeAction extends AbstractDatabaseObjectAction
 
         // add bbcode to BBCodeSelect user group options
         $sql = "SELECT  optionID
-                FROM    wcf" . WCF_N . "_user_group_option
+                FROM    wcf1_user_group_option
                 WHERE   optionType = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(['BBCodeSelect']);
         $optionIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -65,16 +65,16 @@ class BBCodeAction extends AbstractDatabaseObjectAction
             $conditionBuilder->add("optionValue <> ?", ['all']);
 
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_user_group_option_value
+                    FROM    wcf1_user_group_option_value
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
 
-            $sql = "UPDATE  wcf" . WCF_N . "_user_group_option_value
+            $sql = "UPDATE  wcf1_user_group_option_value
                     SET     optionValue = ?
                     WHERE   optionID = ?
                         AND groupID = ?";
-            $updateStatement = WCF::getDB()->prepareStatement($sql);
+            $updateStatement = WCF::getDB()->prepare($sql);
 
             WCF::getDB()->beginTransaction();
             while ($row = $statement->fetchArray()) {
index aedc4aeedea530dee4e02ecfe92f105584f6708a..f4b81a8fc8848438e37579c537a8f917bead673b 100644 (file)
@@ -61,9 +61,9 @@ class BlacklistEntry extends DatabaseObject
         }
 
         $sql = "SELECT  type, occurrences
-                FROM    wcf" . WCF_N . "_blacklist_entry
+                FROM    wcf1_blacklist_entry
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $matches = [];
         while ($row = $statement->fetchArray()) {
@@ -115,18 +115,18 @@ class BlacklistEntry extends DatabaseObject
             $percentile[$type] = 99999;
 
             $sql = "SELECT  COUNT(*) AS count
-                    FROM    wcf" . WCF_N . "_blacklist_entry
+                    FROM    wcf1_blacklist_entry
                     WHERE   type = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$type]);
             $count = $statement->fetchSingleColumn();
 
             if ($count > 0) {
                 $sql = "SELECT      occurrences
-                        FROM        wcf" . WCF_N . "_blacklist_entry
+                        FROM        wcf1_blacklist_entry
                         WHERE       type = ?
                         ORDER BY    occurrences DESC";
-                $statement = WCF::getDB()->prepareStatement($sql, 1, \round($count * 0.9));
+                $statement = WCF::getDB()->prepare($sql, 1, \round($count * 0.9));
                 $statement->execute([$type]);
 
                 $percentile[$type] = $statement->fetchSingleColumn();
index 07c9efae51568b5cd0b6da26803e420b40c7df45..8d4104e8487ede5eefc166b74787950c451faea9 100644 (file)
@@ -61,12 +61,12 @@ class BlacklistEntryAction extends AbstractDatabaseObjectAction
 
         $data = JSON::decode((string)$response->getBody());
         if (\is_array($data)) {
-            $sql = "INSERT INTO             wcf" . WCF_N . "_blacklist_entry
+            $sql = "INSERT INTO             wcf1_blacklist_entry
                                             (type, hash, lastSeen, occurrences)
                     VALUES                  (?, ?, ?, ?)
                     ON DUPLICATE KEY UPDATE lastSeen = VALUES(lastSeen),
                                             occurrences = VALUES(occurrences)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             $lastSeen = \preg_replace('~^(.+)T(.+)Z~', '$1 $2', $data['meta']['end']);
 
index 266f1605e550f1e7e1d7cec4761ba71c08664954..399f444c1d484f9f4d893392b68b46f1487ee7fb 100644 (file)
@@ -208,9 +208,9 @@ class Box extends DatabaseObject
             $this->boxContents = [];
 
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_box_content
+                    FROM    wcf1_box_content
                     WHERE   boxID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->boxID]);
             while ($row = $statement->fetchArray()) {
                 $this->boxContents[$row['languageID'] ?: 0] = new BoxContent(null, $row);
@@ -518,9 +518,9 @@ class Box extends DatabaseObject
     {
         if ($this->pageIDs === null) {
             $sql = "SELECT  pageID
-                    FROM    wcf" . WCF_N . "_box_to_page
+                    FROM    wcf1_box_to_page
                     WHERE   boxID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->boxID]);
 
             $this->pageIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
@@ -641,9 +641,9 @@ class Box extends DatabaseObject
     public static function getBoxByIdentifier($identifier)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_box
+                FROM    wcf1_box
                 WHERE   identifier = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$identifier]);
 
         return $statement->fetchObject(self::class);
@@ -658,9 +658,9 @@ class Box extends DatabaseObject
     public static function getBoxByName($name)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_box
+                FROM    wcf1_box
                 WHERE   name = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$name]);
 
         return $statement->fetchObject(self::class);
@@ -675,9 +675,9 @@ class Box extends DatabaseObject
     public static function getBoxByMenuID($menuID)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_box
+                FROM    wcf1_box
                 WHERE   menuID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$menuID]);
 
         return $statement->fetchObject(self::class);
index 8ef852e7f505e4ca3529e18c8fa70a86b2642910..f2a42417ed78c3509640528effe2d6c6c05d5400 100644 (file)
@@ -113,10 +113,10 @@ class BoxAction extends AbstractDatabaseObjectAction implements IToggleAction
 
         // save box to page
         if (!empty($this->parameters['pageIDs'])) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_box_to_page
+            $sql = "INSERT INTO wcf1_box_to_page
                                 (boxID, pageID, visible)
                     VALUES      (?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($this->parameters['pageIDs'] as $pageID) {
                 $statement->execute([
@@ -232,14 +232,14 @@ class BoxAction extends AbstractDatabaseObjectAction implements IToggleAction
 
         // save box to page
         if (isset($this->parameters['pageIDs'])) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_box_to_page
+            $sql = "DELETE FROM wcf1_box_to_page
                     WHERE       boxID = ?";
-            $deleteStatement = WCF::getDB()->prepareStatement($sql);
+            $deleteStatement = WCF::getDB()->prepare($sql);
 
-            $sql = "INSERT INTO wcf" . WCF_N . "_box_to_page
+            $sql = "INSERT INTO wcf1_box_to_page
                                 (boxID, pageID, visible)
                     VALUES      (?, ?, ?)";
-            $insertStatement = WCF::getDB()->prepareStatement($sql);
+            $insertStatement = WCF::getDB()->prepare($sql);
 
             foreach ($this->getObjects() as $box) {
                 $deleteStatement->execute([$box->boxID]);
index dc812ed8569492b59d1367a33770d47228653fff..0d3d503470c54ab716127d20b8dc407f09bb4dd5 100644 (file)
@@ -53,17 +53,17 @@ class BoxContent extends DatabaseObject
     {
         if ($languageID !== null) {
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_box_content
+                    FROM    wcf1_box_content
                     WHERE   boxID = ?
                         AND languageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$boxID, $languageID]);
         } else {
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_box_content
+                    FROM    wcf1_box_content
                     WHERE   boxID = ?
                         AND languageID IS NULL";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$boxID]);
         }
 
index 1fc4dc2ffac3027860ffd280e8b94e28161f3d83..51305684c694f6f12310bfa4d02219336b54346e 100644 (file)
@@ -88,9 +88,9 @@ class CategoryAction extends AbstractDatabaseObjectAction implements
                 $conditions->add('languageItem IN (?)', [$languageVariables]);
 
                 $sql = "SELECT  languageItemID
-                        FROM    wcf" . WCF_N . "_language_item
+                        FROM    wcf1_language_item
                         " . $conditions;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditions->getParameters());
                 $languageItemIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
index 8d3fa6d114ee4e84811826c8a5919332399145ae..900031db5f24d19c6ffee5732b411f8a96597ed4 100644 (file)
@@ -46,7 +46,7 @@ class CategoryEditor extends DatabaseObjectEditor implements IEditableCachedObje
                     WHERE   showOrder > ?
                         AND parentCategoryID = ?
                         AND objectTypeID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $this->showOrder,
                 $this->parentCategoryID,
@@ -62,7 +62,7 @@ class CategoryEditor extends DatabaseObjectEditor implements IEditableCachedObje
                             AND showOrder < ?
                             AND parentCategoryID = ?
                             AND objectTypeID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $showOrder,
                     $this->showOrder,
@@ -74,7 +74,7 @@ class CategoryEditor extends DatabaseObjectEditor implements IEditableCachedObje
                         FROM    " . static::getDatabaseTableName() . "
                         WHERE   objectTypeID = ?
                             AND parentCategoryID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $this->objectTypeID,
                     $this->parentCategoryID,
@@ -94,7 +94,7 @@ class CategoryEditor extends DatabaseObjectEditor implements IEditableCachedObje
                         WHERE   showOrder <= ?
                             AND showOrder > ?
                             AND objectTypeID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $showOrder,
                     $this->showOrder,
@@ -143,7 +143,7 @@ class CategoryEditor extends DatabaseObjectEditor implements IEditableCachedObje
                 SET     showOrder = showOrder - 1
                 WHERE   parentCategoryID = ?
                     AND showOrder > ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         foreach ($objectIDs as $categoryID) {
             $category = CategoryHandler::getInstance()->getCategory($categoryID);
@@ -172,7 +172,7 @@ class CategoryEditor extends DatabaseObjectEditor implements IEditableCachedObje
                 FROM    " . static::getDatabaseTableName() . "
                 WHERE   objectTypeID = ?
                     AND parentCategoryID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $parentCategoryID,
@@ -189,7 +189,7 @@ class CategoryEditor extends DatabaseObjectEditor implements IEditableCachedObje
                     WHERE   objectTypeID = ?
                         AND showOrder >= ?
                         AND parentCategoryID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $objectTypeID,
                 $showOrder,
index d67cec41de11befedbdc3df6047b3dcfcfe9971f..c6b5c2df1da1561126562af10bdb8c1328b40dc3 100644 (file)
@@ -74,11 +74,11 @@ class LikeableCommentResponseProvider extends AbstractObjectTypeProvider impleme
         $conditionBuilder = new PreparedStatementConditionBuilder();
         $conditionBuilder->add('comment_response.responseID IN (?)', [$responseIDs]);
         $sql = "SELECT      comment.objectTypeID, comment_response.responseID
-                FROM        wcf" . WCF_N . "_comment_response comment_response
-                LEFT JOIN   wcf" . WCF_N . "_comment comment
+                FROM        wcf1_comment_response comment_response
+                LEFT JOIN   wcf1_comment comment
                 ON          comment.commentID = comment_response.commentID
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
         $responses = $statement->fetchMap('responseID', 'objectTypeID');
 
index 1780ba85c29c701a7abd6d0ff5759dd444939327..9e750776d3bb373790c0599185b304ad6950a031 100644 (file)
@@ -151,10 +151,10 @@ class ContactOptionAction extends CustomOptionAction implements ISortableAction
      */
     public function updatePosition()
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_contact_option
+        $sql = "UPDATE  wcf1_contact_option
                 SET     showOrder = ?
                 WHERE   optionID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         $showOrder = 1;
         WCF::getDB()->beginTransaction();
index a7a12589f0a87c2ab84b8c26e675858163411d33..1142fa67ff0d2233687e4604ec98437bb49f7302 100644 (file)
@@ -97,10 +97,10 @@ class ContactRecipientAction extends AbstractDatabaseObjectAction implements ISo
      */
     public function updatePosition()
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_contact_recipient
+        $sql = "UPDATE  wcf1_contact_recipient
                 SET     showOrder = ?
                 WHERE   recipientID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         $showOrder = $this->parameters['data']['offset'];
         WCF::getDB()->beginTransaction();
index 011f30e42c267badd2bdcc00572755b1a5f020cc..25072ceb0c854f369a06eeb8b228ff9a1bb0b17a 100644 (file)
@@ -80,9 +80,9 @@ class CronjobEditor extends DatabaseObjectEditor implements IEditableCachedObjec
         // fetch data directly from database during framework installation
         if (!PACKAGE_ID) {
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_language_category
+                    FROM    wcf1_language_category
                     WHERE   languageCategory = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute(['wcf.acp.cronjob']);
             $languageCategory = $statement->fetchObject(LanguageCategory::class);
 
@@ -94,12 +94,12 @@ class CronjobEditor extends DatabaseObjectEditor implements IEditableCachedObjec
         }
 
         // save new descriptions
-        $sql = "INSERT INTO             wcf" . WCF_N . "_language_item
+        $sql = "INSERT INTO             wcf1_language_item
                                         (languageID, languageItem, languageItemValue, languageCategoryID, packageID)
                 VALUES                  (?, ?, ?, ?, ?)
                 ON DUPLICATE KEY UPDATE languageItemValue = VALUES(languageItemValue),
                                         languageCategoryID = VALUES(languageCategoryID)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         foreach ($languages as $language) {
             $value = $defaultValue;
@@ -150,9 +150,9 @@ class CronjobEditor extends DatabaseObjectEditor implements IEditableCachedObjec
     {
         // delete language items
         if (!empty($objectIDs)) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_language_item
+            $sql = "DELETE FROM wcf1_language_item
                     WHERE       languageItem = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             WCF::getDB()->beginTransaction();
             foreach ($objectIDs as $cronjobID) {
index 77092e5ee434a861e2edd1de1a4e5be275d681ac..a415abf729566f63b67e10272af5f409d89f7f50 100644 (file)
@@ -29,8 +29,8 @@ class CronjobLogEditor extends DatabaseObjectEditor
     public static function clearLogs()
     {
         // delete logs
-        $sql = "DELETE FROM wcf" . WCF_N . "_cronjob_log";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $sql = "DELETE FROM wcf1_cronjob_log";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
     }
 }
index 1e5ecc122d16c0df5af4eba10fa9087de90d910d..30bdb79f46d4b04dee5a40adc7cc74b7e3f7d5c9 100644 (file)
@@ -112,9 +112,9 @@ class LabelAction extends AbstractDatabaseObjectAction implements ISortableActio
                 $conditions->add("languageItem IN (?)", [$languageVariables]);
 
                 $sql = "SELECT  languageItemID
-                        FROM    wcf" . WCF_N . "_language_item
+                        FROM    wcf1_language_item
                         " . $conditions;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditions->getParameters());
                 $languageItemIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -159,10 +159,10 @@ class LabelAction extends AbstractDatabaseObjectAction implements ISortableActio
      */
     public function updatePosition()
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_label
+        $sql = "UPDATE  wcf1_label
                 SET     showOrder = ?
                 WHERE   labelID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         $showOrder = $this->parameters['data']['offset'];
 
index f50d1133e6ca843d827ec13fcc6a47ad5ca84374..a656591e9f1a3b4d2344ac97743e074fb7d3e6b2 100644 (file)
@@ -43,29 +43,29 @@ class LabelEditor extends DatabaseObjectEditor implements IEditableCachedObject
     {
         // shift back labels in old label group with higher showOrder
         if ($this->showOrder) {
-            $sql = "UPDATE  wcf" . WCF_N . "_label
+            $sql = "UPDATE  wcf1_label
                     SET     showOrder = showOrder - 1
                     WHERE   groupID = ?
                         AND showOrder >= ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->groupID, $this->showOrder]);
         }
 
         // shift labels in new label group with higher showOrder
         if ($showOrder) {
-            $sql = "UPDATE  wcf" . WCF_N . "_label
+            $sql = "UPDATE  wcf1_label
                     SET     showOrder = showOrder + 1
                     WHERE   groupID = ?
                         AND showOrder >= ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$groupID, $showOrder]);
         }
 
         // get maximum existing show order
         $sql = "SELECT  MAX(showOrder)
-                FROM    wcf" . WCF_N . "_label
+                FROM    wcf1_label
                 WHERE   groupID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$groupID]);
         $maxShowOrder = $statement->fetchSingleColumn() ?: 0;
 
index b410916c6a5aede4eff26f6fcddacd655bb862bb..8aa8a474a811eb239b3fd2869a8694cfd636be0c 100644 (file)
@@ -58,9 +58,9 @@ class LabelGroupAction extends AbstractDatabaseObjectAction
             $conditions->add('groupID IN (?)', [$this->objectIDs]);
 
             $sql = "SELECT  labelID
-                    FROM    wcf" . WCF_N . "_label
+                    FROM    wcf1_label
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             $labelIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -88,9 +88,9 @@ class LabelGroupAction extends AbstractDatabaseObjectAction
                 $conditions->add('languageItem IN (?)', [$languageVariables]);
 
                 $sql = "SELECT  languageItemID
-                        FROM    wcf" . WCF_N . "_language_item
+                        FROM    wcf1_language_item
                         " . $conditions;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditions->getParameters());
                 $languageItemIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
index 0e04537dcb598187210a3ddc3986ceb022821549..f4a2484bdc75ef0c83f7b0c29123414a17f4b567 100644 (file)
@@ -75,9 +75,9 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
         // get language items
         $sql = "SELECT  languageItem, languageItemValue, languageCustomItemValue,
                         languageUseCustomValue, languageCategoryID
-                FROM    wcf" . WCF_N . "_language_item
+                FROM    wcf1_language_item
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $items = [];
         while ($row = $statement->fetchArray()) {
@@ -139,11 +139,11 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
         $sql = "SELECT      languageItem,
                             " . ($exportCustomValues ? "CASE WHEN languageUseCustomValue > 0 THEN languageCustomItemValue ELSE languageItemValue END AS languageItemValue" : "languageItemValue") . ",
                             languageCategory
-                FROM        wcf" . WCF_N . "_language_item language_item
-                LEFT JOIN   wcf" . WCF_N . "_language_category language_category
+                FROM        wcf1_language_item language_item
+                LEFT JOIN   wcf1_language_category language_category
                 ON          language_category.languageCategoryID = language_item.languageCategoryID
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $items = [];
         while ($row = $statement->fetchArray()) {
@@ -177,11 +177,11 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
         $conditions->add("page.packageID = ?", [$packageID]);
         $conditions->add("page.originIsSystem = ?", [1]);
         $sql = "SELECT      page.identifier, page_content.title, page_content.content
-                FROM        wcf" . WCF_N . "_page page,
-                            wcf" . WCF_N . "_page_content page_content
+                FROM        wcf1_page page,
+                            wcf1_page_content page_content
                 " . $conditions . "
                 ORDER BY    page.identifier";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         while ($row = $statement->fetchArray()) {
             $pages[] = $row;
@@ -210,11 +210,11 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
         $conditions->add("box.packageID = ?", [$packageID]);
         $conditions->add("box.originIsSystem = ?", [1]);
         $sql = "SELECT      box.identifier, box_content.title, box_content.content
-                FROM        wcf" . WCF_N . "_box box,
-                            wcf" . WCF_N . "_box_content box_content
+                FROM        wcf1_box box,
+                            wcf1_box_content box_content
                 " . $conditions . "
                 ORDER BY    box.identifier";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         while ($row = $statement->fetchArray()) {
             $boxes[] = $row;
@@ -346,9 +346,9 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
         $conditions->add("languageCategory IN (?)", [\array_keys($usedCategories)]);
 
         $sql = "SELECT  languageCategoryID, languageCategory
-                FROM    wcf" . WCF_N . "_language_category
+                FROM    wcf1_language_category
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         while ($row = $statement->fetchArray()) {
             $usedCategories[$row['languageCategory']] = $row['languageCategoryID'];
@@ -454,9 +454,9 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
                 $conditions->add("(languageUseCustomValue = ? OR isCustomLanguageItem = ?)", [1, 1]);
 
                 $sql = "SELECT  languageItemID, languageItem, languageItemValue, isCustomLanguageItem
-                        FROM    wcf" . WCF_N . "_language_item
+                        FROM    wcf1_language_item
                         " . $conditions;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditions->getParameters());
                 $updateValues = $customLanguageItemIDs = [];
                 while ($row = $statement->fetchArray()) {
@@ -471,12 +471,12 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
                 }
 
                 if (!empty($updateValues)) {
-                    $sql = "UPDATE  wcf" . WCF_N . "_language_item
+                    $sql = "UPDATE  wcf1_language_item
                             SET     languageItemOldValue = languageItemValue,
                                     languageCustomItemDisableTime = ?,
                                     languageUseCustomValue = ?
                             WHERE   languageItemID = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
 
                     WCF::getDB()->beginTransaction();
                     foreach ($updateValues as $languageItemID) {
@@ -491,12 +491,12 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
 
                 // make custom language items normal ones
                 if (!empty($customLanguageItemIDs)) {
-                    $sql = "UPDATE  wcf" . WCF_N . "_language_item
+                    $sql = "UPDATE  wcf1_language_item
                             SET     isCustomLanguageItem = ?,
                                     languageItemOriginIsSystem = ?,
                                     packageID = ?
                             WHERE   languageItemID = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
 
                     WCF::getDB()->beginTransaction();
                     foreach ($updateValues as $languageItemID) {
@@ -523,7 +523,7 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
                     0,
                     -1
                 );
-                $sql = "INSERT" . (!$updateExistingItems ? " IGNORE" : "") . " INTO wcf" . WCF_N . "_language_item
+                $sql = "INSERT" . (!$updateExistingItems ? " IGNORE" : "") . " INTO wcf1_language_item
                                     (languageID, languageItem, languageItemValue, languageCategoryID" . ($packageID ? ", packageID" : "") . ")
                         VALUES      {$placeholders}";
 
@@ -541,7 +541,7 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
                     }
                 }
 
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($parameters);
             }
             WCF::getDB()->commitTransaction();
@@ -554,9 +554,9 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
             $conditions = new PreparedStatementConditionBuilder();
             $conditions->add("identifier IN (?)", [\array_keys($pageContents)]);
             $sql = "SELECT  pageID, identifier
-                    FROM    wcf" . WCF_N . "_page
+                    FROM    wcf1_page
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             while ($row = $statement->fetchArray()) {
                 $pageIDs[$row['identifier']] = $row['pageID'];
@@ -569,16 +569,16 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
                     WHERE               pageID = ?
                                     AND languageID = ?";
             $createLanguageVersionStatement = WCF::getDB()->prepare($sql);
-            $sql = "UPDATE  wcf" . WCF_N . "_page_content
+            $sql = "UPDATE  wcf1_page_content
                     SET     title = ?
                     WHERE   pageID = ?
                         AND languageID = ?";
-            $updateTitleStatement = WCF::getDB()->prepareStatement($sql);
-            $sql = "UPDATE  wcf" . WCF_N . "_page_content
+            $updateTitleStatement = WCF::getDB()->prepare($sql);
+            $sql = "UPDATE  wcf1_page_content
                     SET     content = ?
                     WHERE   pageID = ?
                         AND languageID = ?";
-            $updateContentStatement = WCF::getDB()->prepareStatement($sql);
+            $updateContentStatement = WCF::getDB()->prepare($sql);
 
             foreach ($pageContents as $identifier => $pageContent) {
                 if (!isset($pageIDs[$identifier])) {
@@ -611,28 +611,28 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
             $conditions = new PreparedStatementConditionBuilder();
             $conditions->add("identifier IN (?)", [\array_keys($boxContents)]);
             $sql = "SELECT  boxID, identifier
-                    FROM    wcf" . WCF_N . "_box
+                    FROM    wcf1_box
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             while ($row = $statement->fetchArray()) {
                 $boxIDs[$row['identifier']] = $row['boxID'];
             }
 
-            $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_box_content
+            $sql = "INSERT IGNORE INTO  wcf1_box_content
                                         (boxID, languageID)
                     VALUES              (?, ?)";
-            $createLanguageVersionStatement = WCF::getDB()->prepareStatement($sql);
-            $sql = "UPDATE  wcf" . WCF_N . "_box_content
+            $createLanguageVersionStatement = WCF::getDB()->prepare($sql);
+            $sql = "UPDATE  wcf1_box_content
                     SET     title = ?
                     WHERE   boxID = ?
                         AND languageID = ?";
-            $updateTitleStatement = WCF::getDB()->prepareStatement($sql);
-            $sql = "UPDATE  wcf" . WCF_N . "_box_content
+            $updateTitleStatement = WCF::getDB()->prepare($sql);
+            $sql = "UPDATE  wcf1_box_content
                     SET     content = ?
                     WHERE   boxID = ?
                         AND languageID = ?";
-            $updateContentStatement = WCF::getDB()->prepareStatement($sql);
+            $updateContentStatement = WCF::getDB()->prepare($sql);
 
             foreach ($boxContents as $identifier => $boxContent) {
                 if (!isset($boxIDs[$identifier])) {
@@ -836,12 +836,12 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
      */
     public function copy(Language $destination)
     {
-        $sql = "INSERT INTO wcf" . WCF_N . "_language_item
+        $sql = "INSERT INTO wcf1_language_item
                             (languageID, languageItem, languageItemValue, languageItemOriginIsSystem, languageCategoryID, packageID)
                 SELECT      ?, languageItem, languageItemValue, languageItemOriginIsSystem, languageCategoryID, packageID
-                FROM        wcf" . WCF_N . "_language_item
+                FROM        wcf1_language_item
                 WHERE       languageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $destination->languageID,
             $this->languageID,
@@ -886,10 +886,10 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
         // create remaining items
         if (!empty($items)) {
             // bypass LanguageItemEditor::create() for performance reasons
-            $sql = "INSERT INTO wcf" . WCF_N . "_language_item
+            $sql = "INSERT INTO wcf1_language_item
                                 (languageID, languageItem, languageItemValue, languageItemOriginIsSystem, languageCategoryID, packageID)
                     VALUES      (?, ?, ?, ?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($items as $itemName => $itemValue) {
                 $statement->execute([
@@ -916,9 +916,9 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
     public function setAsDefault()
     {
         // remove default flag from all languages
-        $sql = "UPDATE  wcf" . WCF_N . "_language
+        $sql = "UPDATE  wcf1_language
                 SET     isDefault = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([0]);
 
         // set current language as default language
@@ -942,9 +942,9 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
      */
     public static function enableMultilingualism(array $languageIDs = [])
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_language
+        $sql = "UPDATE  wcf1_language
                 SET     hasContent = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([0]);
 
         if (!empty($languageIDs)) {
@@ -958,10 +958,10 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
                 $statementParameters[] = $languageID;
             }
 
-            $sql = "UPDATE  wcf" . WCF_N . "_language
+            $sql = "UPDATE  wcf1_language
                     SET     hasContent = ?
                     WHERE   languageID IN (" . $sql . ")";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             \array_unshift($statementParameters, 1);
             $statement->execute($statementParameters);
         }
@@ -984,33 +984,33 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
     public static function copyLanguageContent($sourceLanguageID, $destinationLanguageID)
     {
         // article content
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_article_content
+        $sql = "INSERT IGNORE INTO  wcf1_article_content
                                     (articleID, languageID, title, teaser, content, imageID, hasEmbeddedObjects)
                 SELECT              articleID, ?, title, teaser, content, imageID, hasEmbeddedObjects
-                FROM                wcf" . WCF_N . "_article_content
+                FROM                wcf1_article_content
                 WHERE               languageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$destinationLanguageID, $sourceLanguageID]);
 
         // box content
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_box_content
+        $sql = "INSERT IGNORE INTO  wcf1_box_content
                                     (boxID, languageID, title, content, imageID, hasEmbeddedObjects)
                 SELECT              boxID, ?, title, content, imageID, hasEmbeddedObjects
-                FROM                wcf" . WCF_N . "_box_content
+                FROM                wcf1_box_content
                 WHERE               languageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$destinationLanguageID, $sourceLanguageID]);
 
         // create tpl files
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_box_content
+                FROM    wcf1_box_content
                 WHERE   boxID IN (
                             SELECT  boxID
-                            FROM    wcf" . WCF_N . "_box
+                            FROM    wcf1_box
                             WHERE   boxType = ?
                         )
                     AND languageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(['tpl', $destinationLanguageID]);
         while ($row = $statement->fetchArray()) {
             \file_put_contents(
@@ -1020,33 +1020,33 @@ class LanguageEditor extends DatabaseObjectEditor implements IEditableCachedObje
         }
 
         // media content
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_media_content
+        $sql = "INSERT IGNORE INTO  wcf1_media_content
                                     (mediaID, languageID, title, caption, altText)
                 SELECT              mediaID, ?, title, caption, altText
-                FROM                wcf" . WCF_N . "_media_content
+                FROM                wcf1_media_content
                 WHERE               languageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$destinationLanguageID, $sourceLanguageID]);
 
         // page content
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_page_content
+        $sql = "INSERT IGNORE INTO  wcf1_page_content
                                     (pageID, languageID, title, content, metaDescription, customURL, hasEmbeddedObjects)
                 SELECT              pageID, ?, title, content, metaDescription, CASE WHEN customURL <> '' THEN CONCAT(customURL, '_', ?) ELSE '' END, hasEmbeddedObjects
-                FROM                wcf" . WCF_N . "_page_content
+                FROM                wcf1_page_content
                 WHERE               languageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$destinationLanguageID, $destinationLanguageID, $sourceLanguageID]);
 
         // create tpl files
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_page_content
+                FROM    wcf1_page_content
                 WHERE   pageID IN (
                             SELECT  pageID
-                            FROM    wcf" . WCF_N . "_page
+                            FROM    wcf1_page
                             WHERE   pageType = ?
                         )
                     AND languageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(['tpl', $destinationLanguageID]);
         while ($row = $statement->fetchArray()) {
             \file_put_contents(
index b8fd20567603bf33ac0b6621de983373fb774912..732621baba6b434097acb3e0c8a637cce2273c5c 100644 (file)
@@ -70,11 +70,11 @@ class Like extends DatabaseObject
     public static function getLike($objectTypeID, $objectID, $userID)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_like
+                FROM    wcf1_like
                 WHERE   objectTypeID = ?
                     AND objectID = ?
                     AND userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $objectID,
index d687e43f4858ab120d797ec20e3be9f45a969cc4..31ace26e213a5ec7cff6a19b19d57c53380b087e 100644 (file)
@@ -73,11 +73,11 @@ class LikeAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
     public function getLikeDetails()
     {
         $sql = "SELECT      userID, likeValue
-                FROM        wcf" . WCF_N . "_like
+                FROM        wcf1_like
                 WHERE       objectID = ?
                         AND objectTypeID = ?
                 ORDER BY    time DESC";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $this->parameters['data']['objectID'],
             $this->objectType->objectTypeID,
@@ -252,10 +252,10 @@ class LikeAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
     {
         // fetch number of pages
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_like
+                FROM    wcf1_like
                 WHERE   objectID = ?
                     AND objectTypeID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $this->parameters['data']['objectID'],
             $this->objectType->objectTypeID,
@@ -263,11 +263,11 @@ class LikeAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
         $pageCount = \ceil($statement->fetchSingleColumn() / 20);
 
         $sql = "SELECT      userID, likeValue
-                FROM        wcf" . WCF_N . "_like
+                FROM        wcf1_like
                 WHERE       objectID = ?
                         AND objectTypeID = ?
                 ORDER BY    likeValue DESC, time DESC";
-        $statement = WCF::getDB()->prepareStatement($sql, 20, ($this->parameters['pageNo'] - 1) * 20);
+        $statement = WCF::getDB()->prepare($sql, 20, ($this->parameters['pageNo'] - 1) * 20);
         $statement->execute([
             $this->parameters['data']['objectID'],
             $this->objectType->objectTypeID,
index e2a5009d8820e532865ad0aeae8436219c8ed254..b48dbaa71cbd7e92d209e974d76f79033bacb5b4 100644 (file)
@@ -203,10 +203,10 @@ class LikeObject extends DatabaseObject
     public static function getLikeObject($objectTypeID, $objectID)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_like_object
+                FROM    wcf1_like_object
                 WHERE   objectTypeID = ?
                     AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $objectID,
index 8bc9f4e79a04991eb30353807199d9e8d0ec5c07..8ab39464e7350a25b5ce019af3576122337280ff 100644 (file)
@@ -206,9 +206,9 @@ class Media extends DatabaseObject implements ILinkableObject, IRouteController,
             ];
 
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_media_content
+                    FROM    wcf1_media_content
                     WHERE   mediaID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->mediaID]);
 
             while ($row = $statement->fetchArray()) {
index 132cbf195eef3ddee0cf4757eac7e2dabe024fb8..f0f63744b193ea4d714a7278bd42605b9f45c53c 100644 (file)
@@ -272,9 +272,9 @@ class MediaAction extends AbstractDatabaseObjectAction implements ISearchAction,
         $conditionBuilder->add('mediaID IN (?)', [$mediaList->getObjectIDs()]);
 
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_media_content
+                FROM    wcf1_media_content
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         $mediaData = [];
@@ -439,15 +439,15 @@ class MediaAction extends AbstractDatabaseObjectAction implements ISearchAction,
                 $isMultilingual = $this->parameters['data']['isMultilingual'];
             }
 
-            $sql = "DELETE FROM wcf" . WCF_N . "_media_content
+            $sql = "DELETE FROM wcf1_media_content
                     WHERE       mediaID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$media->mediaID]);
 
-            $sql = "INSERT INTO wcf" . WCF_N . "_media_content
+            $sql = "INSERT INTO wcf1_media_content
                                 (mediaID, languageID, title, caption, altText)
                     VALUES      (?, ?, ?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             if (!$isMultilingual) {
                 $languageID = $media->languageID;
@@ -726,10 +726,10 @@ class MediaAction extends AbstractDatabaseObjectAction implements ISearchAction,
         $conditionBuilder = new PreparedStatementConditionBuilder();
         $conditionBuilder->add('mediaID IN (?)', [$this->objectIDs]);
 
-        $sql = "UPDATE  wcf" . WCF_N . "_media
+        $sql = "UPDATE  wcf1_media
                 SET     categoryID = ?
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge(
             [$this->parameters['categoryID'] ?: null],
             $conditionBuilder->getParameters()
index 9da29dca3a714aea3a77cc9d8bf1a4526fcc3475..685655cc3880f49011a8ceeb385041aeb3a0c8ab 100644 (file)
@@ -40,7 +40,7 @@ class MediaList extends DatabaseObjectList
         $searchString = '%' . \addcslashes($searchString, '_%') . '%';
 
         $this->sqlConditionJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_media_content media_content
+            LEFT JOIN   wcf1_media_content media_content
             ON          media_content.mediaID = media.mediaID';
 
         $conditionBuilder = new PreparedStatementConditionBuilder(false, 'OR');
index a64274a7c677f6af566d63deb77bafe36411ef8a..237f5304352bf49af2d18e21022b1bad09f08d07 100644 (file)
@@ -41,7 +41,7 @@ class ViewableMediaList extends MediaList
         // fetch content data
         $this->sqlSelects .= "media_content.*, COALESCE(media.languageID, " . $languageID . ") AS localizedLanguageID";
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_media_content media_content
+            LEFT JOIN   wcf1_media_content media_content
             ON          media_content.mediaID = media.mediaID
                     AND media_content.languageID = COALESCE(media.languageID, " . $languageID . ")";
     }
index 4fff17874a071d41076adf64c9b227e8f6ec55b5..304a7f535652beffbbedd627425ea4b35380d8cf 100644 (file)
@@ -44,16 +44,16 @@ class MenuEditor extends DatabaseObjectEditor implements IEditableCachedObject
         if (\is_array($title)) {
             if (\count($title) > 1) {
                 $sql = "SELECT  languageCategoryID
-                        FROM    wcf" . WCF_N . "_language_category
+                        FROM    wcf1_language_category
                         WHERE   languageCategory = ?";
-                $statement = WCF::getDB()->prepareStatement($sql, 1);
+                $statement = WCF::getDB()->prepare($sql, 1);
                 $statement->execute(['wcf.menu']);
                 $languageCategoryID = $statement->fetchSingleColumn();
 
-                $sql = "INSERT INTO wcf" . WCF_N . "_language_item
+                $sql = "INSERT INTO wcf1_language_item
                                     (languageID, languageItem, languageItemValue, languageItemOriginIsSystem, languageCategoryID, packageID)
                         VALUES      (?, ?, ?, ?, ?, ?)";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
 
                 WCF::getDB()->beginTransaction();
                 foreach ($title as $languageCode => $value) {
@@ -93,9 +93,9 @@ class MenuEditor extends DatabaseObjectEditor implements IEditableCachedObject
             $menuList->readObjects();
 
             if (\count($menuList)) {
-                $sql = "DELETE FROM wcf" . WCF_N . "_language_item
+                $sql = "DELETE FROM wcf1_language_item
                         WHERE       languageItem = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
 
                 WCF::getDB()->beginTransaction();
                 foreach ($menuList as $menu) {
index 55e11b51fce30f165b842d7243128d3c24f1136d..f8c10a03a901eb80a10a3695f86ed10e2e0127f2 100644 (file)
@@ -116,11 +116,11 @@ class MenuItemAction extends AbstractDatabaseObjectAction implements ISortableAc
      */
     public function updatePosition()
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_menu_item
+        $sql = "UPDATE  wcf1_menu_item
                 SET     parentItemID = ?,
                         showOrder = ?
                 WHERE   itemID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         WCF::getDB()->beginTransaction();
         foreach ($this->parameters['data']['structure'] as $parentItemID => $children) {
index c1477fa0482cea1ae2fd8c679d037375471e384a..df678947e9044550897340d26dc0efb16c7a511f 100644 (file)
@@ -44,16 +44,16 @@ class MenuItemEditor extends DatabaseObjectEditor implements IEditableCachedObje
         if (\is_array($title)) {
             if (\count($title) > 1) {
                 $sql = "SELECT  languageCategoryID
-                        FROM    wcf" . WCF_N . "_language_category
+                        FROM    wcf1_language_category
                         WHERE   languageCategory = ?";
-                $statement = WCF::getDB()->prepareStatement($sql, 1);
+                $statement = WCF::getDB()->prepare($sql, 1);
                 $statement->execute(['wcf.menu']);
                 $languageCategoryID = $statement->fetchSingleColumn();
 
-                $sql = "INSERT INTO wcf" . WCF_N . "_language_item
+                $sql = "INSERT INTO wcf1_language_item
                                     (languageID, languageItem, languageItemValue, languageItemOriginIsSystem, languageCategoryID, packageID)
                         VALUES      (?, ?, ?, ?, ?, ?)";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
 
                 WCF::getDB()->beginTransaction();
                 foreach ($title as $languageCode => $value) {
@@ -93,9 +93,9 @@ class MenuItemEditor extends DatabaseObjectEditor implements IEditableCachedObje
             $menuItemList->readObjects();
 
             if (\count($menuItemList)) {
-                $sql = "DELETE FROM wcf" . WCF_N . "_language_item
+                $sql = "DELETE FROM wcf1_language_item
                         WHERE       languageItem = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
 
                 WCF::getDB()->beginTransaction();
                 foreach ($menuItemList as $menuItem) {
index 60f13741ce3d0db4d543ef0a21302c9e431a0306..719913050d7f17d5a870600f5dd0802ea35bdc3a 100644 (file)
@@ -82,10 +82,10 @@ class ModerationQueue extends DatabaseObject
         }
 
         $sql = "SELECT  isAffected
-                FROM    wcf" . WCF_N . "_moderation_queue_to_user
+                FROM    wcf1_moderation_queue_to_user
                 WHERE   queueID = ?
                     AND userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $this->queueID,
             $user->userID,
index 83b87d1c52cc13eff45c9f14b2064d143a32ed59..5d84b5b5b744063c1d309260a0a452448a7f89c7 100644 (file)
@@ -88,10 +88,10 @@ class ModerationQueueAction extends AbstractDatabaseObjectAction
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("queueID IN (?)", [$queueIDs]);
 
-        $sql = "UPDATE  wcf" . WCF_N . "_moderation_queue
+        $sql = "UPDATE  wcf1_moderation_queue
                 SET     status = " . ModerationQueue::STATUS_DONE . "
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         // reset number of active moderation queue items
@@ -154,16 +154,16 @@ class ModerationQueueAction extends AbstractDatabaseObjectAction
         $conditions->add("(moderation_queue.time > tracked_visit.visitTime OR tracked_visit.visitTime IS NULL)");
 
         $sql = "SELECT      moderation_queue.queueID
-                FROM        wcf" . WCF_N . "_moderation_queue_to_user moderation_queue_to_user
-                LEFT JOIN   wcf" . WCF_N . "_moderation_queue moderation_queue
+                FROM        wcf1_moderation_queue_to_user moderation_queue_to_user
+                LEFT JOIN   wcf1_moderation_queue moderation_queue
                 ON          moderation_queue.queueID = moderation_queue_to_user.queueID
-                LEFT JOIN   wcf" . WCF_N . "_tracked_visit tracked_visit
+                LEFT JOIN   wcf1_tracked_visit tracked_visit
                 ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.moderation.queue') . "
                         AND tracked_visit.objectID = moderation_queue.queueID
                         AND tracked_visit.userID = " . WCF::getUser()->userID . "
                 " . $conditions . "
                 ORDER BY    moderation_queue.lastChangeTime DESC";
-        $statement = WCF::getDB()->prepareStatement($sql, $MAX_ITEMS);
+        $statement = WCF::getDB()->prepare($sql, $MAX_ITEMS);
         $statement->execute($conditions->getParameters());
         $queueIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
index 4deebf0adc951dbabce58b5105671ca00c6e33e6..f03f72fa4bec7305f59b52d76e2eab8c72721b41 100644 (file)
@@ -43,12 +43,12 @@ class ViewableModerationQueueList extends ModerationQueueList
         parent::__construct();
 
         $this->sqlSelects = "moderation_queue.*, assigned_user.username AS assignedUsername, user_table.username";
-        $this->sqlConditionJoins = ", wcf" . WCF_N . "_moderation_queue moderation_queue";
-        $this->sqlJoins = ", wcf" . WCF_N . "_moderation_queue moderation_queue";
+        $this->sqlConditionJoins = ", wcf1_moderation_queue moderation_queue";
+        $this->sqlJoins = ", wcf1_moderation_queue moderation_queue";
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user assigned_user
+            LEFT JOIN   wcf1_user assigned_user
             ON          assigned_user.userID = moderation_queue.assignedUserID
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = moderation_queue.userID";
         $this->getConditionBuilder()->add("moderation_queue_to_user.queueID = moderation_queue.queueID");
         $this->getConditionBuilder()->add("moderation_queue_to_user.userID = ?", [WCF::getUser()->userID]);
index 81cadf923c15dcee1f336919e6655e5aa7ceb8a3..c2eedc270230298d67698ea38987802a17ba29e8 100644 (file)
@@ -96,9 +96,9 @@ class Notice extends DatabaseObject implements IRouteController
                 $dismissedNotices = UserStorageHandler::getInstance()->getField('dismissedNotices');
                 if ($dismissedNotices === null) {
                     $sql = "SELECT  noticeID
-                            FROM    wcf" . WCF_N . "_notice_dismissed
+                            FROM    wcf1_notice_dismissed
                             WHERE   userID = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([
                         WCF::getUser()->userID,
                     ]);
index 136e9ff0dbc3f20360d3b5e306d6c3c94f2f73c1..117a4fcc736be1b5bb7d7373a438ea6bc82c35c2 100644 (file)
@@ -83,10 +83,10 @@ class NoticeAction extends AbstractDatabaseObjectAction implements ISortableActi
     public function dismiss()
     {
         if (WCF::getUser()->userID) {
-            $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_notice_dismissed
+            $sql = "INSERT IGNORE INTO  wcf1_notice_dismissed
                                         (noticeID, userID)
                     VALUES              (?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 \reset($this->objectIDs),
                 WCF::getUser()->userID,
@@ -162,10 +162,10 @@ class NoticeAction extends AbstractDatabaseObjectAction implements ISortableActi
      */
     public function updatePosition()
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_notice
+        $sql = "UPDATE  wcf1_notice
                 SET     showOrder = ?
                 WHERE   noticeID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         $showOrder = $this->parameters['data']['offset'];
         WCF::getDB()->beginTransaction();
index 090fefd94dcf396823820f9ea9fff25555a5b9f9..f74e3ecce2ec285edd9c5b713a5c627dfd1fdc71 100644 (file)
@@ -35,8 +35,8 @@ class NoticeEditor extends DatabaseObjectEditor implements IEditableCachedObject
     public function setShowOrder($showOrder = 0)
     {
         $sql = "SELECT  MAX(showOrder)
-                FROM    wcf" . WCF_N . "_notice";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_notice";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $maxShowOrder = $statement->fetchSingleColumn();
         if (!$maxShowOrder) {
@@ -47,10 +47,10 @@ class NoticeEditor extends DatabaseObjectEditor implements IEditableCachedObject
             $newShowOrder = $maxShowOrder + 1;
         } else {
             // shift other notices
-            $sql = "UPDATE  wcf" . WCF_N . "_notice
+            $sql = "UPDATE  wcf1_notice
                     SET     showOrder = showOrder + 1
                     WHERE   showOrder >= ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $showOrder,
             ]);
index d7e3bf47c262983b377fe692c8971e3eff035ab0..ffa7d43c9fb2c0e381d007835f9bcd9f5875ea86 100644 (file)
@@ -75,7 +75,7 @@ class Option extends DatabaseObject
     {
         $sql = "SELECT  *
                 FROM    " . self::getDatabaseTableName();
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         $options = [];
@@ -95,7 +95,7 @@ class Option extends DatabaseObject
         $sql = "SELECT  *
                 FROM    " . self::getDatabaseTableName() . "
                 WHERE   optionName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$optionName]);
 
         return $statement->fetchObject(static::class);
index dece6ba6638a68e4bd54242fd0afa745323c07a4..a5fbf0f13d4dac3167aaf773c970ad26a0fa57ef 100644 (file)
@@ -45,8 +45,8 @@ class OptionEditor extends DatabaseObjectEditor implements IEditableCachedObject
     {
         // get option ids
         $sql = "SELECT  optionName, optionID
-                FROM    wcf" . WCF_N . "_option";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_option";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $optionIDs = $statement->fetchMap('optionName', 'optionID');
 
@@ -68,19 +68,19 @@ class OptionEditor extends DatabaseObjectEditor implements IEditableCachedObject
     public static function updateAll(array $options)
     {
         $sql = "SELECT  optionID, optionName, optionValue
-                FROM    wcf" . WCF_N . "_option
+                FROM    wcf1_option
                 WHERE   optionName IN (?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(['cache_source_type', 'visitor_use_tiny_build']);
         $oldValues = [];
         while ($row = $statement->fetchArray()) {
             $oldValues[$row['optionID']] = $row;
         }
 
-        $sql = "UPDATE  wcf" . WCF_N . "_option
+        $sql = "UPDATE  wcf1_option
                 SET     optionValue = ?
                 WHERE   optionID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         $flushCache = false;
         $flushPermissions = false;
index 8bee55aeb6778ee30c0ba1f504b1267e0251bdce..f31588a7545cc42548f6531c3b799b197a40e3f3 100644 (file)
@@ -288,8 +288,8 @@ class Package extends DatabaseObject implements ILinkableObject, IRouteControlle
     {
         if (self::$requirements === null) {
             $sql = "SELECT  packageID, requirement
-                    FROM    wcf" . WCF_N . "_package_requirement";
-            $statement = WCF::getDB()->prepareStatement($sql);
+                    FROM    wcf1_package_requirement";
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute();
 
             self::$requiredPackageIDs = [];
@@ -317,9 +317,9 @@ class Package extends DatabaseObject implements ILinkableObject, IRouteControlle
     public static function isAlreadyInstalled($package)
     {
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_package
+                FROM    wcf1_package
                 WHERE   package = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$package]);
 
         return $statement->fetchSingleColumn() > 0;
index 13432bb014cf1cee5b713a9af014b23feb5f1bbc..96943b960a9660fe645077a96fd38053008270ef 100644 (file)
@@ -34,8 +34,8 @@ class PackageInstallationQueue extends DatabaseObject
     public static function getNewProcessNo()
     {
         $sql = "SELECT  MAX(processNo) AS processNo
-                FROM    wcf" . WCF_N . "_package_installation_queue";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_package_installation_queue";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $row = $statement->fetchArray();
 
index 1371c38bf07421a15937379e7a70fb7b483eac75..226684533841a4c2cde8febbc8c12e84c6858e22 100644 (file)
@@ -94,12 +94,12 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
 
         // find matching packages
         $sql = "SELECT      package_update.packageUpdateID
-                FROM        wcf" . WCF_N . "_package_update package_update
-                LEFT JOIN   wcf" . WCF_N . "_package package
+                FROM        wcf1_package_update package_update
+                LEFT JOIN   wcf1_package package
                 ON          package.package = package_update.package
                 " . $conditions . "
                 ORDER BY    package_update.packageName ASC";
-        $statement = WCF::getDB()->prepareStatement($sql, 1000);
+        $statement = WCF::getDB()->prepare($sql, 1000);
         $statement->execute($conditions->getParameters());
         $packageUpdateIDs = [];
         while ($row = $statement->fetchArray()) {
@@ -124,16 +124,16 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
 
         // get installed packages
         $sql = "SELECT  package, packageVersion
-                FROM    wcf" . WCF_N . "_package";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_package";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $installedPackages = $statement->fetchMap('package', 'packageVersion');
 
         // get excluded packages (of installed packages)
         $excludedPackagesOfInstalledPackages = [];
         $sql = "SELECT  excludedPackage, excludedPackageVersion
-                FROM    wcf" . WCF_N . "_package_exclusion";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_package_exclusion";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             if (!isset($excludedPackagesOfInstalledPackages[$row['excludedPackage']])) {
@@ -184,9 +184,9 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("packageUpdateID IN (?)", [\array_keys($packageUpdates)]);
         $sql = "SELECT  packageUpdateID, packageUpdateServerID, package
-                FROM    wcf" . WCF_N . "_package_update
+                FROM    wcf1_package_update
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $possiblePackages = [];
         while ($row = $statement->fetchArray()) {
@@ -233,9 +233,9 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
                 $conditions->add("packageUpdateVersionID IN (?)", [$packageUpdateVersionIDs]);
 
                 $sql = "SELECT  packageUpdateVersionID, packageUpdateID, packageVersion
-                        FROM    wcf" . WCF_N . "_package_update_version
+                        FROM    wcf1_package_update_version
                         " . $conditions;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditions->getParameters());
                 $packageVersions = [];
                 while ($row = $statement->fetchArray()) {
@@ -289,15 +289,15 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
         $conditions->add(
             "packageUpdateVersionID IN (
                 SELECT  packageUpdateVersionID
-                FROM    wcf" . WCF_N . "_package_update_version
+                FROM    wcf1_package_update_version
                 WHERE   packageUpdateID = ?
             )",
             [$packageUpdateID]
         );
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_package_update_exclusion
+                FROM    wcf1_package_update_exclusion
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $excludedPackages = [];
         while ($row = $statement->fetchArray()) {
@@ -321,11 +321,11 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("puv.packageUpdateID IN (?)", [$packageUpdateID]);
         $sql = "SELECT      pu.package, puv.packageUpdateVersionID, puv.packageUpdateID, puv.packageVersion, puv.isAccessible
-                FROM        wcf" . WCF_N . "_package_update_version puv
-                LEFT JOIN   wcf" . WCF_N . "_package_update pu
+                FROM        wcf1_package_update_version puv
+                LEFT JOIN   wcf1_package_update pu
                 ON          pu.packageUpdateID = puv.packageUpdateID
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $packageVersions = [];
         while ($row = $statement->fetchArray()) {
@@ -440,9 +440,9 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
         // validate dependencies
         foreach ($packageUpdates as $packageUpdateData) {
             $sql = "SELECT  package, minversion
-                    FROM    wcf" . WCF_N . "_package_update_requirement
+                    FROM    wcf1_package_update_requirement
                     WHERE   packageUpdateVersionID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$packageUpdateData['accessible']]);
             $requirements = [];
             while ($row = $statement->fetchArray()) {
@@ -468,9 +468,9 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
             $conditions = new PreparedStatementConditionBuilder();
             $conditions->add("package IN (?)", [\array_keys($requirements)]);
             $sql = "SELECT  packageUpdateID, package
-                    FROM    wcf" . WCF_N . "_package_update
+                    FROM    wcf1_package_update
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             while ($row = $statement->fetchArray()) {
                 if (!\in_array($row['package'], $openRequirements)) {
@@ -512,9 +512,9 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
         $conditions->add("packageUpdateID IN (?)", [\array_keys($updateData)]);
 
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_package_update
+                FROM    wcf1_package_update
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $packageUpdates = $packageVersionIDs = [];
         while ($packageUpdate = $statement->fetchObject(PackageUpdate::class)) {
@@ -531,9 +531,9 @@ class PackageUpdateAction extends AbstractDatabaseObjectAction
         $conditions->add("packageUpdateVersionID IN (?)", [$packageVersionIDs]);
 
         $sql = "SELECT  packageUpdateVersionID, packageVersion, packageDate, license, licenseURL
-                FROM    wcf" . WCF_N . "_package_update_version
+                FROM    wcf1_package_update_version
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         /** @var PackageUpdateVersion[] $updateVersions */
index 07698a998243991def66b8d6f975980cee7d0f92..203feede0f947af8cc4c01136993fd009c7aba92 100644 (file)
@@ -407,18 +407,18 @@ class PackageUpdateServer extends DatabaseObject
     public static function resetAll(): void
     {
         // purge package cache
-        WCF::getDB()->prepareStatement("DELETE FROM wcf" . WCF_N . "_package_update")->execute();
+        WCF::getDB()->prepare("DELETE FROM wcf1_package_update")->execute();
 
         PackageUpdateCacheBuilder::getInstance()->reset();
 
         // reset servers into their original state
-        $sql = "UPDATE  wcf" . WCF_N . "_package_update_server
+        $sql = "UPDATE  wcf1_package_update_server
                 SET     lastUpdateTime = ?,
                         status = ?,
                         errorMessage = ?,
                         apiVersion = ?,
                         metaData = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             0,
             'online',
index cd4c66bcf90787528ca985d7094c517d513494c5..fa4ca02247d54a3a79bd0b33f642f25f4f2413eb 100644 (file)
@@ -34,7 +34,7 @@ class PackageUpdateServerList extends DatabaseObjectList
         }
         $this->sqlSelects .= "(
             SELECT  COUNT(*)
-            FROM    wcf" . WCF_N . "_package_update
+            FROM    wcf1_package_update
             WHERE   packageUpdateServerID = " . $this->getDatabaseTableAlias() . ".packageUpdateServerID
         ) AS packages";
 
index 347d1e1040f639991d7154443bb018dbfa56f749..361dfec009da099c7d50173538cf46f83db3023e 100644 (file)
@@ -127,9 +127,9 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject
             $this->pageContents = [];
 
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_page_content
+                    FROM    wcf1_page_content
                     WHERE   pageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->pageID]);
             while ($row = $statement->fetchArray()) {
                 $this->pageContents[$row['languageID'] ?: 0] = new PageContent(null, $row);
@@ -157,9 +157,9 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject
         }
 
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_page_content
+                FROM    wcf1_page_content
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql, 1);
+        $statement = WCF::getDB()->prepare($sql, 1);
         $statement->execute($conditions->getParameters());
         $row = $statement->fetchSingleRow();
         if ($row !== false) {
@@ -285,10 +285,10 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject
         }
 
         WCF::getDB()->beginTransaction();
-        $sql = "UPDATE  wcf" . WCF_N . "_application
+        $sql = "UPDATE  wcf1_application
                 SET     landingPageID = ?
                 WHERE   packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $this->pageID,
             1,
@@ -317,9 +317,9 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject
     {
         if ($this->boxIDs === null) {
             $sql = "SELECT  boxID
-                    FROM    wcf" . WCF_N . "_box_to_page
+                    FROM    wcf1_box_to_page
                     WHERE   pageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->pageID]);
             $this->boxIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
         }
@@ -368,9 +368,9 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject
             $this->pageLanguages = [];
             if ($this->isMultilingual) {
                 $sql = "SELECT  languageID
-                        FROM    wcf" . WCF_N . "_page_content
+                        FROM    wcf1_page_content
                         WHERE   pageID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([$this->pageID]);
                 while ($languageID = $statement->fetchColumn()) {
                     if (LanguageFactory::getInstance()->getLanguage($languageID) !== null) {
@@ -403,9 +403,9 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject
     public static function getPageByIdentifier($identifier)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_page
+                FROM    wcf1_page
                 WHERE   identifier = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$identifier]);
 
         return $statement->fetchObject(self::class);
@@ -420,9 +420,9 @@ class Page extends DatabaseObject implements ILinkableObject, ITitledObject
     public static function getPageByName($name)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_page
+                FROM    wcf1_page
                 WHERE   name = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$name]);
 
         return $statement->fetchObject(self::class);
index 88fc65f79cd3fd5811120c636100fa88fcb80ca4..a7eb85cb652e7038f0e8d3b873bf0b33feaeacbd 100644 (file)
@@ -135,10 +135,10 @@ class PageAction extends AbstractDatabaseObjectAction implements ISearchAction,
 
         // save box to page assignments
         if (!empty($this->parameters['boxToPage'])) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_box_to_page
+            $sql = "INSERT INTO wcf1_box_to_page
                                 (boxID, pageID, visible)
                     VALUES      (?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($this->parameters['boxToPage'] as $boxData) {
                 $statement->execute([
@@ -265,14 +265,14 @@ class PageAction extends AbstractDatabaseObjectAction implements ISearchAction,
 
         // save box to page assignments
         if (isset($this->parameters['boxToPage'])) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_box_to_page
+            $sql = "DELETE FROM wcf1_box_to_page
                     WHERE       pageID = ?";
-            $deleteStatement = WCF::getDB()->prepareStatement($sql);
+            $deleteStatement = WCF::getDB()->prepare($sql);
 
-            $sql = "INSERT INTO wcf" . WCF_N . "_box_to_page
+            $sql = "INSERT INTO wcf1_box_to_page
                                 (boxID, pageID, visible)
                     VALUES      (?, ?, ?)";
-            $insertStatement = WCF::getDB()->prepareStatement($sql);
+            $insertStatement = WCF::getDB()->prepare($sql);
 
             foreach ($this->getObjects() as $page) {
                 $deleteStatement->execute([$page->pageID]);
@@ -359,11 +359,11 @@ class PageAction extends AbstractDatabaseObjectAction implements ISearchAction,
     public function search()
     {
         $sql = "SELECT      pageID
-                FROM        wcf" . WCF_N . "_page
+                FROM        wcf1_page
                 WHERE       name LIKE ?
                         AND requireObjectID = ?
                 ORDER BY    name";
-        $statement = WCF::getDB()->prepareStatement($sql, 5);
+        $statement = WCF::getDB()->prepare($sql, 5);
         $statement->execute([
             '%' . $this->parameters['searchString'] . '%',
             0,
@@ -453,9 +453,9 @@ class PageAction extends AbstractDatabaseObjectAction implements ISearchAction,
         $conditions->add("boxID IN (?)", [$seenBoxIDs]);
 
         $sql = "SELECT  boxID
-                FROM    wcf" . WCF_N . "_box
+                FROM    wcf1_box
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $validBoxIDs = [];
         while ($boxID = $statement->fetchColumn()) {
@@ -476,15 +476,15 @@ class PageAction extends AbstractDatabaseObjectAction implements ISearchAction,
     {
         $pageID = $this->pageEditor->getDecoratedObject()->pageID;
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_page_box_order
+        $sql = "DELETE FROM wcf1_page_box_order
                 WHERE       pageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$pageID]);
 
-        $sql = "INSERT INTO wcf" . WCF_N . "_page_box_order
+        $sql = "INSERT INTO wcf1_page_box_order
                             (pageID, boxID, showOrder)
                 VALUES      (?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         WCF::getDB()->beginTransaction();
         foreach ($this->parameters['position'] as $boxIDs) {
@@ -514,9 +514,9 @@ class PageAction extends AbstractDatabaseObjectAction implements ISearchAction,
      */
     public function resetPosition()
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_page_box_order
+        $sql = "DELETE FROM wcf1_page_box_order
                 WHERE       pageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->pageEditor->getDecoratedObject()->pageID]);
     }
 }
index 197b175767b9ec7b4aa60d615af0dcdd0ab9dffb..de5c97ab3d41ed4e5747a65e2e8816de78934cf8 100644 (file)
@@ -86,10 +86,10 @@ class PageEditor extends DatabaseObjectEditor implements IEditableCachedObject
 
         // check custom controller urls
         $sql = "SELECT  COUNT(*) AS count
-                FROM    wcf" . WCF_N . "_page
+                FROM    wcf1_page
                 WHERE   controllerCustomURL = ?
                     AND applicationPackageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$customURL, $packageID]);
         if ($statement->fetchSingleColumn()) {
             return false;
@@ -97,14 +97,14 @@ class PageEditor extends DatabaseObjectEditor implements IEditableCachedObject
 
         // check custom urls
         $sql = "SELECT  COUNT(*) AS count
-                FROM    wcf" . WCF_N . "_page_content
+                FROM    wcf1_page_content
                 WHERE   customURL = ?
                     AND pageID IN (
                         SELECT  pageID
-                        FROM    wcf" . WCF_N . "_page
+                        FROM    wcf1_page
                         WHERE   applicationPackageID = ?
                     )";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$customURL, $packageID]);
         if ($statement->fetchSingleColumn()) {
             return false;
index 78f1cb845040e568f87d55444c75b462f839be1a..0e9727d1ceb440776c6b5afc869383f5f712a8bc 100644 (file)
@@ -111,17 +111,17 @@ class PageContent extends DatabaseObject implements ITitledLinkObject
     {
         if ($languageID !== null) {
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_page_content
+                    FROM    wcf1_page_content
                     WHERE   pageID = ?
                         AND languageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$pageID, $languageID]);
         } else {
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_page_content
+                    FROM    wcf1_page_content
                     WHERE   pageID = ?
                         AND languageID IS NULL";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$pageID]);
         }
 
index 51de2b32e03f6689d40cf67769bb72a60f20070c..e960759384c19165647ef9330b1e74fc73ea4354 100644 (file)
@@ -33,8 +33,8 @@ class PaidSubscriptionEditor extends DatabaseObjectEditor implements IEditableCa
     public function setShowOrder($showOrder = 0)
     {
         $sql = "SELECT  MAX(showOrder)
-                FROM    wcf" . WCF_N . "_paid_subscription";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_paid_subscription";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $maxShowOrder = $statement->fetchSingleColumn();
         if (!$maxShowOrder) {
@@ -45,10 +45,10 @@ class PaidSubscriptionEditor extends DatabaseObjectEditor implements IEditableCa
             $newShowOrder = $maxShowOrder + 1;
         } else {
             // shift other subscriptions
-            $sql = "UPDATE  wcf" . WCF_N . "_paid_subscription
+            $sql = "UPDATE  wcf1_paid_subscription
                     SET     showOrder = showOrder + 1
                     WHERE   showOrder >= ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $showOrder,
             ]);
index ee5496faf692f627323fca72dd601a4d89038ac7..acb0fed99386358dfa83c18e6e72f865c9d0a75c 100644 (file)
@@ -99,10 +99,10 @@ class PaidSubscriptionTransactionLog extends DatabaseObject
     public static function getLogByTransactionID($paymentMethodObjectTypeID, $transactionID)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_paid_subscription_transaction_log
+                FROM    wcf1_paid_subscription_transaction_log
                 WHERE   paymentMethodObjectTypeID = ?
                     AND transactionID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$paymentMethodObjectTypeID, $transactionID]);
         $row = $statement->fetchArray();
         if ($row !== false) {
index c3a5878806fff6be1500a66e1b447f8769aa1810..b7128a6677644c5141a8e5a266d732aa07413cfd 100644 (file)
@@ -89,10 +89,10 @@ class PaidSubscriptionUser extends DatabaseObject
     public static function getSubscriptionUser($subscriptionID, $userID)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_paid_subscription_user
+                FROM    wcf1_paid_subscription_user
                 WHERE   subscriptionID = ?
                     AND userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$subscriptionID, $userID]);
         $row = $statement->fetchArray();
         if ($row !== false) {
index 5b182596f7a24b07edf3e9dc64663ccfed5069fa..b6edba8ff2d7b5ba620965fb2b57e7286a89eb00 100644 (file)
@@ -55,10 +55,10 @@ class PollAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
         $poll = parent::create();
 
         // create options
-        $sql = "INSERT INTO wcf" . WCF_N . "_poll_option
+        $sql = "INSERT INTO wcf1_poll_option
                             (pollID, optionValue, showOrder)
                 VALUES      (?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         WCF::getDB()->beginTransaction();
         foreach ($this->parameters['options'] as $showOrder => $option) {
@@ -117,10 +117,10 @@ class PollAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
 
             // check if new options should be created
             if (!empty($newOptions)) {
-                $sql = "INSERT INTO wcf" . WCF_N . "_poll_option
+                $sql = "INSERT INTO wcf1_poll_option
                                     (pollID, optionValue, showOrder)
                         VALUES      (?, ?, ?)";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 foreach ($newOptions as $option) {
                     $statement->execute([
                         $pollEditor->pollID,
@@ -132,11 +132,11 @@ class PollAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
 
             // check if existing options should be updated
             if (!empty($updateOptions)) {
-                $sql = "UPDATE  wcf" . WCF_N . "_poll_option
+                $sql = "UPDATE  wcf1_poll_option
                         SET     optionValue = ?,
                                 showOrder = ?
                         WHERE   optionID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 foreach ($updateOptions as $optionID => $option) {
                     $statement->execute([
                         $option['optionValue'],
@@ -148,9 +148,9 @@ class PollAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
 
             // check if options should be removed
             if (!empty($options)) {
-                $sql = "DELETE FROM wcf" . WCF_N . "_poll_option
+                $sql = "DELETE FROM wcf1_poll_option
                         WHERE       optionID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 foreach ($options as $option) {
                     $statement->execute([$option->optionID]);
                 }
@@ -396,10 +396,10 @@ class PollAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
     {
         // get options
         $sql = "SELECT      optionID, optionValue
-                FROM        wcf" . WCF_N . "_poll_option
+                FROM        wcf1_poll_option
                 WHERE       pollID = ?
                 ORDER BY    " . ($this->poll->sortByVotes ? "votes DESC" : "showOrder ASC");
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->poll->pollID]);
         $options = [];
         while ($row = $statement->fetchArray()) {
@@ -408,9 +408,9 @@ class PollAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
 
         // get votes
         $sql = "SELECT  userID, optionID
-                FROM    wcf" . WCF_N . "_poll_option_vote
+                FROM    wcf1_poll_option_vote
                 WHERE   pollID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->poll->pollID]);
         $voteData = $statement->fetchMap('optionID', 'userID', false);
 
@@ -452,10 +452,10 @@ class PollAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
 
         // get poll
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_poll
+                FROM    wcf1_poll
                 WHERE   objectTypeID = ?
                     AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $sourceObjectType->objectTypeID,
             $this->parameters['sourceObjectID'],
@@ -501,12 +501,12 @@ class PollAction extends AbstractDatabaseObjectAction implements IGroupedUserLis
         // copy votes
         WCF::getDB()->beginTransaction();
         foreach ($newOptionIDs as $oldOptionID => $newOptionID) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_poll_option_vote
+            $sql = "INSERT INTO wcf1_poll_option_vote
                                 (pollID, optionID, userID)
                     SELECT      " . $newPoll->pollID . ", " . $newOptionID . ", userID
-                    FROM        wcf" . WCF_N . "_poll_option_vote
+                    FROM        wcf1_poll_option_vote
                     WHERE       optionID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$oldOptionID]);
         }
         WCF::getDB()->commitTransaction();
index adb2cb72ba4826b936e162eade6cd279c0e9835a..38b433d6c29a72967f157a11dade70fe789108fa 100644 (file)
@@ -29,25 +29,25 @@ class PollEditor extends DatabaseObjectEditor
     public function calculateVotes()
     {
         // update option votes
-        $sql = "UPDATE  wcf" . WCF_N . "_poll_option poll_option
+        $sql = "UPDATE  wcf1_poll_option poll_option
                 SET     poll_option.votes = (
                             SELECT  COUNT(*)
-                            FROM    wcf" . WCF_N . "_poll_option_vote
+                            FROM    wcf1_poll_option_vote
                             WHERE   optionID = poll_option.optionID
                         )
                 WHERE   poll_option.pollID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->pollID]);
 
         // update total count
-        $sql = "UPDATE  wcf" . WCF_N . "_poll poll
+        $sql = "UPDATE  wcf1_poll poll
                 SET     poll.votes = (
                             SELECT  COUNT(DISTINCT userID)
-                            FROM    wcf" . WCF_N . "_poll_option_vote
+                            FROM    wcf1_poll_option_vote
                             WHERE   pollID = poll.pollID
                         )
                 WHERE   poll.pollID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->pollID]);
     }
 
@@ -56,10 +56,10 @@ class PollEditor extends DatabaseObjectEditor
      */
     public function increaseVotes()
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_poll
+        $sql = "UPDATE  wcf1_poll
                 SET     votes = votes + 1
                 WHERE   pollID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->pollID]);
     }
 }
index 9179012e63ede48f5822a3c3d0e7339dc65b02cc..fc75cc6af02b836caaf40f3e1ceb6a88c931b7e8 100644 (file)
@@ -308,10 +308,10 @@ class ReactionAction extends AbstractDatabaseObjectAction
 
         // get like object
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_like_object
+                FROM    wcf1_like_object
                 WHERE   objectTypeID = ?
                     AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $sourceObjectType->objectTypeID,
             $this->parameters['sourceObjectID'],
@@ -332,13 +332,13 @@ class ReactionAction extends AbstractDatabaseObjectAction
         // step 2) copy
         //
 
-        $sql = "INSERT INTO wcf" . WCF_N . "_like
+        $sql = "INSERT INTO wcf1_like
                             (objectID, objectTypeID, objectUserID, userID, time, likeValue, reactionTypeID)
                 SELECT      " . $this->parameters['targetObjectID'] . ", " . $targetObjectType->objectTypeID . ", objectUserID, userID, time, likeValue, reactionTypeID
-                FROM        wcf" . WCF_N . "_like
+                FROM        wcf1_like
                 WHERE       objectTypeID = ?
                         AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $sourceObjectType->objectTypeID,
             $this->parameters['sourceObjectID'],
@@ -350,10 +350,10 @@ class ReactionAction extends AbstractDatabaseObjectAction
 
         if ($newLikeObject->objectUserID) {
             $sql = "SELECT  COUNT(*) as count
-                    FROM    wcf" . WCF_N . "_like
+                    FROM    wcf1_like
                     WHERE   objectTypeID = ?
                         AND objectID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $targetObjectType->objectTypeID,
                 $this->parameters['targetObjectID'],
index 7100f160d04c0150f9c916f1fca356234be5012b..8bb62098d16c9b2849d97f760715ecf21d767a7c 100644 (file)
@@ -48,10 +48,10 @@ class ReactionTypeAction extends AbstractDatabaseObjectAction implements ISortab
     public function create()
     {
         if (isset($this->parameters['data']['showOrder']) && $this->parameters['data']['showOrder'] !== null) {
-            $sql = "UPDATE  wcf" . WCF_N . "_reaction_type
+            $sql = "UPDATE  wcf1_reaction_type
                     SET     showOrder = showOrder + 1
                     WHERE   showOrder >= ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $this->parameters['data']['showOrder'],
             ]);
@@ -155,20 +155,20 @@ class ReactionTypeAction extends AbstractDatabaseObjectAction implements ISortab
 
             // update show order
             if (isset($this->parameters['data']['showOrder']) && $this->parameters['data']['showOrder'] !== null) {
-                $sql = "UPDATE  wcf" . WCF_N . "_reaction_type
+                $sql = "UPDATE  wcf1_reaction_type
                         SET     showOrder = showOrder + 1
                         WHERE   showOrder >= ?
                         AND     reactionTypeID <> ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $this->parameters['data']['showOrder'],
                     $object->reactionTypeID,
                 ]);
 
-                $sql = "UPDATE  wcf" . WCF_N . "_reaction_type
+                $sql = "UPDATE  wcf1_reaction_type
                         SET     showOrder = showOrder - 1
                         WHERE   showOrder > ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $object->showOrder,
                 ]);
@@ -228,10 +228,10 @@ class ReactionTypeAction extends AbstractDatabaseObjectAction implements ISortab
     {
         $returnValues = parent::delete();
 
-        $sql = "UPDATE  wcf" . WCF_N . "_reaction_type
+        $sql = "UPDATE  wcf1_reaction_type
                 SET     showOrder = showOrder - 1
                 WHERE   showOrder > ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($this->getObjects() as $object) {
             $statement->execute([
                 $object->showOrder,
index 706d72ff0d5ed03ac4dac08841fc97702f74e1a0..460b7d9b56d92c02bbe36eb566f0308478015f99 100644 (file)
@@ -51,10 +51,10 @@ class SearchKeywordAction extends AbstractDatabaseObjectAction implements ISearc
 
         // find users
         $sql = "SELECT      *
-                FROM        wcf" . WCF_N . "_search_keyword
+                FROM        wcf1_search_keyword
                 WHERE       keyword LIKE ?
                 ORDER BY    searches DESC";
-        $statement = WCF::getDB()->prepareStatement($sql, 10);
+        $statement = WCF::getDB()->prepare($sql, 10);
         $statement->execute([$this->parameters['data']['searchString'] . '%']);
         while ($row = $statement->fetchArray()) {
             $list[] = [
@@ -72,12 +72,12 @@ class SearchKeywordAction extends AbstractDatabaseObjectAction implements ISearc
      */
     public function registerSearch()
     {
-        $sql = "INSERT INTO             wcf" . WCF_N . "_search_keyword
+        $sql = "INSERT INTO             wcf1_search_keyword
                                         (keyword, searches, lastSearchTime)
                 VALUES                  (?, ?, ?)
                 ON DUPLICATE KEY UPDATE searches = searches + VALUES(searches),
                                         lastSearchTime = VALUES(lastSearchTime)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             \mb_substr($this->parameters['data']['keyword'], 0, 191),
             ($this->parameters['data']['searches'] ?? 1),
index 53dbdcd8477bd817e6b9470f3342c69dfa9277cd..f291189ed60598ae25e058f9c5c548bbf576333c 100644 (file)
@@ -83,32 +83,32 @@ class StatDailyAction extends AbstractDatabaseObjectAction
         $limit = 0;
         if ($this->parameters['dateGrouping'] == 'yearly') {
             $sql = "SELECT      MIN(date) AS date, SUM(counter) AS counter, MAX(total) AS total, objectTypeID
-                    FROM        wcf" . WCF_N . "_stat_daily
+                    FROM        wcf1_stat_daily
                     " . $conditionBuilder . "
                     GROUP BY    EXTRACT(YEAR FROM date), objectTypeID
                     ORDER BY    date";
         } elseif ($this->parameters['dateGrouping'] == 'monthly') {
             $sql = "SELECT      MIN(date) AS date, SUM(counter) AS counter, MAX(total) AS total, objectTypeID
-                    FROM        wcf" . WCF_N . "_stat_daily
+                    FROM        wcf1_stat_daily
                     " . $conditionBuilder . "
                     GROUP BY    EXTRACT(YEAR_MONTH FROM date), objectTypeID
                     ORDER BY    date";
         } elseif ($this->parameters['dateGrouping'] == 'weekly') {
             $sql = "SELECT      MIN(date) AS date, SUM(counter) AS counter, MAX(total) AS total, objectTypeID
-                    FROM        wcf" . WCF_N . "_stat_daily
+                    FROM        wcf1_stat_daily
                     " . $conditionBuilder . "
                     GROUP BY    EXTRACT(YEAR FROM date), EXTRACT(WEEK FROM date), objectTypeID
                     ORDER BY    date";
             $limit = 260;
         } else {
             $sql = "SELECT      *
-                    FROM        wcf" . WCF_N . "_stat_daily
+                    FROM        wcf1_stat_daily
                     " . $conditionBuilder . "
                     ORDER BY    date";
             $limit = 365;
         }
 
-        $statement = WCF::getDB()->prepareStatement($sql, $limit);
+        $statement = WCF::getDB()->prepare($sql, $limit);
         $statement->execute($conditionBuilder->getParameters());
         while ($row = $statement->fetchArray()) {
             $value = $row['counter'];
index 536e6247344bbac2b1c2eea0187621d602976051..af31c0b97eb01e6a09477ccf5cdcca1b3d5ed999 100644 (file)
@@ -189,12 +189,12 @@ class Style extends DatabaseObject
         }
 
         $sql = "SELECT      variable.variableName, variable.defaultValue, variable.defaultValueDarkMode, value.variableValue, value.variableValueDarkMode
-                FROM        wcf" . WCF_N . "_style_variable variable
-                LEFT JOIN   wcf" . WCF_N . "_style_variable_value value
+                FROM        wcf1_style_variable variable
+                LEFT JOIN   wcf1_style_variable_value value
                 ON          value.variableID = variable.variableID
                         AND value.styleID = ?
                 ORDER BY    variable.variableID ASC";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->styleID]);
         while ($row = $statement->fetchArray()) {
             $variableName = $row['variableName'];
index 1f15ff8cb9c515117720d6461a4401aedc2e27f1..3b26cef5417d0980c359cf62a02a7f6f0d3b4a62 100644 (file)
@@ -539,10 +539,10 @@ BROWSERCONFIG;
     {
         // get unique style name
         $sql = "SELECT  styleName
-                FROM    wcf" . WCF_N . "_style
+                FROM    wcf1_style
                 WHERE   styleName LIKE ?
                     AND styleID <> ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $this->styleEditor->styleName . '%',
             $this->styleEditor->styleID,
@@ -589,18 +589,18 @@ BROWSERCONFIG;
             $styleDescription = 'wcf.style.styleDescription' . $newStyle->styleID;
 
             // delete any phrases that were the result of an import
-            $sql = "DELETE FROM wcf" . WCF_N . "_language_item
+            $sql = "DELETE FROM wcf1_language_item
                     WHERE       languageItem = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$styleDescription]);
 
             // copy language items
-            $sql = "INSERT INTO wcf" . WCF_N . "_language_item
+            $sql = "INSERT INTO wcf1_language_item
                                 (languageID, languageItem, languageItemValue, languageItemOriginIsSystem, languageCategoryID, packageID)
                     SELECT      languageID, '" . $styleDescription . "', languageItemValue, 0, languageCategoryID, packageID
-                    FROM        wcf" . WCF_N . "_language_item
+                    FROM        wcf1_language_item
                     WHERE       languageItem = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$newStyle->styleDescription]);
 
             // update style description
index 8161861fe4f69f31640b867959d124a49d7aa36c..861a5557f60752be001e573d4cac464a68caa660 100644 (file)
@@ -115,9 +115,9 @@ final class StyleEditor extends DatabaseObjectEditor implements IEditableCachedO
         }
 
         // delete language items
-        $sql = "DELETE FROM wcf" . WCF_N . "_language_item
+        $sql = "DELETE FROM wcf1_language_item
                 WHERE       languageItem = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(['wcf.style.styleDescription' . $this->styleID]);
     }
 
@@ -168,10 +168,10 @@ final class StyleEditor extends DatabaseObjectEditor implements IEditableCachedO
     public function setAsDefault()
     {
         // remove old default
-        $sql = "UPDATE  wcf" . WCF_N . "_style
+        $sql = "UPDATE  wcf1_style
                 SET     isDefault = ?
                 WHERE   isDefault = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([0, 1]);
 
         // set new default
@@ -205,13 +205,13 @@ final class StyleEditor extends DatabaseObjectEditor implements IEditableCachedO
     public function getImplicitVariables()
     {
         $sql = "SELECT      variable.variableName
-                FROM        wcf" . WCF_N . "_style_variable variable
-                LEFT JOIN   wcf" . WCF_N . "_style_variable_value variable_value
+                FROM        wcf1_style_variable variable
+                LEFT JOIN   wcf1_style_variable_value variable_value
                 ON          variable_value.variableID = variable.variableID
                         AND variable_value.styleID = ?
                 WHERE       variable.variableName LIKE ?
                         AND variable_value.variableValue IS NULL";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $this->styleID,
             'wcf%',
@@ -497,9 +497,9 @@ final class StyleEditor extends DatabaseObjectEditor implements IEditableCachedO
                 $i = 1;
                 while (true) {
                     $sql = "SELECT  COUNT(*)
-                            FROM    wcf" . WCF_N . "_template_group
+                            FROM    wcf1_template_group
                             WHERE   templateGroupName = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([$templateGroupName]);
                     if (!$statement->fetchSingleColumn()) {
                         break;
@@ -512,9 +512,9 @@ final class StyleEditor extends DatabaseObjectEditor implements IEditableCachedO
                 $i = 1;
                 while (true) {
                     $sql = "SELECT  COUNT(*)
-                            FROM    wcf" . WCF_N . "_template_group
+                            FROM    wcf1_template_group
                             WHERE   templateGroupFolderName = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([
                         FileUtil::addTrailingSlash($templateGroupFolderName),
                     ]);
@@ -576,10 +576,10 @@ final class StyleEditor extends DatabaseObjectEditor implements IEditableCachedO
                 foreach ($packageToTemplates as $package => $templates) {
                     // try to find package
                     $sql = "SELECT  *
-                            FROM    wcf" . WCF_N . "_package
+                            FROM    wcf1_package
                             WHERE   package = ?
                                 AND isApplication = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([
                         $package,
                         1,
@@ -838,10 +838,10 @@ final class StyleEditor extends DatabaseObjectEditor implements IEditableCachedO
     protected static function saveLocalizedDescriptions(self $styleEditor, array $descriptions)
     {
         // localize package information
-        $sql = "REPLACE INTO    wcf" . WCF_N . "_language_item
+        $sql = "REPLACE INTO    wcf1_language_item
                                 (languageID, languageItem, languageItemValue, languageCategoryID, packageID)
                 VALUES          (?, ?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         // get language list
         $languageList = new LanguageList();
@@ -850,9 +850,9 @@ final class StyleEditor extends DatabaseObjectEditor implements IEditableCachedO
         // workaround for WCFSetup
         if (!PACKAGE_ID) {
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_language_category
+                    FROM    wcf1_language_category
                     WHERE   languageCategory = ?";
-            $statement2 = WCF::getDB()->prepareStatement($sql);
+            $statement2 = WCF::getDB()->prepare($sql);
             $statement2->execute(['wcf.style']);
             $languageCategory = $statement2->fetchObject(LanguageCategory::class);
         } else {
@@ -941,11 +941,11 @@ final class StyleEditor extends DatabaseObjectEditor implements IEditableCachedO
 
         // fetch style description
         $sql = "SELECT      language.languageCode, language_item.languageItemValue
-                FROM        wcf" . WCF_N . "_language_item language_item
-                LEFT JOIN   wcf" . WCF_N . "_language language
+                FROM        wcf1_language_item language_item
+                LEFT JOIN   wcf1_language language
                 ON          language.languageID = language_item.languageID
                 WHERE       language_item.languageItem = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->styleDescription]);
         $styleDescriptions = $statement->fetchMap('languageCode', 'languageItemValue');
 
@@ -1071,11 +1071,11 @@ final class StyleEditor extends DatabaseObjectEditor implements IEditableCachedO
             // append templates to tar
             // get templates
             $sql = "SELECT      template.*, package.package
-                    FROM        wcf" . WCF_N . "_template template
-                    LEFT JOIN   wcf" . WCF_N . "_package package
+                    FROM        wcf1_template template
+                    LEFT JOIN   wcf1_package package
                     ON          package.packageID = template.packageID
                     WHERE       template.templateGroupID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->templateGroupID]);
             while ($row = $statement->fetchArray()) {
                 $packageDir = 'com.woltlab.wcf';
@@ -1308,9 +1308,9 @@ final class StyleEditor extends DatabaseObjectEditor implements IEditableCachedO
 
         // check if no default style is defined
         $sql = "SELECT  styleID
-                FROM    wcf" . WCF_N . "_style
+                FROM    wcf1_style
                 WHERE   isDefault = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([1]);
         $row = $statement->fetchArray();
 
index 955e90071d02dcf381283447918e4058ddcb116e..6d6f2d2a706e607708e0a4ec1c9ad730e5038697 100644 (file)
@@ -31,10 +31,10 @@ class Tag extends DatabaseObject implements IRouteController
     public static function getTag($name, $languageID = 0)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_tag
+                FROM    wcf1_tag
                 WHERE   languageID = ?
                     AND name = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$languageID, $name]);
 
         return $statement->fetchObject(self::class);
index 77167a6f08f0fe14465a827eac909884a96ebec8..cd0dfbb58b301a665af20e27e3b1af48babf7c1c 100644 (file)
@@ -89,9 +89,9 @@ class TagAction extends AbstractDatabaseObjectAction implements ISearchAction
 
         // find tags
         $sql = "SELECT  tagID, name
-                FROM    wcf" . WCF_N . "_tag
+                FROM    wcf1_tag
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql, 5);
+        $statement = WCF::getDB()->prepare($sql, 5);
         $statement->execute($conditionBuilder->getParameters());
         while ($row = $statement->fetchArray()) {
             $list[] = [
index 5a1692bbc2edbabcedbf58748cc87ad501871bb9..617a9ff95bce2d2c47b25fd443b187827a4067de 100644 (file)
@@ -35,16 +35,16 @@ class TagEditor extends DatabaseObjectEditor
         }
 
         // assign all associations for the synonym with this tag
-        $sql = "UPDATE IGNORE   wcf" . WCF_N . "_tag_to_object
+        $sql = "UPDATE IGNORE   wcf1_tag_to_object
                 SET             tagID = ?
                 WHERE           tagID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->tagID, $synonym->tagID]);
 
         // remove remaining associations (object was tagged with both tags => duplicate key previously ignored)
-        $sql = "DELETE FROM wcf" . WCF_N . "_tag_to_object
+        $sql = "DELETE FROM wcf1_tag_to_object
                 WHERE       tagID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$synonym->tagID]);
 
         $editor = new self($synonym);
index a1a30af1abbf63f59dbaea893e0b6d997cf9c466..ebc4f89dd46f11dcaf7e296db413c072866dcfd8 100644 (file)
@@ -39,13 +39,13 @@ class Template extends DatabaseObject
         if ($id !== null) {
             $sql = "SELECT      template.*, template_group.templateGroupFolderName,
                                 package.package
-                    FROM        wcf" . WCF_N . "_template template
-                    LEFT JOIN   wcf" . WCF_N . "_template_group template_group
+                    FROM        wcf1_template template
+                    LEFT JOIN   wcf1_template_group template_group
                     ON          template_group.templateGroupID = template.templateGroupID
-                    LEFT JOIN   wcf" . WCF_N . "_package package
+                    LEFT JOIN   wcf1_package package
                     ON          package.packageID = template.packageID
                     WHERE       template.templateID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$id]);
             $row = $statement->fetchArray();
 
index ace4f6c587b32ed0c7b8a3e50b371ec42a070aab..3370b9cd8ab87ca296795a0f95924ae45066a111 100644 (file)
@@ -72,9 +72,9 @@ class TemplateEditor extends DatabaseObjectEditor
         if ($templateGroupID != $this->templateGroupID) {
             // get folder name
             $sql = "SELECT  templateGroupFolderName
-                    FROM    wcf" . WCF_N . "_template_group
+                    FROM    wcf1_template_group
                     WHERE   templateGroupID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$templateGroupID]);
             $row = $statement->fetchArray();
             $this->object->data['templateGroupFolderName'] = $row['templateGroupFolderName'];
@@ -98,9 +98,9 @@ class TemplateEditor extends DatabaseObjectEditor
     {
         $this->deleteFile();
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_template
+        $sql = "DELETE FROM wcf1_template
                 WHERE       templateID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->templateID]);
     }
 
index 06694ba0d1e3405e70ae3d2389db97f365f45c4b..14d3356c77bf42d84b2f468a916899e9dd7ba154 100644 (file)
@@ -33,9 +33,9 @@ class TemplateList extends DatabaseObjectList
 
         $this->sqlSelects = 'package.package, template_group.templateGroupFolderName';
         $this->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_package package
+            LEFT JOIN   wcf1_package package
             ON          package.packageID = template.packageID
-            LEFT JOIN   wcf" . WCF_N . "_template_group template_group
+            LEFT JOIN   wcf1_template_group template_group
             ON          template_group.templateGroupID = template.templateGroupID";
     }
 }
index 1e218826f0b1af74bb9ef31d8fdda4bbfdbe8f61..c3e2e90c05642f10b91e8aa5c6f8e56dd67727c9 100644 (file)
@@ -84,9 +84,9 @@ class TemplateGroup extends DatabaseObject implements ITitledObject
             self::$templateGroupStructure = [];
 
             $sql = "SELECT      *
-                    FROM        wcf" . WCF_N . "_template_group
+                    FROM        wcf1_template_group
                     ORDER BY    templateGroupName ASC";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute();
             while ($row = $statement->fetchArray()) {
                 self::$templateGroupStructure[$row['parentTemplateGroupID'] ?: 0][] = new self(null, $row);
index 12ad7aa044cbaf75eed2098dc00be13004790dfe..34f99aacd9d06e43edd49ffd92cc9c3cf280a72c 100644 (file)
@@ -69,9 +69,9 @@ class TemplateGroupAction extends AbstractDatabaseObjectAction
 
         // validate name
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_template_group
+                FROM    wcf1_template_group
                 WHERE   templateGroupName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->parameters['templateGroupName']]);
 
         if ($statement->fetchSingleColumn()) {
@@ -84,9 +84,9 @@ class TemplateGroupAction extends AbstractDatabaseObjectAction
         }
 
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_template_group
+                FROM    wcf1_template_group
                 WHERE   templateGroupFolderName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->parameters['templateGroupFolderName']]);
 
         if ($statement->fetchSingleColumn()) {
index c1aea4893988aa264bdc85a13eb7b4e4766c6407..76ea1d9e5ffd5aa9a0be157b760feaae937691b8 100644 (file)
@@ -43,10 +43,10 @@ class TemplateGroupEditor extends DatabaseObjectEditor implements IEditableCache
 
             // check template group folders in other applications
             $sql = "SELECT  DISTINCT application
-                    FROM    wcf" . WCF_N . "_template
+                    FROM    wcf1_template
                     WHERE   templateGroupID = ?
                         AND application <> ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->templateGroupID, 'wcf']);
             while ($row = $statement->fetchArray()) {
                 $application = ApplicationHandler::getInstance()->getApplication($row['application']);
@@ -87,10 +87,10 @@ class TemplateGroupEditor extends DatabaseObjectEditor implements IEditableCache
 
         // check template group folders in other applications
         $sql = "SELECT  DISTINCT application
-                FROM    wcf" . WCF_N . "_template
+                FROM    wcf1_template
                 WHERE   templateGroupID = ?
                     AND application <> ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->templateGroupID, 'wcf']);
         while ($row = $statement->fetchArray()) {
             $application = ApplicationHandler::getInstance()->getApplication($row['application']);
index 0b07345605ccd60d43338108b729559e73f55261..73b32a6a6a3b6c11fdb9da7b5fbd2a27fc3c41ce 100644 (file)
@@ -85,9 +85,9 @@ class TrophyAction extends AbstractDatabaseObjectAction implements IToggleAction
             $userTrophyList->sqlJoins .= ' ';
         }
         $userTrophyList->sqlJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_trophy trophy
+            LEFT JOIN   wcf1_trophy trophy
             ON          user_trophy.trophyID = trophy.trophyID
-            LEFT JOIN   wcf' . WCF_N . '_category category
+            LEFT JOIN   wcf1_category category
             ON          trophy.categoryID = category.categoryID';
 
         $userTrophyList->getConditionBuilder()->add('trophy.isDisabled = ?', [0]);
@@ -152,19 +152,19 @@ class TrophyAction extends AbstractDatabaseObjectAction implements IToggleAction
         if (!empty($disabledTrophyIDs)) {
             $conditionBuilder = new PreparedStatementConditionBuilder();
             $conditionBuilder->add('trophyID IN (?)', [$disabledTrophyIDs]);
-            $sql = "DELETE FROM wcf" . WCF_N . "_user_special_trophy
+            $sql = "DELETE FROM wcf1_user_special_trophy
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
 
             // update trophy points
             $conditionBuilder = new PreparedStatementConditionBuilder();
             $conditionBuilder->add('trophyID IN (?)', [$disabledTrophyIDs]);
             $sql = "SELECT      COUNT(*) as count, userID
-                    FROM        wcf" . WCF_N . "_user_trophy
+                    FROM        wcf1_user_trophy
                     " . $conditionBuilder . "
                     GROUP BY    userID";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
 
             while ($row = $statement->fetchArray()) {
@@ -182,10 +182,10 @@ class TrophyAction extends AbstractDatabaseObjectAction implements IToggleAction
             $conditionBuilder = new PreparedStatementConditionBuilder();
             $conditionBuilder->add('trophyID IN (?)', [$enabledTrophyIDs]);
             $sql = "SELECT      COUNT(*) as count, userID
-                    FROM        wcf" . WCF_N . "_user_trophy
+                    FROM        wcf1_user_trophy
                     " . $conditionBuilder . "
                     GROUP BY    userID";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
 
             while ($row = $statement->fetchArray()) {
@@ -340,10 +340,10 @@ class TrophyAction extends AbstractDatabaseObjectAction implements IToggleAction
      */
     public function updatePosition()
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_trophy
+        $sql = "UPDATE  wcf1_trophy
                 SET     showOrder = ?
                 WHERE   trophyID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         $showOrder = $this->parameters['data']['offset'];
         WCF::getDB()->beginTransaction();
index 2043932992e16d6c7f1c70be27419865255d22b1..09105109824f696d46def3b9cf50687f6a6f5018 100644 (file)
@@ -31,8 +31,8 @@ class TrophyEditor extends DatabaseObjectEditor implements IEditableCachedObject
     public function setShowOrder($showOrder = 0)
     {
         $sql = "SELECT  MAX(showOrder)
-                FROM    wcf" . WCF_N . "_trophy";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_trophy";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $maxShowOrder = $statement->fetchSingleColumn();
         if (!$maxShowOrder) {
@@ -43,10 +43,10 @@ class TrophyEditor extends DatabaseObjectEditor implements IEditableCachedObject
             $newShowOrder = $maxShowOrder + 1;
         } else {
             // shift other trophies
-            $sql = "UPDATE  wcf" . WCF_N . "_trophy
+            $sql = "UPDATE  wcf1_trophy
                     SET     showOrder = showOrder + 1
                     WHERE   showOrder >= ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $showOrder,
             ]);
index 585c135b261597d4ccacf9248451028ec4f54952..e44bdc8559dea7c64178501d4de66e36754055b0 100644 (file)
@@ -56,11 +56,11 @@ class UnfurlUrl extends DatabaseObject
     {
         if ($id !== null) {
             $sql = "SELECT      unfurl_url.*, unfurl_url_image.*
-                    FROM        wcf" . WCF_N . "_unfurl_url unfurl_url
-                    LEFT JOIN   wcf" . WCF_N . "_unfurl_url_image unfurl_url_image
+                    FROM        wcf1_unfurl_url unfurl_url
+                    LEFT JOIN   wcf1_unfurl_url_image unfurl_url_image
                     ON          unfurl_url_image.imageID = unfurl_url.imageID
                     WHERE       unfurl_url.urlID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$id]);
             $row = $statement->fetchArray();
 
@@ -171,11 +171,11 @@ class UnfurlUrl extends DatabaseObject
         }
 
         $sql = "SELECT      unfurl_url.*, unfurl_url_image.*
-                FROM        wcf" . WCF_N . "_unfurl_url unfurl_url
-                LEFT JOIN   wcf" . WCF_N . "_unfurl_url_image unfurl_url_image
+                FROM        wcf1_unfurl_url unfurl_url
+                LEFT JOIN   wcf1_unfurl_url_image unfurl_url_image
                 ON          unfurl_url_image.imageID = unfurl_url.imageID
                 WHERE       unfurl_url.urlHash = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([\sha1($url)]);
         $row = $statement->fetchArray();
         if (!$row) {
index 9b73cbc46d604e9a7b32f9261ef672e3c83a44bd..c5160d5e884c6c609a368f4bc187ab6779539123 100644 (file)
@@ -69,13 +69,13 @@ class UnfurlUrlAction extends AbstractDatabaseObjectAction
         }
 
         // save object
-        $sql = "INSERT INTO wcf" . WCF_N . "_unfurl_url_image
+        $sql = "INSERT INTO wcf1_unfurl_url_image
                             (" . $keys . ")
                 VALUES      (" . $values . ")";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($statementParameters);
 
-        return WCF::getDB()->getInsertID("wcf" . WCF_N . "_unfurl_url_image", "imageID");
+        return WCF::getDB()->getInsertID("wcf1_unfurl_url_image", "imageID");
     }
 
     /**
index 562d1bded1b1b1931e0e63ae1a2145998114469b..228fd02c3c5e51506993cc0753d357cffb4bd472 100644 (file)
@@ -32,7 +32,7 @@ class UnfurlUrlList extends DatabaseObjectList
         }
         $this->sqlSelects .= "unfurl_url_image.*";
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_unfurl_url_image unfurl_url_image
+            LEFT JOIN   wcf1_unfurl_url_image unfurl_url_image
             ON          unfurl_url_image.imageID = unfurl_url.imageID";
     }
 }
index 62013a3365b109c57a4d37779b0bea4aa6011dc3..8ca6a83284ff1ddc0dee783d4db91c95cef64fa1 100644 (file)
@@ -27,11 +27,11 @@ class TeamList extends UserProfileList
     public function countObjects()
     {
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_user_group user_group,
-                        wcf" . WCF_N . "_user_to_group user_to_group
+                FROM    wcf1_user_group user_group,
+                        wcf1_user_to_group user_to_group
                 WHERE   user_to_group.groupID = user_group.groupID
                     AND user_group.showOnTeamPage = 1";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         return $statement->fetchSingleColumn();
@@ -44,14 +44,14 @@ class TeamList extends UserProfileList
     {
         $this->objectIDs = [];
         $sql = "SELECT      user_to_group.userID AS objectID
-                FROM        wcf" . WCF_N . "_user_group user_group,
-                            wcf" . WCF_N . "_user_to_group user_to_group
-                LEFT JOIN   wcf" . WCF_N . "_user user_table
+                FROM        wcf1_user_group user_group,
+                            wcf1_user_to_group user_to_group
+                LEFT JOIN   wcf1_user user_table
                 ON          user_table.userID = user_to_group.userID
                 WHERE       user_to_group.groupID = user_group.groupID
                         AND user_group.showOnTeamPage = 1
                 ORDER BY    user_group.priority DESC" . (!empty($this->sqlOrderBy) ? ", " . $this->sqlOrderBy : '');
-        $statement = WCF::getDB()->prepareStatement($sql, $this->sqlLimit, $this->sqlOffset);
+        $statement = WCF::getDB()->prepare($sql, $this->sqlLimit, $this->sqlOffset);
         $statement->execute();
         $this->objectIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
     }
@@ -64,14 +64,14 @@ class TeamList extends UserProfileList
         parent::readObjects();
 
         $sql = "SELECT      user_to_group.*
-                FROM        wcf" . WCF_N . "_user_group user_group,
-                            wcf" . WCF_N . "_user_to_group user_to_group
-                LEFT JOIN   wcf" . WCF_N . "_user user_table
+                FROM        wcf1_user_group user_group,
+                            wcf1_user_to_group user_to_group
+                LEFT JOIN   wcf1_user user_table
                 ON          user_table.userID = user_to_group.userID
                 WHERE       user_to_group.groupID = user_group.groupID
                         AND user_group.showOnTeamPage = 1
                 ORDER BY    user_group.priority DESC" . (!empty($this->sqlOrderBy) ? ", " . $this->sqlOrderBy : '');
-        $statement = WCF::getDB()->prepareStatement($sql, $this->sqlLimit, $this->sqlOffset);
+        $statement = WCF::getDB()->prepare($sql, $this->sqlLimit, $this->sqlOffset);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             if (!isset($this->teams[$row['groupID']])) {
index 1d6d47b598dd99074571ab26c26df84058519814..f3eecdfa3d6448eea136f789996afdfef285364e 100644 (file)
@@ -125,11 +125,11 @@ final class User extends DatabaseObject implements IPopoverObject, IRouteControl
     {
         if ($id !== null) {
             $sql = "SELECT      user_option_value.*, user_table.*
-                    FROM        wcf" . WCF_N . "_user user_table
-                    LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+                    FROM        wcf1_user user_table
+                    LEFT JOIN   wcf1_user_option_value user_option_value
                     ON          user_option_value.userID = user_table.userID
                     WHERE       user_table.userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$id]);
             $row = $statement->fetchArray();
 
@@ -216,9 +216,9 @@ final class User extends DatabaseObject implements IPopoverObject, IRouteControl
                 // cache does not exist or is outdated
                 if ($data === null || $skipCache) {
                     $sql = "SELECT  groupID
-                            FROM    wcf" . WCF_N . "_user_to_group
+                            FROM    wcf1_user_to_group
                             WHERE   userID = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([$this->userID]);
                     $this->groupIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -258,9 +258,9 @@ final class User extends DatabaseObject implements IPopoverObject, IRouteControl
                 // cache does not exist or is outdated
                 if ($data === null) {
                     $sql = "SELECT  languageID
-                            FROM    wcf" . WCF_N . "_user_to_language
+                            FROM    wcf1_user_to_language
                             WHERE   userID = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([$this->userID]);
                     $this->languageIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -345,11 +345,11 @@ final class User extends DatabaseObject implements IPopoverObject, IRouteControl
     public static function getUserByUsername($username)
     {
         $sql = "SELECT      user_option_value.*, user_table.*
-                FROM        wcf" . WCF_N . "_user user_table
-                LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+                FROM        wcf1_user user_table
+                LEFT JOIN   wcf1_user_option_value user_option_value
                 ON          user_option_value.userID = user_table.userID
                 WHERE       user_table.username = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$username]);
         $row = $statement->fetchArray();
         if (!$row) {
@@ -368,11 +368,11 @@ final class User extends DatabaseObject implements IPopoverObject, IRouteControl
     public static function getUserByEmail($email)
     {
         $sql = "SELECT      user_option_value.*, user_table.*
-                FROM        wcf" . WCF_N . "_user user_table
-                LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+                FROM        wcf1_user user_table
+                LEFT JOIN   wcf1_user_option_value user_option_value
                 ON          user_option_value.userID = user_table.userID
                 WHERE       user_table.email = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$email]);
         $row = $statement->fetchArray();
         if (!$row) {
@@ -391,11 +391,11 @@ final class User extends DatabaseObject implements IPopoverObject, IRouteControl
     public static function getUserByAuthData($authData)
     {
         $sql = "SELECT      user_option_value.*, user_table.*
-                FROM        wcf" . WCF_N . "_user user_table
-                LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+                FROM        wcf1_user user_table
+                LEFT JOIN   wcf1_user_option_value user_option_value
                 ON          user_option_value.userID = user_table.userID
                 WHERE       user_table.authData = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$authData]);
         $row = $statement->fetchArray();
         if (!$row) {
index 0b5e6ab1f4148733427dae8fe3a4693c4222bb98..7be5ec915b386290a32fedf8eb92cb166b29cc1c 100644 (file)
@@ -107,9 +107,9 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
         $conditions->add("userID IN (?)", [$this->objectIDs]);
 
         $sql = "SELECT  DISTINCT groupID
-                FROM    wcf" . WCF_N . "_user_to_group
+                FROM    wcf1_user_to_group
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $groupIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -232,12 +232,12 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
         $conditionBuilder = new PreparedStatementConditionBuilder();
         $conditionBuilder->add('userID IN (?)', [$this->objectIDs]);
 
-        $sql = "UPDATE  wcf" . WCF_N . "_user
+        $sql = "UPDATE  wcf1_user
                 SET     banned = ?,
                         banReason = ?,
                         banExpires = ?
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(
             \array_merge([
                 1,
@@ -261,11 +261,11 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
         $conditionBuilder = new PreparedStatementConditionBuilder();
         $conditionBuilder->add('userID IN (?)', [$this->objectIDs]);
 
-        $sql = "UPDATE  wcf" . WCF_N . "_user
+        $sql = "UPDATE  wcf1_user
                 SET     banned = ?,
                         banExpires = ?
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(
             \array_merge([
                 0,
@@ -303,12 +303,12 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
 
         if (PACKAGE_ID) {
             // set default notifications
-            $sql = "INSERT INTO wcf" . WCF_N . "_user_notification_event_to_user
+            $sql = "INSERT INTO wcf1_user_notification_event_to_user
                                 (userID, eventID, mailNotificationType)
                     SELECT      ?, eventID, presetMailNotificationType
-                    FROM        wcf" . WCF_N . "_user_notification_event
+                    FROM        wcf1_user_notification_event
                     WHERE       preset = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$user->userID, 1]);
 
             // update user rank
@@ -401,38 +401,38 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
                 WCF::getDB()->beginTransaction();
 
                 // update article
-                $sql = "UPDATE  wcf" . WCF_N . "_article
+                $sql = "UPDATE  wcf1_article
                         SET     username = ?
                         WHERE   userID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([$username, $userID]);
 
                 // update comments
-                $sql = "UPDATE  wcf" . WCF_N . "_comment
+                $sql = "UPDATE  wcf1_comment
                         SET     username = ?
                         WHERE   userID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([$username, $userID]);
 
                 // update comment responses
-                $sql = "UPDATE  wcf" . WCF_N . "_comment_response
+                $sql = "UPDATE  wcf1_comment_response
                         SET     username = ?
                         WHERE   userID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([$username, $userID]);
 
                 // update media
-                $sql = "UPDATE  wcf" . WCF_N . "_media
+                $sql = "UPDATE  wcf1_media
                         SET     username = ?
                         WHERE   userID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([$username, $userID]);
 
                 // update modification log
-                $sql = "UPDATE  wcf" . WCF_N . "_modification_log
+                $sql = "UPDATE  wcf1_modification_log
                         SET     username = ?
                         WHERE   userID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([$username, $userID]);
 
                 WCF::getDB()->commitTransaction();
@@ -836,11 +836,11 @@ class UserAction extends AbstractDatabaseObjectAction implements IClipboardActio
 
         // get objects
         $sql = "SELECT      user_option_value.*, user_table.*
-                FROM        wcf" . WCF_N . "_user user_table
-                LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+                FROM        wcf1_user user_table
+                LEFT JOIN   wcf1_user_option_value user_option_value
                 ON          user_option_value.userID = user_table.userID
                 WHERE       user_table.userID IN (" . \str_repeat('?,', \count($this->objectIDs) - 1) . "?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($this->objectIDs);
         while ($object = $statement->fetchObject($baseClass)) {
             $this->objects[] = new $this->className($object);
index ef81052a58e9d816111fce765a099083f4dd1d01..a21dc933af016e19fcb520c1cee1b1d1ab83b2c8 100644 (file)
@@ -125,9 +125,9 @@ class UserEditor extends DatabaseObjectEditor implements IEditableCachedObject
             self::$userOptionDefaultValues = [];
 
             $sql = "SELECT  optionID, defaultValue
-                    FROM    wcf" . WCF_N . "_user_option
+                    FROM    wcf1_user_option
                     WHERE   defaultValue IS NOT NULL";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute();
             while ($row = $statement->fetchArray()) {
                 self::$userOptionDefaultValues[$row['optionID']] = $row['defaultValue'];
@@ -143,10 +143,10 @@ class UserEditor extends DatabaseObjectEditor implements IEditableCachedObject
             $statementParameters[] = $optionValue;
         }
 
-        $sql = "INSERT INTO wcf" . WCF_N . "_user_option_value
+        $sql = "INSERT INTO wcf1_user_option_value
                             (userID" . $keys . ")
                 VALUES      (?" . $values . ")";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($statementParameters);
     }
 
@@ -170,10 +170,10 @@ class UserEditor extends DatabaseObjectEditor implements IEditableCachedObject
         $statementParameters[] = $this->userID;
 
         if (!empty($updateSQL)) {
-            $sql = "UPDATE  wcf" . WCF_N . "_user_option_value
+            $sql = "UPDATE  wcf1_user_option_value
                     SET     " . $updateSQL . "
                     WHERE   userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($statementParameters);
         }
     }
@@ -193,18 +193,18 @@ class UserEditor extends DatabaseObjectEditor implements IEditableCachedObject
 
         // remove old groups
         if ($deleteOldGroups) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_user_to_group
+            $sql = "DELETE FROM wcf1_user_to_group
                     WHERE       userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->userID]);
         }
 
         // insert new groups
         if (!empty($groupIDs)) {
-            $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_user_to_group
+            $sql = "INSERT IGNORE INTO  wcf1_user_to_group
                                         (userID, groupID)
                     VALUES              (?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             foreach ($groupIDs as $groupID) {
                 $statement->execute([$this->userID, $groupID]);
             }
@@ -216,10 +216,10 @@ class UserEditor extends DatabaseObjectEditor implements IEditableCachedObject
      */
     public function addToGroup(int $groupID): void
     {
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_user_to_group
+        $sql = "INSERT IGNORE INTO  wcf1_user_to_group
                                     (userID, groupID)
                 VALUES              (?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->userID, $groupID]);
     }
 
@@ -228,10 +228,10 @@ class UserEditor extends DatabaseObjectEditor implements IEditableCachedObject
      */
     public function removeFromGroup(int $groupID): void
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_to_group
+        $sql = "DELETE FROM wcf1_user_to_group
                 WHERE       userID = ?
                         AND groupID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->userID, $groupID]);
     }
 
@@ -242,10 +242,10 @@ class UserEditor extends DatabaseObjectEditor implements IEditableCachedObject
      */
     public function removeFromGroups(array $groupIDs): void
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_to_group
+        $sql = "DELETE FROM wcf1_user_to_group
                 WHERE       userID = ?
                         AND groupID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($groupIDs as $groupID) {
             $statement->execute([
                 $this->userID,
@@ -263,17 +263,17 @@ class UserEditor extends DatabaseObjectEditor implements IEditableCachedObject
     {
         // remove previous languages
         if ($deleteOldLanguages) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_user_to_language
+            $sql = "DELETE FROM wcf1_user_to_language
                     WHERE       userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->userID]);
         }
 
         // insert language ids
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_user_to_language
+        $sql = "INSERT IGNORE INTO  wcf1_user_to_language
                                     (userID, languageID)
                 VALUES              (?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         if (!empty($languageIDs)) {
             WCF::getDB()->beginTransaction();
index 86e7a81a2d361ac06b54ea6d56a944f9fdaef5c6..5dc3df47a13006dbf3212c596ab74783c653bf1c 100644 (file)
@@ -36,7 +36,7 @@ class UserList extends DatabaseObjectList
         }
         $this->sqlSelects .= "user_option_value.*";
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+            LEFT JOIN   wcf1_user_option_value user_option_value
             ON          user_option_value.userID = user_table.userID";
     }
 }
index ba335761a8699ad4f0ad5ce900fab6890576b54d..9f25aa0a5254003e4e6b136fae4d7ba3e85e6387 100644 (file)
@@ -147,9 +147,9 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject
                 // cache does not exist or is outdated
                 if ($data === null) {
                     $sql = "SELECT  followUserID
-                            FROM    wcf" . WCF_N . "_user_follow
+                            FROM    wcf1_user_follow
                             WHERE   userID = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([$this->userID]);
                     $this->followingUserIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -185,9 +185,9 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject
                 // cache does not exist or is outdated
                 if ($data === null) {
                     $sql = "SELECT  userID
-                            FROM    wcf" . WCF_N . "_user_follow
+                            FROM    wcf1_user_follow
                             WHERE   followUserID = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([$this->userID]);
                     $this->followerUserIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -224,9 +224,9 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject
                 // cache does not exist or is outdated
                 if ($data === null) {
                     $sql = "SELECT  ignoreUserID, type
-                            FROM    wcf" . WCF_N . "_user_ignore
+                            FROM    wcf1_user_ignore
                             WHERE   userID = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([$this->userID]);
                     $this->ignoredUserIDs = $statement->fetchMap('ignoreUserID', 'type');
 
@@ -272,9 +272,9 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject
                 // cache does not exist or is outdated
                 if ($data === null) {
                     $sql = "SELECT  userID, type
-                            FROM    wcf" . WCF_N . "_user_ignore
+                            FROM    wcf1_user_ignore
                             WHERE   ignoreUserID = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([$this->userID]);
                     $this->ignoredByUserIDs = $statement->fetchMap('userID', 'type');
 
@@ -503,9 +503,9 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject
         if ($specialTrophies === null) {
             // load special trophies for the user
             $sql = "SELECT  trophyID
-                    FROM    wcf" . WCF_N . "_user_special_trophy
+                    FROM    wcf1_user_special_trophy
                     WHERE   userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->userID]);
             $specialTrophies = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -527,9 +527,9 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject
             $conditionBuilder->add('trophyID IN (?)', [$trophyDeleteIDs]);
 
             // reset the user special trophies
-            $sql = "DELETE FROM wcf" . WCF_N . "_user_special_trophy
+            $sql = "DELETE FROM wcf1_user_special_trophy
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
 
             UserStorageHandler::getInstance()->update($this->userID, 'specialTrophies', \serialize($specialTrophies));
@@ -587,9 +587,9 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject
             $conditionBuilder->add('userID IN (?)', [$rebuildUserIDs]);
 
             $sql = "SELECT  userID, trophyID
-                    FROM    wcf" . WCF_N . "_user_special_trophy
+                    FROM    wcf1_user_special_trophy
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
 
             $data = \array_combine($rebuildUserIDs, \array_fill(0, \count($rebuildUserIDs), []));
@@ -608,9 +608,9 @@ class UserProfile extends DatabaseObjectDecorator implements ITitledLinkObject
                 $conditionBuilder->add('(userID = ? AND trophyID IN (?))', [$userID, $trophyIDs]);
             }
 
-            $sql = "DELETE FROM wcf" . WCF_N . "_user_special_trophy
+            $sql = "DELETE FROM wcf1_user_special_trophy
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
         }
     }
index cf700a79d6db16385380cda82fc6a65c20ba23cb..c9b1116dadf4df2bee5dd3a4ebf0d0f33850a7bf 100644 (file)
@@ -146,9 +146,9 @@ class UserProfileAction extends UserAction
         $conditionBuilder->add('objectTypeID IN (?)', [\array_keys($activityPointObjectTypes)]);
 
         $sql = "SELECT  objectTypeID, activityPoints, items
-                FROM    wcf" . WCF_N . "_user_activity_point
+                FROM    wcf1_user_activity_point
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
         $entries = [];
         while ($row = $statement->fetchArray()) {
@@ -350,12 +350,12 @@ class UserProfileAction extends UserAction
             }
 
             $sql = "SELECT      user_rank.rankID
-                    FROM        wcf" . WCF_N . "_user_rank user_rank
-                    LEFT JOIN   wcf" . WCF_N . "_user_group user_group
+                    FROM        wcf1_user_rank user_rank
+                    LEFT JOIN   wcf1_user_group user_group
                     ON          user_group.groupID = user_rank.groupID
                     " . $conditionBuilder . "
                     ORDER BY    user_group.priority DESC, user_rank.requiredPoints DESC, user_rank.requiredGender DESC";
-            $statement = WCF::getDB()->prepareStatement($sql, 1);
+            $statement = WCF::getDB()->prepare($sql, 1);
             $statement->execute($conditionBuilder->getParameters());
             $row = $statement->fetchArray();
             if ($row === false) {
@@ -370,10 +370,10 @@ class UserProfileAction extends UserAction
         }
 
         if (!empty($userToRank)) {
-            $sql = "UPDATE  wcf" . WCF_N . "_user
+            $sql = "UPDATE  wcf1_user
                     SET     rankID = ?
                     WHERE   userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             WCF::getDB()->beginTransaction();
             foreach ($userToRank as $userID => $rankID) {
@@ -426,10 +426,10 @@ class UserProfileAction extends UserAction
             $conditionBuilder->add('groupID IN (?)', [$groupIDs]);
 
             $sql = "SELECT      groupID
-                    FROM        wcf" . WCF_N . "_user_group
+                    FROM        wcf1_user_group
                     " . $conditionBuilder . "
                     ORDER BY    priority DESC";
-            $statement = WCF::getDB()->prepareStatement($sql, 1);
+            $statement = WCF::getDB()->prepare($sql, 1);
             $statement->execute($conditionBuilder->getParameters());
             $row = $statement->fetchArray();
             if ($row['groupID'] != $user->userOnlineGroupID) {
@@ -439,10 +439,10 @@ class UserProfileAction extends UserAction
 
         // add users to missing default user groups
         if (!empty($fixUserGroupIDs)) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_user_to_group
+            $sql = "INSERT INTO wcf1_user_to_group
                                 (userID, groupID)
                     VALUES      (?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             WCF::getDB()->beginTransaction();
             foreach ($fixUserGroupIDs as $userID => $groupIDs) {
@@ -456,10 +456,10 @@ class UserProfileAction extends UserAction
         }
 
         if (!empty($userToGroup)) {
-            $sql = "UPDATE  wcf" . WCF_N . "_user
+            $sql = "UPDATE  wcf1_user
                     SET     userOnlineGroupID = ?
                     WHERE   userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             WCF::getDB()->beginTransaction();
             foreach ($userToGroup as $userID => $groupID) {
@@ -481,14 +481,14 @@ class UserProfileAction extends UserAction
             $this->readObjects();
         }
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_special_trophy
+        $sql = "DELETE FROM wcf1_user_special_trophy
                 WHERE userID = ?";
-        $deleteStatement = WCF::getDB()->prepareStatement($sql);
+        $deleteStatement = WCF::getDB()->prepare($sql);
 
-        $sql = "INSERT INTO wcf" . WCF_N . "_user_special_trophy
+        $sql = "INSERT INTO wcf1_user_special_trophy
                             (userID, trophyID)
                 VALUES      (?, ?)";
-        $insertStatement = WCF::getDB()->prepareStatement($sql);
+        $insertStatement = WCF::getDB()->prepare($sql);
 
         foreach ($this->getObjects() as $user) {
             WCF::getDB()->beginTransaction();
index dcbf27e1a576d96e6b9160fb713f6492ec8939a9..ebe37f6b37f1267a81157149d4076f57e71b42ff 100644 (file)
@@ -39,13 +39,13 @@ class UserProfileList extends UserList
         }
         $this->sqlSelects .= "user_avatar.*";
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user_avatar user_avatar
+            LEFT JOIN   wcf1_user_avatar user_avatar
             ON          user_avatar.avatarID = user_table.avatarID";
 
         // get current location
         $this->sqlSelects .= ", session.pageID, session.pageObjectID, session.lastActivityTime AS sessionLastActivityTime";
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_session session
+            LEFT JOIN   wcf1_session session
             ON          session.userID = user_table.userID";
     }
 
index 36e7f481fbf69d5213565f482f9b78d148a85033..4c4e57ec6b368a446fa89e4f30f84dc94ba45c27 100644 (file)
@@ -42,10 +42,10 @@ class UserAuthenticationFailure extends DatabaseObject
     public static function countIPFailures($ipAddress)
     {
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_user_authentication_failure
+                FROM    wcf1_user_authentication_failure
                 WHERE   ipAddress = ?
                     AND time > ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$ipAddress, TIME_NOW - USER_AUTHENTICATION_FAILURE_TIMEOUT]);
 
         return $statement->fetchSingleColumn();
@@ -60,10 +60,10 @@ class UserAuthenticationFailure extends DatabaseObject
     public static function countUserFailures($userID)
     {
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_user_authentication_failure
+                FROM    wcf1_user_authentication_failure
                 WHERE   userID = ?
                     AND time > ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$userID, TIME_NOW - USER_AUTHENTICATION_FAILURE_TIMEOUT]);
 
         return $statement->fetchSingleColumn();
index a90f6401b248a1cd9f0de80c01ab8918505291a1..f38fa1b7af1eb707e762b128aecec5fdcde3efde 100644 (file)
@@ -29,9 +29,9 @@ class UserAvatarEditor extends DatabaseObjectEditor
      */
     public function delete()
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_avatar
+        $sql = "DELETE FROM wcf1_user_avatar
                 WHERE       avatarID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->avatarID]);
 
         $this->deleteFiles();
@@ -43,9 +43,9 @@ class UserAvatarEditor extends DatabaseObjectEditor
     public static function deleteAll(array $objectIDs = [])
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_user_avatar
+                FROM    wcf1_user_avatar
                 WHERE   avatarID IN (" . \str_repeat('?,', \count($objectIDs) - 1) . "?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($objectIDs);
         while ($avatar = $statement->fetchObject(self::$baseClass)) {
             $editor = new self($avatar);
index 28efd7619bec67a7761cd3fd7aa0ef34f4b15086..ba5c08e6e93c4c13988399f8a2c70d24bc95ea11 100644 (file)
@@ -29,10 +29,10 @@ class UserFollow extends DatabaseObject
     public static function getFollow($userID, $followUserID)
     {
         $sql = "SELECT  followID
-                FROM    wcf" . WCF_N . "_user_follow
+                FROM    wcf1_user_follow
                 WHERE   userID = ?
                     AND followUserID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $userID,
             $followUserID,
index a14e7af2b893c1d740c0e879d188c7d66837deb8..ec208e570a2bbd8be16aa3b4dbbc34365e580356 100644 (file)
@@ -54,10 +54,10 @@ class UserFollowAction extends AbstractDatabaseObjectAction implements IGroupedU
 
         // check if current user is ignored by target user
         $sql = "SELECT  ignoreID
-                FROM    wcf" . WCF_N . "_user_ignore
+                FROM    wcf1_user_ignore
                 WHERE   userID = ?
                     AND ignoreUserID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $this->parameters['data']['userID'],
             WCF::getUser()->userID,
@@ -184,17 +184,17 @@ class UserFollowAction extends AbstractDatabaseObjectAction implements IGroupedU
     {
         // resolve page count
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_user_follow
+                FROM    wcf1_user_follow
                 WHERE   followUserID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->parameters['userID']]);
         $pageCount = \ceil($statement->fetchSingleColumn() / 20);
 
         // get user ids
         $sql = "SELECT  userID
-                FROM    wcf" . WCF_N . "_user_follow
+                FROM    wcf1_user_follow
                 WHERE   followUserID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql, 20, ($this->parameters['pageNo'] - 1) * 20);
+        $statement = WCF::getDB()->prepare($sql, 20, ($this->parameters['pageNo'] - 1) * 20);
         $statement->execute([$this->parameters['userID']]);
         $userIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
index bdc62cf430ead294e741bf1991c5bf40f70f7b09..d98244c9959a0608fde050e3346fa14b6619904c 100644 (file)
@@ -51,9 +51,9 @@ class UserFollowerList extends UserFollowList
         $this->sqlSelects .= ", user_avatar.*";
 
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = user_follow.userID
-            LEFT JOIN   wcf" . WCF_N . "_user_avatar user_avatar
+            LEFT JOIN   wcf1_user_avatar user_avatar
             ON          user_avatar.avatarID = user_table.avatarID";
     }
 }
index dbc793add2ceaac6f18fef37d35d973861452cb5..f05236137a8f593c245b4587cbece0de2ce4dd72 100644 (file)
@@ -50,17 +50,17 @@ class UserFollowingAction extends UserFollowAction
     {
         // resolve page count
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_user_follow
+                FROM    wcf1_user_follow
                 WHERE   userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->parameters['userID']]);
         $pageCount = \ceil($statement->fetchSingleColumn() / 20);
 
         // get user ids
         $sql = "SELECT  followUserID
-                FROM    wcf" . WCF_N . "_user_follow
+                FROM    wcf1_user_follow
                 WHERE   userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql, 20, ($this->parameters['pageNo'] - 1) * 20);
+        $statement = WCF::getDB()->prepare($sql, 20, ($this->parameters['pageNo'] - 1) * 20);
         $statement->execute([$this->parameters['userID']]);
         $userIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
index 52abde2adcdb5ecb95ad977912325cb6c5537524..8d266ce42f0a2649da3c71471d7588f5d63e0ae3 100644 (file)
@@ -28,11 +28,11 @@ class UserFollowingList extends UserFollowerList
         $this->sqlSelects .= "user_avatar.*, user_follow.followID, user_option_value.*";
 
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = user_follow.followUserID
-            LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+            LEFT JOIN   wcf1_user_option_value user_option_value
             ON          user_option_value.userID = user_table.userID
-            LEFT JOIN   wcf" . WCF_N . "_user_avatar user_avatar
+            LEFT JOIN   wcf1_user_avatar user_avatar
             ON          user_avatar.avatarID = user_table.avatarID";
 
         $this->sqlSelects .= ", user_table.*";
index 242e2b885e33dfd50eee9be884b22b39e84a7ce0..b9fd5600d6490e1f7dc7945c9ae2e53909c570a4 100644 (file)
@@ -488,8 +488,8 @@ class UserGroup extends DatabaseObject implements ITitledObject
             $this->groupOptions = [];
 
             $sql = "SELECT  optionName, optionID
-                    FROM    wcf" . WCF_N . "_user_group_option";
-            $statement = WCF::getDB()->prepareStatement($sql);
+                    FROM    wcf1_user_group_option";
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute();
             $groupOptionIDs = $statement->fetchMap('optionName', 'optionID');
 
@@ -499,11 +499,11 @@ class UserGroup extends DatabaseObject implements ITitledObject
                 $conditions->add("option_value.optionID IN (?)", [$groupOptionIDs]);
 
                 $sql = "SELECT      group_option.optionName, option_value.optionValue
-                        FROM        wcf" . WCF_N . "_user_group_option_value option_value
-                        LEFT JOIN   wcf" . WCF_N . "_user_group_option group_option
+                        FROM        wcf1_user_group_option_value option_value
+                        LEFT JOIN   wcf1_user_group_option group_option
                         ON          group_option.optionID = option_value.optionID
                         " . $conditions;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditions->getParameters());
                 $this->groupOptions = $statement->fetchMap('optionName', 'optionValue');
             }
index 4704c5639dd9ac27d30e9625e459d9228a50654d..e779da14164e609b0f44c08504943597c74711a6 100644 (file)
@@ -112,14 +112,14 @@ class UserGroupAction extends AbstractDatabaseObjectAction
         // fetch user group option values
         if ($this->parameters['copyUserGroupOptions']) {
             $sql = "SELECT  optionID, optionValue
-                    FROM    wcf" . WCF_N . "_user_group_option_value
+                    FROM    wcf1_user_group_option_value
                     WHERE   groupID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->groupEditor->groupID]);
         } else {
             $sql = "SELECT  optionID, defaultValue AS optionValue
-                    FROM    wcf" . WCF_N . "_user_group_option";
-            $statement = WCF::getDB()->prepareStatement($sql);
+                    FROM    wcf1_user_group_option";
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute();
         }
 
@@ -152,12 +152,12 @@ class UserGroupAction extends AbstractDatabaseObjectAction
             $groupName = 'wcf.acp.group.group' . $group->groupID;
 
             // create group name language item
-            $sql = "INSERT INTO wcf" . WCF_N . "_language_item
+            $sql = "INSERT INTO wcf1_language_item
                                 (languageID, languageItem, languageItemValue, languageItemOriginIsSystem, languageCategoryID, packageID)
                     SELECT      languageID, '" . $groupName . "', CONCAT(languageItemValue, ' (2)'), 0, languageCategoryID, packageID
-                    FROM        wcf" . WCF_N . "_language_item
+                    FROM        wcf1_language_item
                     WHERE       languageItem = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->groupEditor->groupName]);
         } else {
             $groupName .= ' (2)';
@@ -169,12 +169,12 @@ class UserGroupAction extends AbstractDatabaseObjectAction
             $groupDescription = 'wcf.acp.group.groupDescription' . $group->groupID;
 
             // create group name language item
-            $sql = "INSERT INTO wcf" . WCF_N . "_language_item
+            $sql = "INSERT INTO wcf1_language_item
                                 (languageID, languageItem, languageItemValue, languageItemOriginIsSystem, languageCategoryID, packageID)
                     SELECT      languageID, '" . $groupDescription . "', languageItemValue, 0, languageCategoryID, packageID
-                    FROM        wcf" . WCF_N . "_language_item
+                    FROM        wcf1_language_item
                     WHERE       languageItem = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->groupEditor->groupDescription]);
         }
 
@@ -185,23 +185,23 @@ class UserGroupAction extends AbstractDatabaseObjectAction
 
         // copy members
         if ($this->parameters['copyMembers']) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_user_to_group
+            $sql = "INSERT INTO wcf1_user_to_group
                                 (userID, groupID)
                     SELECT      userID, " . $group->groupID . "
-                    FROM        wcf" . WCF_N . "_user_to_group
+                    FROM        wcf1_user_to_group
                     WHERE       groupID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->groupEditor->groupID]);
         }
 
         // copy acl options
         if ($this->parameters['copyACLOptions']) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_acl_option_to_group
+            $sql = "INSERT INTO wcf1_acl_option_to_group
                                 (optionID, objectID, groupID, optionValue)
                     SELECT      optionID, objectID, " . $group->groupID . ", optionValue
-                    FROM        wcf" . WCF_N . "_acl_option_to_group
+                    FROM        wcf1_acl_option_to_group
                     WHERE       groupID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->groupEditor->groupID]);
 
             // it is likely that applications or plugins use caches
index f62603fafa0f872ca5616ceac219f5fc221ab2d9..956438785e0cabdebd3130bd1283c7285520f9d5 100644 (file)
@@ -74,9 +74,9 @@ class UserGroupEditor extends DatabaseObjectEditor implements IEditableCachedObj
             return;
         }
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_to_group
+        $sql = "DELETE FROM wcf1_user_to_group
                 WHERE       groupID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($groupIDs as $groupID) {
             $statement->execute([$groupID]);
         }
@@ -93,9 +93,9 @@ class UserGroupEditor extends DatabaseObjectEditor implements IEditableCachedObj
             return;
         }
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_group_option_value
+        $sql = "DELETE FROM wcf1_user_group_option_value
                 WHERE       groupID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($groupIDs as $groupID) {
             $statement->execute([$groupID]);
         }
@@ -110,16 +110,16 @@ class UserGroupEditor extends DatabaseObjectEditor implements IEditableCachedObj
     {
         WCF::getDB()->beginTransaction();
         // delete old group options
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_group_option_value
+        $sql = "DELETE FROM wcf1_user_group_option_value
                 WHERE       groupID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->groupID]);
 
         // insert new options
-        $sql = "INSERT INTO wcf" . WCF_N . "_user_group_option_value
+        $sql = "INSERT INTO wcf1_user_group_option_value
                             (groupID, optionID, optionValue)
                 VALUES      (?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($groupOptions as $id => $value) {
             $statement->execute([$this->groupID, $id, $value]);
         }
@@ -136,9 +136,9 @@ class UserGroupEditor extends DatabaseObjectEditor implements IEditableCachedObj
     protected static function updateAccessibleGroups($groupID, $delete = false)
     {
         $sql = "SELECT  optionID
-                FROM    wcf" . WCF_N . "_user_group_option
+                FROM    wcf1_user_group_option
                 WHERE   optionName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(['admin.user.accessibleGroups']);
         $optionID = $statement->fetchSingleColumn();
 
@@ -159,16 +159,16 @@ class UserGroupEditor extends DatabaseObjectEditor implements IEditableCachedObj
             $groupIDs[] = $userGroup->groupID;
         }
 
-        $sql = "UPDATE  wcf" . WCF_N . "_user_group_option_value
+        $sql = "UPDATE  wcf1_user_group_option_value
                 SET     optionValue = ?
                 WHERE   groupID = ?
                     AND optionID = ?";
-        $updateStatement = WCF::getDB()->prepareStatement($sql);
+        $updateStatement = WCF::getDB()->prepare($sql);
 
         $sql = "SELECT  groupID, optionValue
-                FROM    wcf" . WCF_N . "_user_group_option_value
+                FROM    wcf1_user_group_option_value
                 WHERE   optionID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$optionID]);
         while ($row = $statement->fetchArray()) {
             $valueIDs = \array_filter(
index 99f306f49a1fb4686996c7dda145efbf93b65d72..d392455a55fecd625413a47089eab04ba1c13d5d 100644 (file)
@@ -41,16 +41,16 @@ class UserGroupOptionAction extends AbstractDatabaseObjectAction
         }
 
         // remove old values
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_group_option_value
+        $sql = "DELETE FROM wcf1_user_group_option_value
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         if (!empty($this->parameters['values'])) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_user_group_option_value
+            $sql = "INSERT INTO wcf1_user_group_option_value
                                 (optionID, groupID, optionValue)
                     VALUES      (?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             WCF::getDB()->beginTransaction();
             foreach ($this->parameters['values'] as $groupID => $optionValue) {
index 7dd83546cb8ede47795cb50e222050b389a3f0f3..2c6c3402e9e6f437c6f596b7db8548ec2323af8f 100644 (file)
@@ -35,10 +35,10 @@ class UserIgnore extends DatabaseObject
     public static function getIgnore($ignoreUserID)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_user_ignore
+                FROM    wcf1_user_ignore
                 WHERE   userID = ?
                     AND ignoreUserID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             WCF::getUser()->userID,
             $ignoreUserID,
index 81595ce2c0ab2e49f3b101f17597ed0e0aa4f748..c672f4bd6f702621ffcaedbed7c48f349cefff3f 100644 (file)
@@ -93,10 +93,10 @@ class UserIgnoreAction extends AbstractDatabaseObjectAction
 
             // check if target user is following the current user
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_user_follow
+                    FROM    wcf1_user_follow
                     WHERE   userID = ?
                         AND followUserID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $this->parameters['data']['userID'],
                 WCF::getUser()->userID,
index b1b3d6940f83b639d70388e91ff853f651d447fa..3a682cd71cdc818a8acd6445a678e19a578fea99 100644 (file)
@@ -49,11 +49,11 @@ class ViewableUserIgnoreList extends UserIgnoreList
         $this->sqlSelects .= ", user_avatar.*";
 
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = user_ignore.ignoreUserID
-            LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+            LEFT JOIN   wcf1_user_option_value user_option_value
             ON          user_option_value.userID = user_table.userID
-            LEFT JOIN   wcf" . WCF_N . "_user_avatar user_avatar
+            LEFT JOIN   wcf1_user_avatar user_avatar
             ON          user_avatar.avatarID = user_table.avatarID";
 
         $this->sqlSelects .= ", user_table.*";
index 689e8e51c209807df61380a92dc8b6deeb016d7b..0cb52ead22a5abc4021d313f29f7d9b7c341c2df 100644 (file)
@@ -68,11 +68,11 @@ class UserNotification extends DatabaseObject
     public static function getNotification($packageID, $eventID, $objectID)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_user_notification
+                FROM    wcf1_user_notification
                 WHERE   packageID = ?
                     AND eventID = ?
                     AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$packageID, $eventID, $objectID]);
         $row = $statement->fetchArray();
         if ($row !== false) {
index d11d58a0c9da2bfb4879e595ae15b77d96b17dcd..eb4bbe35046008832d6601b263e03b8e26d70e61 100644 (file)
@@ -44,11 +44,11 @@ class UserNotificationEventAction extends AbstractDatabaseObjectAction
         $event = parent::create();
 
         if ($event->preset) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_user_notification_event_to_user
+            $sql = "INSERT INTO wcf1_user_notification_event_to_user
                                 (userID, eventID, mailNotificationType)
                     SELECT      userID, ?, ?
-                    FROM        wcf" . WCF_N . "_user";
-            $statement = WCF::getDB()->prepareStatement($sql);
+                    FROM        wcf1_user";
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $event->eventID,
                 $event->presetMailNotificationType,
index ca1c7380b945e070a62b4ec091788da3a26a4dac..1e5c1e1fdd8b4606038751fa8b2d42d627110538 100644 (file)
@@ -19,7 +19,7 @@ class UserNotificationEventRecipientList extends UserList
     public function __construct()
     {
         $this->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = event_to_user.userID";
         $this->sqlSelects = 'user_table.*';
 
@@ -31,7 +31,7 @@ class UserNotificationEventRecipientList extends UserList
      */
     public function getDatabaseTableName()
     {
-        return 'wcf' . WCF_N . '_user_notification_event_to_user';
+        return 'wcf1_user_notification_event_to_user';
     }
 
     /**
index 2034bbaf4a4cc342cd61f504d7781f4697df2780..463c44559706a8416241068b1d38b37f29062920 100644 (file)
@@ -32,11 +32,11 @@ class UserObjectWatch extends DatabaseObject
     public static function getUserObjectWatch($objectTypeID, $userID, $objectID)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_user_object_watch
+                FROM    wcf1_user_object_watch
                 WHERE   objectTypeID = ?
                     AND userID = ?
                     AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$objectTypeID, $userID, $objectID]);
         $row = $statement->fetch();
         if (!$row) {
index ed896143783945fe3359ba24f8fc094c2a6ee665..06b342d8737c49a22cee13848385890ebddefc76 100644 (file)
@@ -58,16 +58,16 @@ class UsersOnlineList extends SessionList
         $this->sqlSelects .= "user_avatar.*, user_option_value.*, user_group.userOnlineMarking, user_table.*";
 
         $this->sqlConditionJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = session.userID";
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = session.userID
-            LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+            LEFT JOIN   wcf1_user_option_value user_option_value
             ON          user_option_value.userID = user_table.userID
-            LEFT JOIN   wcf" . WCF_N . "_user_avatar user_avatar
+            LEFT JOIN   wcf1_user_avatar user_avatar
             ON          user_avatar.avatarID = user_table.avatarID
-            LEFT JOIN   wcf" . WCF_N . "_user_group user_group
+            LEFT JOIN   wcf1_user_group user_group
             ON          user_group.groupID = user_table.userOnlineGroupID";
 
         $this->getConditionBuilder()->add('session.lastActivityTime > ?', [TIME_NOW - USER_ONLINE_TIMEOUT]);
@@ -103,11 +103,11 @@ class UsersOnlineList extends SessionList
         $conditionBuilder->add('session.spiderIdentifier IS NULL');
 
         $sql = "SELECT      user_option_value.userOption" . User::getUserOptionID('canViewOnlineStatus') . " AS canViewOnlineStatus, session.userID
-                FROM        wcf" . WCF_N . "_session session
-                LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+                FROM        wcf1_session session
+                LEFT JOIN   wcf1_user_option_value user_option_value
                 ON          user_option_value.userID = session.userID
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         $users = $userIDs = [];
index b7ae092bddfecf0e8b26de4089bb9c721286cdc5..6eb498d3d50dea92c23c8993e91b97bf5870b0ce 100644 (file)
@@ -33,18 +33,18 @@ class UserOptionEditor extends DatabaseObjectEditor implements IEditableCachedOb
         /** @var UserOption $userOption */
         $userOption = parent::create($parameters);
 
-        // alter the table "wcf".WCF_N."_user_option_value" with this new option
+        // alter the table "wcf1_user_option_value" with this new option
         WCF::getDB()->getEditor()->addColumn(
-            'wcf' . WCF_N . '_user_option_value',
+            'wcf1_user_option_value',
             'userOption' . $userOption->optionID,
             self::getColumnDefinition($parameters['optionType'])
         );
 
         // add the default value to this column
         if (isset($parameters['defaultValue']) && $parameters['defaultValue'] !== null) {
-            $sql = "UPDATE  wcf" . WCF_N . "_user_option_value
+            $sql = "UPDATE  wcf1_user_option_value
                     SET     userOption" . $userOption->optionID . " = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$parameters['defaultValue']]);
         }
 
@@ -58,10 +58,10 @@ class UserOptionEditor extends DatabaseObjectEditor implements IEditableCachedOb
     {
         parent::update($parameters);
 
-        // alter the table "wcf".WCF_N."_user_option_value" with this new option
+        // alter the table "wcf1_user_option_value" with this new option
         if (isset($parameters['optionType']) && $parameters['optionType'] != $this->optionType) {
             WCF::getDB()->getEditor()->alterColumn(
-                'wcf' . WCF_N . '_user_option_value',
+                'wcf1_user_option_value',
                 'userOption' . $this->optionID,
                 'userOption' . $this->optionID,
                 self::getColumnDefinition($parameters['optionType'])
@@ -74,12 +74,12 @@ class UserOptionEditor extends DatabaseObjectEditor implements IEditableCachedOb
      */
     public function delete()
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_option
+        $sql = "DELETE FROM wcf1_user_option
                 WHERE       optionID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->optionID]);
 
-        WCF::getDB()->getEditor()->dropColumn('wcf' . WCF_N . '_user_option_value', 'userOption' . $this->optionID);
+        WCF::getDB()->getEditor()->dropColumn('wcf1_user_option_value', 'userOption' . $this->optionID);
     }
 
     /**
@@ -90,7 +90,7 @@ class UserOptionEditor extends DatabaseObjectEditor implements IEditableCachedOb
         $returnValue = parent::deleteAll($objectIDs);
 
         foreach ($objectIDs as $objectID) {
-            WCF::getDB()->getEditor()->dropColumn('wcf' . WCF_N . '_user_option_value', 'userOption' . $objectID);
+            WCF::getDB()->getEditor()->dropColumn('wcf1_user_option_value', 'userOption' . $objectID);
         }
 
         return $returnValue;
@@ -113,10 +113,10 @@ class UserOptionEditor extends DatabaseObjectEditor implements IEditableCachedOb
     {
         $value = \intval(!$enable);
 
-        $sql = "UPDATE  wcf" . WCF_N . "_user_option
+        $sql = "UPDATE  wcf1_user_option
                 SET     isDisabled = ?
                 WHERE   optionID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$value, $this->optionID]);
     }
 
index 15e9638f063c367d03f4af3ce42e185c1fbab636..0ef3fcb1c2eaad0e1751f0fa58bbec76edb04466 100644 (file)
@@ -48,9 +48,9 @@ class UserOptionCategory extends DatabaseObject implements ITitledObject
     public static function getCategoryByName($categoryName)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_user_option_category
+                FROM    wcf1_user_option_category
                 WHERE   categoryName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$categoryName]);
         $row = $statement->fetchArray();
         if ($row === false) {
index 299cc3cbf076b6ddc920a5189b9c318d121f7ff7..8bb79190e10f411aad88a0d23f1b649127548ea0 100644 (file)
@@ -60,9 +60,9 @@ class UserOptionCategoryAction extends AbstractDatabaseObjectAction
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("categoryName IN (?)", [$categoryNames]);
         $sql = "SELECT  COUNT(*) AS count
-                FROM    wcf" . WCF_N . "_user_option
+                FROM    wcf1_user_option
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $count = $statement->fetchSingleColumn();
         if ($count > 0) {
index 48eebddd9d87ed2da608642254ae9d41871d56dd..4d9bc962f3bb7cc6d74cd54fd4131d4d30a62495 100644 (file)
@@ -95,8 +95,8 @@ class UserProfileMenuItemAction extends AbstractDatabaseObjectAction implements
         }
 
         $sql = "SELECT  menuItemID
-                FROM    wcf" . WCF_N . "_user_profile_menu_item";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_user_profile_menu_item";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $menuItemIDs = [];
         while ($menuItemID = $statement->fetchColumn()) {
@@ -122,10 +122,10 @@ class UserProfileMenuItemAction extends AbstractDatabaseObjectAction implements
      */
     public function updatePosition()
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_user_profile_menu_item
+        $sql = "UPDATE  wcf1_user_profile_menu_item
                 SET     showOrder = ?
                 WHERE   menuItemID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         WCF::getDB()->beginTransaction();
         for ($i = 0, $length = \count($this->parameters['data']['structure'][0]); $i < $length; $i++) {
index 88e6de81e59e7ba61e5dc4b46f404073876046c7..93a2ac6a097e1ba0aabf30167121a4a3b9b99c5f 100644 (file)
@@ -55,10 +55,10 @@ class UserProfileMenuItemEditor extends DatabaseObjectEditor implements IEditabl
     public function delete()
     {
         // update show order
-        $sql = "UPDATE  wcf" . WCF_N . "_user_profile_menu_item
+        $sql = "UPDATE  wcf1_user_profile_menu_item
                 SET     showOrder = showOrder - 1
                 WHERE   showOrder >= ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->showOrder]);
 
         parent::delete();
@@ -73,21 +73,21 @@ class UserProfileMenuItemEditor extends DatabaseObjectEditor implements IEditabl
     {
         if ($this->showOrder != $showOrder) {
             if ($showOrder < $this->showOrder) {
-                $sql = "UPDATE  wcf" . WCF_N . "_user_profile_menu_item
+                $sql = "UPDATE  wcf1_user_profile_menu_item
                         SET     showOrder = showOrder + 1
                         WHERE   showOrder >= ?
                             AND showOrder < ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $showOrder,
                     $this->showOrder,
                 ]);
             } elseif ($showOrder > $this->showOrder) {
-                $sql = "UPDATE  wcf" . WCF_N . "_user_profile_menu_item
+                $sql = "UPDATE  wcf1_user_profile_menu_item
                         SET     showOrder = showOrder - 1
                         WHERE   showOrder <= ?
                             AND showOrder > ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $showOrder,
                     $this->showOrder,
@@ -107,8 +107,8 @@ class UserProfileMenuItemEditor extends DatabaseObjectEditor implements IEditabl
         if ($showOrder == 0) {
             // get next number in row
             $sql = "SELECT  MAX(showOrder) AS showOrder
-                    FROM    wcf" . WCF_N . "_user_profile_menu_item";
-            $statement = WCF::getDB()->prepareStatement($sql);
+                    FROM    wcf1_user_profile_menu_item";
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute();
             $row = $statement->fetchArray();
             if (!empty($row)) {
@@ -117,10 +117,10 @@ class UserProfileMenuItemEditor extends DatabaseObjectEditor implements IEditabl
                 $showOrder = 1;
             }
         } else {
-            $sql = "UPDATE  wcf" . WCF_N . "_user_profile_menu_item
+            $sql = "UPDATE  wcf1_user_profile_menu_item
                     SET     showOrder = showOrder + 1
                     WHERE   showOrder >= ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$showOrder]);
         }
 
index 6933e341f20984d0a4738388b8b02c7f31358c4f..28d300d5df542e6740aeb7462cec5200ada11164 100644 (file)
@@ -32,7 +32,7 @@ class UserProfileVisitor extends DatabaseObject
                 FROM    " . static::getDatabaseTableName() . "
                 WHERE   ownerID = ?
                     AND userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$ownerID, $userID]);
         if ($row = $statement->fetchArray()) {
             return new self(null, $row);
index e4c5b32bc43b11a3997777244063485bc6c57213..4fc2acedb80833786087b20d011e23d942e6faf0 100644 (file)
@@ -11,6 +11,10 @@ use wcf\system\exception\UserInputException;
 use wcf\system\user\GroupedUserList;
 use wcf\system\WCF;
 
+use wcf\system\exception\UserInputException;
+use wcf\system\user\GroupedUserList;
+use wcf\system\WCF;
+
 /**
  * Executes profile visitor-related actions.
  *
@@ -63,18 +67,18 @@ class UserProfileVisitorAction extends AbstractDatabaseObjectAction implements I
     {
         // resolve page count
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_user_profile_visitor
+                FROM    wcf1_user_profile_visitor
                 WHERE   ownerID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->parameters['userID']]);
         $pageCount = \ceil($statement->fetchSingleColumn() / 20);
 
         // get user ids
         $sql = "SELECT      userID
-                FROM        wcf" . WCF_N . "_user_profile_visitor
+                FROM        wcf1_user_profile_visitor
                 WHERE       ownerID = ?
                 ORDER BY    time DESC";
-        $statement = WCF::getDB()->prepareStatement($sql, 20, ($this->parameters['pageNo'] - 1) * 20);
+        $statement = WCF::getDB()->prepare($sql, 20, ($this->parameters['pageNo'] - 1) * 20);
         $statement->execute([$this->parameters['userID']]);
         $userIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -101,11 +105,11 @@ class UserProfileVisitorAction extends AbstractDatabaseObjectAction implements I
      */
     public function registerVisitor()
     {
-        $sql = "INSERT INTO             wcf" . WCF_N . "_user_profile_visitor
+        $sql = "INSERT INTO             wcf1_user_profile_visitor
                                         (ownerID, userID, time)
                 VALUES                  (?, ?, ?)
                 ON DUPLICATE KEY UPDATE time = VALUES(time)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $this->parameters['data']['ownerID'],
             $this->parameters['data']['userID'],
index a4eae3b1781a680186196e3586a72cf27c41e1fe..39233b8bd9009c63375dc549947f66b1c1ad03e3 100644 (file)
@@ -47,9 +47,9 @@ class UserProfileVisitorList extends DatabaseObjectList
         $this->sqlSelects .= ", user_avatar.*";
 
         $this->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user user_table
+            LEFT JOIN   wcf1_user user_table
             ON          user_table.userID = user_profile_visitor.userID
-            LEFT JOIN   wcf" . WCF_N . "_user_avatar user_avatar
+            LEFT JOIN   wcf1_user_avatar user_avatar
             ON          user_avatar.avatarID = user_table.avatarID";
     }
 }
index cf288941e0183f075446d4a5d47cc72255233c24..d3cc9acff09266eba24f656167406fb7a8bbbd55 100644 (file)
@@ -155,9 +155,9 @@ class UserTrophyAction extends AbstractDatabaseObjectAction
                 }
                 $conditionBuilder->add('userID = ?', [$userID]);
 
-                $sql = "DELETE FROM wcf" . WCF_N . "_user_special_trophy
+                $sql = "DELETE FROM wcf1_user_special_trophy
                         " . $conditionBuilder;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditionBuilder->getParameters());
 
                 UserStorageHandler::getInstance()->reset([$userID], 'specialTrophies');
@@ -227,18 +227,18 @@ class UserTrophyAction extends AbstractDatabaseObjectAction
             $userTrophyList->sqlConditionJoins .= ' ';
         }
         $userTrophyList->sqlJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_trophy trophy
+            LEFT JOIN   wcf1_trophy trophy
             ON          user_trophy.trophyID = trophy.trophyID';
         $userTrophyList->sqlConditionJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_trophy trophy
+            LEFT JOIN   wcf1_trophy trophy
             ON          user_trophy.trophyID = trophy.trophyID';
 
         // trophy category join
         $userTrophyList->sqlJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_category category
+            LEFT JOIN   wcf1_category category
             ON          trophy.categoryID = category.categoryID';
         $userTrophyList->sqlConditionJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_category category
+            LEFT JOIN   wcf1_category category
             ON          trophy.categoryID = category.categoryID';
 
         $userTrophyList->getConditionBuilder()->add('trophy.isDisabled = ?', [0]);
index 612ac397660ceb44c60c9d4353d2944bf46da67b..94c8d2b402f903dc0fff1340b7ba733e9c0a8ee3 100644 (file)
@@ -44,18 +44,18 @@ class UserTrophyList extends DatabaseObjectList
                 $trophyList->sqlConditionJoins .= ' ';
             }
             $trophyList->sqlJoins .= '
-                LEFT JOIN   wcf' . WCF_N . '_trophy trophy
+                LEFT JOIN   wcf1_trophy trophy
                 ON          user_trophy.trophyID = trophy.trophyID';
             $trophyList->sqlConditionJoins .= '
-                LEFT JOIN   wcf' . WCF_N . '_trophy trophy
+                LEFT JOIN   wcf1_trophy trophy
                 ON          user_trophy.trophyID = trophy.trophyID';
 
             // trophy category join
             $trophyList->sqlJoins .= '
-                LEFT JOIN   wcf' . WCF_N . '_category category
+                LEFT JOIN   wcf1_category category
                 ON          trophy.categoryID = category.categoryID';
             $trophyList->sqlConditionJoins .= '
-                LEFT JOIN   wcf' . WCF_N . '_category category
+                LEFT JOIN   wcf1_category category
                 ON          trophy.categoryID = category.categoryID';
 
             $trophyList->getConditionBuilder()->add('trophy.isDisabled = ?', [0]);
index e7798fc801cd3f9dfec0306805583903f5bb0891..eefa47a690e16f3ce3d107aaeaf3db3c419d11ca 100644 (file)
@@ -138,9 +138,9 @@ class NotificationSettingsForm extends AbstractForm
 
             // get activation state
             $sql = "SELECT  eventID, mailNotificationType
-                    FROM    wcf" . WCF_N . "_user_notification_event_to_user
+                    FROM    wcf1_user_notification_event_to_user
                     WHERE   userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([WCF::getUser()->userID]);
             while ($row = $statement->fetchArray()) {
                 $this->settings[$row['eventID']]['enabled'] = true;
@@ -209,10 +209,10 @@ class NotificationSettingsForm extends AbstractForm
      */
     protected function updateActivationStates()
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_notification_event_to_user
+        $sql = "DELETE FROM wcf1_user_notification_event_to_user
                 WHERE       eventID = ?
                         AND userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         WCF::getDB()->beginTransaction();
         $newSettings = [];
         foreach ($this->settings as $eventID => $setting) {
@@ -230,10 +230,10 @@ class NotificationSettingsForm extends AbstractForm
         }
 
         if (!empty($newSettings)) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_user_notification_event_to_user
+            $sql = "INSERT INTO wcf1_user_notification_event_to_user
                                 (eventID, userID, mailNotificationType)
                     VALUES      (?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             foreach ($newSettings as $newSetting) {
                 $statement->execute([
                     $newSetting['eventID'],
index 361cff0ef2465cc2bf434be19dbfed75f4d9d2b9..3536fccd27c590731ba88169fe14e6d462a7c1ef 100644 (file)
@@ -95,21 +95,21 @@ class NotificationUnsubscribeForm extends AbstractForm
         parent::save();
 
         if ($this->event !== null) {
-            $sql = "UPDATE  wcf" . WCF_N . "_user_notification_event_to_user
+            $sql = "UPDATE  wcf1_user_notification_event_to_user
                     SET     mailNotificationType = ?
                     WHERE   userID = ?
                         AND eventID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 'none',
                 $this->user->userID,
                 $this->event->eventID,
             ]);
         } else {
-            $sql = "UPDATE  wcf" . WCF_N . "_user_notification_event_to_user
+            $sql = "UPDATE  wcf1_user_notification_event_to_user
                     SET     mailNotificationType = ?
                     WHERE   userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 'none',
                 $this->user->userID,
index e71ec2fbe979bafacc0015fbeabe10d20543ece0..09d3a77b86dc9c126812765327214be1ca857715 100644 (file)
@@ -306,12 +306,12 @@ class SearchForm extends AbstractCaptchaForm
             }
 
             $sql = "SELECT  searchID
-                    FROM    wcf" . WCF_N . "_search
+                    FROM    wcf1_search
                     WHERE   searchHash = ?
                         AND searchType = ?
                         AND searchTime > ?
                         " . (WCF::getUser()->userID ? 'AND userID = ?' : 'AND userID IS NULL');
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($parameters);
             $row = $statement->fetchArray();
             if ($row !== false) {
index 367fd7b57466a5849b31a0605fc09550a946d68f..8c1ca6ae3678666d4a6be5a1c16e93f879232177 100644 (file)
@@ -187,11 +187,11 @@ class UserSearchForm extends UserOptionListForm
 
         // perform search
         $sql = "SELECT      user_table.userID
-                FROM        wcf" . WCF_N . "_user user_table
-                LEFT JOIN   wcf" . WCF_N . "_user_option_value option_value
+                FROM        wcf1_user user_table
+                LEFT JOIN   wcf1_user_option_value option_value
                 ON          option_value.userID = user_table.userID
                 {$this->conditions}";
-        $statement = WCF::getDB()->prepareStatement($sql, $this->maxResults);
+        $statement = WCF::getDB()->prepare($sql, $this->maxResults);
         $statement->execute($this->conditions->getParameters());
         $this->matches = $statement->fetchAll(\PDO::FETCH_COLUMN);
     }
index 4f1496b5983a1f430235bdf1334064ac38578660..222fa5572d60a0454c2531162421c5d19be913ad 100644 (file)
@@ -153,16 +153,16 @@ abstract class AbstractArticlePage extends AbstractPage
                 $conditionBuilder->add('tag_to_object.tagID IN (?)', [\array_keys($this->tags)]);
                 $conditionBuilder->add('tag_to_object.objectID <> ?', [$this->articleContentID]);
                 $sql = "SELECT      MAX(article.articleID), COUNT(*) AS count
-                        FROM        wcf" . WCF_N . "_tag_to_object tag_to_object
-                        INNER JOIN  wcf" . WCF_N . "_article_content article_content
+                        FROM        wcf1_tag_to_object tag_to_object
+                        INNER JOIN  wcf1_article_content article_content
                         ON          tag_to_object.objectID = article_content.articleContentID
-                        INNER JOIN  wcf" . WCF_N . "_article article
+                        INNER JOIN  wcf1_article article
                         ON          article_content.articleID = article.articleID
                         " . $conditionBuilder . "
                         GROUP BY    tag_to_object.objectID
                         HAVING      COUNT(*) >= " . \round(\count($this->tags) * ARTICLE_RELATED_ARTICLES_MATCH_THRESHOLD / 100) . "
                         ORDER BY    count DESC, MAX(article.time) DESC";
-                $statement = WCF::getDB()->prepareStatement($sql, ARTICLE_RELATED_ARTICLES * 4);
+                $statement = WCF::getDB()->prepare($sql, ARTICLE_RELATED_ARTICLES * 4);
                 $statement->execute($conditionBuilder->getParameters());
                 $articleIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
index e71064058643937d4bfc2291b61d6e98f37bd947..ca6a811c9d935fe007ca638dc4d1c256c359571b 100644 (file)
@@ -191,7 +191,7 @@ class ArticleListPage extends SortablePage
             }
             $this->objectList->sqlSelects .= "(
                 SELECT  title
-                FROM    wcf" . WCF_N . "_article_content
+                FROM    wcf1_article_content
                 WHERE   articleID = article.articleID
                     AND (
                             languageID IS NULL
@@ -223,7 +223,7 @@ class ArticleListPage extends SortablePage
                         $this->objectList->getConditionBuilder()->add(
                             'article.articleID NOT IN (
                                 SELECT  objectID
-                                FROM    wcf' . WCF_N . '_label_object
+                                FROM    wcf1_label_object
                                 WHERE   objectTypeID = ?
                                     AND labelID IN (?)
                             )',
@@ -237,7 +237,7 @@ class ArticleListPage extends SortablePage
                     $this->objectList->getConditionBuilder()->add(
                         'article.articleID IN (
                             SELECT  objectID
-                            FROM    wcf' . WCF_N . '_label_object
+                            FROM    wcf1_label_object
                             WHERE   objectTypeID = ?
                                 AND labelID = ?
                         )',
index 62fd4974391167c8d82f4d5e43d775be0f525325..a64d03d426758ca4aeab640717d667cd309a88dc 100644 (file)
@@ -95,7 +95,7 @@ class CategoryArticleListPage extends ArticleListPage
         if ($this->sortField === 'title') {
             $this->objectList->sqlSelects = "(
                 SELECT  title
-                FROM    wcf" . WCF_N . "_article_content
+                FROM    wcf1_article_content
                 WHERE   articleID = article.articleID
                     AND (
                             languageID IS NULL
index de6a63f21740a18dd24e3edd045680d4f8946de0..25ffdf6f90e85140391322972f3e210a21c9f12e 100644 (file)
@@ -69,7 +69,7 @@ class CategoryTrophyListPage extends TrophyListPage
 
         $this->objectList->sqlSelects = '(
             SELECT  COUNT(*)
-            FROM    wcf' . WCF_N . '_user_trophy
+            FROM    wcf1_user_trophy
             WHERE   trophyID = trophy.trophyID
         ) AS awarded';
         $this->objectList->getConditionBuilder()->add('isDisabled = ?', [0]);
index 45a78895ad2f3fe212e9ca41d00521d278218ea0..2766ee382ad05dda9c3135c3e281a687cc5cb45c 100644 (file)
@@ -93,7 +93,7 @@ class TrophyListPage extends MultipleLinkPage
 
         $this->objectList->sqlSelects = '(
             SELECT  COUNT(*)
-            FROM    wcf' . WCF_N . '_user_trophy
+            FROM    wcf1_user_trophy
             WHERE   trophyID = trophy.trophyID
         ) AS awarded';
         $this->objectList->getConditionBuilder()->add('isDisabled = ?', [0]);
index e079677c31edda5e9337a2e211903bd099ad4f77..e361c9fdfc8c4ddcd37509bee4be0d20e968e945 100644 (file)
@@ -177,13 +177,13 @@ class TrophyPage extends MultipleLinkPage
         if (!WCF::getUser()->userID) {
             $this->objectList->getConditionBuilder()->add('user_trophy.userID IN (
                 SELECT  userID
-                FROM    wcf' . WCF_N . '_user_option_value
+                FROM    wcf1_user_option_value
                 WHERE   COALESCE(userOption' . $canViewTrophiesOptionID . ', ' . $canViewTrophyDefaultValue . ') = 0)');
         } elseif (!WCF::getSession()->getPermission('admin.general.canViewPrivateUserOptions')) {
             $conditionBuilder = new PreparedStatementConditionBuilder(false, 'OR');
             $conditionBuilder->add('user_trophy.userID IN (
                 SELECT  userID
-                FROM    wcf' . WCF_N . '_user_option_value
+                FROM    wcf1_user_option_value
                 WHERE   (
                             COALESCE(userOption' . $canViewTrophiesOptionID . ', ' . $canViewTrophyDefaultValue . ') = 0
                          OR COALESCE(userOption' . $canViewTrophiesOptionID . ', ' . $canViewTrophyDefaultValue . ') = 1
@@ -193,13 +193,13 @@ class TrophyPage extends MultipleLinkPage
             $friendshipConditionBuilder = new PreparedStatementConditionBuilder(false);
             $friendshipConditionBuilder->add('user_trophy.userID IN (
                 SELECT  userID
-                FROM    wcf' . WCF_N . '_user_option_value
+                FROM    wcf1_user_option_value
                 WHERE   COALESCE(userOption' . $canViewTrophiesOptionID . ', ' . $canViewTrophyDefaultValue . ') = 2
             )');
             $friendshipConditionBuilder->add(
                 'user_trophy.userID IN (
                     SELECT  userID
-                    FROM    wcf' . WCF_N . '_user_follow
+                    FROM    wcf1_user_follow
                     WHERE   followUserID = ?
                 )',
                 [WCF::getUser()->userID]
index d0c4c2e2c7b5b72a0afc6d12b6ce7158ce4a002d..9b611fcd81183e01d3507dc7182f69ead74de14a 100644 (file)
@@ -59,7 +59,7 @@ class UnreadArticleListPage extends ArticleListPage
 
         if (WCF::getUser()->userID) {
             $this->objectList->sqlConditionJoins = "
-                LEFT JOIN   wcf" . WCF_N . "_tracked_visit tracked_visit
+                LEFT JOIN   wcf1_tracked_visit tracked_visit
                 ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.article') . "
                         AND tracked_visit.objectID = article.articleID
                         AND tracked_visit.userID = " . WCF::getUser()->userID;
index 73c23af7ba7426a0441947c0f0c3baedfbecd682..9e4bea578d9f73993bb27d79c422c46b9670737a 100644 (file)
@@ -8,7 +8,6 @@ use Psr\Http\Message\ResponseInterface;
 use wcf\data\language\LanguageEditor;
 use wcf\data\language\SetupLanguage;
 use wcf\data\package\installation\queue\PackageInstallationQueueEditor;
-use wcf\data\package\Package;
 use wcf\data\user\User;
 use wcf\data\user\UserAction;
 use wcf\system\cache\builder\LanguageCacheBuilder;
@@ -21,7 +20,6 @@ use wcf\system\exception\SystemException;
 use wcf\system\exception\UserInputException;
 use wcf\system\image\adapter\GDImageAdapter;
 use wcf\system\image\adapter\ImagickImageAdapter;
-use wcf\system\io\File;
 use wcf\system\io\Tar;
 use wcf\system\language\LanguageFactory;
 use wcf\system\package\PackageArchive;
@@ -553,7 +551,7 @@ final class WCFSetup extends WCF
 
                 // check innodb support
                 $sql = "SHOW ENGINES";
-                $statement = $db->prepareStatement($sql);
+                $statement = $db->prepare($sql);
                 $statement->execute();
                 $hasInnoDB = false;
                 while ($row = $statement->fetchArray()) {
@@ -569,7 +567,7 @@ final class WCFSetup extends WCF
 
                 // check for PHP's MySQL native driver
                 $sql = "SELECT 1";
-                $statement = $db->prepareStatement($sql);
+                $statement = $db->prepare($sql);
                 $statement->execute();
                 // MySQL native driver understands data types, libmysqlclient does not
                 if ($statement->fetchSingleColumn() !== 1) {
@@ -685,7 +683,7 @@ final class WCFSetup extends WCF
         $sql = "INSERT INTO wcf1_package_installation_sql_log
                             (packageID, sqlTable)
                 VALUES      (?, ?)";
-        $statement = self::getDB()->prepareStatement($sql);
+        $statement = self::getDB()->prepare($sql);
         foreach ($matches[1] as $tableName) {
             $statement->execute([1, $tableName]);
         }
@@ -706,7 +704,7 @@ final class WCFSetup extends WCF
             $sql = "INSERT INTO wcf1_package_installation_plugin
                                 (packageID, pluginName, priority, className)
                     VALUES      (?, ?, ?, ?)";
-            $statement = self::getDB()->prepareStatement($sql);
+            $statement = self::getDB()->prepare($sql);
             $statement->execute([
                 1,
                 'packageInstallationPlugin',
@@ -861,7 +859,7 @@ final class WCFSetup extends WCF
                 $sql = "SELECT  languageID
                         FROM    wcf1_language
                         WHERE   languageCode = ?";
-                $statement = self::getDB()->prepareStatement($sql);
+                $statement = self::getDB()->prepare($sql);
                 $statement->execute([self::$selectedLanguageCode]);
                 $row = $statement->fetchArray();
                 if (isset($row['languageID'])) {
index 6fc3407ecd2c8e81f36dd97fb7f801225fea41f9..4059f3aa618033875725a03c0dfce9ccff0ecd17 100644 (file)
@@ -257,9 +257,9 @@ class ACLHandler extends SingletonFactory
         $conditions->add("optionID IN (?)", [\array_keys($options)]);
         $conditions->add("objectID = ?", [$objectID]);
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_acl_option_to_" . $type . "
+        $sql = "DELETE FROM wcf1_acl_option_to_" . $type . "
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         $objectTypeID = \reset($options)->objectTypeID;
@@ -272,10 +272,10 @@ class ACLHandler extends SingletonFactory
             $values = JSON::decode($_POST['aclValues'][$type]);
         }
 
-        $sql = "INSERT INTO wcf" . WCF_N . "_acl_option_to_" . $type . "
+        $sql = "INSERT INTO wcf1_acl_option_to_" . $type . "
                             (optionID, objectID, " . $type . "ID, optionValue)
                 VALUES      (?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         WCF::getDB()->beginTransaction();
         foreach ($values as $typeID => $optionData) {
@@ -383,9 +383,9 @@ class ACLHandler extends SingletonFactory
         $conditions->add("optionID IN (?)", [$optionsIDs]);
         $conditions->add("objectID IN (?)", [$objectIDs]);
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_acl_option_to_" . $type . "
+                FROM    wcf1_acl_option_to_" . $type . "
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         while ($row = $statement->fetchArray()) {
             if (!isset($data[$type][$row['objectID']])) {
@@ -419,9 +419,9 @@ class ACLHandler extends SingletonFactory
                 if ($type == 'group') {
                     $conditions->add("groupID IN (?)", [\array_keys($data[$type]['option'])]);
                     $sql = "SELECT  groupID, groupName
-                            FROM    wcf" . WCF_N . "_user_group
+                            FROM    wcf1_user_group
                             " . $conditions;
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute($conditions->getParameters());
 
                     while ($row = $statement->fetchArray()) {
@@ -430,9 +430,9 @@ class ACLHandler extends SingletonFactory
                 } else {
                     $conditions->add("userID IN (?)", [\array_keys($data[$type]['option'])]);
                     $sql = "SELECT  userID, username
-                            FROM    wcf" . WCF_N . "_user
+                            FROM    wcf1_user
                             " . $conditions;
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute($conditions->getParameters());
                     $data['user']['label'] = $statement->fetchMap('userID', 'username');
                 }
@@ -482,9 +482,9 @@ class ACLHandler extends SingletonFactory
 
         WCF::getDB()->beginTransaction();
         foreach (['group', 'user'] as $type) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_acl_option_to_" . $type . "
+            $sql = "DELETE FROM wcf1_acl_option_to_" . $type . "
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
         }
         WCF::getDB()->commitTransaction();
index ea00bd69cf0f2b2bbe99f845332f33d3624622d4..707c2b11a9a44ca1e8c372bb18988dac70496a7b 100644 (file)
@@ -69,10 +69,10 @@ class SimpleAclHandler extends SingletonFactory
         ];
 
         $sql = "SELECT  userID
-                FROM    wcf" . WCF_N . "_acl_simple_to_user
+                FROM    wcf1_acl_simple_to_user
                 WHERE   objectTypeID = ?
                     AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $objectID,
@@ -80,10 +80,10 @@ class SimpleAclHandler extends SingletonFactory
         $userIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
         $sql = "SELECT  groupID
-                FROM    wcf" . WCF_N . "_acl_simple_to_group
+                FROM    wcf1_acl_simple_to_group
                 WHERE   objectTypeID = ?
                     AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $objectID,
@@ -123,10 +123,10 @@ class SimpleAclHandler extends SingletonFactory
         }
 
         // users
-        $sql = "DELETE FROM     wcf" . WCF_N . "_acl_simple_to_user
+        $sql = "DELETE FROM     wcf1_acl_simple_to_user
                 WHERE           objectTypeID = ?
                             AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $objectID,
@@ -135,10 +135,10 @@ class SimpleAclHandler extends SingletonFactory
         if ($values['allowAll'] == 0 && !empty($values['user'])) {
             $values['user'] = ArrayUtil::toIntegerArray($values['user']);
             if (!empty($values['user'])) {
-                $sql = "INSERT INTO wcf" . WCF_N . "_acl_simple_to_user
+                $sql = "INSERT INTO wcf1_acl_simple_to_user
                                     (objectTypeID, objectID, userID)
                         VALUES      (?, ?, ?)";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
 
                 WCF::getDB()->beginTransaction();
                 foreach ($values['user'] as $userID) {
@@ -153,10 +153,10 @@ class SimpleAclHandler extends SingletonFactory
         }
 
         // groups
-        $sql = "DELETE FROM wcf" . WCF_N . "_acl_simple_to_group
+        $sql = "DELETE FROM wcf1_acl_simple_to_group
                 WHERE       objectTypeID = ?
                         AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $objectID,
@@ -165,10 +165,10 @@ class SimpleAclHandler extends SingletonFactory
         if ($values['allowAll'] == 0 && !empty($values['group'])) {
             $values['group'] = ArrayUtil::toIntegerArray($values['group']);
             if (!empty($values['group'])) {
-                $sql = "INSERT INTO wcf" . WCF_N . "_acl_simple_to_group
+                $sql = "INSERT INTO wcf1_acl_simple_to_group
                                     (objectTypeID, objectID, groupID)
                         VALUES      (?, ?, ?)";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
 
                 WCF::getDB()->beginTransaction();
                 foreach ($values['group'] as $groupID) {
index 8d21cf48aa44b634dc8d4c6e563c269c454cd93b..bbaf22104c3563122ab8da86e8925527239052e2 100644 (file)
@@ -64,7 +64,7 @@ final class SystemInfoAcpDashboardBox extends AbstractAcpDashboardBox
     private function getInnodbFlushLogAtTrxCommit(): int
     {
         $sql = "SELECT @@innodb_flush_log_at_trx_commit";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         return $statement->fetchSingleColumn();
     }
index 3587c469c5f915223dc3659bcffc94a700b70289..46c63a29828b40a69b82b122471b99deaf95cf3b 100644 (file)
@@ -277,7 +277,7 @@ final class ApplicationHandler extends SingletonFactory
 
             $string = \preg_replace(
                 $regex,
-                '${1}' . WCF_N . '_',
+                '${1}1_',
                 $string
             );
         } else {
@@ -296,7 +296,7 @@ final class ApplicationHandler extends SingletonFactory
 
             $string = \preg_replace(
                 $regex,
-                '${1}' . WCF_N . '_',
+                '${1}1_',
                 $string
             );
         }
index 74c46aecd252ef45f7076da02c52fc97a697ea48..f1c7e66155df8096c662f2c068d2c50474e99473 100644 (file)
@@ -131,11 +131,11 @@ class AttachmentHandler implements \Countable
         $conditions->add("tmpHash IN (?)", [$this->tmpHash]);
         $conditions->add("(objectID IS NULL OR objectID = 0)");
 
-        $sql = "UPDATE  wcf" . WCF_N . "_attachment
+        $sql = "UPDATE  wcf1_attachment
                 SET     objectID = ?,
                         tmpHash = ''
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         $parameters = $conditions->getParameters();
         \array_unshift($parameters, $objectID);
@@ -163,10 +163,10 @@ class AttachmentHandler implements \Countable
         $parameters = $conditions->getParameters();
         \array_unshift($parameters, $newObjectID);
 
-        $sql = "UPDATE  wcf" . WCF_N . "_attachment
+        $sql = "UPDATE  wcf1_attachment
                 SET     objectID = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($parameters);
     }
 
index 7afd15a335eb909ce909c8b24783bd69e20bfbcc..eccb0ff0da14686324821e31ca2e88dd1d269a32 100644 (file)
@@ -77,14 +77,14 @@ class NotificationEmailDeliveryBackgroundJob extends AbstractBackgroundJob
     {
         // see UserNotificationHandler::fetchNotifications()
         $sql = "SELECT      notification.*, notification_event.eventID, object_type.objectType
-                FROM        wcf" . WCF_N . "_user_notification notification
-                LEFT JOIN   wcf" . WCF_N . "_user_notification_event notification_event
+                FROM        wcf1_user_notification notification
+                LEFT JOIN   wcf1_user_notification_event notification_event
                 ON          notification_event.eventID = notification.eventID
-                LEFT JOIN   wcf" . WCF_N . "_object_type object_type
+                LEFT JOIN   wcf1_object_type object_type
                 ON          object_type.objectTypeID = notification_event.objectTypeID
                 WHERE       notification.notificationID = ?
                 ORDER BY    notification.time DESC";
-        $statement = WCF::getDB()->prepareStatement($sql, 1);
+        $statement = WCF::getDB()->prepare($sql, 1);
         $statement->execute([$this->notificationID]);
 
         /** @var UserNotification $notification */
index 2e97f94240fdd386481dc4febcd2d5495a6acd1b..08d1c4c200a98caf035c036d03d387725df88146 100644 (file)
@@ -169,9 +169,9 @@ final class UnfurlUrlBackgroundJob extends AbstractBackgroundJob
     private static function getImageIdByUrl(string $url): ?int
     {
         $sql = "SELECT  imageID
-                FROM    wcf" . WCF_N . "_unfurl_url_image
+                FROM    wcf1_unfurl_url_image
                 WHERE   imageUrlHash = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([\sha1($url)]);
 
         $imageID = $statement->fetchSingleColumn();
index 91578710a25bf7caa79ad58d4152ad8ee7c22379..94d3c6a7145f33d0bf510a016b089683ac9ea3ca 100644 (file)
@@ -30,9 +30,9 @@ class ArticleCommentListBoxController extends AbstractCommentListBoxController
         $accessibleCategoryIDs = ArticleCategory::getAccessibleCategoryIDs();
         if (!empty($accessibleCategoryIDs)) {
             $commentList->sqlJoins .= '
-                INNER JOIN  wcf' . WCF_N . '_article_content article_content
+                INNER JOIN  wcf1_article_content article_content
                 ON          article_content.articleContentID = comment.objectID
-                INNER JOIN  wcf' . WCF_N . '_article article
+                INNER JOIN  wcf1_article article
                 ON          article.articleID = article_content.articleID';
             $commentList->sqlSelects = 'article_content.title';
 
index 4dae577d31c6e82467e51c884297e751aa7c2d7c..65642c69bf5ade5cd8a4d9c49b2fc86e466357a9 100644 (file)
@@ -177,13 +177,13 @@ class BoxHandler extends SingletonFactory
                     (box.visibleEverywhere = ?
                     AND boxID NOT IN (
                         SELECT  boxID
-                        FROM    wcf' . WCF_N . '_box_to_page
+                        FROM    wcf1_box_to_page
                         WHERE   pageID = ?
                             AND visible = ?
                     )) OR
                     boxID IN (
                         SELECT  boxID
-                        FROM    wcf' . WCF_N . '_box_to_page
+                        FROM    wcf1_box_to_page
                         WHERE   pageID = ?
                             AND visible = ?
                     )
@@ -203,9 +203,9 @@ class BoxHandler extends SingletonFactory
         $showOrders = [];
         if ($pageID) {
             $sql = "SELECT  boxID, showOrder
-                    FROM    wcf" . WCF_N . "_page_box_order
+                    FROM    wcf1_page_box_order
                     WHERE   pageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$pageID]);
             while ($row = $statement->fetchArray()) {
                 $showOrders[$row['boxID']] = $row['showOrder'];
@@ -262,9 +262,9 @@ class BoxHandler extends SingletonFactory
     public static function hasCustomShowOrder($pageID)
     {
         $sql = "SELECT  COUNT(*) AS count
-                FROM    wcf" . WCF_N . "_page_box_order
+                FROM    wcf1_page_box_order
                 WHERE   pageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$pageID]);
 
         return $statement->fetchSingleColumn() > 0;
index 8d80d2633bf8ff60e44a9062c109198839ff1640..2c3f2aee43a93755b32c63f79e66b23f9da80256 100644 (file)
@@ -33,7 +33,7 @@ class ProfileCommentListBoxController extends AbstractCommentListBoxController
         if (WCF::getSession()->getPermission('user.profile.canViewUserProfile')) {
             $optionID = User::getUserOptionID('canViewProfile');
             $commentList->sqlJoins .= '
-                INNER JOIN  wcf' . WCF_N . '_user_option_value user_option_value
+                INNER JOIN  wcf1_user_option_value user_option_value
                 ON          user_option_value.userID = comment.objectID';
 
             if (WCF::getUser()->userID) {
index 9d49d29487949047bba36287b4bc213301b246eb..8e788e0be3250cca2a31d2870f234d0b4de9c8c4 100644 (file)
@@ -29,10 +29,10 @@ class StaffOnlineListBoxController extends AbstractDatabaseObjectListBoxControll
         $objectList->getConditionBuilder()->add(
             'session.userID IN (
                 SELECT  userID
-                FROM    wcf' . WCF_N . '_user_to_group
+                FROM    wcf1_user_to_group
                 WHERE   groupID IN (
                             SELECT  groupID
-                            FROM    wcf' . WCF_N . '_user_group
+                            FROM    wcf1_user_group
                             WHERE   showOnTeamPage = ?
                         )
             )',
index 1220f580e16cb9520e680a78f28d98248013ada2..126530e457bcdc405835fbb716fbcf597378494e 100644 (file)
@@ -76,18 +76,18 @@ class UserTrophyListBoxController extends AbstractDatabaseObjectListBoxControlle
             $list->sqlConditionJoins .= ' ';
         }
         $list->sqlJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_trophy trophy
+            LEFT JOIN   wcf1_trophy trophy
             ON          user_trophy.trophyID = trophy.trophyID';
         $list->sqlConditionJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_trophy trophy
+            LEFT JOIN   wcf1_trophy trophy
             ON          user_trophy.trophyID = trophy.trophyID';
 
         // trophy category join
         $list->sqlJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_category category
+            LEFT JOIN   wcf1_category category
             ON          trophy.categoryID = category.categoryID';
         $list->sqlConditionJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_category category
+            LEFT JOIN   wcf1_category category
             ON          trophy.categoryID = category.categoryID';
 
         $list->getConditionBuilder()->add('trophy.isDisabled = ?', [0]);
@@ -97,14 +97,14 @@ class UserTrophyListBoxController extends AbstractDatabaseObjectListBoxControlle
         if (!WCF::getUser()->userID) {
             $list->getConditionBuilder()->add('user_trophy.userID IN (
                 SELECT  userID
-                FROM    wcf' . WCF_N . '_user_option_value
+                FROM    wcf1_user_option_value
                 WHERE   userOption' . $canViewTrophiesOptionID . ' = 0
             )');
         } elseif (!WCF::getSession()->getPermission('admin.general.canViewPrivateUserOptions')) {
             $conditionBuilder = new PreparedStatementConditionBuilder(false, 'OR');
             $conditionBuilder->add('user_trophy.userID IN (
                 SELECT  userID
-                FROM    wcf' . WCF_N . '_user_option_value
+                FROM    wcf1_user_option_value
                 WHERE   (
                             userOption' . $canViewTrophiesOptionID . ' = 0
                          OR userOption' . $canViewTrophiesOptionID . ' = 1
@@ -114,13 +114,13 @@ class UserTrophyListBoxController extends AbstractDatabaseObjectListBoxControlle
             $friendshipConditionBuilder = new PreparedStatementConditionBuilder(false);
             $friendshipConditionBuilder->add('user_trophy.userID IN (
                 SELECT  userID
-                FROM    wcf' . WCF_N . '_user_option_value
+                FROM    wcf1_user_option_value
                 WHERE   userOption' . $canViewTrophiesOptionID . ' = 2
             )');
             $friendshipConditionBuilder->add(
                 'user_trophy.userID IN (
                     SELECT  userID
-                    FROM    wcf' . WCF_N . '_user_follow
+                    FROM    wcf1_user_follow
                     WHERE   followUserID = ?
                 )',
                 [WCF::getUser()->userID]
index 0cd5c3a47381f45e7895d6b51d675ec251a4201c..1d312a042ed4b44390f1e68f0c902268f3a0756f 100644 (file)
@@ -46,18 +46,18 @@ final class CreateBoxToPageAssignments
         }
 
         if (($this->visible && $box->visibleEverywhere) || (!$this->visible && !$box->visibleEverywhere)) {
-            $sql = "DELETE FROM     wcf" . WCF_N . "_box_to_page
+            $sql = "DELETE FROM     wcf1_box_to_page
                     WHERE           boxID = ?
                             AND pageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             foreach ($pages as $page) {
                 $statement->execute([$box->boxID, $page->pageID]);
             }
         } else {
-            $sql = "REPLACE INTO    wcf" . WCF_N . "_box_to_page
+            $sql = "REPLACE INTO    wcf1_box_to_page
                                     (boxID, pageID, visible)
                     VALUES          (?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             foreach ($pages as $page) {
                 $statement->execute([$box->boxID, $page->pageID, $this->visible ? 1 : 0]);
             }
index bc4733c4da113e69293e6b5b306de68dca9f3709..02949f18f4ebadbcb9db12f6255db486061ae34f 100644 (file)
@@ -41,9 +41,9 @@ abstract class AbstractUserBulkProcessingAction extends AbstractBulkProcessingAc
         $conditionBuilder->add('userID IN (?)', [$userList->getObjectIDs()]);
 
         $sql = "SELECT  userID, groupID
-                FROM    wcf" . WCF_N . "_user_to_group
+                FROM    wcf1_user_to_group
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
         $groupIDs = $statement->fetchMap('userID', 'groupID', false);
 
index 3ee986867dcac6e38b32ec5aac5f6515328cb307..670c322fc08118e62b0b95c40ed04d896f805651 100644 (file)
@@ -32,16 +32,16 @@ class ArticleCategoryLabelCacheBuilder extends AbstractCacheBuilder
         $conditionBuilder->add(
             'objectID IN (
                 SELECT  categoryID
-                FROM    wcf' . WCF_N . '_category
+                FROM    wcf1_category
                 WHERE   objectTypeID = ?
             )',
             [CategoryHandler::getInstance()->getObjectTypeByName('com.woltlab.wcf.article.category')->objectTypeID]
         );
 
         $sql = "SELECT  groupID, objectID
-                FROM    wcf" . WCF_N . "_label_group_to_object
+                FROM    wcf1_label_group_to_object
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         return $statement->fetchMap('objectID', 'groupID', false);
index 7f3636ab1046e2e86264b15cd1b7761da6eb58a9..a61283155f32aa9ae4fcaa183985e162817b49fc 100644 (file)
@@ -25,11 +25,11 @@ class BBCodeCacheBuilder extends AbstractCacheBuilder
 
         // get attributes
         $sql = "SELECT      attribute.*, bbcode.bbcodeTag
-                FROM        wcf" . WCF_N . "_bbcode_attribute attribute
-                LEFT JOIN   wcf" . WCF_N . "_bbcode bbcode
+                FROM        wcf1_bbcode_attribute attribute
+                LEFT JOIN   wcf1_bbcode bbcode
                 ON          bbcode.bbcodeID = attribute.bbcodeID
                 ORDER BY    attribute.attributeNo";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             if (!isset($attributes[$row['bbcodeTag']])) {
index cec9ed9ec96547a4ad504fd6454e58347c9a2066..f83e43d184761a6602b8d827cfa985740307a2c2 100644 (file)
@@ -21,7 +21,7 @@ class CategoryCacheBuilder extends AbstractCacheBuilder
         $list = new CategoryList();
         $list->sqlSelects = "object_type.objectType";
         $list->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_object_type object_type
+            LEFT JOIN   wcf1_object_type object_type
             ON          object_type.objectTypeID = category.objectTypeID";
         $list->sqlOrderBy = "category.showOrder ASC";
         $list->readObjects();
index ce30dcece12885391998ad0a169fd1a330fb46f1..57831ccd225060317b7f507a03777d5c9f8fc132 100644 (file)
@@ -19,8 +19,8 @@ class ClipboardPageCacheBuilder extends AbstractCacheBuilder
     public function rebuild(array $parameters)
     {
         $sql = "SELECT  pageClassName, actionID
-                FROM    wcf" . WCF_N . "_clipboard_page";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_clipboard_page";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         return $statement->fetchMap('pageClassName', 'actionID', false);
index 180710ae2ff8beba767d75e238eddef4d69dee04..b4b647495860fdd15571308889fd707899fbc249 100644 (file)
@@ -20,9 +20,9 @@ class CronjobCacheBuilder extends AbstractCacheBuilder
     {
         $sql = "SELECT  MIN(nextExec) AS nextExec,
                         MIN(afterNextExec) AS afterNextExec
-                FROM    wcf" . WCF_N . "_cronjob
+                FROM    wcf1_cronjob
                 WHERE   isDisabled = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([0]);
         $row = $statement->fetchArray();
 
index 4be8c008d2163eefe5e3e14fecb7b2ac750ca79c..78b454404ff3ad3d4700cc3f8d9afe6f418cbb7c 100644 (file)
@@ -34,9 +34,9 @@ class EventListenerCacheBuilder extends AbstractCacheBuilder
         ];
 
         $sql = "SELECT      *
-                FROM        wcf" . WCF_N . "_event_listener
+                FROM        wcf1_event_listener
                 ORDER BY    niceValue ASC, listenerClassName ASC";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         /** @var EventListener $eventListener */
index 2a764448a1d9ad00bf1981f440c9c5967577cf45..1a05b981d8ce04c86fb16384198aa4cbccc46dc1 100644 (file)
@@ -29,8 +29,8 @@ class ObjectTypeCacheBuilder extends AbstractCacheBuilder
 
         // get definitions
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_object_type_definition";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_object_type_definition";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             $data['definitions'][$row['definitionID']] = new ObjectTypeDefinition(null, $row);
@@ -46,8 +46,8 @@ class ObjectTypeCacheBuilder extends AbstractCacheBuilder
 
         // get object types
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_object_type object_type";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_object_type object_type";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             $data['objectTypes'][$row['objectTypeID']] = $objectType = new ObjectType(null, $row);
index 2ff47dd0ff33daa800b9262660f9e110c50495a6..d0e7fdb6130232394d12127952cf826097832388 100644 (file)
@@ -47,9 +47,9 @@ class OptionCacheBuilder extends AbstractCacheBuilder
 
         // option categories
         $sql = "SELECT      *
-                FROM        " . $this->application . WCF_N . "_" . $this->tableName . "_category
+                FROM        " . $this->application . "1_" . $this->tableName . "_category
                 ORDER BY    showOrder";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         while ($category = $statement->fetchObject(OptionCategory::class)) {
             $data['categories'][$category->categoryName] = $category;
@@ -62,9 +62,9 @@ class OptionCacheBuilder extends AbstractCacheBuilder
 
         // options
         $sql = "SELECT      *
-                FROM        " . $this->application . WCF_N . "_" . $this->tableName . "
+                FROM        " . $this->application . "1_" . $this->tableName . "
                 ORDER BY    showOrder";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         while ($row = $statement->fetchArray()) {
index 5031a105da3fcd2911e49048288e22e39cc6d2da..0027a366eeb538317ba36316632876dfd0a0bd09 100644 (file)
@@ -36,8 +36,8 @@ class PageCacheBuilder extends AbstractCacheBuilder
 
         // get page titles
         $sql = "SELECT  pageID, languageID, title, metaDescription
-                FROM    wcf" . WCF_N . "_page_content";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_page_content";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             $pageID = $row['pageID'];
index 6367cb4966a1dd057cad5e9fb50365c155752eed..0d4a5259fae78a1653cff9589f9c5ce52f3e9fa9 100644 (file)
@@ -24,9 +24,9 @@ class SimpleAclCacheBuilder extends AbstractCacheBuilder
         $objectTypeID = SimpleAclHandler::getInstance()->getObjectTypeID($parameters['objectType']);
 
         $sql = "SELECT  objectID, userID
-                FROM    wcf" . WCF_N . "_acl_simple_to_user
+                FROM    wcf1_acl_simple_to_user
                 WHERE   objectTypeID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$objectTypeID]);
         while ($row = $statement->fetchArray()) {
             $objectID = $row['objectID'];
@@ -42,9 +42,9 @@ class SimpleAclCacheBuilder extends AbstractCacheBuilder
         }
 
         $sql = "SELECT  objectID, groupID
-                FROM    wcf" . WCF_N . "_acl_simple_to_group
+                FROM    wcf1_acl_simple_to_group
                 WHERE   objectTypeID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$objectTypeID]);
         while ($row = $statement->fetchArray()) {
             $objectID = $row['objectID'];
index 218a7baa98009495a2ed9e6e30d8a062fec20fa6..9b841c4a529872d69d449c80317d04c84c8e7675 100644 (file)
@@ -23,9 +23,9 @@ class SmileyCacheBuilder extends AbstractCacheBuilder
 
         // get smilies
         $sql = "SELECT      *
-                FROM        wcf" . WCF_N . "_smiley
+                FROM        wcf1_smiley
                 ORDER BY    showOrder";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         /** @var Smiley $object */
index 187a3d7b5b8ec86d48c6df3ed5d200b88166985d..e50331d6c1d038feca8affaf2c794fae7ea045ef 100644 (file)
@@ -26,9 +26,9 @@ class StyleCacheBuilder extends AbstractCacheBuilder
 
         // get all styles
         $sql = "SELECT      *
-                FROM        wcf" . WCF_N . "_style
+                FROM        wcf1_style
                 ORDER BY    styleName ASC";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             if ($row['isDefault']) {
index afd0717e0bdb63f9ab09b3757dd5a5f761ebf3a7..7b6d2df9755185191466fffcfe180367d86f3ec2 100644 (file)
@@ -89,13 +89,13 @@ class TagCloudCacheBuilder extends AbstractCacheBuilder
             $conditionBuilder->add('object.objectTypeID IN (?)', [$this->objectTypeIDs]);
             $conditionBuilder->add('tag.languageID IN (?)', [$this->languageIDs]);
             $sql = "SELECT      tag.tagID, COUNT(*) AS counter
-                    FROM        wcf" . WCF_N . "_tag_to_object object
-                    INNER JOIN  wcf" . WCF_N . "_tag tag
+                    FROM        wcf1_tag_to_object object
+                    INNER JOIN  wcf1_tag tag
                             ON  tag.tagID = object.tagID
                     " . $conditionBuilder . "
                     GROUP BY    tag.tagID
                     ORDER BY    counter DESC";
-            $statement = WCF::getDB()->prepareStatement($sql, 500);
+            $statement = WCF::getDB()->prepare($sql, 500);
             $statement->execute($conditionBuilder->getParameters());
             $tagIDs = $statement->fetchMap('tagID', 'counter');
 
@@ -104,9 +104,9 @@ class TagCloudCacheBuilder extends AbstractCacheBuilder
                 $conditionBuilder = new PreparedStatementConditionBuilder();
                 $conditionBuilder->add('tagID IN (?)', [\array_keys($tagIDs)]);
                 $sql = "SELECT  *
-                        FROM    wcf" . WCF_N . "_tag
+                        FROM    wcf1_tag
                         " . $conditionBuilder;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditionBuilder->getParameters());
                 while ($row = $statement->fetchArray()) {
                     $row['counter'] = $tagIDs[$row['tagID']];
index 816addf3e453d1266f13e0fa72fb92909734277e..728949fc413dcbc389588d178a00945fd4143827 100644 (file)
@@ -33,9 +33,9 @@ class UserBirthdayCacheBuilder extends AbstractCacheBuilder
         $data = [];
         $birthday = 'userOption' . $userOptionID;
         $sql = "SELECT  userID, " . $birthday . "
-                FROM    wcf" . WCF_N . "_user_option_value
+                FROM    wcf1_user_option_value
                 WHERE   " . $birthday . " LIKE ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(['%-' . ($parameters['month'] < 10 ? '0' : '') . $parameters['month'] . '-%']);
         while ($row = $statement->fetchArray()) {
             [, $month, $day] = \explode('-', $row[$birthday]);
index a06fc8704f144f540b89cabd33de24a0e6adba00..4ab4cf826b957e2748907c8a8ef0e9f4850e42eb 100644 (file)
@@ -38,9 +38,9 @@ class UserGroupPermissionCacheBuilder extends AbstractCacheBuilder
             foreach ($parameters as $groupID) {
                 if (UserGroup::getGroupByID($groupID)->groupType == UserGroup::GUESTS) {
                     $sql = "SELECT  optionName, additionalData
-                            FROM    wcf" . WCF_N . "_user_group_option
+                            FROM    wcf1_user_group_option
                             WHERE   optionType = 'boolean'";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute();
                     while ($option = $statement->fetchObject(UserGroupOption::class)) {
                         if ($option->excludedInTinyBuild) {
@@ -64,11 +64,11 @@ class UserGroupPermissionCacheBuilder extends AbstractCacheBuilder
                             option_value.groupID,
                             option_table.enableOptions,
                             option_table.usersOnly
-                FROM        wcf" . WCF_N . "_user_group_option_value option_value
-                LEFT JOIN   wcf" . WCF_N . "_user_group_option option_table
+                FROM        wcf1_user_group_option_value option_value
+                LEFT JOIN   wcf1_user_group_option option_table
                 ON          option_table.optionID = option_value.optionID
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         while ($row = $statement->fetchArray()) {
             if (
index f6828f1e7f7b8e7b14a1ed9a7ce4c35733939613..a4919fdb318e3a75c63e70fbf271e93e73de2b7d 100644 (file)
@@ -24,10 +24,10 @@ class UserMenuCacheBuilder extends AbstractCacheBuilder
 
         // get all option categories
         $sql = "SELECT      *
-                FROM        wcf" . WCF_N . "_user_option_category
+                FROM        wcf1_user_option_category
                 WHERE       parentCategoryName = ?
                 ORDER BY    showOrder ASC";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(['settings']);
         while ($row = $statement->fetchArray()) {
             if (!isset($data['wcf.user.menu.settings'])) {
@@ -49,9 +49,9 @@ class UserMenuCacheBuilder extends AbstractCacheBuilder
 
         // get all menu items
         $sql = "SELECT      *
-                FROM        wcf" . WCF_N . "_user_menu_item
+                FROM        wcf1_user_menu_item
                 ORDER BY    showOrder ASC";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             if (!isset($data[$row['parentMenuItem']])) {
index 52dd5cfe2c43e98e7f3d7c9e6a3521c511fce86d..da0973c15f599576eac7c89f5b21b94bd17f4bea 100644 (file)
@@ -23,10 +23,10 @@ class UserNotificationEventCacheBuilder extends AbstractCacheBuilder
 
         // get events
         $sql = "SELECT      event.*, object_type.objectType
-                FROM        wcf" . WCF_N . "_user_notification_event event
-                LEFT JOIN   wcf" . WCF_N . "_object_type object_type
+                FROM        wcf1_user_notification_event event
+                LEFT JOIN   wcf1_object_type object_type
                 ON          object_type.objectTypeID = event.objectTypeID";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             if (!isset($data[$row['objectType']])) {
index 7ac5cd7bb9f4f913f6d92760bf40f10f20f9cb25..b138be95684efba0677c96ac4436eaa702f2cc93 100644 (file)
@@ -28,16 +28,16 @@ class UserStatsCacheBuilder extends AbstractCacheBuilder
 
         // number of members
         $sql = "SELECT  COUNT(*) AS amount
-                FROM    wcf" . WCF_N . "_user";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_user";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $data['members'] = $statement->fetchColumn();
 
         // newest member
         $sql = "SELECT      userID
-                FROM        wcf" . WCF_N . "_user
+                FROM        wcf1_user
                 ORDER BY    userID DESC";
-        $statement = WCF::getDB()->prepareStatement($sql, 1);
+        $statement = WCF::getDB()->prepare($sql, 1);
         $statement->execute();
         $data['newestMember'] = UserProfileRuntimeCache::getInstance()->getObject($statement->fetchSingleColumn());
 
index 8c7bd5eecb7c8e19a2550665f870a5292518f63c..d498afcb509479978e70a5253a2678242c3642ab 100644 (file)
@@ -26,15 +26,15 @@ class WhoWasOnlineCacheBuilder extends AbstractCacheBuilder
         $userIDs = [];
         $sql = "(
                     SELECT  userID
-                    FROM    wcf" . WCF_N . "_user
+                    FROM    wcf1_user
                     WHERE   lastActivityTime > ?
                 ) UNION (
                     SELECT  userID
-                    FROM    wcf" . WCF_N . "_session
+                    FROM    wcf1_session
                     WHERE   userID IS NOT NULL
                         AND lastActivityTime > ?
                 )";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([TIME_NOW - 86400, TIME_NOW - USER_ONLINE_TIMEOUT]);
         while ($userID = $statement->fetchColumn()) {
             $userIDs[] = $userID;
index 90e618b88b16ba10b2d563b5f93dcabfebe5f711..b55489ebf3372e249d301df852f1ca6df731982b 100644 (file)
@@ -71,10 +71,10 @@ abstract class AbstractCategoryType extends SingletonFactory implements ICategor
             // move child categories to parent category
             $conditionBuilder = new PreparedStatementConditionBuilder();
             $conditionBuilder->add("categoryID IN (?)", [$categoryIDs]);
-            $sql = "UPDATE  wcf" . WCF_N . "_category
+            $sql = "UPDATE  wcf1_category
                     SET     parentCategoryID = ?
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute(\array_merge([$categoryEditor->parentCategoryID], $conditionBuilder->getParameters()));
         }
 
index da3945c9022be7b62f2bee36cd8215f83505a361..a0f6c6f57b0838f846452b56616781a4a906d122 100644 (file)
@@ -67,9 +67,9 @@ class TrophyCategoryType extends AbstractCategoryType
             $userTrophyList->sqlJoins .= ' ';
         }
         $userTrophyList->sqlJoins .= '
-            LEFT JOIN   wcf' . WCF_N . '_trophy trophy
+            LEFT JOIN   wcf1_trophy trophy
             ON          user_trophy.trophyID = trophy.trophyID
-            LEFT JOIN   wcf' . WCF_N . '_category category
+            LEFT JOIN   wcf1_category category
             ON          trophy.categoryID = category.categoryID';
 
         $userTrophyList->getConditionBuilder()->add('trophy.isDisabled = ?', [0]);
index 10809907534ccf8be2e61e4fc2f011d444e6bd51..c37deb78bc50f4453b5e1320a48218998572e0e8 100644 (file)
@@ -129,8 +129,8 @@ class ImportCLICommand implements ICLICommand
 
         // step 1) previous import
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_import_mapping";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_import_mapping";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         if ($statement->fetchSingleColumn()) {
             CLIWCF::getReader()->println(StringUtil::stripHTML(WCF::getLanguage()->getDynamicVariable('wcf.acp.dataImport.existingMapping.notice')));
index 77999a9e9deaea736fe7e6bcf4a02806b0766274..4dda5691a3cc4fc70eeddafe48c1fbdba13aa003 100644 (file)
@@ -101,10 +101,10 @@ class ClipboardHandler extends SingletonFactory
         // remove existing entries first, prevents conflict with INSERT
         $this->unmark($objectIDs, $objectTypeID);
 
-        $sql = "INSERT INTO wcf" . WCF_N . "_clipboard_item
+        $sql = "INSERT INTO wcf1_clipboard_item
                             (objectTypeID, userID, objectID)
                 VALUES      (?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($objectIDs as $objectID) {
             $statement->execute([
                 $objectTypeID,
@@ -131,9 +131,9 @@ class ClipboardHandler extends SingletonFactory
         $conditions->add("objectID IN (?)", [$objectIDs]);
         $conditions->add("userID = ?", [WCF::getUser()->userID]);
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_clipboard_item
+        $sql = "DELETE FROM wcf1_clipboard_item
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
     }
 
@@ -144,10 +144,10 @@ class ClipboardHandler extends SingletonFactory
      */
     public function unmarkAll($objectTypeID)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_clipboard_item
+        $sql = "DELETE FROM wcf1_clipboard_item
                 WHERE       objectTypeID = ?
                         AND userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             WCF::getUser()->userID,
@@ -227,9 +227,9 @@ class ClipboardHandler extends SingletonFactory
 
         // fetch object ids
         $sql = "SELECT  objectTypeID, objectID
-                FROM    wcf" . WCF_N . "_clipboard_item
+                FROM    wcf1_clipboard_item
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         // group object ids by type name
@@ -282,9 +282,9 @@ class ClipboardHandler extends SingletonFactory
                 $conditions->add("userID = ?", [WCF::getUser()->userID]);
                 $conditions->add("objectID IN (?)", [$objectData['objectIDs']]);
 
-                $sql = "DELETE FROM wcf" . WCF_N . "_clipboard_item
+                $sql = "DELETE FROM wcf1_clipboard_item
                         " . $conditions;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditions->getParameters());
             }
         }
@@ -432,9 +432,9 @@ class ClipboardHandler extends SingletonFactory
             $conditions->add("objectTypeID = ?", [$typeID]);
         }
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_clipboard_item
+        $sql = "DELETE FROM wcf1_clipboard_item
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
     }
 
@@ -457,9 +457,9 @@ class ClipboardHandler extends SingletonFactory
         }
 
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_clipboard_item
+                FROM    wcf1_clipboard_item
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         return $statement->fetchSingleColumn() ? 1 : 0;
index 6e63ed1c24f1c5b7f437c002890d3cf5d1ba4b25..ffc45ccd1610d5ecfc0d9d8331a03adcb214f996 100644 (file)
@@ -179,9 +179,9 @@ class UserClipboardAction extends AbstractClipboardAction
         $conditions->add("userID IN (?)", [$userIDs]);
 
         $sql = "SELECT  userID, groupID
-                FROM    wcf" . WCF_N . "_user_to_group
+                FROM    wcf1_user_to_group
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         $userToGroup = $statement->fetchMap('userID', 'groupID', false);
index dc6a9377be1a796a6420fb0e90e70b4aa229b14b..a395b12893893a588f410310550e73545f805186 100644 (file)
@@ -282,7 +282,7 @@ class CommentHandler extends SingletonFactory
             );
             $notificationList->getConditionBuilder()->add('user_notification.userID = ?', [WCF::getUser()->userID]);
             $notificationList->sqlJoins .= "
-                LEFT JOIN   wcf" . WCF_N . "_comment comment
+                LEFT JOIN   wcf1_comment comment
                 ON          comment.commentID = user_notification.objectID
                         AND comment.objectTypeID = " . \intval($this->getObjectTypeID($objectType));
             $notificationList->getConditionBuilder()->add('comment.objectID IN (?)', [$objectIDs]);
@@ -331,7 +331,7 @@ class CommentHandler extends SingletonFactory
             );
             $notificationList->getConditionBuilder()->add('user_notification.userID = ?', [WCF::getUser()->userID]);
             $notificationList->sqlJoins .= "
-                LEFT JOIN   wcf" . WCF_N . "_comment comment
+                LEFT JOIN   wcf1_comment comment
                 ON          comment.commentID = user_notification.baseObjectID
                         AND comment.objectTypeID = " . \intval($this->getObjectTypeID($objectType));
             $notificationList->getConditionBuilder()->add('comment.objectID IN (?)', [$objectIDs]);
@@ -380,9 +380,9 @@ class CommentHandler extends SingletonFactory
             );
             $notificationList->getConditionBuilder()->add('user_notification.userID = ?', [WCF::getUser()->userID]);
             $notificationList->sqlJoins .= "
-                LEFT JOIN   wcf" . WCF_N . "_comment_response comment_response
+                LEFT JOIN   wcf1_comment_response comment_response
                 ON          comment_response.responseID = user_notification.objectID
-                LEFT JOIN   wcf" . WCF_N . "_comment comment
+                LEFT JOIN   wcf1_comment comment
                 ON          comment.commentID = comment_response.commentID";
             $notificationList->getConditionBuilder()->add(
                 'comment.objectTypeID IN (?)',
@@ -434,9 +434,9 @@ class CommentHandler extends SingletonFactory
             );
             $notificationList->getConditionBuilder()->add('user_notification.userID = ?', [WCF::getUser()->userID]);
             $notificationList->sqlJoins .= "
-                LEFT JOIN   wcf" . WCF_N . "_comment_response comment_response
+                LEFT JOIN   wcf1_comment_response comment_response
                 ON          comment_response.responseID = user_notification.baseObjectID
-                LEFT JOIN   wcf" . WCF_N . "_comment comment
+                LEFT JOIN   wcf1_comment comment
                 ON          comment.commentID = comment_response.commentID";
             $notificationList->getConditionBuilder()->add(
                 'comment.objectTypeID IN (?)',
index f445907d507ada4f18a42938c4de9b8a17e03eea..93c3f6977420a999150dfa25c8bfc8c7b392de31 100644 (file)
@@ -80,7 +80,7 @@ class UserGroupCondition extends AbstractMultipleFieldsCondition implements
             $objectList->getConditionBuilder()->add(
                 $tableName . '.userID IN (
                     SELECT      userID
-                    FROM        wcf' . WCF_N . '_user_to_group
+                    FROM        wcf1_user_to_group
                     WHERE       groupID IN (?)
                     GROUP BY    userID
                     HAVING      COUNT(userID) = ?
@@ -92,7 +92,7 @@ class UserGroupCondition extends AbstractMultipleFieldsCondition implements
             $objectList->getConditionBuilder()->add(
                 $tableName . '.userID NOT IN (
                     SELECT  userID
-                    FROM    wcf' . WCF_N . '_user_to_group
+                    FROM    wcf1_user_to_group
                     WHERE   groupID IN (?)
                 )',
                 [$conditionData['notGroupIDs']]
index 801ba0f125fff647abc31d4f054cc6492771b166..ecb7e6d79b8527e5ee9d3a67919dacbf2f7d834e 100644 (file)
@@ -76,7 +76,7 @@ class UserTrophyCondition extends AbstractMultipleFieldsCondition implements
             $objectList->getConditionBuilder()->add(
                 'user_table.userID IN (
                     SELECT      userID
-                    FROM        wcf' . WCF_N . '_user_trophy
+                    FROM        wcf1_user_trophy
                     WHERE       trophyID IN (?)
                     GROUP BY    userID
                     HAVING      COUNT(DISTINCT trophyID) = ?
@@ -88,7 +88,7 @@ class UserTrophyCondition extends AbstractMultipleFieldsCondition implements
             $objectList->getConditionBuilder()->add(
                 'user_table.userID NOT IN (
                     SELECT  userID
-                    FROM    wcf' . WCF_N . '_user_trophy
+                    FROM    wcf1_user_trophy
                     WHERE   trophyID IN (?)
                 )',
                 [$conditionData['notUserTrophyIDs']]
index f3e6b383e367c694c1a56af859f619d85666cf0e..4ae7c4805797a7266860d50dfb68ab74ab5cc42d 100644 (file)
@@ -60,10 +60,10 @@ class AttachmentCleanUpCronjob extends AbstractCronjob
     protected function getOldContactAttachmentIDs()
     {
         $sql = "SELECT  attachmentID
-                FROM    wcf" . WCF_N . "_attachment
+                FROM    wcf1_attachment
                 WHERE   objectTypeID = ?
                     AND uploadTime < ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             ObjectTypeCache::getInstance()
                 ->getObjectTypeIDByName('com.woltlab.wcf.attachment.objectType', 'com.woltlab.wcf.contact'),
index 60a750f616138e61cdca06613292a83e8723d8a2..c7a53b3450e4ccdb980686776f303583578e4452 100644 (file)
@@ -32,12 +32,12 @@ class BackgroundQueueCleanUpCronjob extends AbstractCronjob
         $uniqueJobs = [];
         try {
             $sql = "SELECT      jobID, job
-                    FROM        wcf" . WCF_N . "_background_job
+                    FROM        wcf1_background_job
                     WHERE       status = ?
                             AND time <= ?
                     ORDER BY    time ASC, jobID ASC
                     FOR UPDATE";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 'processing',
                 TIME_NOW - 600, // running longer than 10 minutes
@@ -79,9 +79,9 @@ class BackgroundQueueCleanUpCronjob extends AbstractCronjob
             // delete jobs
             $condition = new PreparedStatementConditionBuilder();
             $condition->add('jobID IN (?)', [$jobIDs]);
-            $sql = "DELETE FROM wcf" . WCF_N . "_background_job
+            $sql = "DELETE FROM wcf1_background_job
                     " . $condition;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($condition->getParameters());
 
             WCF::getDB()->commitTransaction();
index 5e43bbfe78358cede01cc17f0f3c5b80966dd17b..301bc7b4b5c74dfb868e4aefe19ad9cd93766d61 100644 (file)
@@ -120,12 +120,12 @@ final class CronjobScheduler extends SingletonFactory
         $committed = false;
         try {
             $sql = "SELECT      *
-                    FROM        wcf" . WCF_N . "_cronjob
+                    FROM        wcf1_cronjob
                     WHERE       state <> ?
                             AND isDisabled = ?
                             AND afterNextExec <= ?
                     FOR UPDATE";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 Cronjob::READY,
                 0,
@@ -211,13 +211,13 @@ final class CronjobScheduler extends SingletonFactory
         $committed = false;
         try {
             $sql = "SELECT      *
-                    FROM        wcf" . WCF_N . "_cronjob
+                    FROM        wcf1_cronjob
                     WHERE       isDisabled = ?
                             AND state = ?
                             AND nextExec <= ?
                     ORDER BY    failCount ASC
                     FOR UPDATE";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 0,
                 Cronjob::READY,
index 1b99d7fa51f54e6ff9c8e4c68b2691513cf01ef6..989c039d857ea5e53853fde3fc4eb15684bf3ad0 100644 (file)
@@ -40,11 +40,11 @@ class DailyMailNotificationCronjob extends AbstractCronjob
 
         // get user ids
         $sql = "SELECT  DISTINCT userID
-                FROM    wcf" . WCF_N . "_user_notification
+                FROM    wcf1_user_notification
                 WHERE   mailNotified = ?
                     AND time < ?
                     AND confirmTime = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             0,
             TIME_NOW - 3600 * 23,
@@ -68,24 +68,24 @@ class DailyMailNotificationCronjob extends AbstractCronjob
         $conditions->add("notification.confirmTime = ?", [0]);
 
         $sql = "SELECT      notification.*, notification_event.eventID, object_type.objectType
-                FROM        wcf" . WCF_N . "_user_notification notification
-                LEFT JOIN   wcf" . WCF_N . "_user_notification_event notification_event
+                FROM        wcf1_user_notification notification
+                LEFT JOIN   wcf1_user_notification_event notification_event
                 ON          notification_event.eventID = notification.eventID
-                LEFT JOIN   wcf" . WCF_N . "_object_type object_type
+                LEFT JOIN   wcf1_object_type object_type
                 ON          object_type.objectTypeID = notification_event.objectTypeID
                 " . $conditions . "
                 ORDER BY    notification.time";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         // mark notifications as done
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$userIDs]);
         $conditions->add("mailNotified = ?", [0]);
-        $sql = "UPDATE  wcf" . WCF_N . "_user_notification
+        $sql = "UPDATE  wcf1_user_notification
                 SET     mailNotified = 1
                 " . $conditions;
-        $statement2 = WCF::getDB()->prepareStatement($sql);
+        $statement2 = WCF::getDB()->prepare($sql);
         $statement2->execute($conditions->getParameters());
 
         // collect data
@@ -116,10 +116,10 @@ class DailyMailNotificationCronjob extends AbstractCronjob
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("notificationID IN (?)", [\array_keys($notificationObjects)]);
         $sql = "SELECT      notificationID, authorID
-                FROM        wcf" . WCF_N . "_user_notification_author
+                FROM        wcf1_user_notification_author
                 " . $conditions . "
                 ORDER BY    time ASC";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $authorIDs = $authorToNotification = [];
         while ($row = $statement->fetchArray()) {
index 4216eb86a23129440c5a703f2a93825f0857100d..b35e884a568167756fe0e03e57084bc45723bf6c 100644 (file)
@@ -48,7 +48,7 @@ class ExpiringPaidSubscriptionUserCronjob extends AbstractCronjob
 
         $paidSubscriptionUserList = new PaidSubscriptionUserList();
         $paidSubscriptionUserList->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_paid_subscription paid_subscription
+            LEFT JOIN   wcf1_paid_subscription paid_subscription
             ON          paid_subscription.subscriptionID = paid_subscription_user.subscriptionID";
         $paidSubscriptionUserList->getConditionBuilder()->add('paid_subscription_user.endDate <> ?', [0]);
         $paidSubscriptionUserList->getConditionBuilder()->add(
index cb5c3a15d88ad51f1326942d77aba76b42cf3e8b..2ab37915b015f28febbe52e3053f457998d0f0da 100644 (file)
@@ -26,10 +26,10 @@ class ModerationQueueCronjob extends AbstractCronjob
         parent::execute($cronjob);
 
         $sql = "SELECT  queueID
-                FROM    wcf" . WCF_N . "_moderation_queue
+                FROM    wcf1_moderation_queue
                 WHERE   status IN (?, ?, ?)
                     AND lastChangeTime < ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             ModerationQueue::STATUS_DONE,
             ModerationQueue::STATUS_REJECTED,
@@ -42,9 +42,9 @@ class ModerationQueueCronjob extends AbstractCronjob
             $conditions = new PreparedStatementConditionBuilder();
             $conditions->add("queueID IN (?)", [$queueIDs]);
 
-            $sql = "DELETE FROM wcf" . WCF_N . "_moderation_queue
+            $sql = "DELETE FROM wcf1_moderation_queue
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
 
             // reset moderation count for all users
index 66028fd938c9082e6dc272d677efafe44850922b..0ed0ab1b068ee4de7a45bcaa6c7e8fe7676cef67 100644 (file)
@@ -35,7 +35,7 @@ class PruneIpAddressesCronjob extends AbstractCronjob
             return;
         }
 
-        $this->columns['wcf' . WCF_N . '_user']['registrationIpAddress'] = 'registrationDate';
+        $this->columns['wcf1_user']['registrationIpAddress'] = 'registrationDate';
 
         parent::execute($cronjob);
 
@@ -45,7 +45,7 @@ class PruneIpAddressesCronjob extends AbstractCronjob
                         SET     {$ipAddressColumn} = ?
                         WHERE   {$timestampColumn} <= ?
                             AND {$ipAddressColumn} <> ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     '',
                     TIME_NOW - 86400 * PRUNE_IP_ADDRESS, // 86400 = 1 day
index 32d9587b19c07de913a55a1af72b6ec21b539f29..34c5be80bfb98af14169e3f18cfa868c490c759b 100644 (file)
@@ -31,10 +31,10 @@ class StatDailyBuilderCronjob extends AbstractCronjob
         $date = $d->getTimestamp();
 
         // prepare insert statement
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_stat_daily
+        $sql = "INSERT IGNORE INTO  wcf1_stat_daily
                                     (objectTypeID, date, counter, total)
                 VALUES              (?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         // get object types
         foreach (ObjectTypeCache::getInstance()->getObjectTypes('com.woltlab.wcf.statDailyHandler') as $objectType) {
index 72442ead27f0e894b5593aaa94a24f505c09963d..3a4d846dd6b547e5b043269a1a290788e18735f7 100644 (file)
@@ -22,13 +22,13 @@ class UserBanCronjob extends AbstractCronjob
         parent::execute($cronjob);
 
         // unban users
-        $sql = "UPDATE  wcf" . WCF_N . "_user
+        $sql = "UPDATE  wcf1_user
                 SET     banned = ?,
                         banExpires = ?
                 WHERE   banned = ?
                     AND banExpires <> ?
                     AND banExpires <= ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             0,
             0,
@@ -38,13 +38,13 @@ class UserBanCronjob extends AbstractCronjob
         ]);
 
         // enable avatars
-        $sql = "UPDATE  wcf" . WCF_N . "_user
+        $sql = "UPDATE  wcf1_user
                 SET     disableAvatar = ?,
                         disableAvatarExpires = ?
                 WHERE   disableAvatar = ?
                     AND disableAvatarExpires <> ?
                     AND disableAvatarExpires <= ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             0,
             0,
@@ -54,13 +54,13 @@ class UserBanCronjob extends AbstractCronjob
         ]);
 
         // enable signatures
-        $sql = "UPDATE  wcf" . WCF_N . "_user
+        $sql = "UPDATE  wcf1_user
                 SET     disableSignature = ?,
                         disableSignatureExpires = ?
                 WHERE   disableSignature = ?
                     AND disableSignatureExpires <> ?
                     AND disableSignatureExpires <= ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             0,
             0,
@@ -70,13 +70,13 @@ class UserBanCronjob extends AbstractCronjob
         ]);
 
         // enable cover photos
-        $sql = "UPDATE  wcf" . WCF_N . "_user
+        $sql = "UPDATE  wcf1_user
                 SET     disableCoverPhoto = ?,
                         disableCoverPhotoExpires = ?
                 WHERE   disableCoverPhoto = ?
                     AND disableCoverPhotoExpires <> ?
                     AND disableCoverPhotoExpires <= ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             0,
             0,
index 621f1cbda0e6e14f3522d293165307c660bd10ff..2cccd692c770146ea50d4238010c6cdcaf51d53f 100644 (file)
@@ -23,10 +23,10 @@ class UserQuitCronjob extends AbstractCronjob
         parent::execute($cronjob);
 
         $sql = "SELECT  userID
-                FROM    wcf" . WCF_N . "_user
+                FROM    wcf1_user
                 WHERE   quitStarted > ?
                     AND quitStarted < ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             0,
             TIME_NOW - 7 * 24 * 3600,
index 7d474580f24763ec817c6d06f10fcfff3d15bb13..e16aa913ad7dbd065fbebf88fc3a1b7f2e6cd438 100644 (file)
@@ -90,7 +90,7 @@ class MySQLDatabase extends Database
     public function getVersion()
     {
         try {
-            $statement = $this->prepareStatement('SELECT VERSION()');
+            $statement = $this->prepare('SELECT VERSION()');
             $statement->execute();
 
             return $statement->fetchSingleColumn();
index 0fb1c68fe5356cac94cb623ab49cc91653d840cf..0be6a05c60bbdf0876c2fb5cbea8568000f37206 100644 (file)
@@ -22,7 +22,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
     {
         $existingTables = [];
         $sql = "SHOW TABLES FROM `" . $this->dbObj->getDatabaseName() . "`";
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray(\PDO::FETCH_NUM)) {
             $existingTables[] = $row[0];
@@ -40,7 +40,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
         $regex = new Regex('([a-z]+)\((.+)\)', Regex::CASE_INSENSITIVE);
 
         $sql = "SHOW COLUMNS FROM `" . $tableName . "`";
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             $regex->match($row['Type']);
@@ -110,7 +110,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
                 FROM    INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
                 WHERE   CONSTRAINT_SCHEMA = ?
                     AND TABLE_NAME = ?";
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute([
             $this->dbObj->getDatabaseName(),
             $tableName,
@@ -147,7 +147,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
         $sql = "SELECT  CONSTRAINT_NAME, COLUMN_NAME, REFERENCED_TABLE_NAME, REFERENCED_COLUMN_NAME
                 FROM    INFORMATION_SCHEMA.KEY_COLUMN_USAGE
                 " . $conditionBuilder;
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
         $keyColumnUsage = $statement->fetchAll(\PDO::FETCH_ASSOC);
 
@@ -172,7 +172,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
     {
         $sql = "SHOW    INDEX
                 FROM    `" . $tableName . "`";
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute();
         $indices = $statement->fetchAll(\PDO::FETCH_ASSOC);
 
@@ -207,7 +207,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
     {
         $indices = [];
         $sql = "SHOW INDEX FROM `" . $tableName . "`";
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute();
         while ($row = $statement->fetchArray()) {
             $indices[] = $row['Key_name'];
@@ -245,7 +245,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
                 " . (!empty($indexDefinition) ? ',' : '') . "
                 " . $indexDefinition . "
             ) ENGINE=InnoDB ROW_FORMAT=dynamic DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci";
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute();
     }
 
@@ -255,7 +255,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
     public function dropTable($tableName)
     {
         $sql = "DROP TABLE IF EXISTS `" . $tableName . "`";
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute();
     }
 
@@ -265,7 +265,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
     public function addColumn($tableName, $columnName, $columnData)
     {
         $sql = "ALTER TABLE `" . $tableName . "` ADD COLUMN " . $this->buildColumnDefinition($columnName, $columnData);
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute();
     }
 
@@ -278,7 +278,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
             $newColumnName,
             $newColumnData
         );
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute();
     }
 
@@ -315,7 +315,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
             }
         }
 
-        $this->dbObj->prepareStatement("ALTER TABLE `{$tableName}` " . \rtrim($queries, ','))->execute();
+        $this->dbObj->prepare("ALTER TABLE `{$tableName}` " . \rtrim($queries, ','))->execute();
     }
 
     /**
@@ -325,7 +325,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
     {
         try {
             $sql = "ALTER TABLE `" . $tableName . "` DROP COLUMN `" . $columnName . "`";
-            $statement = $this->dbObj->prepareStatement($sql);
+            $statement = $this->dbObj->prepare($sql);
             $statement->execute();
         } catch (DatabaseQueryExecutionException $e) {
             if ($e->getCode() != '42000') {
@@ -343,7 +343,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
     public function addIndex($tableName, $indexName, $indexData)
     {
         $sql = "ALTER TABLE `" . $tableName . "` ADD " . $this->buildIndexDefinition($indexName, $indexData);
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute();
     }
 
@@ -379,7 +379,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
             $sql .= " ON UPDATE " . $indexData['ON UPDATE'];
         }
 
-        $statement = $this->dbObj->prepareStatement($sql);
+        $statement = $this->dbObj->prepare($sql);
         $statement->execute();
     }
 
@@ -390,7 +390,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
     {
         try {
             $sql = "ALTER TABLE `" . $tableName . "` DROP INDEX `" . $indexName . "`";
-            $statement = $this->dbObj->prepareStatement($sql);
+            $statement = $this->dbObj->prepare($sql);
             $statement->execute();
         } catch (DatabaseQueryExecutionException $e) {
             if ($e->getCode() != '42000') {
@@ -409,7 +409,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
     {
         try {
             $sql = "ALTER TABLE " . $tableName . " DROP PRIMARY KEY";
-            $statement = $this->dbObj->prepareStatement($sql);
+            $statement = $this->dbObj->prepare($sql);
             $statement->execute();
         } catch (DatabaseQueryExecutionException $e) {
             if ($e->getCode() != '42000') {
@@ -428,7 +428,7 @@ class MySQLDatabaseEditor extends DatabaseEditor
     {
         try {
             $sql = "ALTER TABLE `" . $tableName . "` DROP FOREIGN KEY `" . $indexName . "`";
-            $statement = $this->dbObj->prepareStatement($sql);
+            $statement = $this->dbObj->prepare($sql);
             $statement->execute();
         } catch (DatabaseQueryExecutionException $e) {
             if ($e->getCode() != '42000') {
index b53af5bb3f49486cd4cec33876eec1a1bed1fc5c..fc96dfbedf889570fb3402253763879d08a5952e 100644 (file)
@@ -402,7 +402,7 @@ class SQLParser
      */
     protected function executeStandardStatement($query)
     {
-        $statement = WCF::getDB()->prepareStatement($query);
+        $statement = WCF::getDB()->prepare($query);
         $statement->execute();
     }
 
index 0b6f00ea50351634a0665fccba1ef10cccb3fa28..23fb348285c068721e30ab712282c6d82226c3bd 100644 (file)
@@ -257,10 +257,10 @@ trait TMultiXmlGuiPackageInstallationPlugin
      */
     protected function deleteObject(\DOMElement $element)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_language_item
+        $sql = "DELETE FROM wcf1_language_item
                 WHERE       languageItem = ?
                         AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$element->getAttribute('name')]);
     }
 }
index e083848203b36c15fe03ea2234bcf73284ee4434..7180962c78c049beb534ed4b11aaf291849223db 100644 (file)
@@ -597,7 +597,7 @@ XML;
             $sqlData = $this->findExistingItem($this->getElementData($oldElement, true));
 
             if ($sqlData !== null) {
-                $statement = WCF::getDB()->prepareStatement($sqlData['sql']);
+                $statement = WCF::getDB()->prepare($sqlData['sql']);
                 $statement->execute($sqlData['parameters']);
 
                 $existingRow = $statement->fetchArray() ?: [];
index 45730e86dcbe09620e2a073fae219d1dcf15672e..8419fd515fcb0d3dd159aa82dc2f55b0d1ba648f 100644 (file)
@@ -70,10 +70,10 @@ class EditHistoryManager extends SingletonFactory
         }
 
         // save new entry
-        $sql = "INSERT INTO wcf" . WCF_N . "_edit_history_entry
+        $sql = "INSERT INTO wcf1_edit_history_entry
                             (objectTypeID, objectID, message, time, obsoletedAt, userID, username, editReason, obsoletedByUserID)
                 VALUES      (?, ?, ?, ?, ?, ?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $this->getObjectTypeID($objectType),
             $objectID,
@@ -108,9 +108,9 @@ class EditHistoryManager extends SingletonFactory
             $conditionBuilder->add('objectTypeID = ?', [$objectTypeID]);
             $conditionBuilder->add('objectID IN (?)', [$batchObjectIDs]);
 
-            $sql = "DELETE FROM wcf" . WCF_N . "_edit_history_entry
+            $sql = "DELETE FROM wcf1_edit_history_entry
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
         }
         WCF::getDB()->commitTransaction();
@@ -135,14 +135,14 @@ class EditHistoryManager extends SingletonFactory
         //    b) by a non offending user
         $userIDPlaceholders = '?' . \str_repeat(',?', \count($userIDs) - 1);
         $sql = "SELECT      MAX(entryID)
-                FROM        wcf" . WCF_N . "_edit_history_entry revertTo
+                FROM        wcf1_edit_history_entry revertTo
                 INNER JOIN (
                     SELECT      vandalizedEntries.objectID,
                                 vandalizedEntries.objectTypeID
-                    FROM        wcf" . WCF_N . "_edit_history_entry vandalizedEntries
+                    FROM        wcf1_edit_history_entry vandalizedEntries
                     INNER JOIN (
                         SELECT      MAX(newestEntries.entryID) AS entryID
-                        FROM        wcf" . WCF_N . "_edit_history_entry newestEntries
+                        FROM        wcf1_edit_history_entry newestEntries
                         WHERE       newestEntries.obsoletedAt > ?
                         GROUP BY    newestEntries.objectTypeID, newestEntries.objectID
                     ) newestEntries2
@@ -157,7 +157,7 @@ class EditHistoryManager extends SingletonFactory
                                  OR revertTo.userID NOT IN(" . $userIDPlaceholders . ")
                             )
                 GROUP BY    revertTo.objectTypeID, revertTo.objectID";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge(
             [TIME_NOW - $timeframe],
             $userIDs,
index e4bd4bf37fa038df1c7e36311f4989478286a90a..aa9a3ecaf5eedbdcbcd63a665ecadb0aa786cf8f 100644 (file)
@@ -51,10 +51,10 @@ abstract class AbstractUserActionRenameListener implements IParameterizedEventLi
                 $databaseTable['username'] = 'username';
             }
 
-            $sql = "UPDATE  " . \str_replace('{WCF_N}', WCF_N, $databaseTable['name']) . "
+            $sql = "UPDATE  " . \str_replace('{WCF_N}', 1, $databaseTable['name']) . "
                     SET     " . $databaseTable['username'] . " = ?
                     WHERE   " . $databaseTable['userID'] . " = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$username, $userID]);
         }
 
index 1bece04405c0fdbe6fe2fa6311186bc287684183..d44d2208a7df1ee30c8c262122e24faaae510f96 100644 (file)
@@ -60,13 +60,13 @@ abstract class AbstractUserMergeListener implements IParameterizedEventListener
 
             $sql = "UPDATE" . (!empty($databaseTable['ignore']) ? " IGNORE" : "") . " " . \str_replace(
                 '{WCF_N}',
-                WCF_N,
+                    1,
                 $databaseTable['name']
             ) . "
                     SET " . $databaseTable['userID'] . " = ?
                     " . (!empty($databaseTable['username']) ? ", " . $databaseTable['username'] . " = ? " : "")
                 . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute(\array_merge($parameters, $conditionBuilder->getParameters()));
         }
     }
index ac7e1c9f38f38182d36022b7cf709847b71bbb30..d63caccd9364e7f0ceee10c7b8ebf91cae7cce69 100644 (file)
@@ -219,7 +219,7 @@ abstract class AbstractExporter implements IExporter
     {
         $sql = "SELECT  MAX(" . $columnName . ") AS maxID
                 FROM    " . $tableName;
-        $statement = $this->database->prepareStatement($sql);
+        $statement = $this->database->prepare($sql);
         $statement->execute();
         $row = $statement->fetchArray();
         if ($row !== false) {
index 16a8beee4dacc9a679772c1c2798646d213f1c7c..22ec3122d866930c6dcd674dbecc7ed87211a247 100644 (file)
@@ -61,9 +61,9 @@ final class OptionFormField extends ItemListFormField implements IPackagesFormFi
             }
 
             $sql = "SELECT  optionName
-                    FROM    wcf" . WCF_N . "_option
+                    FROM    wcf1_option
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
             $availableOptions = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
index e5b21e1ede153c5e9807576b76cfa8e84ac1a7ed..c3e47fe46f2d242db6b11ff5a71b85cfdc9742f1 100644 (file)
@@ -51,9 +51,9 @@ final class UserGroupOptionFormField extends ItemListFormField implements IPacka
             }
 
             $sql = "SELECT  optionName
-                    FROM    wcf" . WCF_N . "_user_group_option
+                    FROM    wcf1_user_group_option
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
             $availableOptions = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
index 9b5542d8e179a45a4e5b11486b1bdde06b5a750b..b4c7b6625283c2f86cb29fc73319bd57a272af07 100644 (file)
@@ -295,9 +295,9 @@ class HtmlInputNodeTextParser
         }
 
         $sql = "SELECT  userID, username
-                FROM    wcf" . WCF_N . "_user
+                FROM    wcf1_user
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $users = $statement->fetchMap('userID', 'username');
 
index 06a9cda9e0376b6b8f307f57826162868473b8d8..037f8d7d4bf2fff7b59058b8a9b336594ea88e30 100644 (file)
@@ -38,9 +38,9 @@ class AbstractACLImporter extends AbstractImporter
     {
         // get options
         $sql = "SELECT  optionName, optionID
-                FROM    wcf" . WCF_N . "_acl_option
+                FROM    wcf1_acl_option
                 WHERE   objectTypeID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->objectTypeID]);
         $this->options = $statement->fetchMap('optionName', 'optionID');
     }
@@ -66,10 +66,10 @@ class AbstractACLImporter extends AbstractImporter
                 return 0;
             }
 
-            $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_acl_option_to_group
+            $sql = "INSERT IGNORE INTO  wcf1_acl_option_to_group
                                         (optionID, objectID, groupID, optionValue)
                     VALUES              (?, ?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$data['optionID'], $data['objectID'], $data['groupID'], $data['optionValue']]);
 
             return 1;
@@ -79,10 +79,10 @@ class AbstractACLImporter extends AbstractImporter
                 return 0;
             }
 
-            $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_acl_option_to_user
+            $sql = "INSERT IGNORE INTO  wcf1_acl_option_to_user
                                         (optionID, objectID, userID, optionValue)
                     VALUES              (?, ?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$data['optionID'], $data['objectID'], $data['userID'], $data['optionValue']]);
 
             return 1;
index e4c2ba08c7d033450139d76bc5ebcadbc154267e..f72fd2884b68686b51fc8a836821d05b9a6a515f 100644 (file)
@@ -41,19 +41,19 @@ class AbstractCommentResponseImporter extends AbstractImporter
         $response = CommentResponseEditor::create($data);
 
         $sql = "SELECT      responseID
-                FROM        wcf" . WCF_N . "_comment_response
+                FROM        wcf1_comment_response
                 WHERE       commentID = ?
                 ORDER BY    time ASC, responseID ASC";
-        $statement = WCF::getDB()->prepareStatement($sql, 5);
+        $statement = WCF::getDB()->prepare($sql, 5);
         $statement->execute([$response->commentID]);
         $responseIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
         // update parent comment
-        $sql = "UPDATE  wcf" . WCF_N . "_comment
+        $sql = "UPDATE  wcf1_comment
                 SET     responseIDs = ?,
                         responses = responses + 1
                 WHERE   commentID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             \serialize($responseIDs),
             $response->commentID,
index 7998dc23aec72d74ab44ec8bb5c976fb7298ba82..f29d965562d5fbe3712d297790bc75f38255333e 100644 (file)
@@ -40,11 +40,11 @@ abstract class AbstractImporter implements IImporter
         // get package id
         $packageID = PackageCache::getInstance()->getPackageID($package);
 
-        $sql = "INSERT INTO             wcf" . WCF_N . "_language_item
+        $sql = "INSERT INTO             wcf1_language_item
                                         (languageID, languageItem, languageItemValue, languageCategoryID, packageID)
                 VALUES                  (?, ?, ?, ?, ?)
                 ON DUPLICATE KEY UPDATE languageItemValue = VALUES(languageItemValue)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         WCF::getDB()->beginTransaction();
         foreach ($items as $itemData) {
             $statement->execute([
@@ -71,9 +71,9 @@ abstract class AbstractImporter implements IImporter
         if (!isset($languageCategoryIDs[$languageCategory])) {
             // get language category id
             $sql = "SELECT  languageCategoryID
-                    FROM    wcf" . WCF_N . "_language_category
+                    FROM    wcf1_language_category
                     WHERE   languageCategory = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$languageCategory]);
 
             $languageCategoryIDs[$languageCategory] = $statement->fetchSingleColumn();
index a30db8ab77c21301fdf77a5914ad1c2c77a2c913..3f97a0bbcf3f104daf96abfda4621f92b3d4dae6 100644 (file)
@@ -67,10 +67,10 @@ class AbstractLikeImporter extends AbstractImporter
             return 0;
         }
 
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_like
+        $sql = "INSERT IGNORE INTO  wcf1_like
                                     (objectID, objectTypeID, objectUserID, userID, time, likeValue, reactionTypeID)
                 VALUES              (?, ?, ?, ?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $data['objectID'],
             $this->objectTypeID,
@@ -90,22 +90,22 @@ class AbstractLikeImporter extends AbstractImporter
     protected static function getDislikeReactionTypeID()
     {
         if (self::$dislikeReactionTypeID === null) {
-            $sql = "SELECT reactionTypeID FROM wcf" . WCF_N . "_reaction_type WHERE iconFile = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $sql = "SELECT reactionTypeID FROM wcf1_reaction_type WHERE iconFile = ?";
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute(['thumbsDown.svg']);
             $reaction = $statement->fetchObject(ReactionType::class);
             if ($reaction === null) {
-                $sql = "SELECT MAX(showOrder) FROM wcf" . WCF_N . "_reaction_type";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $sql = "SELECT MAX(showOrder) FROM wcf1_reaction_type";
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute();
                 $showOrder = $statement->fetchColumn();
 
                 $reaction = ReactionTypeEditor::create(['iconFile' => 'thumbsDown.svg', 'showOrder' => $showOrder + 1]);
 
                 $sql = "SELECT  languageCategoryID
-                        FROM    wcf" . WCF_N . "_language_category
+                        FROM    wcf1_language_category
                         WHERE   languageCategory = ?";
-                $statement = WCF::getDB()->prepareStatement($sql, 1);
+                $statement = WCF::getDB()->prepare($sql, 1);
                 $statement->execute(['wcf.reactionType']);
                 $languageCategoryID = $statement->fetchSingleColumn();
 
index b821d0d43ce7304e962bd9558a43412bd87265fa..933157712c6d867e5b4906cf4664b91ce02988bb 100644 (file)
@@ -45,10 +45,10 @@ class AbstractPollOptionVoteImporter extends AbstractImporter
             return 0;
         }
 
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_poll_option_vote
+        $sql = "INSERT IGNORE INTO  wcf1_poll_option_vote
                                     (pollID, optionID, userID)
                 VALUES              (?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$data['pollID'], $data['optionID'], $data['userID']]);
 
         return 1;
index 165c5bd7a1f8564a9f23bdc7b7a484d6c833c946..08a3ad6b437526d90016c4643dce8dc5ca3e4926 100644 (file)
@@ -146,23 +146,23 @@ class ArticleImporter extends AbstractImporter
                 ->getObjectTypeIDByName('com.woltlab.wcf.category', 'com.woltlab.wcf.article.category');
 
             $sql = "SELECT      categoryID
-                    FROM        wcf" . WCF_N . "_category
+                    FROM        wcf1_category
                     WHERE       objectTypeID = ?
                             AND parentCategoryID = ?
                             AND title = ?
                     ORDER BY    categoryID";
-            $statement = WCF::getDB()->prepareStatement($sql, 1);
+            $statement = WCF::getDB()->prepare($sql, 1);
             $statement->execute([$objectTypeID, 0, 'Import']);
             $categoryID = $statement->fetchSingleColumn();
             if ($categoryID) {
                 $this->importCategoryID = $categoryID;
             } else {
-                $sql = "INSERT INTO wcf" . WCF_N . "_category
+                $sql = "INSERT INTO wcf1_category
                                     (objectTypeID, parentCategoryID, title, showOrder, time)
                         VALUES      (?, ?, ?, ?, ?)";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([$objectTypeID, 0, 'Import', 0, TIME_NOW]);
-                $this->importCategoryID = WCF::getDB()->getInsertID("wcf" . WCF_N . "_category", 'categoryID');
+                $this->importCategoryID = WCF::getDB()->getInsertID("wcf1_category", 'categoryID');
             }
         }
 
index 9f009aada611b5b728d3de85e86aa12926c508ab..98d81e2961e6c098965ce17de05f5e773a7a76b7 100644 (file)
@@ -111,7 +111,7 @@ class ImportHandler extends SingletonFactory implements IAJAXInvokeAction
             }
 
             $sql = "SELECT  import_mapping.newID
-                    FROM    wcf" . WCF_N . "_import_mapping import_mapping
+                    FROM    wcf1_import_mapping import_mapping
                     " . ($tableName ? "
                         LEFT JOIN   " . $tableName . " object_table
                         ON          object_table." . $indexName . " = import_mapping.newID
@@ -120,7 +120,7 @@ class ImportHandler extends SingletonFactory implements IAJAXInvokeAction
                         AND import_mapping.objectTypeID = ?
                         AND import_mapping.oldID = ?
                             " . ($tableName ? "AND object_table." . $indexName . " IS NOT NULL" : '');
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->importHash, $objectTypeID, $oldID]);
             $row = $statement->fetchArray();
             if ($row !== false) {
@@ -145,20 +145,20 @@ class ImportHandler extends SingletonFactory implements IAJAXInvokeAction
         $objectTypeID = $this->objectTypes[$type]->objectTypeID;
 
         if ($statement === null) {
-            $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_import_mapping
+            $sql = "INSERT IGNORE INTO  wcf1_import_mapping
                                         (importHash, objectTypeID, oldID, newID)
                     VALUES              (?, ?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
         }
 
         try {
             $statement->execute([$this->importHash, $objectTypeID, $oldID, $newID]);
         } catch (DatabaseException $e) {
             // Re-prepare the statement once.
-            $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_import_mapping
+            $sql = "INSERT IGNORE INTO  wcf1_import_mapping
                                         (importHash, objectTypeID, oldID, newID)
                     VALUES              (?, ?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->importHash, $objectTypeID, $oldID, $newID]);
         }
 
@@ -182,8 +182,8 @@ class ImportHandler extends SingletonFactory implements IAJAXInvokeAction
      */
     public function resetMapping()
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_import_mapping";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $sql = "DELETE FROM wcf1_import_mapping";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         $this->idMappingCache = [];
index 30b7cf073faf941d6291eec2bb6dc0dade22d9fb..d729cd7e65b7d7660941469ea889aac0b45e4f6c 100644 (file)
@@ -30,10 +30,10 @@ class LabelGroupImporter extends AbstractImporter
 
         // save objects
         if (!empty($additionalData['objects'])) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_label_group_to_object
+            $sql = "INSERT INTO wcf1_label_group_to_object
                                 (groupID, objectTypeID, objectID)
                     VALUES      (?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($additionalData['objects'] as $objectTypeID => $objectIDs) {
                 foreach ($objectIDs as $objectID) {
index c2ffcb71d782d29153ec8a3c7d25b9bcaba6b221..0834d390d6695a4e5af78366e2768a6ccce61629 100644 (file)
@@ -124,10 +124,10 @@ class MediaImporter extends AbstractImporter
         }
 
         // save media content
-        $sql = "INSERT INTO wcf" . WCF_N . "_media_content
+        $sql = "INSERT INTO wcf1_media_content
                             (mediaID, languageID, title, caption, altText)
                 VALUES      (?, ?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($contents as $languageID => $contentData) {
             $statement->execute([
                 $media->mediaID,
index 94e5bd2408108488b4235bce75aea5b5fa1ec421..ab37c5f746ae8eb890e144a9ca921bcd1c6af230 100644 (file)
@@ -33,8 +33,8 @@ class SmileyImporter extends AbstractImporter
     public function __construct()
     {
         $sql = "SELECT  smileyID, smileyCode, aliases
-                FROM    wcf" . WCF_N . "_smiley";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_smiley";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         while ($row = $statement->fetchArray()) {
index fa875a65c7421d373adb355a6cd1f52d0c97fb1c..254df1a1678c0c18bfbe373b213c193ced2b6317 100644 (file)
@@ -114,23 +114,23 @@ class TrophyImporter extends AbstractImporter
                 ->getObjectTypeIDByName('com.woltlab.wcf.category', 'com.woltlab.wcf.trophy.category');
 
             $sql = "SELECT      categoryID
-                    FROM        wcf" . WCF_N . "_category
+                    FROM        wcf1_category
                     WHERE       objectTypeID = ?
                             AND parentCategoryID = ?
                             AND title = ?
                     ORDER BY    categoryID";
-            $statement = WCF::getDB()->prepareStatement($sql, 1);
+            $statement = WCF::getDB()->prepare($sql, 1);
             $statement->execute([$objectTypeID, 0, 'Import']);
             $categoryID = $statement->fetchSingleColumn();
             if ($categoryID) {
                 $this->importCategoryID = $categoryID;
             } else {
-                $sql = "INSERT INTO wcf" . WCF_N . "_category
+                $sql = "INSERT INTO wcf1_category
                                     (objectTypeID, parentCategoryID, title, showOrder, time)
                         VALUES      (?, ?, ?, ?, ?)";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([$objectTypeID, 0, 'Import', 0, TIME_NOW]);
-                $this->importCategoryID = WCF::getDB()->getInsertID("wcf" . WCF_N . "_category", 'categoryID');
+                $this->importCategoryID = WCF::getDB()->getInsertID("wcf1_category", 'categoryID');
             }
         }
 
index 12cefdf91da0379ac480eed75dcc7321db4e4ad2..c1bcb2ace096c0d403dfa2fdab9599186c0248f6 100644 (file)
@@ -71,10 +71,10 @@ class UserAvatarImporter extends AbstractImporter
             }
 
             // update owner
-            $sql = "UPDATE  wcf" . WCF_N . "_user
+            $sql = "UPDATE  wcf1_user
                     SET     avatarID = ?
                     WHERE   userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$avatar->avatarID, $data['userID']]);
 
             return $avatar->avatarID;
index 3fc9d0c1a2463bcb0b588ccfacb25cd1dffdeb4b..d73928c1cbf296bc99c453bbc432f77b1bed64df 100644 (file)
@@ -34,16 +34,16 @@ class UserFollowerImporter extends AbstractImporter
             $data['time'] = 0;
         }
 
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_user_follow
+        $sql = "INSERT IGNORE INTO  wcf1_user_follow
                                     (userID, followUserID, time)
                 VALUES              (?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $data['userID'],
             $data['followUserID'],
             $data['time'],
         ]);
 
-        return WCF::getDB()->getInsertID('wcf' . WCF_N . '_user_follow', 'followID');
+        return WCF::getDB()->getInsertID('wcf1_user_follow', 'followID');
     }
 }
index d05ffc9267a6295d1918516bf25eebbdcc6643a2..7980fc9e456d20207f8b6819c3164003ffee0018 100644 (file)
@@ -56,9 +56,9 @@ class UserImporter extends AbstractImporter
     {
         // get default notification events
         $sql = "SELECT  eventID
-                FROM    wcf" . WCF_N . "_user_notification_event
+                FROM    wcf1_user_notification_event
                 WHERE   preset = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([1]);
         $this->eventIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -224,10 +224,10 @@ class UserImporter extends AbstractImporter
             $this->defaultGroups[$user->pendingActivation() ? 'notActivated' : 'activated']
         );
         $placeholders = '(?,?)' . \str_repeat(',(?,?)', \count($groupIDs) - 1);
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_user_to_group
+        $sql = "INSERT IGNORE INTO  wcf1_user_to_group
                                     (userID, groupID)
                 VALUES              {$placeholders}";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $parameters = [];
         foreach ($groupIDs as $groupID) {
             $parameters[] = $user->userID;
@@ -236,10 +236,10 @@ class UserImporter extends AbstractImporter
         $statement->execute($parameters);
 
         // save languages
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_user_to_language
+        $sql = "INSERT IGNORE INTO  wcf1_user_to_language
                                     (userID, languageID)
                 VALUES              (?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($languageIDs as $languageID) {
             $statement->execute([
                 $user->userID,
@@ -250,10 +250,10 @@ class UserImporter extends AbstractImporter
         if (!empty($this->eventIDs)) {
             // save default user events
             $placeholders = '(?,?)' . \str_repeat(',(?,?)', \count($this->eventIDs) - 1);
-            $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_user_notification_event_to_user
+            $sql = "INSERT IGNORE INTO  wcf1_user_notification_event_to_user
                                         (userID, eventID)
                     VALUES              {$placeholders}";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $parameters = [];
             foreach ($this->eventIDs as $eventID) {
                 $parameters[] = $user->userID;
@@ -282,9 +282,9 @@ class UserImporter extends AbstractImporter
             $newUsername = 'Duplicate' . ($i > 1 ? $i : '') . ' ' . $username;
             // try username
             $sql = "SELECT  userID
-                    FROM    wcf" . WCF_N . "_user
+                    FROM    wcf1_user
                     WHERE   username = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$newUsername]);
             $row = $statement->fetchArray();
             if (empty($row['userID'])) {
index 0b2b189e28192bfdcf5130696d3933898b906926..984f2b6728170fd6f8cffc9b03747433bb2d369e 100644 (file)
@@ -44,9 +44,9 @@ class UserOptionImporter extends AbstractImporter
     {
         // get language category id
         $sql = "SELECT  languageCategoryID
-                FROM    wcf" . WCF_N . "_language_category
+                FROM    wcf1_language_category
                 WHERE   languageCategory = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(['wcf.user.option']);
         $row = $statement->fetchArray();
         $this->languageCategoryID = $row['languageCategoryID'];
@@ -82,10 +82,10 @@ class UserOptionImporter extends AbstractImporter
         ]);
 
         // save name
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_language_item
+        $sql = "INSERT IGNORE INTO  wcf1_language_item
                                     (languageID, languageItem, languageItemValue, languageItemOriginIsSystem, languageCategoryID, packageID)
                 VALUES              (?, ?, ?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             LanguageFactory::getInstance()->getDefaultLanguageID(),
             'wcf.user.option.option' . $userOption->optionID,
index 41de59be724003aa7608cb754a8d09e7daf1d06b..9d143e142e2f92097a2c384c3ae6843126398a5f 100644 (file)
@@ -190,18 +190,18 @@ class LabelHandler extends SingletonFactory
             $conditions->add("objectTypeID = ?", [$objectTypeID]);
             $conditions->add("objectID = ?", [$objectID]);
 
-            $sql = "DELETE FROM wcf" . WCF_N . "_label_object
+            $sql = "DELETE FROM wcf1_label_object
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
         }
 
         // insert new labels
         if (!empty($labelIDs)) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_label_object
+            $sql = "INSERT INTO wcf1_label_object
                                 (labelID, objectTypeID, objectID)
                     VALUES      (?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             foreach ($labelIDs as $labelID) {
                 $statement->execute([
                     $labelID,
@@ -243,17 +243,17 @@ class LabelHandler extends SingletonFactory
         $conditionBuilder->add("objectTypeID = ?", [$objectTypeID]);
         $conditionBuilder->add("objectID = ?", [$objectID]);
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_label_object
+        $sql = "DELETE FROM wcf1_label_object
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         // assign new labels
         if (!empty($labelIDs)) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_label_object
+            $sql = "INSERT INTO wcf1_label_object
                                 (labelID, objectTypeID, objectID)
                     VALUES      (?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             foreach ($labelIDs as $labelID) {
                 $statement->execute([
                     $labelID,
@@ -278,9 +278,9 @@ class LabelHandler extends SingletonFactory
         $conditions->add("objectTypeID = ?", [$objectTypeID]);
         $conditions->add("objectID IN (?)", [$objectIDs]);
         $sql = "SELECT  objectID, labelID
-                FROM    wcf" . WCF_N . "_label_object
+                FROM    wcf1_label_object
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $labels = $statement->fetchMap('labelID', 'objectID', false);
 
@@ -420,9 +420,9 @@ class LabelHandler extends SingletonFactory
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("objectTypeID = ?", [$objectTypeID]);
         $conditions->add("objectID IN (?)", [$objectIDs]);
-        $sql = "DELETE FROM wcf" . WCF_N . "_label_object
+        $sql = "DELETE FROM wcf1_label_object
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
     }
 }
index cf566e69c1443ce9338aa6ab47f83fa10ad3de89..d642e43d25d104cc24c325c15a0d796dfda987d5 100644 (file)
@@ -98,9 +98,9 @@ class LanguageFactory extends SingletonFactory
         // called within WCFSetup
         if ($this->cache === false || empty($this->cache['codes'])) {
             $sql = "SELECT  languageID
-                    FROM    wcf" . WCF_N . "_language
+                    FROM    wcf1_language
                     WHERE   languageCode = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$languageCode]);
             $row = $statement->fetchArray();
             if (isset($row['languageID'])) {
@@ -329,17 +329,17 @@ class LanguageFactory extends SingletonFactory
     public function makeDefault($languageID)
     {
         // remove old default language
-        $sql = "UPDATE  wcf" . WCF_N . "_language
+        $sql = "UPDATE  wcf1_language
                 SET     isDefault = 0
                 WHERE   isDefault = 1";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         // make this language to default
-        $sql = "UPDATE  wcf" . WCF_N . "_language
+        $sql = "UPDATE  wcf1_language
                 SET     isDefault = 1
                 WHERE   languageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$languageID]);
 
         // rebuild language cache
@@ -377,9 +377,9 @@ class LanguageFactory extends SingletonFactory
     public function countRecentlyDisabledCustomValues()
     {
         $sql = "SELECT  COUNT(*) AS count
-                FROM    wcf" . WCF_N . "_language_item
+                FROM    wcf1_language_item
                 WHERE   languageCustomItemDisableTime >= ?";
-        $statement = WCF::getDB()->prepareStatement($sql, 1);
+        $statement = WCF::getDB()->prepare($sql, 1);
         $statement->execute([TIME_NOW - 86400 * 7]);
 
         return $statement->fetchSingleColumn();
index d3c2308fe3e000606895267dda6bb04ee351fea2..d839d90c7befba3bcbd645194344b1d28bb458a0 100644 (file)
@@ -178,13 +178,13 @@ class LikeHandler extends SingletonFactory
     {
         $sql = "SELECT      like_object.likes, like_object.dislikes, like_object.cumulativeLikes,
                             CASE WHEN like_table.likeValue IS NOT NULL THEN like_table.likeValue ELSE 0 END AS liked
-                FROM        wcf" . WCF_N . "_like_object like_object
-                LEFT JOIN   wcf" . WCF_N . "_like like_table
+                FROM        wcf1_like_object like_object
+                LEFT JOIN   wcf1_like like_table
                 ON          like_table.objectTypeID = ?
                         AND like_table.objectID = like_object.objectID
                         AND like_table.userID = ?
                 WHERE       like_object.likeObjectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $likeObject->objectTypeID,
             $user->userID,
index 175bcdf53dfcd31e0421b291ee241ec9fae24838..4d50b64bbfc25afaa1de225ce43fddc933b28a11 100644 (file)
@@ -121,9 +121,9 @@ abstract class AbstractModificationLogHandler extends SingletonFactory
             $conditionBuilder->add('action NOT IN (?)', [$ignoredActions]);
         }
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_modification_log
+        $sql = "DELETE FROM wcf1_modification_log
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
     }
 
@@ -142,9 +142,9 @@ abstract class AbstractModificationLogHandler extends SingletonFactory
         $conditionBuilder->add('objectTypeID = ?', [$this->objectType->objectTypeID]);
         $conditionBuilder->add('parentObjectID IN (?)', [$parentObjectIDs]);
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_modification_log
+        $sql = "DELETE FROM wcf1_modification_log
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
     }
 
@@ -181,10 +181,10 @@ abstract class AbstractModificationLogHandler extends SingletonFactory
         $conditionBuilder->add('objectTypeID = ?', [$this->objectType->objectTypeID]);
         $conditionBuilder->add('objectID IN (?)', [$objectIDs]);
 
-        $sql = "UPDATE  wcf" . WCF_N . "_modification_log
+        $sql = "UPDATE  wcf1_modification_log
                 SET     parentObjectID = ?
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([$newParentObjectID], $conditionBuilder->getParameters()));
     }
 }
index 2b97de268afd3eece263e12ad59c973e6c327ff6..93b6930db7a4c2619ffa47f873f8a79a7a1baa77 100644 (file)
@@ -61,9 +61,9 @@ class MediaMessageEmbeddedObjectHandler extends AbstractSimpleMessageEmbeddedObj
                 $conditions->add("languageID = ?", [$contentLanguageID]);
 
                 $sql = "SELECT  *
-                        FROM    wcf" . WCF_N . "_media_content
+                        FROM    wcf1_media_content
                         " . $conditions;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditions->getParameters());
                 while ($row = $statement->fetchArray()) {
                     $viewableMedia[$row['mediaID']]->setLocalizedContent($row['languageID'], $row);
index 0f75c6233b45213379571d122740b89129405295..d3d012802c6a348dc1072f93504e8bce61563546 100644 (file)
@@ -103,10 +103,10 @@ class MessageEmbeddedObjectManager extends SingletonFactory
         $statement = null;
         if (!$isBulk) {
             // prepare statement
-            $sql = "INSERT INTO wcf" . WCF_N . "_message_embedded_object
+            $sql = "INSERT INTO wcf1_message_embedded_object
                                 (messageObjectTypeID, messageID, embeddedObjectTypeID, embeddedObjectID)
                     VALUES      (?, ?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             WCF::getDB()->beginTransaction();
         }
@@ -153,10 +153,10 @@ class MessageEmbeddedObjectManager extends SingletonFactory
         WCF::getDB()->commitTransaction();
 
         // prepare statement
-        $sql = "INSERT INTO wcf" . WCF_N . "_message_embedded_object
+        $sql = "INSERT INTO wcf1_message_embedded_object
                             (messageObjectTypeID, messageID, embeddedObjectTypeID, embeddedObjectID)
                 VALUES      (?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         WCF::getDB()->beginTransaction();
         foreach ($this->bulkData['insert'] as $parameters) {
@@ -192,10 +192,10 @@ class MessageEmbeddedObjectManager extends SingletonFactory
         }
 
         // prepare statement
-        $sql = "INSERT INTO wcf" . WCF_N . "_message_embedded_object
+        $sql = "INSERT INTO wcf1_message_embedded_object
                             (messageObjectTypeID, messageID, embeddedObjectTypeID, embeddedObjectID)
                 VALUES      (?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         // call embedded object handlers
         WCF::getDB()->beginTransaction();
@@ -224,9 +224,9 @@ class MessageEmbeddedObjectManager extends SingletonFactory
         );
         $conditionBuilder->add('messageID IN (?)', [$messageIDs]);
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_message_embedded_object
+        $sql = "DELETE FROM wcf1_message_embedded_object
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
     }
 
@@ -252,9 +252,9 @@ class MessageEmbeddedObjectManager extends SingletonFactory
 
         // get object ids
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_message_embedded_object
+                FROM    wcf1_message_embedded_object
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
         $embeddedObjects = [];
         while ($row = $statement->fetchArray()) {
index c0a28d21ed4cf6c4c4e6221c203e4e71e5677622..fb3e764d4eff34a0ea1995c016a20e9603a321cf 100644 (file)
@@ -51,11 +51,11 @@ class AbstractCommentResponseModerationQueueHandler extends AbstractCommentComme
         $conditions->add("comment_response.responseID IN (?)", [$responseIDs]);
 
         $sql = "SELECT      comment_response.responseID, comment.commentID, comment.objectTypeID, comment.objectID
-                FROM        wcf" . WCF_N . "_comment_response comment_response
-                LEFT JOIN   wcf" . WCF_N . "_comment comment
+                FROM        wcf1_comment_response comment_response
+                LEFT JOIN   wcf1_comment comment
                 ON          comment.commentID = comment_response.commentID
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $comments = $responses = [];
         while ($row = $statement->fetchArray()) {
index 9953f1a244e4feb5e3abdac68814f2056899d52f..1e5fc914e9458c45c3b6b1c33d550ca7cc164701 100644 (file)
@@ -68,7 +68,7 @@ abstract class AbstractModerationQueueHandler implements IModerationQueueHandler
         $sql = "SELECT  " . $indexName . "
                 FROM    " . $tableName . "
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         while ($row = $statement->fetchArray()) {
             unset($queues[$row[$indexName]]);
@@ -93,9 +93,9 @@ abstract class AbstractModerationQueueHandler implements IModerationQueueHandler
         $conditions->add("objectID IN (?)", [$objectIDs]);
 
         $sql = "SELECT  queueID
-                FROM    wcf" . WCF_N . "_moderation_queue
+                FROM    wcf1_moderation_queue
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $queueIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
index 868f997f2aecb9a0e176e96b8b1b9f78f8fc7984..ecbfcb1214094f007696212fcb105de6db17e4a5 100644 (file)
@@ -95,10 +95,10 @@ abstract class AbstractModerationQueueManager extends SingletonFactory implement
     protected function addEntry($objectTypeID, $objectID, $containerID = 0, array $additionalData = [])
     {
         $sql = "SELECT  queueID
-                FROM    wcf" . WCF_N . "_moderation_queue
+                FROM    wcf1_moderation_queue
                 WHERE   objectTypeID = ?
                     AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $objectID,
@@ -154,9 +154,9 @@ abstract class AbstractModerationQueueManager extends SingletonFactory implement
         $conditionBuilder->add('objectID IN (?)', [$objectIDs]);
 
         $sql = "SELECT  queueID, objectID
-                FROM    wcf" . WCF_N . "_moderation_queue
+                FROM    wcf1_moderation_queue
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
         $existingQueueIDs = $statement->fetchMap('objectID', 'queueID');
 
@@ -185,13 +185,13 @@ abstract class AbstractModerationQueueManager extends SingletonFactory implement
                 ]);
             }
 
-            $sql = "INSERT INTO wcf" . WCF_N . "_moderation_queue
+            $sql = "INSERT INTO wcf1_moderation_queue
                                 (objectTypeID, objectID, containerID, userID, time, lastChangeTime, additionalData)
                     VALUES      (?, ?, ?, ?, ?, ?, ?)" . \str_repeat(
                 ', (?, ?, ?, ?, ?, ?, ?)',
                 \count($batchObjectIDs) - 1
             );
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($parameters);
         }
         WCF::getDB()->commitTransaction();
@@ -219,7 +219,7 @@ abstract class AbstractModerationQueueManager extends SingletonFactory implement
                 $conditionBuilder = new PreparedStatementConditionBuilder();
                 $conditionBuilder->add('queueID IN (?)', [$batchQueueIDs]);
 
-                $sql = "UPDATE  wcf" . WCF_N . "_moderation_queue
+                $sql = "UPDATE  wcf1_moderation_queue
                         SET     status = ?,
                                 containerID = ?,
                                 userID = ?,
@@ -227,7 +227,7 @@ abstract class AbstractModerationQueueManager extends SingletonFactory implement
                                 lastChangeTime = ?,
                                 additionalData = ?
                         " . $conditionBuilder;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute(\array_merge(
                     [
                         ModerationQueue::STATUS_OUTSTANDING,
index c9b494eb3a3d85689da18d73dc3b0ee553e6dc30..2a1f66c7ed368331e566662a3fb91b5aa63ec2e7 100644 (file)
@@ -241,11 +241,11 @@ class ModerationQueueManager extends SingletonFactory
             );
 
             $sql = "SELECT      COUNT(*)
-                    FROM        wcf" . WCF_N . "_moderation_queue_to_user moderation_queue_to_user
-                    LEFT JOIN   wcf" . WCF_N . "_moderation_queue moderation_queue
+                    FROM        wcf1_moderation_queue_to_user moderation_queue_to_user
+                    LEFT JOIN   wcf1_moderation_queue moderation_queue
                     ON          moderation_queue.queueID = moderation_queue_to_user.queueID
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             $count = $statement->fetchSingleColumn();
 
@@ -287,15 +287,15 @@ class ModerationQueueManager extends SingletonFactory
             $conditions->add("(moderation_queue.time > tracked_visit.visitTime OR tracked_visit.visitTime IS NULL)");
 
             $sql = "SELECT      COUNT(*)
-                    FROM        wcf" . WCF_N . "_moderation_queue_to_user moderation_queue_to_user
-                    LEFT JOIN   wcf" . WCF_N . "_moderation_queue moderation_queue
+                    FROM        wcf1_moderation_queue_to_user moderation_queue_to_user
+                    LEFT JOIN   wcf1_moderation_queue moderation_queue
                     ON          moderation_queue.queueID = moderation_queue_to_user.queueID
-                    LEFT JOIN   wcf" . WCF_N . "_tracked_visit tracked_visit
+                    LEFT JOIN   wcf1_tracked_visit tracked_visit
                     ON          tracked_visit.objectTypeID = " . VisitTracker::getInstance()->getObjectTypeID('com.woltlab.wcf.moderation.queue') . "
                             AND tracked_visit.objectID = moderation_queue.queueID
                             AND tracked_visit.userID = " . WCF::getUser()->userID . "
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             $count = $statement->fetchSingleColumn();
 
@@ -313,7 +313,7 @@ class ModerationQueueManager extends SingletonFactory
     {
         $queueList = new ModerationQueueList();
         $queueList->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_moderation_queue_to_user moderation_queue_to_user
+            LEFT JOIN   wcf1_moderation_queue_to_user moderation_queue_to_user
             ON          moderation_queue_to_user.queueID = moderation_queue.queueID
                     AND moderation_queue_to_user.userID = " . WCF::getUser()->userID;
         $queueList->getConditionBuilder()->add("moderation_queue_to_user.queueID IS NULL");
@@ -359,10 +359,10 @@ class ModerationQueueManager extends SingletonFactory
             );
         }
 
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_moderation_queue_to_user
+        $sql = "INSERT IGNORE INTO  wcf1_moderation_queue_to_user
                                     (queueID, userID, isAffected)
                 VALUES              (?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         WCF::getDB()->beginTransaction();
         foreach ($assignments as $queueID => $isAffected) {
@@ -381,13 +381,13 @@ class ModerationQueueManager extends SingletonFactory
     public function identifyOrphans()
     {
         $sql = "SELECT      moderation_queue.queueID, moderation_queue.objectTypeID, moderation_queue.objectID
-                FROM        wcf" . WCF_N . "_moderation_queue_to_user moderation_queue_to_user
-                LEFT JOIN   wcf" . WCF_N . "_moderation_queue moderation_queue
+                FROM        wcf1_moderation_queue_to_user moderation_queue_to_user
+                LEFT JOIN   wcf1_moderation_queue moderation_queue
                 ON          moderation_queue.queueID = moderation_queue_to_user.queueID
                 WHERE       moderation_queue_to_user.userID = ?
                         AND moderation_queue_to_user.isAffected = ?
                         AND moderation_queue.status <> ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             WCF::getUser()->userID,
             1,
@@ -431,9 +431,9 @@ class ModerationQueueManager extends SingletonFactory
         if (!empty($queueIDs)) {
             $conditions = new PreparedStatementConditionBuilder();
             $conditions->add("queueID IN (?)", [$queueIDs]);
-            $sql = "DELETE FROM wcf" . WCF_N . "_moderation_queue
+            $sql = "DELETE FROM wcf1_moderation_queue
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
 
             CommentHandler::getInstance()->deleteObjects('com.woltlab.wcf.moderation.queue', $queueIDs);
index 77aad36ea218003a4717238f24e68f6cdb633f80..dc969805c742652a7e99bf1c01ea86b3f3129d88 100644 (file)
@@ -41,10 +41,10 @@ class ModerationQueueReportManager extends AbstractModerationQueueManager
         $objectTypeID = $this->getObjectTypeID($objectType);
 
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_moderation_queue
+                FROM    wcf1_moderation_queue
                 WHERE   objectTypeID = ?
                     AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $objectID,
@@ -66,11 +66,11 @@ class ModerationQueueReportManager extends AbstractModerationQueueManager
         $objectTypeID = $this->getObjectTypeID($objectType);
 
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_moderation_queue
+                FROM    wcf1_moderation_queue
                 WHERE   objectTypeID = ?
                     AND objectID = ?
                     AND status IN (?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $objectID,
@@ -157,11 +157,11 @@ class ModerationQueueReportManager extends AbstractModerationQueueManager
     protected function addEntry($objectTypeID, $objectID, $containerID = 0, array $additionalData = [])
     {
         $sql = "SELECT  queueID
-                FROM    wcf" . WCF_N . "_moderation_queue
+                FROM    wcf1_moderation_queue
                 WHERE   objectTypeID = ?
                     AND objectID = ?
                     AND status <> ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $objectID,
index 07f8642ea1e27a243534246d9a469eb8c058d27b..014689ff63038cb0cf20d338ff6eeebbafff4782 100644 (file)
@@ -84,14 +84,14 @@ class UseroptionsOptionType extends AbstractOptionType
         if (self::$userOptions === null) {
             self::$userOptions = [];
             $sql = "SELECT  optionName
-                    FROM    wcf" . WCF_N . "_user_option
+                    FROM    wcf1_user_option
                     WHERE   categoryName IN (
                                 SELECT  categoryName
-                                FROM    wcf" . WCF_N . "_user_option_category
+                                FROM    wcf1_user_option_category
                                 WHERE   parentCategoryName = 'profile'
                             )
                         AND optionType <> 'boolean'";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute();
             self::$userOptions = $statement->fetchAll(\PDO::FETCH_COLUMN);
         }
index 03568f8e84282d9b0f28fe8a25a096db3e65997c..3da7c9c5bbf8b0600da3c59fcbfa8ad7f36263ea 100644 (file)
@@ -57,9 +57,9 @@ class ACPTemplatesFileHandler extends PackageInstallationFileHandler
                 }
 
                 $sql = "SELECT  packageID, templateName
-                        FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                        FROM    wcf1_" . $this->tableName . "
                         " . $conditions;
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute($conditions->getParameters());
                 $lockedFiles = $statement->fetchMap('templateName', 'packageID');
 
@@ -103,9 +103,9 @@ class ACPTemplatesFileHandler extends PackageInstallationFileHandler
         $conditions->add('application = ?', [$this->application]);
 
         $sql = "SELECT  templateName
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         while ($templateName = $statement->fetchColumn()) {
@@ -117,10 +117,10 @@ class ACPTemplatesFileHandler extends PackageInstallationFileHandler
         }
 
         if (!empty($files)) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_" . $this->tableName . "
+            $sql = "INSERT INTO wcf1_" . $this->tableName . "
                                 (packageID, templateName, application)
                     VALUES      (?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($files as $file) {
                 $statement->execute([
index e6fdc69f2f60f4d8adfde2109f6f5d53a2d86c23..127ffb2d5c969f99134ba8c7b30c4580f6ae070b 100644 (file)
@@ -62,10 +62,10 @@ abstract class PackageInstallationFormManager
     public static function findForm(PackageInstallationQueue $queue, $formName)
     {
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_package_installation_form
+                FROM    wcf1_package_installation_form
                 WHERE   queueID = ?
                     AND formName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $queue->queueID,
             $formName,
@@ -82,10 +82,10 @@ abstract class PackageInstallationFormManager
      */
     private static function insertForm(PackageInstallationQueue $queue, FormDocument $document)
     {
-        $sql = "INSERT INTO wcf" . WCF_N . "_package_installation_form
+        $sql = "INSERT INTO wcf1_package_installation_form
                             (queueID, formName, document)
                 VALUES      (?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $queue->queueID,
             $document->getName(),
@@ -101,11 +101,11 @@ abstract class PackageInstallationFormManager
      */
     private static function updateForm(PackageInstallationQueue $queue, FormDocument $document)
     {
-        $sql = "UPDATE  wcf" . WCF_N . "_package_installation_form
+        $sql = "UPDATE  wcf1_package_installation_form
                 SET     document = ?
                 WHERE   queueID = ?
                     AND formName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             \base64_encode(\serialize($document)),
             $queue->queueID,
@@ -120,9 +120,9 @@ abstract class PackageInstallationFormManager
      */
     public static function deleteForms(PackageInstallationQueue $queue)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_package_installation_form
+        $sql = "DELETE FROM wcf1_package_installation_form
                 WHERE       queueID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$queue->queueID]);
     }
 
@@ -136,10 +136,10 @@ abstract class PackageInstallationFormManager
     public static function getForm(PackageInstallationQueue $queue, $formName)
     {
         $sql = "SELECT  document
-                FROM    wcf" . WCF_N . "_package_installation_form
+                FROM    wcf1_package_installation_form
                 WHERE   queueID = ?
                     AND formName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $queue->queueID,
             $formName,
index aab869275454dd36860534778f9547ae8c6fc66e..205d0c0a56bcd5a68821ae643d9957c28cd1a417 100644 (file)
@@ -828,7 +828,7 @@ class PackageInstallationNodeBuilder
         );
         $queueList->getConditionBuilder()->add("package_installation_queue.queueID NOT IN (
             SELECT  queueID
-            FROM    wcf" . WCF_N . "_package_installation_node
+            FROM    wcf1_package_installation_node
         )");
         $queueList->readObjects();
 
index 10c856ae83ce4a9be552dd658f64fcf7111b7310..80b0b5fe1a1dc0bc48d6c7bd4770483ef5d939a0 100644 (file)
@@ -120,16 +120,16 @@ class PackageInstallationSQLParser extends SQLParser
     {
         // tables
         foreach ($this->tableLog as $logEntry) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_package_installation_sql_log
+            $sql = "DELETE FROM wcf1_package_installation_sql_log
                     WHERE       sqlTable = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$logEntry['tableName']]);
 
             if ($logEntry['action'] == 'insert') {
-                $sql = "INSERT INTO wcf" . WCF_N . "_package_installation_sql_log
+                $sql = "INSERT INTO wcf1_package_installation_sql_log
                                     (packageID, sqlTable)
                         VALUES      (?, ?)";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $logEntry['packageID'],
                     $logEntry['tableName'],
@@ -139,15 +139,15 @@ class PackageInstallationSQLParser extends SQLParser
 
         // columns
         if (!empty($this->columnLog)) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_package_installation_sql_log
+            $sql = "DELETE FROM wcf1_package_installation_sql_log
                     WHERE       sqlTable = ?
                             AND sqlColumn = ?";
-            $deleteStatement = WCF::getDB()->prepareStatement($sql);
+            $deleteStatement = WCF::getDB()->prepare($sql);
 
-            $sql = "INSERT INTO wcf" . WCF_N . "_package_installation_sql_log
+            $sql = "INSERT INTO wcf1_package_installation_sql_log
                                 (packageID, sqlTable, sqlColumn)
                     VALUES      (?, ?, ?)";
-            $insertStatement = WCF::getDB()->prepareStatement($sql);
+            $insertStatement = WCF::getDB()->prepare($sql);
 
             foreach ($this->columnLog as $logEntry) {
                 $deleteStatement->execute([
@@ -167,15 +167,15 @@ class PackageInstallationSQLParser extends SQLParser
 
         // indices
         if (!empty($this->indexLog)) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_package_installation_sql_log
+            $sql = "DELETE FROM wcf1_package_installation_sql_log
                     WHERE       sqlTable = ?
                             AND sqlIndex = ?";
-            $deleteStatement = WCF::getDB()->prepareStatement($sql);
+            $deleteStatement = WCF::getDB()->prepare($sql);
 
-            $sql = "INSERT INTO wcf" . WCF_N . "_package_installation_sql_log
+            $sql = "INSERT INTO wcf1_package_installation_sql_log
                                 (packageID, sqlTable, sqlIndex)
                     VALUES      (?, ?, ?)";
-            $insertStatement = WCF::getDB()->prepareStatement($sql);
+            $insertStatement = WCF::getDB()->prepare($sql);
 
             foreach ($this->indexLog as $logEntry) {
                 $deleteStatement->execute([
@@ -200,10 +200,10 @@ class PackageInstallationSQLParser extends SQLParser
     protected function getKnownTables()
     {
         $sql = "SELECT  packageID, sqlTable
-                FROM    wcf" . WCF_N . "_package_installation_sql_log
+                FROM    wcf1_package_installation_sql_log
                 WHERE   sqlColumn = ''
                     AND sqlIndex = ''";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $this->knownTables = $statement->fetchMap('sqlTable', 'packageID');
     }
@@ -218,10 +218,10 @@ class PackageInstallationSQLParser extends SQLParser
     protected function getColumnOwnerID($tableName, $columnName)
     {
         $sql = "SELECT  packageID
-                FROM    wcf" . WCF_N . "_package_installation_sql_log
+                FROM    wcf1_package_installation_sql_log
                 WHERE   sqlTable = ?
                     AND sqlColumn = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $tableName,
             $columnName,
@@ -246,10 +246,10 @@ class PackageInstallationSQLParser extends SQLParser
     protected function getIndexOwnerID($tableName, $indexName)
     {
         $sql = "SELECT  packageID
-                FROM    wcf" . WCF_N . "_package_installation_sql_log
+                FROM    wcf1_package_installation_sql_log
                 WHERE   sqlTable = ?
                     AND sqlIndex = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $tableName,
             $indexName,
index 7a8ea40de88bcc2e8386d7a10f85e87d90a4c3fc..39ab50032ffc69a994f69ce9e2272ba55e4864df 100644 (file)
@@ -172,9 +172,9 @@ class PackageUninstallationDispatcher extends PackageInstallationDispatcher
         PackageEditor::deleteAll([$this->queue->packageID]);
 
         // remove localized package info
-        $sql = "DELETE FROM wcf" . WCF_N . "_language_item
+        $sql = "DELETE FROM wcf1_language_item
                 WHERE       languageItem IN (?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             'wcf.acp.package.packageName.package' . $this->queue->packageID,
             'wcf.acp.package.packageDescription.package' . $this->queue->packageID,
index 7bed8202bfd8bd468e58e893b5cc207a6e57c6a0..4cd03cd36ff1b651643155ee6e32b1cd2b6052a8 100644 (file)
@@ -40,19 +40,19 @@ class TemplatesFileHandler extends ACPTemplatesFileHandler
         // get existing templates
         $updateTemplateIDs = [];
         $sql = "SELECT  templateName, templateID
-                FROM    wcf" . WCF_N . "_template
+                FROM    wcf1_template
                 WHERE   packageID = ?
                     AND application = ?
                     AND templateGroupID IS NULL";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$packageID, $this->application]);
         $existingTemplates = $statement->fetchMap('templateName', 'templateID');
 
         // save new templates
-        $sql = "INSERT INTO wcf" . WCF_N . "_template
+        $sql = "INSERT INTO wcf1_template
                             (packageID, templateName, lastModificationTime, application)
                 VALUES      (?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($files as $file) {
             if (isset($existingTemplates[$file])) {
                 $updateTemplateIDs[] = $existingTemplates[$file];
@@ -72,10 +72,10 @@ class TemplatesFileHandler extends ACPTemplatesFileHandler
             $conditionBuilder = new PreparedStatementConditionBuilder();
             $conditionBuilder->add('templateID IN (?)', [$updateTemplateIDs]);
 
-            $sql = "UPDATE  wcf" . WCF_N . "_template
+            $sql = "UPDATE  wcf1_template
                     SET     lastModificationTime = ?
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute(\array_merge([TIME_NOW], $conditionBuilder->getParameters()));
         }
     }
index c9955b2e7ec7a634592b586126543c1f4a4ef137..64868d33b93a82369f05143875152f923e0c62dd 100644 (file)
@@ -71,11 +71,11 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
         }
 
         if (!empty($options)) {
-            $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "
+            $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "
                     WHERE       optionName = ?
                             AND objectTypeID = ?
                             AND packageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($options as $option) {
                 $statement->execute([
@@ -100,11 +100,11 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
 
         if (!empty($categories)) {
             // delete options for given categories
-            $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "
+            $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "
                     WHERE       categoryName = ?
                             AND objectTypeID = ?
                             AND packageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             foreach ($categories as $category) {
                 $statement->execute([
                     $category['name'],
@@ -114,11 +114,11 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
             }
 
             // delete categories
-            $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "_category
+            $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "_category
                     WHERE       categoryName = ?
                             AND objectTypeID = ?
                             AND packageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($categories as $category) {
                 $statement->execute([
@@ -165,11 +165,11 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
         if ($this->editedEntry === null) {
             // search existing category
             $sql = "SELECT  categoryID
-                    FROM    wcf" . WCF_N . "_" . $this->tableName . "_category
+                    FROM    wcf1_" . $this->tableName . "_category
                     WHERE   categoryName = ?
                         AND objectTypeID = ?
                         AND packageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $category['categoryName'],
                 $objectTypeID,
@@ -178,10 +178,10 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
             $row = $statement->fetchArray();
             if (!$row) {
                 // insert new category
-                $sql = "INSERT INTO wcf" . WCF_N . "_" . $this->tableName . "_category
+                $sql = "INSERT INTO wcf1_" . $this->tableName . "_category
                                     (packageID, objectTypeID, categoryName)
                         VALUES      (?, ?, ?)";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $this->installation->getPackageID(),
                     $objectTypeID,
@@ -192,11 +192,11 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
             $editedData = $this->getElementData($this->editedEntry, true);
 
             $sql = "SELECT  categoryID
-                    FROM    wcf" . WCF_N . "_" . $this->tableName . "_category
+                    FROM    wcf1_" . $this->tableName . "_category
                     WHERE   categoryName = ?
                         AND objectTypeID = ?
                         AND packageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $editedData['categoryName'],
                 $editedData['objectTypeID'],
@@ -238,10 +238,10 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
             // validate category name
             if (isset($data['categoryname'])) {
                 $sql = "SELECT  COUNT(categoryID)
-                        FROM    wcf" . WCF_N . "_" . $this->tableName . "_category
+                        FROM    wcf1_" . $this->tableName . "_category
                         WHERE   categoryName = ?
                             AND objectTypeID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $data['categoryname'],
                     $objectTypeID,
@@ -269,11 +269,11 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
     {
         // check for option existence
         $sql = "SELECT  optionID
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   optionName = ?
                     AND objectTypeID = ?
                     AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $option['optionName'],
             $option['objectTypeID'],
@@ -281,10 +281,10 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
         ]);
         $row = $statement->fetchArray();
         if (!$row) {
-            $sql = "INSERT INTO wcf" . WCF_N . "_" . $this->tableName . "
+            $sql = "INSERT INTO wcf1_" . $this->tableName . "
                                 (packageID, objectTypeID, optionName, categoryName)
                     VALUES      (?, ?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $this->installation->getPackageID(),
                 $option['objectTypeID'],
@@ -292,10 +292,10 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
                 $categoryName,
             ]);
         } else {
-            $sql = "UPDATE  wcf" . WCF_N . "_" . $this->tableName . "
+            $sql = "UPDATE  wcf1_" . $this->tableName . "
                     SET     categoryName = ?
                     WHERE   optionID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $categoryName,
                 $row['optionID'],
@@ -664,22 +664,22 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
         switch ($this->entryType) {
             case 'categories':
                 // also delete options
-                $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "
+                $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "
                         WHERE       categoryName = ?
                                 AND objectTypeID = ?
                                 AND packageID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $name,
                     $this->getObjectTypeID($objectType),
                     $this->installation->getPackageID(),
                 ]);
 
-                $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "_category
+                $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "_category
                         WHERE       categoryName = ?
                                 AND objectTypeID = ?
                                 AND packageID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $name,
                     $this->getObjectTypeID($objectType),
@@ -689,11 +689,11 @@ class ACLOptionPackageInstallationPlugin extends AbstractOptionPackageInstallati
                 break;
 
             case 'options':
-                $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "
+                $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "
                         WHERE       optionName = ?
                                 AND objectTypeID = ?
                                 AND packageID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $name,
                     $this->getObjectTypeID($objectType),
index faa78ba4463ed8229fbf906aa36649750a15d380..83a2170a0ce2019eef4808917ef028277c5b9e15 100644 (file)
@@ -42,10 +42,10 @@ class ACPSearchProviderPackageInstallationPlugin extends AbstractXMLPackageInsta
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       providerName = ?
                         AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         WCF::getDB()->beginTransaction();
         foreach ($items as $item) {
@@ -79,7 +79,7 @@ class ACPSearchProviderPackageInstallationPlugin extends AbstractXMLPackageInsta
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   providerName = ?
                     AND packageID = ?";
         $parameters = [
index cafa0513f60151526c01fecd43e21dbe5b2df905..e5d566d944a9221d36c95637fa8261cfc6f54d32 100644 (file)
@@ -44,10 +44,10 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "
                 WHERE       menuItem = ?
                         AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $item['attributes']['name'],
@@ -88,9 +88,9 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI
         }
 
         $sql = "SELECT  COUNT(menuItemID)
-                FROM    " . $this->application . WCF_N . "_" . $this->tableName . "
+                FROM    " . $this->application . "1_" . $this->tableName . "
                 WHERE   menuItem = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$data['parentMenuItem']]);
 
         if (!$statement->fetchSingleColumn()) {
@@ -104,7 +104,7 @@ abstract class AbstractMenuPackageInstallationPlugin extends AbstractXMLPackageI
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    " . $this->application . WCF_N . "_" . $this->tableName . "
+                FROM    " . $this->application . "1_" . $this->tableName . "
                 WHERE   menuItem = ?
                     AND packageID = ?";
         $parameters = [
index 423984b929748ec68272d3407c8a6585f2becfdd..3f2fcc30f558c6e9e9dde84a2953f19e130fce85 100644 (file)
@@ -119,10 +119,10 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
         }
 
         if (!empty($options)) {
-            $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "
+            $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "
                     WHERE       optionName = ?
                             AND packageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($options as $option) {
                 $statement->execute([
@@ -143,10 +143,10 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
 
         if (!empty($categories)) {
             // delete options for given categories
-            $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "
+            $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "
                     WHERE       categoryName = ?
                             AND packageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             foreach ($categories as $category) {
                 $statement->execute([
                     $category,
@@ -155,10 +155,10 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
             }
 
             // delete categories
-            $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "_category
+            $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "_category
                     WHERE       categoryName = ?
                     AND         packageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($categories as $category) {
                 $statement->execute([
@@ -211,9 +211,9 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
             // validate parent
             if (!empty($data['parentCategoryName'])) {
                 $sql = "SELECT  COUNT(categoryID)
-                        FROM    " . $this->application . WCF_N . "_" . $this->tableName . "_category
+                        FROM    " . $this->application . "1_" . $this->tableName . "_category
                         WHERE   categoryName = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([$data['parentCategoryName']]);
 
                 if (!$statement->fetchSingleColumn()) {
@@ -257,9 +257,9 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
     {
         $hasUninstallOptions = parent::hasUninstall();
         $sql = "SELECT  COUNT(categoryID)
-                FROM    " . $this->application . WCF_N . "_" . $this->tableName . "_category
+                FROM    " . $this->application . "1_" . $this->tableName . "_category
                 WHERE   packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->installation->getPackageID()]);
 
         return $hasUninstallOptions || $statement->fetchSingleColumn() > 0;
@@ -274,9 +274,9 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
         parent::uninstall();
 
         // delete categories
-        $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "_category
+        $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "_category
                 WHERE       packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->installation->getPackageID()]);
     }
 
@@ -289,9 +289,9 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
     protected function getExistingCategory($category)
     {
         $sql = "SELECT  categoryID, packageID
-                FROM    " . $this->application . WCF_N . "_" . $this->tableName . "_category
+                FROM    " . $this->application . "1_" . $this->tableName . "_category
                 WHERE   categoryName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $category,
         ]);
@@ -311,11 +311,11 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
         $row = $this->getExistingCategory($category['categoryName']);
         if (empty($row['categoryID'])) {
             // insert new category
-            $sql = "INSERT INTO " . $this->application . WCF_N . "_" . $this->tableName . "_category
+            $sql = "INSERT INTO " . $this->application . "1_" . $this->tableName . "_category
                                 (packageID, categoryName, parentCategoryName, permissions,
                                 options" . ($category['showOrder'] !== null ? ",showOrder" : "") . ")
                     VALUES      (?, ?, ?, ?, ?" . ($category['showOrder'] !== null ? ", ?" : "") . ")";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             $data = [
                 $this->installation->getPackageID(),
@@ -335,13 +335,13 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
             }
 
             // update existing category
-            $sql = "UPDATE  " . $this->application . WCF_N . "_" . $this->tableName . "_category
+            $sql = "UPDATE  " . $this->application . "1_" . $this->tableName . "_category
                     SET     parentCategoryName = ?,
                             permissions = ?,
                             options = ?
                             " . (isset($category['showOrder']) ? ", showOrder = ?" : "") . "
                     WHERE   categoryID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             $data = [
                 $category['parentCategoryName'] ?? '',
@@ -382,9 +382,9 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
 
         // check if option already exists
         $sql = "SELECT  *
-                FROM    " . $this->application . WCF_N . "_" . $this->tableName . "
+                FROM    " . $this->application . "1_" . $this->tableName . "
                 WHERE   optionName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $data['name'],
         ]);
@@ -1221,19 +1221,19 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
         switch ($this->entryType) {
             case 'categories':
                 // also delete options
-                $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "
+                $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "
                         WHERE       categoryName = ?
                                 AND packageID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $name,
                     $this->installation->getPackageID(),
                 ]);
 
-                $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "_category
+                $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "_category
                         WHERE       categoryName = ?
                                 AND packageID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $name,
                     $this->installation->getPackageID(),
@@ -1242,10 +1242,10 @@ abstract class AbstractOptionPackageInstallationPlugin extends AbstractXMLPackag
                 break;
 
             case 'options':
-                $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "
+                $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "
                         WHERE       optionName = ?
                                 AND packageID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $name,
                     $this->installation->getPackageID(),
index 08dc5aaab55dbf5c2342dfda9825d810d0111711..b76888ef2a7b1c5095a37b85512036d0425a73c2 100644 (file)
@@ -84,9 +84,9 @@ abstract class AbstractPackageInstallationPlugin implements IPackageInstallation
         EventHandler::getInstance()->fireAction($this, 'hasUninstall');
 
         $sql = "SELECT  COUNT(*)
-                FROM    " . $this->application . WCF_N . "_" . $this->tableName . "
+                FROM    " . $this->application . "1_" . $this->tableName . "
                 WHERE   packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->installation->getPackageID()]);
 
         return $statement->fetchSingleColumn() > 0;
@@ -100,9 +100,9 @@ abstract class AbstractPackageInstallationPlugin implements IPackageInstallation
         // call 'uninstall' event
         EventHandler::getInstance()->fireAction($this, 'uninstall');
 
-        $sql = "DELETE FROM " . $this->application . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM " . $this->application . "1_" . $this->tableName . "
                 WHERE       packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$this->installation->getPackageID()]);
     }
 
index ac3f9e6fbc9ead9eb27b99469d332e04198dca2f..de846cc1df2e6068ef545e9b87229b212ebe1425 100644 (file)
@@ -176,7 +176,7 @@ abstract class AbstractXMLPackageInstallationPlugin extends AbstractPackageInsta
             if ($sqlData === null) {
                 $row = false;
             } else {
-                $statement = WCF::getDB()->prepareStatement($sqlData['sql']);
+                $statement = WCF::getDB()->prepare($sqlData['sql']);
                 $statement->execute($sqlData['parameters']);
                 $row = $statement->fetchArray();
             }
@@ -435,20 +435,20 @@ abstract class AbstractXMLPackageInstallationPlugin extends AbstractPackageInsta
             }
 
             $sql = "SELECT  MAX(showOrder) AS showOrder
-                    FROM    " . $this->application . WCF_N . "_" . $this->tableName . $tableNameExtension . "
+                    FROM    " . $this->application . "1_" . $this->tableName . $tableNameExtension . "
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             $maxShowOrder = $statement->fetchArray();
 
             return (!$maxShowOrder) ? 1 : ($maxShowOrder['showOrder'] + 1);
         } else {
             // increase all showOrder values which are >= $showOrder
-            $sql = "UPDATE  " . $this->application . WCF_N . "_" . $this->tableName . $tableNameExtension . "
+            $sql = "UPDATE  " . $this->application . "1_" . $this->tableName . $tableNameExtension . "
                     SET     showOrder = showOrder + 1
                     WHERE   showOrder >= ?
                     " . ($columnName !== null ? "AND " . $columnName . " = ?" : "");
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             $data = [$showOrder];
             if ($columnName !== null) {
index 7784e1e90488a26f54a7a3ca90f0995995c01f6f..1bc818e910a8cfa91dd299469e0a79a66f0aac73 100644 (file)
@@ -69,10 +69,10 @@ class BBCodePackageInstallationPlugin extends AbstractXMLPackageInstallationPlug
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       bbcodeTag = ?
                         AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $item['attributes']['name'],
@@ -155,7 +155,7 @@ class BBCodePackageInstallationPlugin extends AbstractXMLPackageInstallationPlug
     {
         // check if bbcode tag already exists
         $sqlData = $this->findExistingItem($data);
-        $statement = WCF::getDB()->prepareStatement($sqlData['sql']);
+        $statement = WCF::getDB()->prepare($sqlData['sql']);
         $statement->execute($sqlData['parameters']);
         $row = $statement->fetchArray();
         if ($row && $row['packageID'] != $this->installation->getPackageID()) {
@@ -170,7 +170,7 @@ class BBCodePackageInstallationPlugin extends AbstractXMLPackageInstallationPlug
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   bbcodeTag = ?";
         $parameters = [$data['bbcodeTag']];
 
index 35af138b623155e5d2249627461438e8b96c4b2e..c573bb14373ea74f2aa7a3f9ffd4ee6c92de5273 100644 (file)
@@ -288,7 +288,7 @@ class BoxPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_box
+                FROM    wcf1_box
                 WHERE   identifier = ?
                     AND packageID = ?";
         $parameters = [
index b97b4e8976189961c2aa97e8264aaa3a2e62099a..f04331bffe057305866dd367c974eb1b4c5b0126 100644 (file)
@@ -53,11 +53,11 @@ class ClipboardActionPackageInstallationPlugin extends AbstractXMLPackageInstall
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       actionName = ?
                         AND actionClassName = ?
                         AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $item['attributes']['name'],
@@ -109,7 +109,7 @@ class ClipboardActionPackageInstallationPlugin extends AbstractXMLPackageInstall
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   actionName = ?
                     AND actionClassName = ?
                     AND packageID = ?";
index 90c93a24b772e3de7ddd7c8c609e1d5b5401c2e0..44fc8716c1bfd52e1ff5aa5737b135524883161c 100644 (file)
@@ -38,10 +38,10 @@ class CoreObjectPackageInstallationPlugin extends AbstractXMLPackageInstallation
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       objectName = ?
                         AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $item['attributes']['name'],
@@ -66,7 +66,7 @@ class CoreObjectPackageInstallationPlugin extends AbstractXMLPackageInstallation
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   objectName = ?
                     AND packageID = ?";
         $parameters = [
index 883ecefb950336ffefc04004acc8c542020a5b47..9f14fb59d981dca1964ca1da2bf679fc7466a2dd 100644 (file)
@@ -203,7 +203,7 @@ class CronjobPackageInstallationPlugin extends AbstractXMLPackageInstallationPlu
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   packageID = ?
                     AND cronjobName = ?";
         $parameters = [
index f8e9c24cd0cbf404a2c733cdd5038f54648bed80..bb11cf7b8ca83aba504d2b694f8ddd2ae5eb2906 100644 (file)
@@ -57,19 +57,19 @@ class EventListenerPackageInstallationPlugin extends AbstractXMLPackageInstallat
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       packageID = ?
                         AND environment = ?
                         AND eventClassName = ?
                         AND eventName = ?
                         AND inherit = ?
                         AND listenerClassName = ?";
-        $legacyStatement = WCF::getDB()->prepareStatement($sql);
+        $legacyStatement = WCF::getDB()->prepare($sql);
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       packageID = ?
                         AND listenerName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         foreach ($items as $item) {
             if (!isset($item['attributes']['name'])) {
@@ -126,7 +126,7 @@ class EventListenerPackageInstallationPlugin extends AbstractXMLPackageInstallat
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   packageID = ?
                     AND listenerName = ?";
         $parameters = [
index 7bbd3780cd54ab71fa442649bf855297146d3a0f..6e068ff617cd2b6aea61f0af860bb2511d39720f 100644 (file)
@@ -199,10 +199,10 @@ class LanguagePackageInstallationPlugin extends AbstractXMLPackageInstallationPl
         }
 
         if (!empty($itemIDs)) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+            $sql = "DELETE FROM wcf1_" . $this->tableName . "
                     WHERE       languageItemID = ?
                             AND packageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($itemIDs as $itemID) {
                 $statement->execute([
index 3f80e3b6a4da23e8c1c1ed9f26f57ab9b46fd83c..7a4c79ef4720eb67b583373d2d5b2cb7c305d8e6 100644 (file)
@@ -50,10 +50,10 @@ class MediaProviderPackageInstallationPlugin extends AbstractXMLPackageInstallat
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       packageID = ?
                         AND name = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $this->installation->getPackageID(),
@@ -90,7 +90,7 @@ class MediaProviderPackageInstallationPlugin extends AbstractXMLPackageInstallat
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   packageID = ?
                     AND name = ?";
         $parameters = [
index 696bd67b6774609c0ab20a2a12f754d7a3340b6a..7046b775b38f1edc5d5d89a7ab92e04554ac488b 100644 (file)
@@ -223,7 +223,7 @@ class MenuItemPackageInstallationPlugin extends AbstractXMLPackageInstallationPl
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_menu_item
+                FROM    wcf1_menu_item
                 WHERE   identifier = ?
                     AND packageID = ?";
         $parameters = [
index 7a1983c237cfb81c87e63db8cf8f09726d8b6ded..e9cac64b095d29600d8e23f1c9fabec0be8194b3 100644 (file)
@@ -203,7 +203,7 @@ class MenuPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_menu
+                FROM    wcf1_menu
                 WHERE   identifier = ?
                     AND packageID = ?";
         $parameters = [
index deca5c8d8233842a1b24896a17e12f5423899dfc..5b9ff3de796ee69976e1923a6be3f264789a792f 100644 (file)
@@ -43,10 +43,10 @@ class ObjectTypeDefinitionPackageInstallationPlugin extends AbstractXMLPackageIn
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       definitionName = ?
                         AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $item['attributes']['name'],
@@ -81,7 +81,7 @@ class ObjectTypeDefinitionPackageInstallationPlugin extends AbstractXMLPackageIn
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   definitionName = ?";
         $parameters = [$data['definitionName']];
 
index 5a317de481bcb55f3f859fe7c54e8ef1d72e1e82..0a5b3cb995cee9dd3e795bf65ffa2d97e4fcfc86 100644 (file)
@@ -113,11 +113,11 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       objectType = ?
                         AND definitionID = ?
                         AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $item['attributes']['name'],
@@ -174,7 +174,7 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   objectType = ?
                     AND definitionID = ?
                     AND packageID = ?";
@@ -1113,7 +1113,7 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation
                 $className,
                 UserIntegerPropertyCondition::class,
                 $prefix . 'UserIntegerPropertyName',
-                'wcf' . WCF_N . '_user'
+                'wcf1_user'
             )->required()
         );
         $this->definitionElementChildren[$objectTypeDefinition]['propertyname'] = '';
@@ -1124,7 +1124,7 @@ class ObjectTypePackageInstallationPlugin extends AbstractXMLPackageInstallation
                 $className,
                 UserTimestampPropertyCondition::class,
                 $prefix . 'UserTimestampPropertyName',
-                'wcf' . WCF_N . '_user'
+                'wcf1_user'
             )->required()
         );
         // already added above:
index 6431a3b2b4551aaf74586a24d44fb056b638f192..3bfcd467bb2392eb5f5812eae6f7a62c616a8fdc 100644 (file)
@@ -141,9 +141,9 @@ class OptionPackageInstallationPlugin extends AbstractOptionPackageInstallationP
 
         // try to find an existing option for updating
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   optionName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $optionName,
         ]);
index 8317ffda83721ae917b450660db94f6585b6065f..66b582f0625eac479e1fe9ea0d5ea176230d7b49 100644 (file)
@@ -41,10 +41,10 @@ class PIPPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       pluginName = ?
                         AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $item['attributes']['name'],
@@ -80,7 +80,7 @@ class PIPPackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   pluginName = ?
                     AND packageID = ?";
         $parameters = [
index 1c9ab0554b6837ef7fdd2f29d52e2a8e1907c51d..51faa104132fcf01f61c74890eef8a03a54d5e16 100644 (file)
@@ -172,9 +172,9 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
         $parentPageID = null;
         if (!empty($data['elements']['parent'])) {
             $sql = "SELECT  pageID
-                    FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                    FROM    wcf1_" . $this->tableName . "
                     WHERE   identifier = ?";
-            $statement = WCF::getDB()->prepareStatement($sql, 1);
+            $statement = WCF::getDB()->prepare($sql, 1);
             $statement->execute([$data['elements']['parent']]);
             $row = $statement->fetchSingleRow();
             if ($row === false) {
@@ -287,7 +287,7 @@ class PagePackageInstallationPlugin extends AbstractXMLPackageInstallationPlugin
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   identifier = ?
                     AND packageID = ?";
         $parameters = [
index f73fbe406b4c6946268f4a9ebf071cc4adee5ad2..3c8253c21f98b912527115446a2cd41d4cdeb17b 100644 (file)
@@ -52,10 +52,10 @@ class SmileyPackageInstallationPlugin extends AbstractXMLPackageInstallationPlug
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       smileyCode = ?
                         AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $item['attributes']['name'],
@@ -95,7 +95,7 @@ class SmileyPackageInstallationPlugin extends AbstractXMLPackageInstallationPlug
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   smileyCode = ?
                     AND packageID = ?";
         $parameters = [
index f86e63fffc2e36fbaf4463b0688cdda1ecf99a71..2403fbd1258a5f41c781925e7051ad3751d3838b 100644 (file)
@@ -52,13 +52,13 @@ class TemplateListenerPackageInstallationPlugin extends AbstractXMLPackageInstal
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       packageID = ?
                         AND environment = ?
                         AND eventName = ?
                         AND name = ?
                         AND templateName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $this->installation->getPackageID(),
@@ -100,7 +100,7 @@ class TemplateListenerPackageInstallationPlugin extends AbstractXMLPackageInstal
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   packageID = ?
                     AND name = ?
                     AND templateName = ?
index 7542e1a899dd83bc5828c568a39e68fec8604d59..57f36d4618ca98881c6b3708784c6329917ad5a8 100644 (file)
@@ -207,10 +207,10 @@ class UserGroupOptionPackageInstallationPlugin extends AbstractOptionPackageInst
             }
 
             // save values
-            $sql = "INSERT INTO wcf" . WCF_N . "_user_group_option_value
+            $sql = "INSERT INTO wcf1_user_group_option_value
                                 (groupID, optionID, optionValue)
                     VALUES      (?, ?, ?)";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             WCF::getDB()->beginTransaction();
             foreach ($values as $groupID => $value) {
                 $statement->execute([
index 2546bfc13c199b0c43506e05f4e0fd3c7a8065e4..c2390794b2a759344a8253cd845853d0e1472fe3 100644 (file)
@@ -62,11 +62,11 @@ class UserNotificationEventPackageInstallationPlugin extends AbstractXMLPackageI
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       packageID = ?
                         AND objectTypeID = ?
                         AND eventName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $this->installation->getPackageID(),
@@ -139,7 +139,7 @@ class UserNotificationEventPackageInstallationPlugin extends AbstractXMLPackageI
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   objectTypeID = ?
                     AND eventName = ?";
         $parameters = [
index ad2893f987a1c21d29e39fca45a60322b3da4f99..e526aafaa06b3fd85d0bdf06c156a212d01c249d 100644 (file)
@@ -182,10 +182,10 @@ class UserOptionPackageInstallationPlugin extends AbstractOptionPackageInstallat
 
         // get optionID if it was installed by this package already
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   optionName = ?
                     AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $optionName,
             $this->installation->getPackageID(),
@@ -244,7 +244,7 @@ class UserOptionPackageInstallationPlugin extends AbstractOptionPackageInstallat
         $statement->execute([$this->installation->getPackageID()]);
         while ($row = $statement->fetchArray()) {
             WCF::getDB()->getEditor()->dropColumn(
-                'wcf' . WCF_N . '_user_option_value',
+                'wcf1_user_option_value',
                 'userOption' . $row['optionID']
             );
         }
index 1224b77507b22a2246c87f308a12386ec9e7d371..099d0a28d3f4c25fb651bd047b44dc686394c838 100644 (file)
@@ -53,10 +53,10 @@ class UserProfileMenuPackageInstallationPlugin extends AbstractXMLPackageInstall
      */
     protected function handleDelete(array $items)
     {
-        $sql = "DELETE FROM wcf" . WCF_N . "_" . $this->tableName . "
+        $sql = "DELETE FROM wcf1_" . $this->tableName . "
                 WHERE       menuItem = ?
                         AND packageID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($items as $item) {
             $statement->execute([
                 $item['attributes']['name'],
@@ -98,7 +98,7 @@ class UserProfileMenuPackageInstallationPlugin extends AbstractXMLPackageInstall
     protected function findExistingItem(array $data)
     {
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_" . $this->tableName . "
+                FROM    wcf1_" . $this->tableName . "
                 WHERE   menuItem = ?
                     AND packageID = ?";
         $parameters = [
index 170e6c01374803bd6fb1df9bda873e838dae1775..b8f5da81c6a9afe5919b983a35ff3f3b3ceeefd6 100644 (file)
@@ -55,7 +55,7 @@ class ArticlePageHandler extends AbstractLookupPageHandler implements IOnlineLoc
         $articleList = new ViewableArticleList();
         $articleList->sqlSelects = "(
             SELECT  title
-            FROM    wcf" . WCF_N . "_article_content
+            FROM    wcf1_article_content
             WHERE   articleID = article.articleID
                 AND (
                         languageID IS NULL
@@ -66,7 +66,7 @@ class ArticlePageHandler extends AbstractLookupPageHandler implements IOnlineLoc
         $articleList->getConditionBuilder()->add(
             'article.articleID IN (
                 SELECT  articleID
-                FROM    wcf' . WCF_N . '_article_content
+                FROM    wcf1_article_content
                 WHERE   title LIKE ?
             )',
             ['%' . $searchString . '%']
index 178dbaf0a8d8ce9af542f4ff1fb7e3a0713cefca..a4ed2b2e5c84c52923cddd8267c0d23b481af32a 100644 (file)
@@ -21,10 +21,10 @@ class ContactFormPageHandler extends AbstractMenuPageHandler
     {
         $sql = "SELECT EXISTS(
                     SELECT  *
-                    FROM    wcf" . WCF_N . "_contact_recipient
+                    FROM    wcf1_contact_recipient
                     WHERE   isDisabled = ?
                 )";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([0]);
 
         return $statement->fetchSingleColumn();
index 1d08a2a9dd7df7f3f9a5d92de60d17a46470c1aa..2ee2252b9254b3d6dfaf499aaafe1eabd5e6e5b1 100644 (file)
@@ -111,11 +111,11 @@ trait TDecoratedCategoryLookupPageHandler
             ['%' . $searchString . '%', '%' . $searchString . '%']
         );
         $sql = "SELECT      DISTINCT categoryID
-                FROM        wcf" . WCF_N . "_category category
-                LEFT JOIN   wcf" . WCF_N . "_language_item language_item
+                FROM        wcf1_category category
+                LEFT JOIN   wcf1_language_item language_item
                 ON          language_item.languageItem = category.title
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql, 10);
+        $statement = WCF::getDB()->prepare($sql, 10);
         $statement->execute($conditionBuilder->getParameters());
         $results = [];
         while ($categoryID = $statement->fetchColumn()) {
index c90cbd846a9a0603506c69ad827d7524d694c299..2c96f11e7b527b5dc66a7ae60455f2b9eb182594 100644 (file)
@@ -50,7 +50,7 @@ class TrophyPageHandler extends AbstractLookupPageHandler
             $trophyList->sqlJoins .= ', ';
         }
         $trophyList->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_language_item language_item
+            LEFT JOIN   wcf1_language_item language_item
             ON          language_item.languageItem = trophy.title";
         $trophyList->getConditionBuilder()->add(
             '(trophy.title LIKE ? OR language_item.languageItemValue LIKE ?)',
index 2a01d020ddaf6c19752e39537494e216a12fe7f1..3bb374dc1ebc19e26d7f6bf7961a75d695341fd8 100644 (file)
@@ -98,9 +98,9 @@ class PollManager extends SingletonFactory
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("pollID IN (?)", [$pollIDs]);
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_poll
+        $sql = "DELETE FROM wcf1_poll
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
     }
 
@@ -146,10 +146,10 @@ class PollManager extends SingletonFactory
 
             // load poll options
             $sql = "SELECT      optionID, optionValue
-                    FROM        wcf" . WCF_N . "_poll_option
+                    FROM        wcf1_poll_option
                     WHERE       pollID = ?
                     ORDER BY    showOrder ASC";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([$this->poll->pollID]);
             while ($row = $statement->fetchArray()) {
                 $this->pollOptions[] = $row;
@@ -431,7 +431,7 @@ class PollManager extends SingletonFactory
         if (WCF::getUser()->userID) {
             $optionList->sqlSelects = "CASE WHEN poll_option_vote.optionID IS NULL THEN '0' ELSE '1' END AS voted";
             $optionList->sqlJoins = "
-                LEFT JOIN   wcf" . WCF_N . "_poll_option_vote poll_option_vote
+                LEFT JOIN   wcf1_poll_option_vote poll_option_vote
                 ON          poll_option_vote.optionID = poll_option.optionID
                         AND poll_option_vote.userID = " . WCF::getUser()->userID;
         } else {
index b11da7a3754c2e29691bb36f40e9cdf8546f067e..de28adc8f43a2cc0181b1dcc89a947bf5cf1a357 100644 (file)
@@ -275,8 +275,8 @@ class ReactionHandler extends SingletonFactory
             $sql = "SELECT      like_object.*,
                                 COALESCE(like_table.reactionTypeID, 0) AS reactionTypeID,
                                 COALESCE(like_table.likeValue, 0) AS liked
-                    FROM        wcf" . WCF_N . "_like_object like_object
-                    LEFT JOIN   wcf" . WCF_N . "_like like_table
+                    FROM        wcf1_like_object like_object
+                    LEFT JOIN   wcf1_like like_table
                     ON          like_table.objectTypeID = like_object.objectTypeID
                             AND like_table.objectID = like_object.objectID
                             AND like_table.userID = ?
@@ -285,11 +285,11 @@ class ReactionHandler extends SingletonFactory
             \array_unshift($parameters, WCF::getUser()->userID);
         } else {
             $sql = "SELECT  like_object.*, 0 AS liked
-                    FROM    wcf" . WCF_N . "_like_object like_object
+                    FROM    wcf1_like_object like_object
                     " . $conditions;
         }
 
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($parameters);
         while ($row = $statement->fetchArray()) {
             $this->likeObjectCache[$objectType->objectTypeID][$row['objectID']] = new LikeObject(null, $row);
@@ -770,13 +770,13 @@ class ReactionHandler extends SingletonFactory
         $sql = "SELECT      like_object.likes, like_object.dislikes, like_object.cumulativeLikes,
                             COALESCE(like_table.reactionTypeID, 0) AS reactionTypeID,
                             COALESCE(like_table.likeValue, 0) AS liked
-                FROM        wcf" . WCF_N . "_like_object like_object
-                LEFT JOIN   wcf" . WCF_N . "_like like_table
+                FROM        wcf1_like_object like_object
+                LEFT JOIN   wcf1_like like_table
                 ON          like_table.objectTypeID = ?
                         AND like_table.objectID = like_object.objectID
                         AND like_table.userID = ?
                 WHERE   like_object.likeObjectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $likeObject->objectTypeID,
             $user->userID,
index 3aed7fa8d3e3011dcb33e8ec92dfc8b824b55f70..71adb13ea395250e9cd829dc21edb1f7bc7d7054 100644 (file)
@@ -24,9 +24,9 @@ abstract class AbstractSearchIndexManager extends SingletonFactory implements IS
     {
         // get definition id
         $sql = "SELECT  definitionID
-                FROM    wcf" . WCF_N . "_object_type_definition
+                FROM    wcf1_object_type_definition
                 WHERE   definitionName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(['com.woltlab.wcf.searchableObjectType']);
         $row = $statement->fetchArray();
 
index 9699006c52649d112da57aecae930d36f94cc4cb..1d85da01883777437a9ba0a5f682bacc1fe7a145 100644 (file)
@@ -57,7 +57,7 @@ class ArticleSearch extends AbstractSearchProvider
      */
     public function getTableName(): string
     {
-        return 'wcf' . WCF_N . '_article_content';
+        return 'wcf1_article_content';
     }
 
     /**
@@ -81,7 +81,7 @@ class ArticleSearch extends AbstractSearchProvider
      */
     public function getUsernameFieldName(): string
     {
-        return 'wcf' . WCF_N . '_article.username';
+        return 'wcf1_article.username';
     }
 
     /**
@@ -89,7 +89,7 @@ class ArticleSearch extends AbstractSearchProvider
      */
     public function getTimeFieldName(): string
     {
-        return 'wcf' . WCF_N . '_article.time';
+        return 'wcf1_article.time';
     }
 
     /**
@@ -114,7 +114,7 @@ class ArticleSearch extends AbstractSearchProvider
             $conditionBuilder->add('1=0');
         } else {
             $conditionBuilder->add(
-                'wcf' . WCF_N . '_article.categoryID IN (?) AND wcf' . WCF_N . '_article.publicationStatus = ?',
+                'wcf1_article.categoryID IN (?) AND wcf1_article.publicationStatus = ?',
                 [$articleCategoryIDs, Article::PUBLISHED]
             );
         }
@@ -144,8 +144,8 @@ class ArticleSearch extends AbstractSearchProvider
     public function getJoins(): string
     {
         return '
-            INNER JOIN  wcf' . WCF_N . '_article
-            ON          wcf' . WCF_N . '_article.articleID = ' . $this->getTableName() . '.articleID';
+            INNER JOIN  wcf1_article
+            ON          wcf1_article.articleID = ' . $this->getTableName() . '.articleID';
     }
 
     /**
index 326394c0a85337ecbb7d8cb6d0dbaeaa1d9054ed..32ea886ecbf81eb85a5ca335ac79673db7b2af17 100644 (file)
@@ -51,7 +51,7 @@ class PageSearch extends AbstractSearchProvider
      */
     public function getTableName(): string
     {
-        return 'wcf' . WCF_N . '_page_content';
+        return 'wcf1_page_content';
     }
 
     /**
@@ -83,7 +83,7 @@ class PageSearch extends AbstractSearchProvider
      */
     public function getTimeFieldName(): string
     {
-        return 'wcf' . WCF_N . '_page_content.pageContentID';
+        return 'wcf1_page_content.pageContentID';
     }
 
     /**
@@ -93,12 +93,12 @@ class PageSearch extends AbstractSearchProvider
     {
         $conditionBuilder = new PreparedStatementConditionBuilder();
         $conditionBuilder->add(
-            'wcf' . WCF_N . '_page.pageType IN (?) AND wcf' . WCF_N . '_page.isDisabled = ?',
+            'wcf1_page.pageType IN (?) AND wcf1_page.isDisabled = ?',
             [['text', 'html'], 0]
         );
         // Exclude versions of disabled languages.
         $conditionBuilder->add(
-            '(wcf' . WCF_N . '_page_content.languageID IS NULL OR wcf' . WCF_N . '_page_content.languageID IN (?))',
+            '(wcf1_page_content.languageID IS NULL OR wcf1_page_content.languageID IN (?))',
             [\array_keys(LanguageFactory::getInstance()->getLanguages())]
         );
         $this->initAclCondition($conditionBuilder);
@@ -111,24 +111,24 @@ class PageSearch extends AbstractSearchProvider
         $objectTypeID = ObjectTypeCache::getInstance()
             ->getObjectTypeIDByName('com.woltlab.wcf.acl.simple', 'com.woltlab.wcf.page');
         $conditionBuilder->add('(
-            wcf' . WCF_N . '_page_content.pageID NOT IN (
+            wcf1_page_content.pageID NOT IN (
                 SELECT  objectID
-                FROM    wcf' . WCF_N . '_acl_simple_to_group
+                FROM    wcf1_acl_simple_to_group
                 WHERE   objectTypeID = ?
                 UNION
                 SELECT  objectID
-                FROM    wcf' . WCF_N . '_acl_simple_to_user
+                FROM    wcf1_acl_simple_to_user
                 WHERE   objectTypeID = ?
             )
             OR
-            wcf' . WCF_N . '_page_content.pageID IN (
+            wcf1_page_content.pageID IN (
                 SELECT  objectID
-                FROM    wcf' . WCF_N . '_acl_simple_to_group
+                FROM    wcf1_acl_simple_to_group
                 WHERE   objectTypeID = ?
                     AND groupID IN (?)
                 UNION
                 SELECT  objectID
-                FROM    wcf' . WCF_N . '_acl_simple_to_user
+                FROM    wcf1_acl_simple_to_user
                 WHERE   objectTypeID = ?
                     AND userID = ?
             )
@@ -148,8 +148,8 @@ class PageSearch extends AbstractSearchProvider
     public function getJoins(): string
     {
         return '
-            INNER JOIN  wcf' . WCF_N . '_page
-            ON          wcf' . WCF_N . '_page.pageID = ' . $this->getTableName() . '.pageID';
+            INNER JOIN  wcf1_page
+            ON          wcf1_page.pageID = ' . $this->getTableName() . '.pageID';
     }
 
     /**
index bf52e0f6559f42e10b1411de750b0806badb775b..31557569bfe70e818c1638324f5034465c510cbc 100644 (file)
@@ -326,9 +326,9 @@ final class SearchHandler
             }
 
             $sql = "SELECT  searchID
-                    FROM    wcf" . WCF_N . "_search
+                    FROM    wcf1_search
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
             if ($searchID = $statement->fetchSingleColumn()) {
                 return new Search($searchID);
index 3098e3ce59f747da2a81c3a896a8cd5ab871bd73..5e59db6630cdfda0418d2fe470ebcf0bae9bcd49 100644 (file)
@@ -237,6 +237,6 @@ class SearchIndexManager extends SingletonFactory implements IContextAwareSearch
             }
         }
 
-        return 'wcf' . WCF_N . '_search_index_' . \substr(\sha1($objectType->objectType), 0, 8);
+        return 'wcf1_search_index_' . \substr(\sha1($objectType->objectType), 0, 8);
     }
 }
index 7fc6cf1cbfbf9daec8ccd43c06277c9ad0d6b6ad..2e02c79661c74bff2d47145d10f0847f903a27f1 100644 (file)
@@ -41,10 +41,10 @@ class MenuItemACPSearchResultProvider extends AbstractACPSearchResultProvider im
         $conditions->add("languageItemValue LIKE ?", ['%' . $query . '%']);
 
         $sql = "SELECT      languageItem, languageItemValue
-                FROM        wcf" . WCF_N . "_language_item
+                FROM        wcf1_language_item
                 " . $conditions . "
                 ORDER BY    languageItemValue ASC";
-        $statement = WCF::getDB()->prepareStatement($sql); // don't use a limit here
+        $statement = WCF::getDB()->prepare($sql); // don't use a limit here
         $statement->execute($conditions->getParameters());
         $languageItems = $statement->fetchMap('languageItem', 'languageItemValue');
 
@@ -57,9 +57,9 @@ class MenuItemACPSearchResultProvider extends AbstractACPSearchResultProvider im
         $conditions->add("menuItemController <> ''");
 
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_acp_menu_item
+                FROM    wcf1_acp_menu_item
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql); // don't use a limit here
+        $statement = WCF::getDB()->prepare($sql); // don't use a limit here
         $statement->execute($conditions->getParameters());
 
         $menuItems = ACPMenu::getInstance()->menuItemList;
index 0d488e201d92419a9eb3bf4ff5aa61420061fdc3..4fb0b2772b4bd7862e89ae01062b06133dbc4a87 100644 (file)
@@ -42,10 +42,10 @@ class OptionACPSearchResultProvider extends AbstractCategorizedACPSearchResultPr
         $conditions->add("languageItemValue LIKE ?", ['%' . $query . '%']);
 
         $sql = "SELECT      languageItem
-                FROM        wcf" . WCF_N . "_language_item
+                FROM        wcf1_language_item
                 " . $conditions . "
                 ORDER BY    languageItemValue ASC";
-        $statement = WCF::getDB()->prepareStatement($sql); // don't use a limit here
+        $statement = WCF::getDB()->prepare($sql); // don't use a limit here
         $statement->execute($conditions->getParameters());
         $optionNames = $categoryNames = [];
         while ($languageItem = $statement->fetchColumn()) {
@@ -75,9 +75,9 @@ class OptionACPSearchResultProvider extends AbstractCategorizedACPSearchResultPr
         }
 
         $sql = "SELECT  optionName, categoryName, options, permissions, hidden
-                FROM    wcf" . WCF_N . "_option
+                FROM    wcf1_option
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql); // don't use a limit here
+        $statement = WCF::getDB()->prepare($sql); // don't use a limit here
         $statement->execute($conditions->getParameters());
 
         $optionCategories = OptionCacheBuilder::getInstance()->getData([], 'categories');
index a812e3f1d66f89d6a23a1087cf75409b29c833aa..c0fa9db2621991274212d596dbcd4dc7c8ea476f 100644 (file)
@@ -36,9 +36,9 @@ class PackageACPSearchResultProvider implements IACPSearchResultProvider
         $conditions->add("languageItemValue LIKE ?", ['%' . $query . '%']);
 
         $sql = "SELECT  languageItem
-                FROM    wcf" . WCF_N . "_language_item
+                FROM    wcf1_language_item
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         $packageIDs = [];
@@ -52,11 +52,11 @@ class PackageACPSearchResultProvider implements IACPSearchResultProvider
         }
 
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_package
+                FROM    wcf1_package
                 WHERE   packageName LIKE ?
                      OR package LIKE ?
                     " . (\count($conditions->getParameters()) ? "OR " . $conditions : "");
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([
             '%' . $query . '%',
             '%' . $query . '%',
index fbf1b599e81abb7e71459020513160fc2f7f259d..b6fd8dde816b98316ac338492aae1240ef5ad798 100644 (file)
@@ -34,9 +34,9 @@ class TrophyACPSearchResultProvider implements IACPSearchResultProvider
         $conditions->add("languageItemValue LIKE ?", ['%' . $query . '%']);
 
         $sql = "SELECT  languageItem
-                FROM    wcf" . WCF_N . "_language_item
+                FROM    wcf1_language_item
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         $trophyIDs = [];
@@ -50,10 +50,10 @@ class TrophyACPSearchResultProvider implements IACPSearchResultProvider
         }
 
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_trophy
+                FROM    wcf1_trophy
                 WHERE   title LIKE ?
                     " . (!empty($conditions->getParameters()) ? "OR " . $conditions : "");
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(\array_merge([
             '%' . $query . '%',
         ], $conditions->getParameters()));
index e3217dc4cfdd59b94718be3a7293253856e3899c..98cf4f137866cf967a02f5785387136a0bb2ce54 100644 (file)
@@ -34,9 +34,9 @@ class UserACPSearchResultProvider implements IACPSearchResultProvider
         }
 
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_user
+                FROM    wcf1_user
                 {$conditionBuilder}";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         $results = [];
index dd46609a003c04b05710fd4732145f92e1e5eb00..bd7e61b136aaa5eb00550dd25a7ffc7f2dc39149 100644 (file)
@@ -51,10 +51,10 @@ class UserGroupOptionACPSearchResultProvider extends AbstractCategorizedACPSearc
         $conditions->add("languageItemValue LIKE ?", ['%' . $query . '%']);
 
         $sql = "SELECT      languageItem
-                FROM        wcf" . WCF_N . "_language_item
+                FROM        wcf1_language_item
                 " . $conditions . "
                 ORDER BY    languageItemValue ASC";
-        $statement = WCF::getDB()->prepareStatement($sql); // don't use a limit here
+        $statement = WCF::getDB()->prepare($sql); // don't use a limit here
         $statement->execute($conditions->getParameters());
         $languageItems = [];
         while ($languageItem = $statement->fetchColumn()) {
@@ -80,9 +80,9 @@ class UserGroupOptionACPSearchResultProvider extends AbstractCategorizedACPSearc
         }
 
         $sql = "SELECT  optionID, optionName, categoryName, permissions, options
-                FROM    wcf" . WCF_N . "_user_group_option
+                FROM    wcf1_user_group_option
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql); // don't use a limit here
+        $statement = WCF::getDB()->prepare($sql); // don't use a limit here
         $statement->execute($conditions->getParameters());
 
         $optionCategories = UserGroupOptionCacheBuilder::getInstance()->getData([], 'categories');
index d267fc8cd35a5b7f8327740548209f7c80cd29c1..6f90de03cd71115fe8cba9f6211fdef94a196303 100644 (file)
@@ -117,7 +117,7 @@ class MysqlSearchEngine extends AbstractSearchEngine
 
         try {
             $messages = [];
-            $statement = WCF::getDB()->prepareStatement($sql, $limit);
+            $statement = WCF::getDB()->prepare($sql, $limit);
             $statement->execute($parameters);
             while ($row = $statement->fetchArray()) {
                 $messages[] = [
@@ -565,7 +565,7 @@ class MysqlSearchEngine extends AbstractSearchEngine
         if (!isset($this->minTokenSize)) {
             try {
                 $sql = "SELECT @@innodb_ft_min_token_size";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute();
                 $this->minTokenSize = $statement->fetchSingleColumn();
             } catch (DatabaseQueryExecutionException $e) {
index 7bb605b967a72f090ba756bbd68a2cce770809ff..005923260f1fe3fe15232c61a9d10a53571cff31 100644 (file)
@@ -40,7 +40,7 @@ class MysqlSearchIndexManager extends AbstractSearchIndexManager
         $sql = "REPLACE INTO    " . SearchIndexManager::getTableName($objectType) . "
                                 (objectID, subject, message, time, userID, username, languageID, metaData)
                 VALUES          (?, ?, ?, ?, ?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$objectID, $subject, $message, $time, $userID, $username, $languageID, $metaData]);
     }
 
@@ -62,7 +62,7 @@ class MysqlSearchIndexManager extends AbstractSearchIndexManager
 
             $sql = "DELETE FROM " . $tableName . "
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
         }
         WCF::getDB()->commitTransaction();
@@ -76,7 +76,7 @@ class MysqlSearchIndexManager extends AbstractSearchIndexManager
         $this->createSearchIndex(SearchIndexManager::getInstance()->getObjectType($objectType));
 
         $sql = "TRUNCATE TABLE " . SearchIndexManager::getTableName($objectType);
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
     }
 
@@ -89,9 +89,9 @@ class MysqlSearchIndexManager extends AbstractSearchIndexManager
 
         // check if table already exists
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_package_installation_sql_log
+                FROM    wcf1_package_installation_sql_log
                 WHERE   sqlTable = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$tableName]);
 
         if ($statement->fetchSingleColumn()) {
@@ -133,14 +133,14 @@ class MysqlSearchIndexManager extends AbstractSearchIndexManager
         // add comment
         $sql = "ALTER TABLE " . $tableName . "
                 COMMENT     = 'Search index for " . $objectType->objectType . "'";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         // log table
-        $sql = "INSERT INTO wcf" . WCF_N . "_package_installation_sql_log
+        $sql = "INSERT INTO wcf1_package_installation_sql_log
                             (packageID, sqlTable)
                 VALUES      (?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectType->packageID,
             $tableName,
index 0942d4874fd9ecdafbd1d1c4daf9fa0a4cd5d3fa..fd2ff0f590889b4e2f67f39c25f6e1b19720c4b0 100644 (file)
@@ -38,10 +38,10 @@ class MultilingualPageSitemapObject extends AbstractSitemapObjectObjectType
         $pageList = parent::getObjectList();
 
         $pageList->sqlConditionJoins = '
-            LEFT JOIN   wcf' . WCF_N . '_page page
+            LEFT JOIN   wcf1_page page
             ON          page_content.pageID = page.pageID';
         $pageList->sqlJoins = '
-            LEFT JOIN   wcf' . WCF_N . '_page page
+            LEFT JOIN   wcf1_page page
             ON          page_content.pageID = page.pageID';
         $pageList->getConditionBuilder()->add('page.isMultilingual = ?', [1]);
         $pageList->getConditionBuilder()->add('page.allowSpidersToIndex = ?', [1]);
index 0b8e0e65d5e0db247686416dbd3e19476d4c266d..d14c8e6ec06a68c15188c427f0c3044a152c9a1c 100644 (file)
@@ -34,18 +34,18 @@ abstract class AbstractCommentStatDailyHandler extends AbstractStatDailyHandler
 
         $sql = "SELECT (
                     SELECT  COUNT(*)
-                    FROM    wcf" . WCF_N . "_comment
+                    FROM    wcf1_comment
                     WHERE   objectTypeID = ?
                         AND time BETWEEN ? AND ?
                 ) + (
                     SELECT      COUNT(*)
-                    FROM        wcf" . WCF_N . "_comment_response comment_response
-                    LEFT JOIN   wcf" . WCF_N . "_comment comment
+                    FROM        wcf1_comment_response comment_response
+                    LEFT JOIN   wcf1_comment comment
                     ON          comment.commentID = comment_response.commentID
                     WHERE       comment.objectTypeID = ?
                             AND comment_response.time BETWEEN ? AND ?
                 )";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $date,
@@ -58,18 +58,18 @@ abstract class AbstractCommentStatDailyHandler extends AbstractStatDailyHandler
 
         $sql = "SELECT (
                     SELECT  COUNT(*)
-                    FROM    wcf" . WCF_N . "_comment
+                    FROM    wcf1_comment
                     WHERE   objectTypeID = ?
                         AND time < ?
                 ) + (
                     SELECT      COUNT(*)
-                    FROM        wcf" . WCF_N . "_comment_response comment_response
-                    LEFT JOIN   wcf" . WCF_N . "_comment comment
+                    FROM        wcf1_comment_response comment_response
+                    LEFT JOIN   wcf1_comment comment
                     ON          comment.commentID = comment_response.commentID
                     WHERE       comment.objectTypeID = ?
                             AND comment_response.time < ?
                 )";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $date + 86400,
index b3847d113674c693230d4a08600b38a026f7b9b4..4a8ba738ce0c012c6554d5e1ba5ec26cd275d498 100644 (file)
@@ -34,7 +34,7 @@ abstract class AbstractDiskUsageStatDailyHandler extends AbstractStatDailyHandle
         $sql = "SELECT  CEIL(SUM(" . $this->columnName . ") / 1000)
                 FROM    " . $tableName . "
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         return $statement->fetchSingleColumn();
@@ -53,7 +53,7 @@ abstract class AbstractDiskUsageStatDailyHandler extends AbstractStatDailyHandle
         $sql = "SELECT  CEIL(SUM(" . $this->columnName . ") / 1000)
                 FROM    " . $tableName . "
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         return $statement->fetchSingleColumn();
index 73d03754b602f2780c89d7822cf24d6515a4b261..20fa2ae83a645a8b3a671df1c43f229943fb27ac 100644 (file)
@@ -32,7 +32,7 @@ abstract class AbstractStatDailyHandler implements IStatDailyHandler
         $sql = "SELECT  COUNT(*)
                 FROM    " . $tableName . "
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         return $statement->fetchSingleColumn();
@@ -56,7 +56,7 @@ abstract class AbstractStatDailyHandler implements IStatDailyHandler
         $sql = "SELECT  COUNT(*)
                 FROM    " . $tableName . "
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         return $statement->fetchSingleColumn();
index 85b6094f1c33969cf9c5ff754812355c2081ddbc..572b3fe3e4fb094f3c7525a8ad79cacf91a2921c 100644 (file)
@@ -17,8 +17,8 @@ class AttachmentDiskUsageStatDailyHandler extends AbstractDiskUsageStatDailyHand
     public function getData($date)
     {
         return [
-            'counter' => $this->getCounter($date, 'wcf' . WCF_N . '_attachment', 'uploadTime'),
-            'total' => $this->getTotal($date, 'wcf' . WCF_N . '_attachment', 'uploadTime'),
+            'counter' => $this->getCounter($date, 'wcf1_attachment', 'uploadTime'),
+            'total' => $this->getTotal($date, 'wcf1_attachment', 'uploadTime'),
         ];
     }
 }
index b7c62f4f821a885921c6e1726e0d8b0df77bdc88..6a9de60524a3df43b956fe14ae5ed9f05cdade42 100644 (file)
@@ -17,8 +17,8 @@ class AttachmentStatDailyHandler extends AbstractStatDailyHandler
     public function getData($date)
     {
         return [
-            'counter' => $this->getCounter($date, 'wcf' . WCF_N . '_attachment', 'uploadTime'),
-            'total' => $this->getTotal($date, 'wcf' . WCF_N . '_attachment', 'uploadTime'),
+            'counter' => $this->getCounter($date, 'wcf1_attachment', 'uploadTime'),
+            'total' => $this->getTotal($date, 'wcf1_attachment', 'uploadTime'),
         ];
     }
 }
index 17e5556ec19528422cd643f27cfba5f8d7ff8d5a..84671ee4cdd9f0adb00d34b06d55ec7309e4f6d5 100644 (file)
@@ -19,16 +19,16 @@ class LikeStatDailyHandler extends AbstractStatDailyHandler
     public function getData($date)
     {
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_like
+                FROM    wcf1_like
                 WHERE   time BETWEEN ? AND ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$date, $date + 86399]);
         $counter = \intval($statement->fetchSingleColumn());
 
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_like
+                FROM    wcf1_like
                 WHERE   time < ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$date + 86400]);
         $total = \intval($statement->fetchSingleColumn());
 
index 76b51597a3eb8c4e2ef1f97c3445072bdebd99f2..7b570b676b6f24da8edf0510e24e6ab1b0a857a1 100644 (file)
@@ -17,8 +17,8 @@ class UserStatDailyHandler extends AbstractStatDailyHandler
     public function getData($date)
     {
         return [
-            'counter' => $this->getCounter($date, 'wcf' . WCF_N . '_user', 'registrationDate'),
-            'total' => $this->getTotal($date, 'wcf' . WCF_N . '_user', 'registrationDate'),
+            'counter' => $this->getCounter($date, 'wcf1_user', 'registrationDate'),
+            'total' => $this->getTotal($date, 'wcf1_user', 'registrationDate'),
         ];
     }
 }
index 2f3f196f34c09bf27c29ed69a31995e51b96e3b3..d7627a2bcef53c95d70f2ba4ee08b771e85f9329 100644 (file)
@@ -89,9 +89,9 @@ final class StyleCompiler extends SingletonFactory
     public static function getDefaultVariables(): array
     {
         $sql = "SELECT      variable.variableName, variable.defaultValue
-                FROM        wcf" . WCF_N . "_style_variable variable
+                FROM        wcf1_style_variable variable
                 ORDER BY    variable.variableID ASC";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $variables = $statement->fetchMap('variableName', 'defaultValue');
 
@@ -219,11 +219,11 @@ final class StyleCompiler extends SingletonFactory
 
             // read stylesheets in dependency order
             $sql = "SELECT      filename, application
-                    FROM        wcf" . WCF_N . "_package_installation_file_log
+                    FROM        wcf1_package_installation_file_log
                     WHERE       CONVERT(filename using utf8) REGEXP ?
                             AND packageID <> ?
                     ORDER BY    packageID";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 '^style/([a-zA-Z0-9\-\.]+)\.scss',
                 1,
@@ -425,9 +425,9 @@ final class StyleCompiler extends SingletonFactory
 
         // read default values
         $sql = "SELECT      variableName, defaultValue, defaultValueDarkMode
-                FROM        wcf" . WCF_N . "_style_variable
+                FROM        wcf1_style_variable
                 ORDER BY    variableID ASC";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $variables = [];
         while ($row = $statement->fetchArray()) {
index 8ecc18fd2d4539adba85c8811ab60af8290c13bd..8fbf68d8c253f0c6f033ef42d542d82e46c61ea0 100644 (file)
@@ -41,13 +41,13 @@ class TagEngine extends SingletonFactory
         // remove tags prior to apply the new ones (prevents duplicate entries)
         if ($replace) {
             $sql = "DELETE      tag_to_object
-                    FROM        wcf" . WCF_N . "_tag_to_object tag_to_object
-                    INNER JOIN  wcf" . WCF_N . "_tag tag
+                    FROM        wcf1_tag_to_object tag_to_object
+                    INNER JOIN  wcf1_tag tag
                             ON  tag.tagID = tag_to_object.tagID
                     WHERE       tag_to_object.objectTypeID = ?
                             AND tag_to_object.objectID = ?
                             AND tag.languageID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $objectTypeID,
                 $objectID,
@@ -91,11 +91,11 @@ class TagEngine extends SingletonFactory
         }
 
         // save tags
-        $sql = "INSERT INTO wcf" . WCF_N . "_tag_to_object
+        $sql = "INSERT INTO wcf1_tag_to_object
                             (objectID, tagID, objectTypeID, languageID)
                 VALUES      (?, ?, ?, ?)";
         WCF::getDB()->beginTransaction();
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($tagIDs as $tagID) {
             $statement->execute([$objectID, $tagID, $objectTypeID, $languageID]);
         }
@@ -114,13 +114,13 @@ class TagEngine extends SingletonFactory
         $objectTypeID = $this->getObjectTypeID($objectType);
 
         $sql = "DELETE      tag_to_object
-                FROM        wcf" . WCF_N . "_tag_to_object tag_to_object
-                INNER JOIN  wcf" . WCF_N . "_tag tag
+                FROM        wcf1_tag_to_object tag_to_object
+                INNER JOIN  wcf1_tag tag
                         ON  tag.tagID = tag_to_object.tagID
                 WHERE       tag_to_object.objectTypeID = ?
                         AND tag_to_object.objectID = ?
                         " . ($languageID !== null ? "AND tag.languageID = ?" : "");
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $parameters = [
             $objectTypeID,
             $objectID,
@@ -145,9 +145,9 @@ class TagEngine extends SingletonFactory
         $conditionsBuilder->add('objectTypeID = ?', [$objectTypeID]);
         $conditionsBuilder->add('objectID IN (?)', [$objectIDs]);
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_tag_to_object
+        $sql = "DELETE FROM wcf1_tag_to_object
                 " . $conditionsBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionsBuilder->getParameters());
     }
 
@@ -202,11 +202,11 @@ class TagEngine extends SingletonFactory
         }
 
         $sql = "SELECT      tag.*, tag_to_object.objectID
-                FROM        wcf" . WCF_N . "_tag_to_object tag_to_object
-                LEFT JOIN   wcf" . WCF_N . "_tag tag
+                FROM        wcf1_tag_to_object tag_to_object
+                LEFT JOIN   wcf1_tag tag
                 ON          tag.tagID = tag_to_object.tagID
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         $tags = [];
@@ -303,7 +303,7 @@ class TagEngine extends SingletonFactory
         $parameters[] = \count($tags);
 
         $sql = "SELECT      objectID
-                FROM        wcf" . WCF_N . "_tag_to_object
+                FROM        wcf1_tag_to_object
                 WHERE       objectTypeID = ?
                         AND tagID IN (" . $tagIDs . ")
                 GROUP BY    objectID
index 0e6ff4b680c176b272c203c8ff49fdf811815a87..0aeab6e3fcf0b2be666805993b2cff70a48a5c8c 100644 (file)
@@ -27,9 +27,9 @@ class EmailTemplateEngine extends TemplateEngine
 
         if (!$initialized) {
             $sql = "SELECT  templateGroupID
-                    FROM    wcf" . WCF_N . "_template_group
+                    FROM    wcf1_template_group
                     WHERE   templateGroupFolderName = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute(['_wcf_email/']);
 
             parent::setTemplateGroupID($statement->fetchSingleColumn());
index 3c9c900bd109804edd9cc5925839a353d74a2efd..00d743d5dfc5830803f6c597794df13d9999efe6 100644 (file)
@@ -134,7 +134,7 @@ class TrophyConditionHandler extends SingletonFactory
     {
         $userList = new UserList();
         $userList->sqlConditionJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+            LEFT JOIN   wcf1_user_option_value user_option_value
             ON          user_option_value.userID = user_table.userID";
 
         $conditions = $trophy->getConditions();
@@ -146,7 +146,7 @@ class TrophyConditionHandler extends SingletonFactory
         $userList->getConditionBuilder()->add(
             'user_table.userID NOT IN (
                 SELECT  userID
-                FROM    wcf' . WCF_N . '_user_trophy
+                FROM    wcf1_user_trophy
                 WHERE   trophyID IN (?)
             )',
             [$trophy->trophyID]
@@ -199,7 +199,7 @@ class TrophyConditionHandler extends SingletonFactory
 
         // We joining the user_trophy table to receive the userTrophyID, which should be deleted.
         $userList->sqlJoins .= "
-            LEFT JOIN   wcf" . WCF_N . "_user_trophy user_trophy
+            LEFT JOIN   wcf1_user_trophy user_trophy
             ON          user_table.userID = user_trophy.userID";
 
         // We do not need the complete user object, but only the userTrophyID.
@@ -221,7 +221,7 @@ class TrophyConditionHandler extends SingletonFactory
         $userList->getConditionBuilder()->add(
             'user_table.userID IN (
                 SELECT  userID
-                FROM    wcf' . WCF_N . '_user_trophy
+                FROM    wcf1_user_trophy
                 WHERE   trophyID IN (?)
             )',
             [$trophy->trophyID]
index e4ee8fdb06f538dc3d505e1eadde698b796774f1..08a88a28961cd9d66395eed9fe8959673bbb6e48 100644 (file)
@@ -37,7 +37,7 @@ class ArticleCommentResponseUserActivityEvent extends SingletonFactory implement
             $articleList->getConditionBuilder()->add(
                 "article.articleID IN (
                     SELECT  articleID
-                    FROM    wcf" . WCF_N . "_article_content
+                    FROM    wcf1_article_content
                     WHERE   articleContentID IN (?)
                 )",
                 [$this->commentObjectIDs]
index 72bff7bbd0a0ded7f3fe4043d953f82aacc87eca..dd30c15aac162f817db6a2e82ce9b6addfd031c6 100644 (file)
@@ -47,7 +47,7 @@ class ArticleCommentUserActivityEvent extends SingletonFactory implements IUserA
             $articleList->getConditionBuilder()->add(
                 "article.articleID IN (
                     SELECT  articleID
-                    FROM    wcf" . WCF_N . "_article_content
+                    FROM    wcf1_article_content
                     WHERE   articleContentID IN (?)
                 )",
                 [$articleContentIDs]
index 1b8fb105951c45668d7ddec27789d2ea3fd7ea18..e9c3e8f3e11aaa2042b41238c28ba0dee3732c3a 100644 (file)
@@ -140,10 +140,10 @@ class UserActivityEventHandler extends SingletonFactory
                 ]);
             }
 
-            $sql = "INSERT INTO wcf" . WCF_N . "_user_activity_event
+            $sql = "INSERT INTO wcf1_user_activity_event
                                 (objectTypeID, objectID, languageID, userID, time, additionalData)
                     VALUES      (?, ?, ?, ?, ?, ?)" . \str_repeat(', (?, ?, ?, ?, ?, ?)', \count($batchEventData) - 1);
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($parameters);
         }
         WCF::getDB()->commitTransaction();
@@ -168,11 +168,11 @@ class UserActivityEventHandler extends SingletonFactory
             $userID = WCF::getUser()->userID;
         }
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_activity_event
+        $sql = "DELETE FROM wcf1_user_activity_event
                 WHERE       objectTypeID = ?
                         AND objectID = ?
                         AND userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeID,
             $objectID,
@@ -202,9 +202,9 @@ class UserActivityEventHandler extends SingletonFactory
         $conditions->add("objectTypeID = ?", [$objectTypeID]);
         $conditions->add("objectID IN (?)", [$objectIDs]);
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_activity_event
+        $sql = "DELETE FROM wcf1_user_activity_event
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
     }
 
@@ -219,9 +219,9 @@ class UserActivityEventHandler extends SingletonFactory
 
         // remove orphaned event ids
         if (!empty($eventIDs)) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_user_activity_event
+            $sql = "DELETE FROM wcf1_user_activity_event
                     WHERE       eventID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
 
             foreach ($eventIDs as $eventID) {
                 $statement->execute([$eventID]);
index 716f9251c53f5326dcbf52cdc92bd931cd71f490..a70c8229a8891dcf2552e2e647bcf206e695b82b 100644 (file)
@@ -70,22 +70,22 @@ class UserActivityPointHandler extends SingletonFactory
         }
 
         // update user_activity_point
-        $sql = "INSERT INTO             wcf" . WCF_N . "_user_activity_point
+        $sql = "INSERT INTO             wcf1_user_activity_point
                                         (userID, objectTypeID, activityPoints, items)
                 VALUES                  (?, ?, ?, 1)
                 ON DUPLICATE KEY UPDATE activityPoints = activityPoints + VALUES(activityPoints),
                                         items = items + 1";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $userID,
             $objectTypeObj->objectTypeID,
             $objectTypeObj->points,
         ]);
 
-        $sql = "UPDATE  wcf" . WCF_N . "_user
+        $sql = "UPDATE  wcf1_user
                 SET     activityPoints = activityPoints + ?
                 WHERE   userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeObj->points,
             $userID,
@@ -142,12 +142,12 @@ class UserActivityPointHandler extends SingletonFactory
             $userIDs[] = $userID;
         }
 
-        $sql = "INSERT INTO             wcf" . WCF_N . "_user_activity_point
+        $sql = "INSERT INTO             wcf1_user_activity_point
                                         (userID, objectTypeID, activityPoints, items)
                 VALUES                  " . $values . "
                 ON DUPLICATE KEY UPDATE activityPoints = activityPoints + VALUES(activityPoints),
                                         items = items + VALUES(items)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($parameters);
 
         // update activity points for given user ids
@@ -180,12 +180,12 @@ class UserActivityPointHandler extends SingletonFactory
         }
 
         // remove activity points
-        $sql = "UPDATE  wcf" . WCF_N . "_user_activity_point
+        $sql = "UPDATE  wcf1_user_activity_point
                 SET     activityPoints = activityPoints - ?,
                         items = items - ?
                 WHERE   objectTypeID = ?
                     AND userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         foreach ($userToItems as $userID => $items) {
             $statement->execute([
                 $items * $objectTypeObj->points,
@@ -211,15 +211,15 @@ class UserActivityPointHandler extends SingletonFactory
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("userID IN (?)", [$userIDs]);
 
-        $sql = "UPDATE  wcf" . WCF_N . "_user user_table
+        $sql = "UPDATE  wcf1_user user_table
                 SET     activityPoints = COALESCE((
                             SELECT      SUM(activityPoints) AS activityPoints
-                            FROM        wcf" . WCF_N . "_user_activity_point
+                            FROM        wcf1_user_activity_point
                             WHERE       userID = user_table.userID
                             GROUP BY    userID
                         ), 0)
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         // update user ranks
@@ -240,11 +240,11 @@ class UserActivityPointHandler extends SingletonFactory
             throw new InvalidObjectTypeException($objectType, 'com.woltlab.wcf.user.activityPointEvent');
         }
 
-        $sql = "UPDATE  wcf" . WCF_N . "_user_activity_point
+        $sql = "UPDATE  wcf1_user_activity_point
                 SET     activityPoints = 0,
                         items = 0
                 WHERE   objectTypeID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$objectTypeObj->objectTypeID]);
     }
 
index 4c76bcac7f5bbe0922ac38edc8ab28b9342da275..70bdf0c1edf6bbe6249478374a52a815b0357df9 100644 (file)
@@ -94,10 +94,10 @@ class UserCollapsibleContentHandler extends SingletonFactory
                 // cache does not exist or is outdated
                 if ($data === null) {
                     $sql = "SELECT  objectID
-                            FROM    wcf" . WCF_N . "_user_collapsible_content
+                            FROM    wcf1_user_collapsible_content
                             WHERE   objectTypeID = ?
                                 AND userID = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([
                         $objectTypeID,
                         WCF::getUser()->userID,
@@ -137,11 +137,11 @@ class UserCollapsibleContentHandler extends SingletonFactory
 
         if ($userID) {
             $sql = "SELECT  *
-                    FROM    wcf" . WCF_N . "_user_collapsible_content
+                    FROM    wcf1_user_collapsible_content
                     WHERE   objectTypeID = ?
                         AND objectID = ?
                         AND userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $objectTypeID,
                 $objectID,
@@ -150,10 +150,10 @@ class UserCollapsibleContentHandler extends SingletonFactory
             $row = $statement->fetchArray();
 
             if (!$row) {
-                $sql = "INSERT INTO wcf" . WCF_N . "_user_collapsible_content
+                $sql = "INSERT INTO wcf1_user_collapsible_content
                                     (objectTypeID, objectID, userID)
                         VALUES      (?, ?, ?)";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $objectTypeID,
                     $objectID,
@@ -188,11 +188,11 @@ class UserCollapsibleContentHandler extends SingletonFactory
         }
 
         if ($userID) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_user_collapsible_content
+            $sql = "DELETE FROM wcf1_user_collapsible_content
                     WHERE       objectTypeID = ?
                             AND objectID = ?
                             AND userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $objectTypeID,
                 $objectID,
@@ -227,10 +227,10 @@ class UserCollapsibleContentHandler extends SingletonFactory
     public function reset($objectTypeID)
     {
         if (WCF::getUser()->userID) {
-            $sql = "DELETE FROM wcf" . WCF_N . "_user_collapsible_content
+            $sql = "DELETE FROM wcf1_user_collapsible_content
                     WHERE       objectTypeID = ?
                             AND userID = ?";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute([
                 $objectTypeID,
                 WCF::getUser()->userID,
@@ -273,9 +273,9 @@ class UserCollapsibleContentHandler extends SingletonFactory
             $conditionBuilder->add('objectID = ?', [$objectID]);
         }
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_collapsible_content
+        $sql = "DELETE FROM wcf1_user_collapsible_content
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         UserStorageHandler::getInstance()->resetAll('collapsedContent-' . $objectTypeID);
index b3798162bfcc2b66187c7b0436b87c250d3037ff..9e26d9c0f92f579f99cc89ba8a7f56cff1b30793 100644 (file)
@@ -55,7 +55,7 @@ final class CreateRegistrationNotification
                                 )
                             AND optionValue = ?
                     )";
-        $statement = WCF::getDB()->prepareStatement($sql, 100);
+        $statement = WCF::getDB()->prepare($sql, 100);
         $statement->execute([
             'admin.user.canSearchUser',
             1,
index 9ef9bd7c9c8752c9bb5baff38701a803abb4c981..724467a87086aef5d38cb70534d398b855f5196c 100644 (file)
@@ -106,7 +106,7 @@ class UserGroupAssignmentHandler extends SingletonFactory
         $userList->getConditionBuilder()->add(
             'user_table.userID NOT IN (
                 SELECT  userID
-                FROM    wcf' . WCF_N . '_user_to_group
+                FROM    wcf1_user_to_group
                 WHERE   groupID = ?
             )',
             [$assignment->groupID]
index 95b5fe5bbca79dadeec32ead14d454a531928fe5..0758b4871ddf47caa09f0dba56a21a6143c87ff5 100644 (file)
@@ -154,9 +154,9 @@ class UserNotificationHandler extends SingletonFactory
         $conditions->add("confirmTime = ?", [0]);
 
         $sql = "SELECT  notificationID, userID
-                FROM    wcf" . WCF_N . "_user_notification
+                FROM    wcf1_user_notification
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $notifications = $statement->fetchMap('userID', 'notificationID');
 
@@ -171,9 +171,9 @@ class UserNotificationHandler extends SingletonFactory
             }
 
             $sql = "SELECT  notificationID
-                    FROM    wcf" . WCF_N . "_user_notification_author
+                    FROM    wcf1_user_notification_author
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             $notificationIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -187,11 +187,11 @@ class UserNotificationHandler extends SingletonFactory
 
             if (!empty($notificationIDs)) {
                 // update trigger count
-                $sql = "UPDATE  wcf" . WCF_N . "_user_notification
+                $sql = "UPDATE  wcf1_user_notification
                         SET     timesTriggered = timesTriggered + ?,
                                 guestTimesTriggered = guestTimesTriggered + ?
                         WHERE   notificationID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
 
                 WCF::getDB()->beginTransaction();
                 foreach ($notificationIDs as $notificationID) {
@@ -225,9 +225,9 @@ class UserNotificationHandler extends SingletonFactory
             $conditions->add("ignoreUserID = ?", [$userProfile->getUserID()]);
 
             $sql = "SELECT  userID
-                    FROM    wcf" . WCF_N . "_user_ignore
+                    FROM    wcf1_user_ignore
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             $userIDs = [];
             while ($userID = $statement->fetchColumn()) {
@@ -354,10 +354,10 @@ class UserNotificationHandler extends SingletonFactory
                 // cache does not exist or is outdated
                 if ($data === null || $skipCache) {
                     $sql = "SELECT  COUNT(*)
-                            FROM    wcf" . WCF_N . "_user_notification
+                            FROM    wcf1_user_notification
                             WHERE   userID = ?
                                 AND confirmTime = ?";
-                    $statement = WCF::getDB()->prepareStatement($sql);
+                    $statement = WCF::getDB()->prepare($sql);
                     $statement->execute([
                         WCF::getUser()->userID,
                         0,
@@ -388,9 +388,9 @@ class UserNotificationHandler extends SingletonFactory
     public function countAllNotifications()
     {
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_user_notification
+                FROM    wcf1_user_notification
                 WHERE   userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([WCF::getUser()->userID]);
 
         return $statement->fetchSingleColumn();
@@ -464,14 +464,14 @@ class UserNotificationHandler extends SingletonFactory
         }
 
         $sql = "SELECT      notification.*, notification_event.eventID, object_type.objectType
-                FROM        wcf" . WCF_N . "_user_notification notification
-                LEFT JOIN   wcf" . WCF_N . "_user_notification_event notification_event
+                FROM        wcf1_user_notification notification
+                LEFT JOIN   wcf1_user_notification_event notification_event
                 ON          notification_event.eventID = notification.eventID
-                LEFT JOIN   wcf" . WCF_N . "_object_type object_type
+                LEFT JOIN   wcf1_object_type object_type
                 ON          object_type.objectTypeID = notification_event.objectTypeID
                 " . $conditions . "
                 ORDER BY    notification.time DESC";
-        $statement = WCF::getDB()->prepareStatement($sql, $limit, $offset);
+        $statement = WCF::getDB()->prepare($sql, $limit, $offset);
         $statement->execute($conditions->getParameters());
 
         return $statement->fetchObjects(UserNotification::class, 'notificationID');
@@ -513,10 +513,10 @@ class UserNotificationHandler extends SingletonFactory
         $conditions = new PreparedStatementConditionBuilder();
         $conditions->add("notificationID IN (?)", [$notificationIDs]);
         $sql = "SELECT      notificationID, authorID
-                FROM        wcf" . WCF_N . "_user_notification_author
+                FROM        wcf1_user_notification_author
                 " . $conditions . "
                 ORDER BY    time ASC";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $authorIDs = $authorToNotification = [];
         while ($row = $statement->fetchArray()) {
@@ -682,9 +682,9 @@ class UserNotificationHandler extends SingletonFactory
         }
 
         $sql = "SELECT  notificationID
-                FROM    wcf" . WCF_N . "_user_notification
+                FROM    wcf1_user_notification
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         $row = $statement->fetchArray();
@@ -876,9 +876,9 @@ class UserNotificationHandler extends SingletonFactory
 
         // get event ids
         $sql = "SELECT  eventID
-                FROM    wcf" . WCF_N . "_user_notification_event
+                FROM    wcf1_user_notification_event
                 WHERE   objectTypeID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectTypeObj->objectTypeID,
         ]);
@@ -890,9 +890,9 @@ class UserNotificationHandler extends SingletonFactory
             $conditions->add("objectID IN (?)", [$objectIDs]);
 
             $sql = "SELECT  userID
-                    FROM    wcf" . WCF_N . "_user_notification
+                    FROM    wcf1_user_notification
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             $userIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -910,9 +910,9 @@ class UserNotificationHandler extends SingletonFactory
             EventHandler::getInstance()->fireAction($this, 'removeNotifications', $parameters);
 
             // delete notifications
-            $sql = "DELETE FROM wcf" . WCF_N . "_user_notification
+            $sql = "DELETE FROM wcf1_user_notification
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
         }
     }
@@ -947,10 +947,10 @@ class UserNotificationHandler extends SingletonFactory
             $conditions->add("objectID IN (?)", [$objectIDs]);
         }
 
-        $sql = "UPDATE  wcf" . WCF_N . "_user_notification
+        $sql = "UPDATE  wcf1_user_notification
                 SET     confirmTime = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $parameters = $conditions->getParameters();
         \array_unshift($parameters, TIME_NOW);
         $statement->execute($parameters);
@@ -1002,10 +1002,10 @@ class UserNotificationHandler extends SingletonFactory
         $conditions->add("confirmTime = ?", [0]);
 
         // mark notifications as confirmed
-        $sql = "UPDATE  wcf" . WCF_N . "_user_notification
+        $sql = "UPDATE  wcf1_user_notification
                 SET     confirmTime = ?
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $parameters = $conditions->getParameters();
         \array_unshift($parameters, TIME_NOW);
         $statement->execute($parameters);
@@ -1034,10 +1034,10 @@ class UserNotificationHandler extends SingletonFactory
 
         // get setting
         $sql = "SELECT  mailNotificationType
-                FROM    wcf" . WCF_N . "_user_notification_event_to_user
+                FROM    wcf1_user_notification_event_to_user
                 WHERE   eventID = ?
                     AND userID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$event->eventID, WCF::getUser()->userID]);
         $row = $statement->fetchArray();
         if ($row === false) {
index 63a9ee8c3f6a369193d88c2f3b88d17e55248d5a..e8ef532043ef8c11a2a4d12f73b7f5deb4b8a331 100644 (file)
@@ -40,14 +40,14 @@ trait TReactionUserNotificationEvent
         $conditionBuilder->add('like_table_join.likeID = ?', [$this->getUserNotificationObject()->getObjectID()]);
 
         $sql = "SELECT      like_table.reactionTypeID, COUNT(like_table.reactionTypeID) as count 
-                FROM        wcf" . WCF_N . "_like like_table
-                LEFT JOIN   wcf" . WCF_N . "_like like_table_join
+                FROM        wcf1_like like_table
+                LEFT JOIN   wcf1_like like_table_join
                 ON          like_table_join.objectTypeID = like_table.objectTypeID
                         AND like_table_join.objectID = like_table.objectID
                 " . $conditionBuilder . " 
                 GROUP BY    like_table.reactionTypeID";
 
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
 
         $this->cachedReactions = $statement->fetchMap('reactionTypeID', 'count');
index 41e2b91d15b70b95042317a842f65e2f37720e85..964b6558d5bb66f53eba95b0b5257438abad0d88 100644 (file)
@@ -43,10 +43,10 @@ trait TTestableModerationQueueUserNotificationEvent
         WCF::getSession()->changeUser($originalUser, true);
 
         $sql = "SELECT  *
-                FROM    wcf" . WCF_N . "_moderation_queue
+                FROM    wcf1_moderation_queue
                 WHERE   objectTypeID = ?
                     AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$objectTypeID, $reportedUser->userID]);
 
         $moderationQueue = $statement->fetchObject(ModerationQueue::class);
index dcf4bff469ced102428e6c119d71a87ea1d6e7b6..0cf59285e5c0477edecec0c77ee77cbf3841feba 100644 (file)
@@ -42,9 +42,9 @@ trait TMultiRecipientModerationQueueCommentUserNotificationObjectType
         $conditionBuilder->add('queueID = ?', [$comment->objectID]);
         $conditionBuilder->add('isAffected = ?', [1]);
         $sql = "SELECT  userID
-                FROM    wcf" . WCF_N . "_moderation_queue_to_user
+                FROM    wcf1_moderation_queue_to_user
                 " . $conditionBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionBuilder->getParameters());
         $recipientIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
index c401abfe92650a6cc2f64bf87601091dda2880dd..5f8e6123213af7ed8b495d1174f4a736e368fb90 100644 (file)
@@ -23,14 +23,14 @@ trait TMultiRecipientPageCommentUserNotificationObjectType
     {
         // find all userIDs with the permission to manage pages
         $sql = "SELECT      userID 
-                FROM        wcf" . WCF_N . "_user_to_group
-                INNER JOIN  wcf" . WCF_N . "_user_group_option_value
-                ON          wcf" . WCF_N . "_user_to_group.groupID = wcf" . WCF_N . "_user_group_option_value.groupID  
-                        AND wcf" . WCF_N . "_user_group_option_value.optionValue = ? 
-                INNER JOIN  wcf" . WCF_N . "_user_group_option
-                ON          wcf" . WCF_N . "_user_group_option_value.optionID = wcf" . WCF_N . "_user_group_option.optionID 
-                        AND wcf" . WCF_N . "_user_group_option.optionName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM        wcf1_user_to_group
+                INNER JOIN  wcf1_user_group_option_value
+                ON          wcf1_user_to_group.groupID = wcf1_user_group_option_value.groupID  
+                        AND wcf1_user_group_option_value.optionValue = ? 
+                INNER JOIN  wcf1_user_group_option
+                ON          wcf1_user_group_option_value.optionID = wcf1_user_group_option.optionID 
+                        AND wcf1_user_group_option.optionName = ?";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             1,
             'admin.content.cms.canManagePage',
index 1dee5b95df68cbccb0a646286afeb15efcab5dca..51b0fc4d275bd0e717250efd196f5537719aa70b 100644 (file)
@@ -38,9 +38,9 @@ class UserProfileCommentUserNotificationObjectType extends AbstractUserNotificat
     public function getOwnerID($objectID)
     {
         $sql = "SELECT  objectID
-                FROM    wcf" . WCF_N . "_comment
+                FROM    wcf1_comment
                 WHERE   commentID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$objectID]);
         $row = $statement->fetchArray();
 
index 797eab6c7b18feb43b2af18f4138dc0a4c26856f..54f07b7a8dccdda74de03966a08b5d26c6f9c5e6 100644 (file)
@@ -62,9 +62,9 @@ class UserObjectWatchHandler extends SingletonFactory
         $conditionsBuilder->add('objectTypeID = ?', [$objectTypeObj->objectTypeID]);
         $conditionsBuilder->add('objectID IN (?)', [$objectIDs]);
         $sql = "SELECT  userID
-                FROM    wcf" . WCF_N . "_user_object_watch
+                FROM    wcf1_user_object_watch
                 " . $conditionsBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionsBuilder->getParameters());
         $userIDs = $statement->fetchAll(\PDO::FETCH_COLUMN);
 
@@ -95,9 +95,9 @@ class UserObjectWatchHandler extends SingletonFactory
             $conditionsBuilder->add('userID IN (?)', [$userIDs]);
         }
 
-        $sql = "DELETE FROM wcf" . WCF_N . "_user_object_watch
+        $sql = "DELETE FROM wcf1_user_object_watch
                 " . $conditionsBuilder;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditionsBuilder->getParameters());
     }
 
@@ -162,10 +162,10 @@ class UserObjectWatchHandler extends SingletonFactory
             ->getObjectTypeByName('com.woltlab.wcf.user.objectWatch', $objectType);
 
         $sql = "SELECT  userID, notification
-                FROM    wcf" . WCF_N . "_user_object_watch
+                FROM    wcf1_user_object_watch
                 WHERE   objectTypeID = ?
                     AND objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$objectTypeObj->objectTypeID, $objectID]);
 
         return $statement->fetchMap('userID', 'notification');
index 9c62c9ff50819c7599c556ee594dc71bc7839cf8..ed57158329cf43a010af7ba7ac0d5e57a05c991c 100644 (file)
@@ -83,7 +83,7 @@ class VersionTracker extends SingletonFactory implements IAJAXInvokeAction
         $sql = "INSERT INTO " . $this->getTableName($objectType) . "_version
                             (objectID, userID, username, time, data)
                 VALUES      (?, ?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $object->getObjectID(),
             WCF::getUser()->userID,
@@ -107,7 +107,7 @@ class VersionTracker extends SingletonFactory implements IAJAXInvokeAction
         $sql = "SELECT  COUNT(*) as count
                 FROM    " . $this->getTableName($objectType) . "_version
                 WHERE   objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$objectID]);
 
         return $statement->fetchSingleColumn();
@@ -128,7 +128,7 @@ class VersionTracker extends SingletonFactory implements IAJAXInvokeAction
                 FROM        " . $this->getTableName($objectType) . "_version
                 WHERE       objectID = ?
                 ORDER BY    versionID DESC";
-        $statement = WCF::getDB()->prepareStatement($sql, 1);
+        $statement = WCF::getDB()->prepare($sql, 1);
         $statement->execute([$objectID]);
 
         return $statement->fetchObject(VersionTrackerEntry::class);
@@ -149,7 +149,7 @@ class VersionTracker extends SingletonFactory implements IAJAXInvokeAction
                 FROM        " . $this->getTableName($objectType) . "_version
                 WHERE       objectID = ?
                 ORDER BY    versionID DESC";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$objectID]);
         $versions = [];
         while ($version = $statement->fetchObject(VersionTrackerEntry::class)) {
@@ -173,7 +173,7 @@ class VersionTracker extends SingletonFactory implements IAJAXInvokeAction
         $sql = "SELECT  *
                 FROM    " . $this->getTableName($objectType) . "_version
                 WHERE   versionID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql, 1);
+        $statement = WCF::getDB()->prepare($sql, 1);
         $statement->execute([$versionID]);
 
         return $statement->fetchObject(VersionTrackerEntry::class);
@@ -186,9 +186,9 @@ class VersionTracker extends SingletonFactory implements IAJAXInvokeAction
     {
         // get definition id
         $sql = "SELECT  definitionID
-                FROM    wcf" . WCF_N . "_object_type_definition
+                FROM    wcf1_object_type_definition
                 WHERE   definitionName = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute(['com.woltlab.wcf.versionTracker.objectType']);
         $row = $statement->fetchArray();
 
@@ -279,7 +279,7 @@ class VersionTracker extends SingletonFactory implements IAJAXInvokeAction
 
         $sql = "DELETE FROM " . $this->getTableName($objectType) . "_version
                 WHERE       objectID = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$objectID]);
     }
 
@@ -296,9 +296,9 @@ class VersionTracker extends SingletonFactory implements IAJAXInvokeAction
 
         // check if table already exists
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_package_installation_sql_log
+                FROM    wcf1_package_installation_sql_log
                 WHERE   sqlTable = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$tableName]);
 
         if ($statement->fetchSingleColumn()) {
@@ -340,7 +340,7 @@ class VersionTracker extends SingletonFactory implements IAJAXInvokeAction
             \md5($tableName . '_userID') . '_fk',
             [
                 'columns' => 'userID',
-                'referencedTable' => 'wcf' . WCF_N . '_user',
+                'referencedTable' => 'wcf1_user',
                 'referencedColumns' => 'userID',
                 'ON DELETE' => 'SET NULL',
             ]
@@ -349,14 +349,14 @@ class VersionTracker extends SingletonFactory implements IAJAXInvokeAction
         // add comment
         $sql = "ALTER TABLE " . $tableName . "
                 COMMENT     = 'Version tracking for " . $objectType->objectType . "'";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         // log table
-        $sql = "INSERT INTO wcf" . WCF_N . "_package_installation_sql_log
+        $sql = "INSERT INTO wcf1_package_installation_sql_log
                             (packageID, sqlTable)
                 VALUES      (?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([
             $objectType->packageID,
             $tableName,
index 90bba34f5109e7b134bd6418852a80d1be02789c..a152fa6a4ab4312d26d3d0b979e971ba84debe49 100644 (file)
@@ -127,9 +127,9 @@ abstract class AbstractRebuildDataWorker extends AbstractWorker implements IRebu
         $conditions->add("userID IN (?)", [$userIDs]);
 
         $sql = "SELECT  userID, groupID
-                FROM    wcf" . WCF_N . "_user_to_group
+                FROM    wcf1_user_to_group
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
 
         $groupData = [];
index a7bed857baf28c65a231457ed16f779ae532342a..ae65689328f9fee0f70a26095bb4b0bf1e819e5a 100644 (file)
@@ -70,10 +70,10 @@ class ArticleRebuildDataWorker extends AbstractRebuildDataWorker
         $commentObjectType = ObjectTypeCache::getInstance()
             ->getObjectTypeByName('com.woltlab.wcf.comment.commentableContent', 'com.woltlab.wcf.articleComment');
         $sql = "SELECT  COUNT(*) AS comments, SUM(responses) AS responses
-                FROM    wcf" . WCF_N . "_comment
+                FROM    wcf1_comment
                 WHERE   objectTypeID = ?
                     AND objectID = ?";
-        $commentStatement = WCF::getDB()->prepareStatement($sql);
+        $commentStatement = WCF::getDB()->prepare($sql);
         $comments = [];
 
         // update article content
@@ -133,9 +133,9 @@ class ArticleRebuildDataWorker extends AbstractRebuildDataWorker
         $conditions->add("objectID IN (?)", [$this->objectList->getObjectIDs()]);
 
         $sql = "SELECT  objectID, cumulativeLikes
-                FROM    wcf" . WCF_N . "_like_object
+                FROM    wcf1_like_object
                 " . $conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($conditions->getParameters());
         $cumulativeLikes = $statement->fetchMap('objectID', 'cumulativeLikes');
 
index fdc398e1c1e7f5f02871ba0ed4a9dd32ad055b12..9af157a9750fde140f6123d98291f83c09197811 100644 (file)
@@ -133,7 +133,7 @@ class ImportWorker extends AbstractWorker
 
         // disable mysql strict mode
         $sql = "SET SESSION sql_mode = 'ANSI,ONLY_FULL_GROUP_BY'";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
 
         $this->getExporter()->exportData($this->parameters['objectType'], $this->loopCount);
index 55db0e10ccdfda0dc15f132cb1f0c09545721566..ceaa4ee49ebae04e9b914889ae1120e544c59346 100644 (file)
@@ -85,7 +85,7 @@ class MailWorker extends AbstractWorker
                 $this->conditions->add(
                     "user.userID IN (
                         SELECT  userID
-                        FROM    wcf" . WCF_N . "_user_to_group
+                        FROM    wcf1_user_to_group
                         WHERE   groupID IN (?)
                     )",
                     [$this->mailData['groupIDs']]
@@ -94,9 +94,9 @@ class MailWorker extends AbstractWorker
         }
 
         $sql = "SELECT  COUNT(*)
-                FROM    wcf" . WCF_N . "_user user
+                FROM    wcf1_user user
                 " . $this->conditions;
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute($this->conditions->getParameters());
 
         $this->count = $statement->fetchSingleColumn();
@@ -152,12 +152,12 @@ class MailWorker extends AbstractWorker
 
         // get users
         $sql = "SELECT      user_option.*, user.*
-                FROM        wcf" . WCF_N . "_user user
-                LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option
+                FROM        wcf1_user user
+                LEFT JOIN   wcf1_user_option_value user_option
                 ON          user_option.userID = user.userID
                 " . $this->conditions . "
                 ORDER BY    user.userID";
-        $statement = WCF::getDB()->prepareStatement($sql, $this->limit, $this->limit * $this->loopCount);
+        $statement = WCF::getDB()->prepare($sql, $this->limit, $this->limit * $this->loopCount);
         $statement->execute($this->conditions->getParameters());
         while ($row = $statement->fetchArray()) {
             $user = new User(null, $row);
index 48e58b24d28757ecc7d14aa814f620dd3cdf3e18..b9fc4f91c873d12d630585aee4392ba84437afdb 100644 (file)
@@ -53,27 +53,27 @@ class PollRebuildDataWorker extends AbstractRebuildDataWorker
             // update poll options
             $conditionBuilder = new PreparedStatementConditionBuilder();
             $conditionBuilder->add('poll_option.pollID IN (?)', [$pollIDs]);
-            $sql = "UPDATE  wcf" . WCF_N . "_poll_option poll_option
+            $sql = "UPDATE  wcf1_poll_option poll_option
                     SET     votes = (
                                 SELECT  COUNT(*)
-                                FROM    wcf" . WCF_N . "_poll_option_vote
+                                FROM    wcf1_poll_option_vote
                                 WHERE   optionID = poll_option.optionID
                             )
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
 
             // update polls
             $conditionBuilder = new PreparedStatementConditionBuilder();
             $conditionBuilder->add('poll.pollID IN (?)', [$pollIDs]);
-            $sql = "UPDATE  wcf" . WCF_N . "_poll poll
+            $sql = "UPDATE  wcf1_poll poll
                     SET     votes = (
                                 SELECT  COUNT(DISTINCT userID)
-                                FROM    wcf" . WCF_N . "_poll_option_vote
+                                FROM    wcf1_poll_option_vote
                                 WHERE   pollID = poll.pollID
                             )
                     " . $conditionBuilder;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditionBuilder->getParameters());
         }
     }
index 416e66daaf220fe935ee23787a9d9018bc6bcf0e..76cc01e85486bfdb25f34e1dc3938a10b5d64b7f 100755 (executable)
@@ -389,10 +389,10 @@ class SitemapRebuildWorker extends AbstractRebuildDataWorker
 
     private function registerSitemapFiles()
     {
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_package_installation_file_log
+        $sql = "INSERT IGNORE INTO  wcf1_package_installation_file_log
                                     (packageID, filename, application)
                 VALUES              (?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         WCF::getDB()->beginTransaction();
         foreach ($this->workerData['filesToPackage'] as $packageID => $files) {
index 1d8b2e0b05df7f553d1b8346ebef60e4fb934c6e..6c45eec9578f8ee0d383840a7b77e24f26b43e20 100644 (file)
@@ -54,16 +54,16 @@ class StatDailyRebuildDataWorker extends AbstractRebuildDataWorker
 
         if (!$this->loopCount) {
             // delete existing stat
-            $sql = "DELETE FROM wcf" . WCF_N . "_stat_daily";
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $sql = "DELETE FROM wcf1_stat_daily";
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute();
         }
 
         // prepare insert statement
-        $sql = "INSERT IGNORE INTO  wcf" . WCF_N . "_stat_daily
+        $sql = "INSERT IGNORE INTO  wcf1_stat_daily
                                     (objectTypeID, date, counter, total)
                 VALUES              (?, ?, ?, ?)";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
 
         $this->getStartDate();
         $d = DateUtil::getDateTimeByTimestamp($this->startDate);
@@ -97,8 +97,8 @@ class StatDailyRebuildDataWorker extends AbstractRebuildDataWorker
         }
 
         $sql = "SELECT  MIN(registrationDate)
-                FROM    wcf" . WCF_N . "_user";
-        $statement = WCF::getDB()->prepareStatement($sql);
+                FROM    wcf1_user";
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute();
         $this->startDate = $statement->fetchSingleColumn();
     }
index 4b3e6a2ec99d9ecde8b15fe792fbfde55360f15b..18ede548da6304894ecfaafd768d7aa292ede513 100644 (file)
@@ -61,10 +61,10 @@ class UserActivityPointUpdateEventsWorker extends AbstractWorker
         $i = 0;
         foreach ($this->objectTypes as $objectType) {
             if ($i == $this->loopCount) {
-                $sql = "UPDATE  wcf" . WCF_N . "_user_activity_point
+                $sql = "UPDATE  wcf1_user_activity_point
                         SET     activityPoints = items * ?
                         WHERE   objectTypeID = ?";
-                $statement = WCF::getDB()->prepareStatement($sql);
+                $statement = WCF::getDB()->prepare($sql);
                 $statement->execute([
                     $objectType->points,
                     $objectType->objectTypeID,
index a29b883aecf3d7ae2fe6c6cf0a0bec4462c7927d..729f710430322423b1a9b75494f99ce183848cc3 100644 (file)
@@ -49,7 +49,7 @@ final class UserRebuildDataWorker extends AbstractLinearRebuildDataWorker
 
         $this->objectList->sqlSelects = 'user_option_value.userOption' . User::getUserOptionID('aboutMe') . ' AS aboutMe';
         $this->objectList->sqlJoins = "
-            LEFT JOIN   wcf" . WCF_N . "_user_option_value user_option_value
+            LEFT JOIN   wcf1_user_option_value user_option_value
             ON          user_option_value.userID = user_table.userID";
     }
 
index 48c754b9381accc9e9dbb00df6f881d190677059..dd64ad0fd177da92d81b356f846356eaf591c825 100644 (file)
@@ -96,9 +96,9 @@ class MessageUtil
             }
 
             $sql = "SELECT  userID
-                    FROM    wcf" . WCF_N . "_user_to_group
+                    FROM    wcf1_user_to_group
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             while ($userID = $statement->fetchColumn()) {
                 $userIDs[] = $userID;
@@ -160,11 +160,11 @@ class MessageUtil
             }
 
             $sql = "SELECT      user_table.username
-                    FROM        wcf" . WCF_N . "_user_to_group user_to_group
-                    LEFT JOIN   wcf" . WCF_N . "_user user_table
+                    FROM        wcf1_user_to_group user_to_group
+                    LEFT JOIN   wcf1_user user_table
                     ON          user_table.userID = user_to_group.userID
                     " . $conditions;
-            $statement = WCF::getDB()->prepareStatement($sql);
+            $statement = WCF::getDB()->prepare($sql);
             $statement->execute($conditions->getParameters());
             while ($username = $statement->fetchColumn()) {
                 $usernames[] = $username;
index 64ae47de5e70d81dc13c446ceeba0864fe547a3f..85e812a4caede834cff6724603407de180de72ca 100644 (file)
@@ -60,9 +60,9 @@ final class UserUtil
     public static function isAvailableUsername($name): bool
     {
         $sql = "SELECT  COUNT(username)
-                FROM    wcf" . WCF_N . "_user
+                FROM    wcf1_user
                 WHERE   username = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$name]);
 
         return $statement->fetchSingleColumn() == 0;
@@ -94,9 +94,9 @@ final class UserUtil
     public static function isAvailableEmail($email): bool
     {
         $sql = "SELECT  COUNT(email)
-                FROM    wcf" . WCF_N . "_user
+                FROM    wcf1_user
                 WHERE   email = ?";
-        $statement = WCF::getDB()->prepareStatement($sql);
+        $statement = WCF::getDB()->prepare($sql);
         $statement->execute([$email]);
 
         return $statement->fetchSingleColumn() == 0;