' . "\n";
- $html_output .= '';
// nullify_code is needed by the js nullify() function
- $nullify_code = PMA_getNullifyCodeForNullColumn($column, $foreigners, $foreignData);
+ $nullify_code = PMA_getNullifyCodeForNullColumn(
+ $column, $foreigners, $foreignData
+ );
// to be able to generate calls to nullify() in jQuery
$html_output .= '';
@@ -574,20 +585,26 @@ function PMA_getNullifyCodeForNullColumn($column, $foreigners, $foreignData)
* @param array $data description of the column field
* @param array $special_chars special characters
* @param array $foreignData data about the foreign keys
+ * @param boolean $odd_row whether row is odd
* @param array $paramTableDbArray array containing $db and $table
* @param array $rownumber_param &rownumber=row_id
* @param array $titles An HTML IMG tag for a particular icon from
* a theme, which may be an actual file or
* an icon from a sprite
- * @param array $text_dir
+ * @param array $text_dir text direction
* @param string $special_chars_encoded replaced char if the string starts
* with a \r\n pair (0x0d0a) add an extra \n
+ * @param string $vkey [multi_edit]['row_id']
+ * @param boolean $is_upload is upload or not
* @param integer $biggest_max_file_size 0 intger
* @param string $default_char_editing default char editing mode which is stroe
* in the config.inc.php script
* @param array $no_support_types list of datatypes that are not (yet)
* handled by PMA
* @param array $gis_data_types list of GIS data types
+ * @param array $extracted_columnspec associative array containing type,
+ * spec_in_brackets and possibly
+ * enum_set_values (another array)
*
* @return string an html snippet
*/
@@ -605,7 +622,7 @@ function PMA_getValueColumn($column, $backup_field, $column_name_appendix,
$column, $backup_field, $column_name_appendix,
$unnullify_trigger, $tabindex, $tabindex_for_value, $idindex, $data,
$paramTableDbArray, $rownumber_param, $titles
- );
+ );
} elseif (is_array($foreignData['disp_row'])) {
$html_output .= PMA_dispRowForeignData(
@@ -620,7 +637,7 @@ function PMA_getValueColumn($column, $backup_field, $column_name_appendix,
$html_output .= '
'
. '
';
$html_output .= PMA_getTextarea(
- $column,$backup_field, $column_name_appendix, $unnullify_trigger,
+ $column, $backup_field, $column_name_appendix, $unnullify_trigger,
$tabindex, $tabindex_for_value, $idindex, $text_dir,
$special_chars_encoded
);
@@ -639,28 +656,28 @@ function PMA_getValueColumn($column, $backup_field, $column_name_appendix,
} elseif ($column['pma_type'] == 'enum') {
$html_output .= PMA_getPmaTypeEnum(
- $paramsArrayForColumns, $column,$extracted_columnspec
+ $paramsArrayForColumns, $column, $extracted_columnspec
);
} elseif ($column['pma_type'] == 'set') {
$html_output .= PMA_getPmaTypeSet(
- $column,$extracted_columnspec, $backup_field,
+ $column, $extracted_columnspec, $backup_field,
$column_name_appendix, $unnullify_trigger, $tabindex,
$tabindex_for_value, $idindex
);
} elseif ($column['is_binary'] || $column['is_blob']) {
$html_output .= PMA_getBinaryAndBlobColumn(
- $column, $data, $special_chars,$biggest_max_file_size,
- $backup_field,$column_name_appendix, $unnullify_trigger, $tabindex,
+ $column, $data, $special_chars, $biggest_max_file_size,
+ $backup_field, $column_name_appendix, $unnullify_trigger, $tabindex,
$tabindex_for_value, $idindex, $text_dir, $special_chars_encoded,
$vkey, $is_upload
);
} elseif (! in_array($column['pma_type'], $no_support_types)) {
$html_output .= PMA_getNoSupportTypes(
- $column, $default_char_editing,$backup_field,
- $column_name_appendix, $unnullify_trigger,$tabindex,$special_chars,
+ $column, $default_char_editing, $backup_field,
+ $column_name_appendix, $unnullify_trigger, $tabindex, $special_chars,
$tabindex_for_value, $idindex, $text_dir, $special_chars_encoded,
$data, $extracted_columnspec
);
@@ -683,7 +700,7 @@ function PMA_getValueColumn($column, $backup_field, $column_name_appendix,
* @param integer $tabindex tab index
* @param integer $tabindex_for_value offset for the values tabindex
* @param integer $idindex id index
- * @param array $data
+ * @param array $data data to edit
* @param array $paramTableDbArray array containing $db and $table
* @param array $rownumber_param &rownumber=row_id
* @param array $titles An HTML IMG tag for a particular icon from
@@ -722,7 +739,7 @@ function PMA_getForeignLink($column, $backup_field, $column_name_appendix,
* @param integer $tabindex tab index
* @param integer $tabindex_for_value offset for the values tabindex
* @param integer $idindex id index
- * @param array $data
+ * @param array $data data to edit
* @param array $foreignData data about the foreign keys
*
* @return string an html snippet
@@ -733,13 +750,17 @@ function PMA_dispRowForeignData($backup_field, $column_name_appendix,
) {
$html_output = '';
$html_output .= $backup_field . "\n";
- $html_output .= ''
+ $html_output .= ''
. '
'
+ . __('MySQL said: ') . PMA_DBI_getError(null);
} else {
- $message = PMA_Message::success(__('Routine %1$s has been created.'));
+ $message = PMA_Message::success(
+ __('Routine %1$s has been created.')
+ );
$message->addParam(PMA_backquote($_REQUEST['item_name']));
$sql_query = $routine_query;
}
@@ -291,7 +325,9 @@ function PMA_RTN_handleEditor()
}
if (count($errors)) {
- $message = PMA_Message::error(__('One or more errors have occured while processing your request:'));
+ $message = PMA_Message::error(
+ __('One or more errors have occured while processing your request:')
+ );
$message->addString('
');
foreach ($errors as $string) {
$message->addString('
' . $string . '
');
@@ -505,10 +541,10 @@ function PMA_RTN_getDataFromRequest()
* This function will generate the values that are required to complete
* the "Edit routine" form given the name of a routine.
*
- * @param string $name The name of the routine.
- * @param string $type Type of routine (ROUTINE|PROCEDURE)
- * @param bool $all Whether to return all data or just
- * the info about parameters.
+ * @param string $name The name of the routine.
+ * @param string $type Type of routine (ROUTINE|PROCEDURE)
+ * @param bool $all Whether to return all data or just
+ * the info about parameters.
*
* @return array Data necessary to create the routine editor.
*/
@@ -577,7 +613,9 @@ function PMA_RTN_getDataFromName($name, $type, $all = true)
&& strtoupper($parsed_query[$i]['data']) == 'RETURNS'
) {
$fetching = true;
- } else if ($fetching == true && $parsed_query[$i]['type'] == 'alpha_reservedWord') {
+ } else if ($fetching == true
+ && $parsed_query[$i]['type'] == 'alpha_reservedWord'
+ ) {
// We will not be looking for options such as UNSIGNED
// or ZEROFILL because there is no way that a numeric
// field's DTD_IDENTIFIER can be longer than 64
@@ -604,8 +642,8 @@ function PMA_RTN_getDataFromName($name, $type, $all = true)
$retval['item_returnopts_num'] = $returnparam[4];
$retval['item_returnopts_text'] = $returnparam[4];
}
- $retval['item_definer'] = PMA_RTN_parseRoutineDefiner($parsed_query);
- $retval['item_definition'] = $routine['ROUTINE_DEFINITION'];
+ $retval['item_definer'] = PMA_RTN_parseRoutineDefiner($parsed_query);
+ $retval['item_definition'] = $routine['ROUTINE_DEFINITION'];
$retval['item_isdeterministic'] = '';
if ($routine['IS_DETERMINISTIC'] == 'YES') {
$retval['item_isdeterministic'] = " checked='checked'";
@@ -627,13 +665,13 @@ function PMA_RTN_getDataFromName($name, $type, $all = true)
/**
* Creates one row for the parameter table used in the routine editor.
*
- * @param array $routine Data for the routine returned by
- * PMA_RTN_getDataFromRequest() or
- * PMA_RTN_getDataFromName()
- * @param mixed $index Either a numeric index of the row being processed
- * or NULL to create a template row for AJAX request
- * @param string $class Class used to hide the direction column, if the
- * row is for a stored function.
+ * @param array $routine Data for the routine returned by
+ * PMA_RTN_getDataFromRequest() or
+ * PMA_RTN_getDataFromName()
+ * @param mixed $index Either a numeric index of the row being processed
+ * or NULL to create a template row for AJAX request
+ * @param string $class Class used to hide the direction column, if the
+ * row is for a stored function.
*
* @return string HTML code of one row of parameter table for the editor.
*/
@@ -732,14 +770,14 @@ function PMA_RTN_getParameterRow($routine = array(), $index = null, $class = '')
/**
* Displays a form used to add/edit a routine
*
- * @param string $mode If the editor will be used edit a routine
- * or add a new one: 'edit' or 'add'.
- * @param string $operation If the editor was previously invoked with
- * JS turned off, this will hold the name of
- * the current operation
- * @param array $routine Data for the routine returned by
- * PMA_RTN_getDataFromRequest() or
- * PMA_RTN_getDataFromName()
+ * @param string $mode If the editor will be used edit a routine
+ * or add a new one: 'edit' or 'add'.
+ * @param string $operation If the editor was previously invoked with
+ * JS turned off, this will hold the name of
+ * the current operation
+ * @param array $routine Data for the routine returned by
+ * PMA_RTN_getDataFromRequest() or
+ * PMA_RTN_getDataFromName()
*
* @return string HTML code for the editor.
*/
@@ -779,7 +817,9 @@ function PMA_RTN_getEditorForm($mode, $operation, $routine)
$routine['item_type'] = 'PROCEDURE';
$routine['item_type_toggle'] = 'FUNCTION';
}
- } else if ($operation == 'add' || ($routine['item_num_params'] == 0 && $mode == 'add' && ! $errors)) {
+ } else if ($operation == 'add'
+ || ($routine['item_num_params'] == 0 && $mode == 'add' && ! $errors)
+ ) {
$routine['item_param_dir'][] = '';
$routine['item_param_name'][] = '';
$routine['item_param_type'][] = '';
@@ -989,7 +1029,8 @@ function PMA_RTN_getQueryFromRequest()
{
global $_REQUEST, $errors, $param_sqldataaccess, $param_directions;
- $_REQUEST['item_type'] = isset($_REQUEST['item_type']) ? $_REQUEST['item_type'] : '';
+ $_REQUEST['item_type'] = isset($_REQUEST['item_type'])
+ ? $_REQUEST['item_type'] : '';
$query = 'CREATE ';
if (! empty($_REQUEST['item_definer'])) {
@@ -1006,7 +1047,10 @@ function PMA_RTN_getQueryFromRequest()
) {
$query .= $_REQUEST['item_type'] . ' ';
} else {
- $errors[] = sprintf(__('Invalid routine type: "%s"'), htmlspecialchars($_REQUEST['item_type']));
+ $errors[] = sprintf(
+ __('Invalid routine type: "%s"'),
+ htmlspecialchars($_REQUEST['item_type'])
+ );
}
if (! empty($_REQUEST['item_name'])) {
$query .= PMA_backquote($_REQUEST['item_name']);
@@ -1133,6 +1177,8 @@ function PMA_RTN_getQueryFromRequest()
/**
* Handles requests for executing a routine
+ *
+ * @return Does not return
*/
function PMA_RTN_handleExecute()
{
@@ -1344,8 +1390,8 @@ function PMA_RTN_handleExecute()
/**
* Creates the HTML code that shows the routine execution dialog.
*
- * @param array $routine Data for the routine returned by
- * PMA_RTN_getDataFromName()
+ * @param array $routine Data for the routine returned by
+ * PMA_RTN_getDataFromName()
*
* @return string HTML code for the routine execution dialog.
*/
diff --git a/pmd_general.php b/pmd_general.php
index 8f2c48d0dc..d620da82ec 100644
--- a/pmd_general.php
+++ b/pmd_general.php
@@ -228,23 +228,24 @@ for ($i = 0; $i < count($GLOBALS['PMD']["TABLE_NAME"]); $i++) {
- ';
- echo __('The Advisor system can provide recommendations on server variables by analyzing the server status variables.');
- echo '
';
- echo __('Do note however that this system provides recommendations based on simple calculations and by rule of thumb which may not necessarily apply to your system.');
- echo '
';
- echo __('Prior to changing any of the configuration, be sure to know what you are changing (by reading the documentation) and how to undo the change. Wrong tuning can have a very negative effect on performance.');
- echo '
';
- echo __('The best way to tune your system would be to change only one setting at a time, observe or benchmark your database, and undo the change if there was no clearly measurable improvement.');
- echo '
';
- ?>
+';
+echo __('The Advisor system can provide recommendations on server variables by analyzing the server status variables.');
+echo '
';
+echo __('Do note however that this system provides recommendations based on simple calculations and by rule of thumb which may not necessarily apply to your system.');
+echo '
';
+echo __('Prior to changing any of the configuration, be sure to know what you are changing (by reading the documentation) and how to undo the change. Wrong tuning can have a very negative effect on performance.');
+echo '
';
+echo __('The best way to tune your system would be to change only one setting at a time, observe or benchmark your database, and undo the change if there was no clearly measurable improvement.');
+echo '
';
+?>
@@ -1024,11 +1023,11 @@ function printQueryStatistics()