-
+ |
' . "\n" . ' $sql .= "';
- }else{
- if($cfg['UseSyntaxColoring'] == FALSE){
- $new_line = " \n";
- }
+ } else if ($cfg['UseSyntaxColoring'] == FALSE) {
+ $new_line = ' ' . "\n";
}
- if(isset($new_line)){
- $query_base = htmlspecialchars($GLOBALS['sql_query']);
- $query_base = ereg_replace("((\015\012)|(\015)|(\012))+", $new_line, $query_base);
- }else{
- $query_base = $GLOBALS['sql_query'];
+ if (isset($new_line)) {
+ $query_base = htmlspecialchars($GLOBALS['sql_query']);
+ $query_base = ereg_replace("((\015\012)|(\015)|(\012))+", $new_line, $query_base);
+ } else {
+ $query_base = $GLOBALS['sql_query'];
}
if (!empty($GLOBALS['show_as_php'])) {
$query_base = '$sql = "' . $query_base;
- } else {
- if($cfg['UseSyntaxColoring']) {
- $query_base = PMA_format_sql($query_base);
- }
+ } else if ($cfg['UseSyntaxColoring']) {
+ $query_base = PMA_format_sql($query_base);
}
// Prepares links that may be displayed to edit/explain the query
@@ -1183,7 +1195,7 @@ if (typeof(document.getElementById) != 'undefined'
if (!eregi('^EXPLAIN[[:space:]]+', $GLOBALS['sql_query'])) {
$explain_link = '[' . $GLOBALS['strExplain'] . '] ';
+ . '&sql_query=' . urlencode('EXPLAIN ' . $GLOBALS['sql_query']) . '">' . $GLOBALS['strExplain'] . '] ';
} else {
$explain_link = '';
}
@@ -1358,34 +1370,47 @@ if (typeof(document.getElementById) != 'undefined'
return strftime($date, $timestamp);
} // end of the 'PMA_localisedDate()' function
+
/**
* Prints out a tab for tabbed navigation.
* If the variables $link and $args ar left empty, an inactive tab is created
*
- * @param $text the text to be displayed as link
- * @param $link main link file, e.g. "test.php3"
- * @param $args link arguments
+ * @param string the text to be displayed as link
+ * @param string main link file, e.g. "test.php3"
+ * @param string link arguments
+ * @param string link attributes
*
* @return string two table cells, the first beeing a separator, the second the tab itself
*
* @access public
*/
- function printTab($text,$link,$args="",$attr="") {
+ function PMA_printTab($text, $link, $args = '', $attr = '') {
global $PHP_SELF;
global $db_details_links_count_tabs;
- $bgcolor = (basename($PHP_SELF) == $link) ? "silver" : "#DFDFDF";
+ $bgcolor = (basename($PHP_SELF) == $link) ? 'silver' : '#DFDFDF';
$db_details_links_count_tabs++;
+ if (!empty($attr)) {
+ $attr = ' ' . $attr;
+ }
+
+ $out = "\n" . ' '
+ . ' | '
+ . "\n" . ' ';
+ if (strlen($link) > 0) {
+ $out .= ''
+ . '' . $text . '';
+ } else {
+ $out .= '' . $text . '';
+ }
+ $out .= "\n" . ' '
+ . ' | '
+ . "\n" . ' '
+ . ' | ';
- $out = "\n\t\t";
- if (strlen($link)>0)
- $out .= "$text";
- else
- $out .= "$text";
- $out .= " | ";
- $out .= "\n\t\t | ";
return $out;
- }
+ } // end of the 'PMA_printTab()' function
+
// Kanji encoding convert feature appended by Y.Kawada (2002/2/20)
diff --git a/libraries/grab_globals.lib.php3 b/libraries/grab_globals.lib.php3
index bbbf522bd..3792e014a 100644
--- a/libraries/grab_globals.lib.php3
+++ b/libraries/grab_globals.lib.php3
@@ -5,7 +5,7 @@
/**
* This library grabs the names and values of the variables sent or posted to a
* script in the '$HTTP_*_VARS' arrays and sets simple globals variables from
- * them
+ * them. It does the same work for the $PHP_SELF variable.
*
* loic1 - 2001/25/11: use the new globals arrays defined with php 4.1+
*/
@@ -34,5 +34,11 @@ if (!defined('PMA_GRAB_GLOBALS_INCLUDED')) {
}
} // end if
+ if (!empty($_SERVER) && isset($_SERVER['PHP_SELF'])) {
+ $PHP_SELF = $_SERVER['PHP_SELF'];
+ } else if (!empty($HTTP_SERVER_VARS) && isset($HTTP_SERVER_VARS['PHP_SELF'])) {
+ $PHP_SELF = $HTTP_SERVER_VARS['PHP_SELF'];
+ } // end if
+
} // $__PMA_GRAB_GLOBALS_LIB__
?>
\ No newline at end of file
diff --git a/main.php3 b/main.php3
index 4b1ee0cc4..cbc1ddec6 100755
--- a/main.php3
+++ b/main.php3
@@ -251,7 +251,7 @@ if ($server > 0) {
$db_to_create = '';
}
- $common_url_query = 'lang=' . $lang . '&server=' . $server . '&convcharset=' . $convcharset;
+ $common_url_query = 'lang=' . $lang . '&convcharset=' . $convcharset . '&server=' . $server;
if ($is_superuser) {
$cfg['ShowMysqlInfo'] = TRUE;
@@ -446,8 +446,8 @@ if (empty($cfg['Lang'])) {
 |
|