1
0
mirror of https://github.com/vrana/adminer.git synced 2025-08-11 17:14:07 +02:00

uses PHP 5 constructors

This commit is contained in:
David Grudl
2015-08-15 17:04:21 +02:00
committed by Jakub Vrana
parent d1aa3542ae
commit a6ebd4a3e0
25 changed files with 36 additions and 36 deletions

View File

@@ -12,7 +12,7 @@ class AdminerDatabaseHide {
/**
* @param array case insensitive database names in values
*/
function AdminerDatabaseHide($disabled) {
function __construct($disabled) {
$this->disabled = array_map('strtolower', $disabled);
}

View File

@@ -16,7 +16,7 @@ class AdminerEditCalendar {
* @param string text to append before first calendar usage
* @param string path to language file, %s stands for language code
*/
function AdminerEditCalendar($prepend = "<script type='text/javascript' src='jquery-ui/jquery.js'></script>\n<script type='text/javascript' src='jquery-ui/jquery-ui.js'></script>\n<script type='text/javascript' src='jquery-ui/jquery-ui-timepicker-addon.js'></script>\n<link rel='stylesheet' type='text/css' href='jquery-ui/jquery-ui.css'>\n", $langPath = "jquery-ui/i18n/jquery.ui.datepicker-%s.js") {
function __construct($prepend = "<script type='text/javascript' src='jquery-ui/jquery.js'></script>\n<script type='text/javascript' src='jquery-ui/jquery-ui.js'></script>\n<script type='text/javascript' src='jquery-ui/jquery-ui-timepicker-addon.js'></script>\n<link rel='stylesheet' type='text/css' href='jquery-ui/jquery-ui.css'>\n", $langPath = "jquery-ui/i18n/jquery.ui.datepicker-%s.js") {
$this->prepend = $prepend;
$this->langPath = $langPath;
}

View File

@@ -9,7 +9,7 @@
class AdminerEditForeign {
var $_limit;
function AdminerEditForeign($limit = 0) {
function __construct($limit = 0) {
$this->_limit = $limit;
}

View File

@@ -17,7 +17,7 @@ class AdminerEmailTable {
* @param string quoted column name
* @param string quoted column name
*/
function AdminerEmailTable($table = "email", $id = "id", $title = "subject", $subject = "subject", $message = "message") {
function __construct($table = "email", $id = "id", $title = "subject", $subject = "subject", $message = "message") {
$this->table = $table;
$this->id = $id;
$this->title = $title;

View File

@@ -16,7 +16,7 @@ class AdminerFileUpload {
* @param string prefix for displaying data, null stands for $uploadPath
* @param string regular expression with allowed file extensions
*/
function AdminerFileUpload($uploadPath = "../static/data/", $displayPath = null, $extensions = "[a-zA-Z0-9]+") {
function __construct($uploadPath = "../static/data/", $displayPath = null, $extensions = "[a-zA-Z0-9]+") {
$this->uploadPath = $uploadPath;
$this->displayPath = ($displayPath !== null ? $displayPath : $uploadPath);
$this->extensions = $extensions;

View File

@@ -13,7 +13,7 @@ class AdminerFrames {
/**
* @param bool allow running from the same origin only
*/
function AdminerFrames($sameOrigin = false) {
function __construct($sameOrigin = false) {
$this->sameOrigin = $sameOrigin;
}

View File

@@ -14,7 +14,7 @@ class AdminerLoginServers {
* @param array array($domain) or array($domain => $description) or array($category => array())
* @param string
*/
function AdminerLoginServers($servers, $driver = "server") {
function __construct($servers, $driver = "server") {
$this->servers = $servers;
$this->driver = $driver;
}

View File

@@ -22,7 +22,7 @@ class AdminerLoginTable {
/** Set database of login table
* @param string
*/
function AdminerLoginTable($database) {
function __construct($database) {
$this->database = $database;
}

View File

@@ -12,7 +12,7 @@ class AdminerMasterSlave {
/**
* @param array ($slave => $master)
*/
function AdminerMasterSlave($masters) {
function __construct($masters) {
$this->masters = $masters;
}

View File

@@ -20,7 +20,7 @@ class AdminerPlugin extends Adminer {
/** Register plugins
* @param array object instances or null to register all classes starting by 'Adminer'
*/
function AdminerPlugin($plugins) {
function __construct($plugins) {
if ($plugins === null) {
$plugins = array();
foreach (get_declared_classes() as $class) {

View File

@@ -14,7 +14,7 @@ class AdminerSlugify {
* @param string find these characters ...
* @param string ... and replace them by these
*/
function AdminerSlugify($from = 'áčďéěíňóřšťúůýž', $to = 'acdeeinorstuuyz') {
function __construct($from = 'áčďéěíňóřšťúůýž', $to = 'acdeeinorstuuyz') {
$this->from = $from;
$this->to = $to;
}

View File

@@ -13,7 +13,7 @@ class AdminerSqlLog {
/**
* @param string defaults to "$database.sql"
*/
function AdminerSqlLog($filename = "") {
function __construct($filename = "") {
$this->filename = $filename;
}

View File

@@ -14,7 +14,7 @@ class AdminerTinymce {
/**
* @param string
*/
function AdminerTinymce($path = "tiny_mce/tiny_mce.js") {
function __construct($path = "tiny_mce/tiny_mce.js") {
$this->path = $path;
}

View File

@@ -15,7 +15,7 @@ class AdminerWymeditor {
* @param array
* @param string in format "skin: 'custom', preInit: function () { }"
*/
function AdminerWymeditor($scripts = array("jquery/jquery.js", "wymeditor/jquery.wymeditor.min.js"), $options = "") {
function __construct($scripts = array("jquery/jquery.js", "wymeditor/jquery.wymeditor.min.js"), $options = "") {
$this->scripts = $scripts;
$this->options = $options;
}