Various coding style fixes
This commit is contained in:
parent
9c141ee607
commit
bf8bb147e4
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* PDF export for PMD
|
||||
*
|
||||
* @package PhpMyAdmin-Designer
|
||||
*/
|
||||
@ -149,7 +150,9 @@ echo '<p>' . __('Export/Import to scale:');
|
||||
<select name="scale">
|
||||
<option value="1">1:1</option>
|
||||
<option value="2">1:2</option>
|
||||
<option value="3" selected="selected">1:3 (<?php echo __('recommended'); ?>)</option>
|
||||
<option value="3" selected="selected">
|
||||
1:3 (<?php echo __('recommended'); ?>)
|
||||
</option>
|
||||
<option value="4">1:4</option>
|
||||
<option value="5">1:5</option>
|
||||
</select>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* PMD handler for creating new relation
|
||||
*
|
||||
* @package PhpMyAdmin-Designer
|
||||
*/
|
||||
@ -51,7 +52,8 @@ if (PMA_Util::isForeignKeySupported($type_T1)
|
||||
'SHOW INDEX FROM ' . PMA_Util::backquote($db)
|
||||
. '.' . PMA_Util::backquote($T2) . ';'
|
||||
);
|
||||
$index_array2 = array(); // will be used to emphasis prim. keys in the table view
|
||||
// will be used to emphasis prim. keys in the table view
|
||||
$index_array2 = array();
|
||||
while ($row = $GLOBALS['dbi']->fetchAssoc($result)) {
|
||||
$index_array2[$row['Column_name']] = 1;
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* PMD relation update handler
|
||||
*
|
||||
* @package PhpMyAdmin-Designer
|
||||
*/
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Save handler for PMD
|
||||
*
|
||||
* @package PhpMyAdmin-Designer
|
||||
*/
|
||||
@ -14,7 +15,7 @@ require_once 'libraries/pmd_common.php';
|
||||
$cfgRelation = PMA_getRelationsParam();
|
||||
|
||||
if (! $cfgRelation['designerwork']) {
|
||||
PMD_err_sav();
|
||||
PMD_errorSave();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -58,13 +59,22 @@ foreach ($_POST['t_x'] as $key => $value) {
|
||||
}
|
||||
//----------------------------------------------------------------------------
|
||||
|
||||
function PMD_err_sav()
|
||||
/**
|
||||
* Error handler
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function PMD_errorSave()
|
||||
{
|
||||
global $die_save_pos; // if this file included
|
||||
if (! empty($die_save_pos)) {
|
||||
header("Content-Type: text/xml; charset=utf-8");
|
||||
header("Cache-Control: no-cache");
|
||||
die('<root act="save_pos" return="' . __('Error saving coordinates for Designer.') . '"></root>');
|
||||
die(
|
||||
'<root act="save_pos" return="'
|
||||
. __('Error saving coordinates for Designer.')
|
||||
. '"></root>'
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,7 +82,9 @@ if (! empty($die_save_pos)) {
|
||||
header("Content-Type: text/xml; charset=utf-8");
|
||||
header("Cache-Control: no-cache");
|
||||
?>
|
||||
<root act='save_pos' return='<?php echo __('Modifications have been saved'); ?>'></root>
|
||||
<root
|
||||
act='save_pos'
|
||||
return='<?php echo __('Modifications have been saved'); ?>'></root>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* PDF schema editor
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Schema export handler
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* vim: set expandtab sw=4 ts=4 sts=4: */
|
||||
/**
|
||||
* Wrapper script for rendering transformations
|
||||
*
|
||||
* @package PhpMyAdmin
|
||||
*/
|
||||
@ -49,7 +50,8 @@ foreach ($request_params as $one_request_param) {
|
||||
$GLOBALS['dbi']->selectDb($db);
|
||||
if (isset($where_clause)) {
|
||||
$result = $GLOBALS['dbi']->query(
|
||||
'SELECT * FROM ' . PMA_Util::backquote($table) . ' WHERE ' . $where_clause . ';',
|
||||
'SELECT * FROM ' . PMA_Util::backquote($table)
|
||||
. ' WHERE ' . $where_clause . ';',
|
||||
null,
|
||||
PMA_DatabaseInterface::QUERY_STORE
|
||||
);
|
||||
|
||||
@ -68,8 +68,8 @@ exit;
|
||||
/**
|
||||
* Send the message as an ajax request
|
||||
*
|
||||
* @param array $change_password_message
|
||||
* @param string $sql_query
|
||||
* @param array $change_password_message Message to display
|
||||
* @param string $sql_query SQL query executed
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@ -120,9 +120,9 @@ function PMA_setChangePasswordMsg()
|
||||
/**
|
||||
* Change the password
|
||||
*
|
||||
* @param string $password
|
||||
* @param string $message
|
||||
* @param array $change_password_message
|
||||
* @param string $password
|
||||
* @param string $message
|
||||
* @param array $change_password_message Message to show
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
@ -133,7 +133,7 @@ function PMA_changePassword($password, $message, $change_password_message)
|
||||
$hashing_function = PMA_changePassHashingFunction();
|
||||
$sql_query = 'SET password = '
|
||||
. (($password == '') ? '\'\'' : $hashing_function . '(\'***\')');
|
||||
PMA_ChangePassUrlParamsAndSubmitQuery(
|
||||
PMA_changePassUrlParamsAndSubmitQuery(
|
||||
$password, $_url_params, $sql_query, $hashing_function
|
||||
);
|
||||
|
||||
@ -167,7 +167,7 @@ function PMA_changePassHashingFunction()
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function PMA_ChangePassUrlParamsAndSubmitQuery(
|
||||
function PMA_changePassUrlParamsAndSubmitQuery(
|
||||
$password, $_url_params, $sql_query, $hashing_function
|
||||
) {
|
||||
$err_url = 'user_password.php' . PMA_generate_common_url($_url_params);
|
||||
|
||||
@ -31,7 +31,7 @@ $view_with_options = array(
|
||||
'LOCAL'
|
||||
);
|
||||
|
||||
$view_sql_security_options = array(
|
||||
$view_security_options = array(
|
||||
'DEFINER',
|
||||
'INVOKER'
|
||||
);
|
||||
@ -60,7 +60,7 @@ if (isset($_REQUEST['createview']) || isset($_REQUEST['alterview'])) {
|
||||
}
|
||||
|
||||
if (isset($_REQUEST['view']['sql_security'])) {
|
||||
if (in_array($_REQUEST['view']['sql_security'], $view_sql_security_options)) {
|
||||
if (in_array($_REQUEST['view']['sql_security'], $view_security_options)) {
|
||||
$sql_query .= $sep . ' SQL SECURITY '
|
||||
. $_REQUEST['view']['sql_security'];
|
||||
}
|
||||
@ -211,7 +211,7 @@ $htmlString .= '<tr><td class="nowrap">' . __('Definer') . '</td>'
|
||||
$htmlString .= '<tr><td class="nowrap">SQL SECURITY</td>'
|
||||
. '<td><select name="view[sql_security]">'
|
||||
. '<option value=""></option>';
|
||||
foreach ($view_sql_security_options as $option) {
|
||||
foreach ($view_security_options as $option) {
|
||||
$htmlString .= '<option value="' . htmlspecialchars($option) . '"';
|
||||
if ($option == $view['sql_security']) {
|
||||
$htmlString .= ' selected="selected"';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user