Skip to content

Commit

Permalink
Spaces between parameters in function calls
Browse files Browse the repository at this point in the history
  • Loading branch information
madhuracj committed Sep 23, 2011
1 parent ac088aa commit e67a0a2
Show file tree
Hide file tree
Showing 45 changed files with 171 additions and 171 deletions.
2 changes: 1 addition & 1 deletion db_operations.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@
// to avoid selecting alternatively the current and new db // to avoid selecting alternatively the current and new db
// we would need to modify the CREATE definitions to qualify // we would need to modify the CREATE definitions to qualify
// the db name // the db name
$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) . '\';');
if ($event_names) { if ($event_names) {
foreach ($event_names as $event_name) { foreach ($event_names as $event_name) {
PMA_DBI_select_db($db); PMA_DBI_select_db($db);
Expand Down
2 changes: 1 addition & 1 deletion export.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ function PMA_exportOutputHandler($line)
// Download // Download
// (avoid rewriting data containing HTML with anchors and forms; // (avoid rewriting data containing HTML with anchors and forms;
// this was reported to happen under Plesk) // this was reported to happen under Plesk)
@ini_set('url_rewriter.tags',''); @ini_set('url_rewriter.tags', '');
$filename = PMA_sanitize_filename($filename); $filename = PMA_sanitize_filename($filename);


PMA_download_header($filename, $mime_type); PMA_download_header($filename, $mime_type);
Expand Down
4 changes: 2 additions & 2 deletions libraries/List_Database.class.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -453,10 +453,10 @@ protected function _checkAgainstPrivTables()
// TODO: db names may contain characters // TODO: db names may contain characters
// that are regexp instructions // that are regexp instructions
$re = '(^|(\\\\\\\\)+|[^\])'; $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 // Fixed db name matching
// 2000-08-28 -- Benjamin Gandon // 2000-08-28 -- Benjamin Gandon
if (preg_match('/^' . addcslashes($tmp_regex,'/') . '$/', $tmp_db)) { if (preg_match('/^' . addcslashes($tmp_regex, '/') . '$/', $tmp_db)) {
$dblist[] = $tmp_db; $dblist[] = $tmp_db;
break; break;
} }
Expand Down
40 changes: 20 additions & 20 deletions libraries/auth/swekey/swekey.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,18 +18,18 @@
/** /**
* Errors codes * Errors codes
*/ */
define ("SWEKEY_ERR_INVALID_DEV_STATUS",901); // The satus of the device is not SWEKEY_STATUS_OK define ("SWEKEY_ERR_INVALID_DEV_STATUS", 901); // The satus of the device is not SWEKEY_STATUS_OK
define ("SWEKEY_ERR_INTERNAL",902); // Should never occurd define ("SWEKEY_ERR_INTERNAL", 902); // Should never occurd
define ("SWEKEY_ERR_OUTDATED_RND_TOKEN",910); // You random token is too old define ("SWEKEY_ERR_OUTDATED_RND_TOKEN", 910); // You random token is too old
define ("SWEKEY_ERR_INVALID_OTP",911); // The otp was not correct define ("SWEKEY_ERR_INVALID_OTP", 911); // The otp was not correct


/** /**
* Those errors are considered as an attack and your site will be blacklisted during one minute * Those errors are considered as an attack and your site will be blacklisted during one minute
* if you receive one of those errors * if you receive one of those errors
*/ */
define ("SWEKEY_ERR_BADLY_ENCODED_REQUEST",920); define ("SWEKEY_ERR_BADLY_ENCODED_REQUEST", 920);
define ("SWEKEY_ERR_INVALID_RND_TOKEN",921); define ("SWEKEY_ERR_INVALID_RND_TOKEN", 921);
define ("SWEKEY_ERR_DEV_NOT_FOUND",922); define ("SWEKEY_ERR_DEV_NOT_FOUND", 922);


/** /**
* Default values for configuration. * Default values for configuration.
Expand Down Expand Up @@ -252,7 +252,7 @@ function Swekey_HttpGet($url, &$response_code)
$r = new HttpRequest($url); $r = new HttpRequest($url);
$options = array('timeout' => '3'); $options = array('timeout' => '3');


if (substr($url,0, 6) == "https:") if (substr($url, 0, 6) == "https:")
{ {
$sslOptions = array(); $sslOptions = array();
$sslOptions['verifypeer'] = true; $sslOptions['verifypeer'] = true;
Expand Down Expand Up @@ -392,7 +392,7 @@ function Swekey_GetFastHalfRndToken()
{ {
// we unlink the file so no possible tempfile race attack // we unlink the file so no possible tempfile race attack
unlink($cachefile); unlink($cachefile);
$file = fopen($cachefile , "x"); $file = fopen($cachefile, "x");
if ($file != false) if ($file != false)
{ {
@fwrite($file, $res); @fwrite($file, $res);
Expand Down Expand Up @@ -442,22 +442,22 @@ function Swekey_CheckOtp($id, $rt, $otp)
* Values that are associated with a key. * Values that are associated with a key.
* The following values can be returned by the Swekey_GetStatus() function * The following values can be returned by the Swekey_GetStatus() function
*/ */
define ("SWEKEY_STATUS_OK",0); define ("SWEKEY_STATUS_OK", 0);
define ("SWEKEY_STATUS_NOT_FOUND",1); // The key does not exist in the db define ("SWEKEY_STATUS_NOT_FOUND", 1); // The key does not exist in the db
define ("SWEKEY_STATUS_INACTIVE",2); // The key has never been activated define ("SWEKEY_STATUS_INACTIVE", 2); // The key has never been activated
define ("SWEKEY_STATUS_LOST",3); // The user has lost his key define ("SWEKEY_STATUS_LOST", 3); // The user has lost his key
define ("SWEKEY_STATUS_STOLEN",4); // The key was stolen define ("SWEKEY_STATUS_STOLEN", 4); // The key was stolen
define ("SWEKEY_STATUS_FEE_DUE",5); // The annual fee was not paid define ("SWEKEY_STATUS_FEE_DUE", 5); // The annual fee was not paid
define ("SWEKEY_STATUS_OBSOLETE",6); // The hardware is no longer supported define ("SWEKEY_STATUS_OBSOLETE", 6); // The hardware is no longer supported
define ("SWEKEY_STATUS_UNKOWN",201); // We could not connect to the authentication server define ("SWEKEY_STATUS_UNKOWN", 201); // We could not connect to the authentication server


/** /**
* Values that are associated with a key. * Values that are associated with a key.
* The Javascript Api can also return the following values * The Javascript Api can also return the following values
*/ */
define ("SWEKEY_STATUS_REPLACED",100); // This key has been replaced by a backup key define ("SWEKEY_STATUS_REPLACED", 100); // This key has been replaced by a backup key
define ("SWEKEY_STATUS_BACKUP_KEY",101); // This key is a backup key that is not activated yet define ("SWEKEY_STATUS_BACKUP_KEY", 101); // This key is a backup key that is not activated yet
define ("SWEKEY_STATUS_NOTPLUGGED",200); // This key is not plugged in the computer define ("SWEKEY_STATUS_NOTPLUGGED", 200); // This key is not plugged in the computer




/** /**
Expand Down
2 changes: 1 addition & 1 deletion libraries/header_scripts.inc.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
} }
<?php <?php
if(count($GLOBALS['js_script']) > 0) { if(count($GLOBALS['js_script']) > 0) {
echo implode("\n",$GLOBALS['js_script'])."\n"; echo implode("\n", $GLOBALS['js_script'])."\n";
} }


foreach ($GLOBALS['js_events'] as $js_event) { foreach ($GLOBALS['js_events'] as $js_event) {
Expand Down
2 changes: 1 addition & 1 deletion libraries/import.lib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ function PMA_getColumnNumberFromName($name)
// base26 to base10 conversion : multiply each number // base26 to base10 conversion : multiply each number
// with corresponding value of the position, in this case // with corresponding value of the position, in this case
// $i=0 : 1; $i=1 : 26; $i=2 : 676; ... // $i=0 : 1; $i=1 : 26; $i=2 : 676; ...
$column_number += $number * pow(26,$i); $column_number += $number * pow(26, $i);
} }
return $column_number; return $column_number;
} else { } else {
Expand Down
4 changes: 2 additions & 2 deletions libraries/mult_submits.inc.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -430,14 +430,14 @@


case 'replace_prefix_tbl': case 'replace_prefix_tbl':
$current = $selected[$i]; $current = $selected[$i];
$newtablename = preg_replace("/^" . $from_prefix . "/" , $to_prefix , $current); $newtablename = preg_replace("/^" . $from_prefix . "/", $to_prefix, $current);
$a_query = 'ALTER TABLE ' . PMA_backquote($selected[$i]) . ' RENAME ' . PMA_backquote($newtablename) ; // CHANGE PREFIX PATTERN $a_query = 'ALTER TABLE ' . PMA_backquote($selected[$i]) . ' RENAME ' . PMA_backquote($newtablename) ; // CHANGE PREFIX PATTERN
$run_parts = true; $run_parts = true;
break; break;


case 'copy_tbl_change_prefix': case 'copy_tbl_change_prefix':
$current = $selected[$i]; $current = $selected[$i];
$newtablename = preg_replace("/^" . $from_prefix . "/" , $to_prefix , $current); $newtablename = preg_replace("/^" . $from_prefix . "/", $to_prefix, $current);
$a_query = 'CREATE TABLE ' . PMA_backquote($newtablename) . ' SELECT * FROM ' . PMA_backquote($selected[$i]) ; // COPY TABLE AND CHANGE PREFIX PATTERN $a_query = 'CREATE TABLE ' . PMA_backquote($newtablename) . ' SELECT * FROM ' . PMA_backquote($selected[$i]) ; // COPY TABLE AND CHANGE PREFIX PATTERN
$run_parts = true; $run_parts = true;
break; break;
Expand Down
2 changes: 1 addition & 1 deletion libraries/replication.inc.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ function PMA_replication_synchronize_db($db, $src_link, $trg_link, $data = true)
$target_columns, $alter_str_array, $add_column_array, $uncommon_columns, $criteria, $target_tables_keys, $counter); $target_columns, $alter_str_array, $add_column_array, $uncommon_columns, $criteria, $target_tables_keys, $counter);


PMA_indexesDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matching_tables, $source_indexes, $target_indexes, 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, $counter); $add_indexes_array, $alter_indexes_array, $remove_indexes_array, $counter);
} }


/** /**
Expand Down
4 changes: 2 additions & 2 deletions libraries/select_lang.lib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ function PMA_langDetect($str, $envType)
if (strpos($expr, '[-_]') === false) { if (strpos($expr, '[-_]') === false) {
$expr = str_replace('|', '([-_][[:alpha:]]{2,3})?|', $expr); $expr = str_replace('|', '([-_][[:alpha:]]{2,3})?|', $expr);
} }
if (($envType == 1 && preg_match('/^(' . addcslashes($expr,'/') . ')(;q=[0-9]\\.[0-9])?$/i', $str)) if (($envType == 1 && preg_match('/^(' . addcslashes($expr, '/') . ')(;q=[0-9]\\.[0-9])?$/i', $str))
|| ($envType == 2 && preg_match('/(\(|\[|;[[:space:]])(' . addcslashes($expr,'/') . ')(;|\]|\))/i', $str))) { || ($envType == 2 && preg_match('/(\(|\[|;[[:space:]])(' . addcslashes($expr, '/') . ')(;|\]|\))/i', $str))) {
if (PMA_langSet($lang)) { if (PMA_langSet($lang)) {
return true; return true;
} }
Expand Down
8 changes: 4 additions & 4 deletions libraries/server_synchronize.lib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ function PMA_updateTargetTables($table, $update_array, $src_db, $trg_db, $trg_li
*/ */
function PMA_insertIntoTargetTable($matching_table, $src_db, $trg_db, $src_link, $trg_link, $table_fields, &$array_insert, $matching_table_index, 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) &$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])) { if (isset($array_insert[$matching_table_index])) {
if (sizeof($array_insert[$matching_table_index])) { if (sizeof($array_insert[$matching_table_index])) {
Expand Down Expand Up @@ -519,7 +519,7 @@ function PMA_insertIntoTargetTable($matching_table, $src_db, $trg_db, $src_link,
unset($delete_array[$table_index[0]]); unset($delete_array[$table_index[0]]);
} }
PMA_addColumnsInTargetTable($src_db, $trg_db, $src_link, $trg_link, $matching_tables, $source_columns, $add_column_array, 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, $matching_tables_fields, $criteria, $matching_tables_keys, $target_tables_keys, $uncommon_tables, $uncommon_tables_fields,
$table_index[0], $uncommon_cols, $display); $table_index[0], $uncommon_cols, $display);
unset($add_column_array[$table_index[0]]); unset($add_column_array[$table_index[0]]);
} }
Expand Down Expand Up @@ -1125,8 +1125,8 @@ function PMA_indexesDiffInTables($src_db, $trg_db, $src_link, $trg_link, $matchi
&$alter_indexes_array, &$remove_indexes_array, $table_counter) &$alter_indexes_array, &$remove_indexes_array, $table_counter)
{ {
//Gets indexes information for source and target table //Gets indexes information for source and target table
$source_indexes[$table_counter] = PMA_DBI_get_table_indexes($src_db, $matching_tables[$table_counter],$src_link); $source_indexes[$table_counter] = PMA_DBI_get_table_indexes($src_db, $matching_tables[$table_counter], $src_link);
$target_indexes[$table_counter] = PMA_DBI_get_table_indexes($trg_db, $matching_tables[$table_counter],$trg_link); $target_indexes[$table_counter] = PMA_DBI_get_table_indexes($trg_db, $matching_tables[$table_counter], $trg_link);
for ($a = 0; $a < sizeof($source_indexes[$table_counter]); $a++) { for ($a = 0; $a < sizeof($source_indexes[$table_counter]); $a++) {
$found = false; $found = false;
$z = 0; $z = 0;
Expand Down
12 changes: 6 additions & 6 deletions libraries/svg_plot/pma_scatter_plot.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private function _handleOptions()
$this->_dataPoints = array(); $this->_dataPoints = array();
if (! is_null($this->_userSpecifiedSettings)) { if (! is_null($this->_userSpecifiedSettings)) {
foreach (array_keys($this->_userSpecifiedSettings) as $key){ foreach (array_keys($this->_userSpecifiedSettings) as $key){
$this->_settings[$key] = $this->_userSpecifiedSettings[$key]; $this->_settings[$key] = $this->_userSpecifiedSettings[$key];
} }
} }
if ($this->_settings['dataLabel'] == '') { if ($this->_settings['dataLabel'] == '') {
Expand Down Expand Up @@ -188,17 +188,17 @@ public function asSVG()
* *
* @return an array containing the scale, x and y offsets * @return an array containing the scale, x and y offsets
*/ */
private function _scaleDataSet($data,$xField,$yField) private function _scaleDataSet($data, $xField, $yField)
{ {


// Currently assuming only numeric fields are selected // Currently assuming only numeric fields are selected
$coordinates = array(); $coordinates = array();
foreach ($data as $row) { foreach ($data as $row) {
$coordinates[0][] = $row[$xField]; $coordinates[0][] = $row[$xField];
$coordinates[1][] = $row[$yField]; $coordinates[1][] = $row[$yField];
} }
for ($i = 0 ; $i < 2 ; $i++) { for ($i = 0 ; $i < 2 ; $i++) {
$maxC = ($i == 0) ? 500 : 320; $maxC = ($i == 0) ? 500 : 320;


if ( !is_numeric($coordinates[$i][0])) { if ( !is_numeric($coordinates[$i][0])) {
$uniqueC = array_unique($coordinates[$i]); $uniqueC = array_unique($coordinates[$i]);
Expand Down Expand Up @@ -244,8 +244,8 @@ private function _prepareDataSet($data, $color_number, $scale_data, $label)
for ($i = 0 ; $i < count($data) ; $i++) { for ($i = 0 ; $i < count($data) ; $i++) {


$index = $color_number % sizeof($this->_settings['colors']); $index = $color_number % sizeof($this->_settings['colors']);

$data_element = new PMA_SVG_Data_Point($scale_data[0][$i],$scale_data[1][$i],$data[$i][$label],$data[$i]); $data_element = new PMA_SVG_Data_Point($scale_data[0][$i], $scale_data[1][$i], $data[$i][$label], $data[$i]);


$options = array('color' => $this->_settings['colors'][$index], 'id' => $i); $options = array('color' => $this->_settings['colors'][$index], 'id' => $i);
$this->_dataPoints[] = $data_element; $this->_dataPoints[] = $data_element;
Expand Down
8 changes: 4 additions & 4 deletions libraries/svg_plot/pma_svg_data_point.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PMA_SVG_Data_Point extends PMA_SVG_Data_Element
* X-Coordinate of the point * X-Coordinate of the point
*/ */
private $cx; private $cx;

/* /*
* Y-Coordinate of the point * Y-Coordinate of the point
*/ */
Expand All @@ -24,7 +24,7 @@ class PMA_SVG_Data_Point extends PMA_SVG_Data_Element
*/ */
public function __construct($cx, $cy, $label, $dataRow) public function __construct($cx, $cy, $label, $dataRow)
{ {
parent::__construct($label,$dataRow); parent::__construct($label, $dataRow);
$this->cx = $cx; $this->cx = $cx;
$this->cy = $cy; $this->cy = $cy;
} }
Expand All @@ -50,7 +50,7 @@ protected function prepareSvg($options)
'stroke' => $options['color'], 'stroke' => $options['color'],
'stroke-width'=> 2, 'stroke-width'=> 2,
); );

$row = '<circle cx="' . $this->cx . '" cy="' . $this->cy . '" r=".1"'; $row = '<circle cx="' . $this->cx . '" cy="' . $this->cy . '" r=".1"';
foreach ($point_options as $option => $val) { foreach ($point_options as $option => $val) {
$row .= ' ' . $option . '="' . trim($val) . '"'; $row .= ' ' . $option . '="' . trim($val) . '"';
Expand All @@ -59,7 +59,7 @@ protected function prepareSvg($options)


return $row; return $row;
} }

public function getCx() public function getCx()
{ {
return $this->cx; return $this->cx;
Expand Down
4 changes: 2 additions & 2 deletions libraries/sysinfo.lib.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
*/ */
function getSysInfo() function getSysInfo()
{ {
$supported = array('Linux','WINNT'); $supported = array('Linux', 'WINNT');


$sysinfo = array(); $sysinfo = array();


Expand Down Expand Up @@ -110,7 +110,7 @@ class Linux


function loadavg() { function loadavg() {
$buf = file_get_contents('/proc/stat'); $buf = file_get_contents('/proc/stat');
$nums=preg_split("/\s+/", substr($buf,0,strpos($buf,"\n"))); $nums=preg_split("/\s+/", substr($buf, 0, strpos($buf, "\n")));
return Array('busy' => $nums[1]+$nums[2]+$nums[3], 'idle' => intval($nums[4])); return Array('busy' => $nums[1]+$nums[2]+$nums[3], 'idle' => intval($nums[4]));
} }


Expand Down
2 changes: 1 addition & 1 deletion navigation.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ function PMA_exitNavigationFrame()
echo '</div>' . "\n"; echo '</div>' . "\n";


$common_url_query = PMA_generate_common_url(); $common_url_query = PMA_generate_common_url();
PMA_displayDbList($GLOBALS['pma']->databases->getGroupedDetails($_SESSION['tmp_user_values']['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']), $_SESSION['tmp_user_values']['navi_limit_offset'],$GLOBALS['cfg']['MaxDbList']); PMA_displayDbList($GLOBALS['pma']->databases->getGroupedDetails($_SESSION['tmp_user_values']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']), $_SESSION['tmp_user_values']['navi_limit_offset'], $GLOBALS['cfg']['MaxDbList']);
} }


/** /**
Expand Down
18 changes: 9 additions & 9 deletions pmd_general.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -287,17 +287,17 @@ class="M_butt" target="_self">';
} else { } else {
?> ?>
<img src="<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>pmd/Field_small<?php <img src="<?php echo $_SESSION['PMA_Theme']->getImgPath(); ?>pmd/Field_small<?php
if (strstr($tab_column[$t_n]["TYPE"][$j],'char') if (strstr($tab_column[$t_n]["TYPE"][$j], 'char')
|| strstr($tab_column[$t_n]["TYPE"][$j],'text')) { || strstr($tab_column[$t_n]["TYPE"][$j], 'text')) {
echo '_char'; echo '_char';
} elseif (strstr($tab_column[$t_n]["TYPE"][$j],'int') } elseif (strstr($tab_column[$t_n]["TYPE"][$j], 'int')
|| strstr($tab_column[$t_n]["TYPE"][$j],'float') || strstr($tab_column[$t_n]["TYPE"][$j], 'float')
|| strstr($tab_column[$t_n]["TYPE"][$j],'double') || strstr($tab_column[$t_n]["TYPE"][$j], 'double')
|| strstr($tab_column[$t_n]["TYPE"][$j],'decimal')) { || strstr($tab_column[$t_n]["TYPE"][$j], 'decimal')) {
echo '_int'; echo '_int';
} elseif (strstr($tab_column[$t_n]["TYPE"][$j],'date') } elseif (strstr($tab_column[$t_n]["TYPE"][$j], 'date')
|| strstr($tab_column[$t_n]["TYPE"][$j],'time') || strstr($tab_column[$t_n]["TYPE"][$j], 'time')
|| strstr($tab_column[$t_n]["TYPE"][$j],'year')) { || strstr($tab_column[$t_n]["TYPE"][$j], 'year')) {
echo '_date'; echo '_date';
} }
?>.png" alt="*" /> ?>.png" alt="*" />
Expand Down
4 changes: 2 additions & 2 deletions pmd_pdf.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
if ('export' == $mode) { if ('export' == $mode) {
$sql = "REPLACE INTO " . $pma_table . " (db_name, table_name, pdf_page_number, x, y) SELECT db_name, table_name, " . $pdf_page_number_q . ", ROUND(x/" . $scale_q . ") , ROUND(y/" . $scale_q . ") y FROM " . $pmd_table . " WHERE db_name = '" . PMA_sqlAddSlashes($db) . "'"; $sql = "REPLACE INTO " . $pma_table . " (db_name, table_name, pdf_page_number, x, y) SELECT db_name, table_name, " . $pdf_page_number_q . ", ROUND(x/" . $scale_q . ") , ROUND(y/" . $scale_q . ") y FROM " . $pmd_table . " WHERE db_name = '" . PMA_sqlAddSlashes($db) . "'";


PMA_query_as_controluser($sql,true,PMA_DBI_QUERY_STORE); PMA_query_as_controluser($sql, true, PMA_DBI_QUERY_STORE);
} }


if ('import' == $mode) { if ('import' == $mode) {
Expand Down Expand Up @@ -101,7 +101,7 @@
echo $choices['create_export']; echo $choices['create_export'];
echo '<input type="hidden" name="mode" value="create_export" />'; echo '<input type="hidden" name="mode" value="create_export" />';
} else { } else {
PMA_display_html_radio('mode', $choices, $checked_choice = '', $line_break = true, $escape_label = false, $class=''); PMA_display_html_radio('mode', $choices, $checked_choice = '', $line_break = true, $escape_label = false, $class = '');
} }
echo '<br />'; echo '<br />';
echo '<label for="newpage">' . __('New page name: ') . '</label>'; echo '<label for="newpage">' . __('New page name: ') . '</label>';
Expand Down
8 changes: 4 additions & 4 deletions pmd_relation_new.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
$existrel_foreign = PMA_getForeigners($db, $T2, '', 'foreign'); $existrel_foreign = PMA_getForeigners($db, $T2, '', 'foreign');
if (isset($existrel_foreign[$F2]) if (isset($existrel_foreign[$F2])
&& isset($existrel_foreign[$F2]['constraint'])) { && isset($existrel_foreign[$F2]['constraint'])) {
PMD_return_new(0,__('Error: relation already exists.')); PMD_return_new(0, __('Error: relation already exists.'));
} }
// note: in InnoDB, the index does not requires to be on a PRIMARY // note: in InnoDB, the index does not requires to be on a PRIMARY
// or UNIQUE key // or UNIQUE key
Expand Down Expand Up @@ -56,8 +56,8 @@
if ($on_update != 'nix') { if ($on_update != 'nix') {
$upd_query .= ' ON UPDATE ' . $on_update; $upd_query .= ' ON UPDATE ' . $on_update;
} }
PMA_DBI_try_query($upd_query) or PMD_return_new(0,__('Error: Relation not added.')); PMA_DBI_try_query($upd_query) or PMD_return_new(0, __('Error: Relation not added.'));
PMD_return_new(1,__('FOREIGN KEY relation added')); PMD_return_new(1, __('FOREIGN KEY relation added'));
} }


// internal (pmadb) relation // internal (pmadb) relation
Expand All @@ -78,7 +78,7 @@
. '\'' . PMA_sqlAddSlashes($T1) . '\',' . '\'' . PMA_sqlAddSlashes($T1) . '\','
. '\'' . PMA_sqlAddSlashes($F1) . '\')'; . '\'' . PMA_sqlAddSlashes($F1) . '\')';


if (PMA_query_as_controluser($q , false, PMA_DBI_QUERY_STORE)) { if (PMA_query_as_controluser($q, false, PMA_DBI_QUERY_STORE)) {
PMD_return_new(1, __('Internal relation added')); PMD_return_new(1, __('Internal relation added'));
} else { } else {
PMD_return_new(0, __('Error: Relation not added.')); PMD_return_new(0, __('Error: Relation not added.'));
Expand Down
6 changes: 3 additions & 3 deletions pmd_relation_upd.php
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
extract($_GET, EXTR_SKIP); extract($_GET, EXTR_SKIP);
$die_save_pos = 0; $die_save_pos = 0;
require_once 'pmd_save_pos.php'; require_once 'pmd_save_pos.php';
list($DB1,$T1) = explode(".",$T1); list($DB1, $T1) = explode(".", $T1);
list($DB2,$T2) = explode(".",$T2); list($DB2, $T2) = explode(".", $T2);


$tables = PMA_DBI_get_tables_full($db, $T1); $tables = PMA_DBI_get_tables_full($db, $T1);
$type_T1 = strtoupper($tables[$T1]['ENGINE']); $type_T1 = strtoupper($tables[$T1]['ENGINE']);
Expand Down Expand Up @@ -54,7 +54,7 @@
} }
PMD_return_upd(1, __('Relation deleted')); PMD_return_upd(1, __('Relation deleted'));


function PMD_return_upd($b,$ret) function PMD_return_upd($b, $ret)
{ {
global $K; global $K;
header("Content-Type: text/xml; charset=utf-8"); header("Content-Type: text/xml; charset=utf-8");
Expand Down
Loading

0 comments on commit e67a0a2

Please sign in to comment.