Skip to content

Commit 0837a0b

Browse files
committed
Apply explicit global namespace resolution for TIME_NOW
1 parent 7c0c671 commit 0837a0b

155 files changed

Lines changed: 323 additions & 324 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

wcfsetup/install/files/lib/acp/action/UserExportGdprAction.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function execute(): ResponseInterface
224224
}
225225
}
226226

227-
$this->data['@@generatedAt'] = TIME_NOW;
227+
$this->data['@@generatedAt'] = \TIME_NOW;
228228

229229
$this->executed();
230230

wcfsetup/install/files/lib/acp/action/UserQuickSearchAction.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public function execute(): RedirectResponse
191191
$search = SearchEditor::create([
192192
'userID' => WCF::getUser()->userID,
193193
'searchData' => $data,
194-
'searchTime' => TIME_NOW,
194+
'searchTime' => \TIME_NOW,
195195
'searchType' => 'users',
196196
]);
197197
$this->executed();

wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ public function readFormParameters()
355355
// supplied timestamp matches the time at which the form was initially requested,
356356
// use the current time instead as publication timestamp, otherwise the article
357357
// would be published in the past rather than "now"
358-
$this->timeObj->setTimestamp(TIME_NOW);
358+
$this->timeObj->setTimestamp(\TIME_NOW);
359359
$this->time = $this->timeObj->format('Y-m-d\TH:i:sP');
360360
}
361361
}
@@ -418,7 +418,7 @@ public function validate()
418418
if (empty($this->time) || !$this->timeObj) {
419419
throw new UserInputException('time');
420420
}
421-
if ($this->timeObj->getTimestamp() > TIME_NOW && $this->publicationStatus == Article::PUBLISHED) {
421+
if ($this->timeObj->getTimestamp() > \TIME_NOW && $this->publicationStatus == Article::PUBLISHED) {
422422
throw new UserInputException('time', 'invalid');
423423
}
424424

@@ -431,7 +431,7 @@ public function validate()
431431
throw new UserInputException('publicationDate');
432432
}
433433

434-
if (!$this->publicationDateObj || $this->publicationDateObj->getTimestamp() < TIME_NOW) {
434+
if (!$this->publicationDateObj || $this->publicationDateObj->getTimestamp() < \TIME_NOW) {
435435
throw new UserInputException('publicationDate', 'invalid');
436436
}
437437
}
@@ -652,7 +652,7 @@ public function readData()
652652
protected function setDefaultValues()
653653
{
654654
$this->username = WCF::getUser()->username;
655-
$dateTime = DateUtil::getDateTimeByTimestamp(TIME_NOW);
655+
$dateTime = DateUtil::getDateTimeByTimestamp(\TIME_NOW);
656656
$dateTime->setTimezone(WCF::getUser()->getTimeZone());
657657
$this->time = $dateTime->format('c');
658658

wcfsetup/install/files/lib/acp/form/BoxAddForm.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,7 +620,7 @@ public function save()
620620
'position' => $this->position,
621621
'showOrder' => $this->showOrder,
622622
'visibleEverywhere' => $this->visibleEverywhere,
623-
'lastUpdateTime' => TIME_NOW,
623+
'lastUpdateTime' => \TIME_NOW,
624624
'cssClassName' => $this->cssClassName,
625625
'showHeader' => $this->showHeader,
626626
'isDisabled' => $this->isDisabled ? 1 : 0,

wcfsetup/install/files/lib/acp/form/BoxEditForm.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ public function save()
106106
'position' => $this->position,
107107
'showOrder' => $this->showOrder,
108108
'visibleEverywhere' => $this->visibleEverywhere,
109-
'lastUpdateTime' => TIME_NOW,
109+
'lastUpdateTime' => \TIME_NOW,
110110
'cssClassName' => $this->cssClassName,
111111
'showHeader' => $this->showHeader,
112112
'isDisabled' => $this->isDisabled ? 1 : 0,

wcfsetup/install/files/lib/acp/form/LoginForm.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ protected function saveAuthenticationFailure(string $errorField, string $usernam
251251
'environment' => RequestHandler::getInstance()->isACPRequest() ? 'admin' : 'user',
252252
'userID' => $user->userID ?: null,
253253
'username' => \mb_substr($username, 0, 100),
254-
'time' => TIME_NOW,
254+
'time' => \TIME_NOW,
255255
'ipAddress' => UserUtil::getIpAddress(),
256256
'userAgent' => UserUtil::getUserAgent(),
257257
'validationError' => 'invalid' . \ucfirst($errorField),

wcfsetup/install/files/lib/acp/form/PageAddForm.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -639,7 +639,7 @@ public function save()
639639
'allowSpidersToIndex' => $this->allowSpidersToIndex,
640640
'enableShareButtons' => $this->enableShareButtons,
641641
'applicationPackageID' => $this->applicationPackageID,
642-
'lastUpdateTime' => TIME_NOW,
642+
'lastUpdateTime' => \TIME_NOW,
643643
'isMultilingual' => $this->isMultilingual,
644644
'identifier' => '',
645645
'packageID' => 1,

wcfsetup/install/files/lib/acp/form/PageEditForm.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public function save()
189189
'name' => $this->name,
190190
'cssClassName' => $this->cssClassName,
191191
'isDisabled' => $this->isDisabled ? 1 : 0,
192-
'lastUpdateTime' => TIME_NOW,
192+
'lastUpdateTime' => \TIME_NOW,
193193
'parentPageID' => $this->parentPageID ?: null,
194194
'applicationPackageID' => $this->applicationPackageID,
195195
'overrideApplicationPackageID' => $this->overrideApplicationPackageID,

wcfsetup/install/files/lib/acp/form/PaidSubscriptionUserAddForm.class.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ protected function validateEndDate()
137137
{
138138
if ($this->subscription->subscriptionLength) {
139139
$this->endDateTime = \DateTime::createFromFormat('Y-m-d', $this->endDate, new \DateTimeZone('UTC'));
140-
if ($this->endDateTime === false || $this->endDateTime->getTimestamp() < TIME_NOW) {
140+
if ($this->endDateTime === false || $this->endDateTime->getTimestamp() < \TIME_NOW) {
141141
throw new UserInputException('endDate');
142142
}
143143
}
@@ -195,7 +195,7 @@ public function readData()
195195
protected function setDefaultEndDate()
196196
{
197197
if ($this->subscription->subscriptionLength) {
198-
$d = DateUtil::getDateTimeByTimestamp(TIME_NOW);
198+
$d = DateUtil::getDateTimeByTimestamp(\TIME_NOW);
199199
$d->add($this->subscription->getDateInterval());
200200
$this->endDate = $d->format('Y-m-d');
201201
}

wcfsetup/install/files/lib/acp/form/RescueModeForm.class.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public function submit()
268268
'environment' => 'admin',
269269
'userID' => $this->user !== null ? $this->user->userID : null,
270270
'username' => \mb_substr($this->username, 0, 100),
271-
'time' => TIME_NOW,
271+
'time' => \TIME_NOW,
272272
'ipAddress' => UserUtil::getIpAddress(),
273273
'userAgent' => UserUtil::getUserAgent(),
274274
'validationError' => 'invalid' . \ucfirst($this->errorField),

0 commit comments

Comments
 (0)