The branch, master has been updated via 7a31e75eb6b2e1d243e31eec953db22b46a0627c (commit) via 40d7c3b8baa84c474af5f710e60351b05330f3c6 (commit) via b185ca88f7c8241804cff13a2b315fc3d1222a38 (commit) via 2cc22c8aba33ad12b3d98905d6dfc29f7c878837 (commit) via 70083ad58346ff7190bcd8e56b63ab92f6abfa40 (commit) via 65d962d39703b412dc482be47e092f97933eb8e0 (commit) via 6d0f28b425dc9f975543301c4b194dd6fbdd494d (commit) from 108f73842355a942314f93b8b4bbfa75199564a2 (commit)
- Log ----------------------------------------------------------------- commit 7a31e75eb6b2e1d243e31eec953db22b46a0627c Merge: 108f73842355a942314f93b8b4bbfa75199564a2 40d7c3b8baa84c474af5f710e60351b05330f3c6 Author: Rouslan Placella rouslan@placella.com Date: Fri Jul 15 16:10:24 2011 +0100
Merge branch 'QA_3_4'
Conflicts: libraries/export/codegen.php libraries/export/xml.php
-----------------------------------------------------------------------
Summary of changes: libraries/export/codegen.php | 44 +++++++++++++++++++++--------------------- libraries/export/xml.php | 23 +++++++++++---------- 2 files changed, 34 insertions(+), 33 deletions(-)
diff --git a/libraries/export/codegen.php b/libraries/export/codegen.php index ffed7d1..5ee114d 100644 --- a/libraries/export/codegen.php +++ b/libraries/export/codegen.php @@ -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); } diff --git a/libraries/export/xml.php b/libraries/export/xml.php index cfa07f5..9247e22 100644 --- a/libraries/export/xml.php +++ b/libraries/export/xml.php @@ -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);
hooks/post-receive