Add target parameter to index.php to allow direct jump to any script.
This commit is contained in:
@@ -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
|
||||
|
@@ -2730,9 +2730,10 @@ 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&table=table. If you
|
||||
want http://server/phpMyAdmin/database/table URLs, you need to do some
|
||||
configuration. Following lines apply only for <a
|
||||
http://server/phpMyAdmin/index.php?db=database&table=table&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
|
||||
@@ -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&table=$2&target=$3 [R]
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([a-z_]+\.php)$ index.php?db=$1&target=$2 [R]
|
||||
RewriteRule ^([a-zA-Z0-9_]+)/([a-zA-Z0-9_]+)$ index.php?db=$1&table=$2 [R]
|
||||
RewriteRule ^([a-zA-Z0-9_]+)$ index.php?db=$1 [R]
|
||||
</pre>
|
||||
|
@@ -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];
|
||||
|
Reference in New Issue
Block a user