Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/phpmyadmin/phpmyadmin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Foellmann <foellmann@foe-services.de>2014-04-05 17:35:38 +0400
committerChristian Foellmann <foellmann@foe-services.de>2014-04-05 17:35:38 +0400
commit9eb27ef6ebc763ddc6f6278462b8ffeed6de0e36 (patch)
treed3b4a1c7ae68cafb05b9d60040c9c22d457cee62 /libraries/server_common.inc.php
parentd472216554769ba596795f23a70c1809fa8897a3 (diff)
INIT phpmyadmin 4.1.12 multilanguage
Diffstat (limited to 'libraries/server_common.inc.php')
-rw-r--r--libraries/server_common.inc.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/libraries/server_common.inc.php b/libraries/server_common.inc.php
new file mode 100644
index 0000000000..19f3845321
--- /dev/null
+++ b/libraries/server_common.inc.php
@@ -0,0 +1,51 @@
+<?php
+/* vim: set expandtab sw=4 ts=4 sts=4: */
+/**
+ * Shared code for server pages
+ *
+ * @package PhpMyAdmin
+ */
+if (! defined('PHPMYADMIN')) {
+ exit;
+}
+
+/**
+ * Handles some variables that may have been sent by the calling script
+ * Note: this can be called also from the db panel to get the privileges of
+ * a db, in which case we want to keep displaying the tabs of
+ * the Database panel
+ */
+if (empty($viewing_mode)) {
+ $db = $table = '';
+}
+
+/**
+ * Set parameters for links
+ */
+$url_query = PMA_URL_getCommon($db);
+
+/**
+ * Defines the urls to return to in case of error in a sql statement
+ */
+$err_url = 'index.php' . $url_query;
+
+/**
+ * @global boolean Checks for superuser privileges
+ */
+$is_superuser = $GLOBALS['dbi']->isSuperuser();
+
+// now, select the mysql db
+if ($is_superuser && ! PMA_DRIZZLE) {
+ $GLOBALS['dbi']->selectDb('mysql', $userlink);
+}
+
+PMA_Util::checkParameters(
+ array('is_superuser', 'url_query'), false
+);
+
+/**
+ * shared functions for server page
+ */
+require_once './libraries/server_common.lib.php';
+
+?>