Translated using Weblate (Slovenian)
[phpmyadmin.git] / libraries / server_common.inc.php
blob1b69ba3808eefe730ec56e2c88d6b8fa1e1a760b
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * Shared code for server pages
6 * @package PhpMyAdmin
7 */
8 if (! defined('PHPMYADMIN')) {
9 exit;
12 /**
13 * Handles some variables that may have been sent by the calling script
14 * Note: this can be called also from the db panel to get the privileges of
15 * a db, in which case we want to keep displaying the tabs of
16 * the Database panel
18 if (empty($viewing_mode)) {
19 $db = $table = '';
22 /**
23 * Set parameters for links
25 $GLOBALS['url_query'] = PMA_URL_getCommon(array('db' => $db));
27 /**
28 * Defines the urls to return to in case of error in a sql statement
30 $err_url = 'index.php' . $GLOBALS['url_query'];
32 /**
33 * @global boolean Checks for superuser privileges
35 $GLOBALS['is_superuser'] = $GLOBALS['dbi']->isSuperuser();
36 $GLOBALS['is_grantuser'] = $GLOBALS['dbi']->isUserType('grant');
37 $GLOBALS['is_createuser'] = $GLOBALS['dbi']->isUserType('create');
39 // now, select the mysql db
40 if ($GLOBALS['is_superuser'] && ! PMA_DRIZZLE) {
41 $GLOBALS['dbi']->selectDb('mysql', $GLOBALS['userlink']);
44 PMA_Util::checkParameters(
45 array('is_superuser', 'url_query'), false
48 /**
49 * shared functions for server page
51 require_once './libraries/server_common.lib.php';