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:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@
|
||||
class AdminerEditForeign {
|
||||
var $_limit;
|
||||
|
||||
function AdminerEditForeign($limit = 0) {
|
||||
function __construct($limit = 0) {
|
||||
$this->_limit = $limit;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ class AdminerLoginTable {
|
||||
/** Set database of login table
|
||||
* @param string
|
||||
*/
|
||||
function AdminerLoginTable($database) {
|
||||
function __construct($database) {
|
||||
$this->database = $database;
|
||||
}
|
||||
|
||||
|
@@ -12,7 +12,7 @@ class AdminerMasterSlave {
|
||||
/**
|
||||
* @param array ($slave => $master)
|
||||
*/
|
||||
function AdminerMasterSlave($masters) {
|
||||
function __construct($masters) {
|
||||
$this->masters = $masters;
|
||||
}
|
||||
|
||||
|
@@ -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) {
|
||||
|
@@ -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;
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ class AdminerSqlLog {
|
||||
/**
|
||||
* @param string defaults to "$database.sql"
|
||||
*/
|
||||
function AdminerSqlLog($filename = "") {
|
||||
function __construct($filename = "") {
|
||||
$this->filename = $filename;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user