Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
0388f9adcd
@ -66,6 +66,12 @@ class PMA_DisplayResults
|
||||
const TABLE_TYPE_INNO_DB = 'InnoDB';
|
||||
const ALL_ROWS = 'all';
|
||||
const QUERY_TYPE_SELECT = 'SELECT';
|
||||
|
||||
const MYSQL_SCHEMA = 'mysql';
|
||||
const USER_FIELD = 'user';
|
||||
const HOST_FIELD = 'host';
|
||||
const USER_TABLE = 'user';
|
||||
const DB_TABLE = 'db';
|
||||
|
||||
|
||||
// Declare global fields
|
||||
@ -150,6 +156,25 @@ class PMA_DisplayResults
|
||||
/** array mime types information of fields */
|
||||
'_mime_map' => null
|
||||
);
|
||||
|
||||
/**
|
||||
* This global variable represent the columns which needs to be syntax
|
||||
* highlighted in each database tables
|
||||
* One element of this array represent all relavant columns in all tables in
|
||||
* one specific database
|
||||
*/
|
||||
public $sytax_highlighting_column_info = array(
|
||||
'information_schema' => array(
|
||||
'processlist' => array(
|
||||
'info' => array(
|
||||
'libraries/plugins/transformations/Text_Plain_Formatted.class.php',
|
||||
'Text_Plain_Formatted',
|
||||
'Text_Plain'
|
||||
)
|
||||
)
|
||||
)
|
||||
|
||||
);
|
||||
|
||||
|
||||
/**
|
||||
@ -1431,7 +1456,10 @@ class PMA_DisplayResults
|
||||
&& ($direction != self::DISP_DIR_HORIZONTAL_FLIPPED)
|
||||
) {
|
||||
$comments_map = array();
|
||||
if (isset($analyzed_sql[0]) && is_array($analyzed_sql[0]) && isset($analyzed_sql[0]['table_ref'])) {
|
||||
if (isset($analyzed_sql[0])
|
||||
&& is_array($analyzed_sql[0])
|
||||
&& isset($analyzed_sql[0]['table_ref'])
|
||||
) {
|
||||
foreach ($analyzed_sql[0]['table_ref'] as $tbl) {
|
||||
$tb = $tbl['table_true_name'];
|
||||
$comments_map[$tb] = PMA_getComments($this->__get('_db'), $tb);
|
||||
@ -2663,6 +2691,7 @@ class PMA_DisplayResults
|
||||
$fields_meta = $this->__get('_fields_meta');
|
||||
$highlight_columns = $this->__get('_highlight_columns');
|
||||
$mime_map = $this->__get('_mime_map');
|
||||
$host = '';
|
||||
|
||||
for ($j = 0; $j < $this->__get('_fields_cnt'); ++$j) {
|
||||
|
||||
@ -2759,8 +2788,89 @@ class PMA_DisplayResults
|
||||
$transform_options['wrapper_link']
|
||||
= PMA_generate_common_url($_url_params);
|
||||
|
||||
$vertical_display = $this->__get('_vertical_display');
|
||||
$vertical_display = $this->__get('_vertical_display');
|
||||
|
||||
// Check whether the field needs to display with syntax highlighting
|
||||
if ($this->_isNeedToSytaxHighlight($meta->name)
|
||||
&& (trim($row[$i]) != '')
|
||||
) {
|
||||
|
||||
$parsed_sql = PMA_SQP_parse($row[$i]);
|
||||
$row[$i] = PMA_CommonFunctions::getInstance()->formatSql($parsed_sql, $row[$i]);
|
||||
include_once $this->sytax_highlighting_column_info[strtolower($this->__get('_db'))][strtolower($this->__get('_table'))][strtolower($meta->name)][0];
|
||||
$transformation_plugin = new $this->sytax_highlighting_column_info[strtolower($this->__get('_db'))][strtolower($this->__get('_table'))][strtolower($meta->name)][1](null);
|
||||
|
||||
$transform_options = PMA_transformation_getOptions(
|
||||
isset($mime_map[$meta->name]
|
||||
['transformation_options']
|
||||
)
|
||||
? $mime_map[$meta->name]
|
||||
['transformation_options']
|
||||
: ''
|
||||
);
|
||||
|
||||
$meta->mimetype = str_replace(
|
||||
'_', '/',
|
||||
$this->sytax_highlighting_column_info[strtolower($this->__get('_db'))][strtolower($this->__get('_table'))][strtolower($meta->name)][2]
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
// Check for the fields need to show as link in mysql schema
|
||||
include_once 'libraries/mysql_schema_relation.lib.php';
|
||||
|
||||
// Host should initialize for create link to edit user privilages page
|
||||
if ((strtolower($this->__get('_db')) == self::MYSQL_SCHEMA)
|
||||
&& (strtolower($meta->name) == self::HOST_FIELD)
|
||||
) {
|
||||
$host = $row[$i];
|
||||
}
|
||||
|
||||
if (isset($GLOBALS['mysql_schema_relation'])
|
||||
&& ($this->_isFieldNeedToLink(strtolower($meta->name)))
|
||||
&& (strtolower($this->__get('_db')) == self::MYSQL_SCHEMA)
|
||||
) {
|
||||
|
||||
$linking_url_params = array();
|
||||
$link_relations = $GLOBALS['mysql_schema_relation'][strtolower($this->__get('_table'))][strtolower($meta->name)];
|
||||
|
||||
foreach ($link_relations['link_params'] as $link_param) {
|
||||
|
||||
// If link param is an array, set the key and value
|
||||
// from that array
|
||||
if (is_array($link_param)) {
|
||||
$linking_url_params[$link_param[0]] = $link_param[1];
|
||||
} else {
|
||||
$linking_url_params[$link_param] = $row[$i];
|
||||
|
||||
// To create link to edit user privilages page
|
||||
if ((strtolower($meta->name) == self::USER_FIELD)
|
||||
&& ((strtolower($this->__get('_table') == self::USER_TABLE))
|
||||
|| (strtolower($this->__get('_table') == self::DB_TABLE)))
|
||||
) {
|
||||
$linking_url_params['hostname'] = $host;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$linking_url = $link_relations['default_page']
|
||||
. PMA_generate_common_url($linking_url_params);
|
||||
include_once "libraries/plugins/transformations/Text_Plain_Link.class.php";
|
||||
$transformation_plugin = new Text_Plain_Link(null);
|
||||
|
||||
$transform_options = array(
|
||||
0 => $linking_url,
|
||||
2 => true
|
||||
);
|
||||
|
||||
$meta->mimetype = str_replace(
|
||||
'_', '/',
|
||||
'Text/Plain'
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
if ($meta->numeric == 1) {
|
||||
// n u m e r i c
|
||||
|
||||
@ -2951,6 +3061,36 @@ class PMA_DisplayResults
|
||||
|
||||
} // end of the '_gatherLinksForLaterOutputs()' function
|
||||
|
||||
|
||||
/**
|
||||
* Check whether any field is marked as need to syntax highlight
|
||||
*
|
||||
* @param string $field field to check
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
private function _isNeedToSytaxHighlight($field) {
|
||||
if (! empty($this->sytax_highlighting_column_info[strtolower($this->__get('_db'))][strtolower($this->__get('_table'))][strtolower($field)])) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Check whether the field needs to be link
|
||||
*
|
||||
* @param string $field field to check
|
||||
*
|
||||
* @return boolean
|
||||
*/
|
||||
private function _isFieldNeedToLink($field) {
|
||||
if (! empty($GLOBALS['mysql_schema_relation'][strtolower($this->__get('_table'))][$field])) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get url sql query without conditions to shorten URLs
|
||||
@ -3457,6 +3597,7 @@ class PMA_DisplayResults
|
||||
// replacements will be made
|
||||
if ((PMA_strlen($column) > $GLOBALS['cfg']['LimitChars'])
|
||||
&& ($_SESSION['tmp_user_values']['display_text'] == self::DISPLAY_PARTIAL_TEXT)
|
||||
&& ! $this->_isNeedToSytaxHighlight(strtolower($meta->name))
|
||||
) {
|
||||
$column = PMA_substr($column, 0, $GLOBALS['cfg']['LimitChars'])
|
||||
. '...';
|
||||
@ -3652,7 +3793,8 @@ class PMA_DisplayResults
|
||||
$is_analyse = $this->__get('_is_analyse');
|
||||
$field_flags = PMA_DBI_field_flags($dt_result, $col_index);
|
||||
if (stristr($field_flags, self::BINARY_FIELD)
|
||||
&& $GLOBALS['cfg']['ProtectBinary'] === 'all'
|
||||
&& ($GLOBALS['cfg']['ProtectBinary'] == 'all'
|
||||
|| $GLOBALS['cfg']['ProtectBinary'] == 'noblob')
|
||||
) {
|
||||
$class = str_replace('grid_edit', '', $class);
|
||||
}
|
||||
|
||||
46
libraries/mysql_schema_relation.lib.php
Normal file
46
libraries/mysql_schema_relation.lib.php
Normal file
@ -0,0 +1,46 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* This global variable represent the details for generating links inside
|
||||
* mysql schema.
|
||||
* Major element represent a table
|
||||
*
|
||||
* This global variable has not modified anywhere
|
||||
*/
|
||||
$GLOBALS['mysql_schema_relation'] = array(
|
||||
'db' => array(
|
||||
'db' => array(
|
||||
'link_params' => array('db'),
|
||||
'default_page' => 'index.php'
|
||||
),
|
||||
'user' => array(
|
||||
'link_params' => array('username'),
|
||||
'default_page' => 'server_privileges.php'
|
||||
)
|
||||
|
||||
),
|
||||
'proc' => array(
|
||||
'db' => array(
|
||||
'link_params' => array('db'),
|
||||
'default_page' => 'index.php'
|
||||
)
|
||||
|
||||
),
|
||||
'user' => array(
|
||||
'user' => array(
|
||||
'link_params' => array('username'),
|
||||
'default_page' => 'server_privileges.php'
|
||||
)
|
||||
|
||||
)
|
||||
);
|
||||
|
||||
?>
|
||||
@ -29,56 +29,6 @@ abstract class ExportPlugin extends PluginObserver
|
||||
*/
|
||||
protected $properties;
|
||||
|
||||
/**
|
||||
* Type of the newline character
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_crlf;
|
||||
|
||||
/**
|
||||
* Database name
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_db;
|
||||
|
||||
/**
|
||||
* Contains configuration settings
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $_cfg;
|
||||
|
||||
|
||||
/**
|
||||
* Relation configuration
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $_cfgRelation;
|
||||
|
||||
/**
|
||||
* The type of the export plugin
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_what;
|
||||
|
||||
/**
|
||||
* Parameter to plugin by which it can decide whether it can work
|
||||
*
|
||||
* @var mixed
|
||||
*/
|
||||
private $_pluginParam;
|
||||
|
||||
/**
|
||||
* File Charset
|
||||
*
|
||||
* @var type String
|
||||
*/
|
||||
private $_charsetOfFile;
|
||||
|
||||
/**
|
||||
* Common methods, must be overwritten by all export plugins
|
||||
*/
|
||||
@ -251,159 +201,5 @@ abstract class ExportPlugin extends PluginObserver
|
||||
* @return void
|
||||
*/
|
||||
abstract protected function setProperties();
|
||||
|
||||
/**
|
||||
* Gets the type of the newline character
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getCrlf()
|
||||
{
|
||||
return $this->_crlf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the type of the newline character
|
||||
*
|
||||
* @param String $crlf type of the newline character
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setCrlf($crlf)
|
||||
{
|
||||
$this->_crlf = $crlf;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the database name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getDb()
|
||||
{
|
||||
return $this->_db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the database name
|
||||
*
|
||||
* @param String $db database name
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setDb($db)
|
||||
{
|
||||
$this->_db = $db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the configuration settings
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getCfg()
|
||||
{
|
||||
return $this->_cfg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the configuration settings
|
||||
*
|
||||
* @param array $cfg array with configuration settings
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setCfg($cfg)
|
||||
{
|
||||
$this->_cfg = $cfg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the relation configuration
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function getCfgRelation()
|
||||
{
|
||||
return $this->_cfgRelation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the relation configuration
|
||||
*
|
||||
* @param array $cfgRelation relation configuration
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function setCfgRelation($cfgRelation)
|
||||
{
|
||||
$this->_cfgRelation = $cfgRelation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the type of the export plugin
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getWhat()
|
||||
{
|
||||
return $this->_what;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the type of the export plugin
|
||||
*
|
||||
* @param string $what type of the export plugin
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setWhat($what)
|
||||
{
|
||||
$this->_what = $what;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the parameter to plugin by which it can decide whether it can work
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
protected function getPluginParam()
|
||||
{
|
||||
return $this->_pluginParam;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the parameter to plugin by which it can decide whether it can work
|
||||
*
|
||||
* @param mixed $pluginParam plugin parameter
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setPluginParam($pluginParam)
|
||||
{
|
||||
$this->_pluginParam = $pluginParam;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the file charset
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getCharsetOfFile()
|
||||
{
|
||||
return $this->_charsetOfFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the file charset
|
||||
*
|
||||
* @param string $charsetOfFile file charset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setCharsetOfFile($charsetOfFile)
|
||||
{
|
||||
$this->_charsetOfFile = $charsetOfFile;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -76,11 +76,11 @@ class ExportCodegen extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
require_once "$props/options/items/SelectPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
include_once "$props/options/items/SelectPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('CodeGen');
|
||||
|
||||
@ -54,28 +54,9 @@ class ExportCsv extends ExportPlugin
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// initialize the specific export csv variables
|
||||
$this->initSpecificVariables();
|
||||
$this->setProperties();
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the variables that are used for export CSV
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function initSpecificVariables()
|
||||
{
|
||||
global $csv_terminated;
|
||||
global $csv_separator;
|
||||
global $csv_enclosed;
|
||||
global $csv_escaped;
|
||||
$this->setCsvTerminated($csv_terminated);
|
||||
$this->setCsvSeparator($csv_separator);
|
||||
$this->setCsvEnclosed($csv_enclosed);
|
||||
$this->setCsvEscaped($csv_escaped);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the export CSV properties
|
||||
*
|
||||
@ -84,12 +65,12 @@ class ExportCsv extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/TextPropertyItem.class.php";
|
||||
require_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
require_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/TextPropertyItem.class.php";
|
||||
include_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
include_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('CSV');
|
||||
@ -129,9 +110,9 @@ class ExportCsv extends ExportPlugin
|
||||
$generalOptions->addProperty($leaf);
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName('removeCRLF');
|
||||
$leaf->setText(__(
|
||||
'Remove carriage return/line feed characters within columns'
|
||||
));
|
||||
$leaf->setText(
|
||||
__('Remove carriage return/line feed characters within columns')
|
||||
);
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName('columns');
|
||||
$leaf->setText(__('Put columns names in the first row'));
|
||||
@ -167,16 +148,7 @@ class ExportCsv extends ExportPlugin
|
||||
*/
|
||||
public function exportHeader ()
|
||||
{
|
||||
// The type of the export plugin only has to be set once and then
|
||||
// it will remain unchanged. This is the first time
|
||||
global $what;
|
||||
$this->setWhat($what);
|
||||
|
||||
$csv_terminated = $this->getCsvTerminated();
|
||||
$csv_separator = $this->getCsvSeparator();
|
||||
$csv_enclosed = $this->getCsvEnclosed();
|
||||
$csv_escaped = $this->getCsvEscaped();
|
||||
|
||||
global $what, $csv_terminated, $csv_separator, $csv_enclosed, $csv_escaped;
|
||||
|
||||
// Here we just prepare some values for export
|
||||
if ($what == 'excel') {
|
||||
@ -209,12 +181,6 @@ class ExportCsv extends ExportPlugin
|
||||
$csv_separator = str_replace('\\t', "\011", $csv_separator);
|
||||
}
|
||||
|
||||
// remember the modifications
|
||||
$this->setCsvTerminated($csv_terminated);
|
||||
$this->setCsvSeparator($csv_separator);
|
||||
$this->setCsvEnclosed($csv_enclosed);
|
||||
$this->setCsvEscaped($csv_escaped);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -277,11 +243,7 @@ class ExportCsv extends ExportPlugin
|
||||
*/
|
||||
public function exportData($db, $table, $crlf, $error_url, $sql_query)
|
||||
{
|
||||
$what = $this->getWhat();
|
||||
$csv_terminated = $this->getCsvTerminated();
|
||||
$csv_separator = $this->getCsvSeparator();
|
||||
$csv_enclosed = $this->getCsvEnclosed();
|
||||
$csv_escaped = $this->getCsvEscaped();
|
||||
global $what, $csv_terminated, $csv_separator, $csv_enclosed, $csv_escaped;
|
||||
|
||||
// Gets the data from the database
|
||||
$result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
|
||||
@ -378,97 +340,5 @@ class ExportCsv extends ExportPlugin
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
|
||||
/**
|
||||
* Gets the string used to terminate lines
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getCsvTerminated()
|
||||
{
|
||||
return $this->_csvTerminated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the string used to terminate lines
|
||||
*
|
||||
* @param string $csvTerminated lines terminator
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setCsvTerminated($csvTerminated)
|
||||
{
|
||||
$this->_csvTerminated = $csvTerminated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string used to separate columns
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getCsvSeparator()
|
||||
{
|
||||
return $this->_csvSeparator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the string used to separate columns
|
||||
*
|
||||
* @param string $csvSeparator columns separator
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setCsvSeparator($csvSeparator)
|
||||
{
|
||||
$this->_csvSeparator = $csvSeparator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string used to enclose columns
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getCsvEnclosed()
|
||||
{
|
||||
return $this->_csvEnclosed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the string used to enclose columns
|
||||
*
|
||||
* @param string $csvEnclosed columns encloser
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setCsvEnclosed($csvEnclosed)
|
||||
{
|
||||
$this->_csvEnclosed = $csvEnclosed;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the string used to escape columns
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
protected function getCsvEscaped()
|
||||
{
|
||||
return $this->_csvEscaped;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the string used to escape columns
|
||||
*
|
||||
* @param string $csvEscaped columns escaper
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function setCsvEscaped($csvEscaped)
|
||||
{
|
||||
$this->_csvEscaped = $csvEscaped;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -28,13 +28,13 @@ class ExportExcel extends ExportCsv
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/TextPropertyItem.class.php";
|
||||
require_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
require_once "$props/options/items/SelectPropertyItem.class.php";
|
||||
require_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/TextPropertyItem.class.php";
|
||||
include_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
include_once "$props/options/items/SelectPropertyItem.class.php";
|
||||
include_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('CSV for MS Excel');
|
||||
@ -58,20 +58,22 @@ class ExportExcel extends ExportCsv
|
||||
$generalOptions->addProperty($leaf);
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName('removeCRLF');
|
||||
$leaf->setText(__(
|
||||
'Remove carriage return/line feed characters within columns'
|
||||
));
|
||||
$leaf->setText(
|
||||
__('Remove carriage return/line feed characters within columns')
|
||||
);
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName('columns');
|
||||
$leaf->setText(__('Put columns names in the first row'));
|
||||
$generalOptions->addProperty($leaf);
|
||||
$leaf = new SelectPropertyItem();
|
||||
$leaf->setName('edition');
|
||||
$leaf->setValues(array(
|
||||
'win' => 'Windows',
|
||||
'mac_excel2003' => 'Excel 2003 / Macintosh',
|
||||
'mac_excel2008' => 'Excel 2008 / Macintosh'
|
||||
));
|
||||
$leaf->setValues(
|
||||
array(
|
||||
'win' => 'Windows',
|
||||
'mac_excel2003' => 'Excel 2003 / Macintosh',
|
||||
'mac_excel2008' => 'Excel 2008 / Macintosh'
|
||||
)
|
||||
);
|
||||
$leaf->setText(__('Excel edition:'));
|
||||
$generalOptions->addProperty($leaf);
|
||||
$leaf = new HiddenPropertyItem();
|
||||
|
||||
@ -36,12 +36,12 @@ class ExportHtmlword extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/RadioPropertyItem.class.php";
|
||||
require_once "$props/options/items/TextPropertyItem.class.php";
|
||||
require_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/RadioPropertyItem.class.php";
|
||||
include_once "$props/options/items/TextPropertyItem.class.php";
|
||||
include_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('Microsoft Word 2000');
|
||||
@ -63,11 +63,13 @@ class ExportHtmlword extends ExportPlugin
|
||||
// create primary items and add them to the group
|
||||
$leaf = new RadioPropertyItem();
|
||||
$leaf->setName("structure_or_data");
|
||||
$leaf->setValues(array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
));
|
||||
$leaf->setValues(
|
||||
array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
)
|
||||
);
|
||||
$dumpWhat->addProperty($leaf);
|
||||
// add the main group to the root group
|
||||
$exportSpecificOptions->addProperty($dumpWhat);
|
||||
@ -115,7 +117,6 @@ class ExportHtmlword extends ExportPlugin
|
||||
public function exportHeader ()
|
||||
{
|
||||
global $charset_of_file;
|
||||
$this->setCharsetOfFile($charset_of_file);
|
||||
|
||||
return PMA_exportOutputHandler(
|
||||
'<html xmlns:o="urn:schemas-microsoft-com:office:office"
|
||||
@ -195,7 +196,6 @@ class ExportHtmlword extends ExportPlugin
|
||||
public function exportData($db, $table, $crlf, $error_url, $sql_query)
|
||||
{
|
||||
global $what;
|
||||
$this->setWhat($what);
|
||||
|
||||
if (! PMA_exportOutputHandler(
|
||||
'<h2>'
|
||||
@ -346,7 +346,6 @@ class ExportHtmlword extends ExportPlugin
|
||||
// set $cfgRelation here, because there is a chance that it's modified
|
||||
// since the class initialization
|
||||
global $cfgRelation;
|
||||
$this->setCfgRelation($cfgRelation);
|
||||
|
||||
$schema_insert = '';
|
||||
|
||||
@ -466,7 +465,7 @@ class ExportHtmlword extends ExportPlugin
|
||||
|
||||
$schema_insert .= '</table>';
|
||||
return $schema_insert;
|
||||
} // end of the 'PMA_getTableDef()' function
|
||||
}
|
||||
|
||||
/**
|
||||
* Outputs triggers
|
||||
|
||||
@ -36,10 +36,10 @@ class ExportJson extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('JSON');
|
||||
|
||||
@ -51,7 +51,7 @@ class ExportLatex extends ExportPlugin
|
||||
*/
|
||||
protected function setProperties()
|
||||
{
|
||||
$plugin_param = $this->getPluginParam();
|
||||
global $plugin_param;
|
||||
$hide_structure = false;
|
||||
if ($plugin_param['export_type'] == 'table'
|
||||
&& ! $plugin_param['single_table']
|
||||
@ -60,12 +60,12 @@ class ExportLatex extends ExportPlugin
|
||||
}
|
||||
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
require_once "$props/options/items/RadioPropertyItem.class.php";
|
||||
require_once "$props/options/items/TextPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
include_once "$props/options/items/RadioPropertyItem.class.php";
|
||||
include_once "$props/options/items/TextPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('LaTeX');
|
||||
@ -97,11 +97,13 @@ class ExportLatex extends ExportPlugin
|
||||
// create primary items and add them to the group
|
||||
$leaf = new RadioPropertyItem();
|
||||
$leaf->setName("structure_or_data");
|
||||
$leaf->setValues(array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
));
|
||||
$leaf->setValues(
|
||||
array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
)
|
||||
);
|
||||
$dumpWhat->addProperty($leaf);
|
||||
// add the main group to the root group
|
||||
$exportSpecificOptions->addProperty($dumpWhat);
|
||||
@ -207,8 +209,6 @@ class ExportLatex extends ExportPlugin
|
||||
{
|
||||
global $crlf;
|
||||
global $cfg;
|
||||
$this->setCrlf($crlf);
|
||||
$this->setCfg($cfg);
|
||||
|
||||
$head = '% phpMyAdmin LaTeX Dump' . $crlf
|
||||
. '% version ' . PMA_VERSION . $crlf
|
||||
@ -245,7 +245,7 @@ class ExportLatex extends ExportPlugin
|
||||
*/
|
||||
public function exportDBHeader ($db)
|
||||
{
|
||||
$crlf = $this->getCrlf();
|
||||
global $crlf;
|
||||
$head = '% ' . $crlf
|
||||
. '% ' . __('Database') . ': ' . '\'' . $db . '\'' . $crlf
|
||||
. '% ' . $crlf;
|
||||
@ -436,9 +436,7 @@ class ExportLatex extends ExportPlugin
|
||||
$dates = false
|
||||
) {
|
||||
global $cfgRelation;
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$this->setCfgRelation($cfgRelation);
|
||||
|
||||
/**
|
||||
* Get the unique keys in the table
|
||||
@ -553,7 +551,9 @@ class ExportLatex extends ExportPlugin
|
||||
$fields = PMA_DBI_get_columns($db, $table);
|
||||
foreach ($fields as $row) {
|
||||
$extracted_columnspec
|
||||
= PMA_CommonFunctions::getInstance()->extractColumnSpec($row['Type']);
|
||||
= PMA_CommonFunctions::getInstance()->extractColumnSpec(
|
||||
$row['Type']
|
||||
);
|
||||
$type = $extracted_columnspec['print_type'];
|
||||
if (empty($type)) {
|
||||
$type = ' ';
|
||||
|
||||
@ -36,13 +36,13 @@ class ExportMediawiki extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertySubgroup.class.php";
|
||||
require_once "$props/options/items/MessageOnlyPropertyItem.class.php";
|
||||
require_once "$props/options/items/RadioPropertyItem.class.php";
|
||||
require_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertySubgroup.class.php";
|
||||
include_once "$props/options/items/MessageOnlyPropertyItem.class.php";
|
||||
include_once "$props/options/items/RadioPropertyItem.class.php";
|
||||
include_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('MediaWiki Table');
|
||||
@ -67,11 +67,13 @@ class ExportMediawiki extends ExportPlugin
|
||||
$subgroup->setText("Dump table");
|
||||
$leaf = new RadioPropertyItem();
|
||||
$leaf->setName('structure_or_data');
|
||||
$leaf->setValues(array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
));
|
||||
$leaf->setValues(
|
||||
array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
)
|
||||
);
|
||||
$subgroup->setSubgroupHeader($leaf);
|
||||
$generalOptions->addProperty($subgroup);
|
||||
|
||||
|
||||
@ -39,17 +39,19 @@ class ExportOds extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/TextPropertyItem.class.php";
|
||||
require_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
require_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/TextPropertyItem.class.php";
|
||||
include_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
include_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('Open Document Spreadsheet');
|
||||
$exportPluginProperties->setExtension('ods');
|
||||
$exportPluginProperties->setMimeType('application/vnd.oasis.opendocument.spreadsheet');
|
||||
$exportPluginProperties->setMimeType(
|
||||
'application/vnd.oasis.opendocument.spreadsheet'
|
||||
);
|
||||
$exportPluginProperties->setForceFile(true);
|
||||
$exportPluginProperties->setOptionsText(__('Options'));
|
||||
|
||||
@ -221,7 +223,6 @@ class ExportOds extends ExportPlugin
|
||||
public function exportData($db, $table, $crlf, $error_url, $sql_query)
|
||||
{
|
||||
global $what;
|
||||
$this->setWhat($what);
|
||||
|
||||
// Gets the data from the database
|
||||
$result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
|
||||
|
||||
@ -38,7 +38,7 @@ class ExportOdt extends ExportPlugin
|
||||
*/
|
||||
protected function setProperties()
|
||||
{
|
||||
$plugin_param = $this->getPluginParam();
|
||||
global $plugin_param;
|
||||
$hide_structure = false;
|
||||
if ($plugin_param['export_type'] == 'table'
|
||||
&& ! $plugin_param['single_table']
|
||||
@ -47,17 +47,19 @@ class ExportOdt extends ExportPlugin
|
||||
}
|
||||
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/TextPropertyItem.class.php";
|
||||
require_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
require_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/TextPropertyItem.class.php";
|
||||
include_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
include_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('Open Document Text');
|
||||
$exportPluginProperties->setExtension('odt');
|
||||
$exportPluginProperties->setMimeType('application/vnd.oasis.opendocument.text');
|
||||
$exportPluginProperties->setMimeType(
|
||||
'application/vnd.oasis.opendocument.text'
|
||||
);
|
||||
$exportPluginProperties->setForceFile(true);
|
||||
$exportPluginProperties->setOptionsText(__('Options'));
|
||||
|
||||
@ -74,11 +76,13 @@ class ExportOdt extends ExportPlugin
|
||||
// create primary items and add them to the group
|
||||
$leaf = new RadioPropertyItem();
|
||||
$leaf->setName("structure_or_data");
|
||||
$leaf->setValues(array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
));
|
||||
$leaf->setValues(
|
||||
array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
)
|
||||
);
|
||||
$dumpWhat->addProperty($leaf);
|
||||
// add the main group to the root group
|
||||
$exportSpecificOptions->addProperty($dumpWhat);
|
||||
@ -236,7 +240,6 @@ class ExportOdt extends ExportPlugin
|
||||
public function exportData($db, $table, $crlf, $error_url, $sql_query)
|
||||
{
|
||||
global $what;
|
||||
$this->setWhat($what);
|
||||
|
||||
// Gets the data from the database
|
||||
$result = PMA_DBI_query($sql_query, null, PMA_DBI_QUERY_UNBUFFERED);
|
||||
@ -407,7 +410,6 @@ class ExportOdt extends ExportPlugin
|
||||
$view = false
|
||||
) {
|
||||
global $cfgRelation;
|
||||
$this->setCfgRelation($cfgRelation);
|
||||
|
||||
/**
|
||||
* Gets fields properties
|
||||
|
||||
@ -66,12 +66,12 @@ class ExportPdf extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/MessageOnlyPropertyItem.class.php";
|
||||
require_once "$props/options/items/TextPropertyItem.class.php";
|
||||
require_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/MessageOnlyPropertyItem.class.php";
|
||||
include_once "$props/options/items/TextPropertyItem.class.php";
|
||||
include_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('PDF');
|
||||
@ -92,9 +92,9 @@ class ExportPdf extends ExportPlugin
|
||||
// create primary items and add them to the group
|
||||
$leaf = new MessageOnlyPropertyItem();
|
||||
$leaf->setName("explanation");
|
||||
$leaf->setText(__(
|
||||
'(Generates a report containing the data of a single table)'
|
||||
));
|
||||
$leaf->setText(
|
||||
__('(Generates a report containing the data of a single table)')
|
||||
);
|
||||
$generalOptions->addProperty($leaf);
|
||||
$leaf = new TextPropertyItem();
|
||||
$leaf->setName("report_title");
|
||||
|
||||
@ -36,10 +36,10 @@ class ExportPhparray extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('PHP array');
|
||||
@ -119,8 +119,8 @@ class ExportPhparray extends ExportPlugin
|
||||
{
|
||||
PMA_exportOutputHandler(
|
||||
'//' . $GLOBALS['crlf']
|
||||
. '// Database ' . PMA_CommonFunctions::getInstance()->backquote($db) . $GLOBALS['crlf']
|
||||
. '//' . $GLOBALS['crlf']
|
||||
. '// Database ' . PMA_CommonFunctions::getInstance()->backquote($db)
|
||||
. $GLOBALS['crlf'] . '//' . $GLOBALS['crlf']
|
||||
);
|
||||
return true;
|
||||
}
|
||||
@ -195,7 +195,8 @@ class ExportPhparray extends ExportPlugin
|
||||
|
||||
// Output table name as comment if it's the first record of the table
|
||||
if ($record_cnt == 1) {
|
||||
$buffer .= $crlf . '// '. PMA_CommonFunctions::getInstance()->backquote($db) . '.'
|
||||
$buffer .= $crlf . '// '
|
||||
. PMA_CommonFunctions::getInstance()->backquote($db) . '.'
|
||||
. PMA_CommonFunctions::getInstance()->backquote($table) . $crlf;
|
||||
$buffer .= '$' . $tablefixed . ' = array(' . $crlf;
|
||||
$buffer .= ' array(';
|
||||
|
||||
@ -21,55 +21,6 @@ require_once "libraries/plugins/ExportPlugin.class.php";
|
||||
*/
|
||||
class ExportSql extends ExportPlugin
|
||||
{
|
||||
/**
|
||||
* MySQL charset map
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
private $_mysqlCharsetMap;
|
||||
|
||||
/**
|
||||
* SQL for dropping a table
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_sqlDropTable;
|
||||
|
||||
/**
|
||||
* SQL Backquotes
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
private $_sqlBackquotes;
|
||||
|
||||
/**
|
||||
* SQL Constraints
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_sqlConstraints;
|
||||
|
||||
/**
|
||||
* The text of the SQL query
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_sqlConstraintsQuery;
|
||||
|
||||
/**
|
||||
* SQL for dropping foreign keys
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $_sqlDropForeignKeys;
|
||||
|
||||
/**
|
||||
* The number of the current row
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $_currentRow;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
@ -83,33 +34,6 @@ class ExportSql extends ExportPlugin
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Initialize the local variables that are used specific for export SQL
|
||||
*
|
||||
* @global array $mysql_charset_map
|
||||
* @global string $sql_drop_table
|
||||
* @global bool $sql_backquotes
|
||||
* @global string $sql_constraints
|
||||
* @global string $sql_constraints_query
|
||||
* @global string $sql_drop_foreign_keys
|
||||
* @global int $current_row
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function initSpecificVariables()
|
||||
{
|
||||
global $sql_drop_table;
|
||||
global $sql_backquotes;
|
||||
global $sql_constraints;
|
||||
global $sql_constraints_query;
|
||||
global $sql_drop_foreign_keys;
|
||||
$this->_setSqlDropTable($sql_drop_table);
|
||||
$this->_setSqlBackquotes($sql_backquotes);
|
||||
$this->_setSqlConstraints($sql_constraints);
|
||||
$this->_setSqlConstraintsQuery($sql_constraints_query);
|
||||
$this->_setSqlDropForeignKeys($sql_drop_foreign_keys);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the export SQL properties
|
||||
*
|
||||
@ -118,7 +42,6 @@ class ExportSql extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
global $plugin_param;
|
||||
$this->setPluginParam($plugin_param);
|
||||
|
||||
$hide_sql = false;
|
||||
$hide_structure = false;
|
||||
@ -131,15 +54,15 @@ class ExportSql extends ExportPlugin
|
||||
|
||||
if (! $hide_sql) {
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertySubgroup.class.php";
|
||||
require_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
require_once "$props/options/items/MessageOnlyPropertyItem.class.php";
|
||||
require_once "$props/options/items/RadioPropertyItem.class.php";
|
||||
require_once "$props/options/items/SelectPropertyItem.class.php";
|
||||
require_once "$props/options/items/TextPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertySubgroup.class.php";
|
||||
include_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
include_once "$props/options/items/MessageOnlyPropertyItem.class.php";
|
||||
include_once "$props/options/items/RadioPropertyItem.class.php";
|
||||
include_once "$props/options/items/SelectPropertyItem.class.php";
|
||||
include_once "$props/options/items/TextPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('SQL');
|
||||
@ -162,24 +85,28 @@ class ExportSql extends ExportPlugin
|
||||
$subgroup->setName("include_comments");
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName('include_comments');
|
||||
$leaf->setText(__(
|
||||
'Display comments <i>(includes info such as export'
|
||||
. ' timestamp, PHP version, and server version)</i>'
|
||||
));
|
||||
$leaf->setText(
|
||||
__(
|
||||
'Display comments <i>(includes info such as export'
|
||||
. ' timestamp, PHP version, and server version)</i>'
|
||||
)
|
||||
);
|
||||
$subgroup->setSubgroupHeader($leaf);
|
||||
|
||||
$leaf = new TextPropertyItem();
|
||||
$leaf->setName('header_comment');
|
||||
$leaf->setText(__(
|
||||
'Additional custom header comment (\n splits lines):'
|
||||
));
|
||||
$leaf->setText(
|
||||
__('Additional custom header comment (\n splits lines):')
|
||||
);
|
||||
$subgroup->addProperty($leaf);
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName('dates');
|
||||
$leaf->setText(__(
|
||||
'Include a timestamp of when databases were created, last'
|
||||
. ' updated, and last checked'
|
||||
));
|
||||
$leaf->setText(
|
||||
__(
|
||||
'Include a timestamp of when databases were created, last'
|
||||
. ' updated, and last checked'
|
||||
)
|
||||
);
|
||||
$subgroup->addProperty($leaf);
|
||||
if (! empty($GLOBALS['cfgRelation']['relation'])) {
|
||||
$leaf = new BoolPropertyItem();
|
||||
@ -199,22 +126,26 @@ class ExportSql extends ExportPlugin
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName("use_transaction");
|
||||
$leaf->setText(__('Enclose export in a transaction'));
|
||||
$leaf->setDoc(array(
|
||||
'programs',
|
||||
'mysqldump',
|
||||
'option_mysqldump_single-transaction'
|
||||
));
|
||||
$leaf->setDoc(
|
||||
array(
|
||||
'programs',
|
||||
'mysqldump',
|
||||
'option_mysqldump_single-transaction'
|
||||
)
|
||||
);
|
||||
$generalOptions->addProperty($leaf);
|
||||
|
||||
// disable foreign key checks
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName("disable_fk");
|
||||
$leaf->setText(__('Disable foreign key checks'));
|
||||
$leaf->setDoc(array(
|
||||
'manual_MySQL_Database_Administration',
|
||||
'server-system-variables',
|
||||
'sysvar_foreign_key_checks'
|
||||
));
|
||||
$leaf->setDoc(
|
||||
array(
|
||||
'manual_MySQL_Database_Administration',
|
||||
'server-system-variables',
|
||||
'sysvar_foreign_key_checks'
|
||||
)
|
||||
);
|
||||
$generalOptions->addProperty($leaf);
|
||||
|
||||
// compatibility maximization
|
||||
@ -227,15 +158,19 @@ class ExportSql extends ExportPlugin
|
||||
|
||||
$leaf = new SelectPropertyItem();
|
||||
$leaf->setName("compatibility");
|
||||
$leaf->setText(__(
|
||||
'Database system or older MySQL server to maximize output'
|
||||
. ' compatibility with:'
|
||||
));
|
||||
$leaf->setText(
|
||||
__(
|
||||
'Database system or older MySQL server to maximize output'
|
||||
. ' compatibility with:'
|
||||
)
|
||||
);
|
||||
$leaf->setValues($values);
|
||||
$leaf->setDoc(array(
|
||||
'manual_MySQL_Database_Administration',
|
||||
'Server_SQL_mode'
|
||||
));
|
||||
$leaf->setDoc(
|
||||
array(
|
||||
'manual_MySQL_Database_Administration',
|
||||
'Server_SQL_mode'
|
||||
)
|
||||
);
|
||||
$generalOptions->addProperty($leaf);
|
||||
|
||||
unset($values);
|
||||
@ -245,9 +180,9 @@ class ExportSql extends ExportPlugin
|
||||
if ($plugin_param['export_type'] == 'server') {
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName("drop_database");
|
||||
$leaf->setText(sprintf(
|
||||
__('Add %s statement'), '<code>DROP DATABASE</code>'
|
||||
));
|
||||
$leaf->setText(
|
||||
sprintf(__('Add %s statement'), '<code>DROP DATABASE</code>')
|
||||
);
|
||||
$generalOptions->addProperty($leaf);
|
||||
}
|
||||
|
||||
@ -257,11 +192,13 @@ class ExportSql extends ExportPlugin
|
||||
$subgroup->setText("Dump table");
|
||||
$leaf = new RadioPropertyItem();
|
||||
$leaf->setName('structure_or_data');
|
||||
$leaf->setValues(array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
));
|
||||
$leaf->setValues(
|
||||
array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
)
|
||||
);
|
||||
$subgroup->setSubgroupHeader($leaf);
|
||||
$generalOptions->addProperty($subgroup);
|
||||
|
||||
@ -307,12 +244,14 @@ class ExportSql extends ExportPlugin
|
||||
if (! PMA_DRIZZLE) {
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName('procedure_function');
|
||||
$leaf->setText(sprintf(
|
||||
__('Add %s statement'),
|
||||
'<code>CREATE PROCEDURE / FUNCTION'
|
||||
. (PMA_MYSQL_INT_VERSION > 50100
|
||||
? ' / EVENT</code>' : '</code>')
|
||||
));
|
||||
$leaf->setText(
|
||||
sprintf(
|
||||
__('Add %s statement'),
|
||||
'<code>CREATE PROCEDURE / FUNCTION'
|
||||
. (PMA_MYSQL_INT_VERSION > 50100
|
||||
? ' / EVENT</code>' : '</code>')
|
||||
)
|
||||
);
|
||||
$subgroup->addProperty($leaf);
|
||||
}
|
||||
|
||||
@ -335,11 +274,13 @@ class ExportSql extends ExportPlugin
|
||||
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName("backquotes");
|
||||
$leaf->setText(__(
|
||||
'Enclose table and column names with backquotes '
|
||||
. '<i>(Protects column and table names formed with'
|
||||
. ' special characters or keywords)</i>'
|
||||
));
|
||||
$leaf->setText(
|
||||
__(
|
||||
'Enclose table and column names with backquotes '
|
||||
. '<i>(Protects column and table names formed with'
|
||||
. ' special characters or keywords)</i>'
|
||||
)
|
||||
);
|
||||
|
||||
$structureOptions->addProperty($leaf);
|
||||
|
||||
@ -368,19 +309,23 @@ class ExportSql extends ExportPlugin
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName("delayed");
|
||||
$leaf->setText(__('<code>INSERT DELAYED</code> statements'));
|
||||
$leaf->setDoc(array(
|
||||
'manual_MySQL_Database_Administration',
|
||||
'insert_delayed'
|
||||
));
|
||||
$leaf->setDoc(
|
||||
array(
|
||||
'manual_MySQL_Database_Administration',
|
||||
'insert_delayed'
|
||||
)
|
||||
);
|
||||
$subgroup->addProperty($leaf);
|
||||
}
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName("ignore");
|
||||
$leaf->setText(__('<code>INSERT IGNORE</code> statements'));
|
||||
$leaf->setDoc(array(
|
||||
'manual_MySQL_Database_Administration',
|
||||
'insert'
|
||||
));
|
||||
$leaf->setDoc(
|
||||
array(
|
||||
'manual_MySQL_Database_Administration',
|
||||
'insert'
|
||||
)
|
||||
);
|
||||
$subgroup->addProperty($leaf);
|
||||
$dataOptions->addProperty($subgroup);
|
||||
|
||||
@ -388,11 +333,13 @@ class ExportSql extends ExportPlugin
|
||||
$leaf = new SelectPropertyItem();
|
||||
$leaf->setName("type");
|
||||
$leaf->setText(__('Function to use when dumping data:'));
|
||||
$leaf->setValues(array(
|
||||
'INSERT' => 'INSERT',
|
||||
'UPDATE' => 'UPDATE',
|
||||
'REPLACE' => 'REPLACE'
|
||||
));
|
||||
$leaf->setValues(
|
||||
array(
|
||||
'INSERT' => 'INSERT',
|
||||
'UPDATE' => 'UPDATE',
|
||||
'REPLACE' => 'REPLACE'
|
||||
)
|
||||
);
|
||||
$dataOptions->addProperty($leaf);
|
||||
|
||||
/* Syntax to use when inserting data */
|
||||
@ -403,27 +350,29 @@ class ExportSql extends ExportPlugin
|
||||
$leaf = new RadioPropertyItem();
|
||||
$leaf->setName("insert_syntax");
|
||||
$leaf->setText(__('<code>INSERT IGNORE</code> statements'));
|
||||
$leaf->setValues(array(
|
||||
'complete' => __(
|
||||
'include column names in every <code>INSERT</code> statement'
|
||||
. ' <br /> Example: <code>INSERT INTO'
|
||||
. ' tbl_name (col_A,col_B,col_C) VALUES (1,2,3)</code>'
|
||||
),
|
||||
'extended' => __(
|
||||
'insert multiple rows in every <code>INSERT</code> statement'
|
||||
. '<br /> Example: <code>INSERT INTO'
|
||||
. ' tbl_name VALUES (1,2,3), (4,5,6), (7,8,9)</code>'
|
||||
),
|
||||
'both' => __(
|
||||
'both of the above<br /> Example:'
|
||||
. ' <code>INSERT INTO tbl_name (col_A,col_B) VALUES (1,2,3),'
|
||||
. ' (4,5,6), (7,8,9)</code>'
|
||||
),
|
||||
'none' => __(
|
||||
'neither of the above<br /> Example:'
|
||||
. ' <code>INSERT INTO tbl_name VALUES (1,2,3)</code>'
|
||||
$leaf->setValues(
|
||||
array(
|
||||
'complete' => __(
|
||||
'include column names in every <code>INSERT</code> statement'
|
||||
. ' <br /> Example: <code>INSERT INTO'
|
||||
. ' tbl_name (col_A,col_B,col_C) VALUES (1,2,3)</code>'
|
||||
),
|
||||
'extended' => __(
|
||||
'insert multiple rows in every <code>INSERT</code> statement'
|
||||
. '<br /> Example: <code>INSERT INTO'
|
||||
. ' tbl_name VALUES (1,2,3), (4,5,6), (7,8,9)</code>'
|
||||
),
|
||||
'both' => __(
|
||||
'both of the above<br /> Example:'
|
||||
. ' <code>INSERT INTO tbl_name (col_A,col_B) VALUES (1,2,3),'
|
||||
. ' (4,5,6), (7,8,9)</code>'
|
||||
),
|
||||
'none' => __(
|
||||
'neither of the above<br /> Example:'
|
||||
. ' <code>INSERT INTO tbl_name VALUES (1,2,3)</code>'
|
||||
)
|
||||
)
|
||||
));
|
||||
);
|
||||
$subgroup->addProperty($leaf);
|
||||
$dataOptions->addProperty($subgroup);
|
||||
|
||||
@ -436,10 +385,12 @@ class ExportSql extends ExportPlugin
|
||||
// Dump binary columns in hexadecimal
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName("hex_for_blob");
|
||||
$leaf->setText(__(
|
||||
'Dump binary columns in hexadecimal notation'
|
||||
. ' <i>(for example, "abc" becomes 0x616263)</i>'
|
||||
));
|
||||
$leaf->setText(
|
||||
__(
|
||||
'Dump binary columns in hexadecimal notation'
|
||||
. ' <i>(for example, "abc" becomes 0x616263)</i>'
|
||||
)
|
||||
);
|
||||
$dataOptions->addProperty($leaf);
|
||||
|
||||
// Drizzle works only with UTC timezone
|
||||
@ -447,11 +398,13 @@ class ExportSql extends ExportPlugin
|
||||
// Dump time in UTC
|
||||
$leaf = new BoolPropertyItem();
|
||||
$leaf->setName("utc_time");
|
||||
$leaf->setText(__(
|
||||
'Dump TIMESTAMP columns in UTC <i>(enables TIMESTAMP columns'
|
||||
. ' to be dumped and reloaded between servers in different'
|
||||
. ' time zones)</i>'
|
||||
));
|
||||
$leaf->setText(
|
||||
__(
|
||||
'Dump TIMESTAMP columns in UTC <i>(enables TIMESTAMP columns'
|
||||
. ' to be dumped and reloaded between servers in different'
|
||||
. ' time zones)</i>'
|
||||
)
|
||||
);
|
||||
$dataOptions->addProperty($leaf);
|
||||
}
|
||||
|
||||
@ -487,7 +440,6 @@ class ExportSql extends ExportPlugin
|
||||
public function exportRoutines($db)
|
||||
{
|
||||
global $crlf;
|
||||
$this->setCrlf($crlf);
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$text = '';
|
||||
@ -588,9 +540,7 @@ class ExportSql extends ExportPlugin
|
||||
*/
|
||||
public function exportFooter()
|
||||
{
|
||||
global $crlf;
|
||||
$this->setCrlf($crlf);
|
||||
$mysql_charset_map = $this->_getMysqlCharsetMap();
|
||||
global $crlf, $mysql_charset_map;
|
||||
|
||||
$foot = '';
|
||||
|
||||
@ -636,9 +586,6 @@ class ExportSql extends ExportPlugin
|
||||
{
|
||||
global $crlf, $cfg;
|
||||
global $mysql_charset_map;
|
||||
$this->setCrlf($crlf);
|
||||
$this->setCfg($cfg);
|
||||
$this->_setMysqlCharsetMap($mysql_charset_map);
|
||||
|
||||
if (isset($GLOBALS['sql_compatibility'])) {
|
||||
$tmp_compat = $GLOBALS['sql_compatibility'];
|
||||
@ -746,7 +693,6 @@ class ExportSql extends ExportPlugin
|
||||
global $crlf;
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$this->setCrlf($crlf);
|
||||
|
||||
if (isset($GLOBALS['sql_drop_database'])) {
|
||||
if (! PMA_exportOutputHandler(
|
||||
@ -759,7 +705,8 @@ class ExportSql extends ExportPlugin
|
||||
}
|
||||
}
|
||||
$create_query = 'CREATE DATABASE '
|
||||
. (isset($GLOBALS['sql_backquotes']) ? $common_functions->backquote($db) : $db);
|
||||
. (isset($GLOBALS['sql_backquotes'])
|
||||
? $common_functions->backquote($db) : $db);
|
||||
$collation = PMA_getDbCollation($db);
|
||||
if (PMA_DRIZZLE) {
|
||||
$create_query .= ' COLLATE ' . $collation;
|
||||
@ -804,7 +751,8 @@ class ExportSql extends ExportPlugin
|
||||
. $this->_exportComment(
|
||||
__('Database') . ': '
|
||||
. (isset($GLOBALS['sql_backquotes'])
|
||||
? PMA_CommonFunctions::getInstance()->backquote($db) : '\'' . $db . '\'')
|
||||
? PMA_CommonFunctions::getInstance()->backquote($db)
|
||||
: '\'' . $db . '\'')
|
||||
)
|
||||
. $this->_exportComment();
|
||||
return PMA_exportOutputHandler($head);
|
||||
@ -820,7 +768,6 @@ class ExportSql extends ExportPlugin
|
||||
public function exportDBFooter($db)
|
||||
{
|
||||
global $crlf;
|
||||
$this->setCrlf($crlf);
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$result = true;
|
||||
@ -858,7 +805,8 @@ class ExportSql extends ExportPlugin
|
||||
|
||||
foreach ($event_names as $event_name) {
|
||||
if (! empty($GLOBALS['sql_drop_table'])) {
|
||||
$text .= 'DROP EVENT ' . $common_functions->backquote($event_name)
|
||||
$text .= 'DROP EVENT '
|
||||
. $common_functions->backquote($event_name)
|
||||
. $delimiter . $crlf;
|
||||
}
|
||||
$text .= PMA_DBI_get_definition($db, 'EVENT', $event_name)
|
||||
@ -890,7 +838,8 @@ class ExportSql extends ExportPlugin
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$create_query = '';
|
||||
if (! empty($GLOBALS['sql_drop_table'])) {
|
||||
$create_query .= 'DROP VIEW IF EXISTS ' . $common_functions->backquote($view)
|
||||
$create_query .= 'DROP VIEW IF EXISTS '
|
||||
. $common_functions->backquote($view)
|
||||
. ';' . $crlf;
|
||||
}
|
||||
|
||||
@ -905,7 +854,8 @@ class ExportSql extends ExportPlugin
|
||||
$tmp = array();
|
||||
$columns = PMA_DBI_get_columns_full($db, $view);
|
||||
foreach ($columns as $column_name => $definition) {
|
||||
$tmp[] = $common_functions->backquote($column_name) . ' ' . $definition['Type'] . $crlf;
|
||||
$tmp[] = $common_functions->backquote($column_name) . ' ' .
|
||||
$definition['Type'] . $crlf;
|
||||
}
|
||||
$create_query .= implode(',', $tmp) . ');';
|
||||
return($create_query);
|
||||
@ -918,7 +868,8 @@ class ExportSql extends ExportPlugin
|
||||
* @param string $table the 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 $show_dates whether to include creation/update/check dates
|
||||
* @param bool $show_dates whether to include creation/update/check
|
||||
* dates
|
||||
* @param bool $add_semicolon whether to add semicolon and end-of-line at
|
||||
* the end
|
||||
* @param bool $view whether we're handling a view
|
||||
@ -934,13 +885,8 @@ class ExportSql extends ExportPlugin
|
||||
$add_semicolon = true,
|
||||
$view = false
|
||||
) {
|
||||
$this->initSpecificVariables();
|
||||
|
||||
$sql_drop_table = $this->_getSqlDropTable();
|
||||
$sql_backquotes = $this->_getSqlBackquotes();
|
||||
$sql_constraints = $this->_getSqlConstraints();
|
||||
$sql_constraints_query = $this->_getSqlConstraintsQuery();
|
||||
$sql_drop_foreign_keys = $this->_getSqlDropForeignKeys();
|
||||
global $sql_drop_table, $sql_backquotes, $sql_constraints,
|
||||
$sql_constraints_query, $sql_drop_foreign_keys;
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$schema_create = '';
|
||||
@ -949,8 +895,8 @@ class ExportSql extends ExportPlugin
|
||||
|
||||
// need to use PMA_DBI_QUERY_STORE with PMA_DBI_num_rows() in mysqli
|
||||
$result = PMA_DBI_query(
|
||||
'SHOW TABLE STATUS FROM ' . $common_functions->backquote($db) . ' LIKE \''
|
||||
. $common_functions->sqlAddSlashes($table, true) . '\'',
|
||||
'SHOW TABLE STATUS FROM ' . $common_functions->backquote($db)
|
||||
. ' LIKE \'' . $common_functions->sqlAddSlashes($table, true) . '\'',
|
||||
null,
|
||||
PMA_DBI_QUERY_STORE
|
||||
);
|
||||
@ -964,8 +910,10 @@ class ExportSql extends ExportPlugin
|
||||
TABLE_CREATION_TIME AS Create_time,
|
||||
TABLE_UPDATE_TIME AS Update_time
|
||||
FROM data_dictionary.TABLES
|
||||
WHERE TABLE_SCHEMA = '" . $common_functions->sqlAddSlashes($db) . "'
|
||||
AND TABLE_NAME = '" . $common_functions->sqlAddSlashes($table) . "'";
|
||||
WHERE TABLE_SCHEMA = '"
|
||||
. $common_functions->sqlAddSlashes($db) . "'
|
||||
AND TABLE_NAME = '"
|
||||
. $common_functions->sqlAddSlashes($table) . "'";
|
||||
$tmpres = array_merge(PMA_DBI_fetch_single_row($sql), $tmpres);
|
||||
}
|
||||
// Here we optionally add the AUTO_INCREMENT next value,
|
||||
@ -1027,7 +975,8 @@ class ExportSql extends ExportPlugin
|
||||
// no need to generate a DROP VIEW here, it was done earlier
|
||||
if (! empty($sql_drop_table) && ! PMA_Table::isView($db, $table)) {
|
||||
$schema_create .= 'DROP TABLE IF EXISTS '
|
||||
. $common_functions->backquote($table, $sql_backquotes) . ';' . $crlf;
|
||||
. $common_functions->backquote($table, $sql_backquotes) . ';'
|
||||
. $crlf;
|
||||
}
|
||||
|
||||
// Complete table dump,
|
||||
@ -1052,7 +1001,8 @@ class ExportSql extends ExportPlugin
|
||||
// produce a displayable result for the default value of a BIT
|
||||
// column, nor does the mysqldump command. See MySQL bug 35796
|
||||
$result = PMA_DBI_try_query(
|
||||
'SHOW CREATE TABLE ' . $common_functions->backquote($db) . '.' . $common_functions->backquote($table)
|
||||
'SHOW CREATE TABLE ' . $common_functions->backquote($db) . '.'
|
||||
. $common_functions->backquote($table)
|
||||
);
|
||||
// an error can happen, for example the table is crashed
|
||||
$tmp_error = PMA_DBI_getError();
|
||||
@ -1264,12 +1214,9 @@ class ExportSql extends ExportPlugin
|
||||
$do_relation = false,
|
||||
$do_mime = false
|
||||
) {
|
||||
global $cfgRelation;
|
||||
global $cfgRelation, $sql_backquotes;
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$this->setCfgRelation($cfgRelation);
|
||||
$sql_backquotes = $this->_getSqlBackquotes();
|
||||
|
||||
$schema_create = '';
|
||||
|
||||
// Check if we can use Relations
|
||||
@ -1309,7 +1256,10 @@ class ExportSql extends ExportPlugin
|
||||
)
|
||||
. $this->_exportComment(
|
||||
' '
|
||||
. $common_functions->backquote($mime['mimetype'], $sql_backquotes)
|
||||
. $common_functions->backquote(
|
||||
$mime['mimetype'],
|
||||
$sql_backquotes
|
||||
)
|
||||
);
|
||||
}
|
||||
$schema_create .= $this->_exportComment();
|
||||
@ -1331,9 +1281,15 @@ class ExportSql extends ExportPlugin
|
||||
)
|
||||
. $this->_exportComment(
|
||||
' '
|
||||
. $common_functions->backquote($rel['foreign_table'], $sql_backquotes)
|
||||
. $common_functions->backquote(
|
||||
$rel['foreign_table'],
|
||||
$sql_backquotes
|
||||
)
|
||||
. ' -> '
|
||||
. $common_functions->backquote($rel['foreign_field'], $sql_backquotes)
|
||||
. $common_functions->backquote(
|
||||
$rel['foreign_field'],
|
||||
$sql_backquotes
|
||||
)
|
||||
);
|
||||
}
|
||||
$schema_create .= $this->_exportComment();
|
||||
@ -1354,11 +1310,12 @@ class ExportSql extends ExportPlugin
|
||||
* 'stand_in'
|
||||
* @param string $export_type 'server', 'database', 'table'
|
||||
* @param bool $relation whether to include relation comments
|
||||
* @param bool $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 exportStructure() also for other export
|
||||
* types which use this parameter
|
||||
* @param bool $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 exportStructure()
|
||||
* also for other export types which use this
|
||||
* parameter
|
||||
* @param bool $mime whether to include mime comments
|
||||
* @param bool $dates whether to include creation/update/check dates
|
||||
*
|
||||
@ -1461,9 +1418,7 @@ class ExportSql extends ExportPlugin
|
||||
*/
|
||||
public function exportData($db, $table, $crlf, $error_url, $sql_query)
|
||||
{
|
||||
global $current_row;
|
||||
$this->_setCurrentRow($current_row);
|
||||
$sql_backquotes = $this->_getSqlBackquotes();
|
||||
global $current_row, $sql_backquotes;
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$formatted_table_name = (isset($GLOBALS['sql_backquotes']))
|
||||
@ -1535,7 +1490,10 @@ class ExportSql extends ExportPlugin
|
||||
$schema_insert .= 'IGNORE ';
|
||||
}
|
||||
// avoid EOL blank
|
||||
$schema_insert .= $common_functions->backquote($table, $sql_backquotes) . ' SET';
|
||||
$schema_insert .= $common_functions->backquote(
|
||||
$table,
|
||||
$sql_backquotes
|
||||
) . ' SET';
|
||||
} else {
|
||||
// insert or replace
|
||||
if (isset($GLOBALS['sql_type'])
|
||||
@ -1566,7 +1524,10 @@ class ExportSql extends ExportPlugin
|
||||
&& $sql_command == 'INSERT'
|
||||
) {
|
||||
$truncate = 'TRUNCATE TABLE '
|
||||
. $common_functions->backquote($table, $sql_backquotes) . ";";
|
||||
. $common_functions->backquote(
|
||||
$table,
|
||||
$sql_backquotes
|
||||
) . ";";
|
||||
$truncatehead = $this->_possibleCRLF()
|
||||
. $this->_exportComment()
|
||||
. $this->_exportComment(
|
||||
@ -1669,7 +1630,8 @@ class ExportSql extends ExportPlugin
|
||||
// something else -> treat as a string
|
||||
$values[] = '\''
|
||||
. str_replace(
|
||||
$search, $replace, $common_functions->sqlAddSlashes($row[$j])
|
||||
$search, $replace,
|
||||
$common_functions->sqlAddSlashes($row[$j])
|
||||
)
|
||||
. '\'';
|
||||
} // end if
|
||||
@ -1755,161 +1717,4 @@ class ExportSql extends ExportPlugin
|
||||
|
||||
return true;
|
||||
} // end of the 'exportData()' function
|
||||
|
||||
|
||||
/* ~~~~~~~~~~~~~~~~~~~~ Getters and Setters ~~~~~~~~~~~~~~~~~~~~ */
|
||||
|
||||
/**
|
||||
* Gets the MySQL charset map
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function _getMysqlCharsetMap()
|
||||
{
|
||||
return $this->_mysqlCharsetMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the MySQL charset map
|
||||
*
|
||||
* @param string $mysqlCharsetMap file charset
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _setMysqlCharsetMap($mysqlCharsetMap)
|
||||
{
|
||||
$this->_mysqlCharsetMap = $mysqlCharsetMap;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the SQL for dropping a table
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
private function _getSqlDropTable()
|
||||
{
|
||||
return $this->_sqlDropTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the SQL for dropping a table
|
||||
*
|
||||
* @param string $sqlDropTable SQL for dropping a table
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _setSqlDropTable($sqlDropTable)
|
||||
{
|
||||
$this->_sqlDropTable = $sqlDropTable;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the SQL Backquotes
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
private function _getSqlBackquotes()
|
||||
{
|
||||
return $this->_sqlBackquotes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the SQL Backquotes
|
||||
*
|
||||
* @param string $sqlBackquotes SQL Backquotes
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _setSqlBackquotes($sqlBackquotes)
|
||||
{
|
||||
$this->_sqlBackquotes = $sqlBackquotes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the SQL Constraints
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _getSqlConstraints()
|
||||
{
|
||||
return $this->_sqlConstraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the SQL Constraints
|
||||
*
|
||||
* @param string $sqlConstraints SQL Constraints
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _setSqlConstraints($sqlConstraints)
|
||||
{
|
||||
$this->_sqlConstraints = $sqlConstraints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the text of the SQL constraints query
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _getSqlConstraintsQuery()
|
||||
{
|
||||
return $this->_sqlConstraintsQuery;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the text of the SQL constraints query
|
||||
*
|
||||
* @param string $sqlConstraintsQuery text of the SQL constraints query
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _setSqlConstraintsQuery($sqlConstraintsQuery)
|
||||
{
|
||||
$this->_sqlConstraintsQuery = $sqlConstraintsQuery;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the SQL for dropping foreign keys
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _getSqlDropForeignKeys()
|
||||
{
|
||||
return $this->_sqlDropForeignKeys;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the SQL SQL for dropping foreign keys
|
||||
*
|
||||
* @param string $sqlDropForeignKeys SQL for dropping foreign keys
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _setSqlDropForeignKeys($sqlDropForeignKeys)
|
||||
{
|
||||
$this->_sqlDropForeignKeys = $sqlDropForeignKeys;
|
||||
}
|
||||
|
||||
/**
|
||||
* The number of the current row
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
private function _getCurrentRow()
|
||||
{
|
||||
return $this->_currentRow;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the number of the current row
|
||||
*
|
||||
* @param string $currentRow number of the current row
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function _setCurrentRow($currentRow)
|
||||
{
|
||||
$this->_currentRow = $currentRow;
|
||||
}
|
||||
}
|
||||
@ -36,12 +36,12 @@ class ExportTexytext extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/RadioPropertyItem.class.php";
|
||||
require_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
require_once "$props/options/items/TextPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/RadioPropertyItem.class.php";
|
||||
include_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
include_once "$props/options/items/TextPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('Texy! text');
|
||||
@ -62,11 +62,13 @@ class ExportTexytext extends ExportPlugin
|
||||
// create primary items and add them to the group
|
||||
$leaf = new RadioPropertyItem();
|
||||
$leaf->setName("structure_or_data");
|
||||
$leaf->setValues(array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
));
|
||||
$leaf->setValues(
|
||||
array(
|
||||
'structure' => __('structure'),
|
||||
'data' => __('data'),
|
||||
'structure_and_data' => __('structure and data')
|
||||
)
|
||||
);
|
||||
$dumpWhat->addProperty($leaf);
|
||||
// add the main group to the root group
|
||||
$exportSpecificOptions->addProperty($dumpWhat);
|
||||
@ -177,7 +179,6 @@ class ExportTexytext extends ExportPlugin
|
||||
public function exportData($db, $table, $crlf, $error_url, $sql_query)
|
||||
{
|
||||
global $what;
|
||||
$this->setWhat($what);
|
||||
|
||||
if (! PMA_exportOutputHandler(
|
||||
'== ' . __('Dumping data for table') . ' ' . $table . "\n\n"
|
||||
@ -314,7 +315,6 @@ class ExportTexytext extends ExportPlugin
|
||||
$view = false
|
||||
) {
|
||||
global $cfgRelation;
|
||||
$this->setCfgRelation($cfgRelation);
|
||||
|
||||
$text_output = '';
|
||||
|
||||
|
||||
@ -65,11 +65,11 @@ class ExportXml extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
require_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
include_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
|
||||
// create the export plugin property item
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
@ -164,9 +164,6 @@ class ExportXml extends ExportPlugin
|
||||
{
|
||||
$this->initSpecificVariables();
|
||||
global $crlf, $cfg, $db;
|
||||
$this->setCrlf($crlf);
|
||||
$this->setCfg($cfg);
|
||||
$this->setDb($db);
|
||||
$table = $this->_getTable();
|
||||
$tables = $this->_getTables();
|
||||
|
||||
@ -214,7 +211,8 @@ class ExportXml extends ExportPlugin
|
||||
'utf8' AS DEFAULT_CHARACTER_SET_NAME,
|
||||
DEFAULT_COLLATION_NAME
|
||||
FROM data_dictionary.SCHEMAS
|
||||
WHERE SCHEMA_NAME = '" . $common_functions->sqlAddSlashes($db) . "'"
|
||||
WHERE SCHEMA_NAME = '"
|
||||
. $common_functions->sqlAddSlashes($db) . "'"
|
||||
);
|
||||
} else {
|
||||
$result = PMA_DBI_fetch_result(
|
||||
@ -382,7 +380,7 @@ class ExportXml extends ExportPlugin
|
||||
*/
|
||||
public function exportDBHeader ($db)
|
||||
{
|
||||
$crlf = $this->getCrlf();
|
||||
global $crlf;
|
||||
|
||||
if (isset($GLOBALS['xml_export_contents'])
|
||||
&& $GLOBALS['xml_export_contents']
|
||||
@ -407,7 +405,7 @@ class ExportXml extends ExportPlugin
|
||||
*/
|
||||
public function exportDBFooter ($db)
|
||||
{
|
||||
$crlf = $this->getCrlf();
|
||||
global $crlf;
|
||||
|
||||
if (isset($GLOBALS['xml_export_contents'])
|
||||
&& $GLOBALS['xml_export_contents']
|
||||
|
||||
@ -36,10 +36,10 @@ class ExportYaml extends ExportPlugin
|
||||
protected function setProperties()
|
||||
{
|
||||
$props = 'libraries/properties/';
|
||||
require_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
require_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
require_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
include_once "$props/plugins/ExportPluginProperties.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyRootGroup.class.php";
|
||||
include_once "$props/options/groups/OptionsPropertyMainGroup.class.php";
|
||||
include_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('YAML');
|
||||
|
||||
@ -45,9 +45,12 @@ abstract class TextLinkTransformationsPlugin extends TransformationsPlugin
|
||||
*/
|
||||
public function applyTransformation($buffer, $options = array(), $meta = '')
|
||||
{
|
||||
|
||||
$append_part = (isset($options[2]) && $options[2]) ? '' : $buffer;
|
||||
|
||||
$transform_options = array (
|
||||
'string' => '<a href="'
|
||||
. PMA_linkURL((isset($options[0]) ? $options[0] : '') . $buffer)
|
||||
. PMA_linkURL((isset($options[0]) ? $options[0] : '') . $append_part)
|
||||
. '" title="' . (isset($options[1]) ? $options[1] : '')
|
||||
. '">' . (isset($options[1]) ? $options[1] : $buffer) . '</a>'
|
||||
);
|
||||
|
||||
15
pmd_pdf.php
15
pmd_pdf.php
@ -40,8 +40,10 @@ if (isset($mode)) {
|
||||
die("<script>alert('Pages not found!');history.go(-2);</script>");
|
||||
}
|
||||
|
||||
$pmd_table = $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.' . $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords']);
|
||||
$pma_table = $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.' . $common_functions->backquote($cfgRelation['table_coords']);
|
||||
$pmd_table = $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.'
|
||||
. $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords']);
|
||||
$pma_table = $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.'
|
||||
. $common_functions->backquote($cfgRelation['table_coords']);
|
||||
$scale_q = $common_functions->sqlAddSlashes($scale);
|
||||
|
||||
if ('create_export' == $mode) {
|
||||
@ -57,7 +59,12 @@ if (isset($mode)) {
|
||||
$pdf_page_number_q = $common_functions->sqlAddSlashes($pdf_page_number);
|
||||
|
||||
if ('export' == $mode) {
|
||||
$sql = "REPLACE INTO " . $pma_table . " (db_name, table_name, pdf_page_number, x, y) SELECT db_name, table_name, " . $pdf_page_number_q . ", ROUND(x/" . $scale_q . ") , ROUND(y/" . $scale_q . ") y FROM " . $pmd_table . " WHERE db_name = '" . $common_functions->sqlAddSlashes($db) . "'";
|
||||
$sql = "REPLACE INTO " . $pma_table
|
||||
. " (db_name, table_name, pdf_page_number, x, y)"
|
||||
. " SELECT db_name, table_name, " . $pdf_page_number_q . ","
|
||||
. " ROUND(x/" . $scale_q . ") , ROUND(y/" . $scale_q . ") y"
|
||||
. " FROM " . $pmd_table
|
||||
. " WHERE db_name = '" . $common_functions->sqlAddSlashes($db) . "'";
|
||||
|
||||
PMA_queryAsControlUser($sql, true, PMA_DBI_QUERY_STORE);
|
||||
}
|
||||
@ -72,7 +79,7 @@ if (isset($mode)) {
|
||||
AND
|
||||
' . $pmd_table . '.`table_name` = ' . $pma_table . '.`table_name`
|
||||
AND
|
||||
' . $pmd_table . '.`db_name`=\''. $common_functions->sqlAddSlashes($db) .'\'
|
||||
' . $pmd_table . '.`db_name`=\''. $common_functions->sqlAddSlashes($db) . '\'
|
||||
AND pdf_page_number = ' . $pdf_page_number_q . ';',
|
||||
true, PMA_DBI_QUERY_STORE
|
||||
);
|
||||
|
||||
@ -35,14 +35,14 @@ if ($common_functions->isForeignKeySupported($type_T1)
|
||||
) {
|
||||
PMD_return_new(0, __('Error: relation already exists.'));
|
||||
}
|
||||
// note: in InnoDB, the index does not requires to be on a PRIMARY
|
||||
// or UNIQUE key
|
||||
// improve: check all other requirements for InnoDB relations
|
||||
// note: in InnoDB, the index does not requires to be on a PRIMARY
|
||||
// or UNIQUE key
|
||||
// improve: check all other requirements for InnoDB relations
|
||||
$result = PMA_DBI_query(
|
||||
'SHOW INDEX FROM ' . $common_functions->backquote($db)
|
||||
. '.' . $common_functions->backquote($T1) . ';'
|
||||
);
|
||||
$index_array1 = array(); // will be use to emphasis prim. keys in the table view
|
||||
$index_array1 = array(); // will be use to emphasis prim. keys in the table view
|
||||
while ($row = PMA_DBI_fetch_assoc($result)) {
|
||||
$index_array1[$row['Column_name']] = 1;
|
||||
}
|
||||
@ -52,7 +52,7 @@ if ($common_functions->isForeignKeySupported($type_T1)
|
||||
'SHOW INDEX FROM ' . $common_functions->backquote($db)
|
||||
. '.' . $common_functions->backquote($T2) . ';'
|
||||
);
|
||||
$index_array2 = array(); // will be used to emphasis prim. keys in the table view
|
||||
$index_array2 = array(); // will be used to emphasis prim. keys in the table view
|
||||
while ($row = PMA_DBI_fetch_assoc($result)) {
|
||||
$index_array2[$row['Column_name']] = 1;
|
||||
}
|
||||
@ -76,11 +76,9 @@ if ($common_functions->isForeignKeySupported($type_T1)
|
||||
}
|
||||
$upd_query .= ';';
|
||||
PMA_DBI_try_query($upd_query) or PMD_return_new(0, __('Error: Relation not added.'));
|
||||
PMD_return_new(1, __('FOREIGN KEY relation added'));
|
||||
PMD_return_new(1, __('FOREIGN KEY relation added'));
|
||||
}
|
||||
|
||||
// internal (pmadb) relation
|
||||
} else {
|
||||
} else { // internal (pmadb) relation
|
||||
if ($GLOBALS['cfgRelation']['relwork'] == false) {
|
||||
PMD_return_new(0, _('General relation features') . ':' . _('Disabled'));
|
||||
} else {
|
||||
@ -102,7 +100,7 @@ if ($common_functions->isForeignKeySupported($type_T1)
|
||||
} else {
|
||||
PMD_return_new(0, __('Error: Relation not added.'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function PMD_return_new($b,$ret)
|
||||
|
||||
@ -38,17 +38,20 @@ foreach ($post_params as $one_post_param) {
|
||||
}
|
||||
|
||||
foreach ($t_x as $key => $value) {
|
||||
$KEY = empty($IS_AJAX) ? urldecode($key) : $key; // table name decode (post PDF exp/imp)
|
||||
// table name decode (post PDF exp/imp)
|
||||
$KEY = empty($IS_AJAX) ? urldecode($key) : $key;
|
||||
list($DB,$TAB) = explode(".", $KEY);
|
||||
PMA_queryAsControlUser(
|
||||
'DELETE FROM ' . $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.' . $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords'])
|
||||
'DELETE FROM ' . $common_functions->backquote($GLOBALS['cfgRelation']['db'])
|
||||
. '.' . $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords'])
|
||||
. ' WHERE `db_name` = \'' . $common_functions->sqlAddSlashes($DB) . '\''
|
||||
. ' AND `table_name` = \'' . $common_functions->sqlAddSlashes($TAB) . '\'',
|
||||
true, PMA_DBI_QUERY_STORE
|
||||
);
|
||||
|
||||
PMA_queryAsControlUser(
|
||||
'INSERT INTO ' . $common_functions->backquote($GLOBALS['cfgRelation']['db']) . '.' . $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords'])
|
||||
'INSERT INTO ' . $common_functions->backquote($GLOBALS['cfgRelation']['db'])
|
||||
. '.' . $common_functions->backquote($GLOBALS['cfgRelation']['designer_coords'])
|
||||
. ' (db_name, table_name, x, y, v, h)'
|
||||
. ' VALUES ('
|
||||
. '\'' . $common_functions->sqlAddSlashes($DB) . '\', '
|
||||
|
||||
5
po/es.po
5
po/es.po
@ -4,7 +4,7 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
|
||||
"PO-Revision-Date: 2012-07-09 17:51+0200\n"
|
||||
"PO-Revision-Date: 2012-07-27 18:07+0200\n"
|
||||
"Last-Translator: Matías Bellone <matiasbellone@gmail.com>\n"
|
||||
"Language-Team: spanish <es@li.org>\n"
|
||||
"Language: es\n"
|
||||
@ -7772,10 +7772,9 @@ msgstr ""
|
||||
"clave)</i>"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:354
|
||||
#, fuzzy
|
||||
#| msgid "Object creation options"
|
||||
msgid "Data creation options"
|
||||
msgstr "Opciones de creación de objetos"
|
||||
msgstr "Opciones de creación de datos"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:358
|
||||
#: libraries/plugins/export/ExportSql.class.php:1573
|
||||
|
||||
258
po/nb.po
258
po/nb.po
@ -4,8 +4,8 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
|
||||
"PO-Revision-Date: 2012-07-09 16:04+0200\n"
|
||||
"Last-Translator: Nicholas Arnesen <baretester@live.no>\n"
|
||||
"PO-Revision-Date: 2012-07-30 14:59+0200\n"
|
||||
"Last-Translator: Stian Berg <mail.to.stian@gmail.com>\n"
|
||||
"Language-Team: norwegian <no@li.org>\n"
|
||||
"Language: nb\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -288,16 +288,16 @@ msgid "The database name is empty!"
|
||||
msgstr "Databasen er uten navn!"
|
||||
|
||||
#: db_operations.php:327
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Database %s has been renamed to %s"
|
||||
msgid "Database %1$s has been renamed to %2$s"
|
||||
msgstr "Databasen %s har endret navn til %s"
|
||||
msgstr "Databasen %1$s har endret navn til %2$s"
|
||||
|
||||
#: db_operations.php:331
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Database %s has been copied to %s"
|
||||
msgid "Database %1$s has been copied to %2$s"
|
||||
msgstr "Databasen %s har blitt kopiert til %s"
|
||||
msgstr "Databasen %1$s har blitt kopiert til %2$s"
|
||||
|
||||
#: db_operations.php:465
|
||||
msgid "Rename database to"
|
||||
@ -920,10 +920,10 @@ msgid "\"DROP DATABASE\" statements are disabled."
|
||||
msgstr "\"DROP DATABASE\"-uttrykk er avslått."
|
||||
|
||||
#: js/messages.php:30
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Do you really want to "
|
||||
msgid "Do you really want to execute \"%s\"?"
|
||||
msgstr "Vil du virkelig "
|
||||
msgstr "Vil du virkelig utføre \"%s\"?"
|
||||
|
||||
#: js/messages.php:31 libraries/mult_submits.inc.php:307 sql.php:418
|
||||
msgid "You are about to DESTROY a complete database!"
|
||||
@ -1468,10 +1468,9 @@ msgid "Total time:"
|
||||
msgstr "Total tid:"
|
||||
|
||||
#: js/messages.php:188
|
||||
#, fuzzy
|
||||
#| msgid "Profiling"
|
||||
msgid "Profiling results"
|
||||
msgstr "Profiliserer resultater"
|
||||
msgstr "Profileringsresultater"
|
||||
|
||||
#: js/messages.php:189
|
||||
msgctxt "Display format"
|
||||
@ -1681,22 +1680,19 @@ msgid "Show indexes"
|
||||
msgstr "Vis indekser"
|
||||
|
||||
#: js/messages.php:257 libraries/mult_submits.inc.php:317
|
||||
#, fuzzy
|
||||
#| msgid "Disable foreign key checks"
|
||||
msgid "Foreign key check:"
|
||||
msgstr "Slå av kontroll av fremmednøkler"
|
||||
msgstr "Kontroll av fremmednøkler:"
|
||||
|
||||
#: js/messages.php:258 libraries/mult_submits.inc.php:321
|
||||
#, fuzzy
|
||||
#| msgid "Enabled"
|
||||
msgid "(Enabled)"
|
||||
msgstr "Påslått"
|
||||
msgstr "(Aktivert)"
|
||||
|
||||
#: js/messages.php:259 libraries/mult_submits.inc.php:321
|
||||
#, fuzzy
|
||||
#| msgid "Disabled"
|
||||
msgid "(Disabled)"
|
||||
msgstr "Avslått"
|
||||
msgstr "(Deaktivert)"
|
||||
|
||||
#: js/messages.php:262
|
||||
msgid "Searching"
|
||||
@ -1908,7 +1904,7 @@ msgstr "Klikk for å markere/ta vekk markering"
|
||||
|
||||
#: js/messages.php:352
|
||||
msgid "Double-click to copy column name"
|
||||
msgstr ""
|
||||
msgstr "Dobbelklikk for å kopiere kolonnenavn"
|
||||
|
||||
#: js/messages.php:353
|
||||
msgid "Click the drop-down arrow<br />to toggle column's visibility"
|
||||
@ -1932,20 +1928,18 @@ msgid "Go to link"
|
||||
msgstr "Gå til link"
|
||||
|
||||
#: js/messages.php:358
|
||||
#, fuzzy
|
||||
#| msgid "Column names"
|
||||
msgid "Copy column name"
|
||||
msgstr "Kolonnenavn"
|
||||
msgstr "Kopier kolonnenavn"
|
||||
|
||||
#: js/messages.php:359
|
||||
msgid "Right-click the column name to copy it to your clipboard."
|
||||
msgstr ""
|
||||
msgstr "Høyreklikk på kolonnenavnet for å kopiere det til utklippstavlen."
|
||||
|
||||
#: js/messages.php:360
|
||||
#, fuzzy
|
||||
#| msgid "Update row(s)"
|
||||
msgid "Show data row(s)"
|
||||
msgstr "Oppdater rad(er)"
|
||||
msgstr "Vis datarad(er)"
|
||||
|
||||
#: js/messages.php:363
|
||||
msgid "Generate password"
|
||||
@ -2239,7 +2233,7 @@ msgstr "Sekund"
|
||||
#: libraries/Advisor.class.php:67
|
||||
#, php-format
|
||||
msgid "PHP threw following error: %s"
|
||||
msgstr ""
|
||||
msgstr "PHP kastet følgende feil: %s"
|
||||
|
||||
#: libraries/Advisor.class.php:89
|
||||
#, php-format
|
||||
@ -2249,17 +2243,17 @@ msgstr ""
|
||||
#: libraries/Advisor.class.php:106
|
||||
#, php-format
|
||||
msgid "Failed calculating value for rule '%s'"
|
||||
msgstr ""
|
||||
msgstr "Feil ved kalkulering av verdi for regel \"%s\""
|
||||
|
||||
#: libraries/Advisor.class.php:125
|
||||
#, php-format
|
||||
msgid "Failed running test for rule '%s'"
|
||||
msgstr ""
|
||||
msgstr "Feil ved kjøring av test for regel \"%s\""
|
||||
|
||||
#: libraries/Advisor.class.php:207
|
||||
#, php-format
|
||||
msgid "Failed formatting string for rule '%s'."
|
||||
msgstr ""
|
||||
msgstr "Feil ved formattering av streng for regel \"%s\"."
|
||||
|
||||
#: libraries/Advisor.class.php:361
|
||||
#, php-format
|
||||
@ -2268,20 +2262,20 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: libraries/Advisor.class.php:378
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Invalid format of CSV input on line %d."
|
||||
msgid "Invalid rule declaration on line %s"
|
||||
msgstr "Ugyldig format i CSV importen i linje %d."
|
||||
msgstr "Ugyldig deklarasjon av regel på linje %s"
|
||||
|
||||
#: libraries/Advisor.class.php:386
|
||||
#, php-format
|
||||
msgid "Unexpected characters on line %s"
|
||||
msgstr ""
|
||||
msgstr "Uventede karakterer på linje %s"
|
||||
|
||||
#: libraries/Advisor.class.php:400
|
||||
#, php-format
|
||||
msgid "Unexpected character on line %1$s. Expected tab, but found \"%2$s\""
|
||||
msgstr ""
|
||||
msgstr "Uventet karakter på linje %1$s. Forventet \"tab\", men fant \"%2$s\""
|
||||
|
||||
#: libraries/Advisor.class.php:425 server_status.php:972
|
||||
msgid "per second"
|
||||
@ -2658,13 +2652,13 @@ msgstr[0] "<b>Totalt:</b> <i>%s</i> treff"
|
||||
msgstr[1] "<b>Totalt:</b> <i>%s</i> treff"
|
||||
|
||||
#: libraries/DbSearch.class.php:351
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "%s match inside table <i>%s</i>"
|
||||
#| msgid_plural "%s matches inside table <i>%s</i>"
|
||||
msgid "%1$s match in <strong>%2$s</strong>"
|
||||
msgid_plural "%1$s matches in <strong>%2$s</strong>"
|
||||
msgstr[0] "%s treff i tabell <i>%s</i>"
|
||||
msgstr[1] "%s treff i tabell <i>%s</i>"
|
||||
msgstr[0] "%1$s treff i <strong>%2$s</strong>"
|
||||
msgstr[1] "%1$s treff i <strong>%2$s</strong>"
|
||||
|
||||
#: libraries/DbSearch.class.php:373
|
||||
#, php-format
|
||||
@ -2708,34 +2702,29 @@ msgid "Inside column:"
|
||||
msgstr "I kolonne:"
|
||||
|
||||
#: libraries/DisplayResults.class.php:683
|
||||
#, fuzzy
|
||||
#| msgid "Save directory"
|
||||
msgid "Save edited data"
|
||||
msgstr "Lagringsmappe"
|
||||
msgstr "Lagre redigerte data"
|
||||
|
||||
#: libraries/DisplayResults.class.php:689
|
||||
#, fuzzy
|
||||
#| msgid "CHAR textarea columns"
|
||||
msgid "Restore column order"
|
||||
msgstr "CHAR textarea kolonner"
|
||||
msgstr "Tilbakestill kolonnerekkefølge"
|
||||
|
||||
#: libraries/DisplayResults.class.php:889
|
||||
#, fuzzy
|
||||
#| msgid "CHAR textarea rows"
|
||||
msgid "Start row"
|
||||
msgstr "CHAR textarea rader"
|
||||
msgstr "Startrad"
|
||||
|
||||
#: libraries/DisplayResults.class.php:893
|
||||
#, fuzzy
|
||||
#| msgid "Number of rows:"
|
||||
msgid "Number of rows"
|
||||
msgstr "Antall rader:"
|
||||
msgstr "Antall rader"
|
||||
|
||||
#: libraries/DisplayResults.class.php:902
|
||||
#, fuzzy
|
||||
#| msgid "More"
|
||||
msgid "Mode"
|
||||
msgstr "Mer"
|
||||
msgstr "Modus"
|
||||
|
||||
#: libraries/DisplayResults.class.php:904
|
||||
msgid "horizontal"
|
||||
@ -2752,7 +2741,7 @@ msgstr "loddrett"
|
||||
#: libraries/DisplayResults.class.php:918
|
||||
#, php-format
|
||||
msgid "Headers every %s rows"
|
||||
msgstr ""
|
||||
msgstr "Topptekst hver %s. rad"
|
||||
|
||||
#: libraries/DisplayResults.class.php:1214
|
||||
msgid "Sort by key"
|
||||
@ -2789,10 +2778,9 @@ msgstr "Innstillinger"
|
||||
|
||||
#: libraries/DisplayResults.class.php:1567
|
||||
#: libraries/DisplayResults.class.php:1673
|
||||
#, fuzzy
|
||||
#| msgid "Partial Texts"
|
||||
msgid "Partial texts"
|
||||
msgstr "Delvis tekst"
|
||||
msgstr "Delvise tekster"
|
||||
|
||||
#: libraries/DisplayResults.class.php:1568
|
||||
#: libraries/DisplayResults.class.php:1677
|
||||
@ -2826,15 +2814,15 @@ msgstr "Vis binært innhold som HEX"
|
||||
#, fuzzy
|
||||
#| msgid "Browser transformation"
|
||||
msgid "Hide browser transformation"
|
||||
msgstr "Nettvisertransformasjon"
|
||||
msgstr "Skjul nettlesertransformasjon"
|
||||
|
||||
#: libraries/DisplayResults.class.php:1625
|
||||
msgid "Well Known Text"
|
||||
msgstr ""
|
||||
msgstr "Velkjent Tekst"
|
||||
|
||||
#: libraries/DisplayResults.class.php:1626
|
||||
msgid "Well Known Binary"
|
||||
msgstr ""
|
||||
msgstr "Velkjent Binær"
|
||||
|
||||
#: libraries/DisplayResults.class.php:3157
|
||||
#: libraries/DisplayResults.class.php:3173
|
||||
@ -2878,20 +2866,18 @@ msgid "Print view (with full texts)"
|
||||
msgstr "Forhåndsvisning (med all tekst)"
|
||||
|
||||
#: libraries/DisplayResults.class.php:5084 tbl_chart.php:80
|
||||
#, fuzzy
|
||||
#| msgid "Display PDF schema"
|
||||
msgid "Display chart"
|
||||
msgstr "Vis PDF-skjema"
|
||||
msgstr "Vis diagram"
|
||||
|
||||
#: libraries/DisplayResults.class.php:5109
|
||||
msgid "Visualize GIS data"
|
||||
msgstr ""
|
||||
msgstr "Visualiser GIS data"
|
||||
|
||||
#: libraries/DisplayResults.class.php:5142 view_create.php:122
|
||||
#, fuzzy
|
||||
#| msgid "Create User"
|
||||
msgid "Create view"
|
||||
msgstr "Opprett bruker"
|
||||
msgstr "Opprett view"
|
||||
|
||||
#: libraries/DisplayResults.class.php:5335
|
||||
msgid "Link not found"
|
||||
@ -2966,10 +2952,9 @@ msgstr "Cookies må være slått på forbi dette punkt."
|
||||
|
||||
#: libraries/Header.class.php:500
|
||||
#: libraries/plugins/auth/AuthenticationCookie.class.php:152
|
||||
#, fuzzy
|
||||
#| msgid "Cookies must be enabled past this point."
|
||||
msgid "Javascript must be enabled past this point"
|
||||
msgstr "Cookies må være slått på forbi dette punkt."
|
||||
msgstr "JavaScript må være slått på forbi dette punktet"
|
||||
|
||||
#: libraries/Index.class.php:433 tbl_relation.php:540
|
||||
msgid "No index defined!"
|
||||
@ -3080,10 +3065,9 @@ msgid "Designer"
|
||||
msgstr "Designer"
|
||||
|
||||
#: libraries/Menu.class.php:470
|
||||
#, fuzzy
|
||||
#| msgid "User"
|
||||
msgid "Users"
|
||||
msgstr "Bruker"
|
||||
msgstr "Brukere"
|
||||
|
||||
#: libraries/Menu.class.php:491 server_synchronize.php:1320
|
||||
#: server_synchronize.php:1327
|
||||
@ -3105,7 +3089,7 @@ msgstr "Tegnsett"
|
||||
|
||||
#: libraries/Menu.class.php:516 server_plugins.php:33 server_plugins.php:66
|
||||
msgid "Plugins"
|
||||
msgstr ""
|
||||
msgstr "Programtillegg"
|
||||
|
||||
#: libraries/Menu.class.php:520
|
||||
msgid "Engines"
|
||||
@ -3174,16 +3158,16 @@ msgid "unknown table status: "
|
||||
msgstr "ukjent tabellstatus: "
|
||||
|
||||
#: libraries/Table.class.php:757
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Source database"
|
||||
msgid "Source database `%s` was not found!"
|
||||
msgstr "Kildedatabase"
|
||||
msgstr "Kildedatabasen \"%s\" ble ikke funnet!"
|
||||
|
||||
#: libraries/Table.class.php:765
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Theme %s not found!"
|
||||
msgid "Target database `%s` was not found!"
|
||||
msgstr "Stilen %s ble ikke funnet!"
|
||||
msgstr "Måldatabasen %s ble ikke funnet!"
|
||||
|
||||
#: libraries/Table.class.php:1192
|
||||
msgid "Invalid database"
|
||||
@ -3199,14 +3183,14 @@ msgid "Error renaming table %1$s to %2$s"
|
||||
msgstr "Feil oppstond med endring av tabellnavn fra %1$s til %2$s"
|
||||
|
||||
#: libraries/Table.class.php:1257
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Table %s has been renamed to %s"
|
||||
msgid "Table %1$s has been renamed to %2$s."
|
||||
msgstr "Tabellen %s har fått nytt navn %s"
|
||||
msgstr "Tabellen %1$s har endret navn til %2$s."
|
||||
|
||||
#: libraries/Table.class.php:1401
|
||||
msgid "Could not save table UI preferences"
|
||||
msgstr ""
|
||||
msgstr "Kunne ikke lagre preferanser for tabellgrensesnitt"
|
||||
|
||||
#: libraries/Table.class.php:1425
|
||||
#, php-format
|
||||
@ -3214,6 +3198,8 @@ msgid ""
|
||||
"Failed to cleanup table UI preferences (see $cfg['Servers'][$i]"
|
||||
"['MaxTableUiprefs'] %s)"
|
||||
msgstr ""
|
||||
"Feil ved opprydning av preferansene for tabellgrensesnitt (se "
|
||||
"$cfg['Servers'][$i]['MaxTableUiprefs'] %s)"
|
||||
|
||||
#: libraries/Table.class.php:1563
|
||||
#, php-format
|
||||
@ -3243,16 +3229,14 @@ msgid "Value"
|
||||
msgstr "Verdi"
|
||||
|
||||
#: libraries/TableSearch.class.php:218
|
||||
#, fuzzy
|
||||
#| msgid "Search"
|
||||
msgid "Table Search"
|
||||
msgstr "Søk"
|
||||
msgstr "Tabellsøk"
|
||||
|
||||
#: libraries/TableSearch.class.php:247 libraries/insert_edit.lib.php:1373
|
||||
#, fuzzy
|
||||
#| msgid "Insert"
|
||||
msgid "Edit/Insert"
|
||||
msgstr "Sett inn"
|
||||
msgstr "Rediger/Sett inn"
|
||||
|
||||
#: libraries/TableSearch.class.php:778
|
||||
msgid "Select columns (at least one):"
|
||||
@ -3286,16 +3270,16 @@ msgid "Browse foreign values"
|
||||
msgstr "Se de eksterne verdiene"
|
||||
|
||||
#: libraries/TableSearch.class.php:994
|
||||
#, fuzzy
|
||||
#| msgid "Hide search criteria"
|
||||
msgid "Additional search criteria"
|
||||
msgstr "Skjul søkekriterier"
|
||||
msgstr "Ytterligere søkekriterier"
|
||||
|
||||
#: libraries/TableSearch.class.php:1134
|
||||
#, fuzzy
|
||||
#| msgid "Do a \"query by example\" (wildcard: \"%\")"
|
||||
msgid "Do a \"query by example\" (wildcard: \"%\") for two different columns"
|
||||
msgstr "Utfør en \"spørring ved eksempel\" (jokertegn: \"%\")"
|
||||
msgstr ""
|
||||
"Utfør en \"spørring ved eksempel\" (jokertegn: \"%\") for to forskjellige "
|
||||
"kolonner"
|
||||
|
||||
#: libraries/TableSearch.class.php:1138
|
||||
msgid "Do a \"query by example\" (wildcard: \"%\")"
|
||||
@ -3306,16 +3290,14 @@ msgid "Browse/Edit the points"
|
||||
msgstr ""
|
||||
|
||||
#: libraries/TableSearch.class.php:1205
|
||||
#, fuzzy
|
||||
#| msgid "Control user"
|
||||
msgid "How to use"
|
||||
msgstr "Kontrollbruker"
|
||||
msgstr "Bruksforklaring"
|
||||
|
||||
#: libraries/TableSearch.class.php:1210
|
||||
#, fuzzy
|
||||
#| msgid "Reset"
|
||||
msgid "Reset zoom"
|
||||
msgstr "Tilbakestill"
|
||||
msgstr "Tilbakestill zoom"
|
||||
|
||||
#: libraries/Theme.class.php:169
|
||||
#, php-format
|
||||
@ -3437,10 +3419,10 @@ msgid ""
|
||||
msgstr ""
|
||||
|
||||
#: libraries/Types.class.php:325 libraries/Types.class.php:727
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Error renaming table %1$s to %2$s"
|
||||
msgid "A time, range is %1$s to %2$s"
|
||||
msgstr "Feil oppstond med endring av tabellnavn fra %1$s til %2$s"
|
||||
msgstr "Et klokkeslett, rekkevidde er %1$s til %2$s"
|
||||
|
||||
#: libraries/Types.class.php:327
|
||||
msgid ""
|
||||
@ -3545,14 +3527,13 @@ msgid "A curve with linear interpolation between points"
|
||||
msgstr ""
|
||||
|
||||
#: libraries/Types.class.php:363
|
||||
#, fuzzy
|
||||
#| msgid "Add a polygon"
|
||||
msgid "A polygon"
|
||||
msgstr "Legg til polygon"
|
||||
msgstr "En polygon"
|
||||
|
||||
#: libraries/Types.class.php:365
|
||||
msgid "A collection of points"
|
||||
msgstr ""
|
||||
msgstr "En samling av punkter"
|
||||
|
||||
#: libraries/Types.class.php:367
|
||||
msgid "A collection of curves with linear interpolation between points"
|
||||
@ -3560,23 +3541,22 @@ msgstr ""
|
||||
|
||||
#: libraries/Types.class.php:369
|
||||
msgid "A collection of polygons"
|
||||
msgstr ""
|
||||
msgstr "En samling av polygoner"
|
||||
|
||||
#: libraries/Types.class.php:371
|
||||
msgid "A collection of geometry objects of any type"
|
||||
msgstr ""
|
||||
msgstr "En samling av geometriobjekter av enhver type"
|
||||
|
||||
#: libraries/Types.class.php:623 libraries/Types.class.php:973
|
||||
msgctxt "numeric types"
|
||||
msgid "Numeric"
|
||||
msgstr ""
|
||||
msgstr "Numerisk"
|
||||
|
||||
#: libraries/Types.class.php:642 libraries/Types.class.php:976
|
||||
#, fuzzy
|
||||
#| msgid "Create an index"
|
||||
msgctxt "date and time types"
|
||||
msgid "Date and time"
|
||||
msgstr "Lag en ny indeks"
|
||||
msgstr "Dato og tid"
|
||||
|
||||
#: libraries/Types.class.php:651 libraries/Types.class.php:979
|
||||
#, fuzzy
|
||||
@ -3608,15 +3588,15 @@ msgstr ""
|
||||
|
||||
#: libraries/Types.class.php:715
|
||||
msgid "True or false"
|
||||
msgstr ""
|
||||
msgstr "True eller false"
|
||||
|
||||
#: libraries/Types.class.php:717
|
||||
msgid "An alias for BIGINT NOT NULL AUTO_INCREMENT UNIQUE"
|
||||
msgstr ""
|
||||
msgstr "Et alias for BIGINT NOT NULL AUTO_INCREMENT UNIQUE"
|
||||
|
||||
#: libraries/Types.class.php:719
|
||||
msgid "Stores a Universally Unique Identifier (UUID)"
|
||||
msgstr ""
|
||||
msgstr "Lagrer en Universally Unique Identifier (UUID)"
|
||||
|
||||
#: libraries/Types.class.php:725
|
||||
msgid ""
|
||||
@ -3708,7 +3688,6 @@ msgid "Could not load default configuration from: %1$s"
|
||||
msgstr "Kunne ikke laste standard konfigurasjonsfil fra: %1$s"
|
||||
|
||||
#: libraries/common.inc.php:588
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "The <code>$cfg['PmaAbsoluteUri']</code> directive MUST be set in your "
|
||||
#| "configuration file!"
|
||||
@ -3716,7 +3695,7 @@ msgid ""
|
||||
"The [code]$cfg['PmaAbsoluteUri'][/code] directive MUST be set in your "
|
||||
"configuration file!"
|
||||
msgstr ""
|
||||
"<code>$cfg['PmaAbsoluteUri']</code> variabelen MÅ være innstilt i din "
|
||||
"[code]$cfg['PmaAbsoluteUri'][/code] variabelen MÅ være innstilt i din "
|
||||
"konfigurasjonsfil!"
|
||||
|
||||
#: libraries/common.inc.php:621
|
||||
@ -3748,7 +3727,7 @@ msgstr "mulig sikkerhetshull"
|
||||
|
||||
#: libraries/common.inc.php:1092
|
||||
msgid "numeric key detected"
|
||||
msgstr ""
|
||||
msgstr "numerisk nøkkel oppdaget"
|
||||
|
||||
#: libraries/config.values.php:53 libraries/config.values.php:60
|
||||
#: libraries/config.values.php:68
|
||||
@ -4033,7 +4012,7 @@ msgstr ""
|
||||
|
||||
#: libraries/config/messages.inc.php:35
|
||||
msgid "Enable CodeMirror"
|
||||
msgstr ""
|
||||
msgstr "Aktiver CodeMirror"
|
||||
|
||||
#: libraries/config/messages.inc.php:36
|
||||
msgid ""
|
||||
@ -4175,6 +4154,8 @@ msgid ""
|
||||
"Disable the table maintenance mass operations, like optimizing or repairing "
|
||||
"the selected tables of a database."
|
||||
msgstr ""
|
||||
"Deaktiver masseoperasjoner for tabellvedlikehold, som optimalisering eller "
|
||||
"reparasjon av de valgte tabellene til en database."
|
||||
|
||||
#: libraries/config/messages.inc.php:67
|
||||
msgid "Disable multi table maintenance"
|
||||
@ -4635,7 +4616,6 @@ msgid "Configuration storage"
|
||||
msgstr "Konfigurasjonslager"
|
||||
|
||||
#: libraries/config/messages.inc.php:209
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "ure phpMyAdmin database to gain access to additional features, see "
|
||||
#| "Documentation.html#linked-tables]linked-tables infrastructure[/a] "
|
||||
@ -4645,22 +4625,22 @@ msgid ""
|
||||
"features, see [a@Documentation.html#linked-tables]phpMyAdmin configuration "
|
||||
"storage[/a] in documentation"
|
||||
msgstr ""
|
||||
"Konfigurer phpMyAdmin databasen for å få tilgang til ekstra egenskaper, se "
|
||||
"[a@../Documentation.html#linked-tables]lenkede-tabeller infrastruktur[/a] i "
|
||||
"dokumentasjonen"
|
||||
"Sett opp phpMyAdmin konfigurasjonslager for å få tilgang til ekstra "
|
||||
"funksjonalitet, se [a@../Documentation.html#linked-tables]phpMyAdming "
|
||||
"konfigurasjonslager[/a] i dokumentasjonen"
|
||||
|
||||
#: libraries/config/messages.inc.php:210
|
||||
msgid "Changes tracking"
|
||||
msgstr "Endringssporing"
|
||||
|
||||
#: libraries/config/messages.inc.php:211
|
||||
#, fuzzy
|
||||
#| msgid "ng of changes made in database. Requires configured PMA database."
|
||||
msgid ""
|
||||
"Tracking of changes made in database. Requires the phpMyAdmin configuration "
|
||||
"storage."
|
||||
msgstr ""
|
||||
"Sporing av endringer utført i databasen. PMA database må være konfigurert."
|
||||
"Sporing av endringer utført i databasen. Krever at phpMyAdming "
|
||||
"konfigurasjonslager er satt opp."
|
||||
|
||||
#: libraries/config/messages.inc.php:212
|
||||
msgid "Customize export options"
|
||||
@ -4721,20 +4701,18 @@ msgid "Customize startup page"
|
||||
msgstr "Endre oppstartssiden"
|
||||
|
||||
#: libraries/config/messages.inc.php:228
|
||||
#, fuzzy
|
||||
#| msgid "Database for user"
|
||||
msgid "Database structure"
|
||||
msgstr "Brukerdatabase"
|
||||
msgstr "Databasestruktur"
|
||||
|
||||
#: libraries/config/messages.inc.php:229
|
||||
msgid "Choose which details to show in the database structure (list of tables)"
|
||||
msgstr ""
|
||||
|
||||
#: libraries/config/messages.inc.php:230
|
||||
#, fuzzy
|
||||
#| msgid "Database for user"
|
||||
msgid "Table structure"
|
||||
msgstr "Brukerdatabase"
|
||||
msgstr "Tabellstruktur"
|
||||
|
||||
#: libraries/config/messages.inc.php:231
|
||||
msgid "Settings for the table structure (list of columns)"
|
||||
@ -4982,10 +4960,9 @@ msgid "Enable highlighting"
|
||||
msgstr "Aktiver utheving"
|
||||
|
||||
#: libraries/config/messages.inc.php:297
|
||||
#, fuzzy
|
||||
#| msgid "Maximum number of tables displayed in table list"
|
||||
msgid "Maximum number of recently used tables; set 0 to disable"
|
||||
msgstr "Maks antall tabeller vist i tabellista"
|
||||
msgstr "Maksimalt antall nylig brukte tabeller; sett til 0 for å deaktivere"
|
||||
|
||||
#: libraries/config/messages.inc.php:298
|
||||
msgid "Recently used tables"
|
||||
@ -5185,6 +5162,8 @@ msgid ""
|
||||
"Structure page if any of the required tables for the phpMyAdmin "
|
||||
"configuration storage could not be found"
|
||||
msgstr ""
|
||||
"Deaktiver varselet som vises på databasedetaljsiden Struktur om det er noen "
|
||||
"påkrevde tabeller for phpMyAdmins konfigurasjonslager som ikke ble funnet"
|
||||
|
||||
#: libraries/config/messages.inc.php:338
|
||||
msgid "Missing phpMyAdmin configuration storage tables"
|
||||
@ -5240,10 +5219,9 @@ msgid "Query window height"
|
||||
msgstr "Høyde på spørringsvindu"
|
||||
|
||||
#: libraries/config/messages.inc.php:352
|
||||
#, fuzzy
|
||||
#| msgid "Query window"
|
||||
msgid "Query window width (in pixels)"
|
||||
msgstr "Spørringsvindu"
|
||||
msgstr "Bredde på spørringsvindu (i piksler)"
|
||||
|
||||
#: libraries/config/messages.inc.php:353
|
||||
msgid "Query window width"
|
||||
@ -5261,16 +5239,16 @@ msgstr "Rekodingsmotor"
|
||||
#: libraries/config/messages.inc.php:356
|
||||
msgid "When browsing tables, the sorting of each table is remembered"
|
||||
msgstr ""
|
||||
"Ved visning av tabeller vil sorteringen av hver enkelt tabell bli husket"
|
||||
|
||||
#: libraries/config/messages.inc.php:357
|
||||
#, fuzzy
|
||||
#| msgid "Rename table to"
|
||||
msgid "Remember table's sorting"
|
||||
msgstr "Endre tabellens navn"
|
||||
msgstr "Husk tabellens sortering"
|
||||
|
||||
#: libraries/config/messages.inc.php:358
|
||||
msgid "Repeat the headers every X cells, [kbd]0[/kbd] deactivates this feature"
|
||||
msgstr ""
|
||||
msgstr "Gjenta topptekst hver n. rad; [kbd]0[/kbd] deaktiverer funksjonen"
|
||||
|
||||
#: libraries/config/messages.inc.php:359
|
||||
msgid "Repeat headers"
|
||||
@ -5278,7 +5256,7 @@ msgstr "Gjenta topptekst"
|
||||
|
||||
#: libraries/config/messages.inc.php:361
|
||||
msgid "Save all edited cells at once"
|
||||
msgstr ""
|
||||
msgstr "Ikke lagre endrede celler umiddelbart"
|
||||
|
||||
#: libraries/config/messages.inc.php:362
|
||||
msgid "Directory where exports can be saved on server"
|
||||
@ -5293,20 +5271,18 @@ msgid "Leave blank if not used"
|
||||
msgstr "La stå tom hvis ikke brukt"
|
||||
|
||||
#: libraries/config/messages.inc.php:365
|
||||
#, fuzzy
|
||||
#| msgid "Host authentication order"
|
||||
msgid "Host authorization order"
|
||||
msgstr "Rekkefølge for vertsautentisering"
|
||||
msgstr "Rekkefølge for vertsautorisering"
|
||||
|
||||
#: libraries/config/messages.inc.php:366
|
||||
msgid "Leave blank for defaults"
|
||||
msgstr "La stå tom for standard"
|
||||
|
||||
#: libraries/config/messages.inc.php:367
|
||||
#, fuzzy
|
||||
#| msgid "Host authentication rules"
|
||||
msgid "Host authorization rules"
|
||||
msgstr "Vertsautentiseringsregler"
|
||||
msgstr "Regler for vertsautorisering"
|
||||
|
||||
#: libraries/config/messages.inc.php:368
|
||||
msgid "Allow logins without a password"
|
||||
@ -5407,6 +5383,8 @@ msgid ""
|
||||
"An alternate host to hold the configuration storage; leave blank to use the "
|
||||
"already defined host"
|
||||
msgstr ""
|
||||
"En alternativ vert til å holde konfigurasjonslageret; la være tom for å "
|
||||
"bruke den allerede definerte verten"
|
||||
|
||||
#: libraries/config/messages.inc.php:388
|
||||
#, fuzzy
|
||||
@ -5574,10 +5552,9 @@ msgstr ""
|
||||
"La stå tom for ingen SQL spørringshistorie, anbefalt: [kbd]pma_tracking[/kbd]"
|
||||
|
||||
#: libraries/config/messages.inc.php:419
|
||||
#, fuzzy
|
||||
#| msgid "Recall user name"
|
||||
msgid "Recently used table"
|
||||
msgstr "Husk brukernavn"
|
||||
msgstr "Nylig brukt tabell"
|
||||
|
||||
#: libraries/config/messages.inc.php:420
|
||||
msgid ""
|
||||
@ -5858,10 +5835,9 @@ msgid "Whether to show hint or not"
|
||||
msgstr ""
|
||||
|
||||
#: libraries/config/messages.inc.php:473
|
||||
#, fuzzy
|
||||
#| msgid "Show grid"
|
||||
msgid "Show hint"
|
||||
msgstr "Vis rutenett"
|
||||
msgstr "Vis hint"
|
||||
|
||||
#: libraries/config/messages.inc.php:474
|
||||
msgid ""
|
||||
@ -6116,10 +6092,9 @@ msgid "Cookie authentication"
|
||||
msgstr "Autentisering informasjonskapsler"
|
||||
|
||||
#: libraries/config/setup.forms.php:48
|
||||
#, fuzzy
|
||||
#| msgid "Host authentication order"
|
||||
msgid "HTTP authentication"
|
||||
msgstr "Rekkefølge for vertsautentisering"
|
||||
msgstr "HTTP autentisering"
|
||||
|
||||
#: libraries/config/setup.forms.php:51
|
||||
#, fuzzy
|
||||
@ -6143,7 +6118,7 @@ msgstr "Open Document regneark"
|
||||
#: libraries/config/setup.forms.php:266
|
||||
#: libraries/config/user_preferences.forms.php:168
|
||||
msgid "Quick"
|
||||
msgstr ""
|
||||
msgstr "Rask"
|
||||
|
||||
#: libraries/config/setup.forms.php:270
|
||||
#: libraries/config/user_preferences.forms.php:172
|
||||
@ -6175,10 +6150,9 @@ msgid "Could not initialize Drizzle connection library"
|
||||
msgstr ""
|
||||
|
||||
#: libraries/config/validate.lib.php:221 libraries/config/validate.lib.php:229
|
||||
#, fuzzy
|
||||
#| msgid "Could not connect to MySQL server"
|
||||
msgid "Could not connect to Drizzle server"
|
||||
msgstr "Kunne ikke koble til MySQL tjener"
|
||||
msgstr "Kunne ikke koble til Drizzle tjener"
|
||||
|
||||
#: libraries/config/validate.lib.php:240 libraries/config/validate.lib.php:247
|
||||
msgid "Could not connect to MySQL server"
|
||||
@ -6225,18 +6199,18 @@ msgid "possible deep recursion attack"
|
||||
msgstr ""
|
||||
|
||||
#: libraries/database_interface.lib.php:1989
|
||||
#, fuzzy
|
||||
#| msgid " the local MySQL server's socket is not correctly configured)"
|
||||
msgid ""
|
||||
"The server is not responding (or the local server's socket is not correctly "
|
||||
"configured)."
|
||||
msgstr "(eller den lokale MySQL tjenerens sokkel er ikke korrekt konfigurert)"
|
||||
msgstr ""
|
||||
"Tjeneren svarer ikke (eller den lokale MySQL tjenerens sokkel er ikke "
|
||||
"korrekt konfigurert)."
|
||||
|
||||
#: libraries/database_interface.lib.php:1992
|
||||
#, fuzzy
|
||||
#| msgid "The server is not responding"
|
||||
msgid "The server is not responding."
|
||||
msgstr "Tjeneren svarer ikke"
|
||||
msgstr "Tjeneren svarer ikke."
|
||||
|
||||
#: libraries/database_interface.lib.php:1997
|
||||
msgid "Please check privileges of directory containing database."
|
||||
@ -6280,7 +6254,6 @@ msgstr "MySQL 4.0 kompatibel"
|
||||
|
||||
#: libraries/display_create_database.lib.php:21
|
||||
#: libraries/display_create_database.lib.php:39
|
||||
#, fuzzy
|
||||
#| msgid "Create new database"
|
||||
msgid "Create database"
|
||||
msgstr "Opprett ny database"
|
||||
@ -6375,7 +6348,7 @@ msgstr "Dump alle rader"
|
||||
|
||||
#: libraries/display_export.lib.php:189 libraries/display_export.lib.php:210
|
||||
msgid "Output:"
|
||||
msgstr ""
|
||||
msgstr "Utskrift:"
|
||||
|
||||
#: libraries/display_export.lib.php:196 libraries/display_export.lib.php:222
|
||||
#, php-format
|
||||
@ -6435,10 +6408,9 @@ msgid "zipped"
|
||||
msgstr "Pakket (zip)"
|
||||
|
||||
#: libraries/display_export.lib.php:337
|
||||
#, fuzzy
|
||||
#| msgid "\"gzipped\""
|
||||
msgid "gzipped"
|
||||
msgstr "Komprimert (gz)"
|
||||
msgstr "gzippet"
|
||||
|
||||
#: libraries/display_export.lib.php:339
|
||||
#, fuzzy
|
||||
@ -6447,17 +6419,15 @@ msgid "bzipped"
|
||||
msgstr "Komprimert (bz2)"
|
||||
|
||||
#: libraries/display_export.lib.php:348
|
||||
#, fuzzy
|
||||
#| msgid "Save as file"
|
||||
msgid "View output as text"
|
||||
msgstr "Lagre som fil"
|
||||
msgstr "Vis utskrift som tekst"
|
||||
|
||||
#: libraries/display_export.lib.php:353 libraries/display_import.lib.php:311
|
||||
#: libraries/plugins/export/ExportCodegen.class.php:106
|
||||
#, fuzzy
|
||||
#| msgid "Format"
|
||||
msgid "Format:"
|
||||
msgstr "Format"
|
||||
msgstr "Format:"
|
||||
|
||||
#: libraries/display_export.lib.php:358
|
||||
msgid "Format-specific options:"
|
||||
@ -6468,12 +6438,13 @@ msgid ""
|
||||
"Scroll down to fill in the options for the selected format and ignore the "
|
||||
"options for other formats."
|
||||
msgstr ""
|
||||
"Bla ned for å fylle ut valgene for det valgte formatet og ignorere valgene "
|
||||
"for andre formater."
|
||||
|
||||
#: libraries/display_export.lib.php:367 libraries/display_import.lib.php:326
|
||||
#, fuzzy
|
||||
#| msgid "Encoding conversion"
|
||||
msgid "Encoding Conversion:"
|
||||
msgstr "Kodingskonvertering"
|
||||
msgstr "Kodingskonvertering:"
|
||||
|
||||
#: libraries/display_git_revision.lib.php:59
|
||||
#, php-format
|
||||
@ -6579,10 +6550,9 @@ msgid "File uploads are not allowed on this server."
|
||||
msgstr "Filopplastinger er ikke tillatt på denne tjeneren."
|
||||
|
||||
#: libraries/display_import.lib.php:275
|
||||
#, fuzzy
|
||||
#| msgid "Partial import"
|
||||
msgid "Partial Import:"
|
||||
msgstr "Delvis importering"
|
||||
msgstr "Delvis importering:"
|
||||
|
||||
#: libraries/display_import.lib.php:281
|
||||
#, php-format
|
||||
@ -6613,7 +6583,7 @@ msgstr "Antall rader å hoppe over, fra første rad:"
|
||||
|
||||
#: libraries/display_import.lib.php:317
|
||||
msgid "Format-Specific Options:"
|
||||
msgstr ""
|
||||
msgstr "Format-spesifikke valg:"
|
||||
|
||||
#: libraries/display_select_lang.lib.php:52
|
||||
#: libraries/display_select_lang.lib.php:53 setup/frames/index.inc.php:75
|
||||
@ -12245,7 +12215,7 @@ msgstr "Navn"
|
||||
#: tbl_addfield.php:190 tbl_alter.php:216 tbl_indexes.php:107
|
||||
#, php-format
|
||||
msgid "Table %1$s has been altered successfully"
|
||||
msgstr "Tabellen %1$s har blitt endrett"
|
||||
msgstr "Tabellen %1$s har blitt endret"
|
||||
|
||||
#: tbl_alter.php:133
|
||||
#, fuzzy
|
||||
|
||||
9
po/ru.po
9
po/ru.po
@ -4,15 +4,15 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
|
||||
"PO-Revision-Date: 2012-06-29 18:49+0200\n"
|
||||
"PO-Revision-Date: 2012-07-27 17:27+0200\n"
|
||||
"Last-Translator: Victor Volkov <hanut@php-myadmin.ru>\n"
|
||||
"Language-Team: russian <ru@li.org>\n"
|
||||
"Language: ru\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
|
||||
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
|
||||
"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
|
||||
"X-Generator: Weblate 1.1\n"
|
||||
|
||||
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:354
|
||||
@ -7711,10 +7711,9 @@ msgstr ""
|
||||
"и полей содержащих специальные символы или зарезервированные слова)</i>"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:354
|
||||
#, fuzzy
|
||||
#| msgid "Object creation options"
|
||||
msgid "Data creation options"
|
||||
msgstr "Параметры создания объектов"
|
||||
msgstr "Параметры создания данных"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:358
|
||||
#: libraries/plugins/export/ExportSql.class.php:1573
|
||||
|
||||
6
po/si.po
6
po/si.po
@ -4,7 +4,7 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
|
||||
"PO-Revision-Date: 2012-06-26 19:00+0200\n"
|
||||
"PO-Revision-Date: 2012-07-28 18:20+0200\n"
|
||||
"Last-Translator: Madhura Jayaratne <madhura.cj@gmail.com>\n"
|
||||
"Language-Team: sinhala <si@li.org>\n"
|
||||
"Language: si\n"
|
||||
@ -12,7 +12,7 @@ msgstr ""
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
|
||||
"X-Generator: Weblate 1.0\n"
|
||||
"X-Generator: Weblate 1.1\n"
|
||||
|
||||
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:354
|
||||
#: libraries/DisplayResults.class.php:794
|
||||
@ -815,7 +815,7 @@ msgid ""
|
||||
"Chose \"GeomFromText\" from the \"Function\" column and paste the below "
|
||||
"string into the \"Value\" field"
|
||||
msgstr ""
|
||||
"\"Function\" තීරුවෙන් \"GeomFromText\" තෝරා පහත ඇති දේ \"Value\" ක්ෂේත්රයට පිටපත් "
|
||||
"\"ශ්රිතය\" තීරුවෙන් \"GeomFromText\" තෝරා පහත ඇති දේ \"අගය\" ක්ෂේත්රයට පිටපත් "
|
||||
"කරන්න"
|
||||
|
||||
#: import.php:94
|
||||
|
||||
9
po/sl.po
9
po/sl.po
@ -4,15 +4,15 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
|
||||
"PO-Revision-Date: 2012-06-29 18:51+0200\n"
|
||||
"PO-Revision-Date: 2012-07-27 12:49+0200\n"
|
||||
"Last-Translator: Domen <dbc334@gmail.com>\n"
|
||||
"Language-Team: slovenian <sl@li.org>\n"
|
||||
"Language: sl\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || n"
|
||||
"%100==4 ? 2 : 3);\n"
|
||||
"Plural-Forms: nplurals=4; plural=(n%100==1 ? 0 : n%100==2 ? 1 : n%100==3 || "
|
||||
"n%100==4 ? 2 : 3);\n"
|
||||
"X-Generator: Weblate 1.1\n"
|
||||
|
||||
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:354
|
||||
@ -7662,10 +7662,9 @@ msgstr ""
|
||||
"tabel, tvorjenih s posebnimi znaki ali ključnimi besedami)</i>"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:354
|
||||
#, fuzzy
|
||||
#| msgid "Object creation options"
|
||||
msgid "Data creation options"
|
||||
msgstr "Možnosti ustvarjanja objektov"
|
||||
msgstr "Možnosti ustvarjanja podatkov"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:358
|
||||
#: libraries/plugins/export/ExportSql.class.php:1573
|
||||
|
||||
5
po/sv.po
5
po/sv.po
@ -4,7 +4,7 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
|
||||
"PO-Revision-Date: 2012-07-01 18:04+0200\n"
|
||||
"PO-Revision-Date: 2012-07-29 13:55+0200\n"
|
||||
"Last-Translator: ProUser <stefan@inkopsforum.se>\n"
|
||||
"Language-Team: swedish <sv@li.org>\n"
|
||||
"Language: sv\n"
|
||||
@ -7627,10 +7627,9 @@ msgstr ""
|
||||
"tabellnamn skapade med specialtecken eller nyckelord)</i>"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:354
|
||||
#, fuzzy
|
||||
#| msgid "Object creation options"
|
||||
msgid "Data creation options"
|
||||
msgstr "Alternativ för skapande av objekt"
|
||||
msgstr "Valmöjligheter vid skapande av data"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:358
|
||||
#: libraries/plugins/export/ExportSql.class.php:1573
|
||||
|
||||
5
po/tr.po
5
po/tr.po
@ -4,7 +4,7 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin 4.0.0-dev\n"
|
||||
"Report-Msgid-Bugs-To: phpmyadmin-devel@lists.sourceforge.net\n"
|
||||
"POT-Creation-Date: 2012-07-27 10:40+0200\n"
|
||||
"PO-Revision-Date: 2012-07-26 02:11+0200\n"
|
||||
"PO-Revision-Date: 2012-07-27 17:50+0200\n"
|
||||
"Last-Translator: Burak Yavuz <hitowerdigit@hotmail.com>\n"
|
||||
"Language-Team: turkish <tr@li.org>\n"
|
||||
"Language: tr\n"
|
||||
@ -7680,10 +7680,9 @@ msgstr ""
|
||||
"kelimelerle şekillendirilmiş sütun ve tablo adlarını korur)</i>"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:354
|
||||
#, fuzzy
|
||||
#| msgid "Object creation options"
|
||||
msgid "Data creation options"
|
||||
msgstr "Nesne oluşturma seçenekleri"
|
||||
msgstr "Veri oluşturma seçenekleri"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:358
|
||||
#: libraries/plugins/export/ExportSql.class.php:1573
|
||||
|
||||
@ -21,7 +21,9 @@ require 'libraries/config/user_preferences.forms.php';
|
||||
PMA_userprefs_pageinit();
|
||||
|
||||
$error = '';
|
||||
if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') == 'text_file') {
|
||||
if (isset($_POST['submit_export'])
|
||||
&& filter_input(INPUT_POST, 'export_type') == 'text_file'
|
||||
) {
|
||||
// export to JSON file
|
||||
PMA_Response::getInstance()->disable();
|
||||
$filename = 'phpMyAdmin-config-' . urlencode(PMA_getenv('HTTP_HOST')) . '.json';
|
||||
@ -78,7 +80,8 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') ==
|
||||
if (! is_array($config)) {
|
||||
$error = __('Could not import configuration');
|
||||
} else {
|
||||
// sanitize input values: treat them as though they came from HTTP POST request
|
||||
// sanitize input values: treat them as though
|
||||
// they came from HTTP POST request
|
||||
$form_display = new FormDisplay();
|
||||
foreach ($forms as $formset_id => $formset) {
|
||||
foreach ($formset as $form_name => $form) {
|
||||
@ -192,7 +195,9 @@ if (isset($_POST['submit_export']) && filter_input(INPUT_POST, 'export_type') ==
|
||||
if ($result === true) {
|
||||
$params = array();
|
||||
if ($_SESSION['PMA_Theme_Manager']->theme->getId() != 'original') {
|
||||
$GLOBALS['PMA_Config']->removeCookie($_SESSION['PMA_Theme_Manager']->getThemeCookieName());
|
||||
$GLOBALS['PMA_Config']->removeCookie(
|
||||
$_SESSION['PMA_Theme_Manager']->getThemeCookieName()
|
||||
);
|
||||
unset($_SESSION['PMA_Theme_Manager']);
|
||||
unset($_SESSION['PMA_Theme']);
|
||||
$params['reload_left_frame'] = true;
|
||||
|
||||
@ -124,14 +124,14 @@ $scripts->addFile('common.js');
|
||||
$scripts->addFile('querywindow.js');
|
||||
|
||||
if (PMA_isValid($_REQUEST['auto_commit'], 'identical', 'true')) {
|
||||
$scripts->addEvent('load','PMA_queryAutoCommit');
|
||||
$scripts->addEvent('load', 'PMA_queryAutoCommit');
|
||||
}
|
||||
if (PMA_isValid($_REQUEST['init'])) {
|
||||
$scripts->addEvent('load','PMA_querywindowResize');
|
||||
$scripts->addEvent('load', 'PMA_querywindowResize');
|
||||
}
|
||||
// always set focus to the textarea
|
||||
if ($querydisplay_tab == 'sql' || $querydisplay_tab == 'full') {
|
||||
$scripts->addEvent('load','PMA_querywindowSetFocus');
|
||||
$scripts->addEvent('load', 'PMA_querywindowSetFocus');
|
||||
}
|
||||
|
||||
echo '<div id="querywindowcontainer">';
|
||||
|
||||
@ -56,7 +56,11 @@ PMA_DBI_select_db($db);
|
||||
|
||||
$path = PMA_securePath(ucfirst($export_type));
|
||||
if (!file_exists('libraries/schema/' . $path . '_Relation_Schema.class.php')) {
|
||||
PMA_Export_Relation_Schema::dieSchema($_POST['chpage'], $export_type, __('File doesn\'t exist'));
|
||||
PMA_Export_Relation_Schema::dieSchema(
|
||||
$_POST['chpage'],
|
||||
$export_type,
|
||||
__('File doesn\'t exist')
|
||||
);
|
||||
}
|
||||
require "libraries/schema/".$path."_Relation_Schema.class.php";
|
||||
$obj_schema = eval("new PMA_".$path."_Relation_Schema();");
|
||||
|
||||
@ -29,7 +29,9 @@ if (! isset($_REQUEST['pos'])) {
|
||||
$pos = (int) $_REQUEST['pos'];
|
||||
}
|
||||
|
||||
if (! isset($_REQUEST['log']) || ! array_key_exists($_REQUEST['log'], $binary_logs)) {
|
||||
if (! isset($_REQUEST['log'])
|
||||
|| ! array_key_exists($_REQUEST['log'], $binary_logs)
|
||||
) {
|
||||
$_REQUEST['log'] = '';
|
||||
} else {
|
||||
$url_params['log'] = $_REQUEST['log'];
|
||||
|
||||
@ -32,7 +32,9 @@ if (!PMA_DBI_get_columns($db, $table)) {
|
||||
}
|
||||
|
||||
/* Grab data */
|
||||
$sql = 'SELECT ' . $common_functions->backquote($transform_key) . ' FROM ' . $common_functions->backquote($table) . ' WHERE ' . $where_clause . ';';
|
||||
$sql = 'SELECT ' . $common_functions->backquote($transform_key)
|
||||
. ' FROM ' . $common_functions->backquote($table)
|
||||
. ' WHERE ' . $where_clause . ';';
|
||||
$result = PMA_DBI_fetch_value($sql);
|
||||
|
||||
/* Check return code */
|
||||
|
||||
@ -90,11 +90,14 @@ if (isset($_REQUEST['saveToFile'])) {
|
||||
exit();
|
||||
}
|
||||
|
||||
$svg_support = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER <= 8) ? false : true;
|
||||
$svg_support = (PMA_USR_BROWSER_AGENT == 'IE' && PMA_USR_BROWSER_VER <= 8)
|
||||
? false : true;
|
||||
$format = $svg_support ? 'svg' : 'png';
|
||||
|
||||
// get the chart and settings after chart generation
|
||||
$visualization = PMA_GIS_visualizationResults($data, $visualizationSettings, $format);
|
||||
$visualization = PMA_GIS_visualizationResults(
|
||||
$data, $visualizationSettings, $format
|
||||
);
|
||||
|
||||
/**
|
||||
* Displays the page
|
||||
|
||||
@ -22,7 +22,7 @@ foreach (PMA_DBI_get_columns_full($db, $table) as $row) {
|
||||
$tmp[2] = substr(
|
||||
preg_replace('@([^,])\'\'@', '\\1\\\'', ',' . $tmp[2]), 1
|
||||
);
|
||||
$fields[$row['Field']] = $tmp[1] . '('
|
||||
$fields[$row['Field']] = $tmp[1] . '('
|
||||
. str_replace(',', ', ', $tmp[2]) . ')';
|
||||
} else {
|
||||
$fields[$row['Field']] = $row['Type'];
|
||||
@ -50,39 +50,41 @@ if (isset($_REQUEST['do_save_data'])) {
|
||||
$error = false;
|
||||
|
||||
// $sql_query is the one displayed in the query box
|
||||
$sql_query = 'ALTER TABLE ' . $common_functions->backquote($db) . '.' . $common_functions->backquote($table);
|
||||
$sql_query = 'ALTER TABLE ' . $common_functions->backquote($db)
|
||||
. '.' . $common_functions->backquote($table);
|
||||
|
||||
// Drops the old index
|
||||
if (! empty($_REQUEST['old_index'])) {
|
||||
if ($_REQUEST['old_index'] == 'PRIMARY') {
|
||||
$sql_query .= ' DROP PRIMARY KEY,';
|
||||
} else {
|
||||
$sql_query .= ' DROP INDEX '
|
||||
$sql_query .= ' DROP INDEX '
|
||||
. $common_functions->backquote($_REQUEST['old_index']) . ',';
|
||||
}
|
||||
} // end if
|
||||
|
||||
// Builds the new one
|
||||
switch ($index->getType()) {
|
||||
case 'PRIMARY':
|
||||
if ($index->getName() == '') {
|
||||
$index->setName('PRIMARY');
|
||||
} elseif ($index->getName() != 'PRIMARY') {
|
||||
$error = PMA_Message::error(__(
|
||||
'The name of the primary key must be "PRIMARY"!'));
|
||||
}
|
||||
$sql_query .= ' ADD PRIMARY KEY';
|
||||
break;
|
||||
case 'FULLTEXT':
|
||||
case 'UNIQUE':
|
||||
case 'INDEX':
|
||||
case 'SPATIAL':
|
||||
if ($index->getName() == 'PRIMARY') {
|
||||
$error = PMA_Message::error(__('Can\'t rename index to PRIMARY!'));
|
||||
}
|
||||
$sql_query .= ' ADD ' . $index->getType() . ' '
|
||||
. ($index->getName() ? $common_functions->backquote($index->getName()) : '');
|
||||
break;
|
||||
case 'PRIMARY':
|
||||
if ($index->getName() == '') {
|
||||
$index->setName('PRIMARY');
|
||||
} elseif ($index->getName() != 'PRIMARY') {
|
||||
$error = PMA_Message::error(
|
||||
__('The name of the primary key must be "PRIMARY"!')
|
||||
);
|
||||
}
|
||||
$sql_query .= ' ADD PRIMARY KEY';
|
||||
break;
|
||||
case 'FULLTEXT':
|
||||
case 'UNIQUE':
|
||||
case 'INDEX':
|
||||
case 'SPATIAL':
|
||||
if ($index->getName() == 'PRIMARY') {
|
||||
$error = PMA_Message::error(__('Can\'t rename index to PRIMARY!'));
|
||||
}
|
||||
$sql_query .= ' ADD ' . $index->getType() . ' '
|
||||
. ($index->getName() ? $common_functions->backquote($index->getName()) : '');
|
||||
break;
|
||||
} // end switch
|
||||
|
||||
$index_fields = array();
|
||||
@ -103,8 +105,9 @@ if (isset($_REQUEST['do_save_data'])) {
|
||||
|
||||
if (! $error) {
|
||||
PMA_DBI_query($sql_query);
|
||||
$message = PMA_Message::success(__(
|
||||
'Table %1$s has been altered successfully'));
|
||||
$message = PMA_Message::success(
|
||||
__('Table %1$s has been altered successfully')
|
||||
);
|
||||
$message->addParam($table);
|
||||
|
||||
if ($GLOBALS['is_ajax_request'] == true) {
|
||||
@ -161,8 +164,8 @@ if (isset($_REQUEST['index']) && is_array($_REQUEST['index'])) {
|
||||
?>
|
||||
|
||||
<form action="tbl_indexes.php" method="post" name="index_frm" id="index_frm" <?php
|
||||
echo ($GLOBALS['cfg']['AjaxEnable']
|
||||
? ' class="ajax"'
|
||||
echo ($GLOBALS['cfg']['AjaxEnable']
|
||||
? ' class="ajax"'
|
||||
: ''); ?>
|
||||
onsubmit="if (typeof(this.elements['index[Key_name]'].disabled) != 'undefined') {
|
||||
this.elements['index[Key_name]'].disabled = false}">
|
||||
@ -249,16 +252,16 @@ foreach ($index->getColumns() as $column) {
|
||||
<option value="">-- <?php echo __('Ignore'); ?> --</option>
|
||||
<?php
|
||||
foreach ($fields as $field_name => $field_type) {
|
||||
if (($index->getType() != 'FULLTEXT'
|
||||
if (($index->getType() != 'FULLTEXT'
|
||||
|| preg_match('/(char|text)/i', $field_type))
|
||||
&& ($index->getType() != 'SPATIAL'
|
||||
&& ($index->getType() != 'SPATIAL'
|
||||
|| in_array($field_type, $spatial_types))
|
||||
) {
|
||||
echo '<option value="' . htmlspecialchars($field_name) . '"'
|
||||
. (($field_name == $column->getName())
|
||||
? ' selected="selected"'
|
||||
. (($field_name == $column->getName())
|
||||
? ' selected="selected"'
|
||||
: '') . '>'
|
||||
. htmlspecialchars($field_name) . ' ['
|
||||
. htmlspecialchars($field_name) . ' ['
|
||||
. htmlspecialchars($field_type) . ']'
|
||||
. '</option>' . "\n";
|
||||
}
|
||||
@ -285,7 +288,7 @@ for ($i = 0; $i < $add_fields; $i++) {
|
||||
<?php
|
||||
foreach ($fields as $field_name => $field_type) {
|
||||
echo '<option value="' . htmlspecialchars($field_name) . '">'
|
||||
. htmlspecialchars($field_name) . ' ['
|
||||
. htmlspecialchars($field_name) . ' ['
|
||||
. htmlspecialchars($field_type) . ']'
|
||||
. '</option>' . "\n";
|
||||
} // end foreach $fields
|
||||
|
||||
@ -58,13 +58,17 @@ if (PMA_isValid($_REQUEST['new_name'])) {
|
||||
} else {
|
||||
$message = PMA_Message::success(__('Table %s has been copied to %s.'));
|
||||
}
|
||||
$old = $common_functions->backquote($db) . '.' . $common_functions->backquote($table);
|
||||
$old = $common_functions->backquote($db) . '.'
|
||||
. $common_functions->backquote($table);
|
||||
$message->addParam($old);
|
||||
$new = $common_functions->backquote($_REQUEST['target_db']) . '.' . $common_functions->backquote($_REQUEST['new_name']);
|
||||
$new = $common_functions->backquote($_REQUEST['target_db']) . '.'
|
||||
. $common_functions->backquote($_REQUEST['new_name']);
|
||||
$message->addParam($new);
|
||||
|
||||
/* Check: Work on new table or on old table? */
|
||||
if (isset($_REQUEST['submit_move']) || PMA_isValid($_REQUEST['switch_to_new'])) {
|
||||
if (isset($_REQUEST['submit_move'])
|
||||
|| PMA_isValid($_REQUEST['switch_to_new'])
|
||||
) {
|
||||
$db = $_REQUEST['target_db'];
|
||||
$table = $_REQUEST['new_name'];
|
||||
}
|
||||
|
||||
@ -5,11 +5,14 @@
|
||||
*
|
||||
* includes phpMyAdmin relations and InnoDB relations
|
||||
*
|
||||
* @todo fix name handling: currently names with dots (.) are not properly handled for internal relations (but foreign keys relations are correct)
|
||||
* @todo fix name handling: currently names with dots (.) are not properly handled
|
||||
* for internal relations (but foreign keys relations are correct)
|
||||
* @todo foreign key constraints require both fields being of equal type and size
|
||||
* @todo check foreign fields to be from same type and size, all other makes no sense
|
||||
* @todo add an link to create an index required for constraints, or an option to do automatically
|
||||
* @todo if above todos are fullfilled we can add all fields meet requirements in the select dropdown
|
||||
* @todo add an link to create an index required for constraints,
|
||||
* or an option to do automatically
|
||||
* @todo if above todos are fullfilled we can add all fields meet requirements
|
||||
* in the select dropdown
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
@ -108,7 +111,9 @@ function PMA_backquote_split($text)
|
||||
if (false === $first_backquote || false === $second_backquote) {
|
||||
break;
|
||||
}
|
||||
$elements[] = substr($text, $first_backquote, $second_backquote - $first_backquote + 1);
|
||||
$elements[] = substr(
|
||||
$text, $first_backquote, $second_backquote - $first_backquote + 1
|
||||
);
|
||||
$pos = $second_backquote + 1;
|
||||
}
|
||||
return($elements);
|
||||
@ -361,15 +366,15 @@ if ($cfgRelation['relwork']
|
||||
// same engine.
|
||||
|
||||
if ($common_functions->isForeignKeySupported($tbl_storage_engine)) {
|
||||
$tab_query = 'SHOW TABLE STATUS FROM ' . $common_functions->backquote($db);
|
||||
$tab_query = 'SHOW TABLE STATUS FROM ' . $common_functions->backquote($db);
|
||||
// [0] of the row is the name
|
||||
// [1] is the type
|
||||
} else {
|
||||
$tab_query = 'SHOW TABLES FROM ' . $common_functions->backquote($db);
|
||||
$tab_query = 'SHOW TABLES FROM ' . $common_functions->backquote($db);
|
||||
// [0] of the row is the name
|
||||
}
|
||||
|
||||
$tab_rs = PMA_DBI_query($tab_query, null, PMA_DBI_QUERY_STORE);
|
||||
$tab_rs = PMA_DBI_query($tab_query, null, PMA_DBI_QUERY_STORE);
|
||||
$selectboxall[] = '';
|
||||
$selectboxall_foreign[] = '';
|
||||
|
||||
@ -377,7 +382,10 @@ if ($cfgRelation['relwork']
|
||||
$current_table = new PMA_Table($curr_table[0], $db);
|
||||
|
||||
// explicitely ask for non-quoted list of indexed columns
|
||||
$selectboxall = array_merge($selectboxall, $current_table->getUniqueColumns($backquoted = false));
|
||||
$selectboxall = array_merge(
|
||||
$selectboxall,
|
||||
$current_table->getUniqueColumns($backquoted = false)
|
||||
);
|
||||
|
||||
// if foreign keys are supported, collect all keys from other
|
||||
// tables of the same engine
|
||||
@ -387,7 +395,10 @@ if ($cfgRelation['relwork']
|
||||
) {
|
||||
// explicitely ask for non-quoted list of indexed columns
|
||||
// need to obtain backquoted values to support dots inside values
|
||||
$selectboxall_foreign = array_merge($selectboxall_foreign, $current_table->getIndexedColumns($backquoted = true));
|
||||
$selectboxall_foreign = array_merge(
|
||||
$selectboxall_foreign,
|
||||
$current_table->getIndexedColumns($backquoted = true)
|
||||
);
|
||||
}
|
||||
} // end while over tables
|
||||
} // end if
|
||||
|
||||
@ -65,7 +65,8 @@ if (! empty($submit_mult) && isset($_REQUEST['selected_fld'])) {
|
||||
|
||||
// what is this htmlspecialchars() for??
|
||||
//$sql_query .= ' FROM ' . backquote(htmlspecialchars($table));
|
||||
$sql_query .= ' FROM ' . $common_functions->backquote($db) . '.' . $common_functions->backquote($table);
|
||||
$sql_query .= ' FROM ' . $common_functions->backquote($db)
|
||||
. '.' . $common_functions->backquote($table);
|
||||
include 'sql.php';
|
||||
exit;
|
||||
} else {
|
||||
@ -733,7 +734,7 @@ if (! $tbl_is_view
|
||||
&& 'ARCHIVE' != $tbl_storage_engine
|
||||
) {
|
||||
echo $common_functions->getDivForSliderEffect('indexes', __('Indexes'));
|
||||
|
||||
|
||||
/**
|
||||
* Display indexes
|
||||
*/
|
||||
|
||||
@ -55,10 +55,10 @@ if (isset($_REQUEST['report_export'])) {
|
||||
/**
|
||||
* Filters tracking entries
|
||||
*
|
||||
* @param array the entries to filter
|
||||
* @param string "from" date
|
||||
* @param string "to" date
|
||||
* @param string users
|
||||
* @param array $data the entries to filter
|
||||
* @param string $filter_ts_from "from" date
|
||||
* @param string $filter_ts_to "to" date
|
||||
* @param string $filter_users users
|
||||
*
|
||||
* @return array filtered entries
|
||||
*/
|
||||
|
||||
Loading…
Reference in New Issue
Block a user