if (!self::$gzopen64 && !function_exists('gzopen')) {
throw new SystemException('Can not find functions of the zlib extension');
}
+ /** @noinspection PhpUndefinedFunctionInspection */
$this->resource = (self::$gzopen64 ? @gzopen64($filename, $mode) : @gzopen($filename, $mode));
if ($this->resource === false) {
throw new SystemException('Can not open file ' . $filename);
}
if (isset($conditionData['greaterThan'])) {
+ /** @noinspection PhpUndefinedFieldInspection */
$objectList->getConditionBuilder()->add('user_table.'.$this->getDecoratedObject()->propertyname.' > ?', [$conditionData['greaterThan']]);
}
if (isset($conditionData['lessThan'])) {
}
$imageAdapter = $this->imageAdapters[IMAGE_ADAPTER_TYPE];
+ /** @noinspection PhpUndefinedCallbackInspection */
$isSupported = call_user_func([$imageAdapter, 'isSupported']);
// fallback to GD if image adapter is not available
}
$this->filename = $filename;
+ /** @noinspection PhpUndefinedFunctionInspection */
$this->resource = (self::$gzopen64 ? gzopen64($filename, $mode) : gzopen($filename, $mode));
if ($this->resource === false) {
throw new SystemException('Can not open file ' . $filename);
*/
public function getFormElement(Option $option, $value) {
$selectOptions = CaptchaHandler::getInstance()->getCaptchaSelection();
+ /** @noinspection PhpUndefinedFieldInspection */
if ($option->allowemptyvalue) {
$selectOptions = array_merge(
- [
- '' => WCF::getLanguage()->get('wcf.captcha.useNoCaptcha')
- ],
+ ['' => WCF::getLanguage()->get('wcf.captcha.useNoCaptcha')],
$selectOptions
);
}
public function getFormElement(Option $option, $value) {
$options = $this->parseEnableOptions($option);
+ /** @noinspection PhpUndefinedFieldInspection */
WCF::getTPL()->assign([
'disableOptions' => $options['disableOptions'],
'enableOptions' => $options['enableOptions'],
use wcf\system\cache\runtime\CommentRuntimeCache;
use wcf\system\cache\runtime\UserProfileRuntimeCache;
use wcf\system\request\LinkHandler;
+use wcf\system\user\notification\object\CommentResponseUserNotificationObject;
use wcf\system\WCF;
/**
* @copyright 2001-2016 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\User\Notification\Event
+ *
+ * @method CommentResponseUserNotificationObject getUserNotificationObject()
*/
class UserProfileCommentResponseOwnerUserNotificationEvent extends AbstractSharedUserNotificationEvent {
/**
* @inheritDoc
*/
protected function prepare() {
- CommentRuntimeCache::getInstance()->cacheObjectID($this->userNotificationObject->commentID);
+ CommentRuntimeCache::getInstance()->cacheObjectID($this->getUserNotificationObject()->commentID);
UserProfileRuntimeCache::getInstance()->cacheObjectID($this->additionalData['userID']);
}
* @inheritDoc
*/
public function getMessage() {
- $comment = CommentRuntimeCache::getInstance()->getObject($this->userNotificationObject->commentID);
+ $comment = CommentRuntimeCache::getInstance()->getObject($this->getUserNotificationObject()->commentID);
if ($comment->userID) {
$commentAuthor = UserProfileRuntimeCache::getInstance()->getObject($comment->userID);
}
* @inheritDoc
*/
public function getEmailMessage($notificationType = 'instant') {
- $comment = new Comment($this->userNotificationObject->commentID);
+ $comment = new Comment($this->getUserNotificationObject()->commentID);
$owner = new User($comment->objectID);
if ($comment->userID) {
$commentAuthor = new User($comment->userID);
* @inheritDoc
*/
public function getEventHash() {
- return sha1($this->eventID . '-' . $this->userNotificationObject->commentID);
+ return sha1($this->eventID . '-' . $this->getUserNotificationObject()->commentID);
}
}
namespace wcf\system\user\notification\event;
use wcf\system\cache\runtime\UserProfileRuntimeCache;
use wcf\system\request\LinkHandler;
+use wcf\system\user\notification\object\CommentUserNotificationObject;
/**
* User notification event for profile comments.
* @copyright 2001-2016 WoltLab GmbH
* @license GNU Lesser General Public License <http://opensource.org/licenses/lgpl-license.php>
* @package WoltLabSuite\Core\System\User\Notification\Event
+ *
+ * @method CommentUserNotificationObject getUserNotificationObject()
*/
class UserProfileCommentUserNotificationEvent extends AbstractSharedUserNotificationEvent {
/**
* @inheritDoc
*/
protected function prepare() {
- UserProfileRuntimeCache::getInstance()->cacheObjectID($this->userNotificationObject->objectID);
+ UserProfileRuntimeCache::getInstance()->cacheObjectID($this->getUserNotificationObject()->objectID);
}
/**
* @inheritDoc
*/
public function getEmailMessage($notificationType = 'instant') {
- $user = UserProfileRuntimeCache::getInstance()->getObject($this->userNotificationObject->objectID);
+ $user = UserProfileRuntimeCache::getInstance()->getObject($this->getUserNotificationObject()->objectID);
$authors = $this->getAuthors();
if (count($authors) > 1) {
* @inheritDoc
*/
public function getLink() {
- return LinkHandler::getInstance()->getLink('User', ['object' => UserProfileRuntimeCache::getInstance()->getObject($this->userNotificationObject->objectID)], '#wall');
+ return LinkHandler::getInstance()->getLink('User', ['object' => UserProfileRuntimeCache::getInstance()->getObject($this->getUserNotificationObject()->objectID)], '#wall');
}
/**