|
8 | 8 | * License: GNU/GPLv2
|
9 | 9 | * @see LICENSE.txt
|
10 | 10 | *
|
11 |
| - * This file: The loader (last modified: 2023.08.16). |
| 11 | + * This file: The loader (last modified: 2023.09.04). |
12 | 12 | */
|
13 | 13 |
|
14 | 14 | namespace phpMussel\Core;
|
@@ -93,7 +93,7 @@ class Loader
|
93 | 93 | /**
|
94 | 94 | * @var string phpMussel version number (SemVer).
|
95 | 95 | */
|
96 |
| - public $ScriptVersion = '3.4.0'; |
| 96 | + public $ScriptVersion = '3.4.1'; |
97 | 97 |
|
98 | 98 | /**
|
99 | 99 | * @var string phpMussel version identifier (complete notation).
|
@@ -1269,85 +1269,6 @@ public function loadShorthandData(): bool
|
1269 | 1269 | return true;
|
1270 | 1270 | }
|
1271 | 1271 |
|
1272 |
| - /** |
1273 |
| - * Writes to $HashReference, and performs any other needed hit-related actions. |
1274 |
| - * |
1275 |
| - * @param string $Hash The hash of the item which had a positive hit. |
1276 |
| - * @param int $Size The size of the item which had a positive hit. |
1277 |
| - * @param string $Name The name of the item which had a positive hit. |
1278 |
| - * @param string $Text A human-readable explanation of the hit. |
1279 |
| - * @param int $Code The integer results of the scan. |
1280 |
| - * @param int $Depth The current depth of the scan process. |
1281 |
| - * @return void |
1282 |
| - */ |
1283 |
| - public function atHit(string $Hash, int $Size = -1, string $Name = '', string $Text = '', int $Code = 2, int $Depth = 0): void |
1284 |
| - { |
1285 |
| - /** Fallback for missing item hash. */ |
1286 |
| - if ($Hash === '') { |
1287 |
| - $Hash = $this->L10N->getString('data_not_available'); |
1288 |
| - } |
1289 |
| - |
1290 |
| - /** Fallback for missing item name. */ |
1291 |
| - if ($Name === '') { |
1292 |
| - $Name = $this->L10N->getString('data_not_available'); |
1293 |
| - } |
1294 |
| - |
1295 |
| - /** Ensure that $Text doesn't break lines and clean it up. */ |
1296 |
| - $Text = preg_replace('~[\x00-\x1F]~', '', $Text); |
1297 |
| - |
1298 |
| - /** Generate hash reference and key for various arrays to be populated. */ |
1299 |
| - $HashReference = sprintf('%s:%d:%s', $Hash, $Size, $Name); |
1300 |
| - if (strpos($this->HashReference, $HashReference . "\n") === false) { |
1301 |
| - $this->HashReference .= $HashReference . "\n"; |
1302 |
| - } |
1303 |
| - |
1304 |
| - $TextLength = strlen($Text); |
1305 |
| - |
1306 |
| - /** Scan results as text. */ |
1307 |
| - if ($TextLength && isset($this->ScanResultsText[$HashReference]) && strlen($this->ScanResultsText[$HashReference])) { |
1308 |
| - $this->ScanResultsText[$HashReference] .= $this->L10N->getString('grammar_spacer') . $Text; |
1309 |
| - } else { |
1310 |
| - $this->ScanResultsText[$HashReference] = $Text; |
1311 |
| - } |
1312 |
| - |
1313 |
| - /** Scan results as integers. */ |
1314 |
| - if (empty($this->ScanResultsIntegers[$HashReference]) || $this->ScanResultsIntegers[$HashReference] !== 2) { |
1315 |
| - $this->ScanResultsIntegers[$HashReference] = $Code; |
1316 |
| - } |
1317 |
| - |
1318 |
| - /** Increment detections count. */ |
1319 |
| - if ($Code !== 0 && $Code !== 1) { |
1320 |
| - if (isset($this->InstanceCache['DetectionsCount'])) { |
1321 |
| - $this->InstanceCache['DetectionsCount']++; |
1322 |
| - } else { |
1323 |
| - $this->InstanceCache['DetectionsCount'] = 1; |
1324 |
| - } |
1325 |
| - } |
1326 |
| - |
1327 |
| - /** Indenting to apply for the formatted scan results . */ |
1328 |
| - $Indent = str_pad('→ ', ($Depth < 1 ? 4 : ($Depth * 3) + 4), '─', STR_PAD_LEFT); |
1329 |
| - |
1330 |
| - /** Fallback for missing text for formatted text. */ |
1331 |
| - if (!$TextLength) { |
1332 |
| - if ($Code === 0) { |
1333 |
| - $Text = sprintf( |
1334 |
| - $this->L10N->getString('grammar_exclamation_mark'), |
1335 |
| - sprintf($this->L10N->getString('x_does_not_exist'), $Name) |
1336 |
| - ); |
1337 |
| - } elseif ($Code === 1) { |
1338 |
| - $Text = $this->L10N->getString('scan_no_problems_found'); |
1339 |
| - } else { |
1340 |
| - $Text = $this->L10N->getString('data_not_available'); |
1341 |
| - } |
1342 |
| - } |
1343 |
| - |
1344 |
| - /** Scan results as formatted text. */ |
1345 |
| - $this->ScanResultsFormatted .= $Indent . $Text . "\n"; |
1346 |
| - |
1347 |
| - /** Update flags. */ |
1348 |
| - $this->InstanceCache['CheckWasLast'] = false; |
1349 |
| - } |
1350 |
| - |
1351 | 1272 | /**
|
1352 | 1273 | * Initialise the cache.
|
1353 | 1274 | *
|
|
0 commit comments