Skip to content

Commit a477efd

Browse files
committed
New feature.
Changelog excerpt: - Added the ability to hide the phpMussel version used.
1 parent 4df3981 commit a477efd

File tree

3 files changed

+15
-5
lines changed

3 files changed

+15
-5
lines changed

Changelog.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,10 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
3232

3333
[2020.12.04; Maikuolan]: Maintenance release (dependencies update, repository cleanup, etc).
3434

35-
### v3.1.1
35+
### v3.2.0
3636

3737
[2021.01.10; Maikuolan]: Separated the code for performing outbound requests through cURL out to its own independent class.
3838

3939
[2021.02.05; Maikuolan]: The default timeout for external requests is now configurable.
40+
41+
[2021.02.07; Maikuolan]: Added the ability to hide the phpMussel version used.

assets/config.yml

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# License: GNU/GPLv2
88
# @see LICENSE.txt
99
#
10-
# This file: Configuration defaults file (last modified: 2021.02.05).
10+
# This file: Configuration defaults file (last modified: 2021.02.07).
1111
##/
1212

1313
core:
@@ -178,6 +178,9 @@ core:
178178
statistics:
179179
type: "bool"
180180
default: false
181+
hide_version:
182+
type: "bool"
183+
default: false
181184
disabled_channels:
182185
type: "checkbox"
183186
default: "VirusTotal_HTTP"

src/Loader.php

+8-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: The loader (last modified: 2021.02.05).
11+
* This file: The loader (last modified: 2021.02.07).
1212
*/
1313

1414
namespace phpMussel\Core;
@@ -88,7 +88,7 @@ class Loader
8888
/**
8989
* @var string phpMussel version number (SemVer).
9090
*/
91-
public $ScriptVersion = '3.1.1';
91+
public $ScriptVersion = '3.2.0';
9292

9393
/**
9494
* @var string phpMussel version identifier (complete notation).
@@ -326,7 +326,12 @@ public function __construct(
326326
date_default_timezone_set($this->Configuration['core']['timezone']);
327327
}
328328

329-
/** Instantiate request class. */
329+
/** Revert script ident if "hide_version" is true. */
330+
if ($this->Configuration['core']['hide_version']) {
331+
$this->ScriptIdent = 'phpMussel';
332+
}
333+
334+
/** Instantiate the request class. */
330335
$this->Request = new \Maikuolan\Common\Request();
331336
$this->Request->DefaultTimeout = $this->Configuration['core']['default_timeout'];
332337
$this->Request->Channels = (

0 commit comments

Comments
 (0)