forked from Cavemanon/cavepaintings
use new-style constructors everywhere
This commit is contained in:
@@ -181,7 +181,7 @@ class DatabaseConfig extends BaseConfig {
|
||||
/*
|
||||
* Load the config table from a database
|
||||
*/
|
||||
public function DatabaseConfig(Database $database) {
|
||||
public function __construct(Database $database) {
|
||||
$this->database = $database;
|
||||
|
||||
$cached = $this->database->cache->get("config");
|
||||
|
@@ -5,7 +5,7 @@ class Querylet {
|
||||
var $sql;
|
||||
var $variables;
|
||||
|
||||
public function Querylet($sql, $variables=array()) {
|
||||
public function __construct($sql, $variables=array()) {
|
||||
$this->sql = $sql;
|
||||
$this->variables = $variables;
|
||||
}
|
||||
@@ -28,7 +28,7 @@ class TagQuerylet {
|
||||
var $tag;
|
||||
var $positive;
|
||||
|
||||
public function TagQuerylet($tag, $positive) {
|
||||
public function __construct($tag, $positive) {
|
||||
$this->tag = $tag;
|
||||
$this->positive = $positive;
|
||||
}
|
||||
@@ -37,7 +37,7 @@ class ImgQuerylet {
|
||||
var $qlet;
|
||||
var $positive;
|
||||
|
||||
public function ImgQuerylet($qlet, $positive) {
|
||||
public function __construct($qlet, $positive) {
|
||||
$this->qlet = $qlet;
|
||||
$this->positive = $positive;
|
||||
}
|
||||
@@ -290,7 +290,7 @@ class Database {
|
||||
* need it. There are some pages where all the data is in cache, so the
|
||||
* DB connection is on-demand.
|
||||
*/
|
||||
public function Database() {
|
||||
public function __construct() {
|
||||
$this->connect_cache();
|
||||
}
|
||||
|
||||
|
@@ -49,7 +49,7 @@ class Image {
|
||||
* One will very rarely construct an image directly, more common
|
||||
* would be to use Image::by_id, Image::by_hash, etc
|
||||
*/
|
||||
public function Image($row=null) {
|
||||
public function __construct($row=null) {
|
||||
if(!is_null($row)) {
|
||||
foreach($row as $name => $value) {
|
||||
// some databases use table.name rather than name
|
||||
|
@@ -30,7 +30,7 @@ class User {
|
||||
* One will very rarely construct a user directly, more common
|
||||
* would be to use User::by_id, User::by_session, etc
|
||||
*/
|
||||
public function User($row) {
|
||||
public function __construct($row) {
|
||||
global $_user_classes;
|
||||
|
||||
$this->id = int_escape($row['id']);
|
||||
|
Reference in New Issue
Block a user