Merge branch 'develop' into feature/175

pull/628/head
Tim 2018-09-05 22:14:03 +02:00 committed by GitHub
commit 10b6f05578
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 70 additions and 54 deletions

View File

@ -5,11 +5,16 @@ Changelog
Not yet released Not yet released
---------------- ----------------
#628: Added the option to mark specific HTTP status codes as online. * #628: Added the option to mark specific HTTP status codes as online.
b49659f: Added question to notification faq about not recieving notifications. * #640: Removed () after last offline value when the last offline duration is unknown.
ef28908: Indentation fix. * #637: Added php extensions to composer required list, spelling fixes in changelog and composer update.
#605: Added Norwegian language. * #635: Changed server order on ?&mod=user&action=edit&id=x.
f6173d4: Added license to composer.json file. * #634: Changed ' to " in sql query, both were used.
* #629: Fix bug that made it impossible to check rdp:// and fixed port update.
* b49659f: Added question to notification faq about not receiving notifications.
* ef28908: Indentation fix.
* #605: Added Norwegian language.
* f6173d4: Added license to composer.json file.
v3.3.1 (released August 10, 2018) v3.3.1 (released August 10, 2018)
-------------------------------- --------------------------------
@ -40,7 +45,7 @@ v3.3.1 (released August 10, 2018)
v3.3.0 (released May 30, 2018) v3.3.0 (released May 30, 2018)
-------------------------------- --------------------------------
* 57f4c36: Added support voor the following SMS gateways: Plivo, SolutionsInfini, Callr and GAtewayAPI. * 57f4c36: Added support for the following SMS gateways: Plivo, SolutionsInfini, Callr and GatewayAPI.
* c3751e7: Moved Clickatell api key to password field. * c3751e7: Moved Clickatell api key to password field.
* #590: Rollback Twig version update to work with PHP5. * #590: Rollback Twig version update to work with PHP5.
* #589: Enlarge select pattern_online width. * #589: Enlarge select pattern_online width.
@ -66,7 +71,7 @@ v3.3.0 (released May 30, 2018)
* #541: Fix method declaration error in PHP7.2. * #541: Fix method declaration error in PHP7.2.
* #515: Run archive and cleanup per server to reduce memory use. * #515: Run archive and cleanup per server to reduce memory use.
* #516: Fixed #500 ping latency. * #516: Fixed #500 ping latency.
* 2471767: Fixed preinstalled server query. * 2471767: Fixed pre installed server query.
v3.2.2 (released March 27, 2018) v3.2.2 (released March 27, 2018)
-------------------------------- --------------------------------
@ -84,7 +89,7 @@ v3.2.2 (released March 27, 2018)
v3.2.1 (released March 27, 2018) v3.2.1 (released March 27, 2018)
-------------------------------- --------------------------------
* #343: Added optinal header value check. * #343: Added optional header value check.
* #433: Changed baseurl repoforgeextras. * #433: Changed baseurl repoforgeextras.
* #432: Changed baseurl repoforge. * #432: Changed baseurl repoforge.
* #437: Octopush.class.php updates to Octopush.php. * #437: Octopush.class.php updates to Octopush.php.

View File

