Translated using Weblate (Romanian)
[phpmyadmin.git] / libraries / tbl_common.inc.php
blob8d4e48dc19b69b95ef46d6b786525e1996e6875b
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Common includes for the table level views
6 * @package PhpMyAdmin
7 */
8 declare(strict_types=1);
10 use PhpMyAdmin\Url;
12 if (! defined('PHPMYADMIN')) {
13 exit;
16 global $db, $table;
18 // Check parameters
19 PhpMyAdmin\Util::checkParameters(['db', 'table']);
21 $db_is_system_schema = $GLOBALS['dbi']->isSystemSchema($db);
23 /**
24 * Set parameters for links
25 * @deprecated
27 $url_query = Url::getCommon(['db' => $db, 'table' => $table]);
29 /**
30 * Set parameters for links
32 $url_params = [];
33 $url_params['db'] = $db;
34 $url_params['table'] = $table;
36 /**
37 * Defines the urls to return to in case of error in a sql statement
39 $err_url_0 = PhpMyAdmin\Util::getScriptNameForOption(
40 $GLOBALS['cfg']['DefaultTabDatabase'],
41 'database'
43 . Url::getCommon(['db' => $db]);
45 $err_url = PhpMyAdmin\Util::getScriptNameForOption(
46 $GLOBALS['cfg']['DefaultTabTable'],
47 'table'
49 . Url::getCommon($url_params);
52 /**
53 * Ensures the database and the table exist (else move to the "parent" script)
54 * Skip test if we are exporting as we can't tell whether a table name is an alias (which would fail the test).
56 if (basename($_SERVER['PHP_SELF']) != 'tbl_export.php') {
57 require_once ROOT_PATH . 'libraries/db_table_exists.inc.php';