diff options
author | girgen <girgen@FreeBSD.org> | 2018-01-23 18:25:02 +0800 |
---|---|---|
committer | Koop Mast <kwm@rainbow-runner.nl> | 2018-02-04 06:28:07 +0800 |
commit | 67a5f4b1aedc61e07e0f4f1e125281cb3896d8ab (patch) | |
tree | 46ddc6efb15fa7a9973c06ba7c5096a5ebe7fdaa /net-mgmt | |
parent | 5908743d956d238cb4bde61244a73917f4e179d8 (diff) | |
download | freebsd-ports-gnome-67a5f4b1aedc61e07e0f4f1e125281cb3896d8ab.tar.gz freebsd-ports-gnome-67a5f4b1aedc61e07e0f4f1e125281cb3896d8ab.tar.zst freebsd-ports-gnome-67a5f4b1aedc61e07e0f4f1e125281cb3896d8ab.zip |
Fix runtime problems with some constructs deprecated by php7
- functions cannot use the same parameter name multiple times, even if they are
unused
- constructors are now alwatys named __construct
PR: 224510 (Maintainer timeout)
Diffstat (limited to 'net-mgmt')
3 files changed, 63 insertions, 0 deletions
diff --git a/net-mgmt/nagvis/Makefile b/net-mgmt/nagvis/Makefile index 3f115cb8a215..90ef5ec4a759 100644 --- a/net-mgmt/nagvis/Makefile +++ b/net-mgmt/nagvis/Makefile @@ -3,6 +3,7 @@ PORTNAME= nagvis PORTVERSION= 1.8.5 +PORTREVISION= 1 CATEGORIES= net-mgmt MASTER_SITES= http://www.nagvis.org/share/ diff --git a/net-mgmt/nagvis/files/patch-share_server_core_classes_objects_NagVisService.php b/net-mgmt/nagvis/files/patch-share_server_core_classes_objects_NagVisService.php new file mode 100644 index 000000000000..f6c25ad8635b --- /dev/null +++ b/net-mgmt/nagvis/files/patch-share_server_core_classes_objects_NagVisService.php @@ -0,0 +1,22 @@ +--- share/server/core/classes/objects/NagVisMapObj.php.orig 2017-12-21 20:54:27.936999000 +0100 ++++ share/server/core/classes/objects/NagVisMapObj.php 2017-12-21 20:54:31.229491000 +0100 +@@ -187,7 +187,7 @@ + * + * @author Lars Michelsen <lars@vertical-visions.de> + */ +- public function queueState($_unused_flag = true, $_unused_flag = true) { ++ public function queueState($_unused_flag = true, $_unused_flag2 = true) { + // Get state of all member objects + foreach($this->getStateRelevantMembers() AS $OBJ) { + // The states of the map objects members only need to be fetched when this +--- share/server/core/classes/objects/NagVisService.php.orig 2017-12-21 20:55:07.358180000 +0100 ++++ share/server/core/classes/objects/NagVisService.php 2017-12-21 20:55:31.487418000 +0100 +@@ -56,7 +56,7 @@ + /** + * Queues state fetching for this object + */ +- public function queueState($_unused_flag = true, $_unused_flag = true) { ++ public function queueState($_unused_flag = true, $_unused_flag2 = true) { + global $_BACKEND; + $_BACKEND->queue(Array('serviceState' => true), $this); + } diff --git a/net-mgmt/nagvis/files/patch-share_server_core_ext_php_gettext.php b/net-mgmt/nagvis/files/patch-share_server_core_ext_php_gettext.php new file mode 100644 index 000000000000..46eab4916031 --- /dev/null +++ b/net-mgmt/nagvis/files/patch-share_server_core_ext_php_gettext.php @@ -0,0 +1,40 @@ +--- share/server/core/ext/php-gettext-1.0.9/gettext.php.orig 2017-12-21 20:52:04.548840000 +0100 ++++ share/server/core/ext/php-gettext-1.0.9/gettext.php 2017-12-21 20:52:26.904652000 +0100 +@@ -98,7 +98,7 @@ + * @param object Reader the StreamReader object + * @param boolean enable_cache Enable or disable caching of strings (default on) + */ +- function gettext_reader($Reader, $enable_cache = true) { ++ function __construct($Reader, $enable_cache = true) { + // If there isn't a StreamReader, turn on short circuit mode. + if (! $Reader || isset($Reader->error) ) { + $this->short_circuit = true; +--- share/server/core/ext/php-gettext-1.0.9/streams.php.orig 2017-12-21 20:52:12.507752000 +0100 ++++ share/server/core/ext/php-gettext-1.0.9/streams.php 2017-12-21 20:53:08.533635000 +0100 +@@ -49,7 +49,7 @@ + var $_pos; + var $_str; + +- function StringReader($str='') { ++ function __construct($str='') { + $this->_str = $str; + $this->_pos = 0; + } +@@ -86,7 +86,7 @@ + var $_fd; + var $_length; + +- function FileReader($filename) { ++ function __construct($filename) { + if (file_exists($filename)) { + + $this->_length=filesize($filename); +@@ -143,7 +143,7 @@ + // Preloads entire file in memory first, then creates a StringReader + // over it (it assumes knowledge of StringReader internals) + class CachedFileReader extends StringReader { +- function CachedFileReader($filename) { ++ function __construct($filename) { + if (file_exists($filename)) { + + $length=filesize($filename); |