rfe #2726479 [core] configurable maximal length of URL

This commit is contained in:
Michal Čihař
2009-06-02 11:08:16 +00:00
parent 5d6af24268
commit 4a2bff1aed
4 changed files with 17 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ $HeadURL: https://phpmyadmin.svn.sourceforge.net/svnroot/phpmyadmin/trunk/phpMyA
+ patch #2794819 [navi] Filter for displayed table names,
thanks to Michael Valushko - dylfin
- bug #2794840 [core] Cannot redeclare pma_tableheader()
- rfe #2726479 [core] configurable maximal length of URL
3.2.1.0 (not yet released)
- bug #2799009 Login with ipv6 IP address breaks redirect

View File

@@ -1616,6 +1616,14 @@ $cfg['TrustedProxies'] =
a sysadmin would set this parameter to <tt>FALSE</tt>. Default is <tt>TRUE</tt>.
</dd>
<dt id="cfg_LinkLengthLimit">$cfg['LinkLengthLimit'] integer</dt>
<dd>
Limit for length of URL in links. When length would be above this limit, it
is replaced by form with button.
This is required as some web servers (IIS) have problems with long URLs.
Default is <code>1000</code>.
</dd>
<dt id="cfg_NaviWidth">$cfg['NaviWidth'] integer</dt>
<dd>Navi frame width in pixels. See <tt>themes/themename/layout.inc.php</tt>.
</dd>

View File

@@ -1668,8 +1668,7 @@ function PMA_linkOrButton($url, $message, $tag_params = array(),
$tag_params_strings[] = $par_name . '="' . $par_value . '"';
}
// previously the limit was set to 2047, it seems 1000 is better
if (strlen($url) <= 1000) {
if (strlen($url) <= $GLOBALS['cfg']['LinkLengthLimit']) {
// no whitespace within an <a> else Safari will make it part of the link
$ret = "\n" . '<a href="' . $url . '" '
. implode(' ', $tag_params_strings) . '>'

View File

@@ -2335,6 +2335,13 @@ $cfg['TrustedProxies'] = array();
*/
$cfg['CheckConfigurationPermissions'] = true;
/**
* Limit for length of URL in links. When length would be above this limit, it
* is replaced by form with button.
* This is required as some web servers (IIS) have problems with long URLs.
*/
$cfg['LinkLengthLimit'] = 1000;
/*******************************************************************************
* SQL Parser Settings
*