Formatted code and removed duplicate output of checked=checked

This commit is contained in:
Herman van Rink
2011-04-25 15:07:55 +02:00
parent 6617a14297
commit b3f0c8f7ed

View File

@@ -586,7 +586,7 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE)
. ' </legend>' . "\n" . ' </legend>' . "\n"
. ' <p><small><i>' . __(' Note: MySQL privilege names are expressed in English ') . '</i></small></p>' . "\n"; . ' <p><small><i>' . __(' Note: MySQL privilege names are expressed in English ') . '</i></small></p>' . "\n";
// Output the Global privilege tables // Output the Global privilege tables with checkboxes
foreach($privTable as $i => $table) { foreach($privTable as $i => $table) {
echo ' <fieldset>' . "\n" echo ' <fieldset>' . "\n"
. ' <legend>' . __($privTable_names[$i]) . '</legend>' . "\n"; . ' <legend>' . __($privTable_names[$i]) . '</legend>' . "\n";
@@ -594,14 +594,12 @@ function PMA_displayPrivTable($db = '*', $table = '*', $submit = TRUE)
{ {
echo ' <div class="item">' . "\n" echo ' <div class="item">' . "\n"
. ' <input type="checkbox"' . ' <input type="checkbox"'
. (empty($GLOBALS['checkall']) ? '' : ' checked="checked"') . ' name="' . $priv[0] . '_priv" id="checkbox_' . $priv[0] . '_priv"'
. ' name="' . $priv[0] . '_priv" id="checkbox_' . $priv[0] . ' value="Y" title="' . $priv[2] . '"'
. '_priv" value="Y" ' . ((!empty($GLOBALS['checkall']) || $row[$priv[0] . '_priv'] == 'Y') ? ' checked="checked"' : '')
. ($row[$priv[0] . '_priv'] == 'Y' ? 'checked="checked" ' : '') . '/>' . "\n"
. 'title="' . $priv[2] . '"/>' . "\n" . ' <label for="checkbox_' . $priv[0] . '_priv"><tt><dfn title="' . $priv[2] . '">'
. ' <label for="checkbox_' . $priv[0] . $priv[1] . '</dfn></tt></label>' . "\n"
. '_priv"><tt><dfn title="' . $priv[2] . '">' . $priv[1]
. '</dfn></tt></label>' . "\n"
. ' </div>' . "\n"; . ' </div>' . "\n";
} }
echo ' </fieldset>' . "\n"; echo ' </fieldset>' . "\n";