| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,7 +8,7 @@ | |||
| 8 | 8 | * License: GNU/GPLv2 | |
| 9 | 9 | * @see LICENSE.txt | |
| 10 | 10 | * | |
| 11 | - * This file: Upload handler (last modified: 2026.03.17). | ||
| 11 | + * This file: Upload handler (last modified: 2026.03.18). | ||
| 12 | 12 | */ | |
| 13 | 13 | ||
| 14 | 14 | namespace phpMussel\Web; | |
@@ -33,12 +33,12 @@ class Web | |||
| 33 | 33 | /** | |
| 34 | 34 | * @var string The path to the upload handler's asset files. | |
| 35 | 35 | */ | |
| 36 | - private $AssetsPath = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'assets' . DIRECTORY_SEPARATOR; | ||
| 36 | + private $AssetsPath = __DIR__ . \DIRECTORY_SEPARATOR . '..' . \DIRECTORY_SEPARATOR . 'assets' . \DIRECTORY_SEPARATOR; | ||
| 37 | 37 | ||
| 38 | 38 | /** | |
| 39 | 39 | * @var string The path to the upload handler's L10N files. | |
| 40 | 40 | */ | |
| 41 | - private $L10NPath = __DIR__ . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'l10n' . DIRECTORY_SEPARATOR; | ||
| 41 | + private $L10NPath = __DIR__ . \DIRECTORY_SEPARATOR . '..' . \DIRECTORY_SEPARATOR . 'l10n' . \DIRECTORY_SEPARATOR; | ||
| 42 | 42 | ||
| 43 | 43 | /** | |
| 44 | 44 | * @var int The number of uploads caught by PHP. | |
@@ -84,7 +84,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca | |||
| 84 | 84 | $this->Loader->loadL10N($this->L10NPath); | |
| 85 | 85 | ||
| 86 | 86 | /** Count uploads caught by PHP. */ | |
| 87 | - $this->Uploads = empty($_FILES) ? 0 : count($_FILES); | ||
| 87 | + $this->Uploads = empty($_FILES) ? 0 : \count($_FILES); | ||
| 88 | 88 | ||
| 89 | 89 | /** Generate output language information attachment. */ | |
| 90 | 90 | if ($this->Loader->L10NAccepted !== $this->Loader->ClientL10NAccepted) { | |
@@ -119,7 +119,7 @@ public function __construct(\phpMussel\Core\Loader &$Loader, \phpMussel\Core\Sca | |||
| 119 | 119 | $WriteMode = ($Truncate > 0 && \filesize($File) >= $Truncate) ? 'wb' : 'ab'; | |
| 120 | 120 | } | |
| 121 | 121 | if (!\is_resource($Stream = \fopen($File, $WriteMode))) { | |
| 122 | - trigger_error('The "writeToUploadsLog" event failed to open "' . $File . '" for writing.'); | ||
| 122 | + \trigger_error('The "writeToUploadsLog" event failed to open "' . $File . '" for writing.'); | ||
| 123 | 123 | return false; | |
| 124 | 124 | } | |
| 125 | 125 | \fwrite($Stream, $Data); | |
@@ -183,7 +183,7 @@ public function scan() | |||
| 183 | 183 | } | |
| 184 | 184 | } | |
| 185 | 185 | ||
| 186 | - $FilesCount = count($FilesData['error']); | ||
| 186 | + $FilesCount = \count($FilesData['error']); | ||
| 187 | 187 | ||
| 188 | 188 | /** Iterate through normalised array and scan as necessary. */ | |
| 189 | 189 | for ($Iterator = 0; $Iterator < $FilesCount; $Iterator++) { | |
@@ -276,7 +276,7 @@ public function scan() | |||
| 276 | 276 | } | |
| 277 | 277 | ||
| 278 | 278 | /** Check these first, because they'll reset otherwise, then execute the scan. */ | |
| 279 | - if (!count($this->Loader->ScanResultsText) && count($FilesToScan)) { | ||
| 279 | + if (!\count($this->Loader->ScanResultsText) && \count($FilesToScan)) { | ||
| 280 | 280 | $this->Scanner->scan($FilesToScan, 4); | |
| 281 | 281 | } | |
| 282 | 282 | ||
@@ -400,7 +400,7 @@ public function scan() | |||
| 400 | 400 | /** Generate email body. */ | |
| 401 | 401 | $EmailBody = \sprintf( | |
| 402 | 402 | $this->Loader->L10N->getString('notifications_message'), | |
| 403 | - \preg_replace(['~^([\da-z]+:\d+:)~i', '~\n~'], ['', "<br />\n"], strip_tags($this->Loader->HashReference)), | ||
| 403 | + \preg_replace(['~^([\da-z]+:\d+:)~i', '~\n~'], ['', "<br />\n"], \strip_tags($this->Loader->HashReference)), | ||
| 404 | 404 | $TemplateData['detected'], | |
| 405 | 405 | $this->Loader->timeFormat($this->Loader->Time, $this->Loader->Configuration['core']['time_format']) | |
| 406 | 406 | ); | |
@@ -410,7 +410,7 @@ public function scan() | |||
| 410 | 410 | [], | |
| 411 | 411 | $this->Loader->L10N->getString('notifications_subject'), | |
| 412 | 412 | $EmailBody, | |
| 413 | - strip_tags($EmailBody), | ||
| 413 | + \strip_tags($EmailBody), | ||
| 414 | 414 | '' | |
| 415 | 415 | ]; | |
| 416 | 416 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments