Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
47db210d07
@ -1349,7 +1349,15 @@ CREATE DATABASE,ALTER DATABASE,DROP DATABASE</pre>
|
||||
redirected after logout (doesn't affect config authentication method).
|
||||
Should be absolute including protocol.
|
||||
</dd>
|
||||
|
||||
<dt><span id="cfg_Servers_StatusCacheDatabases">$cfg['Servers'][$i]['StatusCacheDatabases']</span> array of strings</dt>
|
||||
<dd>Enables caching of <code>TABLE STATUS</code> outputs for specific databases on this server (in some cases <code>TABLE STATUS</code> can be very slow, so you may want to cache it). APC is used (if the PHP extension is available, if not, this setting is ignored silently). You have to provide <a href="#cfg_Servers_StatusCacheLifetime" class="configrule">StatusCacheLifetime</a>.<br />
|
||||
Takes effect only if
|
||||
<a href="#cfg_Servers_DisableIS" class="configrule">DisableIS</a>
|
||||
is <code>true</code>.
|
||||
</dd>
|
||||
<dt><span id="cfg_Servers_StatusCacheLifetime">$cfg['Servers'][$i]['StatusCacheLifetime']</span> integer</dt>
|
||||
<dd>Lifetime in seconds of the <code>TABLE STATUS</code> cache if <a href="#cfg_Servers_StatusCacheDatabases" class="configrule">StatusCacheDatabases</a> is used.
|
||||
</dd>
|
||||
<dt id="cfg_ServerDefault">$cfg['ServerDefault'] integer</dt>
|
||||
<dd>If you have more than one server configured, you can set
|
||||
<code>$cfg['ServerDefault']</code> to any one of them to autoconnect to
|
||||
|
||||
@ -202,6 +202,37 @@ function clear_fast_filter()
|
||||
fast_filter('');
|
||||
}
|
||||
|
||||
/**
|
||||
* hide all LI elements with second A tag which doesn`t contain requested value
|
||||
*
|
||||
* @param string value requested value
|
||||
*
|
||||
*/
|
||||
function fast_db_filter(value)
|
||||
{
|
||||
var lowercase_value = value.toLowerCase();
|
||||
|
||||
$('#databaseList li a').each(function(idx, elem) {
|
||||
var $elem = $(elem);
|
||||
if (value && $elem.html().toLowerCase().indexOf(lowercase_value) == -1) {
|
||||
$elem.parent().hide();
|
||||
} else {
|
||||
$elem.parents('li').show();
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Clears fast database filter.
|
||||
*/
|
||||
function clear_fast_db_filter()
|
||||
{
|
||||
var $elm = $('#fast_db_filter');
|
||||
$elm.val('');
|
||||
fast_db_filter('');
|
||||
}
|
||||
|
||||
/**
|
||||
* Reloads the recent tables list.
|
||||
*/
|
||||
@ -251,6 +282,32 @@ $(function(){
|
||||
}
|
||||
});
|
||||
|
||||
/* Fast database filter */
|
||||
var txtDb = $('#fast_db_filter').val();
|
||||
|
||||
$('#fast_db_filter.gray').live('focus', function() {
|
||||
$(this).removeClass('gray');
|
||||
clear_fast_db_filter();
|
||||
});
|
||||
|
||||
$('#fast_db_filter:not(.gray)').live('focusout', function() {
|
||||
var $input = $(this);
|
||||
if ($input.val() == '') {
|
||||
$input
|
||||
.addClass('gray')
|
||||
.val(txtDb);
|
||||
}
|
||||
});
|
||||
|
||||
$('#clear_fast_db_filter').click(function() {
|
||||
clear_fast_db_filter();
|
||||
$('#fast_db_filter').focus();
|
||||
});
|
||||
|
||||
$('#fast_db_filter').keyup(function(evt) {
|
||||
fast_db_filter($(this).val());
|
||||
});
|
||||
|
||||
/* Jump to recent table */
|
||||
$('#recentTable').change(function() {
|
||||
if (this.value != '') {
|
||||
|
||||
@ -953,7 +953,7 @@ function PMA_reloadNavigation($jsonly = false)
|
||||
'',
|
||||
'&'
|
||||
);
|
||||
if (!$jsonly) {
|
||||
if (! $jsonly) {
|
||||
echo '<script type="text/javascript">' . PHP_EOL;
|
||||
}
|
||||
echo '//<![CDATA[' . PHP_EOL;
|
||||
@ -963,7 +963,7 @@ function PMA_reloadNavigation($jsonly = false)
|
||||
echo ' window.parent.goTo("' . $reload_url . '");' . PHP_EOL;
|
||||
echo '}' . PHP_EOL;
|
||||
echo '//]]>' . PHP_EOL;
|
||||
if (!$jsonly) {
|
||||
if (! $jsonly) {
|
||||
echo '</script>' . PHP_EOL;
|
||||
}
|
||||
|
||||
@ -1370,11 +1370,11 @@ function PMA_profilingSupported()
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays a form with the Profiling checkbox
|
||||
* Returns HTML for the form with the Profiling checkbox
|
||||
*
|
||||
* @param string $sql_query sql query
|
||||
*
|
||||
* @return void
|
||||
* @return string HTML for the form with the Profiling checkbox
|
||||
*
|
||||
* @access public
|
||||
*/
|
||||
@ -1869,7 +1869,7 @@ function PMA_linkOrButton($url, $message, $tag_params = array(),
|
||||
$displayed_message = '';
|
||||
// Add text if not already added
|
||||
if (stristr($message, '<img')
|
||||
&& (!$strip_img || $GLOBALS['cfg']['PropertiesIconic'] === true)
|
||||
&& (! $strip_img || $GLOBALS['cfg']['PropertiesIconic'] === true)
|
||||
&& strip_tags($message)==$message
|
||||
) {
|
||||
$displayed_message = '<span>'
|
||||
@ -2599,14 +2599,14 @@ function PMA_externalBug($functionality, $component, $minimum_version, $bugref)
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates and echoes an HTML checkbox
|
||||
* Returns an HTML checkbox
|
||||
*
|
||||
* @param string $html_field_name the checkbox HTML field
|
||||
* @param string $label label for checkbox
|
||||
* @param boolean $checked is it initially checked?
|
||||
* @param boolean $onclick should it submit the form on click?
|
||||
*
|
||||
* @return void
|
||||
* @return string HTML for the checkbox
|
||||
*/
|
||||
function PMA_getCheckbox($html_field_name, $label, $checked, $onclick)
|
||||
{
|
||||
@ -3091,7 +3091,7 @@ function PMA_replaceBinaryContents($content)
|
||||
* @param binary $data GIS data
|
||||
* @param bool $includeSRID Add SRID to the WKT
|
||||
*
|
||||
* @return GIS data in Well Know Text format
|
||||
* @return string GIS data in Well Know Text format
|
||||
*/
|
||||
function PMA_asWKT($data, $includeSRID = false)
|
||||
{
|
||||
@ -3281,7 +3281,7 @@ function PMA_ajaxResponse($message, $success = true, $extra_data = array())
|
||||
// At this point, other headers might have been sent;
|
||||
// even if $GLOBALS['is_header_sent'] is true,
|
||||
// we have to send these additional headers.
|
||||
if (!defined('TESTSUITE')) {
|
||||
if (! defined('TESTSUITE')) {
|
||||
header('Cache-Control: no-cache');
|
||||
header("Content-Type: application/json");
|
||||
}
|
||||
@ -3303,7 +3303,7 @@ function PMA_ajaxResponse($message, $success = true, $extra_data = array())
|
||||
*/
|
||||
function PMA_browseUploadFile($max_upload_size)
|
||||
{
|
||||
if ($GLOBALS['is_upload'] && !empty($GLOBALS['cfg']['UploadDir'])) {
|
||||
if ($GLOBALS['is_upload'] && ! empty($GLOBALS['cfg']['UploadDir'])) {
|
||||
echo '<label for="radio_import_file">';
|
||||
} else {
|
||||
echo '<label for="input_import_file">';
|
||||
@ -3516,7 +3516,7 @@ function PMA_getGISDatatypes($upper_case = false)
|
||||
*
|
||||
* @param string $gis_string GIS string
|
||||
*
|
||||
* @return GIS data enclosed in 'GeomFromText' function
|
||||
* @return string GIS data enclosed in 'GeomFromText' function
|
||||
*/
|
||||
function PMA_createGISData($gis_string)
|
||||
{
|
||||
|
||||
@ -517,6 +517,24 @@ $cfg['Servers'][$i]['tracking_add_drop_table'] = true;
|
||||
|
||||
$cfg['Servers'][$i]['tracking_add_drop_database'] = true;
|
||||
|
||||
/**
|
||||
* Enables caching of TABLE STATUS outputs for specific databases on this server
|
||||
* (in some cases TABLE STATUS can be very slow, so you may want to cache it).
|
||||
* APC is used (if the PHP extension is available, if not, this setting is ignored
|
||||
* silently). You have to provide StatusCacheLifetime.
|
||||
* Takes effect only if DisableIS is true.
|
||||
*
|
||||
* @global array $cfg['Servers'][$i]['StatusCacheDatabases']
|
||||
*/
|
||||
$cfg['Servers'][$i]['StatusCacheDatabases'] = array();
|
||||
|
||||
/**
|
||||
* Lifetime in seconds of the TABLE STATUS cache if StatusCacheDatabases is used
|
||||
*
|
||||
* @global integer $cfg['Servers'][$i]['StatusCacheLifetime']
|
||||
*/
|
||||
$cfg['Servers'][$i]['StatusCacheLifetime'] = 0;
|
||||
|
||||
/**
|
||||
* Default server (0 = no default server)
|
||||
*
|
||||
@ -883,6 +901,14 @@ $cfg['DisplayServersList'] = false;
|
||||
*/
|
||||
$cfg['DisplayDatabasesList'] = 'auto';
|
||||
|
||||
/**
|
||||
* display a JavaScript database filter in the left frame
|
||||
* when more then x databases are present
|
||||
*
|
||||
* @global boolean $cfg['LeftDisplayDatabaseFilterMinimum']
|
||||
*/
|
||||
$cfg['LeftDisplayDatabaseFilterMinimum'] = 30;
|
||||
|
||||
/**
|
||||
* target of the navigation panel quick access icon
|
||||
*
|
||||
|
||||
@ -18,45 +18,45 @@ class ConfigFile
|
||||
* Stores default PMA config from config.default.php
|
||||
* @var array
|
||||
*/
|
||||
private $cfg;
|
||||
private $_cfg;
|
||||
|
||||
/**
|
||||
* Stores original PMA_Config object, not modified by user preferences
|
||||
* @var PMA_Config
|
||||
*/
|
||||
private $orgCfgObject;
|
||||
private $_orgCfgObject;
|
||||
|
||||
/**
|
||||
* Stores allowed values for non-standard fields
|
||||
* @var array
|
||||
*/
|
||||
private $cfgDb;
|
||||
private $_cfgDb;
|
||||
|
||||
/**
|
||||
* Keys which will be always written to config file
|
||||
* @var array
|
||||
*/
|
||||
private $persistKeys = array();
|
||||
private $_persistKeys = array();
|
||||
|
||||
/**
|
||||
* Changes keys while updating config in {@link updateWithGlobalConfig()}
|
||||
* or reading by {@link getConfig()} or {@link getConfigArray()}
|
||||
* @var array
|
||||
*/
|
||||
private $cfgUpdateReadMapping = array();
|
||||
private $_cfgUpdateReadMapping = array();
|
||||
|
||||
/**
|
||||
* Key filter for {@link set()}
|
||||
* @var array|null
|
||||
*/
|
||||
private $setFilter;
|
||||
private $_setFilter;
|
||||
|
||||
/**
|
||||
* Instance id (key in $_SESSION array, separate for each server -
|
||||
* ConfigFile{server id})
|
||||
* @var string
|
||||
*/
|
||||
private $id;
|
||||
private $_id;
|
||||
|
||||
/**
|
||||
* Result for {@link _flattenArray()}
|
||||
@ -77,15 +77,15 @@ class ConfigFile
|
||||
private function __construct()
|
||||
{
|
||||
// load default config values
|
||||
$cfg = &$this->cfg;
|
||||
$cfg = &$this->_cfg;
|
||||
include './libraries/config.default.php';
|
||||
$cfg['fontsize'] = '82%';
|
||||
|
||||
// create PMA_Config to read config.inc.php values
|
||||
$this->orgCfgObject = new PMA_Config(CONFIG_FILE);
|
||||
$this->_orgCfgObject = new PMA_Config(CONFIG_FILE);
|
||||
|
||||
// load additional config information
|
||||
$cfg_db = &$this->cfgDb;
|
||||
$cfg_db = &$this->_cfgDb;
|
||||
include './libraries/config.values.php';
|
||||
|
||||
// apply default values overrides
|
||||
@ -95,9 +95,9 @@ class ConfigFile
|
||||
}
|
||||
}
|
||||
|
||||
$this->id = 'ConfigFile' . $GLOBALS['server'];
|
||||
if (!isset($_SESSION[$this->id])) {
|
||||
$_SESSION[$this->id] = array();
|
||||
$this->_id = 'ConfigFile' . $GLOBALS['server'];
|
||||
if (!isset($_SESSION[$this->_id])) {
|
||||
$_SESSION[$this->_id] = array();
|
||||
}
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ class ConfigFile
|
||||
*/
|
||||
public function getOrgConfigObj()
|
||||
{
|
||||
return $this->orgCfgObject;
|
||||
return $this->_orgCfgObject;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -129,12 +129,14 @@ class ConfigFile
|
||||
* they are set to their default values (use only full paths)
|
||||
*
|
||||
* @param array $keys
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setPersistKeys($keys)
|
||||
{
|
||||
// checking key presence is much faster than searching so move values
|
||||
// to keys
|
||||
$this->persistKeys = array_flip($keys);
|
||||
$this->_persistKeys = array_flip($keys);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -144,7 +146,7 @@ class ConfigFile
|
||||
*/
|
||||
public function getPersistKeysMap()
|
||||
{
|
||||
return $this->persistKeys;
|
||||
return $this->_persistKeys;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -152,45 +154,54 @@ class ConfigFile
|
||||
* this method to set up a filter on {@link set()} method
|
||||
*
|
||||
* @param array|null $keys array of allowed keys or null to remove filter
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setAllowedKeys($keys)
|
||||
{
|
||||
if ($keys === null) {
|
||||
$this->setFilter = null;
|
||||
$this->_setFilter = null;
|
||||
return;
|
||||
}
|
||||
// checking key presence is much faster than searching so move values
|
||||
// to keys
|
||||
$this->setFilter = array_flip($keys);
|
||||
$this->_setFilter = array_flip($keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets path mapping for updating config in
|
||||
* {@link updateWithGlobalConfig()} or reading
|
||||
* by {@link getConfig()} or {@link getConfigArray()}
|
||||
* @var array
|
||||
*
|
||||
* @param array $mapping
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setCfgUpdateReadMapping(array $mapping)
|
||||
{
|
||||
$this->cfgUpdateReadMapping = $mapping;
|
||||
$this->_cfgUpdateReadMapping = $mapping;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets configuration data
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function resetConfigData()
|
||||
{
|
||||
$_SESSION[$this->id] = array();
|
||||
$_SESSION[$this->_id] = array();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets configuration data (overrides old data)
|
||||
*
|
||||
* @param array $cfg
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setConfigData(array $cfg)
|
||||
{
|
||||
$_SESSION[$this->id] = $cfg;
|
||||
$_SESSION[$this->_id] = $cfg;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -199,6 +210,8 @@ class ConfigFile
|
||||
* @param string $path
|
||||
* @param mixed $value
|
||||
* @param string $canonical_path
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function set($path, $value, $canonical_path = null)
|
||||
{
|
||||
@ -206,30 +219,32 @@ class ConfigFile
|
||||
$canonical_path = $this->getCanonicalPath($path);
|
||||
}
|
||||
// apply key whitelist
|
||||
if ($this->setFilter !== null && !isset($this->setFilter[$canonical_path])) {
|
||||
if ($this->_setFilter !== null
|
||||
&& ! isset($this->_setFilter[$canonical_path])
|
||||
) {
|
||||
return;
|
||||
}
|
||||
// remove if the path isn't protected and it's empty or has a default
|
||||
// value
|
||||
if (!isset($this->persistKeys[$canonical_path])) {
|
||||
if (!isset($this->_persistKeys[$canonical_path])) {
|
||||
$default_value = $this->getDefault($canonical_path);
|
||||
// we need original config values not overwritten by user
|
||||
// preferences to allow for overwriting options set in
|
||||
// config.inc.php with default values
|
||||
$instance_default_value = PMA_array_read(
|
||||
$canonical_path,
|
||||
$this->orgCfgObject->settings
|
||||
$this->_orgCfgObject->settings
|
||||
);
|
||||
if (($value === $default_value && (defined('PMA_SETUP')
|
||||
|| $instance_default_value === $default_value))
|
||||
|| (empty($value) && empty($default_value) && (defined('PMA_SETUP')
|
||||
|| empty($current_global)))
|
||||
) {
|
||||
PMA_array_remove($path, $_SESSION[$this->id]);
|
||||
PMA_array_remove($path, $_SESSION[$this->_id]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
PMA_array_write($path, $_SESSION[$this->id], $value);
|
||||
PMA_array_write($path, $_SESSION[$this->_id], $value);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -240,6 +255,8 @@ class ConfigFile
|
||||
* @param mixed $value
|
||||
* @param mixed $key
|
||||
* @param mixed $prefix
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _flattenArray($value, $key, $prefix)
|
||||
{
|
||||
@ -260,7 +277,7 @@ class ConfigFile
|
||||
public function getFlatDefaultConfig()
|
||||
{
|
||||
$this->_flattenArrayResult = array();
|
||||
array_walk($this->cfg, array($this, '_flattenArray'), '');
|
||||
array_walk($this->_cfg, array($this, '_flattenArray'), '');
|
||||
$flat_cfg = $this->_flattenArrayResult;
|
||||
$this->_flattenArrayResult = null;
|
||||
return $flat_cfg;
|
||||
@ -271,6 +288,8 @@ class ConfigFile
|
||||
* (config will contain differences to defaults from config.defaults.php).
|
||||
*
|
||||
* @param array $cfg
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function updateWithGlobalConfig(array $cfg)
|
||||
{
|
||||
@ -284,8 +303,8 @@ class ConfigFile
|
||||
// should be complemented by code reading from generated config
|
||||
// to perform inverse mapping
|
||||
foreach ($flat_cfg as $path => $value) {
|
||||
if (isset($this->cfgUpdateReadMapping[$path])) {
|
||||
$path = $this->cfgUpdateReadMapping[$path];
|
||||
if (isset($this->_cfgUpdateReadMapping[$path])) {
|
||||
$path = $this->_cfgUpdateReadMapping[$path];
|
||||
}
|
||||
$this->set($path, $value, $path);
|
||||
}
|
||||
@ -301,7 +320,7 @@ class ConfigFile
|
||||
*/
|
||||
public function get($path, $default = null)
|
||||
{
|
||||
return PMA_array_read($path, $_SESSION[$this->id], $default);
|
||||
return PMA_array_read($path, $_SESSION[$this->_id], $default);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -316,7 +335,7 @@ class ConfigFile
|
||||
*/
|
||||
public function getDefault($canonical_path, $default = null)
|
||||
{
|
||||
return PMA_array_read($canonical_path, $this->cfg, $default);
|
||||
return PMA_array_read($canonical_path, $this->_cfg, $default);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -330,7 +349,7 @@ class ConfigFile
|
||||
*/
|
||||
public function getValue($path, $default = null)
|
||||
{
|
||||
$v = PMA_array_read($path, $_SESSION[$this->id], null);
|
||||
$v = PMA_array_read($path, $_SESSION[$this->_id], null);
|
||||
if ($v !== null) {
|
||||
return $v;
|
||||
}
|
||||
@ -360,7 +379,7 @@ class ConfigFile
|
||||
*/
|
||||
public function getDbEntry($path, $default = null)
|
||||
{
|
||||
return PMA_array_read($path, $this->cfgDb, $default);
|
||||
return PMA_array_read($path, $this->_cfgDb, $default);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -370,8 +389,8 @@ class ConfigFile
|
||||
*/
|
||||
public function getServerCount()
|
||||
{
|
||||
return isset($_SESSION[$this->id]['Servers'])
|
||||
? count($_SESSION[$this->id]['Servers'])
|
||||
return isset($_SESSION[$this->_id]['Servers'])
|
||||
? count($_SESSION[$this->_id]['Servers'])
|
||||
: 0;
|
||||
}
|
||||
|
||||
@ -382,9 +401,9 @@ class ConfigFile
|
||||
*/
|
||||
public function getServers()
|
||||
{
|
||||
return isset($_SESSION[$this->id]['Servers'])
|
||||
? $_SESSION[$this->id]['Servers']
|
||||
: null;
|
||||
return isset($_SESSION[$this->_id]['Servers'])
|
||||
? $_SESSION[$this->_id]['Servers']
|
||||
: null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -396,7 +415,7 @@ class ConfigFile
|
||||
*/
|
||||
function getServerDSN($server)
|
||||
{
|
||||
if (!isset($_SESSION[$this->id]['Servers'][$server])) {
|
||||
if (!isset($_SESSION[$this->_id]['Servers'][$server])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
@ -430,7 +449,7 @@ class ConfigFile
|
||||
*/
|
||||
public function getServerName($id)
|
||||
{
|
||||
if (!isset($_SESSION[$this->id]['Servers'][$id])) {
|
||||
if (!isset($_SESSION[$this->_id]['Servers'][$id])) {
|
||||
return '';
|
||||
}
|
||||
$verbose = $this->get("Servers/$id/verbose");
|
||||
@ -445,24 +464,26 @@ class ConfigFile
|
||||
* Removes server
|
||||
*
|
||||
* @param int $server
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function removeServer($server)
|
||||
{
|
||||
if (!isset($_SESSION[$this->id]['Servers'][$server])) {
|
||||
if (!isset($_SESSION[$this->_id]['Servers'][$server])) {
|
||||
return;
|
||||
}
|
||||
$last_server = $this->getServerCount();
|
||||
|
||||
for ($i = $server; $i < $last_server; $i++) {
|
||||
$_SESSION[$this->id]['Servers'][$i]
|
||||
= $_SESSION[$this->id]['Servers'][$i + 1];
|
||||
$_SESSION[$this->_id]['Servers'][$i]
|
||||
= $_SESSION[$this->_id]['Servers'][$i + 1];
|
||||
}
|
||||
unset($_SESSION[$this->id]['Servers'][$last_server]);
|
||||
unset($_SESSION[$this->_id]['Servers'][$last_server]);
|
||||
|
||||
if (isset($_SESSION[$this->id]['ServerDefault'])
|
||||
&& $_SESSION[$this->id]['ServerDefault'] >= 0
|
||||
if (isset($_SESSION[$this->_id]['ServerDefault'])
|
||||
&& $_SESSION[$this->_id]['ServerDefault'] >= 0
|
||||
) {
|
||||
unset($_SESSION[$this->id]['ServerDefault']);
|
||||
unset($_SESSION[$this->_id]['ServerDefault']);
|
||||
}
|
||||
}
|
||||
|
||||
@ -488,8 +509,8 @@ class ConfigFile
|
||||
*/
|
||||
public function getConfig()
|
||||
{
|
||||
$c = $_SESSION[$this->id];
|
||||
foreach ($this->cfgUpdateReadMapping as $map_to => $map_from) {
|
||||
$c = $_SESSION[$this->_id];
|
||||
foreach ($this->_cfgUpdateReadMapping as $map_to => $map_from) {
|
||||
PMA_array_write($map_to, $c, PMA_array_read($map_from, $c));
|
||||
PMA_array_remove($map_from, $c);
|
||||
}
|
||||
@ -504,19 +525,19 @@ class ConfigFile
|
||||
public function getConfigArray()
|
||||
{
|
||||
$this->_flattenArrayResult = array();
|
||||
array_walk($_SESSION[$this->id], array($this, '_flattenArray'), '');
|
||||
array_walk($_SESSION[$this->_id], array($this, '_flattenArray'), '');
|
||||
$c = $this->_flattenArrayResult;
|
||||
$this->_flattenArrayResult = null;
|
||||
|
||||
$persistKeys = array_diff(
|
||||
array_keys($this->persistKeys),
|
||||
array_keys($this->_persistKeys),
|
||||
array_keys($c)
|
||||
);
|
||||
foreach ($persistKeys as $k) {
|
||||
$c[$k] = $this->getDefault($k);
|
||||
}
|
||||
|
||||
foreach ($this->cfgUpdateReadMapping as $map_to => $map_from) {
|
||||
foreach ($this->_cfgUpdateReadMapping as $map_to => $map_from) {
|
||||
if (!isset($c[$map_from])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ class Form
|
||||
* Caches field types, indexed by field names
|
||||
* @var array
|
||||
*/
|
||||
private $fieldsTypes;
|
||||
private $_fieldsTypes;
|
||||
|
||||
/**
|
||||
* Constructor, reads default config values
|
||||
@ -67,8 +67,8 @@ class Form
|
||||
public function getOptionType($option_name)
|
||||
{
|
||||
$key = ltrim(substr($option_name, strrpos($option_name, '/')), '/');
|
||||
return isset($this->fieldsTypes[$key])
|
||||
? $this->fieldsTypes[$key]
|
||||
return isset($this->_fieldsTypes[$key])
|
||||
? $this->_fieldsTypes[$key]
|
||||
: null;
|
||||
}
|
||||
|
||||
@ -169,7 +169,7 @@ class Form
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads fields' types to $this->fieldsTypes
|
||||
* Reads fields' types to $this->_fieldsTypes
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@ -178,7 +178,7 @@ class Form
|
||||
$cf = ConfigFile::getInstance();
|
||||
foreach ($this->fields as $name => $path) {
|
||||
if (strpos($name, ':group:') === 0) {
|
||||
$this->fieldsTypes[$name] = 'group';
|
||||
$this->_fieldsTypes[$name] = 'group';
|
||||
continue;
|
||||
}
|
||||
$v = $cf->getDbEntry($path);
|
||||
@ -187,7 +187,7 @@ class Form
|
||||
} else {
|
||||
$type = gettype($cf->getDefault($path));
|
||||
}
|
||||
$this->fieldsTypes[$name] = $type;
|
||||
$this->_fieldsTypes[$name] = $type;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -22,6 +22,8 @@ require_once './libraries/js_escape.lib.php';
|
||||
|
||||
/**
|
||||
* Form management class, displays and processes forms
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
class FormDisplay
|
||||
{
|
||||
@ -29,7 +31,7 @@ class FormDisplay
|
||||
* Form list
|
||||
* @var Form[]
|
||||
*/
|
||||
private $forms = array();
|
||||
private $_forms = array();
|
||||
|
||||
/**
|
||||
* Stores validation errors, indexed by paths
|
||||
@ -37,49 +39,52 @@ class FormDisplay
|
||||
* [path] is a string storing error associated with single field
|
||||
* @var array
|
||||
*/
|
||||
private $errors = array();
|
||||
private $_errors = array();
|
||||
|
||||
/**
|
||||
* Paths changed so that they can be used as HTML ids, indexed by paths
|
||||
* @var array
|
||||
*/
|
||||
private $translated_paths = array();
|
||||
private $_translated_paths = array();
|
||||
|
||||
/**
|
||||
* Server paths change indexes so we define maps from current server
|
||||
* path to the first one, indexed by work path
|
||||
* @var array
|
||||
*/
|
||||
private $system_paths = array();
|
||||
private $_system_paths = array();
|
||||
|
||||
/**
|
||||
* Language strings which will be sent to PMA_messages JS variable
|
||||
* Will be looked up in $GLOBALS: str{value} or strSetup{value}
|
||||
* @var array
|
||||
*/
|
||||
private $js_lang_strings = array();
|
||||
private $_js_lang_strings = array();
|
||||
|
||||
/**
|
||||
* Tells whether forms have been validated
|
||||
* @var bool
|
||||
*/
|
||||
private $is_validated = true;
|
||||
private $_is_validated = true;
|
||||
|
||||
/**
|
||||
* Dictionary with user preferences keys
|
||||
* @var array
|
||||
*/
|
||||
private $userprefs_keys;
|
||||
private $_userprefs_keys;
|
||||
|
||||
/**
|
||||
* Dictionary with disallowed user preferences keys
|
||||
* @var array
|
||||
*/
|
||||
private $userprefs_disallow;
|
||||
private $_userprefs_disallow;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
$this->js_lang_strings = array(
|
||||
$this->_js_lang_strings = array(
|
||||
'error_nan_p' => __('Not a positive number'),
|
||||
'error_nan_nneg' => __('Not a non-negative number'),
|
||||
'error_incorrect_port' => __('Not a valid port number'),
|
||||
@ -95,17 +100,19 @@ class FormDisplay
|
||||
* @param string $form_name
|
||||
* @param array $form
|
||||
* @param int $server_id 0 if new server, validation; >= 1 if editing a server
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function registerForm($form_name, array $form, $server_id = null)
|
||||
{
|
||||
$this->forms[$form_name] = new Form($form_name, $form, $server_id);
|
||||
$this->is_validated = false;
|
||||
foreach ($this->forms[$form_name]->fields as $path) {
|
||||
$this->_forms[$form_name] = new Form($form_name, $form, $server_id);
|
||||
$this->_is_validated = false;
|
||||
foreach ($this->_forms[$form_name]->fields as $path) {
|
||||
$work_path = $server_id === null
|
||||
? $path
|
||||
: str_replace('Servers/1/', "Servers/$server_id/", $path);
|
||||
$this->system_paths[$work_path] = $path;
|
||||
$this->translated_paths[$work_path] = str_replace('/', '-', $work_path);
|
||||
$this->_system_paths[$work_path] = $path;
|
||||
$this->_translated_paths[$work_path] = str_replace('/', '-', $work_path);
|
||||
}
|
||||
}
|
||||
|
||||
@ -125,8 +132,8 @@ class FormDisplay
|
||||
}
|
||||
|
||||
// save forms
|
||||
if (count($this->forms) > 0) {
|
||||
return $this->save(array_keys($this->forms), $allow_partial_save);
|
||||
if (count($this->_forms) > 0) {
|
||||
return $this->save(array_keys($this->_forms), $allow_partial_save);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -138,19 +145,19 @@ class FormDisplay
|
||||
*/
|
||||
private function _validate()
|
||||
{
|
||||
if ($this->is_validated) {
|
||||
if ($this->_is_validated) {
|
||||
return;
|
||||
}
|
||||
|
||||
$cf = ConfigFile::getInstance();
|
||||
$paths = array();
|
||||
$values = array();
|
||||
foreach ($this->forms as $form) {
|
||||
foreach ($this->_forms as $form) {
|
||||
/* @var $form Form */
|
||||
$paths[] = $form->name;
|
||||
// collect values and paths
|
||||
foreach ($form->fields as $path) {
|
||||
$work_path = array_search($path, $this->system_paths);
|
||||
$work_path = array_search($path, $this->_system_paths);
|
||||
$values[$path] = $cf->getValue($work_path);
|
||||
$paths[] = $path;
|
||||
}
|
||||
@ -161,18 +168,18 @@ class FormDisplay
|
||||
|
||||
// change error keys from canonical paths to work paths
|
||||
if (is_array($errors) && count($errors) > 0) {
|
||||
$this->errors = array();
|
||||
$this->_errors = array();
|
||||
foreach ($errors as $path => $error_list) {
|
||||
$work_path = array_search($path, $this->system_paths);
|
||||
$work_path = array_search($path, $this->_system_paths);
|
||||
// field error
|
||||
if (!$work_path) {
|
||||
// form error, fix path
|
||||
$work_path = $path;
|
||||
}
|
||||
$this->errors[$work_path] = $error_list;
|
||||
$this->_errors[$work_path] = $error_list;
|
||||
}
|
||||
}
|
||||
$this->is_validated = true;
|
||||
$this->_is_validated = true;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -189,14 +196,14 @@ class FormDisplay
|
||||
|
||||
$js = array();
|
||||
$js_default = array();
|
||||
$tabbed_form = $tabbed_form && (count($this->forms) > 1);
|
||||
$tabbed_form = $tabbed_form && (count($this->_forms) > 1);
|
||||
$validators = PMA_config_get_validators();
|
||||
|
||||
display_form_top();
|
||||
|
||||
if ($tabbed_form) {
|
||||
$tabs = array();
|
||||
foreach ($this->forms as $form) {
|
||||
foreach ($this->_forms as $form) {
|
||||
$tabs[$form->name] = PMA_lang("Form_$form->name");
|
||||
}
|
||||
display_tabs_top($tabs);
|
||||
@ -204,7 +211,7 @@ class FormDisplay
|
||||
|
||||
// valdiate only when we aren't displaying a "new server" form
|
||||
$is_new_server = false;
|
||||
foreach ($this->forms as $form) {
|
||||
foreach ($this->_forms as $form) {
|
||||
/* @var $form Form */
|
||||
if ($form->index === 0) {
|
||||
$is_new_server = true;
|
||||
@ -219,13 +226,13 @@ class FormDisplay
|
||||
$this->_loadUserprefsInfo();
|
||||
|
||||
// display forms
|
||||
foreach ($this->forms as $form) {
|
||||
foreach ($this->_forms as $form) {
|
||||
/* @var $form Form */
|
||||
$form_desc = isset($GLOBALS["strConfigForm_{$form->name}_desc"])
|
||||
? PMA_lang("Form_{$form->name}_desc")
|
||||
: '';
|
||||
$form_errors = isset($this->errors[$form->name])
|
||||
? $this->errors[$form->name] : null;
|
||||
$form_errors = isset($this->_errors[$form->name])
|
||||
? $this->_errors[$form->name] : null;
|
||||
display_fieldset_top(
|
||||
PMA_lang("Form_$form->name"),
|
||||
$form_desc,
|
||||
@ -234,12 +241,12 @@ class FormDisplay
|
||||
);
|
||||
|
||||
foreach ($form->fields as $field => $path) {
|
||||
$work_path = array_search($path, $this->system_paths);
|
||||
$translated_path = $this->translated_paths[$work_path];
|
||||
$work_path = array_search($path, $this->_system_paths);
|
||||
$translated_path = $this->_translated_paths[$work_path];
|
||||
// always true/false for user preferences display
|
||||
// otherwise null
|
||||
$userprefs_allow = isset($this->userprefs_keys[$path])
|
||||
? !isset($this->userprefs_disallow[$path])
|
||||
$userprefs_allow = isset($this->_userprefs_keys[$path])
|
||||
? !isset($this->_userprefs_disallow[$path])
|
||||
: null;
|
||||
// display input
|
||||
$this->_displayFieldInput(
|
||||
@ -269,7 +276,7 @@ class FormDisplay
|
||||
if (!$js_lang_sent) {
|
||||
$js_lang_sent = true;
|
||||
$js_lang = array();
|
||||
foreach ($this->js_lang_strings as $strName => $strValue) {
|
||||
foreach ($this->_js_lang_strings as $strName => $strValue) {
|
||||
$js_lang[] = "'$strName': '" . PMA_jsFormat($strValue, false) . '\'';
|
||||
}
|
||||
$js[] = "$.extend(PMA_messages, {\n\t" . implode(",\n\t", $js_lang) . '})';
|
||||
@ -324,8 +331,8 @@ class FormDisplay
|
||||
$opts['setvalue'] = $form->default[$system_path];
|
||||
}
|
||||
|
||||
if (isset($this->errors[$work_path])) {
|
||||
$opts['errors'] = $this->errors[$work_path];
|
||||
if (isset($this->_errors[$work_path])) {
|
||||
$opts['errors'] = $this->_errors[$work_path];
|
||||
}
|
||||
switch ($form->getOptionType($field)) {
|
||||
case 'string':
|
||||
@ -411,13 +418,13 @@ class FormDisplay
|
||||
public function displayErrors()
|
||||
{
|
||||
$this->_validate();
|
||||
if (count($this->errors) == 0) {
|
||||
if (count($this->_errors) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
foreach ($this->errors as $system_path => $error_list) {
|
||||
if (isset($this->system_paths[$system_path])) {
|
||||
$path = $this->system_paths[$system_path];
|
||||
foreach ($this->_errors as $system_path => $error_list) {
|
||||
if (isset($this->_system_paths[$system_path])) {
|
||||
$path = $this->_system_paths[$system_path];
|
||||
$name = PMA_lang_name($path);
|
||||
} else {
|
||||
$name = $GLOBALS["strConfigForm_$system_path"];
|
||||
@ -434,16 +441,16 @@ class FormDisplay
|
||||
public function fixErrors()
|
||||
{
|
||||
$this->_validate();
|
||||
if (count($this->errors) == 0) {
|
||||
if (count($this->_errors) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$cf = ConfigFile::getInstance();
|
||||
foreach (array_keys($this->errors) as $work_path) {
|
||||
if (!isset($this->system_paths[$work_path])) {
|
||||
foreach (array_keys($this->_errors) as $work_path) {
|
||||
if (!isset($this->_system_paths[$work_path])) {
|
||||
continue;
|
||||
}
|
||||
$canonical_path = $this->system_paths[$work_path];
|
||||
$canonical_path = $this->_system_paths[$work_path];
|
||||
$cf->set($work_path, $cf->getDefault($canonical_path));
|
||||
}
|
||||
}
|
||||
@ -500,11 +507,11 @@ class FormDisplay
|
||||
$this->_loadUserprefsInfo();
|
||||
}
|
||||
|
||||
$this->errors = array();
|
||||
$this->_errors = array();
|
||||
foreach ($forms as $form_name) {
|
||||
/* @var $form Form */
|
||||
if (isset($this->forms[$form_name])) {
|
||||
$form = $this->forms[$form_name];
|
||||
if (isset($this->_forms[$form_name])) {
|
||||
$form = $this->_forms[$form_name];
|
||||
} else {
|
||||
continue;
|
||||
}
|
||||
@ -514,8 +521,8 @@ class FormDisplay
|
||||
: false;
|
||||
// grab POST values
|
||||
foreach ($form->fields as $field => $system_path) {
|
||||
$work_path = array_search($system_path, $this->system_paths);
|
||||
$key = $this->translated_paths[$work_path];
|
||||
$work_path = array_search($system_path, $this->_system_paths);
|
||||
$key = $this->_translated_paths[$work_path];
|
||||
$type = $form->getOptionType($field);
|
||||
|
||||
// skip groups
|
||||
@ -529,7 +536,7 @@ class FormDisplay
|
||||
if ($type == 'boolean') {
|
||||
$_POST[$key] = false;
|
||||
} else {
|
||||
$this->errors[$form->name][] = sprintf(
|
||||
$this->_errors[$form->name][] = sprintf(
|
||||
__('Missing data for %s'),
|
||||
'<i>' . PMA_lang_name($system_path) . '</i>'
|
||||
);
|
||||
@ -539,13 +546,15 @@ class FormDisplay
|
||||
}
|
||||
|
||||
// user preferences allow/disallow
|
||||
if ($is_setup_script && isset($this->userprefs_keys[$system_path])) {
|
||||
if (isset($this->userprefs_disallow[$system_path])
|
||||
if ($is_setup_script
|
||||
&& isset($this->_userprefs_keys[$system_path])
|
||||
) {
|
||||
if (isset($this->_userprefs_disallow[$system_path])
|
||||
&& isset($_POST[$key . '-userprefs-allow'])
|
||||
) {
|
||||
unset($this->userprefs_disallow[$system_path]);
|
||||
unset($this->_userprefs_disallow[$system_path]);
|
||||
} else if (!isset($_POST[$key . '-userprefs-allow'])) {
|
||||
$this->userprefs_disallow[$system_path] = true;
|
||||
$this->_userprefs_disallow[$system_path] = true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -574,7 +583,7 @@ class FormDisplay
|
||||
$form->getOptionValueList($system_path)
|
||||
);
|
||||
if (! $successfully_validated) {
|
||||
$this->errors[$work_path][] = __('Incorrect value');
|
||||
$this->_errors[$work_path][] = __('Incorrect value');
|
||||
$result = false;
|
||||
continue;
|
||||
}
|
||||
@ -611,7 +620,7 @@ class FormDisplay
|
||||
}
|
||||
|
||||
// save forms
|
||||
if ($allow_partial_save || empty($this->errors)) {
|
||||
if ($allow_partial_save || empty($this->_errors)) {
|
||||
foreach ($to_save as $work_path => $path) {
|
||||
// TrustedProxies requires changes before saving
|
||||
if ($path == 'TrustedProxies') {
|
||||
@ -637,7 +646,10 @@ class FormDisplay
|
||||
$cf->set($work_path, $values[$path], $path);
|
||||
}
|
||||
if ($is_setup_script) {
|
||||
$cf->set('UserprefsDisallow', array_keys($this->userprefs_disallow));
|
||||
$cf->set(
|
||||
'UserprefsDisallow',
|
||||
array_keys($this->_userprefs_disallow)
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -654,7 +666,7 @@ class FormDisplay
|
||||
*/
|
||||
public function hasErrors()
|
||||
{
|
||||
return count($this->errors) > 0;
|
||||
return count($this->_errors) > 0;
|
||||
}
|
||||
|
||||
|
||||
@ -722,13 +734,13 @@ class FormDisplay
|
||||
*/
|
||||
private function _loadUserprefsInfo()
|
||||
{
|
||||
if ($this->userprefs_keys === null) {
|
||||
$this->userprefs_keys = array_flip(PMA_read_userprefs_fieldnames());
|
||||
if ($this->_userprefs_keys === null) {
|
||||
$this->_userprefs_keys = array_flip(PMA_read_userprefs_fieldnames());
|
||||
// read real config for user preferences display
|
||||
$userprefs_disallow = defined('PMA_SETUP')
|
||||
? ConfigFile::getInstance()->get('UserprefsDisallow', array())
|
||||
: $GLOBALS['cfg']['UserprefsDisallow'];
|
||||
$this->userprefs_disallow = array_flip($userprefs_disallow);
|
||||
$this->_userprefs_disallow = array_flip($userprefs_disallow);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -278,6 +278,7 @@ $strConfigLeftDisplayLogo_name = __('Display logo');
|
||||
$strConfigLeftDisplayServers_desc = __('Display server choice at the top of the left frame');
|
||||
$strConfigLeftDisplayServers_name = __('Display servers selection');
|
||||
$strConfigLeftDisplayTableFilterMinimum_name = __('Minimum number of tables to display the table filter box');
|
||||
$strConfigLeftDisplayDatabaseFilterMinimum_name = __('Minimum number of databases to display the database filter box');
|
||||
$strConfigLeftFrameDBSeparator_desc = __('String that separates databases into different tree levels');
|
||||
$strConfigLeftFrameDBSeparator_name = __('Database tree separator');
|
||||
$strConfigLeftFrameDBTree_desc = __('Only light version; display databases in a tree (determined by the separator defined below)');
|
||||
|
||||
@ -84,6 +84,7 @@ $forms['Left_frame']['Left_frame'] = array(
|
||||
'LeftPointerEnable',
|
||||
'LeftRecentTable');
|
||||
$forms['Left_frame']['Left_databases'] = array(
|
||||
'LeftDisplayDatabaseFilterMinimum',
|
||||
'DisplayDatabasesList',
|
||||
'LeftFrameDBTree',
|
||||
'LeftFrameDBSeparator',
|
||||
|
||||
@ -515,7 +515,32 @@ function PMA_DBI_get_tables_full($database, $table = false,
|
||||
. PMA_backquote($each_database);
|
||||
}
|
||||
|
||||
$each_tables = PMA_DBI_fetch_result($sql, 'Name', null, $link);
|
||||
$useStatusCache = false;
|
||||
|
||||
if (extension_loaded('apc')
|
||||
&& isset($GLOBALS['cfg']['Server']['StatusCacheDatabases'])
|
||||
&& ! empty($GLOBALS['cfg']['Server']['StatusCacheLifetime'])) {
|
||||
$statusCacheDatabases = (array) $GLOBALS['cfg']['Server']['StatusCacheDatabases'];
|
||||
if (in_array($each_database, $statusCacheDatabases)) {
|
||||
$useStatusCache = true;
|
||||
}
|
||||
}
|
||||
|
||||
$each_tables = null;
|
||||
|
||||
if ($useStatusCache) {
|
||||
$cacheKey = 'phpMyAdmin_tableStatus_' . sha1($GLOBALS['cfg']['Server']['host'] . '_' . $sql);
|
||||
|
||||
$each_tables = apc_fetch($cacheKey);
|
||||
}
|
||||
|
||||
if (!$each_tables) {
|
||||
$each_tables = PMA_DBI_fetch_result($sql, 'Name', null, $link);
|
||||
}
|
||||
|
||||
if ($useStatusCache) {
|
||||
apc_store($cacheKey, $each_tables, $GLOBALS['cfg']['Server']['StatusCacheLifetime']);
|
||||
}
|
||||
|
||||
// Sort naturally if the config allows it and we're sorting
|
||||
// the Name column.
|
||||
|
||||
@ -201,8 +201,19 @@ if (! $GLOBALS['server']) {
|
||||
.'</form>' . "\n"
|
||||
. '</div>' . "\n";
|
||||
} else {
|
||||
|
||||
if (count($GLOBALS['pma']->databases) >= $GLOBALS['cfg']['LeftDisplayDatabaseFilterMinimum']) {
|
||||
?>
|
||||
<span id="NavDbFilter">
|
||||
<span id="clear_fast_db_filter" title="<?php echo __('Clear'); ?>">X</span>
|
||||
<input type="text" class="gray" name="fast_db_filter" id="fast_db_filter" title="<?php echo __('Filter databases by name'); ?>" value="<?php echo __('Filter databases by name'); ?>" />
|
||||
</span>
|
||||
<?php
|
||||
}
|
||||
|
||||
echo $GLOBALS['pma']->databases->getHtmlListGrouped(true, $_SESSION['tmp_user_values']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']) . "\n";
|
||||
}
|
||||
|
||||
$_url_params = array('pos' => $pos);
|
||||
PMA_listNavigator(count($GLOBALS['pma']->databases), $pos, $_url_params, 'navigation.php', 'frame_navigation', $GLOBALS['cfg']['MaxDbList']);
|
||||
}
|
||||
|
||||
1294
po/be@latin.po
1294
po/be@latin.po
File diff suppressed because it is too large
Load Diff
1723
po/en_GB.po
1723
po/en_GB.po
File diff suppressed because it is too large
Load Diff
1274
po/phpmyadmin.pot
1274
po/phpmyadmin.pot
File diff suppressed because it is too large
Load Diff
1317
po/pt_BR.po
1317
po/pt_BR.po
File diff suppressed because it is too large
Load Diff
1296
po/sr@latin.po
1296
po/sr@latin.po
File diff suppressed because it is too large
Load Diff
1278
po/uz@latin.po
1278
po/uz@latin.po
File diff suppressed because it is too large
Load Diff
1278
po/zh_CN.po
1278
po/zh_CN.po
File diff suppressed because it is too large
Load Diff
1349
po/zh_TW.po
1349
po/zh_TW.po
File diff suppressed because it is too large
Load Diff
@ -4,7 +4,7 @@ set -e
|
||||
|
||||
for file in `find js -name '*.js' -not -name '*min.js'` ; do
|
||||
mkdir -p sources/`dirname $file`
|
||||
java -jar ./scripts/google-javascript-compiler/compiler.jar --js $file --js_output_file $file.tmp
|
||||
yui-compressor $file > $file.tmp
|
||||
cp -a $file sources/$file
|
||||
mv $file.tmp $file
|
||||
done
|
||||
|
||||
@ -1,202 +0,0 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
@ -1,261 +0,0 @@
|
||||
/*
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
//
|
||||
// Contents
|
||||
//
|
||||
|
||||
The Closure Compiler performs checking, instrumentation, and
|
||||
optimizations on JavaScript code. The purpose of this README is to
|
||||
explain how to build and run the Closure Compiler.
|
||||
|
||||
The Closure Compiler requires Java 6 or higher.
|
||||
http://www.java.com/
|
||||
|
||||
|
||||
//
|
||||
// Building The Closure Compiler
|
||||
//
|
||||
|
||||
There are three ways to get a Closure Compiler executable.
|
||||
|
||||
1) Use one we built for you.
|
||||
|
||||
Pre-built Closure binaries can be found at
|
||||
http://code.google.com/p/closure-compiler/downloads/list
|
||||
|
||||
|
||||
2) Check out the source and build it with Apache Ant.
|
||||
|
||||
First, check out the full source tree of the Closure Compiler. There
|
||||
are instructions on how to do this at the project site.
|
||||
http://code.google.com/p/closure-compiler/source/checkout
|
||||
|
||||
Apache Ant is a cross-platform build tool.
|
||||
http://ant.apache.org/
|
||||
|
||||
At the root of the source tree, there is an Ant file named
|
||||
build.xml. To use it, navigate to the same directory and type the
|
||||
command
|
||||
|
||||
ant jar
|
||||
|
||||
This will produce a jar file called "build/compiler.jar".
|
||||
|
||||
|
||||
3) Check out the source and build it with Eclipse.
|
||||
|
||||
Eclipse is a cross-platform IDE.
|
||||
http://www.eclipse.org/
|
||||
|
||||
Under Eclipse's File menu, click "New > Project ..." and create a
|
||||
"Java Project." You will see an options screen. Give the project a
|
||||
name, select "Create project from existing source," and choose the
|
||||
root of the checked-out source tree as the existing directory. Verify
|
||||
that you are using JRE version 6 or higher.
|
||||
|
||||
Eclipse can use the build.xml file to discover rules. When you
|
||||
navigate to the build.xml file, you will see all the build rules in
|
||||
the "Outline" pane. Run the "jar" rule to build the compiler in
|
||||
build/compiler.jar.
|
||||
|
||||
|
||||
//
|
||||
// Running The Closure Compiler
|
||||
//
|
||||
|
||||
Once you have the jar binary, running the Closure Compiler is straightforward.
|
||||
|
||||
On the command line, type
|
||||
|
||||
java -jar compiler.jar
|
||||
|
||||
This starts the compiler in interactive mode. Type
|
||||
|
||||
var x = 17 + 25;
|
||||
|
||||
then hit "Enter", then hit "Ctrl-Z" (on Windows) or "Ctrl-D" (on Mac or Linux)
|
||||
and "Enter" again. The Compiler will respond:
|
||||
|
||||
var x=42;
|
||||
|
||||
The Closure Compiler has many options for reading input from a file,
|
||||
writing output to a file, checking your code, and running
|
||||
optimizations. To learn more, type
|
||||
|
||||
java -jar compiler.jar --help
|
||||
|
||||
You can read more detailed documentation about the many flags at
|
||||
http://code.google.com/closure/compiler/docs/gettingstarted_app.html
|
||||
|
||||
|
||||
//
|
||||
// Compiling Multiple Scripts
|
||||
//
|
||||
|
||||
If you have multiple scripts, you should compile them all together with
|
||||
one compile command.
|
||||
|
||||
java -jar compiler.jar --js=in1.js --js=in2.js ... --js_output_file=out.js
|
||||
|
||||
The Closure Compiler will concatenate the files in the order they're
|
||||
passed at the command line.
|
||||
|
||||
If you need to compile many, many scripts together, you may start to
|
||||
run into problems with managing dependencies between scripts. You
|
||||
should check out the Closure Library. It contains functions for
|
||||
enforcing dependencies between scripts, and a tool called calcdeps.py
|
||||
that knows how to give scripts to the Closure Compiler in the right
|
||||
order.
|
||||
|
||||
http://code.google.com/p/closure-library/
|
||||
|
||||
//
|
||||
// Licensing
|
||||
//
|
||||
|
||||
Unless otherwise stated, all source files are licensed under
|
||||
the Apache License, Version 2.0.
|
||||
|
||||
|
||||
-----
|
||||
Code under:
|
||||
src/com/google/javascript/rhino
|
||||
test/com/google/javascript/rhino
|
||||
|
||||
URL: http://www.mozilla.org/rhino
|
||||
Version: 1.5R3, with heavy modifications
|
||||
License: Netscape Public License and MPL / GPL dual license
|
||||
|
||||
Description: A partial copy of Mozilla Rhino. Mozilla Rhino is an
|
||||
implementation of JavaScript for the JVM. The JavaScript parser and
|
||||
the parse tree data structures were extracted and modified
|
||||
significantly for use by Google's JavaScript compiler.
|
||||
|
||||
Local Modifications: The packages have been renamespaced. All code not
|
||||
relavant to parsing has been removed. A JSDoc parser and static typing
|
||||
system have been added.
|
||||
|
||||
|
||||
-----
|
||||
Code in:
|
||||
lib/libtrunk_rhino_parser_jarjared.jar
|
||||
|
||||
Rhino
|
||||
URL: http://www.mozilla.org/rhino
|
||||
Version: Trunk
|
||||
License: Netscape Public License and MPL / GPL dual license
|
||||
|
||||
Description: Mozilla Rhino is an implementation of JavaScript for the JVM.
|
||||
|
||||
Local Modifications: None. We've used JarJar to renamespace the code
|
||||
post-compilation. See:
|
||||
http://code.google.com/p/jarjar/
|
||||
|
||||
|
||||
-----
|
||||
Code in:
|
||||
lib/args4j_deploy.jar
|
||||
|
||||
Args4j
|
||||
URL: https://args4j.dev.java.net/
|
||||
Version: 2.0.9
|
||||
License: MIT
|
||||
|
||||
Description:
|
||||
args4j is a small Java class library that makes it easy to parse command line
|
||||
options/arguments in your CUI application.
|
||||
|
||||
Local Modifications: None.
|
||||
|
||||
|
||||
-----
|
||||
Code in:
|
||||
lib/google_common_deploy.jar
|
||||
|
||||
Guava Libraries
|
||||
URL: http://code.google.com/p/guava-libraries/
|
||||
Version: Trunk
|
||||
License: Apache License 2.0
|
||||
|
||||
Description: Google's core Java libraries.
|
||||
|
||||
Local Modifications: None.
|
||||
|
||||
|
||||
-----
|
||||
Code in:
|
||||
lib/hamcrest-core-1.1.jar
|
||||
|
||||
Hamcrest
|
||||
URL: http://code.google.com/p/hamcrest
|
||||
License: BSD
|
||||
License File: LICENSE
|
||||
|
||||
Description:
|
||||
Provides a library of matcher objects (also known as constraints or
|
||||
predicates) allowing 'match' rules to be defined declaratively, to be used in
|
||||
other frameworks. Typical scenarios include testing frameworks, mocking
|
||||
libraries and UI validation rules.
|
||||
|
||||
Local modifications:
|
||||
The original jars contained both source code and compiled classes.
|
||||
|
||||
hamcrest-core-1.1.jar just contains the compiled classes.
|
||||
|
||||
|
||||
----
|
||||
Code in:
|
||||
lib/junit.jar
|
||||
|
||||
JUnit
|
||||
URL: http://sourceforge.net/projects/junit/
|
||||
Version: 4.5
|
||||
License: Common Public License 1.0
|
||||
|
||||
Description: A framework for writing and running automated tests in Java.
|
||||
|
||||
Local Modifications: None.
|
||||
|
||||
|
||||
---
|
||||
Code in:
|
||||
lib/protobuf_deploy.jar
|
||||
|
||||
Protocol Buffers
|
||||
URL: http://code.google.com/p/protobuf/
|
||||
Version: 2.2.0a
|
||||
License: New BSD License
|
||||
|
||||
Description: Supporting libraries for protocol buffers,
|
||||
an encoding of structured data.
|
||||
|
||||
Local Modifications: None
|
||||
|
||||
|
||||
---
|
||||
Code in:
|
||||
lib/ant_deploy.jar
|
||||
|
||||
URL: http://ant.apache.org/bindownload.cgi
|
||||
Version: 1.6.5
|
||||
License: Apache License 2.0
|
||||
Description:
|
||||
Ant is a Java based build tool. In theory it is kind of like "make"
|
||||
without make's wrinkles and with the full portability of pure java code.
|
||||
|
||||
Local Modifications:
|
||||
Modified apache-ant-1.6.5/bin/ant to look in the ant.runfiles directory
|
||||
Binary file not shown.
@ -114,7 +114,7 @@ messages_show_html();
|
||||
|
||||
<a href="#" id="show_hidden_messages" style="display:none"><?php echo __('Show hidden messages (#MSG_COUNT)') ?></a>
|
||||
|
||||
<h3><?php echo __('Servers') ?></h3>
|
||||
<fieldset class="simple"><legend><?php echo __('Servers') ?></legend>
|
||||
<?php
|
||||
//
|
||||
// Display server list
|
||||
@ -171,8 +171,9 @@ display_form_top(
|
||||
<?php
|
||||
display_form_bottom();
|
||||
?>
|
||||
</fieldset>
|
||||
|
||||
<h3><?php echo __('Configuration file') ?></h3>
|
||||
<fieldset class="simple"><legend><?php echo __('Configuration file') ?></legend>
|
||||
<?php
|
||||
//
|
||||
// Display config file settings and load/save form
|
||||
@ -180,7 +181,9 @@ display_form_bottom();
|
||||
$form_display = new FormDisplay();
|
||||
|
||||
display_form_top('config.php');
|
||||
display_fieldset_top('', '', null, array('class' => 'simple'));
|
||||
?>
|
||||
<table width="100%" cellspacing="0">
|
||||
<?php
|
||||
|
||||
// Display language list
|
||||
$opts = array(
|
||||
@ -258,10 +261,11 @@ if (!$config_exists || !$config_writable) {
|
||||
?>" class="red" />
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<?php
|
||||
display_fieldset_bottom_simple();
|
||||
display_form_bottom();
|
||||
?>
|
||||
</fieldset>
|
||||
<div id="footer">
|
||||
<a href="http://phpmyadmin.net"><?php echo __('phpMyAdmin homepage') ?></a>
|
||||
<a href="http://sourceforge.net/donate/index.php?group_id=23067"><?php
|
||||
|
||||
@ -18,7 +18,7 @@ if ($page === '') {
|
||||
$page = 'index';
|
||||
}
|
||||
if (!file_exists("./setup/frames/$page.inc.php")) {
|
||||
// it will happen only when enterung URL by hand, we don't care for these cases
|
||||
// it will happen only when entering URL by hand, we don't care for these cases
|
||||
PMA_fatalError(__('Wrong GET file attribute value'));
|
||||
}
|
||||
|
||||
|
||||
408
setup/styles.css
408
setup/styles.css
@ -2,23 +2,42 @@
|
||||
|
||||
body {
|
||||
padding-bottom: 1em;
|
||||
color: #444;
|
||||
font: .8em sans-serif;
|
||||
background: url(../themes/pmahomme/img/left_nav_bg.png) repeat-y 80px 0 #f3f3f3;
|
||||
}
|
||||
|
||||
input,
|
||||
button,
|
||||
select,
|
||||
textarea,
|
||||
th,
|
||||
td {
|
||||
font: 1em sans-serif;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #004C96;
|
||||
a,
|
||||
a:link,
|
||||
a:visited,
|
||||
a:active {
|
||||
text-decoration: none;
|
||||
color: #235a81;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
|
||||
}
|
||||
|
||||
a:hover, a:active {
|
||||
color: #000;
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
color: #235a81;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 1.5em;
|
||||
font-family: Verdana, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
/* language selection box */
|
||||
@ -33,32 +52,33 @@ h1 {
|
||||
|
||||
#menu {
|
||||
float: left;
|
||||
width: 200px;
|
||||
width: 220px;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
|
||||
#menu ul {
|
||||
margin: 1em 1em 1em 0.5em;
|
||||
padding: 0 0.5em;
|
||||
margin: 1em 1em 1em .5em;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#menu li a {
|
||||
padding: 3px;
|
||||
font-weight: bold;
|
||||
padding: .5em .6em;
|
||||
margin-right: .6em;
|
||||
display: block;
|
||||
color: #669;
|
||||
color: #333;
|
||||
text-decoration: none;
|
||||
zoom: 1; /* IE fix */
|
||||
}
|
||||
|
||||
#menu li a:hover, #menu li a:active {
|
||||
color: #C00;
|
||||
background-color: #e4e4e4;
|
||||
}
|
||||
|
||||
/* page contents and footer layout */
|
||||
|
||||
#page {
|
||||
margin-left: 200px;
|
||||
margin-left: 220px;
|
||||
}
|
||||
|
||||
#footer {
|
||||
@ -87,102 +107,158 @@ h1 {
|
||||
|
||||
/* main page messages */
|
||||
|
||||
div.notice, div.warning, div.error {
|
||||
margin: 0.5em 0;
|
||||
padding: 10px 10px 10px 36px;
|
||||
border: 1px solid #000;
|
||||
background: #FFD url(../themes/original/img/b_tipp.png) no-repeat 10px 0.8em;
|
||||
}
|
||||
|
||||
div.notice h4, div.warning h4, div.error h4 {
|
||||
/* message boxes: error, confirmation */
|
||||
.success h4,
|
||||
.notice h4,
|
||||
div.error h4 {
|
||||
border-bottom: 1px solid;
|
||||
font-weight: bold;
|
||||
font-size: large;
|
||||
margin: 0 0 0.2em 0;
|
||||
border-bottom: 1px solid #000;
|
||||
margin: 0 0 .2em 0;
|
||||
}
|
||||
|
||||
div.notice {
|
||||
border-color: #FFD700;
|
||||
background-color: #FFD;
|
||||
background-image: url(../themes/original/img/s_notice.png);
|
||||
div.success,
|
||||
div.notice,
|
||||
div.error,
|
||||
div.footnotes {
|
||||
margin: .5em 0 1.3em 0;
|
||||
border: 1px solid;
|
||||
background-repeat: no-repeat;
|
||||
background-position: 10px 10px;
|
||||
padding: 10px 10px 10px 25px;
|
||||
|
||||
-moz-border-radius: 5px;
|
||||
-webkit-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
|
||||
-moz-box-shadow: 0 1px 1px #fff inset;
|
||||
-webkit-box-shadow: 0 1px 1px #fff inset;
|
||||
box-shadow: 0 1px 1px #fff inset;
|
||||
}
|
||||
|
||||
div.notice h4 {
|
||||
border-color: #FFD700;
|
||||
.success a,
|
||||
.notice a,
|
||||
.error a,
|
||||
.footnotes a {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.success {
|
||||
color: #000;
|
||||
background-color: #ebf8a4;
|
||||
}
|
||||
|
||||
h1.success,
|
||||
div.success {
|
||||
border-color: #a2d246;
|
||||
background-image: url(../themes/pmahomme/img/s_success.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 5px 10px;
|
||||
}
|
||||
.success h4 {
|
||||
border-color: #00FF00;
|
||||
}
|
||||
|
||||
.notice,
|
||||
.footnotes {
|
||||
color: #000;
|
||||
background-color: #e8eef1;
|
||||
}
|
||||
|
||||
h1.notice,
|
||||
div.notice,
|
||||
div.footnotes {
|
||||
border-color: #3a6c7e;
|
||||
background-image: url(../themes/pmahomme/img/s_notice.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 5px 10px;
|
||||
}
|
||||
|
||||
.notice h4 {
|
||||
border-color: #ffb10a;
|
||||
}
|
||||
|
||||
.error {
|
||||
border: 1px solid maroon !important;
|
||||
color: #000;
|
||||
background: #fcf;
|
||||
}
|
||||
|
||||
h1.error,
|
||||
div.error {
|
||||
border-color: #333;
|
||||
background-image: url(../themes/pmahomme/img/s_error.png);
|
||||
background-repeat: no-repeat;
|
||||
background-position: 5px 10px;
|
||||
}
|
||||
|
||||
div.error h4 {
|
||||
border-color: #ff0000;
|
||||
}
|
||||
|
||||
div.notice[id^=version_check] {
|
||||
border-color: #002DFF;
|
||||
background-color: #EEF;
|
||||
background-color: #EEF;
|
||||
}
|
||||
|
||||
div.notice[id^=version_check] h4 {
|
||||
border-color: #002DFF;
|
||||
}
|
||||
|
||||
div.warning {
|
||||
border-color: #C00;
|
||||
background-color: #FFC;
|
||||
background-image: url(../themes/original/img/s_notice.png);
|
||||
}
|
||||
|
||||
div.warning h4 {
|
||||
color: #C00;
|
||||
border-color: #C00;
|
||||
}
|
||||
|
||||
div.error {
|
||||
border-color: #D00;
|
||||
background-color: #FFC;
|
||||
background-image: url(../themes/original/img/s_error.png);
|
||||
}
|
||||
|
||||
div.error h4 {
|
||||
color: #D00;
|
||||
border-color: #D00;
|
||||
}
|
||||
|
||||
/* form tabs */
|
||||
|
||||
ul.tabs {
|
||||
margin: 0;
|
||||
padding: 0 0 7px 0;
|
||||
margin: 1.1em .2em 0;
|
||||
padding: 0 0 .3em 0;
|
||||
list-style: none;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
ul.tabs li {
|
||||
float: left;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
ul.tabs li a {
|
||||
display: block;
|
||||
margin: 2px 2px 0;
|
||||
padding: 2px 8px;
|
||||
background: #DEE1FF;
|
||||
margin: .1em .2em 0;
|
||||
white-space: nowrap;
|
||||
text-decoration: none;
|
||||
border: 1px #9AA4FF solid;
|
||||
border-bottom: none;
|
||||
border: 1px solid #D5D5D5;
|
||||
border-bottom: 1px solid #aaa;
|
||||
}
|
||||
|
||||
ul.tabs li a:hover, ul.tabs li a:active, ul.tabs li.active a {
|
||||
margin: 0;
|
||||
padding: 2px 10px 4px;
|
||||
background: #F7FBFF;
|
||||
ul.tabs li a {
|
||||
padding: 7px 10px;
|
||||
-webkit-border-radius: 5px 5px 0 0;
|
||||
-moz-border-radius: 5px 5px 0 0;
|
||||
border-radius: 5px 5px 0 0;
|
||||
background: #f2f2f2;
|
||||
color: #555;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
}
|
||||
|
||||
ul.tabs li a:hover, ul.tabs li a:active {
|
||||
color: #C00;
|
||||
ul.tabs li a:hover,
|
||||
ul.tabs li a:active {
|
||||
background: #e5e5e5;
|
||||
}
|
||||
|
||||
ul.tabs li.active a {
|
||||
background-color: #fff;
|
||||
margin-top: 1px;
|
||||
color: #000;
|
||||
text-shadow: none;
|
||||
border-color: #aaa;
|
||||
border-bottom: 1px solid #fff;
|
||||
}
|
||||
|
||||
.tabs_contents {
|
||||
border-top: 2px #66B solid;
|
||||
margin-top: 1em;
|
||||
}
|
||||
|
||||
.tabs_contents fieldset {
|
||||
margin-top: 0;
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
.tabs_contents legend {
|
||||
@ -203,28 +279,54 @@ ul.tabs li a:hover, ul.tabs li a:active {
|
||||
/* forms */
|
||||
|
||||
fieldset {
|
||||
padding: 0;
|
||||
margin-top: 1em;
|
||||
border: 2px #DEE1FF solid;
|
||||
background: #DEE1FF;
|
||||
border-radius: 4px 4px 0 0;
|
||||
-moz-border-radius: 4px 4px 0 0;
|
||||
-webkit-border-radius: 4px 4px 0 0;
|
||||
border: #aaa solid 1px;
|
||||
padding: 1.5em;
|
||||
background: #eee;
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
-moz-box-shadow: 1px 1px 2px #fff inset;
|
||||
-webkit-box-shadow: 1px 1px 2px #fff inset;
|
||||
box-shadow: 1px 1px 2px #fff inset;
|
||||
}
|
||||
|
||||
fieldset.optbox {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
fieldset fieldset {
|
||||
margin: .8em;
|
||||
background: #fff;
|
||||
border: 1px solid #aaa;
|
||||
background: #E8E8E8;
|
||||
|
||||
}
|
||||
|
||||
fieldset legend {
|
||||
font-weight: bold;
|
||||
color: #444;
|
||||
padding: 5px 10px;
|
||||
border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border: 1px solid #aaa;
|
||||
background-color: #fff;
|
||||
-moz-box-shadow: 3px 3px 15px #bbb;
|
||||
-webkit-box-shadow: 3px 3px 15px #bbb;
|
||||
box-shadow: 3px 3px 15px #bbb;
|
||||
}
|
||||
|
||||
.form {
|
||||
border: 2px #DEE1FF solid;
|
||||
}
|
||||
|
||||
fieldset legend {
|
||||
margin-left: 1em;
|
||||
padding: 2px 8px;
|
||||
font-weight: bold;
|
||||
background: #F7FBFF;
|
||||
border: 1px #9AA4FF solid;
|
||||
}
|
||||
|
||||
fieldset p {
|
||||
margin: 0;
|
||||
padding: 0.5em;
|
||||
background: #DEE1FF;
|
||||
padding: .5em;
|
||||
background: #fff;
|
||||
border-top: 0;
|
||||
}
|
||||
|
||||
fieldset .errors { /* form error list */
|
||||
@ -246,8 +348,8 @@ fieldset .inline_errors { /* field error list */
|
||||
font-size: small;
|
||||
}
|
||||
|
||||
fieldset table {
|
||||
background: #FFF;
|
||||
table caption, table th, table td {
|
||||
text-shadow: 0 1px 0 #FFFFFF;
|
||||
}
|
||||
|
||||
fieldset th {
|
||||
@ -255,9 +357,15 @@ fieldset th {
|
||||
min-width: 350px;
|
||||
padding: 0.3em 0.3em 0.3em 0.5em;
|
||||
text-align: left;
|
||||
font-weight: bold;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
fieldset.simple th {
|
||||
width: auto;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
fieldset .doc {
|
||||
margin-left: 1em;
|
||||
}
|
||||
@ -288,7 +396,7 @@ fieldset th small {
|
||||
}
|
||||
|
||||
fieldset th, fieldset td, .form .lastrow {
|
||||
border-top: 1px #555 dotted;
|
||||
border-top: 1px solid #D5D5D5;
|
||||
}
|
||||
|
||||
fieldset .group-header th {
|
||||
@ -296,11 +404,6 @@ fieldset .group-header th {
|
||||
border: none;
|
||||
}
|
||||
|
||||
fieldset .group-header + tr th, fieldset .group-header + tr td,
|
||||
fieldset p + table tr:first-child td, fieldset p + table tr:first-child th {
|
||||
border-top: none;
|
||||
}
|
||||
|
||||
fieldset .group-field-1 th, fieldset .group-header-2 th {
|
||||
padding-left: 1em;
|
||||
}
|
||||
@ -314,23 +417,123 @@ fieldset .group-field-3 th {
|
||||
}
|
||||
|
||||
fieldset .lastrow, .form .lastrow {
|
||||
background: #F7FBFF;
|
||||
padding: 0.5em;
|
||||
border-top: 1px #000 solid;
|
||||
background: #D3DCE3;
|
||||
padding: .5em;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
fieldset .lastrow input, .form .lastrow input {
|
||||
font-weight: bold;
|
||||
input[type=text] {
|
||||
border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
|
||||
box-shadow: 0 1px 2px #ddd;
|
||||
-moz-box-shadow: 0 1px 2px #ddd;
|
||||
-webkit-box-shadow: 0 1px 2px #ddd;
|
||||
|
||||
background: white;
|
||||
border: 1px solid #aaa;
|
||||
color: #555;
|
||||
padding: 4px;
|
||||
margin: 6px;
|
||||
|
||||
}
|
||||
|
||||
/* simple form, without header and legend */
|
||||
input[type=password] {
|
||||
border-radius: 2px;
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
|
||||
box-shadow: 0 1px 2px #ddd;
|
||||
-moz-box-shadow: 0 1px 2px #ddd;
|
||||
-webkit-box-shadow: 0 1px 2px #ddd;
|
||||
|
||||
background: white;
|
||||
border: 1px solid #aaa;
|
||||
color: #555;
|
||||
padding: 4px;
|
||||
margin: 6px;
|
||||
|
||||
fieldset.simple {
|
||||
border-top-color: #DEE1FF;
|
||||
}
|
||||
|
||||
fieldset.simple legend {
|
||||
display: none;
|
||||
input[type=submit],
|
||||
button[type=submit]:not(.mult_submit) {
|
||||
font-weight: bold !important;
|
||||
}
|
||||
|
||||
input[type=submit],
|
||||
button[type=submit]:not(.mult_submit),
|
||||
input[type=reset],
|
||||
input[name=submit_reset],
|
||||
input.button {
|
||||
margin-left: 14px;
|
||||
border: 1px solid #aaa;
|
||||
padding: 3px 7px;
|
||||
color: #111;
|
||||
text-decoration: none;
|
||||
background: #ddd;
|
||||
|
||||
border-radius: 12px;
|
||||
-webkit-border-radius: 12px;
|
||||
-moz-border-radius: 12px;
|
||||
|
||||
text-shadow: 0 1px 0 #fff;
|
||||
|
||||
background-image: url(../themes/svg_gradient.php?from=ffffff&to=cccccc);
|
||||
background-size: 100% 100%;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#ffffff), to(#cccccc));
|
||||
background: -webkit-linear-gradient(top, #ffffff, #cccccc);
|
||||
background: -moz-linear-gradient(top, #ffffff, #cccccc);
|
||||
background: -ms-linear-gradient(top, #ffffff, #cccccc);
|
||||
background: -o-linear-gradient(top, #ffffff, #cccccc);
|
||||
}
|
||||
|
||||
input[type=submit]:hover,
|
||||
button[type=submit]:not(.mult_submit):hover,
|
||||
input[type=reset]:hover,
|
||||
input[name=submit_reset]:hover,
|
||||
input.button:hover {
|
||||
position: relative;
|
||||
background-image: url(../themes/svg_gradient.php?from=cccccc&to=dddddd);
|
||||
background-size: 100% 100%;
|
||||
background: -webkit-gradient(linear, left top, left bottom, from(#cccccc), to(#dddddd));
|
||||
background: -webkit-linear-gradient(top, #cccccc, #dddddd);
|
||||
background: -moz-linear-gradient(top, #cccccc, #dddddd);
|
||||
background: -ms-linear-gradient(top, #cccccc, #dddddd);
|
||||
background: -o-linear-gradient(top, #cccccc, #dddddd);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
input[type=submit]:active,
|
||||
button[type=submit]:not(.mult_submit):active,
|
||||
input[type=reset]:active,
|
||||
input[name=submit_reset]:active,
|
||||
input.button:active {
|
||||
position: relative;
|
||||
top: 1px;
|
||||
left: 1px;
|
||||
}
|
||||
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
vertical-align: -11%;
|
||||
}
|
||||
|
||||
|
||||
select {
|
||||
-moz-border-radius: 2px;
|
||||
-webkit-border-radius: 2px;
|
||||
border-radius: 2px;
|
||||
|
||||
-moz-box-shadow: 0 1px 2px #ddd;
|
||||
-webkit-box-shadow: 0 1px 2px #ddd;
|
||||
box-shadow: 0 1px 2px #ddd;
|
||||
|
||||
border: 1px solid #aaa;
|
||||
color: #333;
|
||||
padding: 3px;
|
||||
background: white;
|
||||
}
|
||||
|
||||
fieldset.simple th, fieldset.simple td {
|
||||
@ -362,15 +565,6 @@ span.checkbox {
|
||||
border-color: #C11 !important;
|
||||
}
|
||||
|
||||
input[type="text"], select, textarea {
|
||||
border: 1px #A7A6AA solid;
|
||||
}
|
||||
|
||||
input[type="text"]:focus, select:focus, textarea:focus {
|
||||
border: 1px #6676FF solid;
|
||||
background: #F7FBFF;
|
||||
}
|
||||
|
||||
.field-comment {
|
||||
|
||||
position: relative;
|
||||
@ -388,7 +582,7 @@ input[type="text"]:focus, select:focus, textarea:focus {
|
||||
}
|
||||
|
||||
.green { /* default form button */
|
||||
color: #080;
|
||||
color: #080 !important;
|
||||
}
|
||||
|
||||
table.datatable {
|
||||
@ -397,7 +591,7 @@ table.datatable {
|
||||
|
||||
table.datatable th {
|
||||
padding: 0 1em 0 0.5em;
|
||||
border-bottom: 2px #66F solid;
|
||||
border-bottom: 1px #999 solid;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
*
|
||||
* display table zoom search form, create SQL queries from form data
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
/**
|
||||
@ -65,7 +66,7 @@ if (isset($_REQUEST['get_data_row']) && $_REQUEST['get_data_row'] == true) {
|
||||
$i = 0;
|
||||
foreach ($row as $col => $val) {
|
||||
if ($fields_meta[$i]->type == 'bit') {
|
||||
$row[$col] = PMA_printable_bit_value($val, $fields_meta[$i]->length);
|
||||
$row[$col] = PMA_printableBitValue($val, $fields_meta[$i]->length);
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
@ -175,7 +176,7 @@ if (! isset($zoom_submit) && ! isset($inputs)) {
|
||||
$url_params = array();
|
||||
$url_params['db'] = $db;
|
||||
$url_params['table'] = $table;
|
||||
echo PMA_generate_html_tabs(PMA_tbl_getSubTabs(), $url_params, 'topmenu2');
|
||||
echo PMA_generateHtmlTabs(PMA_tbl_getSubTabs(), $url_params, 'topmenu2');
|
||||
|
||||
/**
|
||||
* Set the field name,type,collation and whether null on select of a coulmn
|
||||
|
||||
@ -232,7 +232,8 @@ div#left_tableList ul ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#clear_fast_filter {
|
||||
#clear_fast_filter,
|
||||
#clear_fast_db_filter {
|
||||
background: white;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
@ -242,13 +243,16 @@ div#left_tableList ul ul {
|
||||
float: right;
|
||||
}
|
||||
|
||||
#fast_filter {
|
||||
#fast_filter,
|
||||
#fast_db_filter {
|
||||
width: 100%;
|
||||
padding: 2px 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
#fast_filter.gray {
|
||||
#fast_filter.gray,
|
||||
#fast_db_fiter.gray {
|
||||
color: gray;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -292,7 +292,8 @@ div#left_tableList ul ul {
|
||||
display: none;
|
||||
}
|
||||
|
||||
#clear_fast_filter {
|
||||
#clear_fast_filter,
|
||||
#clear_fast_db_filter {
|
||||
background: white;
|
||||
color: black;
|
||||
cursor: pointer;
|
||||
@ -302,11 +303,13 @@ div#left_tableList ul ul {
|
||||
right: 3ex;
|
||||
}
|
||||
|
||||
#fast_filter {
|
||||
#fast_filter,
|
||||
#fast_db_filter {
|
||||
width: 85%;
|
||||
padding: .1em;
|
||||
}
|
||||
|
||||
#fast_filter.gray {
|
||||
#fast_filter.gray,
|
||||
#fast_db_filter.gray {
|
||||
color: gray;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user