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:
Marc Delisle 2015-12-06 08:01:07 -05:00
parent 3dcb36b4ca
commit 66c15daba0
10 changed files with 35 additions and 35 deletions

View File

@ -54,8 +54,8 @@ if ($cfgRelation['commwork']) {
* Displays DB comment
*/
if ($comment) {
echo '<p>' . __('Database comment')
. '<br /><i>' . htmlspecialchars($comment) . '</i></p>';
echo '<p>' , __('Database comment')
, '<br /><i>' , htmlspecialchars($comment) , '</i></p>';
} // end if
}
@ -110,10 +110,10 @@ foreach ($tables as $table) {
*/
echo '<table width="100%" class="print">';
echo '<tr><th width="50">' . __('Column') . '</th>';
echo '<th width="80">' . __('Type') . '</th>';
echo '<th width="40">' . __('Null') . '</th>';
echo '<th width="70">' . __('Default') . '</th>';
echo '<tr><th width="50">' , __('Column') , '</th>';
echo '<th width="80">' , __('Type') , '</th>';
echo '<th width="40">' , __('Null') , '</th>';
echo '<th width="70">' , __('Default') , '</th>';
if ($have_rel) {
echo ' <th>' , __('Links to') , '</th>' , "\n";
}
@ -156,10 +156,10 @@ foreach ($tables as $table) {
}
echo '</td>';
echo '<td'
. PMA\libraries\Util::getClassForType(
, PMA\libraries\Util::getClassForType(
$extracted_columnspec['type']
)
. ' lang="en" dir="ltr">' . $type . '</td>';
, ' lang="en" dir="ltr">' , $type , '</td>';
echo '<td>';
echo (($row['Null'] == 'NO') ? __('No') : __('Yes'));

View File

@ -99,7 +99,7 @@ $data = Tracker::getTrackedData($_REQUEST['db'], '', '1');
// No tables present and no log exist
if ($num_tables == 0 && count($data['ddlog']) == 0) {
echo '<p>' . __('No tables found in database.') . '</p>' . "\n";
echo '<p>' , __('No tables found in database.') , '</p>' , "\n";
if (empty($db_is_system_schema)) {
echo PMA_getHtmlForCreateTable($db);

View File

@ -53,7 +53,7 @@ function Show_page($contents)
<body>
<?php
if (isset($_SESSION) && isset($_SESSION['PMA_single_signon_error_message'])) {
echo '<p class="error">' . $_SESSION['PMA_single_signon_message'] . '</p>';
echo '<p class="error">' , $_SESSION['PMA_single_signon_message'] , '</p>';
unset($_SESSION['PMA_single_signon_message']);
}
echo $contents;

View File

@ -194,9 +194,9 @@ for ($a = 0; $a < $geom_count; $a++) {
} else {
$type = $gis_types[0];
}
echo '<select name="gis_data[' . $a . '][gis_type]" class="gis_type">';
echo '<select name="gis_data[' , $a , '][gis_type]" class="gis_type">';
foreach (array_slice($gis_types, 0, 6) as $gis_type) {
echo '<option value="' . $gis_type . '"';
echo '<option value="' , $gis_type , '"';
if ($type == $gis_type) {
echo ' selected="selected"';
}
@ -237,11 +237,11 @@ for ($a = 0; $a < $geom_count; $a++) {
echo '<br/>';
printf(__('Point %d'), $i + 1);
echo ': ';
echo '<label for="x">' . __("X") . '</label>';
echo '<label for="x">' , __("X") , '</label>';
echo '<input type="text"'
, ' name="gis_data[' , $a , '][' , $type , '][' , $i , '][x]"'
, ' value="' , escape($gis_data[$a][$type][$i]['x']) , '" />';
echo '<label for="y">' . __("Y") . '</label>';
echo '<label for="y">' , __("Y") , '</label>';
echo '<input type="text"'
, ' name="gis_data[' , $a , '][' , $type , '][' , $i , '][y]"'
, ' value="' , escape($gis_data[$a][$type][$i]['y']) , '" />';
@ -293,7 +293,7 @@ for ($a = 0; $a < $geom_count; $a++) {
echo('<br/>');
printf(__('Point %d'), $j + 1);
echo ': ';
echo '<label for="x">' . __("X") . '</label>';
echo '<label for="x">' , __("X") , '</label>';
echo '<input type="text" name="gis_data[' , $a , '][' , $type . ']['
, $i , '][' , $j , '][x]" value="'
, escape($gis_data[$a][$type][$i][$j]['x']) , '" />';
@ -366,7 +366,7 @@ for ($a = 0; $a < $geom_count; $a++) {
echo '<br/>';
printf(__('Point %d'), $j + 1);
echo ': ';
echo '<label for="x">' . __("X") . '</label>';
echo '<label for="x">' , __("X") , '</label>';
echo '<input type="text"'
, ' name="gis_data[' , $a , '][' , $type , '][' , $k , ']['
, $i , '][' , $j , '][x]"'

View File

@ -109,7 +109,7 @@ class AuthenticationConfig extends AuthenticationPlugin
} else {
// Check whether user has configured something
if ($GLOBALS['PMA_Config']->source_mtime == 0) {
echo '<p>' . sprintf(
echo '<p>' , sprintf(
__(
'You probably did not create a configuration file.'
. ' You might want to use the %1$ssetup script%2$s to'
@ -117,7 +117,7 @@ class AuthenticationConfig extends AuthenticationPlugin
),
'<a href="setup/">',
'</a>'
) . '</p>' . "\n";
) , '</p>' , "\n";
} elseif (!isset($GLOBALS['errno'])
|| (isset($GLOBALS['errno']) && $GLOBALS['errno'] != 2002)
&& $GLOBALS['errno'] != 2003

View File

@ -229,7 +229,7 @@ class AuthenticationCookie extends AuthenticationPlugin
) {
// If enabled show captcha to the user on the login screen.
echo '<script src="https://www.google.com/recaptcha/api.js?hl='
. $GLOBALS['lang'] . '" async defer></script>';
, $GLOBALS['lang'] , '" async defer></script>';
echo '<div class="g-recaptcha" data-sitekey="'
, $GLOBALS['cfg']['CaptchaLoginPublicKey'] , '"></div>';
}

View File

@ -31,7 +31,7 @@ echo PMA_displayFieldsetTop('config.inc.php', '', null, array('class' => 'simple
echo '<tr>';
echo '<td>';
echo '<textarea cols="50" rows="20" name="textconfig" '
. 'id="textconfig" spellcheck="false">';
, 'id="textconfig" spellcheck="false">';
echo htmlspecialchars(ConfigGenerator::getConfigFile($GLOBALS['ConfigFile']));
echo '</textarea>';
echo '</td>';

View File

@ -108,8 +108,8 @@ foreach ($all_languages as $each_lang_key => $each_lang) {
$lang_name = PMA_languageName($each_lang);
//Is current one active?
$selected = ($GLOBALS['lang'] == $each_lang_key) ? ' selected="selected"' : '';
echo '<option value="' . $each_lang_key . '"' . $selected . '>' . $lang_name
. '</option>' . "\n";
echo '<option value="' , $each_lang_key , '"' , $selected , '>' , $lang_name
, '</option>' , "\n";
}
echo '</select>';
@ -170,12 +170,12 @@ if ($cf->getServerCount() > 0) {
foreach ($cf->getServers() as $id => $server) {
echo '<tr>';
echo '<td>' . $id . '</td>';
echo '<td>' . htmlspecialchars($cf->getServerName($id)) . '</td>';
echo '<td>' , $id , '</td>';
echo '<td>' , htmlspecialchars($cf->getServerName($id)) , '</td>';
echo '<td>'
. htmlspecialchars($cf->getValue("Servers/$id/auth_type"))
. '</td>';
echo '<td>' . htmlspecialchars($cf->getServerDSN($id)) . '</td>';
, htmlspecialchars($cf->getValue("Servers/$id/auth_type"))
, '</td>';
echo '<td>' , htmlspecialchars($cf->getServerDSN($id)) , '</td>';
echo '<td style="white-space: nowrap">';
echo '<small>';
echo '<a href="' , PMA_URL_getCommon() , $separator , 'page=servers'

View File

@ -14,9 +14,9 @@ $formset_id = isset($_GET['formset']) ? $_GET['formset'] : null;
$separator = PMA_URL_getArgSeparator('html');
echo '<ul>';
echo '<li><a href="index.php' . PMA_URL_getCommon() . '"'
. ($formset_id === null ? ' class="active' : '')
. '">' . __('Overview') . '</a></li>';
echo '<li><a href="index.php' , PMA_URL_getCommon() , '"'
, ($formset_id === null ? ' class="active' : '')
, '">' , __('Overview') , '</a></li>';
$formsets = array(
'Features' => __('Features'),
@ -28,10 +28,10 @@ $formsets = array(
);
foreach ($formsets as $formset => $label) {
echo '<li><a href="' . PMA_URL_getCommon() . $separator . 'page=form'
. $separator . 'formset=' . $formset . '" '
. ($formset_id === $formset ? ' class="active' : '')
. '">' . $label . '</a></li>';
echo '<li><a href="' , PMA_URL_getCommon() , $separator , 'page=form'
, $separator , 'formset=' , $formset , '" '
, ($formset_id === $formset ? ' class="active' : '')
, '">' , $label , '</a></li>';
}
echo '</ul>';

View File

@ -127,7 +127,7 @@ $drop_view_url_params = array_merge(
);
echo '<div class="operations_half_width">';
echo '<fieldset class="caution">';
echo '<legend>' . __('Delete data or table') . '</legend>';
echo '<legend>' , __('Delete data or table') , '</legend>';
echo '<ul>';
echo PMA_getDeleteDataOrTableLink(