default tab selection stuff:
* Documentation.html: docs about $cfg['DefaultTabDatabase'] and $cfg['DefaultTabTable'] * config.inc.php3, index.php3, left.php3, libraries/common.lib.php3: default tab selection is now customizable from config.inc.php3.
This commit is contained in:
@@ -5,6 +5,12 @@ phpMyAdmin - Changelog
|
||||
$Id$
|
||||
$Source$
|
||||
|
||||
2002-06-29 Olivier L. M<>ller <om@omnis.ch>
|
||||
* Documentation.html: docs about $cfg['DefaultTabDatabase']
|
||||
and $cfg['DefaultTabTable']
|
||||
* config.inc.php3, index.php3, left.php3, libraries/common.lib.php3:
|
||||
default tab selection is now customizable from config.inc.php3.
|
||||
|
||||
2002-06-28 Olivier L. M<>ller <om@omnis.ch>
|
||||
* ANNOUNCE.txt: preparing 2.3.0 announcement... Feel free
|
||||
to improve and check
|
||||
|
@@ -1058,6 +1058,22 @@ $cfg['PmaAbsoluteUri'] = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://'
|
||||
<br /><br />
|
||||
</dd>
|
||||
|
||||
<dt><b>$cfg['DefaultTabDatabase'] </b>string</dt>
|
||||
<dd>
|
||||
Defines the Tab displayed by default on database view. Possible
|
||||
values: 'db_details_structure.php3', 'db_details.php3', or
|
||||
'db_search.php3'.
|
||||
<br /><br />
|
||||
</dd>
|
||||
|
||||
<dt><b>$cfg['DefaultTabTable'] </b>string</dt>
|
||||
<dd>
|
||||
Defines the Tab displayed by default on table view. Possible
|
||||
values: 'tbl_properties_structure.php3', 'tbl_properties.php3',
|
||||
'tbl_select.php3', 'tbl_change.php3'.
|
||||
<br /><br />
|
||||
</dd>
|
||||
|
||||
<dt><b>$cfg['ManualBaseShort']</b> string</dt>
|
||||
<dd>
|
||||
If set to an URL which points to the MySQL documentation (on short
|
||||
|
@@ -184,11 +184,20 @@ $cfg['GZipDump'] = TRUE; // compression for
|
||||
$cfg['BZipDump'] = TRUE; // dump files
|
||||
|
||||
|
||||
// Default Tabs settings
|
||||
// Default Tabs display settings
|
||||
|
||||
$cfg['DefaultTabTable'] = 'Structure'; // not active yet
|
||||
$cfg['DefaultTabDatabase'] = 'Structure'; // not active yet
|
||||
//$cfg['DefaultTabDatabase'] = 'db_details_structure.php3';
|
||||
// Possible values:
|
||||
// 'db_details_structure.php3' = tables list
|
||||
// 'db_details.php3' = sql form
|
||||
// 'db_search.php3' = search query
|
||||
|
||||
//$cfg['DefaultTabTable'] = 'tbl_properties_structure.php3';
|
||||
// Possible values:
|
||||
// 'tbl_properties_structure.php3' = fields list
|
||||
// 'tbl_properties.php3' = sql form
|
||||
// 'tbl_select.php3 = select page
|
||||
// 'tbl_change.php3 = insert row page
|
||||
|
||||
/**
|
||||
* Link to the official MySQL documentation
|
||||
|
@@ -59,7 +59,7 @@ body {font-family: <?php echo $right_font_family; ?>; font-size: <?php echo $fo
|
||||
|
||||
<frameset cols="<?php echo $cfg['LeftWidth']; ?>,*" rows="*">
|
||||
<frame src="left.php3?<?php echo $url_query; ?>" name="nav" frameborder="1" />
|
||||
<frame src="<?php echo (empty($db)) ? 'main.php3' : 'db_details_structure.php3'; ?>?<?php echo $url_query; ?>" name="phpmain" />
|
||||
<frame src="<?php echo (empty($db)) ? 'main.php3' : $cfg['DefaultTabDatabase']; ?>?<?php echo $url_query; ?>" name="phpmain" />
|
||||
|
||||
<noframes>
|
||||
<body bgcolor="#FFFFFF">
|
||||
|
22
left.php3
22
left.php3
@@ -242,7 +242,7 @@ if ($num_dbs > 1) {
|
||||
if (!empty($num_tables)) {
|
||||
echo "\n";
|
||||
?>
|
||||
<nobr><a class="item" href="db_details_structure.php3?<?php echo $common_url_query; ?>" onclick="if (capable) {expandBase('el<?php echo $j; ?>', true); return false} else {return true}">
|
||||
<nobr><a class="item" href="<?php echo $cfg['DefaultTabDatabase']; ?>?<?php echo $common_url_query; ?>" onclick="if (capable) {expandBase('el<?php echo $j; ?>', true); return false} else {return true}">
|
||||
<img name="imEx" id="el<?php echo $j; ?>Img" src="images/plus.gif" border="0" width="9" height="9" alt="+" /></a>
|
||||
<?php
|
||||
} else {
|
||||
@@ -253,7 +253,7 @@ if ($num_dbs > 1) {
|
||||
}
|
||||
echo "\n";
|
||||
?>
|
||||
<a class="item" href="db_details_structure.php3?<?php echo $common_url_query; ?>" onclick="if (capable) {expandBase('el<?php echo $j; ?>', false)}">
|
||||
<a class="item" href="<?php echo $cfg['DefaultTabDatabase']; ?>?<?php echo $common_url_query; ?>" onclick="if (capable) {expandBase('el<?php echo $j; ?>', false)}">
|
||||
<span class="heada"><?php echo $db; ?><bdo dir="<?php echo($text_dir); ?>"> </bdo></span><span class="headaCnt">(<?php echo $num_tables_disp; ?>)</span></a></nobr>
|
||||
</div>
|
||||
|
||||
@@ -269,9 +269,9 @@ if ($num_dbs > 1) {
|
||||
echo "\n";
|
||||
?>
|
||||
<nobr><img src="images/spacer.gif" border="0" width="9" height="9" alt="" />
|
||||
<a target="phpmain" href="sql.php3?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&pos=0&goto=tbl_properties_structure.php3">
|
||||
<a target="phpmain" href="sql.php3?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&pos=0&goto=<?php echo $cfg['DefaultTabTable']; ?>">
|
||||
<img src="images/browse.gif" width="8" height="8" border="0" alt="<?php echo "$strBrowse: $table"; ?>" title="<?php echo "$strBrowse: $table"; ?>" /></a><bdo dir="<?php echo $text_dir; ?>"> </bdo>
|
||||
<a class="tblItem" id="<?php echo md5($table); ?>" title="<?php echo $url_title; ?>" target="phpmain" href="tbl_properties_structure.php3?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>">
|
||||
<a class="tblItem" id="<?php echo md5($table); ?>" title="<?php echo $url_title; ?>" target="phpmain" href="<?php echo $cfg['DefaultTabTable']; ?>?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>">
|
||||
<?php echo $table; ?></a></nobr><br />
|
||||
<?php
|
||||
} // end for $t (tables list)
|
||||
@@ -296,12 +296,12 @@ if ($num_dbs > 1) {
|
||||
$url_title = (!empty($tooltip) && isset($tooltip[$table]))
|
||||
? str_replace('"', '"', $tooltip[$table])
|
||||
: '';
|
||||
$table_list .= ' <nobr><a target="phpmain" href="sql.php3?' . $common_url_query . '&table=' . urlencode($table) . '&sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($table)) . '&pos=0&goto=tbl_properties_structure.php3">' . "\n";
|
||||
$table_list .= ' <nobr><a target="phpmain" href="sql.php3?' . $common_url_query . '&table=' . urlencode($table) . '&sql_query=' . urlencode('SELECT * FROM ' . PMA_backquote($table)) . '&pos=0&goto=' . $cfg['DefaultTabTable'] . '">' . "\n";
|
||||
$table_list .= ' <img src="images/browse.gif" width="8" height="8" border="0" alt="' . $strBrowse . ': ' . $table . '" title="' . $strBrowse . ': ' . $table . '" /></a><bdo dir="' . $text_dir . '"> </bdo>' . "\n";
|
||||
if (PMA_USR_BROWSER_AGENT == 'IE') {
|
||||
$table_list .= ' <span class="tblItem"><a class="tblItem" id="' . md5($table) . '" title="' . $url_title . '" target="phpmain" href="tbl_properties_structure.php3?' . $common_url_query . '&table=' . urlencode($table) . '">' . $table . '</a></span></nobr><br />' . "\n";
|
||||
$table_list .= ' <span class="tblItem"><a class="tblItem" id="' . md5($table) . '" title="' . $url_title . '" target="phpmain" href="' . $cfg['DefaultTabTable'] . '?' . $common_url_query . '&table=' . urlencode($table) . '">' . $table . '</a></span></nobr><br />' . "\n";
|
||||
} else {
|
||||
$table_list .= ' <a class="tblItem" id="' . md5($table) . '" title="' . $url_title . '" target="phpmain" href="tbl_properties_structure.php3?' . $common_url_query . '&table=' . urlencode($table) . '">' . $table . '</a></nobr><br />' . "\n";
|
||||
$table_list .= ' <a class="tblItem" id="' . md5($table) . '" title="' . $url_title . '" target="phpmain" href="' . $cfg['DefaultTabTable'] . '?' . $common_url_query . '&table=' . urlencode($table) . '">' . $table . '</a></nobr><br />' . "\n";
|
||||
}
|
||||
} // end for $t (tables list)
|
||||
|
||||
@@ -311,7 +311,7 @@ if ($num_dbs > 1) {
|
||||
}
|
||||
$selected = ' selected="selected"';
|
||||
|
||||
$table_list_header .= ' <a class="item" target="phpmain" href="db_details_structure.php3?' . $common_url_query . '">' . "\n";
|
||||
$table_list_header .= ' <a class="item" target="phpmain" href="' . $cfg['DefaultTabDatabase'] . '?' . $common_url_query . '">' . "\n";
|
||||
$table_list_header .= ' <span class="heada"><b>' . $db . '</b><bdo dir="' . $text_dir . '"> </bdo></span></a><br />' . "\n\n";
|
||||
} else {
|
||||
$selected = '';
|
||||
@@ -400,7 +400,7 @@ else if ($num_dbs == 1) {
|
||||
echo "\n";
|
||||
?>
|
||||
<div id="el2Parent" class="parent">
|
||||
<nobr><a class="item" href="db_details_structure.php3?<?php echo $common_url_query; ?>">
|
||||
<nobr><a class="item" href="<?php echo $cfg['DefaultTabDatabase']; ?>?<?php echo $common_url_query; ?>">
|
||||
<span class="heada"><?php echo $db; ?><bdo dir="<?php echo($text_dir); ?>"> </bdo></span><span class="headaCnt">(<?php echo $num_tables_disp; ?>)</span></a></nobr>
|
||||
</div>
|
||||
<div id="el2Child" class="child" style="margin-bottom: 5px">
|
||||
@@ -413,9 +413,9 @@ else if ($num_dbs == 1) {
|
||||
: '';
|
||||
echo "\n";
|
||||
?>
|
||||
<nobr><a target="phpmain" href="sql.php3?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&pos=0&goto=tbl_properties_structure.php3">
|
||||
<nobr><a target="phpmain" href="sql.php3?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>&sql_query=<?php echo urlencode('SELECT * FROM ' . PMA_backquote($table)); ?>&pos=0&goto=<?php echo $cfg['DefaultTabTable']; ?>">
|
||||
<img src="images/browse.gif" width="8" height="8" border="0" alt="<?php echo "$strBrowse: $table"; ?>" title="<?php echo "$strBrowse: $table"; ?>" /></a><bdo dir="<?php echo $text_dir; ?>"> </bdo>
|
||||
<a class="tblItem" id="<?php echo md5($table); ?>" title="<?php echo $url_title; ?>" target="phpmain" href="tbl_properties_structure.php3?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>">
|
||||
<a class="tblItem" id="<?php echo md5($table); ?>" title="<?php echo $url_title; ?>" target="phpmain" href="<?php echo $cfg['DefaultTabTable']; ?>?<?php echo $common_url_query; ?>&table=<?php echo urlencode($table); ?>">
|
||||
<?php echo $table; ?></a></nobr><br />
|
||||
<?php
|
||||
} // end for $j (tables list)
|
||||
|
@@ -493,12 +493,6 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
$DisplayPmaAbsoluteUriWarning = 0;
|
||||
|
||||
if (empty($cfg['PmaAbsoluteUri'])) {
|
||||
// if (empty($GLOBALS['is_header_sent'])) {
|
||||
// include('./header.inc.php3');
|
||||
// }
|
||||
// echo '<p class="warning">'. $strPmaUriError . '</p>' . "\n";
|
||||
// include('./footer.inc.php3');
|
||||
// exit();
|
||||
|
||||
$DisplayPmaAbsoluteUriWarning = 1;
|
||||
|
||||
@@ -518,6 +512,20 @@ h1 {font-family: sans-serif; font-size: large; font-weight: bold}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Make sure $cfg['DefaultTabDatabase'] and $cfg['DefaultTabTable'] are set.
|
||||
* Todo: check if it is set to a *valid* value.
|
||||
*/
|
||||
|
||||
if (empty($cfg['DefaultTabDatabase'])) {
|
||||
$cfg['DefaultTabDatabase'] = 'db_details_structure.php3';
|
||||
}
|
||||
|
||||
if (empty($cfg['DefaultTabTable'])) {
|
||||
$cfg['DefaultTabTable'] = 'tbl_properties_structure.php3';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Use mysql_connect() or mysql_pconnect()?
|
||||
*/
|
||||
|
Reference in New Issue
Block a user