From 53b07d7a2ab57a18462b4987b5aa29798de940bb Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Fri, 26 Aug 2016 00:35:09 -0500 Subject: [PATCH] Fix deprecated constructors This small change should't prevent easy updates to libraries and fixes the lint check on php7 --- html/lib/PasswordHash.php | 2 +- html/lib/geshi/geshi.php | 4 ++-- html/lib/jpgraph/imgdata_squares.inc.php | 4 ++-- html/lib/jpgraph/jpgraph_bar.php | 2 +- html/lib/jpgraph/jpgraph_flags.php | 4 ++-- html/lib/jpgraph/jpgraph_line.php | 2 +- html/lib/jpgraph/jpgraph_log.php | 2 +- includes/console_table.php | 2 +- lib/pure_php_radius/radius.class.php | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/html/lib/PasswordHash.php b/html/lib/PasswordHash.php index 914ab2e4d4..f4d7d6eb6f 100644 --- a/html/lib/PasswordHash.php +++ b/html/lib/PasswordHash.php @@ -30,7 +30,7 @@ class PasswordHash { var $portable_hashes; var $random_state; - function PasswordHash($iteration_count_log2, $portable_hashes) + function __construct($iteration_count_log2, $portable_hashes) { $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; diff --git a/html/lib/geshi/geshi.php b/html/lib/geshi/geshi.php index 22b2ae7a3f..4f36b78c0e 100644 --- a/html/lib/geshi/geshi.php +++ b/html/lib/geshi/geshi.php @@ -588,7 +588,7 @@ class GeSHi { * {@link GeSHi->set_language_path()} * @since 1.0.0 */ - function GeSHi($source = '', $language = '', $path = '') { + function __construct($source = '', $language = '', $path = '') { if (!empty($source)) { $this->set_source($source); } @@ -4616,4 +4616,4 @@ if (!function_exists('geshi_highlight')) { } } -?> \ No newline at end of file +?> diff --git a/html/lib/jpgraph/imgdata_squares.inc.php b/html/lib/jpgraph/imgdata_squares.inc.php index e420b0a243..3d25b3d2eb 100644 --- a/html/lib/jpgraph/imgdata_squares.inc.php +++ b/html/lib/jpgraph/imgdata_squares.inc.php @@ -43,7 +43,7 @@ class ImgData_Squares extends ImgData { protected $maxidx = 7 ; protected $imgdata ; - function ImgData_Squares () { + function __construct() { //========================================================== //sq_lblue.png //========================================================== @@ -171,4 +171,4 @@ class ImgData_Squares extends ImgData { } } -?> \ No newline at end of file +?> diff --git a/html/lib/jpgraph/jpgraph_bar.php b/html/lib/jpgraph/jpgraph_bar.php index 92d8eb7868..0f77e8444a 100644 --- a/html/lib/jpgraph/jpgraph_bar.php +++ b/html/lib/jpgraph/jpgraph_bar.php @@ -652,7 +652,7 @@ class GroupBarPlot extends BarPlot { private $plots, $nbrplots=0; //--------------- // CONSTRUCTOR - function GroupBarPlot($plots) { + function __construct($plots) { $this->width=0.7; $this->plots = $plots; $this->nbrplots = count($plots); diff --git a/html/lib/jpgraph/jpgraph_flags.php b/html/lib/jpgraph/jpgraph_flags.php index 85295b1457..6a55fd2933 100644 --- a/html/lib/jpgraph/jpgraph_flags.php +++ b/html/lib/jpgraph/jpgraph_flags.php @@ -291,7 +291,7 @@ class FlagImages { private $iFlagData ; private $iOrdIdx=array(); - function FlagImages($aSize=FLAGSIZE1) { + function __construct($aSize=FLAGSIZE1) { switch($aSize) { case FLAGSIZE1 : case FLAGSIZE2 : @@ -397,4 +397,4 @@ class FlagImages { -?> \ No newline at end of file +?> diff --git a/html/lib/jpgraph/jpgraph_line.php b/html/lib/jpgraph/jpgraph_line.php index ef72f057c2..1a1d0c6661 100644 --- a/html/lib/jpgraph/jpgraph_line.php +++ b/html/lib/jpgraph/jpgraph_line.php @@ -59,7 +59,7 @@ class LinePlot extends Plot{ //--------------- // CONSTRUCTOR - function LinePlot($datay,$datax=false) { + function __construct($datay,$datax=false) { parent::__construct($datay,$datax); $this->mark = new PlotMark() ; $this->color = ColorFactory::getColor(); diff --git a/html/lib/jpgraph/jpgraph_log.php b/html/lib/jpgraph/jpgraph_log.php index 82b48d6a6c..eaa8e9eb69 100644 --- a/html/lib/jpgraph/jpgraph_log.php +++ b/html/lib/jpgraph/jpgraph_log.php @@ -155,7 +155,7 @@ class LogTicks extends Ticks{ private $ticklabels_pos = array(); //--------------- // CONSTRUCTOR - function LogTicks() { + function __construct() { } //--------------- // PUBLIC METHODS diff --git a/includes/console_table.php b/includes/console_table.php index aff8c9b084..ebc42c02ae 100644 --- a/includes/console_table.php +++ b/includes/console_table.php @@ -171,7 +171,7 @@ class Console_Table * extension. * @param boolean $color Whether the data contains ansi color codes. */ - function Console_Table( + function __construct( $align=CONSOLE_TABLE_ALIGN_LEFT, $border=CONSOLE_TABLE_BORDER_ASCII, $padding=1, diff --git a/lib/pure_php_radius/radius.class.php b/lib/pure_php_radius/radius.class.php index b56f061aff..4feb33fcd7 100644 --- a/lib/pure_php_radius/radius.class.php +++ b/lib/pure_php_radius/radius.class.php @@ -227,7 +227,7 @@ class Radius * @param integer accounting port * @return NULL *********************************************************************/ - public function Radius($ip_radius_server = '127.0.0.1', $shared_secret = '', $radius_suffix = '', $udp_timeout = 5, $authentication_port = 1812, $accounting_port = 1813) + public function __construct($ip_radius_server = '127.0.0.1', $shared_secret = '', $radius_suffix = '', $udp_timeout = 5, $authentication_port = 1812, $accounting_port = 1813) { $this->_radius_packet_info[1] = 'Access-Request'; $this->_radius_packet_info[2] = 'Access-Accept';