* Handles setting the birthday when adding and editing people.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Event\Listener
*/
-class BirthdayPersonAddFormListener extends AbstractEventListener
+final class BirthdayPersonAddFormListener extends AbstractEventListener
{
/**
* @see AbstractFormBuilderForm::createForm()
*/
protected function onCreateForm(PersonAddForm $form): void
{
- /** @var FormContainer $dataContainer */
$dataContainer = $form->form->getNodeById('data');
+ \assert($dataContainer instanceof FormContainer);
$dataContainer->appendChild(
DateFormField::create('birthday')
->label('wcf.person.birthday')
* Makes people's birthday a valid sort field in the ACP and the front end.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Event\Listener
*/
-class BirthdaySortFieldPersonListPageListener extends AbstractEventListener
+final class BirthdaySortFieldPersonListPageListener extends AbstractEventListener
{
/**
* @see SortablePage::validateSortField()
* Runtime cache implementation for people.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Cache\Runtime
*
* @method Person getObject($objectID)
* @method Person[] getObjects(array $objectIDs)
*/
-class PersonRuntimeCache extends AbstractRuntimeCache
+final class PersonRuntimeCache extends AbstractRuntimeCache
{
/**
* @inheritDoc
* Comment manager implementation for people.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Comment\Manager
*/
-class PersonCommentManager extends AbstractCommentManager
+final class PersonCommentManager extends AbstractCommentManager
{
/**
* @inheritDoc
* Page handler implementation for person page.
*
* @author Matthias Schmidt
- * @copyright 2001-2019 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Page\Handler
*/
-class PersonPageHandler extends AbstractLookupPageHandler implements IOnlineLocationPageHandler
+final class PersonPageHandler extends AbstractLookupPageHandler implements IOnlineLocationPageHandler
{
use TOnlineLocationPageHandler;
* Dynamic box controller implementation for a list of persons.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Box
*/
-class PersonListBoxController extends AbstractDatabaseObjectListBoxController
+final class PersonListBoxController extends AbstractDatabaseObjectListBoxController
{
/**
* @inheritDoc
* Runtime cache implementation for people.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Cache\Runtime
*
* @method Person getObject($objectID)
* @method Person[] getObjects(array $objectIDs)
*/
-class PersonRuntimeCache extends AbstractRuntimeCache
+final class PersonRuntimeCache extends AbstractRuntimeCache
{
/**
* @inheritDoc
* Comment manager implementation for people.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Comment\Manager
*/
-class PersonCommentManager extends AbstractCommentManager
+final class PersonCommentManager extends AbstractCommentManager
{
/**
* @inheritDoc
* Condition implementation for the first name of a person.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license WoltLab License <http://www.woltlab.com/license-agreement.html>
* @package WoltLabSuite\Core\System\Condition
*/
-class PersonFirstNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
+final class PersonFirstNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
{
/**
* @inheritDoc
* Condition implementation for the last name of a person.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license WoltLab License <http://www.woltlab.com/license-agreement.html>
* @package WoltLabSuite\Core\System\Condition
*/
-class PersonLastNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
+final class PersonLastNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
{
/**
* @inheritDoc
* Page handler implementation for person page.
*
* @author Matthias Schmidt
- * @copyright 2001-2019 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Page\Handler
*/
-class PersonPageHandler extends AbstractLookupPageHandler implements IOnlineLocationPageHandler
+final class PersonPageHandler extends AbstractLookupPageHandler implements IOnlineLocationPageHandler
{
use TOnlineLocationPageHandler;
* Dynamic box controller implementation for a list of persons.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Box
*/
-class PersonListBoxController extends AbstractDatabaseObjectListBoxController
+final class PersonListBoxController extends AbstractDatabaseObjectListBoxController
{
/**
* @inheritDoc
* Runtime cache implementation for people.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Cache\Runtime
*
* @method Person getObject($objectID)
* @method Person[] getObjects(array $objectIDs)
*/
-class PersonRuntimeCache extends AbstractRuntimeCache
+final class PersonRuntimeCache extends AbstractRuntimeCache
{
/**
* @inheritDoc
* Comment manager implementation for people.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Comment\Manager
*/
-class PersonCommentManager extends AbstractCommentManager
+final class PersonCommentManager extends AbstractCommentManager
{
/**
* @inheritDoc
* Condition implementation for the first name of a person.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license WoltLab License <http://www.woltlab.com/license-agreement.html>
* @package WoltLabSuite\Core\System\Condition
*/
-class PersonFirstNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
+final class PersonFirstNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
{
/**
* @inheritDoc
* Condition implementation for the last name of a person.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license WoltLab License <http://www.woltlab.com/license-agreement.html>
* @package WoltLabSuite\Core\System\Condition
*/
-class PersonLastNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
+final class PersonLastNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
{
/**
* @inheritDoc
* Prunes old ip addresses.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Event\Listener
*/
-class PersonPruneIpAddressesCronjobListener extends AbstractEventListener
+final class PersonPruneIpAddressesCronjobListener extends AbstractEventListener
{
protected function onExecute(PruneIpAddressesCronjob $cronjob): void
{
* Updates person information during user renaming.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Event\Listener
*/
-class PersonUserActionRenameListener extends AbstractUserActionRenameListener
+final class PersonUserActionRenameListener extends AbstractUserActionRenameListener
{
/**
* @inheritDoc
* Adds the ip addresses stored with the person information during user data export.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Event\Listener
*/
-class PersonUserExportGdprListener extends AbstractEventListener
+final class PersonUserExportGdprListener extends AbstractEventListener
{
protected function onExport(UserExportGdprAction $action): void
{
* Updates person information during user merging.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Event\Listener
*/
-class PersonUserMergeListener extends AbstractUserMergeListener
+final class PersonUserMergeListener extends AbstractUserMergeListener
{
/**
* @inheritDoc
* Page handler implementation for person page.
*
* @author Matthias Schmidt
- * @copyright 2001-2019 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Page\Handler
*/
-class PersonPageHandler extends AbstractLookupPageHandler implements IOnlineLocationPageHandler
+final class PersonPageHandler extends AbstractLookupPageHandler implements IOnlineLocationPageHandler
{
use TOnlineLocationPageHandler;
* Worker implementation for updating people.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Worker
*
* @method PersonList getObjectList()
*/
-class PersonRebuildDataWorker extends AbstractRebuildDataWorker
+final class PersonRebuildDataWorker extends AbstractRebuildDataWorker
{
/**
* @inheritDoc
return;
}
- $sql = "UPDATE wcf" . WCF_N . "_person person
+ $sql = "UPDATE wcf1_person person
SET informationCount = (
SELECT COUNT(*)
- FROM wcf" . WCF_N . "_person_information person_information
+ FROM wcf1_person_information person_information
WHERE person_information.personID = person.personID
)
WHERE person.personID = ?";
- $statement = WCF::getDB()->prepareStatement($sql);
+ $statement = WCF::getDB()->prepare($sql);
WCF::getDB()->beginTransaction();
foreach ($this->getObjectList() as $person) {
* Dynamic box controller implementation for a list of persons.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Box
*/
-class PersonListBoxController extends AbstractDatabaseObjectListBoxController
+final class PersonListBoxController extends AbstractDatabaseObjectListBoxController
{
/**
* @inheritDoc
* Runtime cache implementation for people.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Cache\Runtime
*
* @method Person getObject($objectID)
* @method Person[] getObjects(array $objectIDs)
*/
-class PersonRuntimeCache extends AbstractRuntimeCache
+final class PersonRuntimeCache extends AbstractRuntimeCache
{
/**
* @inheritDoc
* Comment manager implementation for people.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Comment\Manager
*/
-class PersonCommentManager extends AbstractCommentManager
+final class PersonCommentManager extends AbstractCommentManager
{
/**
* @inheritDoc
* Condition implementation for the first name of a person.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license WoltLab License <http://www.woltlab.com/license-agreement.html>
* @package WoltLabSuite\Core\System\Condition
*/
-class PersonFirstNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
+final class PersonFirstNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
{
/**
* @inheritDoc
* Condition implementation for the last name of a person.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license WoltLab License <http://www.woltlab.com/license-agreement.html>
* @package WoltLabSuite\Core\System\Condition
*/
-class PersonLastNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
+final class PersonLastNameTextPropertyCondition extends AbstractObjectTextPropertyCondition
{
/**
* @inheritDoc
* Prunes old ip addresses.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Event\Listener
*/
-class PersonPruneIpAddressesCronjobListener extends AbstractEventListener
+final class PersonPruneIpAddressesCronjobListener extends AbstractEventListener
{
protected function onExecute(PruneIpAddressesCronjob $cronjob): void
{
* Updates person information during user renaming.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Event\Listener
*/
-class PersonUserActionRenameListener extends AbstractUserActionRenameListener
+final class PersonUserActionRenameListener extends AbstractUserActionRenameListener
{
/**
* @inheritDoc
* Updates the user activity point items counter for person information.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Event\Listener
*/
-class PersonUserActivityPointItemsRebuildDataWorkerListener extends AbstractEventListener
+final class PersonUserActivityPointItemsRebuildDataWorkerListener extends AbstractEventListener
{
protected function onExecute(UserActivityPointItemsRebuildDataWorker $worker): void
{
$conditionBuilder->add('user_activity_point.objectTypeID = ?', [$objectType->objectTypeID]);
$conditionBuilder->add('user_activity_point.userID IN (?)', [$worker->getObjectList()->getObjectIDs()]);
- $sql = "UPDATE wcf" . WCF_N . "_user_activity_point user_activity_point
+ $sql = "UPDATE wcf1_user_activity_point user_activity_point
SET user_activity_point.items = (
SELECT COUNT(*)
- FROM wcf" . WCF_N . "_person_information person_information
+ FROM wcf1_person_information person_information
WHERE person_information.userID = user_activity_point.userID
),
user_activity_point.activityPoints = user_activity_point.items * ?
{$conditionBuilder}";
- $statement = WCF::getDB()->prepareStatement($sql);
- $statement->execute(\array_merge(
- [$objectType->points],
- $conditionBuilder->getParameters()
- ));
+ $statement = WCF::getDB()->prepare($sql);
+ $statement->execute([
+ $objectType->points,
+ ...$conditionBuilder->getParameters()
+ ]);
}
}
* Adds the ip addresses stored with the person information during user data export.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Event\Listener
*/
-class PersonUserExportGdprListener extends AbstractEventListener
+final class PersonUserExportGdprListener extends AbstractEventListener
{
protected function onExport(UserExportGdprAction $action): void
{
* Updates person information during user merging.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Event\Listener
*/
-class PersonUserMergeListener extends AbstractUserMergeListener
+final class PersonUserMergeListener extends AbstractUserMergeListener
{
/**
* @inheritDoc
* Page handler implementation for person page.
*
* @author Matthias Schmidt
- * @copyright 2001-2019 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Page\Handler
*/
-class PersonPageHandler extends AbstractLookupPageHandler implements IOnlineLocationPageHandler
+final class PersonPageHandler extends AbstractLookupPageHandler implements IOnlineLocationPageHandler
{
use TOnlineLocationPageHandler;
* User activity event implementation for person information.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\User\Activity\Event
*/
-class PersonInformationUserActivityEvent extends SingletonFactory implements IUserActivityEvent
+final class PersonInformationUserActivityEvent extends SingletonFactory implements IUserActivityEvent
{
/**
* @inheritDoc
* Worker implementation for updating person information.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Worker
*
* @method PersonInformationList getObjectList()
*/
-class PersonInformationRebuildDataWorker extends AbstractRebuildDataWorker
+final class PersonInformationRebuildDataWorker extends AbstractRebuildDataWorker
{
/**
* @inheritDoc
* Worker implementation for updating people.
*
* @author Matthias Schmidt
- * @copyright 2001-2021 WoltLab GmbH
+ * @copyright 2001-2022 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\Worker
*
* @method PersonList getObjectList()
*/
-class PersonRebuildDataWorker extends AbstractRebuildDataWorker
+final class PersonRebuildDataWorker extends AbstractRebuildDataWorker
{
/**
* @inheritDoc
return;
}
- $sql = "UPDATE wcf" . WCF_N . "_person person
+ $sql = "UPDATE wcf1_person person
SET informationCount = (
SELECT COUNT(*)
- FROM wcf" . WCF_N . "_person_information person_information
+ FROM wcf1_person_information person_information
WHERE person_information.personID = person.personID
)
WHERE person.personID = ?";
- $statement = WCF::getDB()->prepareStatement($sql);
+ $statement = WCF::getDB()->prepare($sql);
WCF::getDB()->beginTransaction();
foreach ($this->getObjectList() as $person) {