Remove some unnecessary string concatenations
https://github.com/dseguy/clearPHP/blob/master/rules/no-unnecessary-string-concatenation.md Signed-off-by: Marc Delisle <marc@infomarc.info>
This commit is contained in:
parent
d9bec7f085
commit
06d22e636e
@ -101,8 +101,8 @@ foreach ($tables as $table) {
|
||||
* Displays the comments of the table if MySQL >= 3.23
|
||||
*/
|
||||
if (!empty($show_comment)) {
|
||||
echo __('Table comments:') . ' ';
|
||||
echo htmlspecialchars($show_comment) . '<br /><br />';
|
||||
echo __('Table comments:') , ' ';
|
||||
echo htmlspecialchars($show_comment) , '<br /><br />';
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
12
index.php
12
index.php
@ -171,8 +171,8 @@ if ($server > 0 || count($cfg['Servers']) > 1
|
||||
) {
|
||||
echo '<li id="li_select_server" class="no_bullets" >';
|
||||
include_once 'libraries/select_server.lib.php';
|
||||
echo PMA\libraries\Util::getImage('s_host.png') . " "
|
||||
. PMA_selectServer(true, true);
|
||||
echo PMA\libraries\Util::getImage('s_host.png') , " "
|
||||
, PMA_selectServer(true, true);
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
@ -234,8 +234,8 @@ echo ' <ul>';
|
||||
if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) {
|
||||
echo '<li id="li_select_lang" class="no_bullets">';
|
||||
include_once 'libraries/display_select_lang.lib.php';
|
||||
echo PMA\libraries\Util::getImage('s_lang.png') . " "
|
||||
. PMA_getLanguageSelectorHtml();
|
||||
echo PMA\libraries\Util::getImage('s_lang.png') , " "
|
||||
, PMA_getLanguageSelectorHtml();
|
||||
echo '</li>';
|
||||
}
|
||||
|
||||
@ -243,8 +243,8 @@ if (empty($cfg['Lang']) && count($GLOBALS['available_languages']) > 1) {
|
||||
|
||||
if ($GLOBALS['cfg']['ThemeManager']) {
|
||||
echo '<li id="li_select_theme" class="no_bullets">';
|
||||
echo PMA\libraries\Util::getImage('s_theme.png') . " "
|
||||
. $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
|
||||
echo PMA\libraries\Util::getImage('s_theme.png') , " "
|
||||
, $_SESSION['PMA_Theme_Manager']->getHtmlSelectBox();
|
||||
echo '</li>';
|
||||
}
|
||||
echo '<li id="li_select_fontsize">';
|
||||
|
||||
@ -68,7 +68,7 @@ function PMA_getImage(image, alternate, attributes) {
|
||||
return false;
|
||||
};
|
||||
var sprites = [
|
||||
<?php echo implode($keys, ",\n ") . "\n"; ?>
|
||||
<?php echo implode($keys, ",\n ") , "\n"; ?>
|
||||
];
|
||||
// custom image object, it will eventually be returned by this functions
|
||||
var retval = {
|
||||
|
||||
@ -727,8 +727,8 @@ echo "var mysql_doc_template = '" , PMA\libraries\Util::getMySQLDocuURL('%s')
|
||||
//Max input vars allowed by PHP.
|
||||
$maxInputVars = ini_get('max_input_vars');
|
||||
echo 'var maxInputVars = '
|
||||
. (false === $maxInputVars || '' == $maxInputVars ? 'false' : $maxInputVars)
|
||||
. ';' . "\n";
|
||||
, (false === $maxInputVars || '' == $maxInputVars ? 'false' : $maxInputVars)
|
||||
, ';' , "\n";
|
||||
|
||||
echo "if ($.datepicker) {\n";
|
||||
/* l10n: Display text for calendar close link */
|
||||
|
||||
@ -34,5 +34,5 @@ echo "var PMA_gotoWhitelist = new Array();\n";
|
||||
$i = -1;
|
||||
foreach ($GLOBALS['goto_whitelist'] as $one_whitelist) {
|
||||
$i++;
|
||||
echo 'PMA_gotoWhitelist[' . $i . ']="' . $one_whitelist . '";' . "\n";
|
||||
echo 'PMA_gotoWhitelist[' , $i , ']="' , $one_whitelist , '";' , "\n";
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ if (isset($_POST['submit_export'])
|
||||
echo $form_display->displayErrors();
|
||||
echo '</div>';
|
||||
echo '<form action="prefs_manage.php" method="post">';
|
||||
echo PMA_URL_getHiddenInputs() . "\n";
|
||||
echo PMA_URL_getHiddenInputs() , "\n";
|
||||
echo '<input type="hidden" name="json" value="'
|
||||
, htmlspecialchars($json) , '" />';
|
||||
echo '<input type="hidden" name="fix_errors" value="1" />';
|
||||
@ -293,7 +293,7 @@ if (file_exists('setup/index.php')) {
|
||||
'You can set more settings by modifying config.inc.php, eg. '
|
||||
. 'by using %sSetup script%s.'
|
||||
), '<a href="setup/index.php" target="_blank">', '</a>'
|
||||
) . PMA\libraries\Util::showDocu('setup', 'setup-script');
|
||||
) , PMA\libraries\Util::showDocu('setup', 'setup-script');
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
@ -365,7 +365,7 @@ if (file_exists('setup/index.php')) {
|
||||
<form class="group-cnt prefs-form disableAjax" name="prefs_reset"
|
||||
action="prefs_manage.php" method="post">
|
||||
<?php
|
||||
echo PMA_URL_getHiddenInputs() . __(
|
||||
echo PMA_URL_getHiddenInputs() , __(
|
||||
'You can reset all your settings and restore them to default '
|
||||
. 'values.'
|
||||
);
|
||||
|
||||
@ -98,7 +98,7 @@ echo '<form id="select_lang" method="post" action="'
|
||||
, htmlspecialchars($_SERVER['REQUEST_URI']) , '">';
|
||||
echo PMA_URL_getHiddenInputs();
|
||||
echo '<bdo lang="en" dir="ltr"><label for="lang">';
|
||||
echo __('Language') . (__('Language') != 'Language' ? ' - Language' : '');
|
||||
echo __('Language') , (__('Language') != 'Language' ? ' - Language' : '');
|
||||
echo '</label></bdo><br />';
|
||||
echo '<select id="lang" name="lang" class="autosubmit" lang="en" dir="ltr">';
|
||||
|
||||
@ -163,8 +163,8 @@ if ($cf->getServerCount() > 0) {
|
||||
echo '<table cellspacing="0" class="datatable" style="table-layout: fixed">';
|
||||
echo '<tr>';
|
||||
echo '<th>#</th>';
|
||||
echo '<th>' . __('Name') . '</th>';
|
||||
echo '<th>' . __('Authentication type') . '</th>';
|
||||
echo '<th>' , __('Name') , '</th>';
|
||||
echo '<th>' , __('Authentication type') , '</th>';
|
||||
echo '<th colspan="2">DSN</th>';
|
||||
echo '</tr>';
|
||||
|
||||
|
||||
@ -58,7 +58,7 @@ function PMA_Process_formset(FormDisplay $form_display)
|
||||
<?php echo __('Ignore errors') ?>
|
||||
</a>
|
||||
|
||||
<a class="btn" href="<?php echo PMA_URL_getCommon() . $separator ?>page=<?php echo $page . $formset . $formId . $separator ?>mode=edit">
|
||||
<a class="btn" href="<?php echo PMA_URL_getCommon() , $separator ?>page=<?php echo $page , $formset , $formId , $separator ?>mode=edit">
|
||||
<?php echo __('Show form') ?>
|
||||
</a>
|
||||
<?php
|
||||
|
||||
@ -8,10 +8,10 @@
|
||||
<?php echo __('Name'); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php echo __('Type') . PMA\libraries\Util::showMySQLDocu('data-types'); ?>
|
||||
<?php echo __('Type') , PMA\libraries\Util::showMySQLDocu('data-types'); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php echo __('Length/Values') . PMA\libraries\Util::showHint(
|
||||
<?php echo __('Length/Values') , PMA\libraries\Util::showHint(
|
||||
__(
|
||||
'If column type is "enum" or "set", please enter the values using'
|
||||
. ' this format: \'a\',\'b\',\'c\'…<br />If you ever need to put'
|
||||
@ -22,7 +22,7 @@
|
||||
); ?>
|
||||
</th>
|
||||
<th>
|
||||
<?php echo __('Default') . PMA\libraries\Util::showHint(
|
||||
<?php echo __('Default') , PMA\libraries\Util::showHint(
|
||||
__(
|
||||
'For default values, please enter just a single value,'
|
||||
. ' without backslash escaping or quotes, using this format: a'
|
||||
@ -44,7 +44,7 @@
|
||||
&& ! empty($_REQUEST['change_column'])
|
||||
): ?>
|
||||
<th>
|
||||
<?php echo __('Adjust privileges') . PMA\libraries\Util::showDocu('faq', 'faq6-39'); ?>
|
||||
<?php echo __('Adjust privileges') , PMA\libraries\Util::showDocu('faq', 'faq6-39'); ?>
|
||||
</th>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -130,4 +130,4 @@
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<br />
|
||||
<br />
|
||||
|
||||
@ -85,7 +85,7 @@
|
||||
<?php if (isset($_REQUEST['query'])) : ?>
|
||||
<td class="select_all">
|
||||
<input class="select_all_store_col"
|
||||
value="<?php echo htmlspecialchars($t_n_url) . urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>"
|
||||
value="<?php echo htmlspecialchars($t_n_url) , urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>"
|
||||
type="checkbox"
|
||||
id="select_<?php echo htmlspecialchars($t_n_url); ?>._<?php echo urlencode($tab_column[$t_n]["COLUMN_NAME"][$j]); ?>"
|
||||
style="margin: 0;"
|
||||
|
||||
@ -52,7 +52,7 @@ $cell_text = ($approx_rows)
|
||||
</th>
|
||||
<th>
|
||||
<?php if (! empty($db_collation)): ?>
|
||||
<dfn title="<?php echo PMA_getCollationDescr($db_collation) . ' (' . __('Default'). ')'; ?>">
|
||||
<dfn title="<?php echo PMA_getCollationDescr($db_collation) , ' (' , __('Default') , ')'; ?>">
|
||||
<?php echo $db_collation; ?>
|
||||
</dfn>
|
||||
<?php endif; ?>
|
||||
|
||||
@ -8,7 +8,7 @@ $fav_params = array('db' => $db,
|
||||
?>
|
||||
<a id="<?php echo md5($current_table['TABLE_NAME']); ?>_favorite_anchor"
|
||||
class="ajax favorite_table_anchor"
|
||||
href="<?php echo 'db_structure.php' . PMA_URL_getCommon($fav_params); ?>"
|
||||
href="<?php echo 'db_structure.php' , PMA_URL_getCommon($fav_params); ?>"
|
||||
title="<?php echo $already_favorite ? __("Remove from Favorites") : __("Add to Favorites"); ?>"
|
||||
data-favtargets="<?php echo md5($db . "." . $current_table['TABLE_NAME']); ?>" >
|
||||
<?php echo !$already_favorite ? $titles['NoFavorite'] : $titles['Favorite']; ?>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<form method="post" action="server_databases.php" id="create_database_form" class="ajax">
|
||||
<strong>
|
||||
<label for="text_create_db">
|
||||
<?php echo \PMA\libraries\Util::getImage('b_newdb.png') . ' ' . __('Create database'); ?>
|
||||
<?php echo \PMA\libraries\Util::getImage('b_newdb.png') , ' ' , __('Create database'); ?>
|
||||
</label> <?php echo \PMA\libraries\Util::showMySQLDocu('CREATE_DATABASE'); ?>
|
||||
</strong>
|
||||
<br />
|
||||
@ -24,13 +24,13 @@
|
||||
<?php else: ?>
|
||||
<!-- db creation no privileges message -->
|
||||
<strong>
|
||||
<?php echo \PMA\libraries\Util::getImage('b_newdb.png') . ' ' . __('Create database'); ?> <?php echo \PMA\libraries\Util::showMySQLDocu('CREATE_DATABASE'); ?>
|
||||
<?php echo \PMA\libraries\Util::getImage('b_newdb.png') , ' ' , __('Create database'); ?> <?php echo \PMA\libraries\Util::showMySQLDocu('CREATE_DATABASE'); ?>
|
||||
</strong>
|
||||
<br />
|
||||
|
||||
<span class="noPrivileges">
|
||||
<?php echo \PMA\libraries\Util::getImage('s_error2.png', '', array('hspace' => 2, 'border' => 0, 'align' => 'middle')) . ' ' . __('No Privileges'); ?>
|
||||
<?php echo \PMA\libraries\Util::getImage('s_error2.png', '', array('hspace' => 2, 'border' => 0, 'align' => 'middle')) , ' ' , __('No Privileges'); ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
</li>
|
||||
</ul>
|
||||
</ul>
|
||||
|
||||
@ -11,7 +11,7 @@
|
||||
</td>
|
||||
<?php endif; ?>
|
||||
<td class="name">
|
||||
<a href="<?php echo \PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') . $url_query . '&db=' . urlencode($current['SCHEMA_NAME']); ?>"
|
||||
<a href="<?php echo \PMA\libraries\Util::getScriptNameForOption($GLOBALS['cfg']['DefaultTabDatabase'], 'database') , $url_query , '&db=' , urlencode($current['SCHEMA_NAME']); ?>"
|
||||
title="<?php echo sprintf(__('Jump to database'), htmlspecialchars($current['SCHEMA_NAME'])); ?>">
|
||||
<?php echo htmlspecialchars($current['SCHEMA_NAME']); ?>
|
||||
</a>
|
||||
@ -62,4 +62,4 @@
|
||||
<?php echo \PMA\libraries\Util::getIcon('s_rights.png', __('Check privileges')); ?>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<div class="label">
|
||||
<strong>
|
||||
<label for="input_index_name">
|
||||
<?php echo __('Index name:') . PMA\libraries\Util::showHint(
|
||||
<?php echo __('Index name:') , PMA\libraries\Util::showHint(
|
||||
PMA\libraries\Message::notice(
|
||||
__(
|
||||
'"PRIMARY" <b>must</b> be the name of and <b>only of</b> a primary key!'
|
||||
@ -37,7 +37,7 @@
|
||||
<div class="label">
|
||||
<strong>
|
||||
<label for="select_index_choice">
|
||||
<?php echo __('Index choice:') . PMA\libraries\Util::showMySQLDocu('ALTER_TABLE'); ?>
|
||||
<?php echo __('Index choice:') , PMA\libraries\Util::showMySQLDocu('ALTER_TABLE'); ?>
|
||||
</label>
|
||||
</strong>
|
||||
</div>
|
||||
@ -71,7 +71,7 @@
|
||||
<div class="label">
|
||||
<strong>
|
||||
<label for="select_index_type">
|
||||
<?php echo __('Index type:') . PMA\libraries\Util::showMySQLDocu('ALTER_TABLE'); ?>
|
||||
<?php echo __('Index type:') , PMA\libraries\Util::showMySQLDocu('ALTER_TABLE'); ?>
|
||||
</label>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
@ -9,7 +9,7 @@
|
||||
<th><?php echo __('Actions'); ?></th>
|
||||
<th><?php echo __('Constraint properties'); ?></th>
|
||||
<th><?php
|
||||
echo __('Column') . PMA\libraries\Util::showHint(__(
|
||||
echo __('Column') , PMA\libraries\Util::showHint(__(
|
||||
'Only columns with index will be displayed. You can define an'
|
||||
. ' index below.'
|
||||
)) ?>
|
||||
@ -73,7 +73,7 @@
|
||||
<?php $save_row = array_values($columns);
|
||||
$saved_row_cnt = count($save_row);?>
|
||||
<fieldset>
|
||||
<legend><?php echo __('Internal relations') . PMA\libraries\Util::showDocu('config', 'cfg_Servers_relation'); ?></legend>
|
||||
<legend><?php echo __('Internal relations') , PMA\libraries\Util::showDocu('config', 'cfg_Servers_relation'); ?></legend>
|
||||
<table id="internal_relations" class="relationalTable">
|
||||
<tr>
|
||||
<th><?php echo __('Column'); ?></th>
|
||||
|
||||
@ -3,7 +3,7 @@ use PMA\libraries\Util; ?>
|
||||
<div id="partitions">
|
||||
<fieldset>
|
||||
<legend><?php echo __('Partitions')
|
||||
. Util::showMySQLDocu('partitioning'); ?>
|
||||
, Util::showMySQLDocu('partitioning'); ?>
|
||||
</legend>
|
||||
<?php if (empty($partitions)): ?>
|
||||
<?php echo Message::notice(__('No partitioning defined!'))->getDisplay(); ?>
|
||||
@ -51,9 +51,9 @@ use PMA\libraries\Util; ?>
|
||||
<code>
|
||||
<?php
|
||||
echo htmlspecialchars($partition->getExpression())
|
||||
. ($partition->getMethod() == 'LIST' ? ' IN (' : ' < ')
|
||||
. htmlspecialchars($partition->getDescription())
|
||||
. ($partition->getMethod() == 'LIST' ? ')' : '');
|
||||
, ($partition->getMethod() == 'LIST' ? ' IN (' : ' < ')
|
||||
.,htmlspecialchars($partition->getDescription())
|
||||
, ($partition->getMethod() == 'LIST' ? ')' : '');
|
||||
?>
|
||||
</code>
|
||||
</td>
|
||||
|
||||
@ -52,7 +52,7 @@
|
||||
= PMA\libraries\Util::formatByteDown($showtable['Avg_row_length'], 6, 1); ?>
|
||||
<tr class="<?php echo (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?php echo __('Row length'); ?></th>
|
||||
<td class="value"><?php echo ($avg_row_length_value . ' ' . $avg_row_length_unit); ?></td>
|
||||
<td class="value"><?php echo $avg_row_length_value , ' ' , $avg_row_length_unit; ?></td>
|
||||
</tr>
|
||||
<?php unset($avg_row_length_value, $avg_row_length_unit); ?>
|
||||
<?php endif; ?>
|
||||
@ -64,7 +64,7 @@
|
||||
&& $mergetable == false): ?>
|
||||
<tr class="<?php echo (($odd_row = !$odd_row) ? 'odd' : 'even'); ?>">
|
||||
<th class="name"><?php echo __('Row size'); ?></th>
|
||||
<td class="value"><?php echo ($avg_size . ' ' . $avg_unit); ?></td>
|
||||
<td class="value"><?php echo $avg_size , ' ' , $avg_unit; ?></td>
|
||||
</tr>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user