Permalink
Browse files

More style errors fixed

  • Loading branch information...
1 parent 21c5148 commit 299da6d047de5374ea8964c17f9c6bff059391e8 @madhuracj madhuracj committed Sep 23, 2011
Showing with 31 additions and 26 deletions.
  1. +1 −1 libraries/List_Database.class.php
  2. +2 −2 libraries/export/sql.php
  3. +6 −6 libraries/opendocument.lib.php
  4. +17 −14 pmd_relation_upd.php
  5. +5 −3 server_synchronize.php
View
2 libraries/List_Database.class.php
@@ -453,7 +453,7 @@ protected function _checkAgainstPrivTables()
// TODO: db names may contain characters
// that are regexp instructions
$re = '(^|(\\\\\\\\)+|[^\])';
- $tmp_regex = preg_replace('/' . addcslashes($re, '/') . '%/', '\\1.*', preg_replace('/' . addcslashes($re,'/') . '_/', '\\1.{1}', $tmp_matchpattern));
+ $tmp_regex = preg_replace('/' . addcslashes($re, '/') . '%/', '\\1.*', preg_replace('/' . addcslashes($re, '/') . '_/', '\\1.{1}', $tmp_matchpattern));
// Fixed db name matching
// 2000-08-28 -- Benjamin Gandon
if (preg_match('/^' . addcslashes($tmp_regex, '/') . '$/', $tmp_db)) {
View
4 libraries/export/sql.php
@@ -627,7 +627,7 @@ function PMA_exportDBFooter($db)
$delimiter = '$$';
if (PMA_MYSQL_INT_VERSION > 50100) {
- $event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= \'' . PMA_sqlAddSlashes($db,true) . '\';');
+ $event_names = PMA_DBI_fetch_result('SELECT EVENT_NAME FROM information_schema.EVENTS WHERE EVENT_SCHEMA= \'' . PMA_sqlAddSlashes($db, true) . '\';');
} else {
$event_names = array();
}
@@ -759,7 +759,7 @@ function PMA_getTableDef($db, $table, $crlf, $error_url, $show_dates = false, $a
$schema_create .= $new_crlf;
// no need to generate a DROP VIEW here, it was done earlier
- if (! empty($sql_drop_table) && ! PMA_Table::isView($db,$table)) {
+ if (! empty($sql_drop_table) && ! PMA_Table::isView($db, $table)) {
$schema_create .= 'DROP TABLE IF EXISTS ' . PMA_backquote($table, $sql_backquotes) . ';' . $crlf;
}
View
12 libraries/opendocument.lib.php
@@ -45,8 +45,8 @@ function PMA_createOpenDocument($mime, $data)
. '<meta:initial-creator>phpMyAdmin ' . PMA_VERSION . '</meta:initial-creator>'
. '<meta:creation-date>' . strftime('%Y-%m-%dT%H:%M:%S') . '</meta:creation-date>'
. '</office:meta>'
- . '</office:document-meta>'
- , 'meta.xml');
+ . '</office:document-meta>',
+ 'meta.xml');
$zipfile -> addFile('<?xml version="1.0" encoding="UTF-8"?' . '>'
. '<office:document-styles '. $GLOBALS['OpenDocumentNS'] . 'office:version="1.0">'
. '<office:font-face-decls>'
@@ -89,16 +89,16 @@ function PMA_createOpenDocument($mime, $data)
. '<office:master-styles>'
. '<style:master-page style:name="Standard" style:page-layout-name="pm1"/>'
. '</office:master-styles>'
- . '</office:document-styles>'
- , 'styles.xml');
+ . '</office:document-styles>',
+ 'styles.xml');
$zipfile -> addFile('<?xml version="1.0" encoding="UTF-8"?' . '>'
. '<manifest:manifest xmlns:manifest="urn:oasis:names:tc:opendocument:xmlns:manifest:1.0">'
. '<manifest:file-entry manifest:media-type="' . $mime . '" manifest:full-path="/"/>'
. '<manifest:file-entry manifest:media-type="text/xml" manifest:full-path="content.xml"/>'
. '<manifest:file-entry manifest:media-type="text/xml" manifest:full-path="meta.xml"/>'
. '<manifest:file-entry manifest:media-type="text/xml" manifest:full-path="styles.xml"/>'
- . '</manifest:manifest>'
- , 'META-INF/manifest.xml');
+ . '</manifest:manifest>',
+ 'META-INF/manifest.xml');
return $zipfile -> file();
}
?>
View
31 pmd_relation_upd.php
@@ -41,24 +41,27 @@
}
if ($try_to_delete_internal_relation) {
// internal relations
- PMA_query_as_controluser('DELETE FROM '
- . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
- . $cfg['Server']['relation'].' WHERE '
- . 'master_db = \'' . PMA_sqlAddSlashes($DB2) . '\''
- . ' AND master_table = \'' . PMA_sqlAddSlashes($T2) . '\''
- . ' AND master_field = \'' . PMA_sqlAddSlashes($F2) . '\''
- . ' AND foreign_db = \'' . PMA_sqlAddSlashes($DB1) . '\''
- . ' AND foreign_table = \'' . PMA_sqlAddSlashes($T1) . '\''
- . ' AND foreign_field = \'' . PMA_sqlAddSlashes($F1) . '\''
- , false, PMA_DBI_QUERY_STORE);
+ PMA_query_as_controluser(
+ 'DELETE FROM '
+ . PMA_backquote($GLOBALS['cfgRelation']['db']) . '.'
+ . $cfg['Server']['relation'].' WHERE '
+ . 'master_db = \'' . PMA_sqlAddSlashes($DB2) . '\''
+ . ' AND master_table = \'' . PMA_sqlAddSlashes($T2) . '\''
+ . ' AND master_field = \'' . PMA_sqlAddSlashes($F2) . '\''
+ . ' AND foreign_db = \'' . PMA_sqlAddSlashes($DB1) . '\''
+ . ' AND foreign_table = \'' . PMA_sqlAddSlashes($T1) . '\''
+ . ' AND foreign_field = \'' . PMA_sqlAddSlashes($F1) . '\'',
+ false,
+ PMA_DBI_QUERY_STORE
+ );
}
PMD_return_upd(1, __('Relation deleted'));
function PMD_return_upd($b, $ret)
{
- global $K;
- header("Content-Type: text/xml; charset=utf-8");
- header("Cache-Control: no-cache");
- die('<root act="relation_upd" return="'.$ret.'" b="'.$b.'" K="'.$K.'"></root>');
+ global $K;
+ header("Content-Type: text/xml; charset=utf-8");
+ header("Cache-Control: no-cache");
+ die('<root act="relation_upd" return="'.$ret.'" b="'.$b.'" K="'.$K.'"></root>');
}
?>
View
8 server_synchronize.php
@@ -1109,13 +1109,15 @@
PMA_updateTargetTables($matching_tables, $update_array, $src_db, $trg_db,
$trg_link, $p, $matching_tables_keys, true);
- PMA_insertIntoTargetTable($matching_tables, $src_db, $trg_db, $src_link,
- $trg_link , $matching_tables_fields, $insert_array, $p,
+ PMA_insertIntoTargetTable(
+ $matching_tables, $src_db, $trg_db, $src_link,
+ $trg_link, $matching_tables_fields, $insert_array, $p,
$matching_tables_keys, $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, true);
+ $alter_indexes_array, $delete_array, $update_array, true
+ );
}
/**

0 comments on commit 299da6d

Please sign in to comment.