diff options
-rw-r--r-- | pmd_pdf.php | 5 | ||||
-rw-r--r-- | pmd_relation_new.php | 4 | ||||
-rw-r--r-- | pmd_relation_upd.php | 1 | ||||
-rw-r--r-- | pmd_save_pos.php | 20 | ||||
-rw-r--r-- | schema_edit.php | 1 | ||||
-rw-r--r-- | schema_export.php | 1 | ||||
-rw-r--r-- | transformation_wrapper.php | 4 | ||||
-rw-r--r-- | user_password.php | 14 | ||||
-rw-r--r-- | view_create.php | 6 |
9 files changed, 39 insertions, 17 deletions
diff --git a/pmd_pdf.php b/pmd_pdf.php index 725d44c202..9a1adb9f5a 100644 --- a/pmd_pdf.php +++ b/pmd_pdf.php @@ -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> diff --git a/pmd_relation_new.php b/pmd_relation_new.php index 9a5f17c9b7..60247edf1a 100644 --- a/pmd_relation_new.php +++ b/pmd_relation_new.php @@ -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; } diff --git a/pmd_relation_upd.php b/pmd_relation_upd.php index 1b0285d5eb..9dff0579b8 100644 --- a/pmd_relation_upd.php +++ b/pmd_relation_upd.php @@ -1,6 +1,7 @@ <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** + * PMD relation update handler * * @package PhpMyAdmin-Designer */ diff --git a/pmd_save_pos.php b/pmd_save_pos.php index cd95ddb1b8..fbf64cdcfa 100644 --- a/pmd_save_pos.php +++ b/pmd_save_pos.php @@ -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 } ?> diff --git a/schema_edit.php b/schema_edit.php index 498ccb7afb..8b79774cca 100644 --- a/schema_edit.php +++ b/schema_edit.php @@ -1,6 +1,7 @@ <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** + * PDF schema editor * * @package PhpMyAdmin */ diff --git a/schema_export.php b/schema_export.php index ef9138a96e..e150db190d 100644 --- a/schema_export.php +++ b/schema_export.php @@ -1,6 +1,7 @@ <?php /* vim: set expandtab sw=4 ts=4 sts=4: */ /** + * Schema export handler * * @package PhpMyAdmin */ diff --git a/transformation_wrapper.php b/transformation_wrapper.php index 5d5f655b78..b7e0780ec0 100644 --- a/transformation_wrapper.php +++ b/transformation_wrapper.php @@ -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 ); diff --git a/user_password.php b/user_password.php index 252302bda8..6e9c4c8a77 100644 --- a/user_password.php +++ b/user_password.php @@ -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); diff --git a/view_create.php b/view_create.php index 0a2cae5f85..743329f3b8 100644 --- a/view_create.php +++ b/view_create.php @@ -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"'; |