1
0
Fork 0
mirror of https://github.com/Yetangitu/ampache synced 2025-10-03 09:49:30 +02:00

Fix deprecated constructor declarations

This commit is contained in:
Afterster 2015-10-05 20:40:41 +02:00
parent af6b8c3f55
commit 7fc69cb05f
9 changed files with 15 additions and 15 deletions

View file

@ -156,7 +156,7 @@ class easy_captcha {
#-- init data
function easy_captcha($id=NULL, $ignore_expiration=0) {
function __construct($id=NULL, $ignore_expiration=0) {
#-- load
if (($this->id = $id) or ($this->id = preg_replace("/[^-,.\w]+/", "", @$_REQUEST[CAPTCHA_PARAM_ID]))) {
@ -464,7 +464,7 @@ class easy_captcha_fuzzy extends easy_captcha {
class easy_captcha_graphic extends easy_captcha_fuzzy {
#-- config
function easy_captcha_graphic($x=NULL, $y=NULL) {
function __construct($x=NULL, $y=NULL) {
if (!$y) {
$x = strtok(CAPTCHA_IMAGE_SIZE, "x,|/*;:");
$y = strtok(",.");
@ -719,7 +719,7 @@ class easy_captcha_graphic_image_waved extends easy_captcha_graphic {
class easy_captcha_dxy_wave {
#-- init params
function easy_captcha_dxy_wave($max_x, $max_y) {
function __construct($max_x, $max_y) {
$this->dist_x = $this->real_rand(2.5, 3.5); // max +-x/y delta distance
$this->dist_y = $this->real_rand(2.5, 3.5);
$this->slow_x = $this->real_rand(7.5, 20.0); // =wave-width in pixel/3
@ -886,7 +886,7 @@ class easy_captcha_text_math_formula extends easy_captcha {
var $solution = "2";
#-- set up
function easy_captcha_text_math_formula() {
function __construct() {
$this->question = sprintf(CAPTCHA_WHATIS_TEXT, $this->create_formula());
$this->solution = $this->calculate_formula($this->question);
// we could do easier with iterated formula+result generation here, of course
@ -954,7 +954,7 @@ class easy_captcha_text_disable extends easy_captcha {
# (should be identical in each instantiation, cookie is time-bombed)
class easy_captcha_persistent_grant extends easy_captcha {
function easy_captcha_persistent_grant() {
function __construct() {
}

View file

@ -60,7 +60,7 @@ class AmazonSearch
/**
* Class Constructor
*/
function AmazonSearch($public_key, $private_key, $associate_tag, $base_url_param = '')
function __construct($public_key, $private_key, $associate_tag, $base_url_param = '')
{
/* If we have a base url then use it */

View file

@ -37,7 +37,7 @@ class HttpQPlayer
* This is the constructor, it defaults to localhost
* with port 4800
*/
public function HttpQPlayer($h = "localhost", $pw = "", $p = 4800)
public function __construct($h = "localhost", $pw = "", $p = 4800)
{
$this->host = $h;
$this->port = $p;

View file

@ -10,7 +10,7 @@ class UPnPDevice
);
public function UPnPDevice($descriptionUrl)
public function __construct($descriptionUrl)
{
if (! $this->restoreDescriptionUrl($descriptionUrl)) {
$this->parseDescriptionUrl($descriptionUrl);

View file

@ -67,7 +67,7 @@ class UPnPPlayer
* UPnPPlayer
* This is the constructor,
*/
public function UPnPPlayer($name = "noname", $description_url = "http://localhost")
public function __construct($name = "noname", $description_url = "http://localhost")
{
require_once AmpConfig::get('prefix') . '/modules/localplay/upnp/upnpdevice.php';
require_once AmpConfig::get('prefix') . '/modules/localplay/upnp/upnpplaylist.php';

View file

@ -31,7 +31,7 @@ class UPnPPlaylist
/*
* Playlist is its own for each UPnP device
*/
public function UPnPPlaylist($deviceGUID)
public function __construct($deviceGUID)
{
$this->_deviceGUID = $deviceGUID;
$this->PlayListRead();

View file

@ -40,7 +40,7 @@ class VlcPlayer
* with port 8080
* i would change this to another value then standard 8080, it gets used by more things
*/
public function VlcPlayer($h = "localhost", $pw = "", $p = 8080)
public function __construct($h = "localhost", $pw = "", $p = 8080)
{
$this->host = $h;
$this->port = $p;

View file

@ -98,7 +98,7 @@ class gettext_reader {
* @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;

View file

@ -49,7 +49,7 @@ class StringReader {
var $_pos;
var $_str;
function StringReader($str='') {
function __construct($str='') {
$this->_str = $str;
$this->_pos = 0;
}
@ -86,7 +86,7 @@ class FileReader {
var $_fd;
var $_length;
function FileReader($filename) {
function __construct($filename) {
if (file_exists($filename)) {
$this->_length=filesize($filename);
@ -143,7 +143,7 @@ class FileReader {
// 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);