Skip to content
This repository was archived by the owner on Nov 22, 2025. It is now read-only.

Commit 35e1738

Browse files
committed
apply global scope to PHP functions
1 parent ea3415a commit 35e1738

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

files/lib/system/event/listener/WelcomeThreadEventListener.class.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use wcf\system\WCF;
77
use wcf\system\language\LanguageFactory;
88
use wcf\system\html\input\HtmlInputProcessor;
9-
use wcf\system\event\EventHandler;
109
use wcf\data\user\User;
1110
use wcf\util\StringUtil;
1211
use wcf\util\MessageUtil;
@@ -62,13 +61,13 @@ protected function saved()
6261
$threadContent = WCF::getLanguage()->get(WELCOME_THREAD_CONTENT);
6362

6463
// replace variables in title and content
65-
$threadTitle = str_replace('{username}', $newUser->username, $threadTitle);
66-
$threadContent = str_replace('{username}', $newUser->username, $threadContent);
64+
$threadTitle = \str_replace('{username}', $newUser->username, $threadTitle);
65+
$threadContent = \str_replace('{username}', $newUser->username, $threadContent);
6766

6867
// get thread tags
6968
$threadTags = [];
7069
if (MODULE_TAGGING && WBB_THREAD_ENABLE_TAGS && !empty(WELCOME_THREAD_TAGS)) {
71-
$threadTags = array_unique(ArrayUtil::trim(explode(',', WCF::getLanguage()->get(WELCOME_THREAD_TAGS))));
70+
$threadTags = \array_unique(ArrayUtil::trim(\explode(',', WCF::getLanguage()->get(WELCOME_THREAD_TAGS))));
7271
}
7372

7473
// create thread
@@ -79,7 +78,7 @@ protected function saved()
7978
'data' => [
8079
'boardID' => $boardID,
8180
'languageID' => $newUser->languageID ?: LanguageFactory::getInstance()->getDefaultLanguageID(),
82-
'topic' => mb_substr(MessageUtil::stripCrap($threadTitle), 0, 255),
81+
'topic' => \mb_substr(MessageUtil::stripCrap($threadTitle), 0, 255),
8382
'time' => TIME_NOW,
8483
'userID' => $threadAuthor->userID,
8584
'username' => $threadAuthor->username,

0 commit comments

Comments
 (0)