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.
|
* Documentation.html: Recommend disabling access to libraries folder.
|
||||||
* libraries/display_export.lib.php, lang/*: Better description for
|
* libraries/display_export.lib.php, lang/*: Better description for
|
||||||
filename format (RFE #1362423).
|
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>
|
2005-11-22 Sebastian Mendel <cybot_tm@users.sourceforge.net>
|
||||||
* added test/theme.php: for testing themes
|
* added test/theme.php: for testing themes
|
||||||
|
@@ -2730,10 +2730,11 @@ To create a new, empty mimetype please see libraries/transformations/template_ge
|
|||||||
</h4>
|
</h4>
|
||||||
<p>
|
<p>
|
||||||
Yes. Out of the box, you can use URLs like
|
Yes. Out of the box, you can use URLs like
|
||||||
http://server/phpMyAdmin/index.php?db=database&table=table. If you
|
http://server/phpMyAdmin/index.php?db=database&table=table&target=script.
|
||||||
want http://server/phpMyAdmin/database/table URLs, you need to do some
|
Table and script parts are optional. If you want
|
||||||
configuration. Following lines apply only for <a
|
http://server/phpMyAdmin/database[/table][/script] URLs, you need to do
|
||||||
href="http://httpd.apache.org">Apache</a> web server. First make sure,
|
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
|
that you have enabled some features within global configuration. You need
|
||||||
<code>Options FollowSymLinks</code> and <code>AllowOverride
|
<code>Options FollowSymLinks</code> and <code>AllowOverride
|
||||||
FileInfo</code> enabled for directory where phpMyAdmin is installed and
|
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>
|
<pre>
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteBase /path_to_phpMyAdmin
|
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_]+)/([a-zA-Z0-9_]+)$ index.php?db=$1&table=$2 [R]
|
||||||
RewriteRule ^([a-zA-Z0-9_]+)$ index.php?db=$1 [R]
|
RewriteRule ^([a-zA-Z0-9_]+)$ index.php?db=$1 [R]
|
||||||
</pre>
|
</pre>
|
||||||
|
@@ -112,6 +112,10 @@ if ( empty( $GLOBALS['db'] ) ) {
|
|||||||
$main_target = $GLOBALS['cfg']['DefaultTabTable'];
|
$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;
|
$main_target .= '?' . $url_query;
|
||||||
|
|
||||||
$lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][2];
|
$lang_iso_code = $GLOBALS['available_languages'][$GLOBALS['lang']][2];
|
||||||
|
Reference in New Issue
Block a user