/**
* @inheritDoc
*/
- public function createForm()
+ protected function createForm()
{
parent::createForm();
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Data\Person
*
- * @property-read integer $personID unique id of the person
- * @property-read string $firstName first name of the person
- * @property-read string $lastName last name of the person
+ * @property-read int $personID unique id of the person
+ * @property-read string $firstName first name of the person
+ * @property-read string $lastName last name of the person
*/
class Person extends DatabaseObject implements IRouteController
{
/**
* @inheritDoc
*/
- public function createForm()
+ protected function createForm()
{
parent::createForm();
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Data\Person
*
- * @property-read integer $personID unique id of the person
- * @property-read string $firstName first name of the person
- * @property-read string $lastName last name of the person
- * @property-read int $enableComments is `1` if comments are enabled for the person, otherwise `0`
+ * @property-read int $personID unique id of the person
+ * @property-read string $firstName first name of the person
+ * @property-read string $lastName last name of the person
+ * @property-read int $enableComments is `1` if comments are enabled for the person, otherwise `0`
*/
class Person extends DatabaseObject implements ITitledLinkObject
{
namespace wcf\page;
+use wcf\data\comment\StructuredCommentList;
use wcf\data\person\Person;
use wcf\system\comment\CommentHandler;
use wcf\system\comment\manager\PersonCommentManager;
/**
* id of the person comment object type
- * @var integer
+ * @var int
*/
public $commentObjectTypeID = 0;
/**
* id of the shown person
- * @var integer
+ * @var int
*/
public $personID = 0;
/**
* @inheritDoc
*/
- public function createForm()
+ protected function createForm()
{
parent::createForm();
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Data\Person
*
- * @property-read integer $personID unique id of the person
- * @property-read string $firstName first name of the person
- * @property-read string $lastName last name of the person
- * @property-read int $enableComments is `1` if comments are enabled for the person, otherwise `0`
+ * @property-read int $personID unique id of the person
+ * @property-read string $firstName first name of the person
+ * @property-read string $lastName last name of the person
+ * @property-read int $enableComments is `1` if comments are enabled for the person, otherwise `0`
*/
class Person extends DatabaseObject implements ITitledLinkObject
{
namespace wcf\page;
+use wcf\data\comment\StructuredCommentList;
use wcf\data\person\Person;
use wcf\system\comment\CommentHandler;
use wcf\system\comment\manager\PersonCommentManager;
/**
* id of the person comment object type
- * @var integer
+ * @var int
*/
public $commentObjectTypeID = 0;
/**
* id of the shown person
- * @var integer
+ * @var int
*/
public $personID = 0;
/**
* @inheritDoc
*/
- public function getObjectList()
+ protected function getObjectList()
{
return new PersonList();
}
/**
* @inheritDoc
*/
- public function createForm()
+ protected function createForm()
{
parent::createForm();
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\Data\Person
*
- * @property-read integer $personID unique id of the person
- * @property-read string $firstName first name of the person
- * @property-read string $lastName last name of the person
- * @property-read int $informationCount number of pieces of information added for the person
- * @property-read int $enableComments is `1` if comments are enabled for the person, otherwise `0`
+ * @property-read int $personID unique id of the person
+ * @property-read string $firstName first name of the person
+ * @property-read string $lastName last name of the person
+ * @property-read int $informationCount number of pieces of information added for the person
+ * @property-read int $enableComments is `1` if comments are enabled for the person, otherwise `0`
*/
class Person extends DatabaseObject implements ITitledLinkObject
{
+ /**
+ * all pieces of information added for the person.
+ * @var PersonInformation[]
+ */
+ protected $information;
+
/**
* Returns the first and last name of the person if a person object is treated as a string.
*
use wcf\system\form\builder\DialogFormDocument;
use wcf\system\html\input\HtmlInputProcessor;
use wcf\system\WCF;
+use wcf\util\UserUtil;
/**
* Executes person information-related actions.
if (LOG_IP_ADDRESS) {
if (!isset($this->parameters['data']['ipAddress'])) {
- $this->parameters['data']['ipAddress'] = WCF::getSession()->ipAddress;
+ $this->parameters['data']['ipAddress'] = UserUtil::getIpAddress();
}
} else {
unset($this->parameters['data']['ipAddress']);
namespace wcf\page;
+use wcf\data\comment\StructuredCommentList;
use wcf\data\person\Person;
use wcf\system\comment\CommentHandler;
use wcf\system\comment\manager\PersonCommentManager;
/**
* id of the person comment object type
- * @var integer
+ * @var int
*/
public $commentObjectTypeID = 0;
/**
* id of the shown person
- * @var integer
+ * @var int
*/
public $personID = 0;
/**
* @inheritDoc
*/
- public function getObjectList()
+ protected function getObjectList()
{
return new PersonList();
}
if (!\count($this->objectList)) {
return;
}
-
+
$sql = "UPDATE wcf" . WCF_N . "_person person
SET informationCount = (
SELECT COUNT(*)
)
WHERE person.personID = ?";
$statement = WCF::getDB()->prepareStatement($sql);
-
+
WCF::getDB()->beginTransaction();
foreach ($this->getObjectList() as $person) {
$statement->execute([$person->personID]);