@ -2,9 +2,12 @@
"name": "phpservermon/phpservermon", "name": "phpservermon/phpservermon",
"description": "PHP Server Monitor", "description": "PHP Server Monitor",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"homepage": "http://www.phpservermonitor.org", "homepage": "https://www.phpservermonitor.org",
"require": { "require": {
"php": ">=5.5.9", "php": ">=5.5.9",
"ext-curl": "*",
"ext-pdo": "*",
"ext-xml": "*",
"phpmailer/phpmailer": "~6.0", "phpmailer/phpmailer": "~6.0",
"symfony/config": "~3.4", "symfony/config": "~3.4",
"symfony/dependency-injection": "~3.4", "symfony/dependency-injection": "~3.4",

82
composer.lock generated
View File

@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "280e04b14bf6e80bca192b48a12bb342", "content-hash": "b116489d45aab7506cedf3f94fb60ee4",
"packages": [ "packages": [
{ {
"name": "paragonie/random_compat", "name": "paragonie/random_compat",
@ -202,7 +202,7 @@
}, },
{ {
"name": "symfony/config", "name": "symfony/config",
"version": "v3.4.14", "version": "v3.4.15",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/config.git", "url": "https://github.com/symfony/config.git",
@ -266,16 +266,16 @@
}, },
{ {
"name": "symfony/dependency-injection", "name": "symfony/dependency-injection",
"version": "v3.4.14", "version": "v3.4.15",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/dependency-injection.git", "url": "https://github.com/symfony/dependency-injection.git",
"reference": "1c0e679e522591fd744fdf242fec41a43d62b2b1" "reference": "09d7df7bf06c1393b6afc85875993cbdbdf897a0"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/1c0e679e522591fd744fdf242fec41a43d62b2b1", "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/09d7df7bf06c1393b6afc85875993cbdbdf897a0",
"reference": "1c0e679e522591fd744fdf242fec41a43d62b2b1", "reference": "09d7df7bf06c1393b6afc85875993cbdbdf897a0",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -333,11 +333,11 @@
], ],
"description": "Symfony DependencyInjection Component", "description": "Symfony DependencyInjection Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-07-29T15:19:31+00:00" "time": "2018-08-08T11:42:34+00:00"
}, },
{ {
"name": "symfony/event-dispatcher", "name": "symfony/event-dispatcher",
"version": "v3.4.14", "version": "v3.4.15",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/event-dispatcher.git", "url": "https://github.com/symfony/event-dispatcher.git",
@ -400,16 +400,16 @@
}, },
{ {
"name": "symfony/filesystem", "name": "symfony/filesystem",
"version": "v4.1.3", "version": "v4.1.4",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/filesystem.git", "url": "https://github.com/symfony/filesystem.git",
"reference": "2e30335e0aafeaa86645555959572fe7cea22b43" "reference": "c0f5f62db218fa72195b8b8700e4b9b9cf52eb5e"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/filesystem/zipball/2e30335e0aafeaa86645555959572fe7cea22b43", "url": "https://api.github.com/repos/symfony/filesystem/zipball/c0f5f62db218fa72195b8b8700e4b9b9cf52eb5e",
"reference": "2e30335e0aafeaa86645555959572fe7cea22b43", "reference": "c0f5f62db218fa72195b8b8700e4b9b9cf52eb5e",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -446,20 +446,20 @@
], ],
"description": "Symfony Filesystem Component", "description": "Symfony Filesystem Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-07-26T11:24:31+00:00" "time": "2018-08-18T16:52:46+00:00"
}, },
{ {
"name": "symfony/http-foundation", "name": "symfony/http-foundation",
"version": "v3.4.14", "version": "v3.4.15",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/http-foundation.git", "url": "https://github.com/symfony/http-foundation.git",
"reference": "19a3267828046a2a4a05e3dc2954bbd2e0ad9fa6" "reference": "2fb33cb6eefe6e790e4023f7c534a9e4214252fc"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/http-foundation/zipball/19a3267828046a2a4a05e3dc2954bbd2e0ad9fa6", "url": "https://api.github.com/repos/symfony/http-foundation/zipball/2fb33cb6eefe6e790e4023f7c534a9e4214252fc",
"reference": "19a3267828046a2a4a05e3dc2954bbd2e0ad9fa6", "reference": "2fb33cb6eefe6e790e4023f7c534a9e4214252fc",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -500,29 +500,32 @@
], ],
"description": "Symfony HttpFoundation Component", "description": "Symfony HttpFoundation Component",
"homepage": "https://symfony.com", "homepage": "https://symfony.com",
"time": "2018-08-01T14:04:26+00:00" "time": "2018-08-27T17:45:33+00:00"
}, },
{ {
"name": "symfony/polyfill-ctype", "name": "symfony/polyfill-ctype",
"version": "v1.8.0", "version": "v1.9.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-ctype.git", "url": "https://github.com/symfony/polyfill-ctype.git",
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae" "reference": "e3d826245268269cd66f8326bd8bc066687b4a19"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/7cc359f1b7b80fc25ed7796be7d96adc9b354bae", "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19",
"reference": "7cc359f1b7b80fc25ed7796be7d96adc9b354bae", "reference": "e3d826245268269cd66f8326bd8bc066687b4a19",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"suggest": {
"ext-ctype": "For best performance"
},
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.8-dev" "dev-master": "1.9-dev"
} }
}, },
"autoload": { "autoload": {
@ -555,20 +558,20 @@
"polyfill", "polyfill",
"portable" "portable"
], ],
"time": "2018-04-30T19:57:29+00:00" "time": "2018-08-06T14:22:27+00:00"
}, },
{ {
"name": "symfony/polyfill-mbstring", "name": "symfony/polyfill-mbstring",
"version": "v1.8.0", "version": "v1.9.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git", "url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "3296adf6a6454a050679cde90f95350ad604b171" "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/3296adf6a6454a050679cde90f95350ad604b171", "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/d0cd638f4634c16d8df4508e847f14e9e43168b8",
"reference": "3296adf6a6454a050679cde90f95350ad604b171", "reference": "d0cd638f4634c16d8df4508e847f14e9e43168b8",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
@ -580,7 +583,7 @@
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.8-dev" "dev-master": "1.9-dev"
} }
}, },
"autoload": { "autoload": {
@ -614,30 +617,30 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2018-04-26T10:06:28+00:00" "time": "2018-08-06T14:22:27+00:00"
}, },
{ {
"name": "symfony/polyfill-php70", "name": "symfony/polyfill-php70",
"version": "v1.8.0", "version": "v1.9.0",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/symfony/polyfill-php70.git", "url": "https://github.com/symfony/polyfill-php70.git",
"reference": "77454693d8f10dd23bb24955cffd2d82db1007a6" "reference": "1e24b0c4a56d55aaf368763a06c6d1c7d3194934"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/77454693d8f10dd23bb24955cffd2d82db1007a6", "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/1e24b0c4a56d55aaf368763a06c6d1c7d3194934",
"reference": "77454693d8f10dd23bb24955cffd2d82db1007a6", "reference": "1e24b0c4a56d55aaf368763a06c6d1c7d3194934",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"paragonie/random_compat": "~1.0|~2.0", "paragonie/random_compat": "~1.0|~2.0|~9.99",
"php": ">=5.3.3" "php": ">=5.3.3"
}, },
"type": "library", "type": "library",
"extra": { "extra": {
"branch-alias": { "branch-alias": {
"dev-master": "1.8-dev" "dev-master": "1.9-dev"
} }
}, },
"autoload": { "autoload": {
@ -673,7 +676,7 @@
"portable", "portable",
"shim" "shim"
], ],
"time": "2018-04-26T10:06:28+00:00" "time": "2018-08-06T14:22:27+00:00"
}, },
{ {
"name": "twig/twig", "name": "twig/twig",
@ -751,7 +754,10 @@
"prefer-stable": false, "prefer-stable": false,
"prefer-lowest": false, "prefer-lowest": false,
"platform": { "platform": {
"php": ">=5.5.9" "php": ">=5.5.9",
"ext-curl": "*",
"ext-pdo": "*",
"ext-xml": "*"
}, },
"platform-dev": [] "platform-dev": []
} }

