The branch, master has been updated via 95e90bbba40f90f183b659d8c2d5db5cdfc415d6 (commit) from 55c6eacf3e56da064dae69650480d84acd92d5a3 (commit)
- Log ----------------------------------------------------------------- commit 95e90bbba40f90f183b659d8c2d5db5cdfc415d6 Author: Piotr Przybylski piotrprz@gmail.com Date: Wed Aug 3 23:56:02 2011 +0200
Comments and formatting
-----------------------------------------------------------------------
Summary of changes: libraries/database_interface.lib.php | 30 ++-- libraries/server_synchronize.lib.php | 309 ++++++++++++++++------------------ 2 files changed, 161 insertions(+), 178 deletions(-)
diff --git a/libraries/database_interface.lib.php b/libraries/database_interface.lib.php index 288743e..4eb1819 100644 --- a/libraries/database_interface.lib.php +++ b/libraries/database_interface.lib.php @@ -67,7 +67,13 @@ if (! PMA_DBI_checkMysqlExtension($GLOBALS['cfg']['Server']['extension'])) { require_once './libraries/dbi/' . $GLOBALS['cfg']['Server']['extension'] . '.dbi.lib.php';
/** - * Common Functions + * runs a query + * + * @param string $query + * @param mixed $link + * @param int $options + * @param bool $cache_affected_rows + * @return mixed */ function PMA_DBI_query($query, $link = null, $options = 0, $cache_affected_rows = true) { $res = PMA_DBI_try_query($query, $link, $options, $cache_affected_rows) @@ -78,9 +84,10 @@ function PMA_DBI_query($query, $link = null, $options = 0, $cache_affected_rows /** * runs a query and returns the result * - * @param string $query query to run + * @param string $query query to run * @param resource $link mysql link resource - * @param integer $options + * @param integer $options + * @param bool $cache_affected_rows * @return mixed */ function PMA_DBI_try_query($query, $link = null, $options = 0, $cache_affected_rows = true) @@ -237,9 +244,6 @@ function PMA_DBI_get_tables($database, $link = null) * @return integer a value representing whether $a should be before $b in the * sorted array or not * - * @global string the column the array shall be sorted by - * @global string the sorting order ('ASC' or 'DESC') - * * @access private */ function PMA_usort_comparison_callback($a, $b) @@ -276,9 +280,9 @@ function PMA_usort_comparison_callback($a, $b) * * @todo move into PMA_Table * @param string $database database - * @param string|false $table table + * @param string|bool $table table or false * @param boolean|string $tbl_is_group $table is a table group - * @param resource $link mysql link + * @param mixed $link mysql link * @param integer $limit_offset zero-based offset for the count * @param boolean|integer $limit_count number of tables to return * @param string $sort_by table attribute to sort by @@ -438,12 +442,12 @@ function PMA_DBI_get_tables_full($database, $table = false, $tbl_is_group = fals }
if (! isset($each_tables[$table_name]['Type']) - && isset($each_tables[$table_name]['Engine'])) { + && isset($each_tables[$table_name]['Engine'])) { // pma BC, same parts of PMA still uses 'Type' $each_tables[$table_name]['Type'] =& $each_tables[$table_name]['Engine']; } elseif (! isset($each_tables[$table_name]['Engine']) - && isset($each_tables[$table_name]['Type'])) { + && isset($each_tables[$table_name]['Type'])) { // old MySQL reports Type, newer MySQL reports Engine $each_tables[$table_name]['Engine'] =& $each_tables[$table_name]['Type']; @@ -851,8 +855,6 @@ function PMA_DBI_get_columns($database, $table, $full = false, $link = null) * @param mixed $link mysql link resource|object * @return mixed value for mysql server variable */ - - function PMA_DBI_get_variable($var, $type = PMA_DBI_GETVAR_SESSION, $link = null) { if ($link === null) { @@ -878,8 +880,8 @@ function PMA_DBI_get_variable($var, $type = PMA_DBI_GETVAR_SESSION, $link = null }
/** - * Function called just after a connection to the MySQL database server has been established - * It sets the connection collation, and determins the version of MySQL which is running. + * Function called just after a connection to the MySQL database server has been established + * It sets the connection collation, and determins the version of MySQL which is running. * * @param mixed $link mysql link resource|object * @param boolean $is_controluser diff --git a/libraries/server_synchronize.lib.php b/libraries/server_synchronize.lib.php index b7b332c..513e7e9 100644 --- a/libraries/server_synchronize.lib.php +++ b/libraries/server_synchronize.lib.php @@ -19,7 +19,6 @@ * @param array &$uncommon_source_tables empty array passed by reference to save * names of tables present in source database * but absent from target database - * @return nothing */ function PMA_getMatchingTables($trg_tables, $src_tables, &$matching_tables, &$uncommon_source_tables) { @@ -46,7 +45,6 @@ function PMA_getMatchingTables($trg_tables, $src_tables, &$matching_tables, &$un * @param array &$uncommon_target_tables empty array passed by reference to save * names of tables presnet in target database * but absent from source database - * @return nothing */ function PMA_getNonMatchingTargetTables($trg_tables, $matching_tables, &$uncommon_target_tables) { @@ -85,9 +83,8 @@ function PMA_getNonMatchingTargetTables($trg_tables, $matching_tables, &$uncommo * @param array &$delete_array Unused * @param array &$fields_num A two dimensional array passed by reference to * contain number of fields for each matching table - * @param array $matching_table_index Index of a table from $matching_table array + * @param int $matching_table_index Index of a table from $matching_table array * @param array &$matching_tables_keys A two dimensional array passed by reference to contain names of keys for each matching table - * @return nothing */ function PMA_dataDiffInTables($src_db, $trg_db, $src_link, $trg_link, &$matching_table, &$matching_tables_fields, &$update_array, &$insert_array, &$delete_array, &$fields_num, $matching_table_index, &$matching_tables_keys) @@ -305,7 +302,6 @@ function PMA_dataDiffInTables($src_db, $trg_db, $src_link, $trg_link, &$matching * @param db_link $trg_link connection established with target server * @param string $src_db name of source database * @param db_link $src_link connection established with source server - * @return nothing */ function PMA_findDeleteRowsFromTargetTables(&$delete_array, $matching_table, $matching_table_index, $trg_keys, $src_keys, $trg_db, $trg_link, $src_db, $src_link) { @@ -372,12 +368,11 @@ function PMA_findDeleteRowsFromTargetTables(&$delete_array, $matching_table, $ma /** * PMA_dataDiffInUncommonTables() finds the data difference in $source_tables_uncommon * - * @param $source_tables_uncommon array of table names; containing table names that are in source db and not in target db - * @param $src_db name of source database - * @param $src_link connection established with source server - * @param $index index of a table from $matching_table array - * @param $row_count number of rows - * @return nothing + * @param array $source_tables_uncommon table names that are in source db and not in target db + * @param string $src_db name of source database + * @param mixed $src_link connection established with source server + * @param int $index index of a table from $matching_table array + * @param array $row_count number of rows */ function PMA_dataDiffInUncommonTables($source_tables_uncommon, $src_db, $src_link, $index, &$row_count) { @@ -390,16 +385,15 @@ function PMA_dataDiffInUncommonTables($source_tables_uncommon, $src_db, $src_lin * PMA_updateTargetTables() sets the updated field values to target table rows using $update_array[$matching_table_index] * * - * @param $table Array containing matching tables' names - * @param $update_array A three dimensional array containing field - * value updates required for each matching table - * @param $src_db Name of source database - * @param $trg_db Name of target database - * @param $trg_link Connection established with target server - * @param $matching_table_index index of matching table in matching_table_array - * @param $matching_table_keys - * @param $display true/false value - * @return nothing + * @param array $table Matching tables' names + * @param array $update_array A three dimensional array containing field + * value updates required for each matching table + * @param string $src_db Name of source database + * @param string $trg_db Name of target database + * @param mixed $trg_link Connection established with target server + * @param int $matching_table_index index of matching table in matching_table_array + * @param array $matching_table_keys + * @param boolean $display */ function PMA_updateTargetTables($table, $update_array, $src_db, $trg_db, $trg_link, $matching_table_index, $matching_table_keys, $display) { @@ -447,34 +441,33 @@ function PMA_updateTargetTables($table, $update_array, $src_db, $trg_db, $trg_li /** * PMA_insertIntoTargetTable() inserts missing rows in the target table using $array_insert[$matching_table_index] * - * @param $matching_table array containing matching table names - * @param $src_db name of source database - * @param $trg_db name of target database - * @param $src_link connection established with source server - * @param $trg_link connection established with target server - * @param $table_fields array containing field names of a table - * @param $array_insert - * @param $matching_table_index index of matching table in matching_table_array - * @param $matching_tables_keys array containing field names that are keys in the matching table - * @param $source_columns array containing source column information - * @param $add_column_array array containing column names that are to be added in target table - * @param $criteria array containing criterias like type, null, collation, default etc - * @param $target_tables_keys array containing field names that are keys in the target table - * @param $uncommon_tables array containing table names that are present in source db but not in targt db - * @param $uncommon_tables_fields array containing field names of the uncommon tables - * @param $uncommon_cols column names that are present in target table and not in source table - * @param $alter_str_array array containing column names that are to be altered - * @param $source_indexes column names on which indexes are made in source table - * @param $target_indexes column names on which indexes are made in target table - * @param $add_indexes_array array containing column names on which index is to be added in target table - * @param $alter_indexes_array array containing column names whose indexes are to be altered. Only index name and uniqueness of an index can be changed - * @param $delete_array array containing rows that are to be deleted - * @param $update_array array containing rows that are to be updated in target - * @param $display true/false value - * @return nothing + * @param array $matching_table matching table names + * @param string $src_db name of source database + * @param string $trg_db name of target database + * @param mixed $src_link connection established with source server + * @param mixed $trg_link connection established with target server + * @param array $table_fields field names of a table + * @param array &$array_insert + * @param int $matching_table_index index of matching table in matching_table_array + * @param array $matching_tables_keys field names that are keys in the matching table + * @param array $source_columns source column information + * @param array &$add_column_array column names that are to be added in target table + * @param array $criteria criteria like type, null, collation, default etc + * @param array $target_tables_keys field names that are keys in the target table + * @param array $uncommon_tables table names that are present in source db but not in targt db + * @param array &$uncommon_tables_fields field names of the uncommon tables + * @param array $uncommon_cols column names that are present in target table and not in source table + * @param array &$alter_str_array column names that are to be altered + * @param array &$source_indexes column names on which indexes are made in source table + * @param array &$target_indexes column names on which indexes are made in target table + * @param array &$add_indexes_array column names on which index is to be added in target table + * @param array &$alter_indexes_array column names whose indexes are to be altered. Only index name and uniqueness of an index can be changed + * @param array &$delete_array rows that are to be deleted + * @param array &$update_array rows that are to be updated in target + * @param bool $display */ function PMA_insertIntoTargetTable($matching_table, $src_db, $trg_db, $src_link, $trg_link, $table_fields, &$array_insert, $matching_table_index, - $matching_tables_keys, $source_columns, &$add_column_array, $criteria, $target_tables_keys, $uncommon_tables, &$uncommon_tables_fields,$uncommon_cols, + $matching_tables_keys, $source_columns, &$add_column_array, $criteria, $target_tables_keys, $uncommon_tables, &$uncommon_tables_fields, $uncommon_cols, &$alter_str_array,&$source_indexes, &$target_indexes, &$add_indexes_array, &$alter_indexes_array, &$delete_array, &$update_array, $display) { if (isset($array_insert[$matching_table_index])) { @@ -587,15 +580,14 @@ function PMA_insertIntoTargetTable($matching_table, $src_db, $trg_db, $src_link, /** * PMA_createTargetTables() Create the missing table $uncommon_table in target database * - * @param $src_db name of source database - * @param $trg_db name of target database - * @param $src_link connection established with source server - * @param $trg_link connection established with target server - * @param $uncommon_tables names of tables present in source but not in target - * @param $table_index index of table in $uncommon_tables array - * @param $uncommon_tables_fields field names of the uncommon table - * @param $display true/false value - * @return nothing + * @param string $src_db name of source database + * @param string $trg_db name of target database + * @param mixed $src_link connection established with source server + * @param mixed $trg_link connection established with target server + * @param array &$uncommon_tables names of tables present in source but not in target + * @param int $table_index index of table in $uncommon_tables array + * @param array &$uncommon_tables_fields field names of the uncommon table + * @param bool $display */ function PMA_createTargetTables($src_db, $trg_db, $src_link, $trg_link, &$uncommon_tables, $table_index, &$uncommon_tables_fields, $display) { @@ -640,16 +632,14 @@ function PMA_createTargetTables($src_db, $trg_db, $src_link, $trg_link, &$uncomm /** * PMA_populateTargetTables() inserts data into uncommon tables after they have been created * - * @param $src_db name of source database - * @param $trg_db name of target database - * @param $src_link connection established with source server - * @param $trg_link connection established with target server - * @param $uncommon_tables array containing uncommon table names (table names that are present in source but not in target db) - * @param $table_index index of table in matching_table_array - * @param $uncommon_tables_fields field names of the uncommon table - * @param $display true/false value - * - * @return nothing + * @param string $src_db name of source database + * @param string $trg_db name of target database + * @param mixed $src_link connection established with source server + * @param mixed $trg_link connection established with target server + * @param array $uncommon_tables uncommon table names (table names that are present in source but not in target db) + * @param int $table_index index of table in matching_table_array + * @param array $uncommon_tables_fields field names of the uncommon table + * @param bool $display * * @todo This turns NULL values into '' (empty string) */ @@ -682,14 +672,13 @@ function PMA_populateTargetTables($src_db, $trg_db, $src_link, $trg_link, $uncom /** * PMA_deleteFromTargetTable() delete rows from target table * - * @param $trg_db name of target database - * @param $trg_link connection established with target server - * @param $matching_tables array containing matching table names - * @param $table_index index of table in matching_table_array - * @param $target_tables_keys primary key names of the target tables - * @param $delete_array array containing the key values of rows that are to be deleted - * @param $display true/false value - * @return nothing + * @param string $trg_db name of target database + * @param mixed $trg_link connection established with target server + * @param array $matching_tables matching table names + * @param int $table_index index of table in matching_table_array + * @param array $target_tables_keys primary key names of the target tables + * @param array $delete_array key values of rows that are to be deleted + * @param bool $display */ function PMA_deleteFromTargetTable($trg_db, $trg_link, $matching_tables, $table_index, $target_tables_keys, $delete_array, $display) { @@ -739,22 +728,21 @@ function PMA_deleteFromTargetTable($trg_db, $trg_link, $matching_tables, $table_ * Keys for all the source tables that have a corresponding target table are placed in $matching_tables_keys. * Keys for all the target tables that have a corresponding source table are placed in $target_tables_keys. * - * @param $src_db name of source database - * @param $trg_db name of target database - * @param $src_link connection established with source server - * @param $trg_link connection established with target server - * @param $matching_tables array containing names of matching tables - * @param $source_columns array containing columns information of the source tables - * @param $target_columns array containing columns information of the target tables - * @param $alter_str_array three dimensional associative array first index being the matching table index, second index being column name for which target - * column have some criteria different and third index containing the criteria which is different. - * @param $add_column_array two dimensional associative array, first index of the array contain the matching table number and second index contain the - * column name which is to be added in the target table - * @param $uncommon_columns array containing the columns that are present in the target table but not in the source table - * @param $criteria array containing the criterias which are to be checked for field that is present in source table and target table - * @param $target_tables_keys array containing the field names which is key in the target table - * @param $matching_table_index integer number of the matching table - * @return nothing + * @param string $src_db name of source database + * @param string $trg_db name of target database + * @param mixed $src_link connection established with source server + * @param mixed $trg_link connection established with target server + * @param array $matching_tables names of matching tables + * @param array &$source_columns columns information of the source tables + * @param array &$target_columns columns information of the target tables + * @param array &$alter_str_array three dimensional associative array first index being the matching table index, second index being column name for which target + * column have some criteria different and third index containing the criteria which is different. + * @param array &$add_column_array two dimensional associative array, first index of the array contain the matching table number and second index contain the + * column name which is to be added in the target table + * @param array &$uncommon_columns columns that are present in the target table but not in the source table + * @param array $criteria criteria which are to be checked for field that is present in source table and target table + * @param array &$target_tables_keys field names which is key in the target table + * @param int $matching_table_index number of the matching table */ function PMA_structureDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matching_tables, &$source_columns, &$target_columns, &$alter_str_array, &$add_column_array, &$uncommon_columns, $criteria, &$target_tables_keys, $matching_table_index) @@ -764,7 +752,7 @@ function PMA_structureDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matc $target_columns[$matching_table_index] = PMA_DBI_get_columns_full($trg_db, $matching_tables[$matching_table_index], null, $trg_link); foreach ($source_columns[$matching_table_index] as $column_name => $each_column) { if (isset($target_columns[$matching_table_index][$column_name]['Field'])) { - //If column exists in target table then matches criterias like type, null, collation, key, default, comment of the column + //If column exists in target table then matches criteria like type, null, collation, key, default, comment of the column for ($i = 0; $i < sizeof($criteria); $i++) { if ($source_columns[$matching_table_index][$column_name][$criteria[$i]] != $target_columns[$matching_table_index][$column_name][$criteria[$i]]) { if (($criteria[$i] == 'Default') && ($source_columns[$matching_table_index][$column_name][$criteria[$i]] == '' )) { @@ -802,23 +790,22 @@ function PMA_structureDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matc /** * PMA_addColumnsInTargetTable() adds column that are present in source table but not in target table * - * @param $src_db name of source database - * @param $trg_db name of target database - * @param $src_link connection established with source server - * @param $trg_link connection established with target server - * @param $matching_tables array containing names of matching tables - * @param $source_columns array containing columns information of the source tables - * @param $add_column_array array containing the names of the column(field) that are to be added in the target - * @param $matching_tables_fields - * @param $criteria array containing the criterias - * @param $matching_tables_keys array containing the field names which is key in the source table - * @param $target_tables_keys array containing the field names which is key in the target table - * @param $uncommon_tables array containing the table names that are present in source db and not in target db - * @param $uncommon_tables_fields array containing the names of the fields of the uncommon tables - * @param $table_counter integer number of the matching table - * @param $uncommon_cols - * @param $display true/false value - * @return nothing + * @param string $src_db name of source database + * @param string $trg_db name of target database + * @param mixed $src_link connection established with source server + * @param mixed $trg_link connection established with target server + * @param array $matching_tables names of matching tables + * @param array $source_columns columns information of the source tables + * @param array &$add_column_array the names of the column(field) that are to be added in the target + * @param array $matching_tables_fields + * @param array $criteria criteria + * @param array $matching_tables_keys field names which is key in the source table + * @param array $target_tables_keys field names which is key in the target table + * @param array $uncommon_tables table names that are present in source db and not in target db + * @param array &$uncommon_tables_fields names of the fields of the uncommon tables + * @param int $table_counter number of the matching table + * @param array $uncommon_cols + * @param bool $display */ function PMA_addColumnsInTargetTable($src_db, $trg_db, $src_link, $trg_link, $matching_tables, $source_columns, &$add_column_array, $matching_tables_fields, $criteria, $matching_tables_keys, $target_tables_keys, $uncommon_tables, &$uncommon_tables_fields, $table_counter, $uncommon_cols, $display) @@ -901,17 +888,16 @@ function PMA_addColumnsInTargetTable($src_db, $trg_db, $src_link, $trg_link, $ma * PMA_checkForeignKeys() checks if the referenced table have foreign keys. * uses PMA_createTargetTables() * - * @param $src_db name of source database - * @param $src_link connection established with source server - * @param $trg_db name of target database - * @param $trg_link connection established with target server - * @param $referenced_table table whose column is a foreign key in another table - * @param $uncommon_tables array containing names that are uncommon - * @param $uncommon_tables_fields field names of the uncommon table - * @param $display true/false value - * @return nothing + * @param string $src_db name of source database + * @param mixed $src_link connection established with source server + * @param string $trg_db name of target database + * @param mixed $trg_link connection established with target server + * @param string $referenced_table table whose column is a foreign key in another table + * @param array &$uncommon_tables names that are uncommon + * @param array &$uncommon_tables_fields field names of the uncommon table + * @param bool $display */ -function PMA_checkForeignKeys($src_db, $src_link, $trg_db, $trg_link ,$referenced_table, &$uncommon_tables, &$uncommon_tables_fields, $display) +function PMA_checkForeignKeys($src_db, $src_link, $trg_db, $trg_link, $referenced_table, &$uncommon_tables, &$uncommon_tables_fields, $display) { $is_fk_query = "SELECT * FROM information_schema.KEY_COLUMN_USAGE WHERE TABLE_SCHEMA = '" . $src_db . "' AND TABLE_NAME = '" . $referenced_table . "' AND TABLE_NAME <> REFERENCED_TABLE_NAME;"; @@ -932,18 +918,17 @@ function PMA_checkForeignKeys($src_db, $src_link, $trg_db, $trg_link ,$reference /** * PMA_alterTargetTableStructure() alters structure of the target table using $alter_str_array * - * @param $trg_db name of target database - * @param $trg_link connection established with target server - * @param $matching_tables array containing names of matching tables - * @param $source_columns array containing columns information of the source table - * @param $alter_str_array array containing the column name and criteria which is to be altered for the targert table - * @param $matching_tables_fields array containing the name of the fields for the matching table - * @param $criteria array containing the criterias - * @param $matching_tables_keys array containing the field names which is key in the source table - * @param $target_tables_keys array containing the field names which is key in the target table - * @param $matching_table_index integer number of the matching table - * @param $display true/false value - * @return nothing + * @param string $trg_db name of target database + * @param mixed $trg_link connection established with target server + * @param array $matching_tables names of matching tables + * @param array &$source_columns columns information of the source table + * @param array &$alter_str_array column name and criteria which is to be altered for the targert table + * @param array $matching_tables_fields name of the fields for the matching table + * @param array $criteria criteria + * @param array &$matching_tables_keys field names which is key in the source table + * @param array &$target_tables_keys field names which is key in the target table + * @param int $matching_table_index number of the matching table + * @param bool $display */ function PMA_alterTargetTableStructure($trg_db, $trg_link, $matching_tables, &$source_columns, &$alter_str_array, $matching_tables_fields, $criteria, &$matching_tables_keys, &$target_tables_keys, $matching_table_index, $display) @@ -960,7 +945,8 @@ function PMA_alterTargetTableStructure($trg_db, $trg_link, $matching_tables, &$s } } } - $pri_query; + + $pri_query = null; if (! $check) { $pri_query = "ALTER TABLE " . PMA_backquote($trg_db) . '.' . PMA_backquote($matching_tables[$matching_table_index]); if (sizeof($target_tables_keys[$matching_table_index]) > 0) { @@ -1067,13 +1053,12 @@ function PMA_alterTargetTableStructure($trg_db, $trg_link, $matching_tables, &$s /** * PMA_removeColumnsFromTargetTable() removes the columns which are present in target table but not in source table. * - * @param $trg_db name of target database - * @param $trg_link connection established with target server - * @param $matching_tables array containing names of matching tables - * @param $uncommon_columns array containing the names of the column which are to be dropped from the target table - * @param $table_counter index of the matching table as in $matchiing_tables array - * @param $display true/false value - * @return nothing + * @param string $trg_db name of target database + * @param mixed $trg_link connection established with target server + * @param array $matching_tables names of matching tables + * @param array $uncommon_columns array containing the names of the column which are to be dropped from the target table + * @param int $table_counter index of the matching table as in $matchiing_tables array + * @param bool $display */ function PMA_removeColumnsFromTargetTable($trg_db, $trg_link, $matching_tables, $uncommon_columns, $table_counter, $display) { @@ -1123,18 +1108,17 @@ function PMA_removeColumnsFromTargetTable($trg_db, $trg_link, $matching_tables, * indexes to be altered in $alter_indexes_array and indexes to be removed from target table in $remove_indexes_array. * Only keyname and uniqueness characteristic of the indexes are altered. * - * @param $src_db name of source database - * @param $trg_db name of target database - * @param $src_link connection established with source server - * @param $trg_link connection established with target server - * @param $matching_tables array containing the matching tables name - * @param $source_indexes array containing the indexes of the source table - * @param $target_indexes array containing the indexes of the target table - * @param $add_indexes_array array containing the name of the column on which the index is to be added in the target table - * @param $alter_indexes_array array containing the key name which needs to be altered - * @param $remove_indexes_array array containing the key name of the index which is to be removed from the target table - * @param $table_counter number of the matching table - * @return nothing + * @param string $src_db name of source database + * @param string $trg_db name of target database + * @param mixed $src_link connection established with source server + * @param mixed $trg_link connection established with target server + * @param array $matching_tables matching tables name + * @param array &$source_indexes indexes of the source table + * @param array &$target_indexes indexes of the target table + * @param array &$add_indexes_array name of the column on which the index is to be added in the target table + * @param array &$alter_indexes_array key name which needs to be altered + * @param array &$remove_indexes_array key name of the index which is to be removed from the target table + * @param int $table_counter number of the matching table */ function PMA_indexesDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matching_tables, &$source_indexes, &$target_indexes, &$add_indexes_array, &$alter_indexes_array, &$remove_indexes_array, $table_counter) @@ -1188,17 +1172,16 @@ function PMA_indexesDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matchi /** * PMA_applyIndexesDiff() create indexes, alters indexes and remove indexes. * - * @param $trg_db name of target database - * @param $trg_link connection established with target server - * @param $matching_tables array containing the matching tables name - * @param $source_indexes array containing the indexes of the source table - * @param $target_indexes array containing the indexes of the target table - * @param $add_indexes_array array containing the column names on which indexes are to be created in target table - * @param $alter_indexes_array array containing the column names for which indexes are to be altered - * @param $remove_indexes_array array containing the key name of the indexes which are to be removed from the target table - * @param $table_counter number of the matching table - * @param $display true/false value - * @return nothing + * @param string $trg_db name of target database + * @param mixed $trg_link connection established with target server + * @param array $matching_tables matching tables name + * @param array $source_indexes indexes of the source table + * @param array $target_indexes indexes of the target table + * @param array $add_indexes_array column names on which indexes are to be created in target table + * @param array $alter_indexes_array column names for which indexes are to be altered + * @param array $remove_indexes_array key name of the indexes which are to be removed from the target table + * @param int $table_counter number of the matching table + * @param $display */ function PMA_applyIndexesDiff ($trg_db, $trg_link, $matching_tables, $source_indexes, $target_indexes, $add_indexes_array, $alter_indexes_array, $remove_indexes_array, $table_counter, $display) @@ -1276,8 +1259,7 @@ function PMA_applyIndexesDiff ($trg_db, $trg_link, $matching_tables, $source_ind * PMA_displayQuery() displays a query, taking the maximum display size * into account * - * @param $query the query to display - * @return nothing + * @param string $query the query to display */ function PMA_displayQuery($query) { if (strlen($query) > $GLOBALS['cfg']['MaxCharactersInDisplayedSQL']) { @@ -1291,7 +1273,6 @@ function PMA_displayQuery($query) { * * @param string $src_db source db name * @param string $trg_db target db name - * @return nothing */ function PMA_syncDisplayHeaderCompare($src_db, $trg_db) { echo '<fieldset style="padding:0"><div style="padding:1.5em; overflow:auto; height:220px">';
hooks/post-receive