]> git.joonet.de Git - adminer.git/commitdiff
Plugins: Compatibility with PHP 5
authorJakub Vrana <jakub@vrana.cz>
Tue, 8 Apr 2025 11:14:32 +0000 (13:14 +0200)
committerJakub Vrana <jakub@vrana.cz>
Tue, 8 Apr 2025 11:14:32 +0000 (13:14 +0200)
plugins/email-table.php
plugins/frames.php
plugins/slugify.php
plugins/sql-gemini.php
plugins/sql-log.php
plugins/table-indexes-structure.php
plugins/tinymce.php

index 235fc634e8f802d7f72c1248af82effbee00b42a..2b7625a2da6379ad50e18123679efb653055cf2d 100644 (file)
@@ -16,7 +16,7 @@ class AdminerEmailTable extends Adminer\Plugin {
        * @param string $subject quoted column name
        * @param string $message quoted column name
        */
-       function __construct(string $table = "email", string $id = "id", string $title = "subject", string $subject = "subject", string $message = "message") {
+       function __construct($table = "email", $id = "id", $title = "subject", $subject = "subject", $message = "message") {
                $this->table = $table;
                $this->id = $id;
                $this->title = $title;
index 9251ede2d2a7e01e71d53ef935512a2a36072848..a0d683561e49ee2548638f263f2ec91d3452de01 100644 (file)
@@ -12,7 +12,7 @@ class AdminerFrames extends Adminer\Plugin {
        /**
        * @param bool $sameOrigin allow running from the same origin only
        */
-       function __construct(bool $sameOrigin = false) {
+       function __construct($sameOrigin = false) {
                $this->sameOrigin = $sameOrigin;
        }
 
index a21ff1e5d6d91b24ccde5d84aa01740d1741c74e..526c507c62ede8f6f42f97dff388f43676b9c5f1 100644 (file)
@@ -13,7 +13,7 @@ class AdminerSlugify extends Adminer\Plugin {
        * @param string $from find these characters ...
        * @param string $to ... and replace them by these
        */
-       function __construct(string $from = 'áčďéěíňóřšťúůýž', string $to = 'acdeeinorstuuyz') {
+       function __construct($from = 'áčďéěíňóřšťúůýž', $to = 'acdeeinorstuuyz') {
                $this->from = $from;
                $this->to = $to;
        }
index 7cda540f6298f972e7bddff54b1b700c3ee24feb..2bdd08807fb2407b218fbb4a2fa2b21ad3fa04d9 100644 (file)
@@ -16,7 +16,7 @@ class AdminerSqlGemini extends Adminer\Plugin {
        * @param string $apiKey The default key is shared with all users and may run out of quota; get your own API key at: https://aistudio.google.com/apikey
        * @param string $model Available models: https://ai.google.dev/gemini-api/docs/models#available-models
        */
-       function __construct(string $apiKey = 'AIzaSyDWDbPjmvH9_hphsnY_yJGdue42qRMG3do', string $model = "gemini-2.0-flash") {
+       function __construct($apiKey = 'AIzaSyDWDbPjmvH9_hphsnY_yJGdue42qRMG3do', $model = "gemini-2.0-flash") {
                $this->apiKey = $apiKey;
                $this->model = $model;
        }
index 2b8aedb5bf94990dd75b63384f619d9c3bd6f121..bcaadf79110da519d88f216ae9e954f9e98e1a6b 100644 (file)
@@ -12,7 +12,7 @@ class AdminerSqlLog extends Adminer\Plugin {
        /**
        * @param string $filename defaults to "$database.sql"
        */
-       function __construct(string $filename = "") {
+       function __construct($filename = "") {
                $this->filename = $filename;
        }
 
index 265260ab7763637a27c75f10a146893ef35299ef..528adf108c37a7828eb7ae1185a7b55ae0444228 100644 (file)
@@ -11,7 +11,7 @@ class AdminerTableIndexesStructure extends Adminer\Plugin {
        /** Print table structure in tabular format
        * @param Index[] $indexes data about all indexes on a table
        */
-       function tableIndexesPrint(array $indexes): bool {
+       function tableIndexesPrint($indexes): bool {
                echo "<table>\n";
                echo "<thead><tr><th>" . Adminer\lang('Name') . "<th>" . Adminer\lang('Type') . "<th>" . Adminer\lang('Columns') . "</thead>\n";
                foreach ($indexes as $name => $index) {
index d451d3612742c5797c32c0c099ffe41b0e8fcaa5..02e9600a7ae13e4cfa02e1142075658aaddec6a1 100644 (file)
@@ -10,7 +10,7 @@
 class AdminerTinymce extends Adminer\Plugin {
        protected $path;
 
-       function __construct(string $path = "tiny_mce/tiny_mce.js") {
+       function __construct($path = "tiny_mce/tiny_mce.js") {
                $this->path = $path;
        }