mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix deprecated constructors
This small change should't prevent easy updates to libraries and fixes the lint check on php7
This commit is contained in:
@@ -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';
|
||||
|
||||
|
@@ -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')) {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -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 {
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -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);
|
||||
|
@@ -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 {
|
||||
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
@@ -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();
|
||||
|
@@ -155,7 +155,7 @@ class LogTicks extends Ticks{
|
||||
private $ticklabels_pos = array();
|
||||
//---------------
|
||||
// CONSTRUCTOR
|
||||
function LogTicks() {
|
||||
function __construct() {
|
||||
}
|
||||
//---------------
|
||||
// PUBLIC METHODS
|
||||
|
@@ -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,
|
||||
|
@@ -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';
|
||||
|
Reference in New Issue
Block a user