Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
31472e9f6a
@ -49,6 +49,7 @@ phpMyAdmin - ChangeLog
|
||||
- bug #3353811 [interface] Info message has "error" class
|
||||
- bug #3357837 [interface] TABbing through a NULL field in the inline mode resets NULL
|
||||
- remove version number in /setup
|
||||
- bug #3367993 [usability] Missing "Generate Password" button
|
||||
|
||||
3.4.3.1 (2011-07-02)
|
||||
- [security] Fixed possible session manipulation in swekey authentication, see PMASA-2011-5
|
||||
|
||||
@ -527,6 +527,7 @@ $(document).ready(function() {
|
||||
}
|
||||
});
|
||||
|
||||
displayPasswordGenerateButton();
|
||||
}, 'top.frame_content'); //end $(document).ready()
|
||||
|
||||
/**#@- */
|
||||
|
||||
@ -254,32 +254,32 @@ class TableProperty
|
||||
$lines[] = "using System.Text;";
|
||||
$lines[] = "namespace ".cgMakeIdentifier($db);
|
||||
$lines[] = "{";
|
||||
$lines[] = " #region ".cgMakeIdentifier($table);
|
||||
$lines[] = " public class ".cgMakeIdentifier($table);
|
||||
$lines[] = " {";
|
||||
$lines[] = " #region Member Variables";
|
||||
$lines[] = " #region ".cgMakeIdentifier($table);
|
||||
$lines[] = " public class ".cgMakeIdentifier($table);
|
||||
$lines[] = " {";
|
||||
$lines[] = " #region Member Variables";
|
||||
foreach ($tableProperties as $tablePropertie)
|
||||
$lines[] = $tablePropertie->formatCs(" protected #dotNetPrimitiveType# _#name#;");
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = " #region Constructors";
|
||||
$lines[] = " public ".cgMakeIdentifier($table)."() { }";
|
||||
$lines[] = $tablePropertie->formatCs(" protected #dotNetPrimitiveType# _#name#;");
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = " #region Constructors";
|
||||
$lines[] = " public ".cgMakeIdentifier($table)."() { }";
|
||||
$temp = array();
|
||||
foreach ($tableProperties as $tablePropertie)
|
||||
if (! $tablePropertie->isPK())
|
||||
$temp[] = $tablePropertie->formatCs("#dotNetPrimitiveType# #name#");
|
||||
$lines[] = " public ".cgMakeIdentifier($table)."(".implode(", ", $temp).")";
|
||||
$lines[] = " {";
|
||||
$lines[] = " public ".cgMakeIdentifier($table)."(".implode(", ", $temp).")";
|
||||
$lines[] = " {";
|
||||
foreach ($tableProperties as $tablePropertie)
|
||||
if (! $tablePropertie->isPK())
|
||||
$lines[] = $tablePropertie->formatCs(" this._#name#=#name#;");
|
||||
$lines[] = " }";
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = " #region Public Properties";
|
||||
$lines[] = $tablePropertie->formatCs(" this._#name#=#name#;");
|
||||
$lines[] = " }";
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = " #region Public Properties";
|
||||
foreach ($tableProperties as $tablePropertie)
|
||||
$lines[] = $tablePropertie->formatCs(" public virtual #dotNetPrimitiveType# #ucfirstName#\n {\n get {return _#name#;}\n set {_#name#=value;}\n }");
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = " }";
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = $tablePropertie->formatCs(" public virtual #dotNetPrimitiveType# #ucfirstName#\n {\n get {return _#name#;}\n set {_#name#=value;}\n }");
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = " }";
|
||||
$lines[] = " #endregion";
|
||||
$lines[] = "}";
|
||||
PMA_DBI_free_result($result);
|
||||
}
|
||||
@ -291,7 +291,7 @@ class TableProperty
|
||||
$lines=array();
|
||||
$lines[] = "<?xml version=\"1.0\" encoding=\"utf-8\" ?>";
|
||||
$lines[] = "<hibernate-mapping xmlns=\"urn:nhibernate-mapping-2.2\" namespace=\"".cgMakeIdentifier($db)."\" assembly=\"".cgMakeIdentifier($db)."\">";
|
||||
$lines[] = " <class name=\"".cgMakeIdentifier($table)."\" table=\"".cgMakeIdentifier($table)."\">";
|
||||
$lines[] = " <class name=\"".cgMakeIdentifier($table)."\" table=\"".cgMakeIdentifier($table)."\">";
|
||||
$result = PMA_DBI_query(sprintf("DESC %s.%s", PMA_backquote($db), PMA_backquote($table)));
|
||||
if ($result)
|
||||
{
|
||||
@ -301,13 +301,13 @@ class TableProperty
|
||||
foreach ($tableProperties as $tablePropertie)
|
||||
{
|
||||
if ($tablePropertie->isPK())
|
||||
$lines[] = $tablePropertie->formatXml(" <id name=\"#ucfirstName#\" type=\"#dotNetObjectType#\" unsaved-value=\"0\">\n <column name=\"#name#\" sql-type=\"#type#\" not-null=\"#notNull#\" unique=\"#unique#\" index=\"PRIMARY\"/>\n <generator class=\"native\" />\n </id>");
|
||||
$lines[] = $tablePropertie->formatXml(" <id name=\"#ucfirstName#\" type=\"#dotNetObjectType#\" unsaved-value=\"0\">\n <column name=\"#name#\" sql-type=\"#type#\" not-null=\"#notNull#\" unique=\"#unique#\" index=\"PRIMARY\"/>\n <generator class=\"native\" />\n </id>");
|
||||
else
|
||||
$lines[] = $tablePropertie->formatXml(" <property name=\"#ucfirstName#\" type=\"#dotNetObjectType#\">\n <column name=\"#name#\" sql-type=\"#type#\" not-null=\"#notNull#\" #indexName#/>\n </property>");
|
||||
$lines[] = $tablePropertie->formatXml(" <property name=\"#ucfirstName#\" type=\"#dotNetObjectType#\">\n <column name=\"#name#\" sql-type=\"#type#\" not-null=\"#notNull#\" #indexName#/>\n </property>");
|
||||
}
|
||||
PMA_DBI_free_result($result);
|
||||
}
|
||||
$lines[]=" </class>";
|
||||
$lines[]=" </class>";
|
||||
$lines[]="</hibernate-mapping>";
|
||||
return implode("\n", $lines);
|
||||
}
|
||||
|
||||
@ -74,7 +74,7 @@ function PMA_exportHeader() {
|
||||
global $db;
|
||||
global $table;
|
||||
global $tables;
|
||||
|
||||
|
||||
$export_struct = isset($GLOBALS['xml_export_functions']) || isset($GLOBALS['xml_export_procedures'])
|
||||
|| isset($GLOBALS['xml_export_tables']) || isset($GLOBALS['xml_export_triggers'])
|
||||
|| isset($GLOBALS['xml_export_views']);
|
||||
@ -114,7 +114,7 @@ function PMA_exportHeader() {
|
||||
$head .= ' -->' . $crlf;
|
||||
$head .= ' <pma:structure_schemas>' . $crlf;
|
||||
$head .= ' <pma:database name="' . htmlspecialchars($db) . '" collation="' . $db_collation . '" charset="' . $db_charset . '">' . $crlf;
|
||||
|
||||
|
||||
if (count($tables) == 0) {
|
||||
$tables[] = $table;
|
||||
}
|
||||
@ -131,23 +131,23 @@ function PMA_exportHeader() {
|
||||
} else {
|
||||
$type = 'table';
|
||||
}
|
||||
|
||||
|
||||
if ($is_view && ! isset($GLOBALS['xml_export_views'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
if (! $is_view && ! isset($GLOBALS['xml_export_tables'])) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$head .= ' <pma:' . $type . ' name="' . $table . '">' . $crlf;
|
||||
|
||||
|
||||
$tbl = " " . htmlspecialchars($tbl);
|
||||
$tbl = str_replace("\n", "\n ", $tbl);
|
||||
|
||||
$head .= $tbl . ';' . $crlf;
|
||||
$head .= ' </pma:' . $type . '>' . $crlf;
|
||||
|
||||
|
||||
if (isset($GLOBALS['xml_export_triggers']) && $GLOBALS['xml_export_triggers']) {
|
||||
// Export triggers
|
||||
$triggers = PMA_DBI_get_triggers($db, $table);
|
||||
@ -170,7 +170,7 @@ function PMA_exportHeader() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($GLOBALS['xml_export_functions']) && $GLOBALS['xml_export_functions']) {
|
||||
// Export functions
|
||||
$functions = PMA_DBI_get_procedures_or_functions($db, 'FUNCTION');
|
||||
@ -193,7 +193,7 @@ function PMA_exportHeader() {
|
||||
unset($functions);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (isset($GLOBALS['xml_export_procedures']) && $GLOBALS['xml_export_procedures']) {
|
||||
// Export procedures
|
||||
$procedures = PMA_DBI_get_procedures_or_functions($db, 'PROCEDURE');
|
||||
@ -240,13 +240,13 @@ function PMA_exportHeader() {
|
||||
*/
|
||||
function PMA_exportDBHeader($db) {
|
||||
global $crlf;
|
||||
|
||||
|
||||
if (isset($GLOBALS['xml_export_contents']) && $GLOBALS['xml_export_contents']) {
|
||||
$head = ' <!--' . $crlf
|
||||
. ' - ' . __('Database') . ': ' . (isset($GLOBALS['use_backquotes']) ? PMA_backquote($db) : '\'' . $db . '\''). $crlf
|
||||
. ' -->' . $crlf
|
||||
. ' <database name="' . htmlspecialchars($db) . '">' . $crlf;
|
||||
|
||||
|
||||
return PMA_exportOutputHandler($head);
|
||||
}
|
||||
else
|
||||
@ -265,7 +265,7 @@ function PMA_exportDBHeader($db) {
|
||||
*/
|
||||
function PMA_exportDBFooter($db) {
|
||||
global $crlf;
|
||||
|
||||
|
||||
if (isset($GLOBALS['xml_export_contents']) && $GLOBALS['xml_export_contents']) {
|
||||
return PMA_exportOutputHandler(' </database>' . $crlf);
|
||||
}
|
||||
@ -300,6 +300,7 @@ function PMA_exportDBCreate($db) {
|
||||
* @access public
|
||||
*/
|
||||
function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
|
||||
|
||||
if (isset($GLOBALS['xml_export_contents']) && $GLOBALS['xml_export_contents']) {
|
||||
$result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user