diff --git a/modules/captcha/captcha.php b/modules/captcha/captcha.php index 4d7c8995..d94c9652 100644 --- a/modules/captcha/captcha.php +++ b/modules/captcha/captcha.php @@ -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() { } diff --git a/modules/infotools/AmazonSearchEngine.class.php b/modules/infotools/AmazonSearchEngine.class.php index dec0d609..a618cf97 100644 --- a/modules/infotools/AmazonSearchEngine.class.php +++ b/modules/infotools/AmazonSearchEngine.class.php @@ -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 */ diff --git a/modules/localplay/httpq/httpqplayer.class.php b/modules/localplay/httpq/httpqplayer.class.php index 742f5ba6..104ec458 100644 --- a/modules/localplay/httpq/httpqplayer.class.php +++ b/modules/localplay/httpq/httpqplayer.class.php @@ -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; diff --git a/modules/localplay/upnp/upnpdevice.php b/modules/localplay/upnp/upnpdevice.php index b5635a59..3809d180 100644 --- a/modules/localplay/upnp/upnpdevice.php +++ b/modules/localplay/upnp/upnpdevice.php @@ -10,7 +10,7 @@ class UPnPDevice ); - public function UPnPDevice($descriptionUrl) + public function __construct($descriptionUrl) { if (! $this->restoreDescriptionUrl($descriptionUrl)) { $this->parseDescriptionUrl($descriptionUrl); diff --git a/modules/localplay/upnp/upnpplayer.class.php b/modules/localplay/upnp/upnpplayer.class.php index 1f27bb53..dd943fb1 100644 --- a/modules/localplay/upnp/upnpplayer.class.php +++ b/modules/localplay/upnp/upnpplayer.class.php @@ -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'; diff --git a/modules/localplay/upnp/upnpplaylist.php b/modules/localplay/upnp/upnpplaylist.php index 3d235f94..b427a921 100644 --- a/modules/localplay/upnp/upnpplaylist.php +++ b/modules/localplay/upnp/upnpplaylist.php @@ -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(); diff --git a/modules/localplay/vlc/vlcplayer.class.php b/modules/localplay/vlc/vlcplayer.class.php index 8b2aa3cb..b575d008 100644 --- a/modules/localplay/vlc/vlcplayer.class.php +++ b/modules/localplay/vlc/vlcplayer.class.php @@ -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; diff --git a/modules/php-gettext/gettext.php b/modules/php-gettext/gettext.php index 5064047c..81af5550 100644 --- a/modules/php-gettext/gettext.php +++ b/modules/php-gettext/gettext.php @@ -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; diff --git a/modules/php-gettext/streams.php b/modules/php-gettext/streams.php index 3cdc1584..00cf6cc5 100644 --- a/modules/php-gettext/streams.php +++ b/modules/php-gettext/streams.php @@ -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);