Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
c47587d37a
@ -43,6 +43,7 @@ VerboseMultiSubmit, ReplaceHelpImg
|
||||
+ Add Ajax support to Fast filter in order to search the term in all database tables
|
||||
- bug #3535015 [navi] DbFilter, TableFilter clear button hidden on Chrome
|
||||
+ rfe #3528994 [interface] Allow wrapping possibly long values in replication-status table
|
||||
+ [interface] Autoselect username input on cookie login page
|
||||
|
||||
3.5.3.0 (not yet released)
|
||||
- bug #3539044 [interface] Browse mode "Show" button gives blank page if no results anymore
|
||||
@ -55,7 +56,9 @@ VerboseMultiSubmit, ReplaceHelpImg
|
||||
- bug #3547825 [edit] BLOB download no longer works
|
||||
- bug #3541966 [config] Error in generated configuration arrray
|
||||
- bug #3553551 [GUI] Invalid HTML code in multi submits confirmation form
|
||||
[interface] Designer sometimes places tables on the top menu
|
||||
- [interface] Designer sometimes places tables on the top menu
|
||||
- bug #3546277 [core] Call to undefined function __() when config file has wrong permissions
|
||||
- bug #3540922 [edit] Error searching table with many fields
|
||||
|
||||
3.5.2.1 (2012-08-03)
|
||||
- [security] Fixed local path disclosure vulnerability, see PMASA-2012-3
|
||||
|
||||
@ -3871,5 +3871,7 @@ $(function () {
|
||||
* Reveal the login form to users with JS enabled
|
||||
*/
|
||||
$(function () {
|
||||
$('.js-show').show();
|
||||
var $loginform = $('#loginform');
|
||||
$loginform.find('.js-show').show();
|
||||
$loginform.find('#input_username').select();
|
||||
});
|
||||
|
||||
@ -52,7 +52,39 @@ $(function() {
|
||||
|
||||
PMA_prepareForAjaxRequest($search_form);
|
||||
|
||||
$.post($search_form.attr('action'), $search_form.serialize(), function(data) {
|
||||
var values = {};
|
||||
$search_form.find(':input').each(function() {
|
||||
var $input = $(this);
|
||||
if ($input.attr('type') == 'checkbox' || $input.attr('type') == 'radio') {
|
||||
if ($input.is(':checked')) {
|
||||
values[this.name] = $input.val();
|
||||
}
|
||||
} else {
|
||||
values[this.name] = $input.val();
|
||||
}
|
||||
});
|
||||
var columnCount = $('select[name="columnsToDisplay[]"] option').length;
|
||||
// Submit values only for the columns that have a search criteria
|
||||
for (var a = 0; a < columnCount; a++) {
|
||||
if (values['criteriaValues[' + a + ']'] == '') {
|
||||
delete values['criteriaValues[' + a + ']'];
|
||||
delete values['criteriaColumnOperators[' + a + ']'];
|
||||
delete values['criteriaColumnNames[' + a + ']'];
|
||||
delete values['criteriaColumnTypes[' + a + ']'];
|
||||
delete values['criteriaColumnCollations[' + a + ']'];
|
||||
}
|
||||
}
|
||||
// If all columns are selected, use a single parameter to indicate that
|
||||
if (values['columnsToDisplay[]'] != null) {
|
||||
if (values['columnsToDisplay[]'].length == columnCount) {
|
||||
delete values['columnsToDisplay[]'];
|
||||
values['displayAllColumns'] = true;
|
||||
}
|
||||
} else {
|
||||
values['displayAllColumns'] = true;
|
||||
}
|
||||
|
||||
$.post($search_form.attr('action'), values, function(data) {
|
||||
PMA_ajaxRemoveMessage($msgbox);
|
||||
if (data.success == true) {
|
||||
// found results
|
||||
|
||||
@ -634,8 +634,6 @@ class PMA_Config
|
||||
$this->checkPmaAbsoluteUri();
|
||||
$this->checkFontsize();
|
||||
|
||||
$this->checkPermissions();
|
||||
|
||||
// Handling of the collation must be done after merging of $cfg
|
||||
// (from config.inc.php) so that $cfg['DefaultConnectionCollation']
|
||||
// can have an effect. Note that the presence of collation
|
||||
|
||||
@ -172,7 +172,7 @@ class PMA_Menu
|
||||
if (strlen($this->_table)
|
||||
&& ! (isset($_REQUEST['purge']) && $_REQUEST['purge'] == '1')
|
||||
) {
|
||||
include_once './libraries/tbl_info.inc.php';
|
||||
include './libraries/tbl_info.inc.php';
|
||||
|
||||
$retval .= $separator;
|
||||
if ($GLOBALS['cfg']['NavigationBarIconic']) {
|
||||
|
||||
@ -639,10 +639,9 @@ EOT;
|
||||
if (isset($_POST['zoom_submit'])) {
|
||||
$sql_query .= '* ';
|
||||
} else {
|
||||
$sql_query .= (count($_POST['columnsToDisplay'])
|
||||
== count($_POST['criteriaColumnNames'])
|
||||
$sql_query .= ! empty($_POST['displayAllColumns'])
|
||||
? '* '
|
||||
: implode(', ', $this->getCommonFunctions()->backquote($_POST['columnsToDisplay'])));
|
||||
: implode(', ', $this->getCommonFunctions()->backquote($_POST['columnsToDisplay']));
|
||||
} // end if
|
||||
|
||||
$sql_query .= ' FROM ' . $this->getCommonFunctions()->backquote($_POST['table']);
|
||||
|
||||
@ -568,6 +568,8 @@ if ($GLOBALS['text_dir'] == 'ltr') {
|
||||
* check for errors occurred while loading configuration
|
||||
* this check is done here after loading language files to present errors in locale
|
||||
*/
|
||||
$GLOBALS['PMA_Config']->checkPermissions();
|
||||
|
||||
if ($GLOBALS['PMA_Config']->error_config_file) {
|
||||
$error = '[strong]' . __('Failed to read configuration file') . '[/strong]'
|
||||
. '[br][br]'
|
||||
|
||||
@ -743,6 +743,33 @@ function PMA_DBI_get_tables_full($database, $table = false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get VIEWs in a particular database
|
||||
*
|
||||
* @param string $db Database name to look in
|
||||
*
|
||||
* @return array $views Set of VIEWs inside the database
|
||||
*/
|
||||
function PMA_DBI_getVirtualTables($db)
|
||||
{
|
||||
|
||||
$tables_full = PMA_DBI_get_tables_full($db);
|
||||
$views = array();
|
||||
|
||||
foreach ($tables_full as $table=>$tmp) {
|
||||
|
||||
if (PMA_Table::isView($db, $table)) {
|
||||
$views[] = $table;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $views;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* returns array with databases containing extended infos about them
|
||||
*
|
||||
|
||||
@ -8,6 +8,8 @@ if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
require_once 'libraries/transformations.lib.php';
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
|
||||
$request_params = array(
|
||||
@ -137,6 +139,7 @@ if (! empty($submit_mult)
|
||||
}
|
||||
} // end if
|
||||
|
||||
$views = PMA_DBI_getVirtualTables($db);
|
||||
|
||||
/**
|
||||
* Displays the confirmation form if required
|
||||
@ -487,6 +490,15 @@ if (!empty($submit_mult) && !empty($what)) {
|
||||
PMA_DBI_select_db($db);
|
||||
}
|
||||
$result = PMA_DBI_query($a_query);
|
||||
|
||||
if ($query_type == 'drop_db') {
|
||||
PMA_clearTransformations($selected[$i]);
|
||||
} elseif ($query_type == 'drop_tbl') {
|
||||
PMA_clearTransformations($db, $selected[$i]);
|
||||
} else if ($query_type == 'drop_fld') {
|
||||
PMA_clearTransformations($db, $table ,$selected[$i]);
|
||||
}
|
||||
|
||||
} // end if
|
||||
} // end for
|
||||
|
||||
|
||||
@ -188,8 +188,12 @@ function PMA_pluginGetChoice($section, $name, &$list, $cfgname = null)
|
||||
) {
|
||||
$ret .= ' selected="selected"';
|
||||
}
|
||||
|
||||
if (method_exists($plugin->getProperties(), 'getText')) {
|
||||
$text = $plugin->getProperties()->getText();
|
||||
}
|
||||
$ret .= ' value="' . $plugin_name . '">'
|
||||
. PMA_getString($plugin->getProperties()->getText())
|
||||
. PMA_getString($text)
|
||||
. '</option>' . "\n";
|
||||
}
|
||||
$ret .= '</select>' . "\n";
|
||||
@ -199,7 +203,7 @@ function PMA_pluginGetChoice($section, $name, &$list, $cfgname = null)
|
||||
$plugin_name = strtolower(substr(get_class($plugin), strlen($section)));
|
||||
$ret .= '<input type="hidden" id="force_file_' . $plugin_name
|
||||
. '" value="';
|
||||
if ( ! strcmp($section, 'Import')
|
||||
if ( ! strcmp($section, 'Import')
|
||||
|| $plugin->getProperties()->getForceFile() != null
|
||||
) {
|
||||
$ret .= 'true';
|
||||
@ -208,7 +212,7 @@ function PMA_pluginGetChoice($section, $name, &$list, $cfgname = null)
|
||||
}
|
||||
$ret .= '" />'. "\n";
|
||||
}
|
||||
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
@ -245,137 +249,141 @@ function PMA_pluginGetOneOption(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($properties == null) {
|
||||
if (! isset($properties)) {
|
||||
$not_subgroup_header = true;
|
||||
$properties = $propertyGroup->getProperties();
|
||||
if (method_exists($propertyGroup, 'getProperties')) {
|
||||
$properties = $propertyGroup->getProperties();
|
||||
}
|
||||
}
|
||||
foreach ($properties as $propertyItem) {
|
||||
$property_class = get_class($propertyItem);
|
||||
// if the property is a subgroup, we deal with it recursively
|
||||
if (strpos($property_class, "Subgroup")) {
|
||||
// for subgroups
|
||||
// each subgroup can have a header, which may also be a form element
|
||||
$subgroup_header = $propertyItem->getSubgroupHeader();
|
||||
if (isset($subgroup_header)) {
|
||||
$ret .= PMA_pluginGetOneOption(
|
||||
|
||||
if (isset($properties)) {
|
||||
foreach ($properties as $propertyItem) {
|
||||
$property_class = get_class($propertyItem);
|
||||
// if the property is a subgroup, we deal with it recursively
|
||||
if (strpos($property_class, "Subgroup")) {
|
||||
// for subgroups
|
||||
// each subgroup can have a header, which may also be a form element
|
||||
$subgroup_header = $propertyItem->getSubgroupHeader();
|
||||
if (isset($subgroup_header)) {
|
||||
$ret .= PMA_pluginGetOneOption(
|
||||
$section,
|
||||
$plugin_name,
|
||||
$subgroup_header
|
||||
);
|
||||
}
|
||||
|
||||
$ret .= '<li class="subgroup"><ul';
|
||||
if (isset($subgroup_header)) {
|
||||
$ret .= ' id="ul_' . $subgroup_header->getName() . '">';
|
||||
} else {
|
||||
$ret .= '>';
|
||||
}
|
||||
|
||||
$ret .= PMA_pluginGetOneOption(
|
||||
$section,
|
||||
$plugin_name,
|
||||
$subgroup_header
|
||||
$propertyItem,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
$ret .= '<li class="subgroup"><ul';
|
||||
if (isset($subgroup_header)) {
|
||||
$ret .= ' id="ul_' . $subgroup_header->getName() . '">';
|
||||
} else {
|
||||
$ret .= '>';
|
||||
}
|
||||
// single property item
|
||||
switch ($property_class) {
|
||||
case "BoolPropertyItem":
|
||||
$ret .= '<li>' . "\n";
|
||||
$ret .= '<input type="checkbox" name="' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ' value="something" id="checkbox_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_'
|
||||
. $propertyItem->getName());
|
||||
|
||||
$ret .= PMA_pluginGetOneOption(
|
||||
$section,
|
||||
$plugin_name,
|
||||
$propertyItem,
|
||||
true
|
||||
);
|
||||
} else {
|
||||
// single property item
|
||||
switch ($property_class) {
|
||||
case "BoolPropertyItem":
|
||||
$ret .= '<li>' . "\n";
|
||||
$ret .= '<input type="checkbox" name="' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ' value="something" id="checkbox_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ' ' . PMA_pluginCheckboxCheck($section, $plugin_name . '_'
|
||||
. $propertyItem->getName());
|
||||
|
||||
if ($propertyItem->getForce() != null) {
|
||||
// Same code is also few lines lower, update both if needed
|
||||
$ret .= ' onclick="if (!this.checked && '
|
||||
. '(!document.getElementById(\'checkbox_' . $plugin_name
|
||||
. '_' . $propertyItem->getForce() . '\') '
|
||||
. '|| !document.getElementById(\'checkbox_'
|
||||
. $plugin_name . '_' . $propertyItem->getForce()
|
||||
. '\').checked)) '
|
||||
. 'return false; else return true;"';
|
||||
}
|
||||
$ret .= ' />';
|
||||
$ret .= '<label for="checkbox_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '">'
|
||||
. PMA_getString($propertyItem->getText()) . '</label>';
|
||||
break;
|
||||
case "DocPropertyItem":
|
||||
echo "DocPropertyItem";
|
||||
break;
|
||||
case "HiddenPropertyItem":
|
||||
$ret .= '<li><input type="hidden" name="' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ' value="' . PMA_pluginGetDefault($section, $plugin_name
|
||||
. '_' . $propertyItem->getName()) . '"' . ' /></li>';
|
||||
break;
|
||||
case "MessageOnlyPropertyItem":
|
||||
$ret .= '<li>' . "\n";
|
||||
$ret .= '<p>' . PMA_getString($propertyItem->getText()) . '</p>';
|
||||
break;
|
||||
case "RadioPropertyItem":
|
||||
$default = PMA_pluginGetDefault($section, $plugin_name . '_'
|
||||
. $propertyItem->getName());
|
||||
foreach ($propertyItem->getValues() as $key => $val) {
|
||||
$ret .= '<li><input type="radio" name="' . $plugin_name
|
||||
. '_' . $propertyItem->getName() . '" value="' . $key
|
||||
. '" id="radio_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '_' . $key . '"';
|
||||
if ($key == $default) {
|
||||
$ret .= ' checked="checked"';
|
||||
if ($propertyItem->getForce() != null) {
|
||||
// Same code is also few lines lower, update both if needed
|
||||
$ret .= ' onclick="if (!this.checked && '
|
||||
. '(!document.getElementById(\'checkbox_' . $plugin_name
|
||||
. '_' . $propertyItem->getForce() . '\') '
|
||||
. '|| !document.getElementById(\'checkbox_'
|
||||
. $plugin_name . '_' . $propertyItem->getForce()
|
||||
. '\').checked)) '
|
||||
. 'return false; else return true;"';
|
||||
}
|
||||
$ret .= ' />' . '<label for="radio_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '_' . $key . '">'
|
||||
. PMA_getString($val) . '</label></li>';
|
||||
}
|
||||
break;
|
||||
case "SelectPropertyItem":
|
||||
$ret .= '<li>' . "\n";
|
||||
$ret .= '<label for="select_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '" class="desc">'
|
||||
. PMA_getString($propertyItem->getText()) . '</label>';
|
||||
$ret .= '<select name="' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ' id="select_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '">';
|
||||
$default = PMA_pluginGetDefault(
|
||||
$section,
|
||||
$plugin_name . '_' . $propertyItem->getName()
|
||||
);
|
||||
foreach ($propertyItem->getValues() as $key => $val) {
|
||||
$ret .= '<option value="' . $key . '"';
|
||||
if ($key == $default) {
|
||||
$ret .= ' selected="selected"';
|
||||
$ret .= ' />';
|
||||
$ret .= '<label for="checkbox_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '">'
|
||||
. PMA_getString($propertyItem->getText()) . '</label>';
|
||||
break;
|
||||
case "DocPropertyItem":
|
||||
echo "DocPropertyItem";
|
||||
break;
|
||||
case "HiddenPropertyItem":
|
||||
$ret .= '<li><input type="hidden" name="' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ' value="' . PMA_pluginGetDefault($section, $plugin_name
|
||||
. '_' . $propertyItem->getName()) . '"' . ' /></li>';
|
||||
break;
|
||||
case "MessageOnlyPropertyItem":
|
||||
$ret .= '<li>' . "\n";
|
||||
$ret .= '<p>' . PMA_getString($propertyItem->getText()) . '</p>';
|
||||
break;
|
||||
case "RadioPropertyItem":
|
||||
$default = PMA_pluginGetDefault($section, $plugin_name . '_'
|
||||
. $propertyItem->getName());
|
||||
foreach ($propertyItem->getValues() as $key => $val) {
|
||||
$ret .= '<li><input type="radio" name="' . $plugin_name
|
||||
. '_' . $propertyItem->getName() . '" value="' . $key
|
||||
. '" id="radio_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '_' . $key . '"';
|
||||
if ($key == $default) {
|
||||
$ret .= ' checked="checked"';
|
||||
}
|
||||
$ret .= ' />' . '<label for="radio_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '_' . $key . '">'
|
||||
. PMA_getString($val) . '</label></li>';
|
||||
}
|
||||
$ret .= '>' . PMA_getString($val) . '</option>';
|
||||
}
|
||||
$ret .= '</select>';
|
||||
break;
|
||||
case "TextPropertyItem":
|
||||
$ret .= '<li>' . "\n";
|
||||
$ret .= '<label for="text_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '" class="desc">'
|
||||
. PMA_getString($propertyItem->getText()) . '</label>';
|
||||
$ret .= '<input type="text" name="' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ' value="' . PMA_pluginGetDefault($section, $plugin_name
|
||||
. '_' . $propertyItem->getName()) . '"'
|
||||
. ' id="text_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ($propertyItem->getSize() != null
|
||||
? ' size="' . $propertyItem->getSize() . '"'
|
||||
: '')
|
||||
. ($propertyItem->getLen() != null
|
||||
? ' maxlength="' . $propertyItem->getLen() . '"'
|
||||
: '')
|
||||
. ' />';
|
||||
break;
|
||||
default:;
|
||||
break;
|
||||
case "SelectPropertyItem":
|
||||
$ret .= '<li>' . "\n";
|
||||
$ret .= '<label for="select_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '" class="desc">'
|
||||
. PMA_getString($propertyItem->getText()) . '</label>';
|
||||
$ret .= '<select name="' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ' id="select_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '">';
|
||||
$default = PMA_pluginGetDefault(
|
||||
$section,
|
||||
$plugin_name . '_' . $propertyItem->getName()
|
||||
);
|
||||
foreach ($propertyItem->getValues() as $key => $val) {
|
||||
$ret .= '<option value="' . $key . '"';
|
||||
if ($key == $default) {
|
||||
$ret .= ' selected="selected"';
|
||||
}
|
||||
$ret .= '>' . PMA_getString($val) . '</option>';
|
||||
}
|
||||
$ret .= '</select>';
|
||||
break;
|
||||
case "TextPropertyItem":
|
||||
$ret .= '<li>' . "\n";
|
||||
$ret .= '<label for="text_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '" class="desc">'
|
||||
. PMA_getString($propertyItem->getText()) . '</label>';
|
||||
$ret .= '<input type="text" name="' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ' value="' . PMA_pluginGetDefault($section, $plugin_name
|
||||
. '_' . $propertyItem->getName()) . '"'
|
||||
. ' id="text_' . $plugin_name . '_'
|
||||
. $propertyItem->getName() . '"'
|
||||
. ($propertyItem->getSize() != null
|
||||
? ' size="' . $propertyItem->getSize() . '"'
|
||||
: '')
|
||||
. ($propertyItem->getLen() != null
|
||||
? ' maxlength="' . $propertyItem->getLen() . '"'
|
||||
: '')
|
||||
. ' />';
|
||||
break;
|
||||
default:;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -385,8 +393,9 @@ function PMA_pluginGetOneOption(
|
||||
$ret .= '</ul></li>';
|
||||
} else {
|
||||
// end main group
|
||||
if ($not_subgroup_header)
|
||||
if (! empty($not_subgroup_header)) {
|
||||
$ret .= '</ul></div>';
|
||||
}
|
||||
}
|
||||
|
||||
if (method_exists($propertyGroup, "getDoc")){
|
||||
@ -411,12 +420,14 @@ function PMA_pluginGetOneOption(
|
||||
}
|
||||
|
||||
// Close the list element after $doc link is displayed
|
||||
if ($property_class == 'BoolPropertyItem'
|
||||
|| $property_class == 'MessageOnlyPropertyItem'
|
||||
|| $property_class == 'SelectPropertyItem'
|
||||
|| $property_class == 'TextPropertyItem'
|
||||
) {
|
||||
$ret .= '</li>';
|
||||
if (isset($property_class)) {
|
||||
if ($property_class == 'BoolPropertyItem'
|
||||
|| $property_class == 'MessageOnlyPropertyItem'
|
||||
|| $property_class == 'SelectPropertyItem'
|
||||
|| $property_class == 'TextPropertyItem'
|
||||
) {
|
||||
$ret .= '</li>';
|
||||
}
|
||||
}
|
||||
$ret .= "\n";
|
||||
return $ret;
|
||||
|
||||
@ -53,6 +53,7 @@ class ExportOdt extends ExportPlugin
|
||||
include_once "$props/options/items/TextPropertyItem.class.php";
|
||||
include_once "$props/options/items/BoolPropertyItem.class.php";
|
||||
include_once "$props/options/items/HiddenPropertyItem.class.php";
|
||||
include_once "$props/options/items/RadioPropertyItem.class.php";
|
||||
|
||||
$exportPluginProperties = new ExportPluginProperties();
|
||||
$exportPluginProperties->setText('Open Document Text');
|
||||
|
||||
@ -73,10 +73,6 @@ class ExportTexytext extends ExportPlugin
|
||||
// add the main group to the root group
|
||||
$exportSpecificOptions->addProperty($dumpWhat);
|
||||
|
||||
// set the options for the export plugin property item
|
||||
$exportPluginProperties->setOptions($exportSpecificOptions);
|
||||
$this->properties = $exportPluginProperties;
|
||||
|
||||
// data options main group
|
||||
$dataOptions = new OptionsPropertyMainGroup();
|
||||
$dataOptions->setName("data");
|
||||
@ -93,6 +89,10 @@ class ExportTexytext extends ExportPlugin
|
||||
$dataOptions->addProperty($leaf);
|
||||
// add the main group to the root group
|
||||
$exportSpecificOptions->addProperty($dataOptions);
|
||||
|
||||
// set the options for the export plugin property item
|
||||
$exportPluginProperties->setOptions($exportSpecificOptions);
|
||||
$this->properties = $exportPluginProperties;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -63,14 +63,9 @@ if ($showtable) {
|
||||
$tbl_storage_engine = isset($showtable['Engine'])
|
||||
? strtoupper($showtable['Engine'])
|
||||
: '';
|
||||
// a new comment could be coming from tbl_operations.php
|
||||
// and we want to show it in the header
|
||||
if (isset($submitcomment) && isset($comment)) {
|
||||
$show_comment = $comment;
|
||||
} else {
|
||||
$show_comment = isset($showtable['Comment'])
|
||||
? $showtable['Comment']
|
||||
: '';
|
||||
$show_comment = '';
|
||||
if (isset($showtable['Comment'])) {
|
||||
$show_comment = $showtable['Comment'];
|
||||
}
|
||||
}
|
||||
$tbl_collation = empty($showtable['Collation'])
|
||||
|
||||
161
libraries/tbl_views.lib.php
Normal file
161
libraries/tbl_views.lib.php
Normal file
@ -0,0 +1,161 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Set of functions related to applying transformations for VIEWs
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
if (! defined('PHPMYADMIN')) {
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get the column details of VIEW with its original references
|
||||
*
|
||||
* @param string $sql_query SQL for original resource
|
||||
* @param array $view_columns Columns of VIEW if defined new column names
|
||||
*
|
||||
* @return array $column_map Details of VIEW columns
|
||||
*/
|
||||
function PMA_getColumnMap($sql_query, $view_columns)
|
||||
{
|
||||
|
||||
$column_map = array();
|
||||
// Select query which give results for VIEW
|
||||
$real_source_result = PMA_DBI_try_query($sql_query);
|
||||
|
||||
if ($real_source_result !== false) {
|
||||
|
||||
$real_source_fields_meta = PMA_DBI_get_fields_meta($real_source_result);
|
||||
|
||||
if (count($real_source_fields_meta) > 0) {
|
||||
|
||||
for ($i=0; $i<count($real_source_fields_meta); $i++) {
|
||||
|
||||
$map = array();
|
||||
$map['table_name'] = $real_source_fields_meta[$i]->table;
|
||||
$map['refering_column'] = $real_source_fields_meta[$i]->name;
|
||||
|
||||
if (count($view_columns) > 1) {
|
||||
$map['real_column'] = $view_columns[$i];
|
||||
}
|
||||
|
||||
$column_map[] = $map;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
unset($real_source_result);
|
||||
|
||||
return $column_map;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get existing data on tranformations applyed for
|
||||
* columns in a particular table
|
||||
*
|
||||
* @param string $db Database name looking for
|
||||
*
|
||||
* @return mysqli_result Result of executed SQL query
|
||||
*/
|
||||
function PMA_getExistingTranformationData($db)
|
||||
{
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
// Get the existing transformation details of the same database
|
||||
// from pma_column_info table
|
||||
$pma_transformation_sql = 'SELECT * FROM '
|
||||
. $common_functions->backquote($cfgRelation['db']) . '.'
|
||||
. $common_functions->backquote($cfgRelation['column_info'])
|
||||
. ' WHERE `db_name` = \''
|
||||
. $common_functions->sqlAddSlashes($db) . '\'';
|
||||
|
||||
return PMA_DBI_try_query($pma_transformation_sql);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get SQL query for store new transformation details of a VIEW
|
||||
*
|
||||
* @param mysqli_result $pma_tranformation_data Result set of SQL execution
|
||||
* @param array $column_map Details of VIEW columns
|
||||
* @param string $view_name Name of the VIEW
|
||||
* @param string $db Database name of the VIEW
|
||||
*
|
||||
* @return string $new_transformations_sql SQL query for new tranformations
|
||||
*/
|
||||
function PMA_getNewTransformationDataSql(
|
||||
$pma_tranformation_data, $column_map, $view_name, $db
|
||||
) {
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
// Need to store new transformation details for VIEW
|
||||
$new_transformations_sql = 'INSERT INTO '
|
||||
. $common_functions->backquote($cfgRelation['db']) . '.'
|
||||
. $common_functions->backquote($cfgRelation['column_info'])
|
||||
. ' (`db_name`, `table_name`, `column_name`, `comment`, '
|
||||
. '`mimetype`, `transformation`, `transformation_options`)'
|
||||
. ' VALUES ';
|
||||
|
||||
$column_count = 0;
|
||||
$add_comma = false;
|
||||
|
||||
while ($data_row = PMA_DBI_fetch_assoc($pma_tranformation_data)) {
|
||||
|
||||
foreach ($column_map as $column) {
|
||||
|
||||
if ($data_row['table_name'] == $column['table_name']
|
||||
&& $data_row['column_name'] == $column['refering_column']
|
||||
) {
|
||||
|
||||
$new_transformations_sql .= $add_comma ? ', ' : '';
|
||||
|
||||
$new_transformations_sql .= '('
|
||||
. '\'' . $db . '\', '
|
||||
. '\'' . $view_name . '\', '
|
||||
. '\'';
|
||||
|
||||
$new_transformations_sql .= (isset($column['real_column']))
|
||||
? $column['real_column']
|
||||
: $column['refering_column'];
|
||||
|
||||
$new_transformations_sql .= '\', '
|
||||
. '\'' . $data_row['comment'] . '\', '
|
||||
. '\'' . $data_row['mimetype'] . '\', '
|
||||
. '\'' . $data_row['transformation'] . '\', '
|
||||
. '\''
|
||||
. $common_functions->sqlAddSlashes(
|
||||
$data_row['transformation_options']
|
||||
)
|
||||
. '\')';
|
||||
|
||||
$add_comma = true;
|
||||
$column_count++;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($column_count == count($column_map)) {
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return ($column_count > 0) ? $new_transformations_sql : '';
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
@ -365,4 +365,46 @@ function PMA_transformation_global_html_replace($buffer, $options = array())
|
||||
$return = str_replace("[__BUFFER__]", $buffer, $options['string']);
|
||||
return $return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Delete related transformation details
|
||||
* after deleting database. table or column
|
||||
*
|
||||
* @param string $db Database name
|
||||
* @param string $table Table name
|
||||
* @param string $column Column name
|
||||
*
|
||||
* @return boolean State of the query execution
|
||||
*/
|
||||
function PMA_clearTransformations($db, $table = '', $column = '')
|
||||
{
|
||||
|
||||
$common_functions = PMA_CommonFunctions::getInstance();
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
$delete_sql = 'DELETE FROM '
|
||||
. $common_functions->backquote($cfgRelation['db']) . '.'
|
||||
. $common_functions->backquote($cfgRelation['column_info'])
|
||||
. ' WHERE ';
|
||||
|
||||
if (($column != '') && ($table != '')) {
|
||||
|
||||
$delete_sql .= '`db_name` = \'' . $db . '\' AND '
|
||||
. '`table_name` = \'' . $table . '\' AND '
|
||||
. '`column_name` = \'' . $column . '\' ';
|
||||
|
||||
} else if ($table != '') {
|
||||
|
||||
$delete_sql .= '`db_name` = \'' . $db . '\' AND '
|
||||
. '`table_name` = \'' . $table . '\' ';
|
||||
|
||||
} else {
|
||||
$delete_sql .= '`db_name` = \'' . $db . '\' ';
|
||||
}
|
||||
|
||||
return PMA_DBI_try_query($delete_sql);
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
129
po/da.po
129
po/da.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-08-05 02:30+0200\n"
|
||||
"PO-Revision-Date: 2012-08-09 08:26+0200\n"
|
||||
"Last-Translator: Aputsiaq Niels Janussen <aj@isit.gl>\n"
|
||||
"Language-Team: Danish <http://l10n.cihar.com/projects/phpmyadmin/master/da/>\n"
|
||||
"Language: da\n"
|
||||
@ -3613,7 +3613,7 @@ msgstr ""
|
||||
|
||||
#: libraries/Types.class.php:713
|
||||
msgid "A system's default double-precision floating-point number"
|
||||
msgstr ""
|
||||
msgstr "Et systems standard for flydepunktstal med dobbelt præcision"
|
||||
|
||||
#: libraries/Types.class.php:715
|
||||
msgid "True or false"
|
||||
@ -3632,22 +3632,28 @@ msgid ""
|
||||
"A timestamp, range is '0001-01-01 00:00:00' UTC to '9999-12-31 23:59:59' "
|
||||
"UTC; TIMESTAMP(6) can store microseconds"
|
||||
msgstr ""
|
||||
"Et tidsstempel, intervallet er '0001-01-01 00:00:00' UTC til '9999-12-31 "
|
||||
"23:59:59' UTC; TIMESTAMP(6) kan lagre mikrosekunder"
|
||||
|
||||
#: libraries/Types.class.php:733
|
||||
msgid ""
|
||||
"A variable-length (0-65,535) string, uses binary collation for all "
|
||||
"comparisons"
|
||||
msgstr ""
|
||||
"En streng med variabel længde (0-65.535), bruger binær sammenligning for "
|
||||
"alle sammenligninger"
|
||||
|
||||
#: libraries/Types.class.php:735
|
||||
msgid ""
|
||||
"A BLOB column with a maximum length of 65,535 (2^16 - 1) bytes, stored with "
|
||||
"a four-byte prefix indicating the length of the value"
|
||||
msgstr ""
|
||||
"En BLOB-kolonne med en maksimal længde på 65.535 (2^16 - 1) bytes, lagret "
|
||||
"med et præfiks på fire byte som indikerer længden af værdien"
|
||||
|
||||
#: libraries/Types.class.php:737
|
||||
msgid "An enumeration, chosen from the list of defined values"
|
||||
msgstr ""
|
||||
msgstr "En optælling, udvalgt fra listen med definerede værdier"
|
||||
|
||||
#: libraries/bookmark.lib.php:83
|
||||
msgid "shared"
|
||||
@ -4040,10 +4046,13 @@ msgid ""
|
||||
"Use user-friendly editor for editing SQL queries ([a@http://codemirror.net/]"
|
||||
"CodeMirror[/a]) with syntax highlighting and line numbers"
|
||||
msgstr ""
|
||||
"Brug en brugervenlig redigering til redigering af SQL-forespørgsler, "
|
||||
"([a@http://codemirror.net/]CodeMirror[/a]) med fremhævelse af syntaks og "
|
||||
"linjenummerering"
|
||||
|
||||
#: libraries/config/messages.inc.php:35
|
||||
msgid "Enable CodeMirror"
|
||||
msgstr ""
|
||||
msgstr "Slå CodeMirror til"
|
||||
|
||||
#: libraries/config/messages.inc.php:36
|
||||
msgid ""
|
||||
@ -4153,7 +4162,7 @@ msgstr "Standard tabel-fane"
|
||||
|
||||
#: libraries/config/messages.inc.php:58
|
||||
msgid "Whether the table structure actions should be hidden"
|
||||
msgstr ""
|
||||
msgstr "Om hvorvidt handlinger for tabel-struktur skal være skjulte"
|
||||
|
||||
#: libraries/config/messages.inc.php:59
|
||||
msgid "Hide table structure actions"
|
||||
@ -4732,6 +4741,8 @@ msgstr "Database-struktur"
|
||||
#: libraries/config/messages.inc.php:229
|
||||
msgid "Choose which details to show in the database structure (list of tables)"
|
||||
msgstr ""
|
||||
"Vælg hvilke detaljer, der skal vises i database-strukturen (liste af "
|
||||
"tabeller)"
|
||||
|
||||
#: libraries/config/messages.inc.php:230
|
||||
msgid "Table structure"
|
||||
@ -4739,7 +4750,7 @@ msgstr "Tabel-struktur"
|
||||
|
||||
#: libraries/config/messages.inc.php:231
|
||||
msgid "Settings for the table structure (list of columns)"
|
||||
msgstr ""
|
||||
msgstr "Indstillinger for tabel-strukturen (liste af kolonner)"
|
||||
|
||||
#: libraries/config/messages.inc.php:232
|
||||
msgid "Tabs"
|
||||
@ -5780,6 +5791,8 @@ msgstr "Vis formular til databaseoprettelse"
|
||||
#: libraries/config/messages.inc.php:460
|
||||
msgid "Show or hide a column displaying the Creation timestamp for all tables"
|
||||
msgstr ""
|
||||
"Vis eller skjul en kolonne, der viser oprettelses-tidsstempel for alle "
|
||||
"tabeller"
|
||||
|
||||
#: libraries/config/messages.inc.php:461
|
||||
msgid "Show Creation timestamp"
|
||||
@ -5789,15 +5802,19 @@ msgstr "Vis tidsstempel for oprettelse"
|
||||
msgid ""
|
||||
"Show or hide a column displaying the Last update timestamp for all tables"
|
||||
msgstr ""
|
||||
"Vis eller skjul en kolonne, der viser tidsstempel med seneste opdatering for "
|
||||
"alle tabeller"
|
||||
|
||||
#: libraries/config/messages.inc.php:463
|
||||
msgid "Show Last update timestamp"
|
||||
msgstr ""
|
||||
msgstr "Vis tidsstempel med seneste opdatering"
|
||||
|
||||
#: libraries/config/messages.inc.php:464
|
||||
msgid ""
|
||||
"Show or hide a column displaying the Last check timestamp for all tables"
|
||||
msgstr ""
|
||||
"Vis eller skjul en kolonne, der viser tidsstempel med seneste tjek for alle "
|
||||
"tabeller"
|
||||
|
||||
#: libraries/config/messages.inc.php:465
|
||||
msgid "Show Last check timestamp"
|
||||
@ -6441,15 +6458,15 @@ msgstr "Konvertering af indkodning:"
|
||||
#: libraries/display_git_revision.lib.php:59
|
||||
#, php-format
|
||||
msgid "%1$s from %2$s branch"
|
||||
msgstr ""
|
||||
msgstr "%1$s fra grenen %2$s"
|
||||
|
||||
#: libraries/display_git_revision.lib.php:61
|
||||
msgid "no branch"
|
||||
msgstr ""
|
||||
msgstr "ingen gren"
|
||||
|
||||
#: libraries/display_git_revision.lib.php:67
|
||||
msgid "Git revision"
|
||||
msgstr ""
|
||||
msgstr "Git-revision"
|
||||
|
||||
#: libraries/display_git_revision.lib.php:70
|
||||
#, php-format
|
||||
@ -6474,7 +6491,7 @@ msgstr ""
|
||||
#: libraries/display_import.lib.php:76
|
||||
#, php-format
|
||||
msgid "%s of %s"
|
||||
msgstr ""
|
||||
msgstr "%s af %s"
|
||||
|
||||
#: libraries/display_import.lib.php:85
|
||||
msgid "Uploading your import file..."
|
||||
@ -6483,15 +6500,15 @@ msgstr "Overfører din importfil ..."
|
||||
#: libraries/display_import.lib.php:93
|
||||
#, php-format
|
||||
msgid "%s/sec."
|
||||
msgstr ""
|
||||
msgstr "%s/sek."
|
||||
|
||||
#: libraries/display_import.lib.php:100
|
||||
msgid "About %MIN min. %SEC sec. remaining."
|
||||
msgstr ""
|
||||
msgstr "Omtrent %MIN min. %SEC sek. resterer."
|
||||
|
||||
#: libraries/display_import.lib.php:104
|
||||
msgid "About %SEC sec. remaining."
|
||||
msgstr ""
|
||||
msgstr "Omtrent %SEC sek. resterer."
|
||||
|
||||
#: libraries/display_import.lib.php:134
|
||||
msgid "The file is being processed, please be patient."
|
||||
@ -7333,7 +7350,7 @@ msgstr "Kunne ikke bruge Blowfish fra mcrypt!"
|
||||
|
||||
#: libraries/plugins/auth/AuthenticationCookie.class.php:81
|
||||
msgid "Your session has expired. Please login again."
|
||||
msgstr ""
|
||||
msgstr "Din session er udløbet. Log venligst ind igen."
|
||||
|
||||
#: libraries/plugins/auth/AuthenticationCookie.class.php:170
|
||||
msgid "Log in"
|
||||
@ -7636,15 +7653,14 @@ msgstr ""
|
||||
"indeholdende specielle tegn og nøgleord)</i>"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:354
|
||||
#, fuzzy
|
||||
#| msgid "Object creation options"
|
||||
msgid "Data creation options"
|
||||
msgstr "Object oprettelsesindstillinger"
|
||||
msgstr "Indstillinger for oprettelse af data"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:358
|
||||
#: libraries/plugins/export/ExportSql.class.php:1573
|
||||
msgid "Truncate table before insert"
|
||||
msgstr ""
|
||||
msgstr "Trunkér tabel forud for indsættelse"
|
||||
|
||||
#: libraries/plugins/export/ExportSql.class.php:364
|
||||
msgid "Instead of <code>INSERT</code> statements, use:"
|
||||
@ -7899,13 +7915,15 @@ msgstr "XML"
|
||||
#: libraries/plugins/import/PMA_ShapeRecord.class.php:58
|
||||
#, php-format
|
||||
msgid "Geometry type '%s' is not supported by MySQL."
|
||||
msgstr ""
|
||||
msgstr "Geometri-typen '%s' understøttes ikke af MySQL."
|
||||
|
||||
#: libraries/plugins/transformations/abstract/AppendTransformationsPlugin.class.php:31
|
||||
msgid ""
|
||||
"Appends text to a string. The only option is the text to be appended "
|
||||
"(enclosed in single quotes, default empty string)."
|
||||
msgstr ""
|
||||
"Føjer tekst til en streng. Den eneste valgmulighed er at teksten føjes til "
|
||||
"(omsluttet af enkelte anførselstegn, standardindstilling er en tom streng)."
|
||||
|
||||
#: libraries/plugins/transformations/abstract/DateFormatTransformationsPlugin.class.php:31
|
||||
msgid ""
|
||||
@ -7940,7 +7958,6 @@ msgstr ""
|
||||
"feltet i den første indstilling være sat til en tom streng."
|
||||
|
||||
#: libraries/plugins/transformations/abstract/ExternalTransformationsPlugin.class.php:31
|
||||
#, fuzzy
|
||||
#| msgid ""
|
||||
#| "LINUX ONLY: Launches an external application and feeds it the column data "
|
||||
#| "via standard input. Returns the standard output of the application. The "
|
||||
@ -7964,16 +7981,17 @@ msgid ""
|
||||
"option, if set to 1, will prevent wrapping and ensure that the output "
|
||||
"appears all on one line (Default 1)."
|
||||
msgstr ""
|
||||
"KUN LINUX: Starter en ekstern applikation og føder feltdata via standard "
|
||||
"input. Returnerer standardoutputtet for applikationen. Standard er Tidy, for "
|
||||
"korrekt udskrivning af HTML-kode. Af sikkerhedsårsager er du nødt til "
|
||||
"manuelt at redigere filen libraries/transformations/text_plain__external.inc."
|
||||
"php og indsætte de værktøjer du vil tillade kørsel af. Første indstilling er "
|
||||
"så nummeret på det program du vil bruge og den anden indstilling er "
|
||||
"parametrene for dette program. Tredie parameter vil, hvis sat til 1, "
|
||||
"konvertere outputtet vha. htmlspecialchars() (Standard er 1). Et fjerde "
|
||||
"parameter vil, hvis sat til 1, sætte et NOWRAP om cellens indhold så hele "
|
||||
"outputtet bliver vist uden omformattering (Standard 1)."
|
||||
"KUN LINUX: Starter en ekstern applikation og føder feltdata via "
|
||||
"standardinput. Returnerer standardoutputtet for applikationen. Standard er "
|
||||
"Tidy, for korrekt udskrivning af HTML-kode. Af sikkerhedsårsager er du nødt "
|
||||
"til manuelt at redigere filen "
|
||||
"libraries/transformations/Text_Plain__External.class.php og indsætte de "
|
||||
"værktøjer du ønsker skal være tilgængelig. Første indstilling er så nummeret "
|
||||
"på det program du vil bruge og den anden indstilling er parametrene for "
|
||||
"dette program. Tredje parameter vil, hvis sat til 1, konvertere outputtet "
|
||||
"vha. htmlspecialchars() (Standard er 1). Det fjerde parameter vil, hvis sat "
|
||||
"til 1, forhindre ombrydning og sikre at alt outputtet vises på én linje "
|
||||
"(Standard 1)."
|
||||
|
||||
#: libraries/plugins/transformations/abstract/FormattedTransformationsPlugin.class.php:31
|
||||
msgid ""
|
||||
@ -9490,7 +9508,7 @@ msgstr "Fuldtekst"
|
||||
|
||||
#: libraries/tbl_properties.inc.php:603
|
||||
msgid "first"
|
||||
msgstr ""
|
||||
msgstr "første"
|
||||
|
||||
#: libraries/tbl_properties.inc.php:613
|
||||
#, php-format
|
||||
@ -10982,6 +11000,8 @@ msgid ""
|
||||
"Key cache miss calculated as rate of physical reads compared to read "
|
||||
"requests (calculated value)"
|
||||
msgstr ""
|
||||
"Missede nøgle-mellemlagringer beregnet som raten af fysiske læsninger "
|
||||
"sammenlignet med læse-forespørgsler (beregnet værdi)"
|
||||
|
||||
#: server_status.php:1432
|
||||
msgid "The number of requests to write a key block to the cache."
|
||||
@ -10995,6 +11015,8 @@ msgstr "Antallet af fysiske skrivninger af en nøgleblok til disk."
|
||||
msgid ""
|
||||
"Percentage of physical writes compared to write requests (calculated value)"
|
||||
msgstr ""
|
||||
"Procentdel af fysiske skrivninger sammenlignet med skrive-forespørgsler "
|
||||
"(beregnet værdi)"
|
||||
|
||||
#: server_status.php:1435
|
||||
msgid ""
|
||||
@ -11224,10 +11246,9 @@ msgstr ""
|
||||
"tråd-implementering.)"
|
||||
|
||||
#: server_status.php:1470
|
||||
#, fuzzy
|
||||
#| msgid "Thread cache hit rate %%"
|
||||
msgid "Thread cache hit rate (calculated value)"
|
||||
msgstr "Frekvens for hits i trådmellemlager %%"
|
||||
msgstr "Frekvens for hits i trådmellemlager (beregnet værdi)"
|
||||
|
||||
#: server_status.php:1471
|
||||
msgid "The number of threads that are not sleeping."
|
||||
@ -11908,10 +11929,9 @@ msgid "Using bookmark \"%s\" as default browse query."
|
||||
msgstr "Bruger bogmærket \"%s\" som standard-forespørgsel til gennemsyn."
|
||||
|
||||
#: sql.php:434
|
||||
#, fuzzy
|
||||
#| msgid "Do you really want to "
|
||||
msgid "Do you really want to execute following query?"
|
||||
msgstr "Er du sikker på at du vil "
|
||||
msgstr "Er du sikker på at du vil udføre følgende forespørsel?"
|
||||
|
||||
#: sql.php:802
|
||||
msgid "Showing as PHP code"
|
||||
@ -11944,10 +11964,9 @@ msgid "Table %1$s has been altered successfully"
|
||||
msgstr "Tabel %1$s er blevet ændret"
|
||||
|
||||
#: tbl_alter.php:133
|
||||
#, fuzzy
|
||||
#| msgid "The selected users have been deleted successfully."
|
||||
msgid "The columns have been moved successfully."
|
||||
msgstr "De valgte brugere er blevet korrekt slettet."
|
||||
msgstr "Flytning af kolonnen er blevet fuldført."
|
||||
|
||||
#: tbl_chart.php:83
|
||||
#| msgid "Bar"
|
||||
@ -12280,10 +12299,9 @@ msgid "Spatial"
|
||||
msgstr "Spatial"
|
||||
|
||||
#: tbl_structure.php:161 tbl_structure.php:165
|
||||
#, fuzzy
|
||||
#| msgid "Browse distinct values"
|
||||
msgid "Distinct values"
|
||||
msgstr "Gennemse bestemte værdier"
|
||||
msgstr "Distinkte værdier"
|
||||
|
||||
#: tbl_structure.php:166 tbl_structure.php:167
|
||||
msgid "Add primary key"
|
||||
@ -12328,14 +12346,13 @@ msgid "Show more actions"
|
||||
msgstr "Vis flere operationer"
|
||||
|
||||
#: tbl_structure.php:619 tbl_structure.php:686
|
||||
#, fuzzy
|
||||
#| msgid "Remove column(s)"
|
||||
msgid "Move columns"
|
||||
msgstr "Fjern kolonne(r)"
|
||||
msgstr "Flyt kolonner"
|
||||
|
||||
#: tbl_structure.php:620
|
||||
msgid "Move the columns by dragging them up and down."
|
||||
msgstr ""
|
||||
msgstr "Flyt kolonnerne ved at trække dem op og ned."
|
||||
|
||||
#: tbl_structure.php:646
|
||||
msgid "Edit view"
|
||||
@ -12381,22 +12398,22 @@ msgid "Tracking report for table `%s`"
|
||||
msgstr "Sporings rapport for tabel `%s`"
|
||||
|
||||
#: tbl_tracking.php:198
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Version %s is created, tracking for %s.%s is activated."
|
||||
msgid "Version %1$s was created, tracking for %2$s is active."
|
||||
msgstr "Version %s er oprettet, sporing for %s.%s er aktiveret."
|
||||
msgstr "Version %1$s blev oprettet, sporing af %2$s er aktiv."
|
||||
|
||||
#: tbl_tracking.php:215
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Tracking of %s.%s is activated."
|
||||
msgid "Tracking for %1$s was deactivated at version %2$s."
|
||||
msgstr "Sporing af %s.%s er aktiveret."
|
||||
msgstr "Sporing af %1$s blev deaktiveret i version %2$s."
|
||||
|
||||
#: tbl_tracking.php:232
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Tracking of %s.%s is activated."
|
||||
msgid "Tracking for %1$s was activated at version %2$s."
|
||||
msgstr "Sporing af %s.%s er aktiveret."
|
||||
msgstr "Sporing af %1$s blev aktiveret i version %2$s."
|
||||
|
||||
#: tbl_tracking.php:246
|
||||
msgid "SQL statements executed."
|
||||
@ -12440,10 +12457,10 @@ msgid "Tracking statements"
|
||||
msgstr "Sporingskommandoer"
|
||||
|
||||
#: tbl_tracking.php:499 tbl_tracking.php:631
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Show %s with dates from %s to %s by user %s %s"
|
||||
msgid "Show %1$s with dates from %2$s to %3$s by user %4$s %5$s"
|
||||
msgstr "Vis %s med datoer fra %s til %s for bruger %s %s"
|
||||
msgstr "Vis %1$s med datoer fra %2$s til %3$s for brugeren %4$s %5$s"
|
||||
|
||||
#: tbl_tracking.php:504
|
||||
msgid "Delete tracking data row from report"
|
||||
@ -12491,30 +12508,30 @@ msgid "Show versions"
|
||||
msgstr "Vis versioner"
|
||||
|
||||
#: tbl_tracking.php:772
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Deactivate tracking for %s.%s"
|
||||
msgid "Deactivate tracking for %s"
|
||||
msgstr "Deaktiver sporing af %s.%s"
|
||||
msgstr "Deaktiver sporing af %s"
|
||||
|
||||
#: tbl_tracking.php:774
|
||||
msgid "Deactivate now"
|
||||
msgstr "Deaktiver nu"
|
||||
|
||||
#: tbl_tracking.php:785
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Activate tracking for %s.%s"
|
||||
msgid "Activate tracking for %s"
|
||||
msgstr "Aktiver sporing af %s.%s"
|
||||
msgstr "Aktiver sporing af %s"
|
||||
|
||||
#: tbl_tracking.php:787
|
||||
msgid "Activate now"
|
||||
msgstr "Aktiver nu"
|
||||
|
||||
#: tbl_tracking.php:800
|
||||
#, fuzzy, php-format
|
||||
#, php-format
|
||||
#| msgid "Create version %s of %s.%s"
|
||||
msgid "Create version %1$s of %2$s"
|
||||
msgstr "Opret version %s af %s.%s"
|
||||
msgstr "Opret version %1$s af %2$s"
|
||||
|
||||
#: tbl_tracking.php:804
|
||||
msgid "Track these data definition statements:"
|
||||
|
||||
10
po/de.po
10
po/de.po
@ -4,15 +4,15 @@ msgstr ""
|
||||
"Project-Id-Version: phpMyAdmin-docs 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-13 00:19+0200\n"
|
||||
"Last-Translator: Maxi Lampert <maxilampert@yahoo.de>\n"
|
||||
"Language-Team: none\n"
|
||||
"PO-Revision-Date: 2012-08-06 09:31+0200\n"
|
||||
"Last-Translator: J. M. <me@mynetx.net>\n"
|
||||
"Language-Team: German <http://l10n.cihar.com/projects/phpmyadmin/master/de/>\n"
|
||||
"Language: de\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"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.1\n"
|
||||
"X-Generator: Weblate 1.2\n"
|
||||
|
||||
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:354
|
||||
#: libraries/DisplayResults.class.php:794
|
||||
@ -2539,7 +2539,7 @@ msgstr "Operationen"
|
||||
#: libraries/CommonFunctions.class.php:3506
|
||||
#: libraries/sql_query_form.lib.php:473 prefs_manage.php:245
|
||||
msgid "Browse your computer:"
|
||||
msgstr "Durchsuchen Sie ihren Computer:"
|
||||
msgstr "Durchsuchen Sie Ihren Computer:"
|
||||
|
||||
#: libraries/CommonFunctions.class.php:3534
|
||||
#, php-format
|
||||
|
||||
66
po/th.po
66
po/th.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-04-21 15:20+0200\n"
|
||||
"Last-Translator: Setthawut Sawaengkit <defpico2@hotmail.com>\n"
|
||||
"Language-Team: thai <th@li.org>\n"
|
||||
"PO-Revision-Date: 2012-08-08 08:31+0200\n"
|
||||
"Last-Translator: Anusuk Sangubon <jaideejung007@gmail.com>\n"
|
||||
"Language-Team: Thai <http://l10n.cihar.com/projects/phpmyadmin/master/th/>\n"
|
||||
"Language: th\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=UTF-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"X-Generator: Weblate 0.10\n"
|
||||
"X-Generator: Weblate 1.2\n"
|
||||
|
||||
#: browse_foreigners.php:36 browse_foreigners.php:60 js/messages.php:354
|
||||
#: libraries/DisplayResults.class.php:794
|
||||
@ -1751,7 +1751,7 @@ msgstr "เวลาที่ทำคำสั่ง"
|
||||
#: libraries/DisplayResults.class.php:714
|
||||
#, php-format
|
||||
msgid "%d is not valid row number."
|
||||
msgstr ""
|
||||
msgstr "%d ไม่ใช่หมายเลขแถวที่ถูกต้อง"
|
||||
|
||||
#: js/messages.php:291 libraries/config/FormDisplay.tpl.php:387
|
||||
#: libraries/insert_edit.lib.php:1483
|
||||
@ -1783,8 +1783,9 @@ msgid "Hovering over a point will show its label."
|
||||
msgstr "นำตัวชี้วางเพื่อแสดงคำกำกับ"
|
||||
|
||||
#: js/messages.php:304
|
||||
#, fuzzy
|
||||
msgid "To zoom in, select a section of the plot with the mouse."
|
||||
msgstr ""
|
||||
msgstr "เมื่อต้องการย่อ/ขยาย เลือกส่วนของจุดโดยใช้เมาส์"
|
||||
|
||||
#: js/messages.php:306
|
||||
#, fuzzy
|
||||
@ -1797,8 +1798,9 @@ msgid "Click a data point to view and possibly edit the data row."
|
||||
msgstr "คลิก จุดข้อมูล เพื่อดูหรือแก้ไขแถวข้อมูล"
|
||||
|
||||
#: js/messages.php:310
|
||||
#, fuzzy
|
||||
msgid "The plot can be resized by dragging it along the bottom right corner."
|
||||
msgstr "ขนาดจุดสามารถเปลี่ยนได้ที่ขวาล่าง"
|
||||
msgstr "จุดสามารถปรับขนาดได้ โดยการลากไปมุมขวาด้านล่าง"
|
||||
|
||||
#: js/messages.php:312
|
||||
msgid "Select two columns"
|
||||
@ -2921,8 +2923,8 @@ msgid ""
|
||||
"Error moving the uploaded file, see [a@./Documentation."
|
||||
"html#faq1_11@Documentation]FAQ 1.11[/a]"
|
||||
msgstr ""
|
||||
"มีข้อผิดพลาดขนาดย้ายไฟล์อัพหลด กรุณาดู [a@./Documentation.html#faq1_11@Documentation]"
|
||||
"FAQ 1.11[/a]"
|
||||
"มีข้อผิดพลาดระหว่างการอัพโหลด กรุณาดู "
|
||||
"[a@./Documentation.html#faq1_11@Documentation]FAQ 1.11[/a]"
|
||||
|
||||
#: libraries/File.class.php:485
|
||||
msgid "Error while moving uploaded file."
|
||||
@ -3189,12 +3191,14 @@ msgstr ""
|
||||
"['MaxTableUiprefs'] %s)"
|
||||
|
||||
#: libraries/Table.class.php:1563
|
||||
#, php-format
|
||||
#, fuzzy, php-format
|
||||
msgid ""
|
||||
"Cannot save UI property \"%s\". The changes made will not be persistent "
|
||||
"after you refresh this page. Please check if the table structure has been "
|
||||
"changed."
|
||||
msgstr ""
|
||||
"ไม่สามารถบันทึกคุณสมบัติ UI \"% s\" ได้ การเปลี่ยนแปลงจะมีผล "
|
||||
"หลังจากคุณรีเฟรชหน้านี้ โปรดตรวจสอบหากมีการเปลี่ยนโครงสร้างของตาราง"
|
||||
|
||||
#: libraries/TableSearch.class.php:194 libraries/insert_edit.lib.php:231
|
||||
#: libraries/insert_edit.lib.php:237 libraries/rte/rte_routines.lib.php:1488
|
||||
@ -3291,7 +3295,7 @@ msgstr "เริ่มใหม่"
|
||||
#: libraries/Theme.class.php:169
|
||||
#, php-format
|
||||
msgid "No valid image path for theme %s found!"
|
||||
msgstr ""
|
||||
msgstr "ไม่มีเส้นทางรูปภาพที่ถูกต้องสำหรับชุดรูปแบบ %s ที่พบ"
|
||||
|
||||
#: libraries/Theme.class.php:458
|
||||
msgid "No preview available."
|
||||
@ -3299,26 +3303,26 @@ msgstr "ไม่สามารถแสดงตัวอย่างได้
|
||||
|
||||
#: libraries/Theme.class.php:460
|
||||
msgid "take it"
|
||||
msgstr ""
|
||||
msgstr "ลงมือ"
|
||||
|
||||
#: libraries/Theme_Manager.class.php:137
|
||||
#, php-format
|
||||
#, fuzzy, php-format
|
||||
msgid "Default theme %s not found!"
|
||||
msgstr ""
|
||||
msgstr "เริ่มต้นชุดรูปแบบ %s ไม่พบ"
|
||||
|
||||
#: libraries/Theme_Manager.class.php:194
|
||||
#, php-format
|
||||
msgid "Theme %s not found!"
|
||||
msgstr ""
|
||||
msgstr "ชุดรูปแบบ %s ไม่พบ"
|
||||
|
||||
#: libraries/Theme_Manager.class.php:271
|
||||
#, php-format
|
||||
#, fuzzy, php-format
|
||||
msgid "Theme path not found for theme %s!"
|
||||
msgstr ""
|
||||
msgstr "เส้นทางของชุดรูปแบบ %s ไม่พบ"
|
||||
|
||||
#: libraries/Theme_Manager.class.php:363 themes.php:16 themes.php:21
|
||||
msgid "Theme"
|
||||
msgstr ""
|
||||
msgstr "ชุดรูปแบบ"
|
||||
|
||||
#: libraries/Types.class.php:295
|
||||
msgid ""
|
||||
@ -3612,7 +3616,7 @@ msgstr ""
|
||||
|
||||
#: libraries/bookmark.lib.php:83
|
||||
msgid "shared"
|
||||
msgstr ""
|
||||
msgstr "ใช้ร่วมกัน"
|
||||
|
||||
#: libraries/build_html_for_db.lib.php:26
|
||||
#: libraries/config/messages.inc.php:187
|
||||
@ -3713,7 +3717,7 @@ msgstr ""
|
||||
|
||||
#: libraries/common.inc.php:1083
|
||||
msgid "possible exploit"
|
||||
msgstr ""
|
||||
msgstr "ใช้ประโยชน์ได้"
|
||||
|
||||
#: libraries/common.inc.php:1092
|
||||
msgid "numeric key detected"
|
||||
@ -7209,7 +7213,7 @@ msgstr "รูปแบบนี้ไม่มีตัวเลือก"
|
||||
|
||||
#: libraries/plugins/auth/AuthenticationConfig.class.php:73
|
||||
msgid "Cannot connect: invalid settings."
|
||||
msgstr ""
|
||||
msgstr "ไม่สามารถเชื่อมต่อ: ตั้งค่าไม่ถูกต้อง"
|
||||
|
||||
#: libraries/plugins/auth/AuthenticationConfig.class.php:85
|
||||
#: libraries/plugins/auth/AuthenticationCookie.class.php:140
|
||||
@ -7224,6 +7228,8 @@ msgid ""
|
||||
"You probably did not create a configuration file. You might want to use the "
|
||||
"%1$ssetup script%2$s to create one."
|
||||
msgstr ""
|
||||
"คุณคงไม่ได้สร้างแฟ้มการกำหนดค่า คุณอาจต้องการใช้ %1$ssetup script%2$s "
|
||||
"เพื่อสร้างอย่างใดอย่างหนึ่ง"
|
||||
|
||||
#: libraries/plugins/auth/AuthenticationConfig.class.php:121
|
||||
msgid ""
|
||||
@ -7232,6 +7238,10 @@ msgid ""
|
||||
"configuration and make sure that they correspond to the information given by "
|
||||
"the administrator of the MySQL server."
|
||||
msgstr ""
|
||||
"phpMyAdmin พยายามเชื่อมต่อไปยังเซิร์ฟเวอร์ MySQL "
|
||||
"และเซิร์ฟเวอร์ได้ปฏิเสธการเชื่อมต่อดังกล่าว คุณควรตรวจสอบโฮสต์ "
|
||||
"ชื่อผู้ใช้และรหัสผ่านในการกำหนดค่าของคุณ และให้แน่ใจว่าค่าต่างๆ "
|
||||
"สอดคล้องกับข้อมูลที่กำหนดไว้ โดยผู้ดูแลระบบของเซิร์ฟเวอร์ MySQL แล้ว"
|
||||
|
||||
#: libraries/plugins/auth/AuthenticationCookie.class.php:42
|
||||
msgid "Failed to use Blowfish from mcrypt!"
|
||||
@ -7270,13 +7280,13 @@ msgstr "ตัวเลือกเซิร์ฟเวอร์"
|
||||
#: libraries/plugins/auth/AuthenticationSignon.class.php:249
|
||||
msgid ""
|
||||
"Login without a password is forbidden by configuration (see AllowNoPassword)"
|
||||
msgstr ""
|
||||
msgstr "ห้ามกำหนดค่า สำหรับการเข้าสู่ระบบโดยไม่มีรหัสผ่าน (ดู AllowNoPassword)"
|
||||
|
||||
#: libraries/plugins/auth/AuthenticationCookie.class.php:578
|
||||
#: libraries/plugins/auth/AuthenticationSignon.class.php:256
|
||||
#, php-format
|
||||
msgid "No activity within %s seconds; please log in again"
|
||||
msgstr ""
|
||||
msgstr "ไม่มีกิจกรรมภายใน %s วินาที กรุณาล็อกอินอีกครั้ง"
|
||||
|
||||
#: libraries/plugins/auth/AuthenticationCookie.class.php:591
|
||||
#: libraries/plugins/auth/AuthenticationCookie.class.php:593
|
||||
@ -7290,25 +7300,25 @@ msgstr "อนุญาตให้เข้าใช้ไม่ได้ ช
|
||||
|
||||
#: libraries/plugins/auth/AuthenticationSignon.class.php:102
|
||||
msgid "Can not find signon authentication script:"
|
||||
msgstr ""
|
||||
msgstr "สามารถค้นหา signon สำหรับตรวจสอบสคริปต์:"
|
||||
|
||||
#: libraries/plugins/auth/swekey/swekey.auth.lib.php:132
|
||||
#, php-format
|
||||
msgid "File %s does not contain any key id"
|
||||
msgstr ""
|
||||
msgstr "แฟ้ม %s ไม่ควรประกอบไปด้วยรหัสคีย์ใดๆ"
|
||||
|
||||
#: libraries/plugins/auth/swekey/swekey.auth.lib.php:174
|
||||
#: libraries/plugins/auth/swekey/swekey.auth.lib.php:194
|
||||
msgid "Hardware authentication failed"
|
||||
msgstr ""
|
||||
msgstr "ตรวจสอบฮาร์ดแวร์ล้มเหลว"
|
||||
|
||||
#: libraries/plugins/auth/swekey/swekey.auth.lib.php:181
|
||||
msgid "No valid authentication key plugged"
|
||||
msgstr ""
|
||||
msgstr "ไม่มีคีย์รับรองความถูกต้อง"
|
||||
|
||||
#: libraries/plugins/auth/swekey/swekey.auth.lib.php:214
|
||||
msgid "Authenticating..."
|
||||
msgstr ""
|
||||
msgstr "กำลังตรวจสอบ..."
|
||||
|
||||
#: libraries/plugins/export/ExportCsv.class.php:112
|
||||
#: libraries/plugins/import/ImportCsv.class.php:78
|
||||
|
||||
57
sql.php
57
sql.php
@ -766,6 +766,34 @@ if (isset($GLOBALS['show_as_php']) || ! empty($GLOBALS['validatequery'])) {
|
||||
|
||||
// No rows returned -> move back to the calling page
|
||||
if ((0 == $num_rows && 0 == $unlim_num_rows) || $is_affected) {
|
||||
|
||||
// Delete related tranformation information
|
||||
if (!empty($analyzed_sql[0]['querytype'])
|
||||
&& (($analyzed_sql[0]['querytype'] == 'ALTER')
|
||||
|| ($analyzed_sql[0]['querytype'] == 'DROP'))
|
||||
) {
|
||||
|
||||
require_once 'libraries/transformations.lib.php';
|
||||
if ($analyzed_sql[0]['querytype'] == 'ALTER') {
|
||||
|
||||
if (stripos($analyzed_sql[0]['unsorted_query'], 'DROP') !== false) {
|
||||
|
||||
$drop_column = PMA_getColumnNameInColumnDropSql(
|
||||
$analyzed_sql[0]['unsorted_query']
|
||||
);
|
||||
|
||||
if ($drop_column != '') {
|
||||
PMA_clearTransformations($db, $table, $drop_column);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else if (($analyzed_sql[0]['querytype'] == 'DROP') && ($table != '')) {
|
||||
PMA_clearTransformations($db, $table);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if ($is_delete) {
|
||||
$message = PMA_Message::deleted_rows($num_rows);
|
||||
} elseif ($is_insert) {
|
||||
@ -1472,5 +1500,34 @@ function PMA_getSqlWithLimitClause($full_sql_query, $analyzed_sql, $sql_limit_to
|
||||
return $analyzed_sql[0]['section_before_limit'] . "\n"
|
||||
. $sql_limit_to_append . $analyzed_sql[0]['section_after_limit'];
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get column name from a drop SQL statement
|
||||
*
|
||||
* @param string $sql SQL query
|
||||
*
|
||||
* @return string $drop_column Name of the column
|
||||
*/
|
||||
function PMA_getColumnNameInColumnDropSql($sql)
|
||||
{
|
||||
|
||||
$tmpArray1 = explode('DROP', $sql);
|
||||
$str_to_check = trim($tmpArray1[1]);
|
||||
|
||||
if (stripos($str_to_check, 'COLUMN') !== false) {
|
||||
$tmpArray2 = explode('COLUMN', $str_to_check);
|
||||
$str_to_check = trim($tmpArray2[1]);
|
||||
}
|
||||
|
||||
$tmpArray3 = explode(' ', $str_to_check);
|
||||
$str_to_check = trim($tmpArray3[0]);
|
||||
|
||||
$drop_column = str_replace(';', '', trim($str_to_check));
|
||||
$drop_column = str_replace('`', '', $drop_column);
|
||||
|
||||
return $drop_column;
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
@ -180,7 +180,7 @@ if (isset($result) && empty($message_to_show)) {
|
||||
$_type = 'success';
|
||||
if (empty($_message)) {
|
||||
$_message = $result
|
||||
? $message = PMA_Message::success(
|
||||
? PMA_Message::success(
|
||||
__('Your SQL query has been executed successfully')
|
||||
)
|
||||
: PMA_Message::error(__('Error'));
|
||||
|
||||
@ -41,7 +41,7 @@ $table_search = new PMA_TableSearch($db, $table, "normal");
|
||||
/**
|
||||
* Not selection yet required -> displays the selection form
|
||||
*/
|
||||
if (! isset($_POST['columnsToDisplay']) || $_POST['columnsToDisplay'][0] == '') {
|
||||
if (! isset($_POST['columnsToDisplay']) && ! isset($_POST['displayAllColumns'])) {
|
||||
// Gets some core libraries
|
||||
include_once 'libraries/tbl_common.inc.php';
|
||||
//$err_url = 'tbl_select.php' . $err_url;
|
||||
|
||||
@ -844,7 +844,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'DELETE FROM `data`.`new` WHERE `new`.`id` = 1',
|
||||
'[%_PMA_CHECKBOX_DIR_%]',
|
||||
'odd row_0 vpointer vmarker',
|
||||
'<td class="odd row_0 vpointer vmarker" class="center"><input type="checkbox" id="id_rows_to_delete0[%_PMA_CHECKBOX_DIR_%]" name="rows_to_delete[0]" class="multi_checkbox" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{"`new`.`id`":"= 1"}" /> </td>'
|
||||
'<td class="odd row_0 vpointer vmarker" class="center"><input type="checkbox" id="id_rows_to_delete0[%_PMA_CHECKBOX_DIR_%]" name="rows_to_delete[0]" class="multi_checkbox checkall" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{"`new`.`id`":"= 1"}" /> </td>'
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -1070,7 +1070,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'<span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span>',
|
||||
'<span class="nowrap"><img src="themes/dot.gif" title="Delete" alt="Delete" class="icon ic_b_drop" /> Delete</span>',
|
||||
'DELETE FROM `data`.`new` WHERE `new`.`id` = 1',
|
||||
'<td class="center"><input type="checkbox" id="id_rows_to_delete0_left" name="rows_to_delete[0]" class="multi_checkbox" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{"`new`.`id`":"= 1"}" /> </td><td class="edit_row_anchor center" ><span class="nowrap">
|
||||
'<td class="center"><input type="checkbox" id="id_rows_to_delete0_left" name="rows_to_delete[0]" class="multi_checkbox checkall" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{"`new`.`id`":"= 1"}" /> </td><td class="edit_row_anchor center" ><span class="nowrap">
|
||||
<a href="tbl_change.php?db=data&table=new&where_clause=%60new%60.%60id%60+%3D+1&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60new%60&goto=sql.php&default_action=update&token=ae4c6d18375f446dfa068420c1f6a4e8" ><span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span></a>
|
||||
<input type="hidden" class="where_clause" value ="%60new%60.%60id%60+%3D+1" /></span></td><td class="center" ><span class="nowrap">
|
||||
<a href="tbl_change.php?db=data&table=new&where_clause=%60new%60.%60id%60+%3D+1&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60new%60&goto=sql.php&default_action=insert&token=ae4c6d18375f446dfa068420c1f6a4e8" ><span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span></a>
|
||||
@ -1167,7 +1167,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
<a href="tbl_change.php?db=data&table=new&where_clause=%60new%60.%60id%60+%3D+1&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60new%60&goto=sql.php&default_action=insert&token=ae4c6d18375f446dfa068420c1f6a4e8" ><span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span></a>
|
||||
<input type="hidden" class="where_clause" value="%60new%60.%60id%60+%3D+1" /></span></td><td class="edit_row_anchor center" ><span class="nowrap">
|
||||
<a href="tbl_change.php?db=data&table=new&where_clause=%60new%60.%60id%60+%3D+1&clause_is_unique=1&sql_query=SELECT+%2A+FROM+%60new%60&goto=sql.php&default_action=update&token=ae4c6d18375f446dfa068420c1f6a4e8" ><span class="nowrap"><img src="themes/dot.gif" title="Edit" alt="Edit" class="icon ic_b_edit" /> Edit</span></a>
|
||||
<input type="hidden" class="where_clause" value ="%60new%60.%60id%60+%3D+1" /></span></td><td class="center"><input type="checkbox" id="id_rows_to_delete0_right" name="rows_to_delete[0]" class="multi_checkbox" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{"`new`.`id`":"= 1"}" /> </td>'
|
||||
<input type="hidden" class="where_clause" value ="%60new%60.%60id%60+%3D+1" /></span></td><td class="center"><input type="checkbox" id="id_rows_to_delete0_right" name="rows_to_delete[0]" class="multi_checkbox checkall" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{"`new`.`id`":"= 1"}" /> </td>'
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -1252,7 +1252,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'<span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span>',
|
||||
'<span class="nowrap"><img src="themes/dot.gif" title="Delete" alt="Delete" class="icon ic_b_drop" /> Delete</span>',
|
||||
'DELETE FROM `data`.`new` WHERE `new`.`id` = 1',
|
||||
'<td class="center"><input type="checkbox" id="id_rows_to_delete0_left" name="rows_to_delete[0]" class="multi_checkbox" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{"`new`.`id`":"= 1"}" /> </td>'
|
||||
'<td class="center"><input type="checkbox" id="id_rows_to_delete0_left" name="rows_to_delete[0]" class="multi_checkbox checkall" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{"`new`.`id`":"= 1"}" /> </td>'
|
||||
)
|
||||
);
|
||||
}
|
||||
@ -1351,7 +1351,7 @@ class PMA_DisplayResults_test extends PHPUnit_Framework_TestCase
|
||||
'<span class="nowrap"><img src="themes/dot.gif" title="Copy" alt="Copy" class="icon ic_b_insrow" /> Copy</span>',
|
||||
'<span class="nowrap"><img src="themes/dot.gif" title="Delete" alt="Delete" class="icon ic_b_drop" /> Delete</span>',
|
||||
null,
|
||||
'<td class="center"><input type="checkbox" id="id_rows_to_delete0_left" name="rows_to_delete[0]" class="multi_checkbox" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{"`new`.`id`":"= 1"}" /> </td>'
|
||||
'<td class="center"><input type="checkbox" id="id_rows_to_delete0_left" name="rows_to_delete[0]" class="multi_checkbox checkall" value="%60new%60.%60id%60+%3D+1" /><input type="hidden" class="condition_array" value="{"`new`.`id`":"= 1"}" /> </td>'
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
102
test/libraries/PMA_Zip_test.php
Normal file
102
test/libraries/PMA_Zip_test.php
Normal file
@ -0,0 +1,102 @@
|
||||
<?php
|
||||
/**
|
||||
* Tests for displaing results
|
||||
*
|
||||
* @package PhpMyAdmin-test
|
||||
*/
|
||||
|
||||
/*
|
||||
* Include to test.
|
||||
*/
|
||||
|
||||
require_once 'libraries/zip.lib.php';
|
||||
|
||||
class PMA_Zip_test extends PHPUnit_Framework_TestCase
|
||||
{
|
||||
/**
|
||||
* @access protected
|
||||
*/
|
||||
protected $object;
|
||||
|
||||
/**
|
||||
* Sets up the fixture, for example, opens a network connection.
|
||||
* This method is called before a test is executed.
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function setUp()
|
||||
{
|
||||
$this->object = $this->getMockForAbstractClass('ZipFile');
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Tears down the fixture, for example, closes a network connection.
|
||||
* This method is called after a test is executed.
|
||||
*
|
||||
* @access protected
|
||||
* @return void
|
||||
*/
|
||||
protected function tearDown()
|
||||
{
|
||||
unset($this->object);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for setDoWrite
|
||||
*/
|
||||
public function testSetDoWrite(){
|
||||
$this->object->setDoWrite();
|
||||
$this->assertTrue($this->object->doWrite);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for unix2DosTime
|
||||
*
|
||||
* @param $unixtime
|
||||
* @param $output
|
||||
*
|
||||
* @dataProvider providerForTestUnix2DosTime
|
||||
*/
|
||||
public function testUnix2DosTime($unixTime, $output){
|
||||
$this->assertEquals(
|
||||
$this->object->unix2DosTime($unixTime),
|
||||
$output
|
||||
);
|
||||
}
|
||||
|
||||
public function providerForTestUnix2DosTime(){
|
||||
return array(
|
||||
array(
|
||||
123456,
|
||||
2162688
|
||||
),
|
||||
array(
|
||||
234232,
|
||||
2162688
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for addFile
|
||||
*/
|
||||
public function testAddFile(){
|
||||
$this->assertEquals(
|
||||
$this->object->addFile('This is test content for the file', 'Test file'),
|
||||
''
|
||||
);
|
||||
$this->assertTrue(!empty($this->object->ctrl_dir));
|
||||
}
|
||||
|
||||
/**
|
||||
* Test for file
|
||||
*/
|
||||
public function testFile(){
|
||||
$file = $this->object->file();
|
||||
$this->assertTrue(
|
||||
!empty($file)
|
||||
);
|
||||
}
|
||||
}
|
||||
@ -63,6 +63,34 @@ if (isset($_REQUEST['createview'])) {
|
||||
}
|
||||
|
||||
if (PMA_DBI_try_query($sql_query)) {
|
||||
|
||||
require_once './libraries/tbl_views.lib.php';
|
||||
|
||||
// If different column names defined for VIEW
|
||||
$view_columns = array();
|
||||
if (isset($_REQUEST['view']['column_names'])) {
|
||||
$view_columns = explode(',', $_REQUEST['view']['column_names']);
|
||||
}
|
||||
|
||||
$column_map = PMA_getColumnMap($_REQUEST['view']['as'], $view_columns);
|
||||
$pma_tranformation_data = PMA_getExistingTranformationData($GLOBALS['db']);
|
||||
|
||||
if ($pma_tranformation_data !== false) {
|
||||
|
||||
// SQL for store new transformation details of VIEW
|
||||
$new_transformations_sql = PMA_getNewTransformationDataSql(
|
||||
$pma_tranformation_data, $column_map, $_REQUEST['view']['name'],
|
||||
$GLOBALS['db']
|
||||
);
|
||||
|
||||
// Store new transformations
|
||||
if ($new_transformations_sql != '') {
|
||||
PMA_DBI_try_query($new_transformations_sql);
|
||||
}
|
||||
|
||||
}
|
||||
unset($pma_tranformation_data);
|
||||
|
||||
if ($GLOBALS['is_ajax_request'] != true) {
|
||||
$message = PMA_Message::success();
|
||||
include './' . $cfg['DefaultTabDatabase'];
|
||||
@ -75,7 +103,9 @@ if (isset($_REQUEST['createview'])) {
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
exit;
|
||||
|
||||
} else {
|
||||
if ($GLOBALS['is_ajax_request'] != true) {
|
||||
$message = PMA_Message::rawError(PMA_DBI_getError());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user