Git
Threads by month
- ----- 2025 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- 12 participants
- 38618 discussions

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-12838-g8cb1f3a
by Michal Čihař 02 Aug '11
by Michal Čihař 02 Aug '11
02 Aug '11
The branch, master has been updated
via 8cb1f3a1cc1a089e53a89c1a4f59cd63a1ddecf8 (commit)
from 8cb8a3d4c75dc6bf9665d4a3e80a2fea1a1b31eb (commit)
- Log -----------------------------------------------------------------
commit 8cb1f3a1cc1a089e53a89c1a4f59cd63a1ddecf8
Author: Michal Čihař <mcihar(a)suse.cz>
Date: Tue Aug 2 15:25:27 2011 +0200
Fix indentation
-----------------------------------------------------------------------
Summary of changes:
libraries/export/codegen.php | 334 +++++++++---------
libraries/export/csv.php | 330 +++++++++---------
libraries/export/htmlword.php | 546 ++++++++++++++--------------
libraries/export/json.php | 242 +++++++-------
libraries/export/latex.php | 658 +++++++++++++++++-----------------
libraries/export/mediawiki.php | 228 ++++++------
libraries/export/ods.php | 344 +++++++++---------
libraries/export/odt.php | 594 ++++++++++++++++----------------
libraries/export/pdf.php | 764 ++++++++++++++++++++--------------------
9 files changed, 2020 insertions(+), 2020 deletions(-)
diff --git a/libraries/export/codegen.php b/libraries/export/codegen.php
index 357eac0..b8b35d5 100644
--- a/libraries/export/codegen.php
+++ b/libraries/export/codegen.php
@@ -42,188 +42,188 @@ if (isset($plugin_list)) {
);
} else {
-/**
- * Set of functions used to build exports of tables
- */
-
-/**
- * Outputs export footer
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportFooter()
-{
- return true;
-}
-
-/**
- * Outputs export header
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportHeader()
-{
- return true;
-}
-
-/**
- * Outputs database header
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBHeader($db)
-{
- return true;
-}
-
-/**
- * Outputs database footer
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBFooter($db)
-{
- return true;
-}
-
-/**
- * Outputs CREATE DATABASE statement
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBCreate($db)
-{
- return true;
-}
+ /**
+ * Set of functions used to build exports of tables
+ */
-/**
- * Outputs the content of a table in NHibernate format
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param string $sql_query SQL query for obtaining data
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
-{
- global $CG_FORMATS, $CG_HANDLERS, $what;
- $format = $GLOBALS[$what . '_format'];
- if (isset($CG_FORMATS[$format])) {
- return PMA_exportOutputHandler($CG_HANDLERS[$format]($db, $table, $crlf));
- }
- return PMA_exportOutputHandler(sprintf("%s is not supported.", $format));
-}
-
-/**
- *
- * @package phpMyAdmin-Export
- * @subpackage Codegen
- */
-class TableProperty
-{
- public $name;
- public $type;
- public $nullable;
- public $key;
- public $defaultValue;
- public $ext;
- function __construct($row)
- {
- $this->name = trim($row[0]);
- $this->type = trim($row[1]);
- $this->nullable = trim($row[2]);
- $this->key = trim($row[3]);
- $this->defaultValue = trim($row[4]);
- $this->ext = trim($row[5]);
- }
- function getPureType()
- {
- $pos=strpos($this->type, "(");
- if ($pos > 0)
- return substr($this->type, 0, $pos);
- return $this->type;
- }
- function isNotNull()
- {
- return $this->nullable == "NO" ? "true" : "false";
- }
- function isUnique()
+ /**
+ * Outputs export footer
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportFooter()
{
- return $this->key == "PRI" || $this->key == "UNI" ? "true" : "false";
+ return true;
}
- function getDotNetPrimitiveType()
- {
- if (strpos($this->type, "int") === 0) return "int";
- if (strpos($this->type, "long") === 0) return "long";
- if (strpos($this->type, "char") === 0) return "string";
- if (strpos($this->type, "varchar") === 0) return "string";
- if (strpos($this->type, "text") === 0) return "string";
- if (strpos($this->type, "longtext") === 0) return "string";
- if (strpos($this->type, "tinyint") === 0) return "bool";
- if (strpos($this->type, "datetime") === 0) return "DateTime";
- return "unknown";
- }
- function getDotNetObjectType()
+
+ /**
+ * Outputs export header
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportHeader()
{
- if (strpos($this->type, "int") === 0) return "Int32";
- if (strpos($this->type, "long") === 0) return "Long";
- if (strpos($this->type, "char") === 0) return "String";
- if (strpos($this->type, "varchar") === 0) return "String";
- if (strpos($this->type, "text") === 0) return "String";
- if (strpos($this->type, "longtext") === 0) return "String";
- if (strpos($this->type, "tinyint") === 0) return "Boolean";
- if (strpos($this->type, "datetime") === 0) return "DateTime";
- return "Unknown";
+ return true;
}
- function getIndexName()
+
+ /**
+ * Outputs database header
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBHeader($db)
{
- if (strlen($this->key)>0)
- return "index=\"" . htmlspecialchars($this->name, ENT_COMPAT, 'UTF-8') . "\"";
- return "";
+ return true;
}
- function isPK()
+
+ /**
+ * Outputs database footer
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBFooter($db)
{
- return $this->key=="PRI";
+ return true;
}
- function formatCs($text)
+
+ /**
+ * Outputs CREATE DATABASE statement
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBCreate($db)
{
- $text=str_replace("#name#", cgMakeIdentifier($this->name, false), $text);
- return $this->format($text);
+ return true;
}
- function formatXml($text)
+
+ /**
+ * Outputs the content of a table in NHibernate format
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param string $sql_query SQL query for obtaining data
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
{
- $text=str_replace("#name#", htmlspecialchars($this->name, ENT_COMPAT, 'UTF-8'), $text);
- $text=str_replace("#indexName#", $this->getIndexName(), $text);
- return $this->format($text);
+ global $CG_FORMATS, $CG_HANDLERS, $what;
+ $format = $GLOBALS[$what . '_format'];
+ if (isset($CG_FORMATS[$format])) {
+ return PMA_exportOutputHandler($CG_HANDLERS[$format]($db, $table, $crlf));
+ }
+ return PMA_exportOutputHandler(sprintf("%s is not supported.", $format));
}
- function format($text)
+
+ /**
+ *
+ * @package phpMyAdmin-Export
+ * @subpackage Codegen
+ */
+ class TableProperty
{
- $text=str_replace("#ucfirstName#", cgMakeIdentifier($this->name), $text);
- $text=str_replace("#dotNetPrimitiveType#", $this->getDotNetPrimitiveType(), $text);
- $text=str_replace("#dotNetObjectType#", $this->getDotNetObjectType(), $text);
- $text=str_replace("#type#", $this->getPureType(), $text);
- $text=str_replace("#notNull#", $this->isNotNull(), $text);
- $text=str_replace("#unique#", $this->isUnique(), $text);
- return $text;
+ public $name;
+ public $type;
+ public $nullable;
+ public $key;
+ public $defaultValue;
+ public $ext;
+ function __construct($row)
+ {
+ $this->name = trim($row[0]);
+ $this->type = trim($row[1]);
+ $this->nullable = trim($row[2]);
+ $this->key = trim($row[3]);
+ $this->defaultValue = trim($row[4]);
+ $this->ext = trim($row[5]);
+ }
+ function getPureType()
+ {
+ $pos=strpos($this->type, "(");
+ if ($pos > 0)
+ return substr($this->type, 0, $pos);
+ return $this->type;
+ }
+ function isNotNull()
+ {
+ return $this->nullable == "NO" ? "true" : "false";
+ }
+ function isUnique()
+ {
+ return $this->key == "PRI" || $this->key == "UNI" ? "true" : "false";
+ }
+ function getDotNetPrimitiveType()
+ {
+ if (strpos($this->type, "int") === 0) return "int";
+ if (strpos($this->type, "long") === 0) return "long";
+ if (strpos($this->type, "char") === 0) return "string";
+ if (strpos($this->type, "varchar") === 0) return "string";
+ if (strpos($this->type, "text") === 0) return "string";
+ if (strpos($this->type, "longtext") === 0) return "string";
+ if (strpos($this->type, "tinyint") === 0) return "bool";
+ if (strpos($this->type, "datetime") === 0) return "DateTime";
+ return "unknown";
+ }
+ function getDotNetObjectType()
+ {
+ if (strpos($this->type, "int") === 0) return "Int32";
+ if (strpos($this->type, "long") === 0) return "Long";
+ if (strpos($this->type, "char") === 0) return "String";
+ if (strpos($this->type, "varchar") === 0) return "String";
+ if (strpos($this->type, "text") === 0) return "String";
+ if (strpos($this->type, "longtext") === 0) return "String";
+ if (strpos($this->type, "tinyint") === 0) return "Boolean";
+ if (strpos($this->type, "datetime") === 0) return "DateTime";
+ return "Unknown";
+ }
+ function getIndexName()
+ {
+ if (strlen($this->key)>0)
+ return "index=\"" . htmlspecialchars($this->name, ENT_COMPAT, 'UTF-8') . "\"";
+ return "";
+ }
+ function isPK()
+ {
+ return $this->key=="PRI";
+ }
+ function formatCs($text)
+ {
+ $text=str_replace("#name#", cgMakeIdentifier($this->name, false), $text);
+ return $this->format($text);
+ }
+ function formatXml($text)
+ {
+ $text=str_replace("#name#", htmlspecialchars($this->name, ENT_COMPAT, 'UTF-8'), $text);
+ $text=str_replace("#indexName#", $this->getIndexName(), $text);
+ return $this->format($text);
+ }
+ function format($text)
+ {
+ $text=str_replace("#ucfirstName#", cgMakeIdentifier($this->name), $text);
+ $text=str_replace("#dotNetPrimitiveType#", $this->getDotNetPrimitiveType(), $text);
+ $text=str_replace("#dotNetObjectType#", $this->getDotNetObjectType(), $text);
+ $text=str_replace("#type#", $this->getPureType(), $text);
+ $text=str_replace("#notNull#", $this->isNotNull(), $text);
+ $text=str_replace("#unique#", $this->isUnique(), $text);
+ return $text;
+ }
}
-}
function cgMakeIdentifier($str, $ucfirst = true)
{
diff --git a/libraries/export/csv.php b/libraries/export/csv.php
index 19ca573..8b04841 100644
--- a/libraries/export/csv.php
+++ b/libraries/export/csv.php
@@ -35,189 +35,189 @@ if (isset($plugin_list)) {
);
} else {
-/**
- * Outputs export footer
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportFooter() {
- return true;
-}
+ /**
+ * Outputs export footer
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportFooter() {
+ return true;
+ }
-/**
- * Outputs export header
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportHeader() {
- global $what;
- global $csv_terminated;
- global $csv_separator;
- global $csv_enclosed;
- global $csv_escaped;
+ /**
+ * Outputs export header
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportHeader() {
+ global $what;
+ global $csv_terminated;
+ global $csv_separator;
+ global $csv_enclosed;
+ global $csv_escaped;
- // Here we just prepare some values for export
- if ($what == 'excel') {
- $csv_terminated = "\015\012";
- switch($GLOBALS['excel_edition']) {
- case 'win':
- // as tested on Windows with Excel 2002 and Excel 2007
- $csv_separator = ';';
- break;
- case 'mac_excel2003':
- $csv_separator = ';';
- break;
- case 'mac_excel2008':
- $csv_separator = ',';
- break;
- }
- $csv_enclosed = '"';
- $csv_escaped = '"';
- if (isset($GLOBALS['excel_columns'])) {
- $GLOBALS['csv_columns'] = 'yes';
- }
- } else {
- if (empty($csv_terminated) || strtolower($csv_terminated) == 'auto') {
- $csv_terminated = $GLOBALS['crlf'];
+ // Here we just prepare some values for export
+ if ($what == 'excel') {
+ $csv_terminated = "\015\012";
+ switch($GLOBALS['excel_edition']) {
+ case 'win':
+ // as tested on Windows with Excel 2002 and Excel 2007
+ $csv_separator = ';';
+ break;
+ case 'mac_excel2003':
+ $csv_separator = ';';
+ break;
+ case 'mac_excel2008':
+ $csv_separator = ',';
+ break;
+ }
+ $csv_enclosed = '"';
+ $csv_escaped = '"';
+ if (isset($GLOBALS['excel_columns'])) {
+ $GLOBALS['csv_columns'] = 'yes';
+ }
} else {
- $csv_terminated = str_replace('\\r', "\015", $csv_terminated);
- $csv_terminated = str_replace('\\n', "\012", $csv_terminated);
- $csv_terminated = str_replace('\\t', "\011", $csv_terminated);
- } // end if
- $csv_separator = str_replace('\\t', "\011", $csv_separator);
+ if (empty($csv_terminated) || strtolower($csv_terminated) == 'auto') {
+ $csv_terminated = $GLOBALS['crlf'];
+ } else {
+ $csv_terminated = str_replace('\\r', "\015", $csv_terminated);
+ $csv_terminated = str_replace('\\n', "\012", $csv_terminated);
+ $csv_terminated = str_replace('\\t', "\011", $csv_terminated);
+ } // end if
+ $csv_separator = str_replace('\\t', "\011", $csv_separator);
+ }
+ return true;
}
- return true;
-}
-/**
- * Outputs database header
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBHeader($db) {
- return true;
-}
-
-/**
- * Outputs database footer
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBFooter($db) {
- return true;
-}
+ /**
+ * Outputs database header
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBHeader($db) {
+ return true;
+ }
-/**
- * Outputs CREATE DATABASE statement
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBCreate($db) {
- return true;
-}
+ /**
+ * Outputs database footer
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBFooter($db) {
+ return true;
+ }
-/**
- * Outputs the content of a table in CSV format
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param string $sql_query SQL query for obtaining data
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
- global $what;
- global $csv_terminated;
- global $csv_separator;
- global $csv_enclosed;
- global $csv_escaped;
+ /**
+ * Outputs CREATE DATABASE statement
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBCreate($db) {
+ return true;
+ }
- // Gets the data from the database
- $result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
- $fields_cnt = PMA_DBI_num_fields($result);
+ /**
+ * Outputs the content of a table in CSV format
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param string $sql_query SQL query for obtaining data
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
+ global $what;
+ global $csv_terminated;
+ global $csv_separator;
+ global $csv_enclosed;
+ global $csv_escaped;
- // If required, get fields name at the first line
- if (isset($GLOBALS['csv_columns'])) {
- $schema_insert = '';
- for ($i = 0; $i < $fields_cnt; $i++) {
- if ($csv_enclosed == '') {
- $schema_insert .= stripslashes(PMA_DBI_field_name($result, $i));
- } else {
- $schema_insert .= $csv_enclosed
- . str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, stripslashes(PMA_DBI_field_name($result, $i)))
- . $csv_enclosed;
- }
- $schema_insert .= $csv_separator;
- } // end for
- $schema_insert =trim(substr($schema_insert, 0, -1));
- if (!PMA_exportOutputHandler($schema_insert . $csv_terminated)) {
- return false;
- }
- } // end if
+ // Gets the data from the database
+ $result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
+ $fields_cnt = PMA_DBI_num_fields($result);
- // Format the data
- while ($row = PMA_DBI_fetch_row($result)) {
- $schema_insert = '';
- for ($j = 0; $j < $fields_cnt; $j++) {
- if (!isset($row[$j]) || is_null($row[$j])) {
- $schema_insert .= $GLOBALS[$what . '_null'];
- } elseif ($row[$j] == '0' || $row[$j] != '') {
- // always enclose fields
- if ($what == 'excel') {
- $row[$j] = preg_replace("/\015(\012)?/", "\012", $row[$j]);
- }
- // remove CRLF characters within field
- if (isset($GLOBALS[$what . '_removeCRLF']) && $GLOBALS[$what . '_removeCRLF']) {
- $row[$j] = str_replace("\n", "", str_replace("\r", "", $row[$j]));
- }
+ // If required, get fields name at the first line
+ if (isset($GLOBALS['csv_columns'])) {
+ $schema_insert = '';
+ for ($i = 0; $i < $fields_cnt; $i++) {
if ($csv_enclosed == '') {
- $schema_insert .= $row[$j];
+ $schema_insert .= stripslashes(PMA_DBI_field_name($result, $i));
} else {
- // also double the escape string if found in the data
- if ('csv' == $what) {
- $schema_insert .= $csv_enclosed
- . str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, str_replace($csv_escaped, $csv_escaped . $csv_escaped, $row[$j]))
+ $schema_insert .= $csv_enclosed
+ . str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, stripslashes(PMA_DBI_field_name($result, $i)))
. $csv_enclosed;
+ }
+ $schema_insert .= $csv_separator;
+ } // end for
+ $schema_insert =trim(substr($schema_insert, 0, -1));
+ if (!PMA_exportOutputHandler($schema_insert . $csv_terminated)) {
+ return false;
+ }
+ } // end if
+
+ // Format the data
+ while ($row = PMA_DBI_fetch_row($result)) {
+ $schema_insert = '';
+ for ($j = 0; $j < $fields_cnt; $j++) {
+ if (!isset($row[$j]) || is_null($row[$j])) {
+ $schema_insert .= $GLOBALS[$what . '_null'];
+ } elseif ($row[$j] == '0' || $row[$j] != '') {
+ // always enclose fields
+ if ($what == 'excel') {
+ $row[$j] = preg_replace("/\015(\012)?/", "\012", $row[$j]);
+ }
+ // remove CRLF characters within field
+ if (isset($GLOBALS[$what . '_removeCRLF']) && $GLOBALS[$what . '_removeCRLF']) {
+ $row[$j] = str_replace("\n", "", str_replace("\r", "", $row[$j]));
+ }
+ if ($csv_enclosed == '') {
+ $schema_insert .= $row[$j];
} else {
- // for excel, avoid a problem when a field contains
- // double quotes
- $schema_insert .= $csv_enclosed
- . str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, $row[$j])
- . $csv_enclosed;
+ // also double the escape string if found in the data
+ if ('csv' == $what) {
+ $schema_insert .= $csv_enclosed
+ . str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, str_replace($csv_escaped, $csv_escaped . $csv_escaped, $row[$j]))
+ . $csv_enclosed;
+ } else {
+ // for excel, avoid a problem when a field contains
+ // double quotes
+ $schema_insert .= $csv_enclosed
+ . str_replace($csv_enclosed, $csv_escaped . $csv_enclosed, $row[$j])
+ . $csv_enclosed;
+ }
}
+ } else {
+ $schema_insert .= '';
}
- } else {
- $schema_insert .= '';
- }
- if ($j < $fields_cnt-1) {
- $schema_insert .= $csv_separator;
- }
- } // end for
+ if ($j < $fields_cnt-1) {
+ $schema_insert .= $csv_separator;
+ }
+ } // end for
- if (!PMA_exportOutputHandler($schema_insert . $csv_terminated)) {
- return false;
- }
- } // end while
- PMA_DBI_free_result($result);
+ if (!PMA_exportOutputHandler($schema_insert . $csv_terminated)) {
+ return false;
+ }
+ } // end while
+ PMA_DBI_free_result($result);
- return true;
-} // end of the 'PMA_getTableCsv()' function
+ return true;
+ } // end of the 'PMA_getTableCsv()' function
}
?>
diff --git a/libraries/export/htmlword.php b/libraries/export/htmlword.php
index 6604ac6..707bc77 100644
--- a/libraries/export/htmlword.php
+++ b/libraries/export/htmlword.php
@@ -34,321 +34,321 @@ if (isset($plugin_list)) {
);
} else {
-/**
- * Outputs export footer
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportFooter() {
- return PMA_exportOutputHandler('</body></html>');
-}
-
-/**
- * Outputs export header
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportHeader() {
- global $charset_of_file;
- return PMA_exportOutputHandler('<html xmlns:o="urn:schemas-microsoft-com:office:office"
-xmlns:x="urn:schemas-microsoft-com:office:word"
-xmlns="http://www.w3.org/TR/REC-html40">
-
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html>
-<head>
- <meta http-equiv="Content-type" content="text/html;charset=' . (isset($charset_of_file) ? $charset_of_file : 'utf-8') . '" />
-</head>
-<body>');
-}
-
-/**
- * Outputs database header
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBHeader($db) {
- return PMA_exportOutputHandler('<h1>' . __('Database') . ' ' . htmlspecialchars($db) . '</h1>');
-}
-
-/**
- * Outputs database footer
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBFooter($db) {
- return true;
-}
-
-/**
- * Outputs CREATE DATABASE statement
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBCreate($db) {
- return true;
-}
-
-/**
- * Outputs the content of a table in HTML (Microsoft Word) format
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param string $sql_query SQL query for obtaining data
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
-{
- global $what;
-
- if (! PMA_exportOutputHandler('<h2>' . __('Dumping data for table') . ' ' . htmlspecialchars($table) . '</h2>')) {
- return false;
- }
- if (! PMA_exportOutputHandler('<table class="width100" cellspacing="1">')) {
- return false;
+ /**
+ * Outputs export footer
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportFooter() {
+ return PMA_exportOutputHandler('</body></html>');
}
- // Gets the data from the database
- $result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
- $fields_cnt = PMA_DBI_num_fields($result);
-
- // If required, get fields name at the first line
- if (isset($GLOBALS['htmlword_columns'])) {
- $schema_insert = '<tr class="print-category">';
- for ($i = 0; $i < $fields_cnt; $i++) {
- $schema_insert .= '<td class="print"><b>' . htmlspecialchars(stripslashes(PMA_DBI_field_name($result, $i))) . '</b></td>';
- } // end for
- $schema_insert .= '</tr>';
- if (! PMA_exportOutputHandler($schema_insert)) {
- return false;
- }
- } // end if
-
- // Format the data
- while ($row = PMA_DBI_fetch_row($result)) {
- $schema_insert = '<tr class="print-category">';
- for ($j = 0; $j < $fields_cnt; $j++) {
- if (! isset($row[$j]) || is_null($row[$j])) {
- $value = $GLOBALS[$what . '_null'];
- } elseif ($row[$j] == '0' || $row[$j] != '') {
- $value = $row[$j];
- } else {
- $value = '';
- }
- $schema_insert .= '<td class="print">' . htmlspecialchars($value) . '</td>';
- } // end for
- $schema_insert .= '</tr>';
- if (! PMA_exportOutputHandler($schema_insert)) {
- return false;
- }
- } // end while
- PMA_DBI_free_result($result);
- if (! PMA_exportOutputHandler('</table>')) {
- return false;
+ /**
+ * Outputs export header
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportHeader() {
+ global $charset_of_file;
+ return PMA_exportOutputHandler('<html xmlns:o="urn:schemas-microsoft-com:office:office"
+ xmlns:x="urn:schemas-microsoft-com:office:word"
+ xmlns="http://www.w3.org/TR/REC-html40">
+
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+ <html>
+ <head>
+ <meta http-equiv="Content-type" content="text/html;charset=' . (isset($charset_of_file) ? $charset_of_file : 'utf-8') . '" />
+ </head>
+ <body>');
}
- return true;
-}
-
-/**
- * Outputs table's structure
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param bool $do_relation whether to include relation comments
- * @param bool $do_comments whether to include the pmadb-style column comments
- * as comments in the structure; this is deprecated
- * but the parameter is left here because export.php
- * calls PMA_exportStructure() also for other export
- * types which use this parameter
- * @param bool $do_mime whether to include mime comments
- * @param bool $dates whether to include creation/update/check dates
- * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in'
- * @param string $export_type 'server', 'database', 'table'
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type)
-{
- global $cfgRelation;
+ /**
+ * Outputs database header
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBHeader($db) {
+ return PMA_exportOutputHandler('<h1>' . __('Database') . ' ' . htmlspecialchars($db) . '</h1>');
+ }
- if (! PMA_exportOutputHandler('<h2>' . __('Table structure for table') . ' ' . htmlspecialchars($table) . '</h2>')) {
- return false;
+ /**
+ * Outputs database footer
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBFooter($db) {
+ return true;
}
/**
- * Get the unique keys in the table
+ * Outputs CREATE DATABASE statement
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- $keys_query = 'SHOW KEYS FROM ' . PMA_backquote($table) . ' FROM '. PMA_backquote($db);
- $keys_result = PMA_DBI_query($keys_query);
- $unique_keys = array();
- while ($key = PMA_DBI_fetch_assoc($keys_result)) {
- if ($key['Non_unique'] == 0) {
- $unique_keys[] = $key['Column_name'];
- }
+ function PMA_exportDBCreate($db) {
+ return true;
}
- PMA_DBI_free_result($keys_result);
/**
- * Gets fields properties
+ * Outputs the content of a table in HTML (Microsoft Word) format
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param string $sql_query SQL query for obtaining data
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- PMA_DBI_select_db($db);
+ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
+ {
+ global $what;
- // Check if we can use Relations
- if ($do_relation && ! empty($cfgRelation['relation'])) {
- // Find which tables are related with the current one and write it in
- // an array
- $res_rel = PMA_getForeigners($db, $table);
+ if (! PMA_exportOutputHandler('<h2>' . __('Dumping data for table') . ' ' . htmlspecialchars($table) . '</h2>')) {
+ return false;
+ }
+ if (! PMA_exportOutputHandler('<table class="width100" cellspacing="1">')) {
+ return false;
+ }
- if ($res_rel && count($res_rel) > 0) {
- $have_rel = true;
- } else {
- $have_rel = false;
+ // Gets the data from the database
+ $result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
+ $fields_cnt = PMA_DBI_num_fields($result);
+
+ // If required, get fields name at the first line
+ if (isset($GLOBALS['htmlword_columns'])) {
+ $schema_insert = '<tr class="print-category">';
+ for ($i = 0; $i < $fields_cnt; $i++) {
+ $schema_insert .= '<td class="print"><b>' . htmlspecialchars(stripslashes(PMA_DBI_field_name($result, $i))) . '</b></td>';
+ } // end for
+ $schema_insert .= '</tr>';
+ if (! PMA_exportOutputHandler($schema_insert)) {
+ return false;
+ }
+ } // end if
+
+ // Format the data
+ while ($row = PMA_DBI_fetch_row($result)) {
+ $schema_insert = '<tr class="print-category">';
+ for ($j = 0; $j < $fields_cnt; $j++) {
+ if (! isset($row[$j]) || is_null($row[$j])) {
+ $value = $GLOBALS[$what . '_null'];
+ } elseif ($row[$j] == '0' || $row[$j] != '') {
+ $value = $row[$j];
+ } else {
+ $value = '';
+ }
+ $schema_insert .= '<td class="print">' . htmlspecialchars($value) . '</td>';
+ } // end for
+ $schema_insert .= '</tr>';
+ if (! PMA_exportOutputHandler($schema_insert)) {
+ return false;
+ }
+ } // end while
+ PMA_DBI_free_result($result);
+ if (! PMA_exportOutputHandler('</table>')) {
+ return false;
}
- } else {
- $have_rel = false;
- } // end if
+
+ return true;
+ }
/**
- * Displays the table structure
+ * Outputs table's structure
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param bool $do_relation whether to include relation comments
+ * @param bool $do_comments whether to include the pmadb-style column comments
+ * as comments in the structure; this is deprecated
+ * but the parameter is left here because export.php
+ * calls PMA_exportStructure() also for other export
+ * types which use this parameter
+ * @param bool $do_mime whether to include mime comments
+ * @param bool $dates whether to include creation/update/check dates
+ * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in'
+ * @param string $export_type 'server', 'database', 'table'
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- if (! PMA_exportOutputHandler('<table class="width100" cellspacing="1">')) {
- return false;
- }
+ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type)
+ {
+ global $cfgRelation;
- $columns_cnt = 4;
- if ($do_relation && $have_rel) {
- $columns_cnt++;
- }
- if ($do_comments && $cfgRelation['commwork']) {
- $columns_cnt++;
- }
- if ($do_mime && $cfgRelation['mimework']) {
- $columns_cnt++;
- }
+ if (! PMA_exportOutputHandler('<h2>' . __('Table structure for table') . ' ' . htmlspecialchars($table) . '</h2>')) {
+ return false;
+ }
- $schema_insert = '<tr class="print-category">';
- $schema_insert .= '<th class="print">' . htmlspecialchars(__('Column')) . '</th>';
- $schema_insert .= '<td class="print"><b>' . htmlspecialchars(__('Type')) . '</b></td>';
- $schema_insert .= '<td class="print"><b>' . htmlspecialchars(__('Null')) . '</b></td>';
- $schema_insert .= '<td class="print"><b>' . htmlspecialchars(__('Default')) . '</b></td>';
- if ($do_relation && $have_rel) {
- $schema_insert .= '<td class="print"><b>' . htmlspecialchars(__('Links to')) . '</b></td>';
- }
- if ($do_comments) {
- $schema_insert .= '<td class="print"><b>' . htmlspecialchars(__('Comments')) . '</b></td>';
- $comments = PMA_getComments($db, $table);
- }
- if ($do_mime && $cfgRelation['mimework']) {
- $schema_insert .= '<td class="print"><b>' . htmlspecialchars('MIME') . '</b></td>';
- $mime_map = PMA_getMIME($db, $table, true);
- }
- $schema_insert .= '</tr>';
+ /**
+ * Get the unique keys in the table
+ */
+ $keys_query = 'SHOW KEYS FROM ' . PMA_backquote($table) . ' FROM '. PMA_backquote($db);
+ $keys_result = PMA_DBI_query($keys_query);
+ $unique_keys = array();
+ while ($key = PMA_DBI_fetch_assoc($keys_result)) {
+ if ($key['Non_unique'] == 0) {
+ $unique_keys[] = $key['Column_name'];
+ }
+ }
+ PMA_DBI_free_result($keys_result);
- if (! PMA_exportOutputHandler($schema_insert)) {
- return false;
- }
+ /**
+ * Gets fields properties
+ */
+ PMA_DBI_select_db($db);
- $columns = PMA_DBI_get_columns($db, $table);
- foreach ($columns as $column) {
+ // Check if we can use Relations
+ if ($do_relation && ! empty($cfgRelation['relation'])) {
+ // Find which tables are related with the current one and write it in
+ // an array
+ $res_rel = PMA_getForeigners($db, $table);
- $schema_insert = '<tr class="print-category">';
- $type = $column['Type'];
- // reformat mysql query output
- // set or enum types: slashes single quotes inside options
- if (preg_match('/^(set|enum)\((.+)\)$/i', $type, $tmp)) {
- $tmp[2] = substr(preg_replace('/([^,])\'\'/', '\\1\\\'', ',' . $tmp[2]), 1);
- $type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
- $type_nowrap = '';
-
- $binary = 0;
- $unsigned = 0;
- $zerofill = 0;
- } else {
- $type_nowrap = ' nowrap="nowrap"';
- $type = preg_replace('/BINARY/i', '', $type);
- $type = preg_replace('/ZEROFILL/i', '', $type);
- $type = preg_replace('/UNSIGNED/i', '', $type);
- if (empty($type)) {
- $type = ' ';
+ if ($res_rel && count($res_rel) > 0) {
+ $have_rel = true;
+ } else {
+ $have_rel = false;
}
+ } else {
+ $have_rel = false;
+ } // end if
- $binary = preg_match('/BINARY/i', $column['Type']);
- $unsigned = preg_match('/UNSIGNED/i', $column['Type']);
- $zerofill = preg_match('/ZEROFILL/i', $column['Type']);
- }
- $attribute = ' ';
- if ($binary) {
- $attribute = 'BINARY';
- }
- if ($unsigned) {
- $attribute = 'UNSIGNED';
- }
- if ($zerofill) {
- $attribute = 'UNSIGNED ZEROFILL';
- }
- if (! isset($column['Default'])) {
- if ($column['Null'] != 'NO') {
- $column['Default'] = 'NULL';
- }
+ /**
+ * Displays the table structure
+ */
+ if (! PMA_exportOutputHandler('<table class="width100" cellspacing="1">')) {
+ return false;
}
- $fmt_pre = '';
- $fmt_post = '';
- if (in_array($column['Field'], $unique_keys)) {
- $fmt_pre = '<b>' . $fmt_pre;
- $fmt_post = $fmt_post . '</b>';
+ $columns_cnt = 4;
+ if ($do_relation && $have_rel) {
+ $columns_cnt++;
}
- if ($column['Key'] == 'PRI') {
- $fmt_pre = '<i>' . $fmt_pre;
- $fmt_post = $fmt_post . '</i>';
+ if ($do_comments && $cfgRelation['commwork']) {
+ $columns_cnt++;
+ }
+ if ($do_mime && $cfgRelation['mimework']) {
+ $columns_cnt++;
}
- $schema_insert .= '<td class="print">' . $fmt_pre . htmlspecialchars($column['Field']) . $fmt_post . '</td>';
- $schema_insert .= '<td class="print">' . htmlspecialchars($type) . '</td>';
- $schema_insert .= '<td class="print">' . htmlspecialchars(($column['Null'] == '' || $column['Null'] == 'NO') ? __('No') : __('Yes')) . '</td>';
- $schema_insert .= '<td class="print">' . htmlspecialchars(isset($column['Default']) ? $column['Default'] : '') . '</td>';
-
- $field_name = $column['Field'];
+ $schema_insert = '<tr class="print-category">';
+ $schema_insert .= '<th class="print">' . htmlspecialchars(__('Column')) . '</th>';
+ $schema_insert .= '<td class="print"><b>' . htmlspecialchars(__('Type')) . '</b></td>';
+ $schema_insert .= '<td class="print"><b>' . htmlspecialchars(__('Null')) . '</b></td>';
+ $schema_insert .= '<td class="print"><b>' . htmlspecialchars(__('Default')) . '</b></td>';
if ($do_relation && $have_rel) {
- $schema_insert .= '<td class="print">' . (isset($res_rel[$field_name]) ? htmlspecialchars($res_rel[$field_name]['foreign_table'] . ' (' . $res_rel[$field_name]['foreign_field'] . ')') : '') . '</td>';
+ $schema_insert .= '<td class="print"><b>' . htmlspecialchars(__('Links to')) . '</b></td>';
}
- if ($do_comments && $cfgRelation['commwork']) {
- $schema_insert .= '<td class="print">' . (isset($comments[$field_name]) ? htmlspecialchars($comments[$field_name]) : '') . '</td>';
+ if ($do_comments) {
+ $schema_insert .= '<td class="print"><b>' . htmlspecialchars(__('Comments')) . '</b></td>';
+ $comments = PMA_getComments($db, $table);
}
if ($do_mime && $cfgRelation['mimework']) {
- $schema_insert .= '<td class="print">' . (isset($mime_map[$field_name]) ? htmlspecialchars(str_replace('_', '/', $mime_map[$field_name]['mimetype'])) : '') . '</td>';
+ $schema_insert .= '<td class="print"><b>' . htmlspecialchars('MIME') . '</b></td>';
+ $mime_map = PMA_getMIME($db, $table, true);
}
-
$schema_insert .= '</tr>';
if (! PMA_exportOutputHandler($schema_insert)) {
return false;
}
- } // end while
- return PMA_exportOutputHandler('</table>');
-}
+ $columns = PMA_DBI_get_columns($db, $table);
+ foreach ($columns as $column) {
+
+ $schema_insert = '<tr class="print-category">';
+ $type = $column['Type'];
+ // reformat mysql query output
+ // set or enum types: slashes single quotes inside options
+ if (preg_match('/^(set|enum)\((.+)\)$/i', $type, $tmp)) {
+ $tmp[2] = substr(preg_replace('/([^,])\'\'/', '\\1\\\'', ',' . $tmp[2]), 1);
+ $type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
+ $type_nowrap = '';
+
+ $binary = 0;
+ $unsigned = 0;
+ $zerofill = 0;
+ } else {
+ $type_nowrap = ' nowrap="nowrap"';
+ $type = preg_replace('/BINARY/i', '', $type);
+ $type = preg_replace('/ZEROFILL/i', '', $type);
+ $type = preg_replace('/UNSIGNED/i', '', $type);
+ if (empty($type)) {
+ $type = ' ';
+ }
+
+ $binary = preg_match('/BINARY/i', $column['Type']);
+ $unsigned = preg_match('/UNSIGNED/i', $column['Type']);
+ $zerofill = preg_match('/ZEROFILL/i', $column['Type']);
+ }
+ $attribute = ' ';
+ if ($binary) {
+ $attribute = 'BINARY';
+ }
+ if ($unsigned) {
+ $attribute = 'UNSIGNED';
+ }
+ if ($zerofill) {
+ $attribute = 'UNSIGNED ZEROFILL';
+ }
+ if (! isset($column['Default'])) {
+ if ($column['Null'] != 'NO') {
+ $column['Default'] = 'NULL';
+ }
+ }
+
+ $fmt_pre = '';
+ $fmt_post = '';
+ if (in_array($column['Field'], $unique_keys)) {
+ $fmt_pre = '<b>' . $fmt_pre;
+ $fmt_post = $fmt_post . '</b>';
+ }
+ if ($column['Key'] == 'PRI') {
+ $fmt_pre = '<i>' . $fmt_pre;
+ $fmt_post = $fmt_post . '</i>';
+ }
+ $schema_insert .= '<td class="print">' . $fmt_pre . htmlspecialchars($column['Field']) . $fmt_post . '</td>';
+ $schema_insert .= '<td class="print">' . htmlspecialchars($type) . '</td>';
+ $schema_insert .= '<td class="print">' . htmlspecialchars(($column['Null'] == '' || $column['Null'] == 'NO') ? __('No') : __('Yes')) . '</td>';
+ $schema_insert .= '<td class="print">' . htmlspecialchars(isset($column['Default']) ? $column['Default'] : '') . '</td>';
+
+ $field_name = $column['Field'];
+
+ if ($do_relation && $have_rel) {
+ $schema_insert .= '<td class="print">' . (isset($res_rel[$field_name]) ? htmlspecialchars($res_rel[$field_name]['foreign_table'] . ' (' . $res_rel[$field_name]['foreign_field'] . ')') : '') . '</td>';
+ }
+ if ($do_comments && $cfgRelation['commwork']) {
+ $schema_insert .= '<td class="print">' . (isset($comments[$field_name]) ? htmlspecialchars($comments[$field_name]) : '') . '</td>';
+ }
+ if ($do_mime && $cfgRelation['mimework']) {
+ $schema_insert .= '<td class="print">' . (isset($mime_map[$field_name]) ? htmlspecialchars(str_replace('_', '/', $mime_map[$field_name]['mimetype'])) : '') . '</td>';
+ }
+
+ $schema_insert .= '</tr>';
+
+ if (! PMA_exportOutputHandler($schema_insert)) {
+ return false;
+ }
+ } // end while
+
+ return PMA_exportOutputHandler('</table>');
+ }
}
?>
diff --git a/libraries/export/json.php b/libraries/export/json.php
index e008f0c..860d640 100644
--- a/libraries/export/json.php
+++ b/libraries/export/json.php
@@ -30,144 +30,144 @@ if (isset($plugin_list)) {
);
} else {
-/**
- * Set of functions used to build exports of tables
- */
+ /**
+ * Set of functions used to build exports of tables
+ */
+
+ /**
+ * Outputs export footer
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportFooter()
+ {
+ return true;
+ }
-/**
- * Outputs export footer
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportFooter()
-{
- return true;
-}
+ /**
+ * Outputs export header
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportHeader()
+ {
+ PMA_exportOutputHandler(
+ '/**' . $GLOBALS['crlf']
+ . ' Export to JSON plugin for PHPMyAdmin' . $GLOBALS['crlf']
+ . ' @version 0.1' . $GLOBALS['crlf']
+ . ' */' . $GLOBALS['crlf'] . $GLOBALS['crlf']
+ );
+ return true;
+ }
-/**
- * Outputs export header
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportHeader()
-{
- PMA_exportOutputHandler(
- '/**' . $GLOBALS['crlf']
- . ' Export to JSON plugin for PHPMyAdmin' . $GLOBALS['crlf']
- . ' @version 0.1' . $GLOBALS['crlf']
- . ' */' . $GLOBALS['crlf'] . $GLOBALS['crlf']
- );
- return true;
-}
+ /**
+ * Outputs database header
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBHeader($db)
+ {
+ PMA_exportOutputHandler('// Database \'' . $db . '\'' . $GLOBALS['crlf'] );
+ return true;
+ }
-/**
- * Outputs database header
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBHeader($db)
-{
- PMA_exportOutputHandler('// Database \'' . $db . '\'' . $GLOBALS['crlf'] );
- return true;
-}
+ /**
+ * Outputs database footer
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBFooter($db)
+ {
+ return true;
+ }
-/**
- * Outputs database footer
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBFooter($db)
-{
- return true;
-}
+ /**
+ * Outputs CREATE DATABASE statement
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBCreate($db)
+ {
+ return true;
+ }
-/**
- * Outputs CREATE DATABASE statement
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBCreate($db)
-{
- return true;
-}
+ /**
+ * Outputs the content of a table in JSON format
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param string $sql_query SQL query for obtaining data
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
+ {
+ $result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
+
+ $columns_cnt = PMA_DBI_num_fields($result);
+ for ($i = 0; $i < $columns_cnt; $i++) {
+ $columns[$i] = stripslashes(PMA_DBI_field_name($result, $i));
+ }
+ unset($i);
-/**
- * Outputs the content of a table in JSON format
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param string $sql_query SQL query for obtaining data
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
-{
- $result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
+ $buffer = '';
+ $record_cnt = 0;
+ while ($record = PMA_DBI_fetch_row($result)) {
- $columns_cnt = PMA_DBI_num_fields($result);
- for ($i = 0; $i < $columns_cnt; $i++) {
- $columns[$i] = stripslashes(PMA_DBI_field_name($result, $i));
- }
- unset($i);
+ $record_cnt++;
- $buffer = '';
- $record_cnt = 0;
- while ($record = PMA_DBI_fetch_row($result)) {
+ // Output table name as comment if this is the first record of the table
+ if ($record_cnt == 1) {
+ $buffer .= '// ' . $db . '.' . $table . $crlf . $crlf;
+ $buffer .= '[{';
+ } else {
+ $buffer .= ', {';
+ }
- $record_cnt++;
+ for ($i = 0; $i < $columns_cnt; $i++) {
- // Output table name as comment if this is the first record of the table
- if ($record_cnt == 1) {
- $buffer .= '// ' . $db . '.' . $table . $crlf . $crlf;
- $buffer .= '[{';
- } else {
- $buffer .= ', {';
- }
+ $isLastLine = ($i + 1 >= $columns_cnt);
- for ($i = 0; $i < $columns_cnt; $i++) {
+ $column = $columns[$i];
- $isLastLine = ($i + 1 >= $columns_cnt);
+ if (is_null($record[$i])) {
+ $buffer .= '"' . addslashes($column) . '": null' . (! $isLastLine ? ',' : '');
+ } elseif (is_numeric($record[$i])) {
+ $buffer .= '"' . addslashes($column) . '": ' . $record[$i] . (! $isLastLine ? ',' : '');
+ } else {
+ $buffer .= '"' . addslashes($column) . '": "' . addslashes($record[$i]) . '"' . (! $isLastLine ? ',' : '');
+ }
+ }
- $column = $columns[$i];
+ $buffer .= '}';
+ }
- if (is_null($record[$i])) {
- $buffer .= '"' . addslashes($column) . '": null' . (! $isLastLine ? ',' : '');
- } elseif (is_numeric($record[$i])) {
- $buffer .= '"' . addslashes($column) . '": ' . $record[$i] . (! $isLastLine ? ',' : '');
- } else {
- $buffer .= '"' . addslashes($column) . '": "' . addslashes($record[$i]) . '"' . (! $isLastLine ? ',' : '');
- }
+ if ($record_cnt) {
+ $buffer .= ']';
+ }
+ if (! PMA_exportOutputHandler($buffer)) {
+ return false;
}
- $buffer .= '}';
- }
+ PMA_DBI_free_result($result);
- if ($record_cnt) {
- $buffer .= ']';
- }
- if (! PMA_exportOutputHandler($buffer)) {
- return false;
+ return true;
}
- PMA_DBI_free_result($result);
-
- return true;
-}
-
}
diff --git a/libraries/export/latex.php b/libraries/export/latex.php
index 080d0ac..1c6064a 100644
--- a/libraries/export/latex.php
+++ b/libraries/export/latex.php
@@ -82,389 +82,389 @@ if (isset($plugin_list)) {
array('type' => 'end_group');
} else {
-/**
- * Escapes some special characters for use in TeX/LaTeX
- *
- * @param string the string to convert
- *
- * @return string the converted string with escape codes
- *
- * @access private
- */
-function PMA_texEscape($string) {
- $escape = array('$', '%', '{', '}', '&', '#', '_', '^');
- $cnt_escape = count($escape);
- for ($k=0; $k < $cnt_escape; $k++) {
- $string = str_replace($escape[$k], '\\' . $escape[$k], $string);
+ /**
+ * Escapes some special characters for use in TeX/LaTeX
+ *
+ * @param string the string to convert
+ *
+ * @return string the converted string with escape codes
+ *
+ * @access private
+ */
+ function PMA_texEscape($string) {
+ $escape = array('$', '%', '{', '}', '&', '#', '_', '^');
+ $cnt_escape = count($escape);
+ for ($k=0; $k < $cnt_escape; $k++) {
+ $string = str_replace($escape[$k], '\\' . $escape[$k], $string);
+ }
+ return $string;
}
- return $string;
-}
-/**
- * Outputs export footer
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportFooter() {
- return true;
-}
-
-/**
- * Outputs export header
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportHeader() {
- global $crlf;
- global $cfg;
-
- $head = '% phpMyAdmin LaTeX Dump' . $crlf
- . '% version ' . PMA_VERSION . $crlf
- . '% http://www.phpmyadmin.net' . $crlf
- . '%' . $crlf
- . '% ' . __('Host') . ': ' . $cfg['Server']['host'];
- if (!empty($cfg['Server']['port'])) {
- $head .= ':' . $cfg['Server']['port'];
+ /**
+ * Outputs export footer
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportFooter() {
+ return true;
}
- $head .= $crlf
- . '% ' . __('Generation Time') . ': ' . PMA_localisedDate() . $crlf
- . '% ' . __('Server version') . ': ' . PMA_MYSQL_STR_VERSION . $crlf
- . '% ' . __('PHP Version') . ': ' . phpversion() . $crlf;
- return PMA_exportOutputHandler($head);
-}
-
-/**
- * Outputs database header
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBHeader($db) {
- global $crlf;
- $head = '% ' . $crlf
- . '% ' . __('Database') . ': ' . (isset($GLOBALS['use_backquotes']) ? PMA_backquote($db) : '\'' . $db . '\''). $crlf
- . '% ' . $crlf;
- return PMA_exportOutputHandler($head);
-}
-
-/**
- * Outputs database footer
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBFooter($db) {
- return true;
-}
-
-/**
- * Outputs CREATE DATABASE statement
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBCreate($db) {
- return true;
-}
-
-/**
- * Outputs the content of a table in LaTeX table/sideways table environment
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param string $sql_query SQL query for obtaining data
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
- $result = PMA_DBI_try_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
- $columns_cnt = PMA_DBI_num_fields($result);
- for ($i = 0; $i < $columns_cnt; $i++) {
- $columns[$i] = PMA_DBI_field_name($result, $i);
+ /**
+ * Outputs export header
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportHeader() {
+ global $crlf;
+ global $cfg;
+
+ $head = '% phpMyAdmin LaTeX Dump' . $crlf
+ . '% version ' . PMA_VERSION . $crlf
+ . '% http://www.phpmyadmin.net' . $crlf
+ . '%' . $crlf
+ . '% ' . __('Host') . ': ' . $cfg['Server']['host'];
+ if (!empty($cfg['Server']['port'])) {
+ $head .= ':' . $cfg['Server']['port'];
+ }
+ $head .= $crlf
+ . '% ' . __('Generation Time') . ': ' . PMA_localisedDate() . $crlf
+ . '% ' . __('Server version') . ': ' . PMA_MYSQL_STR_VERSION . $crlf
+ . '% ' . __('PHP Version') . ': ' . phpversion() . $crlf;
+ return PMA_exportOutputHandler($head);
}
- unset($i);
-
- $buffer = $crlf . '%' . $crlf . '% ' . __('Data') . ': ' . $table . $crlf . '%' . $crlf
- . ' \\begin{longtable}{|';
- for ($index=0;$index<$columns_cnt;$index++) {
- $buffer .= 'l|';
+ /**
+ * Outputs database header
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBHeader($db) {
+ global $crlf;
+ $head = '% ' . $crlf
+ . '% ' . __('Database') . ': ' . (isset($GLOBALS['use_backquotes']) ? PMA_backquote($db) : '\'' . $db . '\''). $crlf
+ . '% ' . $crlf;
+ return PMA_exportOutputHandler($head);
}
- $buffer .= '} ' . $crlf ;
- $buffer .= ' \\hline \\endhead \\hline \\endfoot \\hline ' . $crlf;
- if (isset($GLOBALS['latex_caption'])) {
- $buffer .= ' \\caption{' . PMA_expandUserString($GLOBALS['latex_data_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db))
- . '} \\label{' . PMA_expandUserString($GLOBALS['latex_data_label'], NULL, array('table' => $table, 'database' => $db)) . '} \\\\';
+ /**
+ * Outputs database footer
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBFooter($db) {
+ return true;
}
- if (!PMA_exportOutputHandler($buffer)) {
- return false;
+
+ /**
+ * Outputs CREATE DATABASE statement
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBCreate($db) {
+ return true;
}
- // show column names
- if (isset($GLOBALS['latex_columns'])) {
- $buffer = '\\hline ';
+ /**
+ * Outputs the content of a table in LaTeX table/sideways table environment
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param string $sql_query SQL query for obtaining data
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
+ $result = PMA_DBI_try_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
+
+ $columns_cnt = PMA_DBI_num_fields($result);
for ($i = 0; $i < $columns_cnt; $i++) {
- $buffer .= '\\multicolumn{1}{|c|}{\\textbf{' . PMA_texEscape(stripslashes($columns[$i])) . '}} & ';
- }
+ $columns[$i] = PMA_DBI_field_name($result, $i);
+ }
+ unset($i);
- $buffer = substr($buffer, 0, -2) . '\\\\ \\hline \hline ';
- if (!PMA_exportOutputHandler($buffer . ' \\endfirsthead ' . $crlf)) {
- return false;
+ $buffer = $crlf . '%' . $crlf . '% ' . __('Data') . ': ' . $table . $crlf . '%' . $crlf
+ . ' \\begin{longtable}{|';
+
+ for ($index=0;$index<$columns_cnt;$index++) {
+ $buffer .= 'l|';
}
+ $buffer .= '} ' . $crlf ;
+
+ $buffer .= ' \\hline \\endhead \\hline \\endfoot \\hline ' . $crlf;
if (isset($GLOBALS['latex_caption'])) {
- if (!PMA_exportOutputHandler('\\caption{' . PMA_expandUserString($GLOBALS['latex_data_continued_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db)) . '} \\\\ ')) return false;
- }
- if (!PMA_exportOutputHandler($buffer . '\\endhead \\endfoot' . $crlf)) {
- return false;
+ $buffer .= ' \\caption{' . PMA_expandUserString($GLOBALS['latex_data_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db))
+ . '} \\label{' . PMA_expandUserString($GLOBALS['latex_data_label'], NULL, array('table' => $table, 'database' => $db)) . '} \\\\';
}
- } else {
- if (!PMA_exportOutputHandler('\\\\ \hline')) {
+ if (!PMA_exportOutputHandler($buffer)) {
return false;
}
- }
- // print the whole table
- while ($record = PMA_DBI_fetch_assoc($result)) {
+ // show column names
+ if (isset($GLOBALS['latex_columns'])) {
+ $buffer = '\\hline ';
+ for ($i = 0; $i < $columns_cnt; $i++) {
+ $buffer .= '\\multicolumn{1}{|c|}{\\textbf{' . PMA_texEscape(stripslashes($columns[$i])) . '}} & ';
+ }
- $buffer = '';
- // print each row
- for ($i = 0; $i < $columns_cnt; $i++) {
- if (isset($record[$columns[$i]])
- && (! function_exists('is_null') || !is_null($record[$columns[$i]]))) {
- $column_value = PMA_texEscape(stripslashes($record[$columns[$i]]));
- } else {
- $column_value = $GLOBALS['latex_null'];
+ $buffer = substr($buffer, 0, -2) . '\\\\ \\hline \hline ';
+ if (!PMA_exportOutputHandler($buffer . ' \\endfirsthead ' . $crlf)) {
+ return false;
+ }
+ if (isset($GLOBALS['latex_caption'])) {
+ if (!PMA_exportOutputHandler('\\caption{' . PMA_expandUserString($GLOBALS['latex_data_continued_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db)) . '} \\\\ ')) return false;
}
+ if (!PMA_exportOutputHandler($buffer . '\\endhead \\endfoot' . $crlf)) {
+ return false;
+ }
+ } else {
+ if (!PMA_exportOutputHandler('\\\\ \hline')) {
+ return false;
+ }
+ }
- // last column ... no need for & character
- if ($i == ($columns_cnt - 1)) {
- $buffer .= $column_value;
- } else {
- $buffer .= $column_value . " & ";
+ // print the whole table
+ while ($record = PMA_DBI_fetch_assoc($result)) {
+
+ $buffer = '';
+ // print each row
+ for ($i = 0; $i < $columns_cnt; $i++) {
+ if (isset($record[$columns[$i]])
+ && (! function_exists('is_null') || !is_null($record[$columns[$i]]))) {
+ $column_value = PMA_texEscape(stripslashes($record[$columns[$i]]));
+ } else {
+ $column_value = $GLOBALS['latex_null'];
+ }
+
+ // last column ... no need for & character
+ if ($i == ($columns_cnt - 1)) {
+ $buffer .= $column_value;
+ } else {
+ $buffer .= $column_value . " & ";
+ }
+ }
+ $buffer .= ' \\\\ \\hline ' . $crlf;
+ if (!PMA_exportOutputHandler($buffer)) {
+ return false;
}
}
- $buffer .= ' \\\\ \\hline ' . $crlf;
+
+ $buffer = ' \\end{longtable}' . $crlf;
if (!PMA_exportOutputHandler($buffer)) {
return false;
}
- }
-
- $buffer = ' \\end{longtable}' . $crlf;
- if (!PMA_exportOutputHandler($buffer)) {
- return false;
- }
- PMA_DBI_free_result($result);
- return true;
+ PMA_DBI_free_result($result);
+ return true;
-} // end getTableLaTeX
-
-/**
- * Outputs table's structure
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param bool $do_relation whether to include relation comments
- * @param bool $do_comments whether to include the pmadb-style column comments
- * as comments in the structure; this is deprecated
- * but the parameter is left here because export.php
- * calls PMA_exportStructure() also for other export
- * types which use this parameter
- * @param bool $do_mime whether to include mime comments
- * @param bool $dates whether to include creation/update/check dates
- * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in'
- * @param string $export_type 'server', 'database', 'table'
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type)
-{
- global $cfgRelation;
+ } // end getTableLaTeX
/**
- * Get the unique keys in the table
+ * Outputs table's structure
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param bool $do_relation whether to include relation comments
+ * @param bool $do_comments whether to include the pmadb-style column comments
+ * as comments in the structure; this is deprecated
+ * but the parameter is left here because export.php
+ * calls PMA_exportStructure() also for other export
+ * types which use this parameter
+ * @param bool $do_mime whether to include mime comments
+ * @param bool $dates whether to include creation/update/check dates
+ * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in'
+ * @param string $export_type 'server', 'database', 'table'
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- $keys_query = 'SHOW KEYS FROM ' . PMA_backquote($table) . ' FROM '. PMA_backquote($db);
- $keys_result = PMA_DBI_query($keys_query);
- $unique_keys = array();
- while ($key = PMA_DBI_fetch_assoc($keys_result)) {
- if ($key['Non_unique'] == 0) {
- $unique_keys[] = $key['Column_name'];
+ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type)
+ {
+ global $cfgRelation;
+
+ /**
+ * Get the unique keys in the table
+ */
+ $keys_query = 'SHOW KEYS FROM ' . PMA_backquote($table) . ' FROM '. PMA_backquote($db);
+ $keys_result = PMA_DBI_query($keys_query);
+ $unique_keys = array();
+ while ($key = PMA_DBI_fetch_assoc($keys_result)) {
+ if ($key['Non_unique'] == 0) {
+ $unique_keys[] = $key['Column_name'];
+ }
}
- }
- PMA_DBI_free_result($keys_result);
+ PMA_DBI_free_result($keys_result);
- /**
- * Gets fields properties
- */
- PMA_DBI_select_db($db);
+ /**
+ * Gets fields properties
+ */
+ PMA_DBI_select_db($db);
- // Check if we can use Relations
- if ($do_relation && !empty($cfgRelation['relation'])) {
- // Find which tables are related with the current one and write it in
- // an array
- $res_rel = PMA_getForeigners($db, $table);
+ // Check if we can use Relations
+ if ($do_relation && !empty($cfgRelation['relation'])) {
+ // Find which tables are related with the current one and write it in
+ // an array
+ $res_rel = PMA_getForeigners($db, $table);
- if ($res_rel && count($res_rel) > 0) {
- $have_rel = true;
+ if ($res_rel && count($res_rel) > 0) {
+ $have_rel = true;
+ } else {
+ $have_rel = false;
+ }
} else {
- $have_rel = false;
+ $have_rel = false;
+ } // end if
+
+ /**
+ * Displays the table structure
+ */
+ $buffer = $crlf . '%' . $crlf . '% ' . __('Structure') . ': ' . $table . $crlf . '%' . $crlf
+ . ' \\begin{longtable}{';
+ if (!PMA_exportOutputHandler($buffer)) {
+ return false;
}
- } else {
- $have_rel = false;
- } // end if
-
- /**
- * Displays the table structure
- */
- $buffer = $crlf . '%' . $crlf . '% ' . __('Structure') . ': ' . $table . $crlf . '%' . $crlf
- . ' \\begin{longtable}{';
- if (!PMA_exportOutputHandler($buffer)) {
- return false;
- }
-
- $columns_cnt = 4;
- $alignment = '|l|c|c|c|';
- if ($do_relation && $have_rel) {
- $columns_cnt++;
- $alignment .= 'l|';
- }
- if ($do_comments) {
- $columns_cnt++;
- $alignment .= 'l|';
- }
- if ($do_mime && $cfgRelation['mimework']) {
- $columns_cnt++;
- $alignment .='l|';
- }
- $buffer = $alignment . '} ' . $crlf ;
-
- $header = ' \\hline ';
- $header .= '\\multicolumn{1}{|c|}{\\textbf{' . __('Column') . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Type') . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Null') . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Default') . '}}';
- if ($do_relation && $have_rel) {
- $header .= ' & \\multicolumn{1}{|c|}{\\textbf{' . __('Links to') . '}}';
- }
- if ($do_comments) {
- $header .= ' & \\multicolumn{1}{|c|}{\\textbf{' . __('Comments') . '}}';
- $comments = PMA_getComments($db, $table);
- }
- if ($do_mime && $cfgRelation['mimework']) {
- $header .= ' & \\multicolumn{1}{|c|}{\\textbf{MIME}}';
- $mime_map = PMA_getMIME($db, $table, true);
- }
- // Table caption for first page and label
- if (isset($GLOBALS['latex_caption'])) {
- $buffer .= ' \\caption{'. PMA_expandUserString($GLOBALS['latex_structure_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db))
- . '} \\label{' . PMA_expandUserString($GLOBALS['latex_structure_label'], NULL, array('table' => $table, 'database' => $db))
- . '} \\\\' . $crlf;
- }
- $buffer .= $header . ' \\\\ \\hline \\hline' . $crlf . '\\endfirsthead' . $crlf;
- // Table caption on next pages
- if (isset($GLOBALS['latex_caption'])) {
- $buffer .= ' \\caption{'. PMA_expandUserString($GLOBALS['latex_structure_continued_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db))
- . '} \\\\ ' . $crlf;
- }
- $buffer .= $header . ' \\\\ \\hline \\hline \\endhead \\endfoot ' . $crlf;
-
- if (!PMA_exportOutputHandler($buffer)) {
- return false;
- }
-
- $fields = PMA_DBI_get_columns($db, $table);
- foreach ($fields as $row) {
- $type = $row['Type'];
- // reformat mysql query output
- // set or enum types: slashes single quotes inside options
- if (preg_match('/^(set|enum)\((.+)\)$/i', $type, $tmp)) {
- $tmp[2] = substr(preg_replace('/([^,])\'\'/', '\\1\\\'', ',' . $tmp[2]), 1);
- $type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
- $type_nowrap = '';
-
- $binary = 0;
- $unsigned = 0;
- $zerofill = 0;
- } else {
- $type_nowrap = ' nowrap="nowrap"';
- $type = preg_replace('/BINARY/i', '', $type);
- $type = preg_replace('/ZEROFILL/i', '', $type);
- $type = preg_replace('/UNSIGNED/i', '', $type);
- if (empty($type)) {
- $type = ' ';
- }
-
- $binary = preg_match('/BINARY/i', $row['Type']);
- $unsigned = preg_match('/UNSIGNED/i', $row['Type']);
- $zerofill = preg_match('/ZEROFILL/i', $row['Type']);
+ $columns_cnt = 4;
+ $alignment = '|l|c|c|c|';
+ if ($do_relation && $have_rel) {
+ $columns_cnt++;
+ $alignment .= 'l|';
}
- if (!isset($row['Default'])) {
- if ($row['Null'] != 'NO') {
- $row['Default'] = 'NULL';
- }
+ if ($do_comments) {
+ $columns_cnt++;
+ $alignment .= 'l|';
}
+ if ($do_mime && $cfgRelation['mimework']) {
+ $columns_cnt++;
+ $alignment .='l|';
+ }
+ $buffer = $alignment . '} ' . $crlf ;
- $field_name = $row['Field'];
-
- $local_buffer = $field_name . "\000" . $type . "\000"
- . (($row['Null'] == '' || $row['Null'] == 'NO') ? __('No') : __('Yes'))
- . "\000" . (isset($row['Default']) ? $row['Default'] : '');
-
+ $header = ' \\hline ';
+ $header .= '\\multicolumn{1}{|c|}{\\textbf{' . __('Column') . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Type') . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Null') . '}} & \\multicolumn{1}{|c|}{\\textbf{' . __('Default') . '}}';
if ($do_relation && $have_rel) {
- $local_buffer .= "\000";
- if (isset($res_rel[$field_name])) {
- $local_buffer .= $res_rel[$field_name]['foreign_table'] . ' (' . $res_rel[$field_name]['foreign_field'] . ')';
- }
+ $header .= ' & \\multicolumn{1}{|c|}{\\textbf{' . __('Links to') . '}}';
}
- if ($do_comments && $cfgRelation['commwork']) {
- $local_buffer .= "\000";
- if (isset($comments[$field_name])) {
- $local_buffer .= $comments[$field_name];
- }
+ if ($do_comments) {
+ $header .= ' & \\multicolumn{1}{|c|}{\\textbf{' . __('Comments') . '}}';
+ $comments = PMA_getComments($db, $table);
}
if ($do_mime && $cfgRelation['mimework']) {
- $local_buffer .= "\000";
- if (isset($mime_map[$field_name])) {
- $local_buffer .= str_replace('_', '/', $mime_map[$field_name]['mimetype']);
- }
+ $header .= ' & \\multicolumn{1}{|c|}{\\textbf{MIME}}';
+ $mime_map = PMA_getMIME($db, $table, true);
}
- $local_buffer = PMA_texEscape($local_buffer);
- if ($row['Key']=='PRI') {
- $pos=strpos($local_buffer, "\000");
- $local_buffer = '\\textit{' . substr($local_buffer, 0, $pos) . '}' . substr($local_buffer, $pos);
+
+ // Table caption for first page and label
+ if (isset($GLOBALS['latex_caption'])) {
+ $buffer .= ' \\caption{'. PMA_expandUserString($GLOBALS['latex_structure_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db))
+ . '} \\label{' . PMA_expandUserString($GLOBALS['latex_structure_label'], NULL, array('table' => $table, 'database' => $db))
+ . '} \\\\' . $crlf;
}
- if (in_array($field_name, $unique_keys)) {
- $pos=strpos($local_buffer, "\000");
- $local_buffer = '\\textbf{' . substr($local_buffer, 0, $pos) . '}' . substr($local_buffer, $pos);
+ $buffer .= $header . ' \\\\ \\hline \\hline' . $crlf . '\\endfirsthead' . $crlf;
+ // Table caption on next pages
+ if (isset($GLOBALS['latex_caption'])) {
+ $buffer .= ' \\caption{'. PMA_expandUserString($GLOBALS['latex_structure_continued_caption'], 'PMA_texEscape', array('table' => $table, 'database' => $db))
+ . '} \\\\ ' . $crlf;
}
- $buffer = str_replace("\000", ' & ', $local_buffer);
- $buffer .= ' \\\\ \\hline ' . $crlf;
+ $buffer .= $header . ' \\\\ \\hline \\hline \\endhead \\endfoot ' . $crlf;
if (!PMA_exportOutputHandler($buffer)) {
return false;
}
- } // end while
- $buffer = ' \\end{longtable}' . $crlf;
- return PMA_exportOutputHandler($buffer);
-} // end of the 'PMA_exportStructure' function
+ $fields = PMA_DBI_get_columns($db, $table);
+ foreach ($fields as $row) {
+ $type = $row['Type'];
+ // reformat mysql query output
+ // set or enum types: slashes single quotes inside options
+ if (preg_match('/^(set|enum)\((.+)\)$/i', $type, $tmp)) {
+ $tmp[2] = substr(preg_replace('/([^,])\'\'/', '\\1\\\'', ',' . $tmp[2]), 1);
+ $type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
+ $type_nowrap = '';
+
+ $binary = 0;
+ $unsigned = 0;
+ $zerofill = 0;
+ } else {
+ $type_nowrap = ' nowrap="nowrap"';
+ $type = preg_replace('/BINARY/i', '', $type);
+ $type = preg_replace('/ZEROFILL/i', '', $type);
+ $type = preg_replace('/UNSIGNED/i', '', $type);
+ if (empty($type)) {
+ $type = ' ';
+ }
+
+ $binary = preg_match('/BINARY/i', $row['Type']);
+ $unsigned = preg_match('/UNSIGNED/i', $row['Type']);
+ $zerofill = preg_match('/ZEROFILL/i', $row['Type']);
+ }
+ if (!isset($row['Default'])) {
+ if ($row['Null'] != 'NO') {
+ $row['Default'] = 'NULL';
+ }
+ }
+
+ $field_name = $row['Field'];
+
+ $local_buffer = $field_name . "\000" . $type . "\000"
+ . (($row['Null'] == '' || $row['Null'] == 'NO') ? __('No') : __('Yes'))
+ . "\000" . (isset($row['Default']) ? $row['Default'] : '');
+
+ if ($do_relation && $have_rel) {
+ $local_buffer .= "\000";
+ if (isset($res_rel[$field_name])) {
+ $local_buffer .= $res_rel[$field_name]['foreign_table'] . ' (' . $res_rel[$field_name]['foreign_field'] . ')';
+ }
+ }
+ if ($do_comments && $cfgRelation['commwork']) {
+ $local_buffer .= "\000";
+ if (isset($comments[$field_name])) {
+ $local_buffer .= $comments[$field_name];
+ }
+ }
+ if ($do_mime && $cfgRelation['mimework']) {
+ $local_buffer .= "\000";
+ if (isset($mime_map[$field_name])) {
+ $local_buffer .= str_replace('_', '/', $mime_map[$field_name]['mimetype']);
+ }
+ }
+ $local_buffer = PMA_texEscape($local_buffer);
+ if ($row['Key']=='PRI') {
+ $pos=strpos($local_buffer, "\000");
+ $local_buffer = '\\textit{' . substr($local_buffer, 0, $pos) . '}' . substr($local_buffer, $pos);
+ }
+ if (in_array($field_name, $unique_keys)) {
+ $pos=strpos($local_buffer, "\000");
+ $local_buffer = '\\textbf{' . substr($local_buffer, 0, $pos) . '}' . substr($local_buffer, $pos);
+ }
+ $buffer = str_replace("\000", ' & ', $local_buffer);
+ $buffer .= ' \\\\ \\hline ' . $crlf;
+
+ if (!PMA_exportOutputHandler($buffer)) {
+ return false;
+ }
+ } // end while
+
+ $buffer = ' \\end{longtable}' . $crlf;
+ return PMA_exportOutputHandler($buffer);
+ } // end of the 'PMA_exportStructure' function
} // end else
?>
diff --git a/libraries/export/mediawiki.php b/libraries/export/mediawiki.php
index 8ec3749..d03610d 100644
--- a/libraries/export/mediawiki.php
+++ b/libraries/export/mediawiki.php
@@ -24,136 +24,136 @@ if (isset($plugin_list)) {
);
} else {
-/**
- * Outputs export footer
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportFooter() {
- return true;
-}
+ /**
+ * Outputs export footer
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportFooter() {
+ return true;
+ }
-/**
- * Outputs export header
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportHeader() {
- return true;
-}
+ /**
+ * Outputs export header
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportHeader() {
+ return true;
+ }
-/**
- * Outputs database header
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBHeader($db) {
- return true;
-}
+ /**
+ * Outputs database header
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBHeader($db) {
+ return true;
+ }
-/**
- * Outputs database footer
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBFooter($db) {
- return true;
-}
+ /**
+ * Outputs database footer
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBFooter($db) {
+ return true;
+ }
-/**
- * Outputs CREATE DATABASE statement
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBCreate($db) {
- return true;
-}
+ /**
+ * Outputs CREATE DATABASE statement
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBCreate($db) {
+ return true;
+ }
-/**
- * Outputs the content of a table in MediaWiki format
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param string $sql_query SQL query for obtaining data
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
- $columns = PMA_DBI_get_columns($db, $table);
- $columns = array_values($columns);
- $row_cnt = count($columns);
+ /**
+ * Outputs the content of a table in MediaWiki format
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param string $sql_query SQL query for obtaining data
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
+ $columns = PMA_DBI_get_columns($db, $table);
+ $columns = array_values($columns);
+ $row_cnt = count($columns);
- $output = "{| cellpadding=\"10\" cellspacing=\"0\" border=\"1\" style=\"text-align:center;\"\n";
- $output .= "|+'''" . $table . "'''\n";
- $output .= "|- style=\"background:#ffdead;\"\n";
- $output .= "! style=\"background:#ffffff\" | \n";
- for ($i = 0; $i < $row_cnt; ++$i) {
- $output .= " | " . $columns[$i]['Field'];
- if (($i + 1) != $row_cnt) {
- $output .= "\n";
+ $output = "{| cellpadding=\"10\" cellspacing=\"0\" border=\"1\" style=\"text-align:center;\"\n";
+ $output .= "|+'''" . $table . "'''\n";
+ $output .= "|- style=\"background:#ffdead;\"\n";
+ $output .= "! style=\"background:#ffffff\" | \n";
+ for ($i = 0; $i < $row_cnt; ++$i) {
+ $output .= " | " . $columns[$i]['Field'];
+ if (($i + 1) != $row_cnt) {
+ $output .= "\n";
+ }
}
- }
- $output .= "\n";
+ $output .= "\n";
- $output .= "|- style=\"background:#f9f9f9;\"\n";
- $output .= "! style=\"background:#f2f2f2\" | Type\n";
- for ($i = 0; $i < $row_cnt; ++$i) {
- $output .= " | " . $columns[$i]['Type'];
- if (($i + 1) != $row_cnt) {
- $output .= "\n";
+ $output .= "|- style=\"background:#f9f9f9;\"\n";
+ $output .= "! style=\"background:#f2f2f2\" | Type\n";
+ for ($i = 0; $i < $row_cnt; ++$i) {
+ $output .= " | " . $columns[$i]['Type'];
+ if (($i + 1) != $row_cnt) {
+ $output .= "\n";
+ }
}
- }
- $output .= "\n";
+ $output .= "\n";
- $output .= "|- style=\"background:#f9f9f9;\"\n";
- $output .= "! style=\"background:#f2f2f2\" | Null\n";
- for ($i = 0; $i < $row_cnt; ++$i) {
- $output .= " | " . $columns[$i]['Null'];
- if (($i + 1) != $row_cnt) {
- $output .= "\n";
+ $output .= "|- style=\"background:#f9f9f9;\"\n";
+ $output .= "! style=\"background:#f2f2f2\" | Null\n";
+ for ($i = 0; $i < $row_cnt; ++$i) {
+ $output .= " | " . $columns[$i]['Null'];
+ if (($i + 1) != $row_cnt) {
+ $output .= "\n";
+ }
}
- }
- $output .= "\n";
+ $output .= "\n";
- $output .= "|- style=\"background:#f9f9f9;\"\n";
- $output .= "! style=\"background:#f2f2f2\" | Default\n";
- for ($i = 0; $i < $row_cnt; ++$i) {
- $output .= " | " . $columns[$i]['Default'];
- if (($i + 1) != $row_cnt) {
- $output .= "\n";
+ $output .= "|- style=\"background:#f9f9f9;\"\n";
+ $output .= "! style=\"background:#f2f2f2\" | Default\n";
+ for ($i = 0; $i < $row_cnt; ++$i) {
+ $output .= " | " . $columns[$i]['Default'];
+ if (($i + 1) != $row_cnt) {
+ $output .= "\n";
+ }
}
- }
- $output .= "\n";
+ $output .= "\n";
- $output .= "|- style=\"background:#f9f9f9;\"\n";
- $output .= "! style=\"background:#f2f2f2\" | Extra\n";
- for ($i = 0; $i < $row_cnt; ++$i) {
- $output .= " | " . $columns[$i]['Extra'];
- if (($i + 1) != $row_cnt) {
- $output .= "\n";
+ $output .= "|- style=\"background:#f9f9f9;\"\n";
+ $output .= "! style=\"background:#f2f2f2\" | Extra\n";
+ for ($i = 0; $i < $row_cnt; ++$i) {
+ $output .= " | " . $columns[$i]['Extra'];
+ if (($i + 1) != $row_cnt) {
+ $output .= "\n";
+ }
}
- }
- $output .= "\n";
+ $output .= "\n";
- $output .= "|}\n\n\n\n";
- return PMA_exportOutputHandler($output);
-}
+ $output .= "|}\n\n\n\n";
+ return PMA_exportOutputHandler($output);
+ }
}
?>
diff --git a/libraries/export/ods.php b/libraries/export/ods.php
index fa62a96..0c62878 100644
--- a/libraries/export/ods.php
+++ b/libraries/export/ods.php
@@ -30,192 +30,192 @@ if (isset($plugin_list)) {
);
} else {
-$GLOBALS['ods_buffer'] = '';
-require_once './libraries/opendocument.lib.php';
+ $GLOBALS['ods_buffer'] = '';
+ require_once './libraries/opendocument.lib.php';
-/**
- * Outputs export footer
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportFooter() {
- $GLOBALS['ods_buffer'] .= '</office:spreadsheet>'
- . '</office:body>'
- . '</office:document-content>';
- if (!PMA_exportOutputHandler(PMA_createOpenDocument('application/vnd.oasis.opendocument.spreadsheet', $GLOBALS['ods_buffer']))) {
- return false;
+ /**
+ * Outputs export footer
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportFooter() {
+ $GLOBALS['ods_buffer'] .= '</office:spreadsheet>'
+ . '</office:body>'
+ . '</office:document-content>';
+ if (!PMA_exportOutputHandler(PMA_createOpenDocument('application/vnd.oasis.opendocument.spreadsheet', $GLOBALS['ods_buffer']))) {
+ return false;
+ }
+ return true;
}
- return true;
-}
-
-/**
- * Outputs export header
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportHeader() {
- $GLOBALS['ods_buffer'] .= '<?xml version="1.0" encoding="utf-8"?' . '>'
- . '<office:document-content '. $GLOBALS['OpenDocumentNS'] . 'office:version="1.0">'
- . '<office:automatic-styles>'
- . '<number:date-style style:name="N37" number:automatic-order="true">'
- . '<number:month number:style="long"/>'
- . '<number:text>/</number:text>'
- . '<number:day number:style="long"/>'
- . '<number:text>/</number:text>'
- . '<number:year/>'
- . '</number:date-style>'
- . '<number:time-style style:name="N43">'
- . '<number:hours number:style="long"/>'
- . '<number:text>:</number:text>'
- . '<number:minutes number:style="long"/>'
- . '<number:text>:</number:text>'
- . '<number:seconds number:style="long"/>'
- . '<number:text> </number:text>'
- . '<number:am-pm/>'
- . '</number:time-style>'
- . '<number:date-style style:name="N50" number:automatic-order="true" number:format-source="language">'
- . '<number:month/>'
- . '<number:text>/</number:text>'
- . '<number:day/>'
- . '<number:text>/</number:text>'
- . '<number:year/>'
- . '<number:text> </number:text>'
- . '<number:hours number:style="long"/>'
- . '<number:text>:</number:text>'
- . '<number:minutes number:style="long"/>'
- . '<number:text> </number:text>'
- . '<number:am-pm/>'
- . '</number:date-style>'
- . '<style:style style:name="DateCell" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>'
- . '<style:style style:name="TimeCell" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N43"/>'
- . '<style:style style:name="DateTimeCell" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N50"/>'
- . '</office:automatic-styles>'
- . '<office:body>'
- . '<office:spreadsheet>';
- return true;
-}
-
-/**
- * Outputs database header
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBHeader($db) {
- return true;
-}
-
-/**
- * Outputs database footer
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBFooter($db) {
- return true;
-}
-/**
- * Outputs CREATE DATABASE statement
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBCreate($db) {
- return true;
-}
+ /**
+ * Outputs export header
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportHeader() {
+ $GLOBALS['ods_buffer'] .= '<?xml version="1.0" encoding="utf-8"?' . '>'
+ . '<office:document-content '. $GLOBALS['OpenDocumentNS'] . 'office:version="1.0">'
+ . '<office:automatic-styles>'
+ . '<number:date-style style:name="N37" number:automatic-order="true">'
+ . '<number:month number:style="long"/>'
+ . '<number:text>/</number:text>'
+ . '<number:day number:style="long"/>'
+ . '<number:text>/</number:text>'
+ . '<number:year/>'
+ . '</number:date-style>'
+ . '<number:time-style style:name="N43">'
+ . '<number:hours number:style="long"/>'
+ . '<number:text>:</number:text>'
+ . '<number:minutes number:style="long"/>'
+ . '<number:text>:</number:text>'
+ . '<number:seconds number:style="long"/>'
+ . '<number:text> </number:text>'
+ . '<number:am-pm/>'
+ . '</number:time-style>'
+ . '<number:date-style style:name="N50" number:automatic-order="true" number:format-source="language">'
+ . '<number:month/>'
+ . '<number:text>/</number:text>'
+ . '<number:day/>'
+ . '<number:text>/</number:text>'
+ . '<number:year/>'
+ . '<number:text> </number:text>'
+ . '<number:hours number:style="long"/>'
+ . '<number:text>:</number:text>'
+ . '<number:minutes number:style="long"/>'
+ . '<number:text> </number:text>'
+ . '<number:am-pm/>'
+ . '</number:date-style>'
+ . '<style:style style:name="DateCell" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N37"/>'
+ . '<style:style style:name="TimeCell" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N43"/>'
+ . '<style:style style:name="DateTimeCell" style:family="table-cell" style:parent-style-name="Default" style:data-style-name="N50"/>'
+ . '</office:automatic-styles>'
+ . '<office:body>'
+ . '<office:spreadsheet>';
+ return true;
+ }
-/**
- * Outputs the content of a table in ODS format
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param string $sql_query SQL query for obtaining data
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
- global $what;
+ /**
+ * Outputs database header
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBHeader($db) {
+ return true;
+ }
- // Gets the data from the database
- $result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
- $fields_cnt = PMA_DBI_num_fields($result);
- $fields_meta = PMA_DBI_get_fields_meta($result);
- $field_flags = array();
- for ($j = 0; $j < $fields_cnt; $j++) {
- $field_flags[$j] = PMA_DBI_field_flags($result, $j);
+ /**
+ * Outputs database footer
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBFooter($db) {
+ return true;
}
- $GLOBALS['ods_buffer'] .= '<table:table table:name="' . htmlspecialchars($table) . '">';
+ /**
+ * Outputs CREATE DATABASE statement
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBCreate($db) {
+ return true;
+ }
- // If required, get fields name at the first line
- if (isset($GLOBALS[$what . '_columns'])) {
- $GLOBALS['ods_buffer'] .= '<table:table-row>';
- for ($i = 0; $i < $fields_cnt; $i++) {
- $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars(stripslashes(PMA_DBI_field_name($result, $i))) . '</text:p>'
- . '</table:table-cell>';
- } // end for
- $GLOBALS['ods_buffer'] .= '</table:table-row>';
- } // end if
+ /**
+ * Outputs the content of a table in ODS format
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param string $sql_query SQL query for obtaining data
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
+ global $what;
- // Format the data
- while ($row = PMA_DBI_fetch_row($result)) {
- $GLOBALS['ods_buffer'] .= '<table:table-row>';
+ // Gets the data from the database
+ $result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
+ $fields_cnt = PMA_DBI_num_fields($result);
+ $fields_meta = PMA_DBI_get_fields_meta($result);
+ $field_flags = array();
for ($j = 0; $j < $fields_cnt; $j++) {
- if (!isset($row[$j]) || is_null($row[$j])) {
- $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars($GLOBALS[$what . '_null']) . '</text:p>'
- . '</table:table-cell>';
- // ignore BLOB
- } elseif (stristr($field_flags[$j], 'BINARY')
- && $fields_meta[$j]->blob) {
- $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p></text:p>'
- . '</table:table-cell>';
- } elseif ($fields_meta[$j]->type == "date") {
- $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="date" office:date-value="' . date("Y-m-d", strtotime($row[$j])) . '" table:style-name="DateCell">'
- . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
- . '</table:table-cell>';
- } elseif ($fields_meta[$j]->type == "time") {
- $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="time" office:time-value="' . date("\P\TH\Hi\Ms\S", strtotime($row[$j])) . '" table:style-name="TimeCell">'
- . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
- . '</table:table-cell>';
- } elseif ($fields_meta[$j]->type == "datetime") {
- $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="date" office:date-value="' . date("Y-m-d\TH:i:s", strtotime($row[$j])) . '" table:style-name="DateTimeCell">'
- . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
- . '</table:table-cell>';
- } elseif ($fields_meta[$j]->numeric && $fields_meta[$j]->type != 'timestamp' && ! $fields_meta[$j]->blob) {
- $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="float" office:value="' . $row[$j] . '" >'
- . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
- . '</table:table-cell>';
- } else {
+ $field_flags[$j] = PMA_DBI_field_flags($result, $j);
+ }
+
+ $GLOBALS['ods_buffer'] .= '<table:table table:name="' . htmlspecialchars($table) . '">';
+
+ // If required, get fields name at the first line
+ if (isset($GLOBALS[$what . '_columns'])) {
+ $GLOBALS['ods_buffer'] .= '<table:table-row>';
+ for ($i = 0; $i < $fields_cnt; $i++) {
$GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
+ . '<text:p>' . htmlspecialchars(stripslashes(PMA_DBI_field_name($result, $i))) . '</text:p>'
. '</table:table-cell>';
- }
- } // end for
- $GLOBALS['ods_buffer'] .= '</table:table-row>';
- } // end while
- PMA_DBI_free_result($result);
+ } // end for
+ $GLOBALS['ods_buffer'] .= '</table:table-row>';
+ } // end if
- $GLOBALS['ods_buffer'] .= '</table:table>';
+ // Format the data
+ while ($row = PMA_DBI_fetch_row($result)) {
+ $GLOBALS['ods_buffer'] .= '<table:table-row>';
+ for ($j = 0; $j < $fields_cnt; $j++) {
+ if (!isset($row[$j]) || is_null($row[$j])) {
+ $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars($GLOBALS[$what . '_null']) . '</text:p>'
+ . '</table:table-cell>';
+ // ignore BLOB
+ } elseif (stristr($field_flags[$j], 'BINARY')
+ && $fields_meta[$j]->blob) {
+ $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p></text:p>'
+ . '</table:table-cell>';
+ } elseif ($fields_meta[$j]->type == "date") {
+ $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="date" office:date-value="' . date("Y-m-d", strtotime($row[$j])) . '" table:style-name="DateCell">'
+ . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
+ . '</table:table-cell>';
+ } elseif ($fields_meta[$j]->type == "time") {
+ $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="time" office:time-value="' . date("\P\TH\Hi\Ms\S", strtotime($row[$j])) . '" table:style-name="TimeCell">'
+ . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
+ . '</table:table-cell>';
+ } elseif ($fields_meta[$j]->type == "datetime") {
+ $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="date" office:date-value="' . date("Y-m-d\TH:i:s", strtotime($row[$j])) . '" table:style-name="DateTimeCell">'
+ . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
+ . '</table:table-cell>';
+ } elseif ($fields_meta[$j]->numeric && $fields_meta[$j]->type != 'timestamp' && ! $fields_meta[$j]->blob) {
+ $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="float" office:value="' . $row[$j] . '" >'
+ . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
+ . '</table:table-cell>';
+ } else {
+ $GLOBALS['ods_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
+ . '</table:table-cell>';
+ }
+ } // end for
+ $GLOBALS['ods_buffer'] .= '</table:table-row>';
+ } // end while
+ PMA_DBI_free_result($result);
- return true;
-}
+ $GLOBALS['ods_buffer'] .= '</table:table>';
+
+ return true;
+ }
}
?>
diff --git a/libraries/export/odt.php b/libraries/export/odt.php
index dba6e1c..e02f8a6 100644
--- a/libraries/export/odt.php
+++ b/libraries/export/odt.php
@@ -62,345 +62,345 @@ if (isset($plugin_list)) {
array('type' => 'end_group');
} else {
-$GLOBALS['odt_buffer'] = '';
-require_once './libraries/opendocument.lib.php';
+ $GLOBALS['odt_buffer'] = '';
+ require_once './libraries/opendocument.lib.php';
-/**
- * Outputs export footer
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportFooter() {
- $GLOBALS['odt_buffer'] .= '</office:text>'
- . '</office:body>'
- . '</office:document-content>';
- if (!PMA_exportOutputHandler(PMA_createOpenDocument('application/vnd.oasis.opendocument.text', $GLOBALS['odt_buffer']))) {
- return false;
+ /**
+ * Outputs export footer
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportFooter() {
+ $GLOBALS['odt_buffer'] .= '</office:text>'
+ . '</office:body>'
+ . '</office:document-content>';
+ if (!PMA_exportOutputHandler(PMA_createOpenDocument('application/vnd.oasis.opendocument.text', $GLOBALS['odt_buffer']))) {
+ return false;
+ }
+ return true;
}
- return true;
-}
-
-/**
- * Outputs export header
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportHeader() {
- $GLOBALS['odt_buffer'] .= '<?xml version="1.0" encoding="utf-8"?' . '>'
- . '<office:document-content '. $GLOBALS['OpenDocumentNS'] . 'office:version="1.0">'
- . '<office:body>'
- . '<office:text>';
- return true;
-}
-
-/**
- * Outputs database header
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBHeader($db) {
- $GLOBALS['odt_buffer'] .= '<text:h text:outline-level="1" text:style-name="Heading_1" text:is-list-header="true">' . htmlspecialchars(__('Database') . ' ' . $db) . '</text:h>';
- return true;
-}
-
-/**
- * Outputs database footer
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBFooter($db) {
- return true;
-}
-/**
- * Outputs CREATE DATABASE statement
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBCreate($db) {
- return true;
-}
+ /**
+ * Outputs export header
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportHeader() {
+ $GLOBALS['odt_buffer'] .= '<?xml version="1.0" encoding="utf-8"?' . '>'
+ . '<office:document-content '. $GLOBALS['OpenDocumentNS'] . 'office:version="1.0">'
+ . '<office:body>'
+ . '<office:text>';
+ return true;
+ }
-/**
- * Outputs the content of a table in ODT format
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param string $sql_query SQL query for obtaining data
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
- global $what;
+ /**
+ * Outputs database header
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBHeader($db) {
+ $GLOBALS['odt_buffer'] .= '<text:h text:outline-level="1" text:style-name="Heading_1" text:is-list-header="true">' . htmlspecialchars(__('Database') . ' ' . $db) . '</text:h>';
+ return true;
+ }
- // Gets the data from the database
- $result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
- $fields_cnt = PMA_DBI_num_fields($result);
- $fields_meta = PMA_DBI_get_fields_meta($result);
- $field_flags = array();
- for ($j = 0; $j < $fields_cnt; $j++) {
- $field_flags[$j] = PMA_DBI_field_flags($result, $j);
+ /**
+ * Outputs database footer
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBFooter($db) {
+ return true;
}
- $GLOBALS['odt_buffer'] .= '<text:h text:outline-level="2" text:style-name="Heading_2" text:is-list-header="true">' . htmlspecialchars(__('Dumping data for table') . ' ' . $table) . '</text:h>';
- $GLOBALS['odt_buffer'] .= '<table:table table:name="' . htmlspecialchars($table) . '_structure">';
- $GLOBALS['odt_buffer'] .= '<table:table-column table:number-columns-repeated="' . $fields_cnt . '"/>';
+ /**
+ * Outputs CREATE DATABASE statement
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBCreate($db) {
+ return true;
+ }
- // If required, get fields name at the first line
- if (isset($GLOBALS[$what . '_columns'])) {
- $GLOBALS['odt_buffer'] .= '<table:table-row>';
- for ($i = 0; $i < $fields_cnt; $i++) {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars(stripslashes(PMA_DBI_field_name($result, $i))) . '</text:p>'
- . '</table:table-cell>';
- } // end for
- $GLOBALS['odt_buffer'] .= '</table:table-row>';
- } // end if
+ /**
+ * Outputs the content of a table in ODT format
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param string $sql_query SQL query for obtaining data
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query) {
+ global $what;
- // Format the data
- while ($row = PMA_DBI_fetch_row($result)) {
- $GLOBALS['odt_buffer'] .= '<table:table-row>';
+ // Gets the data from the database
+ $result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
+ $fields_cnt = PMA_DBI_num_fields($result);
+ $fields_meta = PMA_DBI_get_fields_meta($result);
+ $field_flags = array();
for ($j = 0; $j < $fields_cnt; $j++) {
- if (!isset($row[$j]) || is_null($row[$j])) {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars($GLOBALS[$what . '_null']) . '</text:p>'
- . '</table:table-cell>';
- // ignore BLOB
- } elseif (stristr($field_flags[$j], 'BINARY')
- && $fields_meta[$j]->blob) {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p></text:p>'
- . '</table:table-cell>';
- } elseif ($fields_meta[$j]->numeric && $fields_meta[$j]->type != 'timestamp' && ! $fields_meta[$j]->blob) {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="float" office:value="' . $row[$j] . '" >'
- . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
- . '</table:table-cell>';
- } else {
+ $field_flags[$j] = PMA_DBI_field_flags($result, $j);
+ }
+
+ $GLOBALS['odt_buffer'] .= '<text:h text:outline-level="2" text:style-name="Heading_2" text:is-list-header="true">' . htmlspecialchars(__('Dumping data for table') . ' ' . $table) . '</text:h>';
+ $GLOBALS['odt_buffer'] .= '<table:table table:name="' . htmlspecialchars($table) . '_structure">';
+ $GLOBALS['odt_buffer'] .= '<table:table-column table:number-columns-repeated="' . $fields_cnt . '"/>';
+
+ // If required, get fields name at the first line
+ if (isset($GLOBALS[$what . '_columns'])) {
+ $GLOBALS['odt_buffer'] .= '<table:table-row>';
+ for ($i = 0; $i < $fields_cnt; $i++) {
$GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
+ . '<text:p>' . htmlspecialchars(stripslashes(PMA_DBI_field_name($result, $i))) . '</text:p>'
. '</table:table-cell>';
- }
- } // end for
- $GLOBALS['odt_buffer'] .= '</table:table-row>';
- } // end while
- PMA_DBI_free_result($result);
+ } // end for
+ $GLOBALS['odt_buffer'] .= '</table:table-row>';
+ } // end if
- $GLOBALS['odt_buffer'] .= '</table:table>';
+ // Format the data
+ while ($row = PMA_DBI_fetch_row($result)) {
+ $GLOBALS['odt_buffer'] .= '<table:table-row>';
+ for ($j = 0; $j < $fields_cnt; $j++) {
+ if (!isset($row[$j]) || is_null($row[$j])) {
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars($GLOBALS[$what . '_null']) . '</text:p>'
+ . '</table:table-cell>';
+ // ignore BLOB
+ } elseif (stristr($field_flags[$j], 'BINARY')
+ && $fields_meta[$j]->blob) {
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p></text:p>'
+ . '</table:table-cell>';
+ } elseif ($fields_meta[$j]->numeric && $fields_meta[$j]->type != 'timestamp' && ! $fields_meta[$j]->blob) {
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="float" office:value="' . $row[$j] . '" >'
+ . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
+ . '</table:table-cell>';
+ } else {
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars($row[$j]) . '</text:p>'
+ . '</table:table-cell>';
+ }
+ } // end for
+ $GLOBALS['odt_buffer'] .= '</table:table-row>';
+ } // end while
+ PMA_DBI_free_result($result);
- return true;
-}
+ $GLOBALS['odt_buffer'] .= '</table:table>';
-/**
- * Outputs table's structure
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param bool $do_relation whether to include relation comments
- * @param bool $do_comments whether to include the pmadb-style column comments
- * as comments in the structure; this is deprecated
- * but the parameter is left here because export.php
- * calls PMA_exportStructure() also for other export
- * types which use this parameter
- * @param bool $do_mime whether to include mime comments
- * @param bool $dates whether to include creation/update/check dates
- * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in'
- * @param string $export_type 'server', 'database', 'table'
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type)
-{
- global $cfgRelation;
-
- /* Heading */
- $GLOBALS['odt_buffer'] .= '<text:h text:outline-level="2" text:style-name="Heading_2" text:is-list-header="true">' . htmlspecialchars(__('Table structure for table') . ' ' . $table) . '</text:h>';
-
- /**
- * Get the unique keys in the table
- */
- $keys_query = 'SHOW KEYS FROM ' . PMA_backquote($table) . ' FROM '. PMA_backquote($db);
- $keys_result = PMA_DBI_query($keys_query);
- $unique_keys = array();
- while ($key = PMA_DBI_fetch_assoc($keys_result)) {
- if ($key['Non_unique'] == 0) {
- $unique_keys[] = $key['Column_name'];
- }
+ return true;
}
- PMA_DBI_free_result($keys_result);
/**
- * Gets fields properties
+ * Outputs table's structure
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param bool $do_relation whether to include relation comments
+ * @param bool $do_comments whether to include the pmadb-style column comments
+ * as comments in the structure; this is deprecated
+ * but the parameter is left here because export.php
+ * calls PMA_exportStructure() also for other export
+ * types which use this parameter
+ * @param bool $do_mime whether to include mime comments
+ * @param bool $dates whether to include creation/update/check dates
+ * @param string $export_mode 'create_table', 'triggers', 'create_view', 'stand_in'
+ * @param string $export_type 'server', 'database', 'table'
+ * @return bool Whether it suceeded
+ *
+ * @access public
*/
- PMA_DBI_select_db($db);
+ function PMA_exportStructure($db, $table, $crlf, $error_url, $do_relation = false, $do_comments = false, $do_mime = false, $dates = false, $export_mode, $export_type)
+ {
+ global $cfgRelation;
- // Check if we can use Relations
- if ($do_relation && !empty($cfgRelation['relation'])) {
- // Find which tables are related with the current one and write it in
- // an array
- $res_rel = PMA_getForeigners($db, $table);
+ /* Heading */
+ $GLOBALS['odt_buffer'] .= '<text:h text:outline-level="2" text:style-name="Heading_2" text:is-list-header="true">' . htmlspecialchars(__('Table structure for table') . ' ' . $table) . '</text:h>';
- if ($res_rel && count($res_rel) > 0) {
- $have_rel = true;
- } else {
- $have_rel = false;
+ /**
+ * Get the unique keys in the table
+ */
+ $keys_query = 'SHOW KEYS FROM ' . PMA_backquote($table) . ' FROM '. PMA_backquote($db);
+ $keys_result = PMA_DBI_query($keys_query);
+ $unique_keys = array();
+ while ($key = PMA_DBI_fetch_assoc($keys_result)) {
+ if ($key['Non_unique'] == 0) {
+ $unique_keys[] = $key['Column_name'];
+ }
}
- } else {
- $have_rel = false;
- } // end if
+ PMA_DBI_free_result($keys_result);
- /**
- * Displays the table structure
- */
- $GLOBALS['odt_buffer'] .= '<table:table table:name="' . htmlspecialchars($table) . '_data">';
- $columns_cnt = 4;
- if ($do_relation && $have_rel) {
- $columns_cnt++;
- }
- if ($do_comments) {
- $columns_cnt++;
- }
- if ($do_mime && $cfgRelation['mimework']) {
- $columns_cnt++;
- }
- $GLOBALS['odt_buffer'] .= '<table:table-column table:number-columns-repeated="' . $columns_cnt . '"/>';
- /* Header */
- $GLOBALS['odt_buffer'] .= '<table:table-row>';
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars(__('Column')) . '</text:p>'
- . '</table:table-cell>';
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars(__('Type')) . '</text:p>'
- . '</table:table-cell>';
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars(__('Null')) . '</text:p>'
- . '</table:table-cell>';
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars(__('Default')) . '</text:p>'
- . '</table:table-cell>';
- if ($do_relation && $have_rel) {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars(__('Links to')) . '</text:p>'
- . '</table:table-cell>';
- }
- if ($do_comments) {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars(__('Comments')) . '</text:p>'
- . '</table:table-cell>';
- $comments = PMA_getComments($db, $table);
- }
- if ($do_mime && $cfgRelation['mimework']) {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars(__('MIME type')) . '</text:p>'
- . '</table:table-cell>';
- $mime_map = PMA_getMIME($db, $table, true);
- }
- $GLOBALS['odt_buffer'] .= '</table:table-row>';
+ /**
+ * Gets fields properties
+ */
+ PMA_DBI_select_db($db);
- $columns = PMA_DBI_get_columns($db, $table);
- foreach ($columns as $column) {
+ // Check if we can use Relations
+ if ($do_relation && !empty($cfgRelation['relation'])) {
+ // Find which tables are related with the current one and write it in
+ // an array
+ $res_rel = PMA_getForeigners($db, $table);
- $field_name = $column['Field'];
- $GLOBALS['odt_buffer'] .= '<table:table-row>';
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars($field_name) . '</text:p>'
- . '</table:table-cell>';
- // reformat mysql query output
- // set or enum types: slashes single quotes inside options
- $type = $column['Type'];
- if (preg_match('/^(set|enum)\((.+)\)$/i', $type, $tmp)) {
- $tmp[2] = substr(preg_replace('/([^,])\'\'/', '\\1\\\'', ',' . $tmp[2]), 1);
- $type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
- $type_nowrap = '';
-
- $binary = 0;
- $unsigned = 0;
- $zerofill = 0;
- } else {
- $type_nowrap = ' nowrap="nowrap"';
- $type = preg_replace('/BINARY/i', '', $type);
- $type = preg_replace('/ZEROFILL/i', '', $type);
- $type = preg_replace('/UNSIGNED/i', '', $type);
- if (empty($type)) {
- $type = ' ';
+ if ($res_rel && count($res_rel) > 0) {
+ $have_rel = true;
+ } else {
+ $have_rel = false;
}
+ } else {
+ $have_rel = false;
+ } // end if
- $binary = preg_match('/BINARY/i', $column['Type']);
- $unsigned = preg_match('/UNSIGNED/i', $column['Type']);
- $zerofill = preg_match('/ZEROFILL/i', $column['Type']);
+ /**
+ * Displays the table structure
+ */
+ $GLOBALS['odt_buffer'] .= '<table:table table:name="' . htmlspecialchars($table) . '_data">';
+ $columns_cnt = 4;
+ if ($do_relation && $have_rel) {
+ $columns_cnt++;
+ }
+ if ($do_comments) {
+ $columns_cnt++;
}
+ if ($do_mime && $cfgRelation['mimework']) {
+ $columns_cnt++;
+ }
+ $GLOBALS['odt_buffer'] .= '<table:table-column table:number-columns-repeated="' . $columns_cnt . '"/>';
+ /* Header */
+ $GLOBALS['odt_buffer'] .= '<table:table-row>';
$GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars($type) . '</text:p>'
+ . '<text:p>' . htmlspecialchars(__('Column')) . '</text:p>'
. '</table:table-cell>';
- if (!isset($column['Default'])) {
- if ($column['Null'] != 'NO') {
- $column['Default'] = 'NULL';
- } else {
- $column['Default'] = '';
- }
- } else {
- $column['Default'] = $column['Default'];
- }
$GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars(($column['Null'] == '' || $column['Null'] == 'NO') ? __('No') : __('Yes')) . '</text:p>'
+ . '<text:p>' . htmlspecialchars(__('Type')) . '</text:p>'
. '</table:table-cell>';
$GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars($column['Default']) . '</text:p>'
+ . '<text:p>' . htmlspecialchars(__('Null')) . '</text:p>'
+ . '</table:table-cell>';
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars(__('Default')) . '</text:p>'
. '</table:table-cell>';
-
if ($do_relation && $have_rel) {
- if (isset($res_rel[$field_name])) {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars($res_rel[$field_name]['foreign_table'] . ' (' . $res_rel[$field_name]['foreign_field'] . ')') . '</text:p>'
- . '</table:table-cell>';
- }
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars(__('Links to')) . '</text:p>'
+ . '</table:table-cell>';
}
if ($do_comments) {
- if (isset($comments[$field_name])) {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars($comments[$field_name]) . '</text:p>'
- . '</table:table-cell>';
- } else {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p></text:p>'
- . '</table:table-cell>';
- }
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars(__('Comments')) . '</text:p>'
+ . '</table:table-cell>';
+ $comments = PMA_getComments($db, $table);
}
if ($do_mime && $cfgRelation['mimework']) {
- if (isset($mime_map[$field_name])) {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p>' . htmlspecialchars(str_replace('_', '/', $mime_map[$field_name]['mimetype'])) . '</text:p>'
- . '</table:table-cell>';
- } else {
- $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
- . '<text:p></text:p>'
- . '</table:table-cell>';
- }
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars(__('MIME type')) . '</text:p>'
+ . '</table:table-cell>';
+ $mime_map = PMA_getMIME($db, $table, true);
}
$GLOBALS['odt_buffer'] .= '</table:table-row>';
- } // end while
- $GLOBALS['odt_buffer'] .= '</table:table>';
- return true;
-} // end of the 'PMA_exportStructure' function
+ $columns = PMA_DBI_get_columns($db, $table);
+ foreach ($columns as $column) {
+
+ $field_name = $column['Field'];
+ $GLOBALS['odt_buffer'] .= '<table:table-row>';
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars($field_name) . '</text:p>'
+ . '</table:table-cell>';
+ // reformat mysql query output
+ // set or enum types: slashes single quotes inside options
+ $type = $column['Type'];
+ if (preg_match('/^(set|enum)\((.+)\)$/i', $type, $tmp)) {
+ $tmp[2] = substr(preg_replace('/([^,])\'\'/', '\\1\\\'', ',' . $tmp[2]), 1);
+ $type = $tmp[1] . '(' . str_replace(',', ', ', $tmp[2]) . ')';
+ $type_nowrap = '';
+
+ $binary = 0;
+ $unsigned = 0;
+ $zerofill = 0;
+ } else {
+ $type_nowrap = ' nowrap="nowrap"';
+ $type = preg_replace('/BINARY/i', '', $type);
+ $type = preg_replace('/ZEROFILL/i', '', $type);
+ $type = preg_replace('/UNSIGNED/i', '', $type);
+ if (empty($type)) {
+ $type = ' ';
+ }
+
+ $binary = preg_match('/BINARY/i', $column['Type']);
+ $unsigned = preg_match('/UNSIGNED/i', $column['Type']);
+ $zerofill = preg_match('/ZEROFILL/i', $column['Type']);
+ }
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars($type) . '</text:p>'
+ . '</table:table-cell>';
+ if (!isset($column['Default'])) {
+ if ($column['Null'] != 'NO') {
+ $column['Default'] = 'NULL';
+ } else {
+ $column['Default'] = '';
+ }
+ } else {
+ $column['Default'] = $column['Default'];
+ }
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars(($column['Null'] == '' || $column['Null'] == 'NO') ? __('No') : __('Yes')) . '</text:p>'
+ . '</table:table-cell>';
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars($column['Default']) . '</text:p>'
+ . '</table:table-cell>';
+
+ if ($do_relation && $have_rel) {
+ if (isset($res_rel[$field_name])) {
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars($res_rel[$field_name]['foreign_table'] . ' (' . $res_rel[$field_name]['foreign_field'] . ')') . '</text:p>'
+ . '</table:table-cell>';
+ }
+ }
+ if ($do_comments) {
+ if (isset($comments[$field_name])) {
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars($comments[$field_name]) . '</text:p>'
+ . '</table:table-cell>';
+ } else {
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p></text:p>'
+ . '</table:table-cell>';
+ }
+ }
+ if ($do_mime && $cfgRelation['mimework']) {
+ if (isset($mime_map[$field_name])) {
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p>' . htmlspecialchars(str_replace('_', '/', $mime_map[$field_name]['mimetype'])) . '</text:p>'
+ . '</table:table-cell>';
+ } else {
+ $GLOBALS['odt_buffer'] .= '<table:table-cell office:value-type="string">'
+ . '<text:p></text:p>'
+ . '</table:table-cell>';
+ }
+ }
+ $GLOBALS['odt_buffer'] .= '</table:table-row>';
+ } // end while
+
+ $GLOBALS['odt_buffer'] .= '</table:table>';
+ return true;
+ } // end of the 'PMA_exportStructure' function
} // end else
?>
diff --git a/libraries/export/pdf.php b/libraries/export/pdf.php
index 01ffc88..3cc0acf 100644
--- a/libraries/export/pdf.php
+++ b/libraries/export/pdf.php
@@ -30,441 +30,441 @@ if (isset($plugin_list)) {
);
} else {
-/**
- * Font used in PDF.
- *
- * @todo Make this configuratble (at least Sans/Serif).
- */
-define('PMA_PDF_FONT', 'DejaVuSans');
-require_once './libraries/tcpdf/tcpdf.php';
+ /**
+ * Font used in PDF.
+ *
+ * @todo Make this configuratble (at least Sans/Serif).
+ */
+ define('PMA_PDF_FONT', 'DejaVuSans');
+ require_once './libraries/tcpdf/tcpdf.php';
+
+ /**
+ * Adapted from a LGPL script by Philip Clarke
+ * @package phpMyAdmin-Export
+ * @subpackage PDF
+ */
+ class PMA_PDF extends TCPDF
+ {
+ var $tablewidths;
+ var $headerset;
+ var $footerset;
-/**
- * Adapted from a LGPL script by Philip Clarke
- * @package phpMyAdmin-Export
- * @subpackage PDF
- */
-class PMA_PDF extends TCPDF
-{
- var $tablewidths;
- var $headerset;
- var $footerset;
-
- function checkPageBreak($h=0, $y='', $addpage=true) {
- if ($this->empty_string($y)) {
- $y = $this->y;
- }
- $current_page = $this->page;
- if ((($y + $h) > $this->PageBreakTrigger) AND (!$this->InFooter) AND ($this->AcceptPageBreak())) {
- if ($addpage) {
- //Automatic page break
- $x = $this->x;
- $this->AddPage($this->CurOrientation);
- $this->y = $this->dataY;
- $oldpage = $this->page - 1;
- if ($this->rtl) {
- if ($this->pagedim[$this->page]['orm'] != $this->pagedim[$oldpage]['orm']) {
- $this->x = $x - ($this->pagedim[$this->page]['orm'] - $this->pagedim[$oldpage]['orm']);
- } else {
- $this->x = $x;
- }
- } else {
- if ($this->pagedim[$this->page]['olm'] != $this->pagedim[$oldpage]['olm']) {
- $this->x = $x + ($this->pagedim[$this->page]['olm'] - $this->pagedim[$oldpage]['olm']);
+ function checkPageBreak($h=0, $y='', $addpage=true) {
+ if ($this->empty_string($y)) {
+ $y = $this->y;
+ }
+ $current_page = $this->page;
+ if ((($y + $h) > $this->PageBreakTrigger) AND (!$this->InFooter) AND ($this->AcceptPageBreak())) {
+ if ($addpage) {
+ //Automatic page break
+ $x = $this->x;
+ $this->AddPage($this->CurOrientation);
+ $this->y = $this->dataY;
+ $oldpage = $this->page - 1;
+ if ($this->rtl) {
+ if ($this->pagedim[$this->page]['orm'] != $this->pagedim[$oldpage]['orm']) {
+ $this->x = $x - ($this->pagedim[$this->page]['orm'] - $this->pagedim[$oldpage]['orm']);
+ } else {
+ $this->x = $x;
+ }
} else {
- $this->x = $x;
+ if ($this->pagedim[$this->page]['olm'] != $this->pagedim[$oldpage]['olm']) {
+ $this->x = $x + ($this->pagedim[$this->page]['olm'] - $this->pagedim[$oldpage]['olm']);
+ } else {
+ $this->x = $x;
+ }
}
}
+ return true;
}
- return true;
- }
- if ($current_page != $this->page) {
- // account for columns mode
- return true;
- }
- return false;
- }
-
- function Header()
- {
- global $maxY;
- // Check if header for this page already exists
- if (!isset($this->headerset[$this->page])) {
- $fullwidth = 0;
- foreach ($this->tablewidths as $width) {
- $fullwidth += $width;
+ if ($current_page != $this->page) {
+ // account for columns mode
+ return true;
}
- $this->SetY(($this->tMargin) - ($this->FontSizePt/$this->k)*3);
- $this->cellFontSize = $this->FontSizePt ;
- $this->SetFont(PMA_PDF_FONT, '', ($this->titleFontSize ? $this->titleFontSize : $this->FontSizePt));
- $this->Cell(0, $this->FontSizePt, $this->titleText, 0, 1, 'C');
- $this->SetFont(PMA_PDF_FONT, '', $this->cellFontSize);
- $this->SetY(($this->tMargin) - ($this->FontSizePt/$this->k)*1.5);
- $this->Cell(0, $this->FontSizePt, __('Database') .': ' .$this->currentDb .', ' .__('Table') .': ' .$this->currentTable, 0, 1, 'L');
- $l = ($this->lMargin);
- foreach ($this->colTitles as $col => $txt) {
- $this->SetXY($l, ($this->tMargin));
- $this->MultiCell($this->tablewidths[$col], $this->FontSizePt, $txt);
- $l += $this->tablewidths[$col] ;
- $maxY = ($maxY < $this->getY()) ? $this->getY() : $maxY ;
- }
- $this->SetXY($this->lMargin, $this->tMargin);
- $this->setFillColor(200, 200, 200);
- $l = ($this->lMargin);
- foreach ($this->colTitles as $col => $txt) {
- $this->SetXY($l, $this->tMargin);
- $this->cell($this->tablewidths[$col], $maxY-($this->tMargin), '', 1, 0, 'L', 1);
- $this->SetXY($l, $this->tMargin);
- $this->MultiCell($this->tablewidths[$col], $this->FontSizePt, $txt, 0, 'C');
- $l += $this->tablewidths[$col];
- }
- $this->setFillColor(255, 255, 255);
- // set headerset
- $this->headerset[$this->page] = 1;
+ return false;
}
- $this->dataY = $maxY;
- }
+ function Header()
+ {
+ global $maxY;
+ // Check if header for this page already exists
+ if (!isset($this->headerset[$this->page])) {
+ $fullwidth = 0;
+ foreach ($this->tablewidths as $width) {
+ $fullwidth += $width;
+ }
+ $this->SetY(($this->tMargin) - ($this->FontSizePt/$this->k)*3);
+ $this->cellFontSize = $this->FontSizePt ;
+ $this->SetFont(PMA_PDF_FONT, '', ($this->titleFontSize ? $this->titleFontSize : $this->FontSizePt));
+ $this->Cell(0, $this->FontSizePt, $this->titleText, 0, 1, 'C');
+ $this->SetFont(PMA_PDF_FONT, '', $this->cellFontSize);
+ $this->SetY(($this->tMargin) - ($this->FontSizePt/$this->k)*1.5);
+ $this->Cell(0, $this->FontSizePt, __('Database') .': ' .$this->currentDb .', ' .__('Table') .': ' .$this->currentTable, 0, 1, 'L');
+ $l = ($this->lMargin);
+ foreach ($this->colTitles as $col => $txt) {
+ $this->SetXY($l, ($this->tMargin));
+ $this->MultiCell($this->tablewidths[$col], $this->FontSizePt, $txt);
+ $l += $this->tablewidths[$col] ;
+ $maxY = ($maxY < $this->getY()) ? $this->getY() : $maxY ;
+ }
+ $this->SetXY($this->lMargin, $this->tMargin);
+ $this->setFillColor(200, 200, 200);
+ $l = ($this->lMargin);
+ foreach ($this->colTitles as $col => $txt) {
+ $this->SetXY($l, $this->tMargin);
+ $this->cell($this->tablewidths[$col], $maxY-($this->tMargin), '', 1, 0, 'L', 1);
+ $this->SetXY($l, $this->tMargin);
+ $this->MultiCell($this->tablewidths[$col], $this->FontSizePt, $txt, 0, 'C');
+ $l += $this->tablewidths[$col];
+ }
+ $this->setFillColor(255, 255, 255);
+ // set headerset
+ $this->headerset[$this->page] = 1;
+ }
- function Footer()
- {
- // Check if footer for this page already exists
- if (!isset($this->footerset[$this->page])) {
- $this->SetY(-15);
- //Page number
- $this->setFooterFont(PMA_PDF_FONT, '', 14);
- $this->Cell(0, 6, __('Page number:') . ' ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 'T', 0, 'C');
-
- // set footerset
- $this->footerset[$this->page] = 1;
+ $this->dataY = $maxY;
}
- }
- function morepagestable($lineheight=8)
- {
- // some things to set and 'remember'
- $l = $this->lMargin;
- $startheight = $h = $this->dataY;
- $startpage = $currpage = $this->page;
-
- // calculate the whole width
- $fullwidth = 0;
- foreach ($this->tablewidths as $width) {
- $fullwidth += $width;
+ function Footer()
+ {
+ // Check if footer for this page already exists
+ if (!isset($this->footerset[$this->page])) {
+ $this->SetY(-15);
+ //Page number
+ $this->setFooterFont(PMA_PDF_FONT, '', 14);
+ $this->Cell(0, 6, __('Page number:') . ' ' . $this->getAliasNumPage() . '/' . $this->getAliasNbPages(), 'T', 0, 'C');
+
+ // set footerset
+ $this->footerset[$this->page] = 1;
+ }
}
- // Now let's start to write the table
- $row = 0;
- $tmpheight = array();
- $maxpage = $this->page;
+ function morepagestable($lineheight=8)
+ {
+ // some things to set and 'remember'
+ $l = $this->lMargin;
+ $startheight = $h = $this->dataY;
+ $startpage = $currpage = $this->page;
- while ($data = PMA_DBI_fetch_row($this->results)) {
- $this->page = $currpage;
- // write the horizontal borders
- $this->Line($l, $h, $fullwidth+$l, $h);
- // write the content and remember the height of the highest col
- foreach ($data as $col => $txt) {
+ // calculate the whole width
+ $fullwidth = 0;
+ foreach ($this->tablewidths as $width) {
+ $fullwidth += $width;
+ }
+
+ // Now let's start to write the table
+ $row = 0;
+ $tmpheight = array();
+ $maxpage = $this->page;
+
+ while ($data = PMA_DBI_fetch_row($this->results)) {
$this->page = $currpage;
- $this->SetXY($l, $h);
- if ($this->tablewidths[$col] > 0) {
- $this->MultiCell($this->tablewidths[$col], $lineheight, $txt, 0, $this->colAlign[$col]);
- $l += $this->tablewidths[$col];
- }
+ // write the horizontal borders
+ $this->Line($l, $h, $fullwidth+$l, $h);
+ // write the content and remember the height of the highest col
+ foreach ($data as $col => $txt) {
+ $this->page = $currpage;
+ $this->SetXY($l, $h);
+ if ($this->tablewidths[$col] > 0) {
+ $this->MultiCell($this->tablewidths[$col], $lineheight, $txt, 0, $this->colAlign[$col]);
+ $l += $this->tablewidths[$col];
+ }
- if (!isset($tmpheight[$row.'-'.$this->page])) {
- $tmpheight[$row.'-'.$this->page] = 0;
- }
- if ($tmpheight[$row.'-'.$this->page] < $this->GetY()) {
- $tmpheight[$row.'-'.$this->page] = $this->GetY();
- }
- if ($this->page > $maxpage) {
- $maxpage = $this->page;
+ if (!isset($tmpheight[$row.'-'.$this->page])) {
+ $tmpheight[$row.'-'.$this->page] = 0;
+ }
+ if ($tmpheight[$row.'-'.$this->page] < $this->GetY()) {
+ $tmpheight[$row.'-'.$this->page] = $this->GetY();
+ }
+ if ($this->page > $maxpage) {
+ $maxpage = $this->page;
+ }
+ unset($data[$col]);
}
- unset($data[$col]);
- }
- // get the height we were in the last used page
- $h = $tmpheight[$row.'-'.$maxpage];
- // set the "pointer" to the left margin
- $l = $this->lMargin;
- // set the $currpage to the last page
- $currpage = $maxpage;
- unset($data[$row]);
- $row++;
- }
- // draw the borders
- // we start adding a horizontal line on the last page
- $this->page = $maxpage;
- $this->Line($l, $h, $fullwidth+$l, $h);
- // now we start at the top of the document and walk down
- for ($i = $startpage; $i <= $maxpage; $i++) {
- $this->page = $i;
- $l = $this->lMargin;
- $t = ($i == $startpage) ? $startheight : $this->tMargin;
- $lh = ($i == $maxpage) ? $h : $this->h-$this->bMargin;
- $this->Line($l, $t, $l, $lh);
- foreach ($this->tablewidths as $width) {
- $l += $width;
+ // get the height we were in the last used page
+ $h = $tmpheight[$row.'-'.$maxpage];
+ // set the "pointer" to the left margin
+ $l = $this->lMargin;
+ // set the $currpage to the last page
+ $currpage = $maxpage;
+ unset($data[$row]);
+ $row++;
+ }
+ // draw the borders
+ // we start adding a horizontal line on the last page
+ $this->page = $maxpage;
+ $this->Line($l, $h, $fullwidth+$l, $h);
+ // now we start at the top of the document and walk down
+ for ($i = $startpage; $i <= $maxpage; $i++) {
+ $this->page = $i;
+ $l = $this->lMargin;
+ $t = ($i == $startpage) ? $startheight : $this->tMargin;
+ $lh = ($i == $maxpage) ? $h : $this->h-$this->bMargin;
$this->Line($l, $t, $l, $lh);
+ foreach ($this->tablewidths as $width) {
+ $l += $width;
+ $this->Line($l, $t, $l, $lh);
+ }
}
+ // set it to the last page, if not it'll cause some problems
+ $this->page = $maxpage;
}
- // set it to the last page, if not it'll cause some problems
- $this->page = $maxpage;
- }
- function setAttributes($attr = array())
- {
- foreach ($attr as $key => $val) {
- $this->$key = $val ;
+ function setAttributes($attr = array())
+ {
+ foreach ($attr as $key => $val) {
+ $this->$key = $val ;
+ }
}
- }
- function setTopMargin($topMargin)
- {
- $this->tMargin = $topMargin;
- }
+ function setTopMargin($topMargin)
+ {
+ $this->tMargin = $topMargin;
+ }
- function mysql_report($query)
- {
- unset($this->tablewidths);
- unset($this->colTitles);
- unset($this->titleWidth);
- unset($this->colFits);
- unset($this->display_column);
- unset($this->colAlign);
-
- /**
- * Pass 1 for column widths
- */
- $this->results = PMA_DBI_query($query, null, PMA_DBI_QUERY_UNBUFFERED);
- $this->numFields = PMA_DBI_num_fields($this->results);
- $this->fields = PMA_DBI_get_fields_meta($this->results);
-
- // sColWidth = starting col width (an average size width)
- $availableWidth = $this->w - $this->lMargin - $this->rMargin;
- $this->sColWidth = $availableWidth / $this->numFields;
- $totalTitleWidth = 0;
-
- // loop through results header and set initial col widths/ titles/ alignment
- // if a col title is less than the starting col width, reduce that column size
- for ($i = 0; $i < $this->numFields; $i++) {
- $stringWidth = $this->getstringwidth($this->fields[$i]->name) + 6 ;
- // save the real title's width
- $titleWidth[$i] = $stringWidth;
- $totalTitleWidth += $stringWidth;
-
- // set any column titles less than the start width to the column title width
- if ($stringWidth < $this->sColWidth) {
- $colFits[$i] = $stringWidth ;
- }
- $this->colTitles[$i] = $this->fields[$i]->name;
- $this->display_column[$i] = true;
-
- switch ($this->fields[$i]->type) {
- case 'int':
- $this->colAlign[$i] = 'R';
- break;
- case 'blob':
- case 'tinyblob':
- case 'mediumblob':
- case 'longblob':
- /**
- * @todo do not deactivate completely the display
- * but show the field's name and [BLOB]
- */
- if (stristr($this->fields[$i]->flags, 'BINARY')) {
- $this->display_column[$i] = false;
- unset($this->colTitles[$i]);
+ function mysql_report($query)
+ {
+ unset($this->tablewidths);
+ unset($this->colTitles);
+ unset($this->titleWidth);
+ unset($this->colFits);
+ unset($this->display_column);
+ unset($this->colAlign);
+
+ /**
+ * Pass 1 for column widths
+ */
+ $this->results = PMA_DBI_query($query, null, PMA_DBI_QUERY_UNBUFFERED);
+ $this->numFields = PMA_DBI_num_fields($this->results);
+ $this->fields = PMA_DBI_get_fields_meta($this->results);
+
+ // sColWidth = starting col width (an average size width)
+ $availableWidth = $this->w - $this->lMargin - $this->rMargin;
+ $this->sColWidth = $availableWidth / $this->numFields;
+ $totalTitleWidth = 0;
+
+ // loop through results header and set initial col widths/ titles/ alignment
+ // if a col title is less than the starting col width, reduce that column size
+ for ($i = 0; $i < $this->numFields; $i++) {
+ $stringWidth = $this->getstringwidth($this->fields[$i]->name) + 6 ;
+ // save the real title's width
+ $titleWidth[$i] = $stringWidth;
+ $totalTitleWidth += $stringWidth;
+
+ // set any column titles less than the start width to the column title width
+ if ($stringWidth < $this->sColWidth) {
+ $colFits[$i] = $stringWidth ;
+ }
+ $this->colTitles[$i] = $this->fields[$i]->name;
+ $this->display_column[$i] = true;
+
+ switch ($this->fields[$i]->type) {
+ case 'int':
+ $this->colAlign[$i] = 'R';
+ break;
+ case 'blob':
+ case 'tinyblob':
+ case 'mediumblob':
+ case 'longblob':
+ /**
+ * @todo do not deactivate completely the display
+ * but show the field's name and [BLOB]
+ */
+ if (stristr($this->fields[$i]->flags, 'BINARY')) {
+ $this->display_column[$i] = false;
+ unset($this->colTitles[$i]);
+ }
+ $this->colAlign[$i] = 'L';
+ break;
+ default:
+ $this->colAlign[$i] = 'L';
}
- $this->colAlign[$i] = 'L';
- break;
- default:
- $this->colAlign[$i] = 'L';
}
- }
- // title width verification
- if ($totalTitleWidth > $availableWidth) {
- $adjustingMode = true;
- } else {
- $adjustingMode = false;
- // we have enough space for all the titles at their
- // original width so use the true title's width
- foreach ($titleWidth as $key => $val) {
- $colFits[$key] = $val;
+ // title width verification
+ if ($totalTitleWidth > $availableWidth) {
+ $adjustingMode = true;
+ } else {
+ $adjustingMode = false;
+ // we have enough space for all the titles at their
+ // original width so use the true title's width
+ foreach ($titleWidth as $key => $val) {
+ $colFits[$key] = $val;
+ }
}
- }
- // loop through the data; any column whose contents
- // is greater than the column size is resized
- /**
- * @todo force here a LIMIT to avoid reading all rows
- */
- while ($row = PMA_DBI_fetch_row($this->results)) {
- foreach ($colFits as $key => $val) {
- $stringWidth = $this->getstringwidth($row[$key]) + 6 ;
- if ($adjustingMode && ($stringWidth > $this->sColWidth)) {
- // any column whose data's width is bigger than the start width is now discarded
- unset($colFits[$key]);
- } else {
- // if data's width is bigger than the current column width,
- // enlarge the column (but avoid enlarging it if the
- // data's width is very big)
- if ($stringWidth > $val && $stringWidth < ($this->sColWidth * 3)) {
- $colFits[$key] = $stringWidth ;
+ // loop through the data; any column whose contents
+ // is greater than the column size is resized
+ /**
+ * @todo force here a LIMIT to avoid reading all rows
+ */
+ while ($row = PMA_DBI_fetch_row($this->results)) {
+ foreach ($colFits as $key => $val) {
+ $stringWidth = $this->getstringwidth($row[$key]) + 6 ;
+ if ($adjustingMode && ($stringWidth > $this->sColWidth)) {
+ // any column whose data's width is bigger than the start width is now discarded
+ unset($colFits[$key]);
+ } else {
+ // if data's width is bigger than the current column width,
+ // enlarge the column (but avoid enlarging it if the
+ // data's width is very big)
+ if ($stringWidth > $val && $stringWidth < ($this->sColWidth * 3)) {
+ $colFits[$key] = $stringWidth ;
+ }
}
}
}
- }
-
- $totAlreadyFitted = 0;
- foreach ($colFits as $key => $val) {
- // set fitted columns to smallest size
- $this->tablewidths[$key] = $val;
- // to work out how much (if any) space has been freed up
- $totAlreadyFitted += $val;
- }
- if ($adjustingMode) {
- $surplus = (sizeof($colFits) * $this->sColWidth) - $totAlreadyFitted;
- $surplusToAdd = $surplus / ($this->numFields - sizeof($colFits));
- } else {
- $surplusToAdd = 0;
- }
+ $totAlreadyFitted = 0;
+ foreach ($colFits as $key => $val) {
+ // set fitted columns to smallest size
+ $this->tablewidths[$key] = $val;
+ // to work out how much (if any) space has been freed up
+ $totAlreadyFitted += $val;
+ }
- for ($i=0; $i < $this->numFields; $i++) {
- if (!in_array($i, array_keys($colFits))) {
- $this->tablewidths[$i] = $this->sColWidth + $surplusToAdd;
+ if ($adjustingMode) {
+ $surplus = (sizeof($colFits) * $this->sColWidth) - $totAlreadyFitted;
+ $surplusToAdd = $surplus / ($this->numFields - sizeof($colFits));
+ } else {
+ $surplusToAdd = 0;
}
- if ($this->display_column[$i] == false) {
- $this->tablewidths[$i] = 0;
+
+ for ($i=0; $i < $this->numFields; $i++) {
+ if (!in_array($i, array_keys($colFits))) {
+ $this->tablewidths[$i] = $this->sColWidth + $surplusToAdd;
+ }
+ if ($this->display_column[$i] == false) {
+ $this->tablewidths[$i] = 0;
+ }
}
- }
- ksort($this->tablewidths);
+ ksort($this->tablewidths);
- PMA_DBI_free_result($this->results);
+ PMA_DBI_free_result($this->results);
- // Pass 2
+ // Pass 2
- $this->results = PMA_DBI_query($query, null, PMA_DBI_QUERY_UNBUFFERED);
- $this->setY($this->tMargin);
- $this->AddPage();
- $this->morepagestable($this->FontSizePt);
- PMA_DBI_free_result($this->results);
+ $this->results = PMA_DBI_query($query, null, PMA_DBI_QUERY_UNBUFFERED);
+ $this->setY($this->tMargin);
+ $this->AddPage();
+ $this->morepagestable($this->FontSizePt);
+ PMA_DBI_free_result($this->results);
- } // end of mysql_report function
+ } // end of mysql_report function
-} // end of PMA_PDF class
+ } // end of PMA_PDF class
-$pdf = new PMA_PDF('L', 'pt', 'A3');
+ $pdf = new PMA_PDF('L', 'pt', 'A3');
-/**
- * Finalize the pdf.
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportFooter()
-{
- global $pdf;
+ /**
+ * Finalize the pdf.
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportFooter()
+ {
+ global $pdf;
- // instead of $pdf->Output():
- if (!PMA_exportOutputHandler($pdf->getPDFData())) {
- return false;
- }
+ // instead of $pdf->Output():
+ if (!PMA_exportOutputHandler($pdf->getPDFData())) {
+ return false;
+ }
- return true;
-}
+ return true;
+ }
-/**
- * Initialize the pdf to export data.
- *
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportHeader()
-{
- global $pdf_report_title;
- global $pdf;
-
- $pdf->AddFont('DejaVuSans', '', 'dejavusans.php');
- $pdf->AddFont('DejaVuSans', 'B', 'dejavusansb.php');
- $pdf->AddFont('DejaVuSerif', '', 'dejavuserif.php');
- $pdf->AddFont('DejaVuSerif', 'B', 'dejavuserifb.php');
- $pdf->SetFont(PMA_PDF_FONT, '', 11.5);
- $pdf->setFooterFont(array(PMA_PDF_FONT, '', 11.5));
- $pdf->AliasNbPages();
- $pdf->Open();
-
- $attr=array('titleFontSize' => 18, 'titleText' => $pdf_report_title);
- $pdf->setAttributes($attr);
- $pdf->setTopMargin(45);
-
- return true;
-}
+ /**
+ * Initialize the pdf to export data.
+ *
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportHeader()
+ {
+ global $pdf_report_title;
+ global $pdf;
+
+ $pdf->AddFont('DejaVuSans', '', 'dejavusans.php');
+ $pdf->AddFont('DejaVuSans', 'B', 'dejavusansb.php');
+ $pdf->AddFont('DejaVuSerif', '', 'dejavuserif.php');
+ $pdf->AddFont('DejaVuSerif', 'B', 'dejavuserifb.php');
+ $pdf->SetFont(PMA_PDF_FONT, '', 11.5);
+ $pdf->setFooterFont(array(PMA_PDF_FONT, '', 11.5));
+ $pdf->AliasNbPages();
+ $pdf->Open();
+
+ $attr=array('titleFontSize' => 18, 'titleText' => $pdf_report_title);
+ $pdf->setAttributes($attr);
+ $pdf->setTopMargin(45);
+
+ return true;
+ }
-/**
- * Outputs database header
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBHeader($db)
-{
- return true;
-}
+ /**
+ * Outputs database header
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBHeader($db)
+ {
+ return true;
+ }
-/**
- * Outputs database footer
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBFooter($db)
-{
- return true;
-}
+ /**
+ * Outputs database footer
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBFooter($db)
+ {
+ return true;
+ }
-/**
- * Outputs CREATE DATABASE statement
- *
- * @param string $db Database name
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportDBCreate($db)
-{
- return true;
-}
+ /**
+ * Outputs CREATE DATABASE statement
+ *
+ * @param string $db Database name
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportDBCreate($db)
+ {
+ return true;
+ }
-/**
- * Outputs the content of a table in PDF format
- *
- * @param string $db database name
- * @param string $table table name
- * @param string $crlf the end of line sequence
- * @param string $error_url the url to go back in case of error
- * @param string $sql_query SQL query for obtaining data
- * @return bool Whether it suceeded
- *
- * @access public
- */
-function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
-{
- global $pdf;
+ /**
+ * Outputs the content of a table in PDF format
+ *
+ * @param string $db database name
+ * @param string $table table name
+ * @param string $crlf the end of line sequence
+ * @param string $error_url the url to go back in case of error
+ * @param string $sql_query SQL query for obtaining data
+ * @return bool Whether it suceeded
+ *
+ * @access public
+ */
+ function PMA_exportData($db, $table, $crlf, $error_url, $sql_query)
+ {
+ global $pdf;
- $attr=array('currentDb' => $db, 'currentTable' => $table);
- $pdf->setAttributes($attr);
- $pdf->mysql_report($sql_query);
+ $attr=array('currentDb' => $db, 'currentTable' => $table);
+ $pdf->setAttributes($attr);
+ $pdf->mysql_report($sql_query);
- return true;
-} // end of the 'PMA_exportData()' function
+ return true;
+ } // end of the 'PMA_exportData()' function
}
?>
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-12837-g8cb8a3d
by Michal Čihař 02 Aug '11
by Michal Čihař 02 Aug '11
02 Aug '11
The branch, master has been updated
via 8cb8a3d4c75dc6bf9665d4a3e80a2fea1a1b31eb (commit)
via 07690aa7ea77784bf6e203c8a2ed16960421f622 (commit)
via d74f90b848161a20b5cc2548dcad412cd7c4bf6e (commit)
via d7807aee241e7e5fea221b8e79af3f145aee67a0 (commit)
via 5cf92b0cc83c480e980f25e68c3b9884f34cfbb0 (commit)
via fdceb91948fd0cba308c877f34c276dda42e0f27 (commit)
via 5020a62da0e5b5228beb156bd4914fd5e4ab81fa (commit)
via a275af5e8b6a2ec3858b7a67231f365859125040 (commit)
via a0334dee871b40c85896f705cf04d982855c6f48 (commit)
via d0cd77517cd2ced62c789a77c4a9c6db2eda3d53 (commit)
via 29c398e923af5a00f885df6aff191201f39d93c5 (commit)
via 62cb73505c677f9dae2d6629b2503131c54a3ecd (commit)
via ffeaf03547ac26bb162309e351ae6c5c88c94728 (commit)
via 2e2ba2732f6b9f20460cdb2d2eca92262347b337 (commit)
via 4bea4ab7fe63c740cc6a066175600cc93b408ad4 (commit)
via 1182ef584d4a8bcb6b732e7bf332d66b8dd55382 (commit)
via 96c3dc32a49b9670cdd098713a6f992fcb584457 (commit)
via ec8a4e140f6192a8492dd861e48fba583f1637db (commit)
via cea2a9c5315ad520015670bc0a55870e7e043a99 (commit)
via 28e50fd5ba9742af157c3e1e5db56a56aa2080e9 (commit)
via f7323710ea2d150c14bc6ef3f30918063a5ec5c9 (commit)
via a458f0d64478651ccdc4e1640ee28d6ab33ada91 (commit)
via 6ef25991188b42bf2f509b95c93a131b469c9f51 (commit)
via 041448f4833b646dc203d5c2d4bb60fff48269ed (commit)
via d22260fe9950e5a5e09104caa344178bfa2a32af (commit)
via e94e6df9468e4576e821e9b4b6443ff6136cc9ae (commit)
via 04c13485078c5b217bb1e51e880975a057908ad0 (commit)
via 6c465718b8f6c54c7d1b8612c8b959e51b731096 (commit)
via 53e1de72e4c4e19c6a5f4a6c070f9962e3b2c6c0 (commit)
via c817f38d0694bfc06a418f0968251f3908c4a635 (commit)
via 62068de78f6b57f414a06ceb84a75695eb4a6eb9 (commit)
via 5f67e63aed986658ee43ac9eacee4175c94a2fe6 (commit)
via 7f8977747ea1e9c4b72af0e31e834698534306cf (commit)
via 809aa8944153ffc70b0afca88f4c4e86b9ce6952 (commit)
via 9e91fb4aeef46173d84af9f5cd6998d5bdf67382 (commit)
via 6a0af21e73e38926c3ef0c8a7c2a70d9cd9a15de (commit)
via ffcd0d8139c54e2596b8a348a70b29993813c314 (commit)
via 6049062c7dcbb191c6cf61940eead018b57fc7e7 (commit)
via a15f84b036beb82bce327871307d6be06d27c646 (commit)
via 566b75f0478a12ca9d154ec6275643802ade3217 (commit)
via 9b65d400d3ba3cf2341e67e5cafc2708c9e19eaa (commit)
from 3a373b4a14f9fbb3f8f7dbec3b0166efe17cac1f (commit)
- Log -----------------------------------------------------------------
commit 8cb8a3d4c75dc6bf9665d4a3e80a2fea1a1b31eb
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 12:41:35 2011 +0200
Translation update done using Pootle.
commit 07690aa7ea77784bf6e203c8a2ed16960421f622
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:59:31 2011 +0200
Translation update done using Pootle.
commit d74f90b848161a20b5cc2548dcad412cd7c4bf6e
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:53:15 2011 +0200
Translation update done using Pootle.
commit d7807aee241e7e5fea221b8e79af3f145aee67a0
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:52:12 2011 +0200
Translation update done using Pootle.
commit 5cf92b0cc83c480e980f25e68c3b9884f34cfbb0
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:50:41 2011 +0200
Translation update done using Pootle.
commit fdceb91948fd0cba308c877f34c276dda42e0f27
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:50:15 2011 +0200
Translation update done using Pootle.
commit 5020a62da0e5b5228beb156bd4914fd5e4ab81fa
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:49:57 2011 +0200
Translation update done using Pootle.
commit a275af5e8b6a2ec3858b7a67231f365859125040
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:49:42 2011 +0200
Translation update done using Pootle.
commit a0334dee871b40c85896f705cf04d982855c6f48
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:46:59 2011 +0200
Translation update done using Pootle.
commit d0cd77517cd2ced62c789a77c4a9c6db2eda3d53
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:46:11 2011 +0200
Translation update done using Pootle.
commit 29c398e923af5a00f885df6aff191201f39d93c5
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:45:25 2011 +0200
Translation update done using Pootle.
commit 62cb73505c677f9dae2d6629b2503131c54a3ecd
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:43:54 2011 +0200
Translation update done using Pootle.
commit ffeaf03547ac26bb162309e351ae6c5c88c94728
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Tue Aug 2 11:41:00 2011 +0200
Translation update done using Pootle.
commit 2e2ba2732f6b9f20460cdb2d2eca92262347b337
Author: Burak Yavuz <hitowerdigit(a)hotmail.com>
Date: Tue Aug 2 10:45:33 2011 +0200
Translation update done using Pootle.
commit 4bea4ab7fe63c740cc6a066175600cc93b408ad4
Author: Burak Yavuz <hitowerdigit(a)hotmail.com>
Date: Tue Aug 2 10:44:41 2011 +0200
Translation update done using Pootle.
commit 1182ef584d4a8bcb6b732e7bf332d66b8dd55382
Author: Burak Yavuz <hitowerdigit(a)hotmail.com>
Date: Tue Aug 2 10:44:03 2011 +0200
Translation update done using Pootle.
commit 96c3dc32a49b9670cdd098713a6f992fcb584457
Author: Burak Yavuz <hitowerdigit(a)hotmail.com>
Date: Tue Aug 2 10:41:17 2011 +0200
Translation update done using Pootle.
commit ec8a4e140f6192a8492dd861e48fba583f1637db
Author: Burak Yavuz <hitowerdigit(a)hotmail.com>
Date: Tue Aug 2 10:40:38 2011 +0200
Translation update done using Pootle.
commit cea2a9c5315ad520015670bc0a55870e7e043a99
Author: Burak Yavuz <hitowerdigit(a)hotmail.com>
Date: Tue Aug 2 10:38:27 2011 +0200
Translation update done using Pootle.
commit 28e50fd5ba9742af157c3e1e5db56a56aa2080e9
Author: Burak Yavuz <hitowerdigit(a)hotmail.com>
Date: Tue Aug 2 10:37:53 2011 +0200
Translation update done using Pootle.
commit f7323710ea2d150c14bc6ef3f30918063a5ec5c9
Merge: a458f0d64478651ccdc4e1640ee28d6ab33ada91 3a373b4a14f9fbb3f8f7dbec3b0166efe17cac1f
Author: Pootle server <pootle(a)cihar.com>
Date: Tue Aug 2 02:40:19 2011 +0200
Merge remote-tracking branch 'origin/master'
commit a458f0d64478651ccdc4e1640ee28d6ab33ada91
Author: Sven Strickroth <email(a)cs-ware.de>
Date: Mon Aug 1 20:57:39 2011 +0200
Translation update done using Pootle.
commit 6ef25991188b42bf2f509b95c93a131b469c9f51
Author: Sven Strickroth <email(a)cs-ware.de>
Date: Mon Aug 1 20:57:13 2011 +0200
Translation update done using Pootle.
commit 041448f4833b646dc203d5c2d4bb60fff48269ed
Author: Sven Strickroth <email(a)cs-ware.de>
Date: Mon Aug 1 20:55:15 2011 +0200
Translation update done using Pootle.
commit d22260fe9950e5a5e09104caa344178bfa2a32af
Author: Matías Bellone <matiasbellone(a)gmail.com>
Date: Mon Aug 1 18:53:18 2011 +0200
Translation update done using Pootle.
commit e94e6df9468e4576e821e9b4b6443ff6136cc9ae
Author: Matías Bellone <matiasbellone(a)gmail.com>
Date: Mon Aug 1 18:52:21 2011 +0200
Translation update done using Pootle.
commit 04c13485078c5b217bb1e51e880975a057908ad0
Author: Matías Bellone <matiasbellone(a)gmail.com>
Date: Mon Aug 1 18:46:56 2011 +0200
Translation update done using Pootle.
commit 6c465718b8f6c54c7d1b8612c8b959e51b731096
Author: Matías Bellone <matiasbellone(a)gmail.com>
Date: Mon Aug 1 18:46:13 2011 +0200
Translation update done using Pootle.
commit 53e1de72e4c4e19c6a5f4a6c070f9962e3b2c6c0
Author: Matías Bellone <matiasbellone(a)gmail.com>
Date: Mon Aug 1 18:46:00 2011 +0200
Translation update done using Pootle.
commit c817f38d0694bfc06a418f0968251f3908c4a635
Author: Matías Bellone <matiasbellone(a)gmail.com>
Date: Mon Aug 1 18:45:40 2011 +0200
Translation update done using Pootle.
commit 62068de78f6b57f414a06ceb84a75695eb4a6eb9
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Mon Aug 1 16:54:56 2011 +0200
Translation update done using Pootle.
commit 5f67e63aed986658ee43ac9eacee4175c94a2fe6
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Mon Aug 1 16:00:05 2011 +0200
Translation update done using Pootle.
commit 7f8977747ea1e9c4b72af0e31e834698534306cf
Author: Marc Delisle <marc(a)infomarc.info>
Date: Mon Aug 1 12:56:37 2011 +0200
Translation update done using Pootle.
commit 809aa8944153ffc70b0afca88f4c4e86b9ce6952
Author: Marc Delisle <marc(a)infomarc.info>
Date: Mon Aug 1 12:53:19 2011 +0200
Translation update done using Pootle.
commit 9e91fb4aeef46173d84af9f5cd6998d5bdf67382
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Mon Aug 1 12:45:18 2011 +0200
Translation update done using Pootle.
commit 6a0af21e73e38926c3ef0c8a7c2a70d9cd9a15de
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Mon Aug 1 12:42:40 2011 +0200
Translation update done using Pootle.
commit ffcd0d8139c54e2596b8a348a70b29993813c314
Author: Marc Delisle <marc(a)infomarc.info>
Date: Mon Aug 1 12:42:35 2011 +0200
Translation update done using Pootle.
commit 6049062c7dcbb191c6cf61940eead018b57fc7e7
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Mon Aug 1 12:41:22 2011 +0200
Translation update done using Pootle.
commit a15f84b036beb82bce327871307d6be06d27c646
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Mon Aug 1 12:40:57 2011 +0200
Translation update done using Pootle.
commit 566b75f0478a12ca9d154ec6275643802ade3217
Author: Marc Delisle <marc(a)infomarc.info>
Date: Mon Aug 1 12:38:15 2011 +0200
Translation update done using Pootle.
commit 9b65d400d3ba3cf2341e67e5cafc2708c9e19eaa
Author: Yuichiro <yuichiro(a)pop07.odn.ne.jp>
Date: Mon Aug 1 12:38:06 2011 +0200
Translation update done using Pootle.
-----------------------------------------------------------------------
Summary of changes:
po/de.po | 40 +++++++++++++++++-----------------------
po/es.po | 59 +++++++++++++++++++++++++++--------------------------------
po/fr.po | 27 +++++++++++++++++++++++++--
po/ja.po | 58 +++++++++++++++++++++++++++++-----------------------------
po/tr.po | 60 ++++++++++++++++++++++++------------------------------------
5 files changed, 122 insertions(+), 122 deletions(-)
diff --git a/po/de.po b/po/de.po
index b9903b2..2da471e 100644
--- a/po/de.po
+++ b/po/de.po
@@ -4,8 +4,8 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-07-30 14:14-0400\n"
-"PO-Revision-Date: 2011-07-31 21:12+0200\n"
-"Last-Translator: <mrbendig(a)mrbendig.com>\n"
+"PO-Revision-Date: 2011-08-01 20:57+0200\n"
+"Last-Translator: Sven Strickroth <email(a)cs-ware.de>\n"
"Language-Team: german <de(a)li.org>\n"
"Language: de\n"
"MIME-Version: 1.0\n"
@@ -10006,7 +10006,6 @@ msgid "Monitor Instructions"
msgstr "Einführung zur Überwachung"
#: server_status.php:1364
-#, fuzzy
#| msgid ""
#| "The phpMyAdmin Monitor can assist you in optimizing the server "
#| "configuration and track down time intensive\n"
@@ -10023,14 +10022,13 @@ msgid ""
"increases server load by up to 15%"
msgstr ""
"Die phpMyAdmin-Überwachung kann Sie bei der Server-Konfiguration, und auch "
-"beim Aufspühren von zeitintensiven Abfragen unterstützen. Für das Letztere "
+"beim Aufspühren von zeitintensiven Abfragen unterstützen. Für Letzteres "
"müssen Sie log_output auf 'TABLE' stellen und entweder slow_query_log oder "
"general_log aktivieren. Beachten Sie aber, dass das Aktivieren der "
"general_log viele Daten produzieren und die Serverauslastung um bis zu 15% "
"erhöhen kann."
#: server_status.php:1371
-#, fuzzy
#| msgid ""
#| "<b>Using the monitor:</b><br/>\n"
#| " Ok, you are good to go! Once you click 'Start monitor' your "
@@ -10053,21 +10051,19 @@ msgid ""
"will load statistics from the logs helping you find what caused the activity "
"spike.</p>"
msgstr ""
-"<b>Verwendung der Überwachung:</b><br />\n"
-"OK, Sie sind bereit zum Starten! Sobald Sie 'Überwachung starten' angeklickt "
-"haben, wird Ihr Browser in regelmäßigen Intervallen alle angezeigten "
-"Diagramme aktualisieren. Unter 'Einstellungen' können Sie Diagramme "
-"hinzufügen und das Aktualisierungsintervall ändern oder beliebige Diagramme "
-"entfernen, wenn Sie das Zahnrad-Icon des entsprechenden Schaubilds "
-"verwenden.\n"
-"<p>Wenn Sie eine plötzliche Spitze in der Aktivität feststellen, wählen Sie "
-"den entsprechenden Zeitraum in einem beliebigen Diagramm, indem Sie die\n"
-"linke Maustaste gedrückt halten und über das Schaubild ziehen. Dies wird "
-"Statistiken aus den Protokollen laden um Sie bei der Auffindung der \n"
+"<b>Verwendung der Überwachung:</b><br />OK, Sie sind bereit zum Starten! "
+"Sobald Sie 'Überwachung starten' angeklickt haben, wird Ihr Browser in "
+"regelmäßigen Intervallen alle angezeigten Diagramme aktualisieren. Unter "
+"'Einstellungen' können Sie Diagramme hinzufügen und das "
+"Aktualisierungsintervall ändern oder beliebige Diagramme entfernen, wenn Sie "
+"das Zahnrad-Icon des entsprechenden Schaubilds verwenden.<p>Wenn Sie eine "
+"plötzliche Spitze in der Aktivität feststellen, wählen Sie den "
+"entsprechenden Zeitraum in einem beliebigen Diagramm, indem Sie die linke "
+"Maustaste gedrückt halten und über das Schaubild ziehen. Dies wird "
+"Statistiken aus den Protokollen laden um Sie bei der Auffindung der "
"Aktivitätsspitze zu unterstützen.</p>"
#: server_status.php:1375
-#, fuzzy
#| msgid ""
#| "<b>Please note:</b>\n"
#| " Enabling the general_log may increase the server load by 5-15%. "
@@ -10083,12 +10079,10 @@ msgid ""
"disable the general_log and empty its table once monitoring is not required "
"any more."
msgstr ""
-"<b>Bitte beachten Sie:</b>\n"
-"Das Aktivieren des general_log kann die Serverlast um 5-15% steigern. Seien "
-"Sie sich bewusst, dass das Erzeugen von Statistiken aus den Logs ein \n"
-"sehr aufwändiger Prozess ist. Deshalb ist es ratsam, nur einen kleinen "
-"Zeitraum auszuwählen.\n"
-" "
+"<b>Bitte beachten Sie:</b> Das Aktivieren des general_log kann die "
+"Serverlast um 5-15% steigern. Seien Sie sich bewusst, dass das Erzeugen von "
+"Statistiken aus den Logs ein sehr aufwändiger Prozess ist. Deshalb ist es "
+"ratsam, nur einen kleinen Zeitraum auszuwählen."
#: server_status.php:1385
msgid "CPU Usage"
diff --git a/po/es.po b/po/es.po
index 2caea98..a3464a2 100644
--- a/po/es.po
+++ b/po/es.po
@@ -4,13 +4,13 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-07-30 14:14-0400\n"
-"PO-Revision-Date: 2011-07-27 16:54+0200\n"
+"PO-Revision-Date: 2011-08-01 18:53+0200\n"
"Last-Translator: Matías Bellone <matiasbellone(a)gmail.com>\n"
"Language-Team: spanish <es(a)li.org>\n"
+"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: es\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Pootle 2.0.5\n"
@@ -1326,7 +1326,6 @@ msgid "Analysing & loading logs. This may take a while."
msgstr "Analizando y cargando registros. Esto puede demorar."
#: js/messages.php:143
-#, fuzzy
#| msgid ""
#| "This columns shows the amount of identical queries that are grouped "
#| "together. However only the SQL Text is being compared, thus the queries "
@@ -1337,8 +1336,9 @@ msgid ""
"the other attributes of queries, such as start time, may differ."
msgstr ""
"Esta columna muestra la cantidad de consultas idénticas que fueron "
-"agrupadas. Sin embargo, sólo el texto SQL es comparado, por lo que los demás "
-"atributos de las consultas como el tiempo de inicio podría diferir."
+"agrupadas. Sin embargo, sólo la consulta SQL en sí es es utilizada para "
+"agrupar, por lo que los demás atributos de las consultas como el tiempo de "
+"inicio podría diferir."
#: js/messages.php:144
msgid ""
@@ -1360,11 +1360,11 @@ msgid "Jump to Log table"
msgstr "Saltar a la tabla de registros"
#: js/messages.php:148
-#, fuzzy
#| msgid "Log analysed, but not data found in this time span."
msgid "Log analysed, but no data found in this time span."
msgstr ""
-"Registros analizados, pero no se encontraron datos en este período de tiempo."
+"Registros analizados, pero no se encontraron datos en este período de "
+"tiempo."
#. l10n: A collection of available filters
#: js/messages.php:151
@@ -1381,10 +1381,9 @@ msgid "Filter queries by word/regexp:"
msgstr "Filtrar consultas por palabra/expresión regular:"
#: js/messages.php:155
-#, fuzzy
#| msgid "Group queries, ignoring variable data in WHERE statements"
msgid "Group queries, ignoring variable data in WHERE clauses"
-msgstr "Agrupar consultas, ignorando datos variables en sentencias WHERE"
+msgstr "Agrupar consultas ignorando datos variables en sentencias WHERE"
#: js/messages.php:156
msgid "Sum of grouped rows:"
@@ -10061,7 +10060,6 @@ msgid "Monitor Instructions"
msgstr "Instrucciones de monitorización"
#: server_status.php:1364
-#, fuzzy
#| msgid ""
#| "The phpMyAdmin Monitor can assist you in optimizing the server "
#| "configuration and track down time intensive\n"
@@ -10077,14 +10075,14 @@ msgid ""
"enabled. Note however, that the general_log produces a lot of data and "
"increases server load by up to 15%"
msgstr ""
-"El monitorizador de phpMyAdmin puede asistir en la optimización de la "
+"El Monitorizador de phpMyAdmin puede asistir en la optimización de la "
"configuración del servidor y rastrear consultas que toman mucho tiempo. Para "
"esto último necesitará que «log_output» esté definido como 'TABLE' y tener "
-"activado «slow_query_log» o «general_log». Note, sin embargo, que «general_log» "
-"produce mucha información y aumenta la carga en el servidor hasta en un 15%"
+"activado «slow_query_log» o «general_log». Note, sin embargo, que "
+"«general_log» produce mucha información y aumenta la carga en el servidor "
+"hasta en un 15%"
#: server_status.php:1371
-#, fuzzy
#| msgid ""
#| "<b>Using the monitor:</b><br/>\n"
#| " Ok, you are good to go! Once you click 'Start monitor' your "
@@ -10107,19 +10105,17 @@ msgid ""
"will load statistics from the logs helping you find what caused the activity "
"spike.</p>"
msgstr ""
-"<b>Utilizando el monitorizador:</b><br />\n"
-"¡Ya estás listo! Una vez que pulses en 'Iniciar monitorización' el navegador "
-"actualizará a intervalos regulares todos los gráficos mostrados. Podría "
-"agregar gráficos y cambiar la velocidad de actualización en 'Configuración', "
-"o eliminar cualquier gráfico utilizando el icono de rueda dentada en cada "
-"gráfico.\n"
-"<p>Cuando vea un pico repentino de actividad, seleccione el intervalo de "
-"tiempo relevante en el gráfico manteniendo pulsado el botón izquierdo y "
-"arrastrando sobre el gráfico. Esto cargará las estadísticas de los "
-"registros, lo que lo ayudará a encontrar la causa del pico de actividad.</p>"
+"<b>Utilizando el monitorizador:</b><br /> ¡Ya está listo! Una vez que pulse "
+"en 'Iniciar monitorización' el navegador actualizará a intervalos regulares "
+"todos los gráficos mostrados. Puede agregar gráficos y cambiar la velocidad "
+"de actualización en la sección 'Configuración' o eliminar cualquier gráfico "
+"utilizando el icono de rueda dentada en cada gráfico. <p>Cuando vea un pico "
+"repentino de actividad, seleccione el intervalo de tiempo relevante en el "
+"gráfico manteniendo pulsado el botón izquierdo y arrastrando sobre el "
+"gráfico. Esto cargará las estadísticas de los registros, lo que lo ayudará a "
+"encontrar la causa del pico de actividad.</p>"
#: server_status.php:1375
-#, fuzzy
#| msgid ""
#| "<b>Please note:</b>\n"
#| " Enabling the general_log may increase the server load by 5-15%. "
@@ -10135,13 +10131,12 @@ msgid ""
"disable the general_log and empty its table once monitoring is not required "
"any more."
msgstr ""
-"<b>Notar que:</b>\n"
-"Activar «general_log» puede aumentar la carga en el servidor hasta un 5-15%. "
-"También esté al tanto que generar estadísticas de los registros es una tarea "
-"muy intensiva por lo que se recomienda seleccionar un período de tiempo lo "
-"más pequeño posible y desactivar «general_log» y vaciar sus tablas una vez "
-"que ya no se necesite monitorizar.\n"
-" "
+"<b>Notar que:</b> Activar «general_log» puede aumentar la carga en el "
+"servidor hasta un 5-15%. También esté al tanto que generar estadísticas de "
+"los registros es una tarea muy intensiva por lo que se recomienda "
+"seleccionar un período de tiempo lo más pequeño posible y desactivar "
+"«general_log» y vaciar sus tablas una vez que ya no se necesite monitorizar. "
+" "
#: server_status.php:1385
msgid "CPU Usage"
diff --git a/po/fr.po b/po/fr.po
index 839fdec..b7488f0 100644
--- a/po/fr.po
+++ b/po/fr.po
@@ -4,13 +4,13 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-07-30 14:14-0400\n"
-"PO-Revision-Date: 2011-07-29 16:58+0200\n"
+"PO-Revision-Date: 2011-08-01 12:56+0200\n"
"Last-Translator: Marc Delisle <marc(a)infomarc.info>\n"
"Language-Team: french <fr(a)li.org>\n"
+"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
"X-Generator: Pootle 2.0.5\n"
@@ -1342,6 +1342,10 @@ msgid ""
"However only the SQL query itself has been used as a grouping criteria, so "
"the other attributes of queries, such as start time, may differ."
msgstr ""
+"Cette colonne montre le nombre de requêtes identiques qui sont regroupées. "
+"Cependant, seulement le texte SQL de la requête a été utilisé comme critère "
+"de regroupement, donc les autres propriétés des requêtes, comme l'heure de "
+"début, peuvent différer."
#: js/messages.php:144
msgid ""
@@ -9992,6 +9996,11 @@ msgid ""
"enabled. Note however, that the general_log produces a lot of data and "
"increases server load by up to 15%"
msgstr ""
+"Le moniteur phpMyAdmin peut vous aider à optimiser la configuration serveur "
+"et à traquer les requêtes qui prennent beaucoup de temps. Pour ce faire vous "
+"devrez régler le paramètre log_output à 'TABLE' et activer le journal "
+"slow_query_log ou general_log. Cependant, general_log produit beaucoup de "
+"données et augmente jusqu'à 15% la charge du serveur"
#: server_status.php:1371
msgid ""
@@ -10004,6 +10013,15 @@ msgid ""
"will load statistics from the logs helping you find what caused the activity "
"spike.</p>"
msgstr ""
+"<b>Utilisation de la surveillance :</b><br />Vous êtes maintenant prêt! "
+"Après avoir cliqué sur «Démarrer la surveillance», votre navigateur va "
+"rafraîchir les graphiques à intervalle régulier. Vous pouvez ajouter des "
+"graphiques et modifier le taux de rafraîchissement sous «Paramètres», ou "
+"supprimer tout graphique via l'cône de rouage.<p>Lorsque vous constatez un "
+"pic d'activité soudain, sélectionnez la portion de temps pertinent sur l'un "
+"des graphiques en tenant enfoncé le bouton gauche de la souris et en vous "
+"déplaçant sur le graphique. Ceci va charger les statistiques à partir des "
+"journaux et vous aidera à trouver la cause du pic dans l'activité.</p>"
#: server_status.php:1375
msgid ""
@@ -10013,6 +10031,11 @@ msgid ""
"disable the general_log and empty its table once monitoring is not required "
"any more."
msgstr ""
+"<b>À noter :</b>Activer le journal general_log peut causer une augmentation "
+"de charge de 5 à 15%. Également, la génération des statistiques à partir des "
+"journaux est une tâche intensive, donc il est suggéré de ne sélectionner "
+"qu'une petite portion de temps et de désactiver general_log puis de vider la "
+"table correspondante lorsque la surveillance n'est plus requise."
#: server_status.php:1385
msgid "CPU Usage"
diff --git a/po/ja.po b/po/ja.po
index 45da9a4..902574b 100644
--- a/po/ja.po
+++ b/po/ja.po
@@ -4,13 +4,13 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-07-30 14:14-0400\n"
-"PO-Revision-Date: 2011-07-27 12:14+0200\n"
+"PO-Revision-Date: 2011-08-02 12:41+0200\n"
"Last-Translator: Yuichiro <yuichiro(a)pop07.odn.ne.jp>\n"
"Language-Team: japanese <jp(a)li.org>\n"
+"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: ja\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Pootle 2.0.5\n"
@@ -1201,27 +1201,27 @@ msgstr "モニタ一時中断"
#: js/messages.php:114
msgid "general_log and slow_query_log are enabled."
-msgstr ""
+msgstr "general_log および slow_query_log は有効です。"
#: js/messages.php:115
msgid "general_log is enabled."
-msgstr ""
+msgstr "general_log は有効です。"
#: js/messages.php:116
msgid "slow_query_log is enabled."
-msgstr ""
+msgstr "slow_query_log は有効です。"
#: js/messages.php:117
msgid "slow_query_log and general_log are disabled."
-msgstr ""
+msgstr "slow_query_log および general_log は無効です。"
#: js/messages.php:118
msgid "log_output is not set to TABLE."
-msgstr ""
+msgstr "log_output はテーブルに設定されていません。"
#: js/messages.php:119
msgid "log_output is set to TABLE."
-msgstr ""
+msgstr "log_output はテーブルに設定されています。"
#: js/messages.php:120
#, php-format
@@ -1246,10 +1246,10 @@ msgstr ""
#. l10n: %s is FILE or TABLE
#: js/messages.php:124
-#, fuzzy, php-format
+#, php-format
#| msgid "Save output to a file"
msgid "Set log_output to %s"
-msgstr "出力をファイルに保存する"
+msgstr "%s に log_output を設定する"
#. l10n: Enable in this context means setting a status variable to ON
#: js/messages.php:126
@@ -1311,7 +1311,7 @@ msgstr ""
#: js/messages.php:142
msgid "Analysing & loading logs. This may take a while."
-msgstr ""
+msgstr "ログの解析および読み込み中。すこし時間がかかることがあります。"
#: js/messages.php:143
msgid ""
@@ -1329,17 +1329,16 @@ msgstr ""
#: js/messages.php:145
msgid "Log data loaded. Queries executed in this time span:"
-msgstr ""
+msgstr "ログデータを読み込みました。この期間に行われたクエリは以下の通りです。"
#: js/messages.php:147
-#, fuzzy
#| msgid "Jump to database"
msgid "Jump to Log table"
-msgstr "データベースに移動"
+msgstr "ログの表に移動する"
#: js/messages.php:148
msgid "Log analysed, but no data found in this time span."
-msgstr ""
+msgstr "ログの解析を行いましたが、この期間のデータは見つかりませんでした。"
#. l10n: A collection of available filters
#: js/messages.php:151
@@ -1357,7 +1356,7 @@ msgstr ""
#: js/messages.php:155
msgid "Group queries, ignoring variable data in WHERE clauses"
-msgstr ""
+msgstr "クエリをまとめる(WHERE 句内のデータ部(文字列や数値など)は同一として扱われます)"
#: js/messages.php:156
#, fuzzy
@@ -1366,10 +1365,9 @@ msgid "Sum of grouped rows:"
msgstr "挿入する行数"
#: js/messages.php:157
-#, fuzzy
#| msgid "Total"
msgid "Total:"
-msgstr "合計"
+msgstr "合計:"
#: js/messages.php:161 libraries/tbl_properties.inc.php:780
#: pmd_general.php:388 pmd_general.php:425 pmd_general.php:545
@@ -9818,7 +9816,6 @@ msgid "Monitor Instructions"
msgstr "はじめに"
#: server_status.php:1364
-#, fuzzy
#| msgid ""
#| "The phpMyAdmin Monitor can assist you in optimizing the server "
#| "configuration and track down time intensive\n"
@@ -9834,11 +9831,9 @@ msgid ""
"enabled. Note however, that the general_log produces a lot of data and "
"increases server load by up to 15%"
msgstr ""
-"phpMyAdmin モニタは、サーバ構成の最適化を支援し、時間のかかるクエリを追跡する"
-"ことができます。後者の場合には、テーブルに log_output を設定し、"
-"slow_query_log または general_log のいずれかを有効にする必要があります。な"
-"お、general_log を大量のデータを生成し、サーバの負荷を 15% 増加させますので、"
-"注意するようにしてください。"
+"phpMyAdmin モニタは、サーバ構成の最適化を支援し、時間のかかるクエリを追跡することができます。後者の場合には、テーブルに log_output "
+"を設定し、slow_query_log または general_log のいずれかを有効にする必要があります。なお、general_log "
+"を大量のデータを生成し、サーバの負荷を 15% 増加させますので、注意するようにしてください。"
#: server_status.php:1371
msgid ""
@@ -9851,6 +9846,10 @@ msgid ""
"will load statistics from the logs helping you find what caused the activity "
"spike.</p>"
msgstr ""
+"<b>モニタの使い方:</b><br/>「モニタ開始」をクリックすると、ブラウザは一定間隔で表示されている全てのグラフを更新します。「設定」のところより"
+"グラフを追加や再描画間隔の変更が行え、それぞれのグラフにある歯車のアイコンを通じて削除を行えます。<p>モニタリングしていてスパイク信号が見られることが"
+"あります。マウスの左ボタンを押したままグラフの上をドラッグするように移動させことで、グラフの任意の期間を選択できます。こうすることでログから統計の読み込"
+"みが行え、スパイク信号の原因を探ることができます。</p>"
#: server_status.php:1375
msgid ""
@@ -9860,6 +9859,9 @@ msgid ""
"disable the general_log and empty its table once monitoring is not required "
"any more."
msgstr ""
+"<b>注意事項:</b>general_log を有効にすると、5~15% サーバの負荷が増加することがあります。ログから生成される統計は、負荷が集中す"
+"る作業であることを認識しておいてください。ですから、テーブルのモニタで必要としないのであれば、しばらくの間 general_log "
+"を無効にして空にしておくのが望ましいです。"
#: server_status.php:1385
msgid "CPU Usage"
@@ -9916,10 +9918,9 @@ msgid "Series in Chart:"
msgstr "グラフの系列"
#: server_status.php:1445
-#, fuzzy
#| msgid "Loading"
msgid "Loading logs"
-msgstr "読み込み中"
+msgstr "ログの読み込み"
#: server_status.php:1448
#, fuzzy
@@ -9928,14 +9929,13 @@ msgid "Log statistics"
msgstr "統計を表示する"
#: server_status.php:1449
-#, fuzzy
#| msgid "Select page"
msgid "Selected time range:"
-msgstr "ページを選択してください"
+msgstr "選択期間:"
#: server_status.php:1454
msgid "Only retrieve SELECT,INSERT,UPDATE and DELETE Statements"
-msgstr ""
+msgstr "SELECT、INSERT、UPDATE、DELETE 文のみ取得する"
#: server_status.php:1459
msgid "Remove variable data in INSERT statements for better grouping"
diff --git a/po/tr.po b/po/tr.po
index e81dc1f..3e427dd 100644
--- a/po/tr.po
+++ b/po/tr.po
@@ -4,13 +4,13 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-07-30 14:14-0400\n"
-"PO-Revision-Date: 2011-07-29 21:55+0200\n"
+"PO-Revision-Date: 2011-08-02 10:45+0200\n"
"Last-Translator: Burak Yavuz <hitowerdigit(a)hotmail.com>\n"
"Language-Team: turkish <tr(a)li.org>\n"
+"Language: tr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: tr\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"X-Generator: Pootle 2.0.5\n"
@@ -1313,7 +1313,6 @@ msgid "Analysing & loading logs. This may take a while."
msgstr "Günlükler çözümleniyor ve yükleniyor. Bu biraz zaman alabilir."
#: js/messages.php:143
-#, fuzzy
#| msgid ""
#| "This columns shows the amount of identical queries that are grouped "
#| "together. However only the SQL Text is being compared, thus the queries "
@@ -1324,8 +1323,8 @@ msgid ""
"the other attributes of queries, such as start time, may differ."
msgstr ""
"Bu sütunlar birlikte gruplanmış özdeş sorguların miktarını gösterir. Ancak "
-"sadece SQL Metin karşılaştırılır, böylece başlama zamanı gibi sorgular diğer "
-"öznitelikler farklı olabilir."
+"sadece SQL Metnin kendisi gruplama kriteri olarak kullanılır, böylece "
+"başlama zamanı gibi, sorguların diğer öznitelikleri farklı olabilir."
#: js/messages.php:144
msgid ""
@@ -1346,10 +1345,9 @@ msgid "Jump to Log table"
msgstr "Günlük tablosuna atla"
#: js/messages.php:148
-#, fuzzy
#| msgid "Log analysed, but not data found in this time span."
msgid "Log analysed, but no data found in this time span."
-msgstr "Günlük çözümlendi, ama bu zaman aralığında bulunan veri yok."
+msgstr "Günlük çözümlendi, ama bu zaman aralığı içinde bulunan veri yok."
#. l10n: A collection of available filters
#: js/messages.php:151
@@ -1363,13 +1361,12 @@ msgstr "Süzgeç"
#: js/messages.php:154
msgid "Filter queries by word/regexp:"
-msgstr "Kelime/düzenli ifadeye göre sorguları süz"
+msgstr "Kelime/düzenli ifadeye göre sorguları süz:"
#: js/messages.php:155
-#, fuzzy
#| msgid "Group queries, ignoring variable data in WHERE statements"
msgid "Group queries, ignoring variable data in WHERE clauses"
-msgstr "Sorguları grupla, WHERE ifadelerindeki değişken veri yoksayılıyor"
+msgstr "Grup sorguları, WHERE cümleciklerindeki değişken veri yoksayılıyor"
#: js/messages.php:156
msgid "Sum of grouped rows:"
@@ -9897,7 +9894,6 @@ msgid "Monitor Instructions"
msgstr "İzleme Yönergeleri"
#: server_status.php:1364
-#, fuzzy
#| msgid ""
#| "The phpMyAdmin Monitor can assist you in optimizing the server "
#| "configuration and track down time intensive\n"
@@ -9914,14 +9910,12 @@ msgid ""
"increases server load by up to 15%"
msgstr ""
"phpMyAdmin İzleyici sunucu yapılandırmasını uyarlamada ve yoğun sorgularda "
-"iz sürme süresinde size yardımcı\n"
-"olabilir. Sonrası için log_output'u 'TABLE'a ayarlamanız gerekecektir ve ya "
-"slow_query_log ya da general_log etkinleştirilir.\n"
-"Ancak unutmayın, general_log çok fazla veri üretir ve sunucu yükünü %15'e "
-"kadar arttırır"
+"iz sürme süresinde size yardımcı olabilir. Sonrası için log_output'u "
+"'TABLE'a ayarlamanız gerekecektir ve ya slow_query_log ya da general_log "
+"etkinleştirilir. Ancak unutmayın, general_log çok fazla veri üretir ve "
+"sunucu yükünü %15'e kadar arttırır"
#: server_status.php:1371
-#, fuzzy
#| msgid ""
#| "<b>Using the monitor:</b><br/>\n"
#| " Ok, you are good to go! Once you click 'Start monitor' your "
@@ -9944,17 +9938,14 @@ msgid ""
"will load statistics from the logs helping you find what caused the activity "
"spike.</p>"
msgstr ""
-"<b>İzleyici kullanımı:</b><br/>\n"
-"Tamam, ilerlemeye hazırsınız! Bir kere 'İzlemeyi başlat'a tıkladığınızda "
-"tarayıcınız tüm görüntülenen\n"
-"çizelgeleri düzenli aralıklarla yenileyecek. 'Ayarlar' altında çizelgeleri "
-"ekleyebilir ve yenileme oranını değiştirebilirsiniz\n"
-"veya her çizelgenin kendi dişli çark simgesini kullanarak herhangi bir "
-"çizelgeyi kaldırabilirsiniz.\n"
-"<p>Ani hareketlilik gördüğünüzde, herhangi bir çizlgede sol fare tuşunu "
-"basılı tutarak ve çizelge üzerinde kaydırarak\n"
-"ilgili zaman aralığını seçin. Bu, ani hareketlenmenin sebebini bulmanızda "
-"yardımcı olan istatistikleri günlükten\n"
+"<b>İzleyici kullanımı:</b><br/> Tamam, ilerlemeye hazırsınız! Bir kere "
+"'İzlemeyi başlat'a tıkladığınızda tarayıcınız tüm görüntülenen çizelgeleri "
+"düzenli aralıklarla yenileyecek. 'Ayarlar' altında çizelgeleri ekleyebilir "
+"ve yenileme oranını değiştirebilirsiniz veya her çizelgenin kendi dişli çark "
+"simgesini kullanarak herhangi bir çizelgeyi kaldırabilirsiniz. <p>Ani "
+"hareketlilik gördüğünüzde, herhangi bir çizlgede sol fare tuşunu basılı "
+"tutarak ve çizelge üzerinde kaydırarak ilgili zaman aralığını seçin. Bu, ani "
+"hareketlenmenin sebebini bulmanızda yardımcı olan istatistikleri günlükten "
"yükleyecek.</p>"
#: server_status.php:1375
@@ -9965,14 +9956,11 @@ msgid ""
"disable the general_log and empty its table once monitoring is not required "
"any more."
msgstr ""
-"<b>Lütfen unutmayın:</b>\n"
-" general_log'u etkinleştirmek sunucu yükünü %5-15 arttırabilir. Aynı "
-"zamanda günlükten oluşturulan istatistiklerin yoğun görev yükü olduğundan "
-"haberiniz olsun\n"
-" bu yüzden sadece küçük zaman aralıkları seçmek ve general_log'u "
-"etkisizleştirmek tavsiye edilir ve tablolarını bir defa boşaltmak daha fazla "
-"izlemeyi gerektirmez.\n"
-" "
+"<b>Lütfen unutmayın:</b> general_log'u etkinleştirmek sunucu yükünü %5-15 "
+"arttırabilir. Aynı zamanda günlükten oluşturulan istatistiklerin yoğun görev "
+"yükü olduğundan haberiniz olsun bu yüzden sadece küçük zaman aralıkları "
+"seçmek ve general_log'u etkisizleştirmek tavsiye edilir ve tablolarını bir "
+"defa boşaltmak daha fazla izlemeyi gerektirmez."
#: server_status.php:1385
msgid "CPU Usage"
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-12796-g3a373b4
by Piotr Przybylski 02 Aug '11
by Piotr Przybylski 02 Aug '11
02 Aug '11
The branch, master has been updated
via 3a373b4a14f9fbb3f8f7dbec3b0166efe17cac1f (commit)
from 19172fb476a0082cb5e1e560c3613a99a4f085aa (commit)
- Log -----------------------------------------------------------------
commit 3a373b4a14f9fbb3f8f7dbec3b0166efe17cac1f
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Tue Aug 2 01:27:52 2011 +0200
Respect MaxCharactersInDisplayedSQL in process list on Server Status page
-----------------------------------------------------------------------
Summary of changes:
server_status.php | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/server_status.php b/server_status.php
index 7e4babd..e5bb06f 100644
--- a/server_status.php
+++ b/server_status.php
@@ -1055,7 +1055,19 @@ function printServerTraffic() {
<td><?php echo $process['Command']; ?></td>
<td class="value"><?php echo $process['Time']; ?></td>
<td><?php echo (empty($process['State']) ? '---' : $process['State']); ?></td>
- <td><?php echo (empty($process['Info']) ? '---' : PMA_SQP_formatHtml(PMA_SQP_parse($process['Info']))); ?></td>
+ <td>
+ <?php
+ if (empty($process['Info'])) {
+ echo '---';
+ } else {
+ if (empty($_REQUEST['full']) && strlen($process['Info']) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) {
+ echo htmlspecialchars(substr($process['Info'], 0, $GLOBALS['cfg']['MaxCharactersInDisplayedSQL'])) . '[...]';
+ } else {
+ echo PMA_SQP_formatHtml(PMA_SQP_parse($process['Info']));
+ }
+ }
+ ?>
+ </td>
</tr>
<?php
$odd_row = ! $odd_row;
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-12795-g19172fb
by Michal Čihař 01 Aug '11
by Michal Čihař 01 Aug '11
01 Aug '11
The branch, master has been updated
via 19172fb476a0082cb5e1e560c3613a99a4f085aa (commit)
via c1053d0f1f7a49608904b8cfd001cc20c7d8c263 (commit)
via c3ca1e2d27eb54efaf3aed1a87052ddc3d58b02e (commit)
via 623e3c636c2f1f76306f7aec5724b94b33c2d3ff (commit)
via a93037f6749ac84795efb1bcf578da40232e4f83 (commit)
via 70a876d31db6a50e424c6934086dce49ca57c2bb (commit)
via 0a74f2e791e1a509d17fa2756cb949b797f5fa19 (commit)
via ab4807defeb325dcf5d50e0f3faa4f91088312a0 (commit)
via 790e008d4ff705920d2df977ce25e6d881f2e5b9 (commit)
via da6711ccc14be5a70682382c1d54545ca8755fb2 (commit)
via 1ab3c16341a197a597b269f23169350557dca5c7 (commit)
via 83c0211ccf66d235193281b7eb4a2230f3e725a0 (commit)
via 444bfb0e234aed72aa2a3ff13af147c46b270c9d (commit)
via 0e626adafba604e72b5c3b1d7817c4aa7933f76c (commit)
from 15a384a2d510416857994908e6c6b45fc2b1e7e2 (commit)
- Log -----------------------------------------------------------------
commit 19172fb476a0082cb5e1e560c3613a99a4f085aa
Merge: c1053d0f1f7a49608904b8cfd001cc20c7d8c263 15a384a2d510416857994908e6c6b45fc2b1e7e2
Author: Pootle server <pootle(a)cihar.com>
Date: Sun Jul 31 22:40:15 2011 +0200
Merge remote-tracking branch 'origin/master'
commit c1053d0f1f7a49608904b8cfd001cc20c7d8c263
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 21:19:06 2011 +0200
Translation update done using Pootle.
commit c3ca1e2d27eb54efaf3aed1a87052ddc3d58b02e
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 21:18:15 2011 +0200
Translation update done using Pootle.
commit 623e3c636c2f1f76306f7aec5724b94b33c2d3ff
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 21:17:50 2011 +0200
Translation update done using Pootle.
commit a93037f6749ac84795efb1bcf578da40232e4f83
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 21:17:35 2011 +0200
Translation update done using Pootle.
commit 70a876d31db6a50e424c6934086dce49ca57c2bb
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 21:17:16 2011 +0200
Translation update done using Pootle.
commit 0a74f2e791e1a509d17fa2756cb949b797f5fa19
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 21:16:39 2011 +0200
Translation update done using Pootle.
commit ab4807defeb325dcf5d50e0f3faa4f91088312a0
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 21:16:14 2011 +0200
Translation update done using Pootle.
commit 790e008d4ff705920d2df977ce25e6d881f2e5b9
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 21:15:44 2011 +0200
Translation update done using Pootle.
commit da6711ccc14be5a70682382c1d54545ca8755fb2
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 21:15:27 2011 +0200
Translation update done using Pootle.
commit 1ab3c16341a197a597b269f23169350557dca5c7
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 21:14:15 2011 +0200
Translation update done using Pootle.
commit 83c0211ccf66d235193281b7eb4a2230f3e725a0
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 21:13:18 2011 +0200
Translation update done using Pootle.
commit 444bfb0e234aed72aa2a3ff13af147c46b270c9d
Author: mrbendig <mrbendig(a)mrbendig.com>
Date: Sun Jul 31 21:12:19 2011 +0200
Translation update done using Pootle.
commit 0e626adafba604e72b5c3b1d7817c4aa7933f76c
Author: mrbendig <mrbendig(a)mrbendig.com>
Date: Sun Jul 31 21:11:59 2011 +0200
Translation update done using Pootle.
-----------------------------------------------------------------------
Summary of changes:
po/de.po | 12 +++++-------
po/sv.po | 35 ++++++++++++-----------------------
2 files changed, 17 insertions(+), 30 deletions(-)
diff --git a/po/de.po b/po/de.po
index ec26b35..b9903b2 100644
--- a/po/de.po
+++ b/po/de.po
@@ -4,13 +4,13 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-07-30 14:14-0400\n"
-"PO-Revision-Date: 2011-07-29 13:44+0200\n"
+"PO-Revision-Date: 2011-07-31 21:12+0200\n"
"Last-Translator: <mrbendig(a)mrbendig.com>\n"
"Language-Team: german <de(a)li.org>\n"
+"Language: de\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: de\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Pootle 2.0.5\n"
@@ -1326,7 +1326,6 @@ msgid "Analysing & loading logs. This may take a while."
msgstr "Analysiere und Lade Protokolle. Dies kann eine Weile dauern."
#: js/messages.php:143
-#, fuzzy
#| msgid ""
#| "This columns shows the amount of identical queries that are grouped "
#| "together. However only the SQL Text is being compared, thus the queries "
@@ -1337,7 +1336,7 @@ msgid ""
"the other attributes of queries, such as start time, may differ."
msgstr ""
"Diese Spalte zeigt die Anzahl der identischen Abfragen an, die gruppiert "
-"wurden. Dennoch wird nur der SQL-Text verglichen, daher kann die Angabe von "
+"wurden. Jedoch wird nur der SQL-Text verglichen, daher kann die Angabe von "
"anderen Werten der Abfrage, wie die Startzeit, unterschiedlich sein."
#: js/messages.php:144
@@ -1360,12 +1359,11 @@ msgid "Jump to Log table"
msgstr "Springe zur Protokoll-Tabelle"
#: js/messages.php:148
-#, fuzzy
#| msgid "Log analysed, but not data found in this time span."
msgid "Log analysed, but no data found in this time span."
msgstr ""
-"Protokoll wurde analysiert, es wurden jedoch keine Daten im angegebenen "
-"Zeitraum gefunden."
+"Das Protokoll wurde analysiert, es wurden jedoch keine Daten für den "
+"angegebenen Zeitraum gefunden."
#. l10n: A collection of available filters
#: js/messages.php:151
diff --git a/po/sv.po b/po/sv.po
index b8904da..e014c8a 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -4,13 +4,13 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-07-30 14:14-0400\n"
-"PO-Revision-Date: 2011-07-31 20:58+0200\n"
+"PO-Revision-Date: 2011-07-31 21:19+0200\n"
"Last-Translator: <stefan(a)inkopsforum.se>\n"
"Language-Team: swedish <sv(a)li.org>\n"
+"Language: sv\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Language: sv\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Generator: Pootle 2.0.5\n"
@@ -9952,42 +9952,37 @@ msgstr ""
"behövs längre. \n"
#: server_status.php:1385
-#, fuzzy
#| msgid "Usage"
msgid "CPU Usage"
-msgstr "Användning"
+msgstr "CPU Användning"
#: server_status.php:1388
msgid "Memory Usage"
msgstr "Minnesanvändning"
#: server_status.php:1391
-#, fuzzy
#| msgid "Usage"
msgid "Swap Usage"
-msgstr "Användning"
+msgstr "Swap användning"
#: server_status.php:1394
-#, fuzzy
#| msgid "All status variables"
msgid "Status variable(s)"
msgstr "Alla statusvariabler"
#: server_status.php:1396
-#, fuzzy
#| msgid "Select Tables"
msgid "Select series:"
-msgstr "Välj tabeller"
+msgstr "Välj serier:"
#: server_status.php:1398
msgid "Commonly monitored"
msgstr "Vanligen övervakade"
#: server_status.php:1413
-#, fuzzy
#| msgid "You must provide a routine name"
msgid "or type variable name:"
-msgstr "Du måste ange ett rutinnamn"
+msgstr "eller skriv ett variabelnamn:"
#: server_status.php:1417
msgid "Display as differential value"
@@ -10002,38 +9997,33 @@ msgid "Append unit to data values"
msgstr "Lägg till enhet till datavärdena"
#: server_status.php:1432
-#, fuzzy
#| msgid "Add a trigger"
msgid "Add this series"
-msgstr "Lägg till en ny Trigger"
+msgstr "Lägg till denna serie"
#: server_status.php:1434
msgid "Clear series"
msgstr "Rensa serier"
#: server_status.php:1437
-#, fuzzy
#| msgid "Series:"
msgid "Series in Chart:"
-msgstr "Serie:"
+msgstr "Serier i diagram:"
#: server_status.php:1445
-#, fuzzy
#| msgid "Loading"
msgid "Loading logs"
-msgstr "Laddar"
+msgstr "Läser in loggar"
#: server_status.php:1448
-#, fuzzy
#| msgid "Show statistics"
msgid "Log statistics"
-msgstr "Visa statistik"
+msgstr "Logga statistik"
#: server_status.php:1449
-#, fuzzy
#| msgid "Select page"
msgid "Selected time range:"
-msgstr "Välj sida"
+msgstr "Valt tidsintervall:"
#: server_status.php:1454
msgid "Only retrieve SELECT,INSERT,UPDATE and DELETE Statements"
@@ -10052,10 +10042,9 @@ msgstr ""
"grupperas efter frågetexten."
#: server_status.php:1465
-#, fuzzy
#| msgid "Query type"
msgid "Query analyzer"
-msgstr "Fråge-typ"
+msgstr "Fråge analyserare"
#: server_status.php:1501
#, php-format
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-12781-g15a384a
by Michal Čihař 31 Jul '11
by Michal Čihař 31 Jul '11
31 Jul '11
The branch, master has been updated
via 15a384a2d510416857994908e6c6b45fc2b1e7e2 (commit)
from 63938911e264dfea1162c29a08b8376a8ed84ef1 (commit)
- Log -----------------------------------------------------------------
commit 15a384a2d510416857994908e6c6b45fc2b1e7e2
Author: Michal Čihař <michal(a)cihar.com>
Date: Sun Jul 31 21:26:17 2011 +0200
Fixup
-----------------------------------------------------------------------
Summary of changes:
po/sv.po | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/po/sv.po b/po/sv.po
index 05354d1..b8904da 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -9942,7 +9942,7 @@ msgid ""
"5-15%. Also be aware that generating statistics from the logs is a load "
"intensive task, so it is advisable to select only a small time span and to "
"disable the general_log and empty its table once monitoring is not required "
-"any more."
+"any more.\n"
msgstr ""
"<b>Observera:</b>\n"
" Att aktivera general_log kan öka belastningen på servern med 5-15%. Var "
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-12780-g6393891
by Michal Čihař 31 Jul '11
by Michal Čihař 31 Jul '11
31 Jul '11
The branch, master has been updated
via 63938911e264dfea1162c29a08b8376a8ed84ef1 (commit)
via 20390c8f89a1ce61f212d4510a7d74429b0a073a (commit)
via 13428b2be08193dd915ba171b464184a2e23d0d4 (commit)
via a2298a93a8fb1c884feca5dc606bf7e0d9248117 (commit)
via 920a2f8621014b79f772bf6842de0cdc3b31a8dd (commit)
via 1e944da2325451758dcd5cc0fb7fb6c8e7a93513 (commit)
via 757ddb28caade376be7f61f67f47f32ddffa70fd (commit)
via cbbaf00564345ec674328348a06c8b1f242a7ccd (commit)
via d5759e927a2d64e2ab55f76ac30fb1c5daca60da (commit)
via 808d264305a3da29531755c952f1dbe89ddb1a52 (commit)
via db0e9680129fd120f0c18233a5218378557ad5cd (commit)
via 505eeb05a7ff34c93391223ca7708eb259c44a17 (commit)
via c2442b1a36b98d94738ddb0390134beba15dca64 (commit)
via e693c7c0dc33ce5f51f00234d7e2d64d013eb1f6 (commit)
via f083d1e8c0ea823c1c15793f51690942f6a1c07d (commit)
via a848543749c5c1ebaa60a3a9271728d135eb74f3 (commit)
via fcf1c83ffaa3b878f894ffc53d5ed6a013345db2 (commit)
via 35cee631fdd8ccf84ad573679da2c24a539f62ca (commit)
via 5c661251f290dcb9f5ff00dd12e4a38e6fb9597a (commit)
via 78e9c38d6bbf8e2c6f6da8dabc542f8197f0644b (commit)
via eb0fbe0af11eedc3c38cbc758ca5622aac7932dc (commit)
via 1eda55f4ad7a718c87e49c1d3590fadf30cbb7db (commit)
via b6294ffda9cd77f1f84d787ebfdaf48c23639090 (commit)
via 1afe1859e89654f58294fa7a0edc7187cd2cd3fe (commit)
via 710a43717a3cc11137cc6f5a81a954119b7a3f21 (commit)
via 15e32767196bc6833179575c9c50b49c90f5af98 (commit)
via 17c202e3110bb6e1f141699646e67b86828afb7c (commit)
via 52c24e50a5e5649b53ed41e2c929a3db0f1ec5b2 (commit)
via e2c26e6872f40150d80dfcc7f1c303081b4ba741 (commit)
via be985ceb5fd17fcf03a924bc63bcfe61be37a064 (commit)
via 7c9a79428b3e6eec39fdeddfb50008e707962414 (commit)
via 658ed1727ec8098748af4c54b1fc0b2a10db9623 (commit)
via da43592e63e5d9ff7c939b660745eaef323e1956 (commit)
via 45bb5977db7c85401fd642a2acf5b9fede2088e1 (commit)
via f91abfee8cf7209499eacd3245727fb8b8079da5 (commit)
via a5ce6af4f4bddb8c7b837bb68cbc28c6cde449b8 (commit)
via fd0c8cbf0dfed634c2ff3d353bd55a15a0ee872a (commit)
via bebcc5957be1047a9b229a29467a5f1bbc073567 (commit)
via d064c4e4f418b08d52d0e43ccbfa7c27e54b743d (commit)
via 519388c353228f6a410446460300febe069e417a (commit)
via 128d07589e9ce446808d72a29dfc50050df96406 (commit)
from 0a4ddb3f67d80ca40ec92165d236ebd71863a4df (commit)
- Log -----------------------------------------------------------------
commit 63938911e264dfea1162c29a08b8376a8ed84ef1
Merge: 0a4ddb3f67d80ca40ec92165d236ebd71863a4df 20390c8f89a1ce61f212d4510a7d74429b0a073a
Author: Michal Čihař <michal(a)cihar.com>
Date: Sun Jul 31 21:07:25 2011 +0200
Merge remote-tracking branch 'pootle/master'
Conflicts:
po/sv.po
commit 20390c8f89a1ce61f212d4510a7d74429b0a073a
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:58:29 2011 +0200
Translation update done using Pootle.
commit 13428b2be08193dd915ba171b464184a2e23d0d4
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:57:06 2011 +0200
Translation update done using Pootle.
commit a2298a93a8fb1c884feca5dc606bf7e0d9248117
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:54:04 2011 +0200
Translation update done using Pootle.
commit 920a2f8621014b79f772bf6842de0cdc3b31a8dd
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:53:05 2011 +0200
Translation update done using Pootle.
commit 1e944da2325451758dcd5cc0fb7fb6c8e7a93513
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:51:07 2011 +0200
Translation update done using Pootle.
commit 757ddb28caade376be7f61f67f47f32ddffa70fd
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:50:43 2011 +0200
Translation update done using Pootle.
commit cbbaf00564345ec674328348a06c8b1f242a7ccd
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:49:37 2011 +0200
Translation update done using Pootle.
commit d5759e927a2d64e2ab55f76ac30fb1c5daca60da
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:48:41 2011 +0200
Translation update done using Pootle.
commit 808d264305a3da29531755c952f1dbe89ddb1a52
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:47:49 2011 +0200
Translation update done using Pootle.
commit db0e9680129fd120f0c18233a5218378557ad5cd
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:46:37 2011 +0200
Translation update done using Pootle.
commit 505eeb05a7ff34c93391223ca7708eb259c44a17
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:46:21 2011 +0200
Translation update done using Pootle.
commit c2442b1a36b98d94738ddb0390134beba15dca64
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:42:14 2011 +0200
Translation update done using Pootle.
commit e693c7c0dc33ce5f51f00234d7e2d64d013eb1f6
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:32:21 2011 +0200
Translation update done using Pootle.
commit f083d1e8c0ea823c1c15793f51690942f6a1c07d
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:27:52 2011 +0200
Translation update done using Pootle.
commit a848543749c5c1ebaa60a3a9271728d135eb74f3
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:27:23 2011 +0200
Translation update done using Pootle.
commit fcf1c83ffaa3b878f894ffc53d5ed6a013345db2
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:26:45 2011 +0200
Translation update done using Pootle.
commit 35cee631fdd8ccf84ad573679da2c24a539f62ca
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:25:23 2011 +0200
Translation update done using Pootle.
commit 5c661251f290dcb9f5ff00dd12e4a38e6fb9597a
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:24:39 2011 +0200
Translation update done using Pootle.
commit 78e9c38d6bbf8e2c6f6da8dabc542f8197f0644b
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:24:21 2011 +0200
Translation update done using Pootle.
commit eb0fbe0af11eedc3c38cbc758ca5622aac7932dc
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:22:32 2011 +0200
Translation update done using Pootle.
commit 1eda55f4ad7a718c87e49c1d3590fadf30cbb7db
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:22:03 2011 +0200
Translation update done using Pootle.
commit b6294ffda9cd77f1f84d787ebfdaf48c23639090
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:21:44 2011 +0200
Translation update done using Pootle.
commit 1afe1859e89654f58294fa7a0edc7187cd2cd3fe
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:20:20 2011 +0200
Translation update done using Pootle.
commit 710a43717a3cc11137cc6f5a81a954119b7a3f21
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:19:00 2011 +0200
Translation update done using Pootle.
commit 15e32767196bc6833179575c9c50b49c90f5af98
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:18:13 2011 +0200
Translation update done using Pootle.
commit 17c202e3110bb6e1f141699646e67b86828afb7c
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:17:56 2011 +0200
Translation update done using Pootle.
commit 52c24e50a5e5649b53ed41e2c929a3db0f1ec5b2
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:17:15 2011 +0200
Translation update done using Pootle.
commit e2c26e6872f40150d80dfcc7f1c303081b4ba741
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:16:06 2011 +0200
Translation update done using Pootle.
commit be985ceb5fd17fcf03a924bc63bcfe61be37a064
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:15:35 2011 +0200
Translation update done using Pootle.
commit 7c9a79428b3e6eec39fdeddfb50008e707962414
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:13:06 2011 +0200
Translation update done using Pootle.
commit 658ed1727ec8098748af4c54b1fc0b2a10db9623
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:12:35 2011 +0200
Translation update done using Pootle.
commit da43592e63e5d9ff7c939b660745eaef323e1956
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:12:09 2011 +0200
Translation update done using Pootle.
commit 45bb5977db7c85401fd642a2acf5b9fede2088e1
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:11:18 2011 +0200
Translation update done using Pootle.
commit f91abfee8cf7209499eacd3245727fb8b8079da5
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:11:04 2011 +0200
Translation update done using Pootle.
commit a5ce6af4f4bddb8c7b837bb68cbc28c6cde449b8
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:10:12 2011 +0200
Translation update done using Pootle.
commit fd0c8cbf0dfed634c2ff3d353bd55a15a0ee872a
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:09:29 2011 +0200
Translation update done using Pootle.
commit bebcc5957be1047a9b229a29467a5f1bbc073567
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:09:16 2011 +0200
Translation update done using Pootle.
commit d064c4e4f418b08d52d0e43ccbfa7c27e54b743d
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:07:32 2011 +0200
Translation update done using Pootle.
commit 519388c353228f6a410446460300febe069e417a
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:07:03 2011 +0200
Translation update done using Pootle.
commit 128d07589e9ce446808d72a29dfc50050df96406
Author: stefan <stefan(a)inkopsforum.se>
Date: Sun Jul 31 20:05:26 2011 +0200
Translation update done using Pootle.
-----------------------------------------------------------------------
Summary of changes:
po/sv.po | 120 +++++++++++++++++++++++++++++++++-----------------------------
1 files changed, 64 insertions(+), 56 deletions(-)
diff --git a/po/sv.po b/po/sv.po
index 0653cf8..05354d1 100644
--- a/po/sv.po
+++ b/po/sv.po
@@ -4,7 +4,7 @@ msgstr ""
"Project-Id-Version: phpMyAdmin 3.5.0-dev\n"
"Report-Msgid-Bugs-To: phpmyadmin-devel(a)lists.sourceforge.net\n"
"POT-Creation-Date: 2011-07-30 14:14-0400\n"
-"PO-Revision-Date: 2011-07-31 18:29+0200\n"
+"PO-Revision-Date: 2011-07-31 20:58+0200\n"
"Last-Translator: <stefan(a)inkopsforum.se>\n"
"Language-Team: swedish <sv(a)li.org>\n"
"MIME-Version: 1.0\n"
@@ -7119,28 +7119,24 @@ msgid "You must provide a trigger name"
msgstr "Du måste ange ett triggernamn"
#: libraries/rte/rte_triggers.lib.php:404
-#, fuzzy
#| msgid "You must provide a routine name"
msgid "You must provide a valid timing for the trigger"
-msgstr "Du måste ange ett rutinnamn"
+msgstr "Du måste ange en giltig tidsgräns för triggern"
#: libraries/rte/rte_triggers.lib.php:409
-#, fuzzy
#| msgid "You must provide a name and a type for each routine parameter."
msgid "You must provide a valid event for the trigger"
-msgstr "Du måste ange ett namn och en typ för varje rutinparameter."
+msgstr "Du måste ange en giltig händelse för triggern"
#: libraries/rte/rte_triggers.lib.php:415
-#, fuzzy
#| msgid "You must provide a routine name"
msgid "You must provide a valid table name"
-msgstr "Du måste ange ett rutinnamn"
+msgstr "Du måste ange ett giltigt tabellnamn"
#: libraries/rte/rte_triggers.lib.php:421
-#, fuzzy
#| msgid "You must provide a routine definition."
msgid "You must provide a trigger definition."
-msgstr "Du måste ange en rutindefinition."
+msgstr "Du måste ange en trigger definition."
#: libraries/rte/rte_words.lib.php:18
msgid "Add routine"
@@ -7152,16 +7148,14 @@ msgid "Export of routine %s"
msgstr "Exportera rutin %s"
#: libraries/rte/rte_words.lib.php:21
-#, fuzzy
#| msgid "Routines"
msgid "routine"
-msgstr "Rutiner"
+msgstr "Rutin"
#: libraries/rte/rte_words.lib.php:22
-#, fuzzy
#| msgid "You do not have the necessary privileges to create a new routine"
msgid "You do not have the necessary privileges to create a routine"
-msgstr "Du har inte tillräcklig behörighet för att skapa en ny rutin"
+msgstr "Du har inte den nödvändiga behörigheent att skapa en rutin"
#: libraries/rte/rte_words.lib.php:23
#, php-format
@@ -7173,10 +7167,9 @@ msgid "There are no routines to display."
msgstr "Det finns inga rutiner att visa."
#: libraries/rte/rte_words.lib.php:30
-#, fuzzy
#| msgid "Add a trigger"
msgid "Add trigger"
-msgstr "Lägg till en ny Trigger"
+msgstr "Lägg till trigger"
#: libraries/rte/rte_words.lib.php:32
#, php-format
@@ -7184,32 +7177,29 @@ msgid "Export of trigger %s"
msgstr "Exportera trigger %s"
#: libraries/rte/rte_words.lib.php:33
-#, fuzzy
#| msgid "Triggers"
msgid "trigger"
-msgstr "Trigger"
+msgstr "trigger"
#: libraries/rte/rte_words.lib.php:34
-#, fuzzy
#| msgid "You do not have the necessary privileges to create a new routine"
msgid "You do not have the necessary privileges to create a trigger"
-msgstr "Du har inte tillräcklig behörighet för att skapa en ny rutin"
+msgstr "Du har inte den nödvändiga behörigheten att skapa en trigger"
#: libraries/rte/rte_words.lib.php:35
-#, fuzzy, php-format
+#, php-format
#| msgid "No routine with name %1$s found in database %2$s"
msgid "No trigger with name %1$s found in database %2$s"
-msgstr "Ingen rutin med namnet %1$s finns i databasen %2$s"
+msgstr "Ingen trigger med namnet %1$s finns i databasen %2$s"
#: libraries/rte/rte_words.lib.php:36
msgid "There are no triggers to display."
msgstr "Det finns inga triggers att visa"
#: libraries/rte/rte_words.lib.php:42
-#, fuzzy
#| msgid "Add an event"
msgid "Add event"
-msgstr "Lägg till en ny händelse"
+msgstr "Lägg till händelse"
#: libraries/rte/rte_words.lib.php:44
#, php-format
@@ -7217,22 +7207,20 @@ msgid "Export of event %s"
msgstr "Exportera händelse %s"
#: libraries/rte/rte_words.lib.php:45
-#, fuzzy
#| msgid "Event"
msgid "event"
-msgstr "Händelse"
+msgstr "händelse"
#: libraries/rte/rte_words.lib.php:46
-#, fuzzy
#| msgid "You do not have the necessary privileges to create a new routine"
msgid "You do not have the necessary privileges to create an event"
-msgstr "Du har inte tillräcklig behörighet för att skapa en ny rutin"
+msgstr "Du har inte tillräcklig behörighet för att skapa en händelse"
#: libraries/rte/rte_words.lib.php:47
-#, fuzzy, php-format
+#, php-format
#| msgid "No event with name %s found in database %s"
msgid "No event with name %1$s found in database %2$s"
-msgstr "Ingen händelse med namnet %s finns i databasen %s"
+msgstr "Ingen händelse med namnet %1$s hittades i databasen %2$s"
#: libraries/rte/rte_words.lib.php:48
msgid "There are no events to display."
@@ -9076,10 +9064,9 @@ msgstr "Alla statusvariabler"
#: server_status.php:619
msgid "Monitor"
-msgstr ""
+msgstr "Övervaka"
#: server_status.php:629 server_status.php:651
-#, fuzzy
#| msgid "Refresh rate:"
msgid "Refresh rate: "
msgstr "Uppdateringsfrekvens:"
@@ -9102,10 +9089,10 @@ msgstr "Liknande länkar:"
#. l10n: Questions is the name of a MySQL Status variable
#: server_status.php:738
-#, fuzzy, php-format
+#, php-format
#| msgid "Network traffic since startup: %s"
msgid "Questions since startup: %s"
-msgstr "Nätverkstrafik sedan start:%s"
+msgstr "Frågor sedan start: %s"
#: server_status.php:744 server_status.php:779 server_status.php:895
#: server_status.php:940
@@ -9135,10 +9122,10 @@ msgid "Network traffic since startup: %s"
msgstr "Nätverkstrafik sedan start:%s"
#: server_status.php:852
-#, fuzzy, php-format
+#, php-format
#| msgid "This MySQL server has been running for %s. It started up on %s."
msgid "This MySQL server has been running for %1$s. It started up on %2$s."
-msgstr "Denna MySQL-server har varit igång i %s. Den startade den %s."
+msgstr "Denna MySQL-servern har varit igång i %1$s. Den startade den %2$s."
#: server_status.php:862
msgid ""
@@ -9215,6 +9202,8 @@ msgid ""
"The number of connections that were aborted because the client died without "
"closing the connection properly."
msgstr ""
+"Antalet anslutningar som avbröts eftersom klienten dog utan att stänga "
+"anslutningen ordentligt."
#: server_status.php:1076
msgid "The number of failed attempts to connect to the MySQL server."
@@ -9871,49 +9860,44 @@ msgid "The number of threads that are not sleeping."
msgstr "Antalet trådar som inte är vilande."
#: server_status.php:1320
-#, fuzzy
#| msgid "Start row"
msgid "Start Monitor"
-msgstr "Starta rad"
+msgstr "Starta Monitor"
#: server_status.php:1328
msgid "Instructions/Setup"
-msgstr ""
+msgstr "Instruktioner/Setup"
#: server_status.php:1332
msgid "Done rearranging/editing charts"
-msgstr ""
+msgstr "Klar ändra/editera diagram"
#: server_status.php:1339
-#, fuzzy
#| msgid "Add parameter"
msgid "Add chart"
-msgstr "Lägg till parameter"
+msgstr "Lägg till diagram"
#: server_status.php:1341
msgid "Rearrange/edit charts"
-msgstr ""
+msgstr "Ordna/editera diagram"
#: server_status.php:1343
msgid "Refresh rate:"
msgstr "Uppdateringsfrekvens:"
#: server_status.php:1346
-#, fuzzy
#| msgid "Textarea columns"
msgid "Chart columns:"
-msgstr "Textarea kolumner"
+msgstr "Visa kolumner:"
#: server_status.php:1360
-#, fuzzy
#| msgid "User for config auth"
msgid "Clear monitor config"
-msgstr "Användare för config auth"
+msgstr "Rensa monitor config"
#: server_status.php:1363
-#, fuzzy
msgid "Monitor Instructions"
-msgstr "Information"
+msgstr "Övervaka instruktioner"
#: server_status.php:1364
msgid ""
@@ -9923,6 +9907,11 @@ msgid ""
"enabled. Note however, that the general_log produces a lot of data and "
"increases server load by up to 15%"
msgstr ""
+"phpMyAdmin Monitor hjälpa dig optimera server konfigurationen och spåra tid "
+"intensivt \\ icke intensiva frågor. För de senare måste du ställa log_output "
+"till \"TABLE\" och ha antingen slow_query_log eller general_log aktiverat. "
+"Observera att general_log producerar mycket data och ökar lasten på servern "
+"med upp till 15%"
#: server_status.php:1371
msgid ""
@@ -9935,6 +9924,17 @@ msgid ""
"will load statistics from the logs helping you find what caused the activity "
"spike.</p>"
msgstr ""
+"<b> Använda monitorn: </b><br/>\n"
+" Ok, du är klar stt sätta igång! När du klickar på \"Start monitor\" kommer "
+"webbläsaren uppdatera alla visade diagram \n"
+" med jämna mellanrum. Du kan lägga till diagram och ändra "
+"uppdateringsfrekvensen under \"Inställningar\", eller ta bort diagram \n"
+" med tyngdpunkten ikonen på respektive diagram. \n"
+" <p> När du får en plötslig topp i akviviteten, ävlj önskad tidsperiod på "
+"önskadt diagram genom att hålla ner \n"
+" vänster musknapp och panorera över diagrammet. Detta kommer ladda "
+"statistik från loggarna vilka hjälper dig att hitta vad som orsakade \n"
+" aktivitetstopp. </ p>"
#: server_status.php:1375
msgid ""
@@ -9944,6 +9944,12 @@ msgid ""
"disable the general_log and empty its table once monitoring is not required "
"any more."
msgstr ""
+"<b>Observera:</b>\n"
+" Att aktivera general_log kan öka belastningen på servern med 5-15%. Var "
+"medveten om att generera statistik från loggarna är en \n"
+"belastningsintensiv uppgift, så det är klokt att välja en kort tidsperiod "
+"samt att inaktivera general_log och tömma tabellen när övervakningen inte "
+"behövs längre. \n"
#: server_status.php:1385
#, fuzzy
@@ -9953,7 +9959,7 @@ msgstr "Användning"
#: server_status.php:1388
msgid "Memory Usage"
-msgstr ""
+msgstr "Minnesanvändning"
#: server_status.php:1391
#, fuzzy
@@ -9975,7 +9981,7 @@ msgstr "Välj tabeller"
#: server_status.php:1398
msgid "Commonly monitored"
-msgstr ""
+msgstr "Vanligen övervakade"
#: server_status.php:1413
#, fuzzy
@@ -9985,15 +9991,15 @@ msgstr "Du måste ange ett rutinnamn"
#: server_status.php:1417
msgid "Display as differential value"
-msgstr ""
+msgstr "Visa som differensvärde"
#: server_status.php:1419
msgid "Apply a divisor"
-msgstr ""
+msgstr "Tillämpa en dividend"
#: server_status.php:1426
msgid "Append unit to data values"
-msgstr ""
+msgstr "Lägg till enhet till datavärdena"
#: server_status.php:1432
#, fuzzy
@@ -10003,7 +10009,7 @@ msgstr "Lägg till en ny Trigger"
#: server_status.php:1434
msgid "Clear series"
-msgstr ""
+msgstr "Rensa serier"
#: server_status.php:1437
#, fuzzy
@@ -10031,17 +10037,19 @@ msgstr "Välj sida"
#: server_status.php:1454
msgid "Only retrieve SELECT,INSERT,UPDATE and DELETE Statements"
-msgstr ""
+msgstr "Hämta endast SELECT, INSERT, UPDATE och DELETE kommandon"
#: server_status.php:1459
msgid "Remove variable data in INSERT statements for better grouping"
-msgstr ""
+msgstr "Ta bort variabeldata med INSERT kommandon för bättre gruppering"
#: server_status.php:1462
msgid ""
"<p>Choose from which log you want the statistics to be generated from.</p> "
"Results are grouped by query text."
msgstr ""
+"<p>Välj den logg du vill att statistiken ska genereras från. </p>Resultaten "
+"grupperas efter frågetexten."
#: server_status.php:1465
#, fuzzy
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-12739-g0a4ddb3
by Piotr Przybylski 31 Jul '11
by Piotr Przybylski 31 Jul '11
31 Jul '11
The branch, master has been updated
via 0a4ddb3f67d80ca40ec92165d236ebd71863a4df (commit)
via 878cff0205cb5c3ce1d19080e4cb0eeb262b3083 (commit)
from 19178070b652faea2b8091f72f10c700c015a805 (commit)
- Log -----------------------------------------------------------------
commit 0a4ddb3f67d80ca40ec92165d236ebd71863a4df
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Sun Jul 31 20:37:43 2011 +0200
Remove unused function: PMA_lang_link_replace
commit 878cff0205cb5c3ce1d19080e4cb0eeb262b3083
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Sun Jul 31 20:36:56 2011 +0200
Comments
-----------------------------------------------------------------------
Summary of changes:
libraries/config/config_functions.lib.php | 31 ++--------------------------
libraries/sanitizing.lib.php | 9 +------
setup/lib/index.lib.php | 2 +-
3 files changed, 6 insertions(+), 36 deletions(-)
diff --git a/libraries/config/config_functions.lib.php b/libraries/config/config_functions.lib.php
index 7b71748..daa335f 100644
--- a/libraries/config/config_functions.lib.php
+++ b/libraries/config/config_functions.lib.php
@@ -11,11 +11,11 @@
* for formatting. Takes variable number of arguments.
* Based on PMA_sanitize from sanitize.lib.php.
*
- * @param string $lang_key key in $GLOBALS WITHOUT 'strSetup' prefix
- * @param mixed $args arguments for sprintf
+ * @param string $lang_key key in $GLOBALS WITHOUT 'strSetup' prefix
+ * @param mixed $args,... arguments for sprintf
* @return string
*/
-function PMA_lang($lang_key)
+function PMA_lang($lang_key, $args = null)
{
$message = isset($GLOBALS["strConfig$lang_key"]) ? $GLOBALS["strConfig$lang_key"] : $lang_key;
@@ -48,29 +48,4 @@ function PMA_lang_name($canonical_path, $type = 'name', $default = 'key')
? ($type == 'desc' ? PMA_lang($lang_key) : $GLOBALS["strConfig$lang_key"])
: ($default == 'key' ? $lang_key : $default);
}
-
-/**
- * Wraps link in <a> tags and replaces argument separator in internal links
- * to the one returned by PMA_get_arg_separator()
- *
- * @param string $link
- * @param string $text
- * @return string
- */
-function PMA_lang_link_replace($link, $text)
-{
- static $separator;
-
- if (!isset($separator)) {
- $separator = PMA_get_arg_separator('html');
- }
-
- if (!preg_match('#^https?://#', $link)) {
- $link = str_replace('&', $separator, $link);
- } else {
- $link = PMA_linkURL($link);
- }
-
- return '<a href="' . $link . '">' . $text . '</a>';
-}
?>
diff --git a/libraries/sanitizing.lib.php b/libraries/sanitizing.lib.php
index 69885c7..e920150 100644
--- a/libraries/sanitizing.lib.php
+++ b/libraries/sanitizing.lib.php
@@ -9,9 +9,8 @@
/**
* Checks whether given link is valid
*
- * @param string $url URL to check.
- *
- * @return boolean True if string can be used as link.
+ * @param string $url URL to check
+ * @return boolean True if string can be used as link
*/
function PMA_checkLink($url)
{
@@ -37,7 +36,6 @@ function PMA_checkLink($url)
* Callback function for replacing [a@link@target] links in bb code.
*
* @param array $found Array of preg matches
- *
* @return string Replaced string
*/
function PMA_replaceBBLink($found)
@@ -82,10 +80,7 @@ function PMA_replaceBBLink($found)
* @param string $message the message
* @param boolean $escape whether to escape html in result
* @param boolean $safe whether string is safe (can keep < and > chars)
- *
* @return string the sanitized message
- *
- * @access public
*/
function PMA_sanitize($message, $escape = false, $safe = false)
{
diff --git a/setup/lib/index.lib.php b/setup/lib/index.lib.php
index 9823cbd..a7e33a9 100644
--- a/setup/lib/index.lib.php
+++ b/setup/lib/index.lib.php
@@ -170,7 +170,7 @@ function PMA_version_check()
/**
* Calculates numerical equivalent of phpMyAdmin version string
*
- * @param string version
+ * @param string $version
* @return mixed false on failure, integer on success
*/
function version_to_int($version)
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-12167-g8824da9
by Piotr Przybylski 31 Jul '11
by Piotr Przybylski 31 Jul '11
31 Jul '11
The branch, master has been updated
via 8824da9ed86eb1f50bb6a972e6c00779b7dda017 (commit)
from 9b01642c9531be45d6ff96331901f941e3ed3638 (commit)
- Log -----------------------------------------------------------------
commit 8824da9ed86eb1f50bb6a972e6c00779b7dda017
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Sun Jul 31 17:23:34 2011 +0200
Fix links in messages shown by setup script
-----------------------------------------------------------------------
Summary of changes:
libraries/sanitizing.lib.php | 1 +
setup/frames/index.inc.php | 5 +++--
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/libraries/sanitizing.lib.php b/libraries/sanitizing.lib.php
index 6d9c4bf..69885c7 100644
--- a/libraries/sanitizing.lib.php
+++ b/libraries/sanitizing.lib.php
@@ -21,6 +21,7 @@ function PMA_checkLink($url)
);
if (defined('PMA_SETUP')) {
$valid_starts[] = '../Documentation.html';
+ $valid_starts[] = '?page=form&';
} else {
$valid_starts[] = './Documentation.html';
}
diff --git a/setup/frames/index.inc.php b/setup/frames/index.inc.php
index 83c6684..6b170f0 100644
--- a/setup/frames/index.inc.php
+++ b/setup/frames/index.inc.php
@@ -57,9 +57,10 @@ if (!$is_https) {
$text = __('You are not using a secure connection; all data (including potentially sensitive information, like passwords) is transferred unencrypted!');
if (!empty($_SERVER['REQUEST_URI']) && !empty($_SERVER['HTTP_HOST'])) {
+ $link = 'https://' . htmlspecialchars($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
$strInsecureConnectionMsg2 = __('If your server is also configured to accept HTTPS requests follow [a@%s]this link[/a] to use a secure connection.');
- $text .= ' ' . PMA_lang($strInsecureConnectionMsg2,
- 'https://' . htmlspecialchars($_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']));
+ $strInsecureConnectionMsg2 = sprintf($strInsecureConnectionMsg2, $link);
+ $text .= ' ' . PMA_lang($strInsecureConnectionMsg2);
}
messages_set('notice', 'no_https', __('Insecure connection'), $text);
}
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-12166-g9b01642
by Piotr Przybylski 31 Jul '11
by Piotr Przybylski 31 Jul '11
31 Jul '11
The branch, master has been updated
via 9b01642c9531be45d6ff96331901f941e3ed3638 (commit)
via 43bd03562d7a0e78b1dd66ef4ce4829eb99e911e (commit)
via 06365982c5bb977f9e2aa862e112381140eee230 (commit)
via 6a54e2631875676517761be2edc7af2c3543317c (commit)
from e3b91b7a0bfcb6bc525c9cfb27c8fc7570457b95 (commit)
- Log -----------------------------------------------------------------
commit 9b01642c9531be45d6ff96331901f941e3ed3638
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Sun Jul 31 15:15:39 2011 +0200
Fix test_db_connection() for connections via socket
commit 43bd03562d7a0e78b1dd66ef4ce4829eb99e911e
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Sun Jul 31 15:11:00 2011 +0200
mysqli is the recommended extension, not mysql
commit 06365982c5bb977f9e2aa862e112381140eee230
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Sun Jul 31 15:10:01 2011 +0200
Withdraw FAQ 1.33
It concerns PHP 5.0.4 only, minimal supported version is now 5.2
commit 6a54e2631875676517761be2edc7af2c3543317c
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Sun Jul 31 15:07:09 2011 +0200
Remove information about PHP 4.3, the minimal supported version is now 5.2
-----------------------------------------------------------------------
Summary of changes:
Documentation.html | 26 +++++++++-----------------
libraries/config.default.php | 2 +-
libraries/config/validate.lib.php | 2 +-
3 files changed, 11 insertions(+), 19 deletions(-)
diff --git a/Documentation.html b/Documentation.html
index 26673cb..393e5c7 100644
--- a/Documentation.html
+++ b/Documentation.html
@@ -699,18 +699,16 @@ since this link provides funding for phpMyAdmin.
<br /><br />
<tt><i>mysql</i></tt> :
- The classic MySQL extension. This is the recommended and default
- method at this time.<br /><br />
+ The classic MySQL extension.<br /><br />
<tt><i>mysqli</i></tt> :
The improved MySQL extension. This extension became available
- with php 5.0.0 and is the recommended way to connect to a server
+ with PHP 5.0.0 and is the recommended way to connect to a server
running MySQL 4.1.x or newer.</dd>
<dt id="cfg_Servers_compress">$cfg['Servers'][$i]['compress'] boolean</dt>
<dd>Whether to use a compressed protocol for the MySQL server connection
- or not (experimental).<br />
- This feature requires PHP >= 4.3.0.</dd>
+ or not (experimental).</dd>
<dt id="controluser">
<span id="cfg_Servers_controluser">$cfg['Servers'][$i]['controluser']</span> string<br />
@@ -1839,9 +1837,7 @@ $cfg['TrustedProxies'] =
<dd>Specifies whether GD >= 2 is available. If yes it can be used for
MIME transformations.<br />
Possible values are:
- <ul><li>auto - automatically detect, this is a bit expensive
- operation for php < 4.3.0 so it is preferred to change this
- according to your server real possibilities</li>
+ <ul><li>auto - automatically detect</li>
<li>yes - GD 2 functions can be used</li>
<li>no - GD 2 function cannot be used</li>
</ul>
@@ -2673,7 +2669,7 @@ setfacl -d -m "g:www-data:rwx" tmp
<abbr title="HyperText Transfer Protocol">HTTP</abbr> headers ...".</a>
</h4>
-<p> You just forgot to read the <i>install.txt</i> file from the php distribution.
+<p> You just forgot to read the <i>install.txt</i> file from the PHP distribution.
Have a look at the last message in this
<a href="http://bugs.php.net/bug.php?id=12061">bug report</a> from the
official PHP bug database.</p>
@@ -2815,7 +2811,7 @@ setfacl -d -m "g:www-data:rwx" tmp
connect to your MySQL server using PHP's classic
<a href="http://php.net/mysql">MySQL extension</a> as well as the
<a href="http://php.net/mysqli">improved MySQL extension (MySQLi)</a> that
- is available in php 5.0. The latter one should be used unless you have a
+ is available in PHP 5.0. The latter one should be used unless you have a
good reason not to do so.<br />
When compiling PHP, we strongly recommend that you manually link the MySQL
extension of your choice to a MySQL client library of at least the same
@@ -3013,11 +3009,7 @@ SetInputFilter PHP
</ol>
<h4 id="faq1_33">
- <a href="#faq1_33">1.33 Is there a problem with the mysqli extension when running
- PHP 5.0.4 on 64-bit systems?</a></h4>
-
-<p> Yes. This problem affects phpMyAdmin ("Call to undefined function
- pma_reloadnavigation"), so upgrade your PHP to the next version.</p>
+ <a href="#faq1_33">1.33 (withdrawn).</a></h4>
<h4 id="faq1_34">
<a href="#faq1_34">1.34 Can I access directly to database or table pages?</a></h4>
@@ -3226,8 +3218,8 @@ the <tt>mysql_upgrade</tt> command on the server.</p>
<p> Try to set the <a href="#cfg_OBGzip" class="configrule">$cfg['OBGZip']</a>
directive to <tt>FALSE</tt> in the phpMyAdmin configuration file. It helps
sometime.<br />
- Also have a look at your PHP version number: if it contains "4.0b..."
- it means you're running a beta version of PHP. That's not a so good idea,
+ Also have a look at your PHP version number: if it contains "b" or "alpha"
+ it means you're running a testing version of PHP. That's not a so good idea,
please upgrade to a plain revision.</p>
<h4 id="faq2_5">
diff --git a/libraries/config.default.php b/libraries/config.default.php
index edf0264..6166e83 100644
--- a/libraries/config.default.php
+++ b/libraries/config.default.php
@@ -145,7 +145,7 @@ $cfg['Servers'][$i]['connect_type'] = 'tcp';
$cfg['Servers'][$i]['extension'] = 'mysqli';
/**
- * Use compressed protocol for the MySQL connection (requires PHP >= 4.3.0)
+ * Use compressed protocol for the MySQL connection
*
* @global boolean $cfg['Servers'][$i]['compress']
*/
diff --git a/libraries/config/validate.lib.php b/libraries/config/validate.lib.php
index 163ff87..2b60725 100644
--- a/libraries/config/validate.lib.php
+++ b/libraries/config/validate.lib.php
@@ -188,7 +188,7 @@ function test_php_errormsg($start = true)
function test_db_connection($extension, $connect_type, $host, $port, $socket, $user, $pass = null, $error_key = 'Server')
{
// test_php_errormsg();
- $socket = empty($socket) || $connect_type == 'tcp' ? null : ':' . $socket;
+ $socket = empty($socket) || $connect_type == 'tcp' ? null : $socket;
$port = empty($port) || $connect_type == 'socket' ? null : ':' . $port;
$error = null;
if ($extension == 'mysql') {
hooks/post-receive
--
phpMyAdmin
1
0

[Phpmyadmin-git] [SCM] phpMyAdmin branch, master, updated. RELEASE_3_4_3_1-12162-ge3b91b7
by Piotr Przybylski 31 Jul '11
by Piotr Przybylski 31 Jul '11
31 Jul '11
The branch, master has been updated
via e3b91b7a0bfcb6bc525c9cfb27c8fc7570457b95 (commit)
from bb7e14d7feafac3f057a9e3d516a8699b54ca3e3 (commit)
- Log -----------------------------------------------------------------
commit e3b91b7a0bfcb6bc525c9cfb27c8fc7570457b95
Author: Piotr Przybylski <piotrprz(a)gmail.com>
Date: Sun Jul 31 00:44:42 2011 +0200
PMA_DBI_fetch_value, PMA_DBI_fetch_single_row and PMA_DBI_fetch_result don't need to cache affected rows because there are none
-----------------------------------------------------------------------
Summary of changes:
libraries/database_interface.lib.php | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php
index 42bd352..288743e 100644
--- a/libraries/database_interface.lib.php
+++ b/libraries/database_interface.lib.php
@@ -952,7 +952,7 @@ function PMA_DBI_fetch_value($result, $row_number = 0, $field = 0, $link = null,
$value = false;
if (is_string($result)) {
- $result = PMA_DBI_try_query($result, $link, $options | PMA_DBI_QUERY_STORE);
+ $result = PMA_DBI_try_query($result, $link, $options | PMA_DBI_QUERY_STORE, false);
}
// return false if result is empty or false
@@ -1004,7 +1004,7 @@ function PMA_DBI_fetch_value($result, $row_number = 0, $field = 0, $link = null,
*/
function PMA_DBI_fetch_single_row($result, $type = 'ASSOC', $link = null, $options = 0) {
if (is_string($result)) {
- $result = PMA_DBI_try_query($result, $link, $options | PMA_DBI_QUERY_STORE);
+ $result = PMA_DBI_try_query($result, $link, $options | PMA_DBI_QUERY_STORE, false);
}
// return null if result is empty or false
@@ -1087,7 +1087,7 @@ function PMA_DBI_fetch_result($result, $key = null, $value = null,
$resultrows = array();
if (is_string($result)) {
- $result = PMA_DBI_try_query($result, $link, $options);
+ $result = PMA_DBI_try_query($result, $link, $options, false);
}
// return empty array if result is empty or false
hooks/post-receive
--
phpMyAdmin
1
0