Add target parameter to index.php to allow direct jump to any script.

This commit is contained in:
Michal Čihař
2005-11-23 20:30:56 +00:00
parent f9293a28b3
commit f370db5942
3 changed files with 13 additions and 4 deletions

View File

@@ -67,6 +67,8 @@ $Source$
* Documentation.html: Recommend disabling access to libraries folder.
* libraries/display_export.lib.php, lang/*: Better description for
filename format (RFE #1362423).
* Documentation.html, index.php: Add target parameter to index.php to
allow direct jump to any script.
2005-11-22 Sebastian Mendel <cybot_tm@users.sourceforge.net>
* added test/theme.php: for testing themes

View File

@@ -2730,10 +2730,11 @@ To create a new, empty mimetype please see libraries/transformations/template_ge
</h4>
<p>
Yes. Out of the box, you can use URLs like
http://server/phpMyAdmin/index.php?db=database&amp;table=table. If you
want http://server/phpMyAdmin/database/table URLs, you need to do some
configuration. Following lines apply only for <a
href="http://httpd.apache.org">Apache</a> web server. First make sure,
http://server/phpMyAdmin/index.php?db=database&amp;table=table&amp;target=script.
Table and script parts are optional. If you want
http://server/phpMyAdmin/database[/table][/script] URLs, you need to do
some configuration. Following lines apply only for <a
href="http://httpd.apache.org">Apache</a> web server. First make sure,
that you have enabled some features within global configuration. You need
<code>Options FollowSymLinks</code> and <code>AllowOverride
FileInfo</code> enabled for directory where phpMyAdmin is installed and
@@ -2745,6 +2746,8 @@ To create a new, empty mimetype please see libraries/transformations/template_ge
<pre>
RewriteEngine On
RewriteBase /path_to_phpMyAdmin
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&amp;table=$2&amp;target=$3 [R]
RewriteRule ^([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&amp;target=$2 [R]
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ index.php?db=$1&amp;table=$2 [R]
RewriteRule ^([a-zA-Z0-9_]+)$ index.php?db=$1 [R]
</pre>

View File

@@ -112,6 +112,10 @@ if ( empty( $GLOBALS['db'] ) ) {
$main_target = $GLOBALS['cfg']['DefaultTabTable'];
}
if (!empty($GLOBALS['target']) && preg_match('@[a-z_]+\.php@', $GLOBALS['target']) && $GLOBALS['target'] != 'index.php') {
$main_target = $GLOBALS['target'];
}
$main_target .= '?' . $url_query;
$lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][2];