}
/** Headers to send before HTML output
- * @return null
+ * @return void
*/
function headers() {
}
}
/** Print login form
- * @return null
+ * @return void
*/
function loginForm() {
global $drivers;
/** Print links after select heading
* @param TableStatus result of table_status1()
* @param string new item options, NULL for no new item
- * @return null
+ * @return void
*/
function selectLinks($tableStatus, $set = "") {
global $driver;
/** Print backward keys for row
* @param BackwardKey[] result of $this->backwardKeys()
* @param string[]
- * @return null
+ * @return void
*/
function backwardKeysPrint($backwardKeys, $row) {
}
/** Print table structure in tabular format
* @param Field[] data about individual fields
* @param TableStatus
- * @return null
+ * @return void
*/
function tableStructurePrint($fields, $tableStatus = null) {
global $driver;
/** Print list of indexes on table in tabular format
* @param Index[] data about all indexes on a table
- * @return null
+ * @return void
*/
function tableIndexesPrint($indexes) {
echo "<table>\n";
/** Print columns box in select
* @param list<string> result of selectColumnsProcess()[0]
* @param string[] selectable columns
- * @return null
+ * @return void
*/
function selectColumnsPrint($select, $columns) {
global $driver;
* @param list<string> result of selectSearchProcess()
* @param string[] selectable columns
* @param Index[]
- * @return null
+ * @return void
*/
function selectSearchPrint($where, $columns, $indexes) {
print_fieldset("search", lang('Search'), $where);
* @param list<string> result of selectOrderProcess()
* @param string[] selectable columns
* @param Index[]
- * @return null
+ * @return void
*/
function selectOrderPrint($order, $columns, $indexes) {
print_fieldset("sort", lang('Sort'), $order);
/** Print limit box in select
* @param string result of selectLimitProcess()
- * @return null
+ * @return void
*/
function selectLimitPrint($limit) {
echo "<fieldset><legend>" . lang('Limit') . "</legend><div>"; // <div> for easy styling
/** Print text length box in select
* @param string result of selectLengthProcess()
- * @return null
+ * @return void
*/
function selectLengthPrint($text_length) {
if ($text_length !== null) {
/** Print action box in select
* @param Index[]
- * @return null
+ * @return void
*/
function selectActionPrint($indexes) {
echo "<fieldset><legend>" . lang('Action') . "</legend><div>";
/** Print extra text in the end of a select form
* @param string[] fields holding e-mails
* @param string[] selectable columns
- * @return null
+ * @return void
*/
function selectEmailPrint($emailFields, $columns) {
}
* @param array[]
* @param mixed
* @param bool
- * @return null
+ * @return void
*/
function editRowPrint($table, $fields, $row, $update) {
}
/** Export database structure
* @param string
- * @return null prints data
+ * @return void prints data
*/
function dumpDatabase($db) {
}
* @param string
* @param string
* @param int 0 table, 1 view, 2 temporary view table
- * @return null prints data
+ * @return void prints data
*/
function dumpTable($table, $style, $is_view = 0) {
if ($_POST["format"] != "sql") {
* @param string
* @param string
* @param string
- * @return null prints data
+ * @return void prints data
*/
function dumpData($table, $style, $query) {
global $connection;
}
/** Print text after export
- * @return null prints data
+ * @return void prints data
*/
function dumpFooter() {
if ($_POST["format"] == "sql") {
/** Print navigation after Adminer title
* @param string can be "auth" if there is no database connection, "db" if there is no database selected, "ns" with invalid schema
- * @return null
+ * @return void
*/
function navigation($missing) {
global $VERSION, $drivers, $connection;
/** Print databases list in menu
* @param string
- * @return null
+ * @return void
*/
function databasesPrint($missing) {
global $adminer, $connection;
/** Print table list in menu
* @param TableStatus[] result of table_status('', true)
- * @return null
+ * @return void
*/
function tablesPrint($tables) {
echo "<ul id='tables'>" . script("mixin(qs('#tables'), {onmouseover: menuOver, onmouseout: menuOut});");
* @param string
* @param mixed ["key" => "link", "key2" => ["link", "desc"]], null for nothing, false for driver only, true for driver and server
* @param string used after colon in title and heading, should be HTML escaped
-* @return null
+* @return void
*/
function page_header($title, $error = "", $breadcrumb = array(), $title2 = "") {
global $LANG, $VERSION, $adminer, $drivers;
}
/** Send HTTP headers
-* @return null
+* @return void
*/
function page_headers() {
global $adminer;
/** Print flash and error messages
* @param string
-* @return null
+* @return void
*/
function page_messages($error) {
global $adminer;
/** Print HTML footer
* @param string "auth", "db", "ns"
-* @return null
+* @return void
*/
function page_footer($missing = "") {
global $adminer;
/** Add a driver
* @param string
* @param string
-* @return null
+* @return void
*/
function add_driver($id, $name) {
global $drivers;
* @param string or array in which case [0] of every element is used
* @param int
* @param int
-* @return null
+* @return void
*/
function textarea($name, $value, $rows = 10, $cols = 80) {
echo "<textarea name='" . h($name) . "' rows='$rows' cols='$cols' class='sqlarea jush-" . JUSH . "' spellcheck='false' wrap='off'>";
/** Print one row in JSON object
* @param string or "" to close the object
* @param string
-* @return null
+* @return void
*/
function json_row($key, $val = null) {
static $first = true;
* @param list<string>
* @param Field[] returned by referencable_primary()
* @param list<string> extra types to prepend
-* @return null
+* @return void
*/
function edit_type($key, $field, $collations, $foreign_keys = array(), $extra_types = array()) {
global $driver;
* @param list<string>[]
* @param string TABLE or PROCEDURE
* @param Field[] returned by referencable_primary()
-* @return null
+* @return void
*/
function edit_fields($fields, $collations, $type = "TABLE", $foreign_keys = array()) {
global $driver;
* @param string
* @param string
* @param string
-* @return null redirect in success
+* @return void redirect on success
*/
function drop_create($drop, $create, $drop_created, $test, $drop_test, $location, $message_drop, $message_alter, $message_create, $old_name, $new_name) {
if ($_POST["drop"]) {
/** Add a file to TAR
* @param string
* @param TmpFile
-* @return null prints the output
+* @return void prints the output
*/
function tar_file($filename, $tmp_file) {
$return = pack("a100a8a8a8a12a12", $filename, 644, 0, 0, decoct($tmp_file->size), decoct(time()));
/** Print SET NAMES if utf8mb4 might be needed
* @param string
-* @return null
+* @return void
*/
function set_utf8mb4($create) {
global $connection;
/** Disable magic_quotes_gpc
* @param list<array> e.g. (&$_GET, &$_POST, &$_COOKIE)
* @param bool whether to leave values as is
-* @return null modified in place
+* @return void modified in place
*/
function remove_slashes($process, $filter = false) {
if (function_exists("get_magic_quotes_gpc") && get_magic_quotes_gpc()) {
* @param string
* @param string
* @param string
-* @return null
+* @return void
*/
function set_password($vendor, $server, $username, $password) {
$_SESSION["pwds"][$vendor][$server][$username] = ($_COOKIE["adminer_key"] && is_string($password)
* @param string
* @param string
* @param int number of seconds, 0 for session cookie, 2592000 - 30 days
-* @return null
+* @return void
*/
function cookie($name, $value, $lifetime = 2592000) {
global $HTTPS;
/** Store settings to a cookie
* @param mixed[]
* @param string
-* @return null
+* @return void
*/
function save_settings($settings, $cookie = "adminer_settings") {
cookie($cookie, http_build_query($settings + get_settings($cookie)));
}
/** Restart stopped session
-* @return null
+* @return void
*/
function restart_session() {
if (!ini_bool("session.use_cookies") && (!function_exists('session_status') || session_status() == 1)) { // 1 - PHP_SESSION_NONE, session_status() available since PHP 5.4
/** Stop session if possible
* @param bool
-* @return null
+* @return void
*/
function stop_session($force = false) {
$use_cookies = ini_bool("session.use_cookies");
/** Send Location header and exit
* @param string null to only set a message
* @param string
-* @return null
+* @return void
*/
function redirect($location, $message = null) {
if ($message !== null) {
/** Print CSV row
* @param string[]
-* @return null
+* @return void
*/
function dump_csv($row) {
foreach ($row as $key => $val) {
* @param string
* @param string
* @param bool
-* @return null
+* @return void
*/
function print_fieldset($id, $legend, $visible = false) {
echo "<fieldset><legend>";
}
/** Print hidden fields for GET forms
-* @return null
+* @return void
*/
function hidden_fields_get() {
echo (sid() ? input_hidden(session_name(), session_id()) : '');
* @param Field
* @param mixed string|array
* @param string
-* @return null
+* @return string
*/
function enum_input($type, $attrs, $field, $value, $empty = null) {
global $adminer;
* @param mixed
* @param string
* @param bool
-* @return null
+* @return void
*/
function input($field, $value, $function, $autofocus = false) {
global $driver, $adminer;
/** Print results of search in all tables
* @uses $_GET["where"][0]
* @uses $_POST["tables"]
-* @return null
+* @return void
*/
function search_tables() {
global $adminer, $connection;
* @param Field[]
* @param mixed
* @param bool
-* @return null
+* @return void
*/
function edit_form($table, $fields, $row, $update) {
global $adminer, $error;