Binary file not shown.

View File

@ -108,7 +108,8 @@ abstract class AbstractServerController extends AbstractController {
$server['last_online'] = psm_timespan($server['last_online']); $server['last_online'] = psm_timespan($server['last_online']);
$server['last_offline'] = psm_timespan($server['last_offline']); $server['last_offline'] = psm_timespan($server['last_offline']);
if ($server['last_offline'] != psm_get_lang('system', 'never')) { if ($server['last_offline'] != psm_get_lang('system', 'never')) {
$server['last_offline_duration'] = "(".$server['last_offline_duration'].")"; $server['last_offline_duration'] = is_null($server['last_offline_duration']) ?
null : "(".$server['last_offline_duration'].")";
} }
$server['last_check'] = psm_timespan($server['last_check']); $server['last_check'] = psm_timespan($server['last_check']);
$server['active'] = psm_get_lang('system', $server['active']); $server['active'] = psm_get_lang('system', $server['active']);

View File

@ -280,15 +280,15 @@ class ServerController extends AbstractServerController {
'telegram' => in_array($_POST['telegram'], array('yes', 'no')) ? $_POST['telegram'] : 'no', 'telegram' => in_array($_POST['telegram'], array('yes', 'no')) ? $_POST['telegram'] : 'no',
); );
// make sure websites start with http:// // make sure websites start with http://
if ($clean['type'] == 'website' && substr($clean['ip'], 0, 4) != 'http') { if ($clean['type'] == 'website' && substr($clean['ip'], 0, 4) != 'http' && substr($clean['ip'], 0, 3) != 'rdp') {
$clean['ip'] = 'http://'.$clean['ip']; $clean['ip'] = 'http://'.$clean['ip'];
} }
// validate the lot // validate the lot
$server_validator = new \psm\Util\Server\ServerValidator($this->db); $server_validator = new \psm\Util\Server\ServerValidator($this->db);
// format port from http/s url // format port from http, https or rdp url
if ($clean['type'] == 'website' && empty($clean['port'])) { if ($clean['type'] == 'website') {
$tmp = parse_url($clean["ip"]); $tmp = parse_url($clean["ip"]);
if (isset($tmp["port"])) { if (isset($tmp["port"])) {
$clean["port"] = $tmp["port"]; $clean["port"] = $tmp["port"];

View File

@ -49,7 +49,7 @@ class UserController extends AbstractController {
} }
public function run($action = NULL) { public function run($action = NULL) {
$servers = $this->db->select(PSM_DB_PREFIX.'servers', null, array('server_id', 'label'), '', "ORDER BY `active` ASC, `status` DESC, `label` ASC"); $servers = $this->db->select(PSM_DB_PREFIX.'servers', null, array('server_id', 'label'), '', "ORDER BY `label` ASC");
// change the indexes to reflect their server ids // change the indexes to reflect their server ids
foreach ($servers as $server) { foreach ($servers as $server) {
$this->servers[$server['server_id']] = $server; $this->servers[$server['server_id']] = $server;
@ -110,6 +110,7 @@ class UserController extends AbstractController {
'label' => $servers_labels[$server_id] 'label' => $servers_labels[$server_id]
); );
} }
sort($user['emp_servers']);
$user['url_delete'] = psm_build_url(array( $user['url_delete'] = psm_build_url(array(
'mod' => 'user', 'mod' => 'user',

View File

@ -179,8 +179,8 @@ class HistoryGraph {
} }
$records = $this->db->execute( $records = $this->db->execute(
'SELECT * "SELECT *
FROM `'.PSM_DB_PREFIX."servers_$type` FROM `".PSM_DB_PREFIX."servers_$type`
WHERE `server_id` = :server_id AND `date` BETWEEN :start_time AND :end_time ORDER BY `date` ASC", WHERE `server_id` = :server_id AND `date` BETWEEN :start_time AND :end_time ORDER BY `date` ASC",
array( array(
'server_id' => $server_id, 'server_id' => $server_id,