Commit abbd5bef authored by alexpott's avatar alexpott

Issue #2002730 by Froelund, leanderl, drupalmonkey: Improve code...

Issue #2002730 by Froelund, leanderl, drupalmonkey: Improve code maintainability by removing unused local variables - core/includes/theme.inc.
parent 64552427
...@@ -713,7 +713,6 @@ function list_themes($refresh = FALSE) { ...@@ -713,7 +713,6 @@ function list_themes($refresh = FALSE) {
if (empty($list)) { if (empty($list)) {
$list = array(); $list = array();
$themes = array();
// Extract from the database only when it is available. // Extract from the database only when it is available.
// Also check that the site is not in the middle of an install or update. // Also check that the site is not in the middle of an install or update.
if (!defined('MAINTENANCE_MODE')) { if (!defined('MAINTENANCE_MODE')) {
...@@ -2108,7 +2107,7 @@ function theme_table($variables) { ...@@ -2108,7 +2107,7 @@ function theme_table($variables) {
// Format the table columns: // Format the table columns:
if (count($colgroups)) { if (count($colgroups)) {
foreach ($colgroups as $number => $colgroup) { foreach ($colgroups as $colgroup) {
$attributes = array(); $attributes = array();
// Check if we're dealing with a simple or complex column // Check if we're dealing with a simple or complex column
...@@ -2129,7 +2128,6 @@ function theme_table($variables) { ...@@ -2129,7 +2128,6 @@ function theme_table($variables) {
// Build colgroup // Build colgroup
if (is_array($cols) && count($cols)) { if (is_array($cols) && count($cols)) {
$output .= ' <colgroup' . new Attribute($attributes) . '>'; $output .= ' <colgroup' . new Attribute($attributes) . '>';
$i = 0;
foreach ($cols as $col) { foreach ($cols as $col) {
$output .= ' <col' . new Attribute($col) . ' />'; $output .= ' <col' . new Attribute($col) . ' />';
} }
...@@ -2192,7 +2190,7 @@ function theme_table($variables) { ...@@ -2192,7 +2190,7 @@ function theme_table($variables) {
$output .= "<tbody>\n"; $output .= "<tbody>\n";
$flip = array('even' => 'odd', 'odd' => 'even'); $flip = array('even' => 'odd', 'odd' => 'even');
$class = 'even'; $class = 'even';
foreach ($rows as $number => $row) { foreach ($rows as $row) {
// Check if we're dealing with a simple or complex row // Check if we're dealing with a simple or complex row
if (isset($row['data'])) { if (isset($row['data'])) {
$cells = $row['data']; $cells = $row['data'];
...@@ -2602,8 +2600,6 @@ function _theme_table_cell($cell, $header = FALSE) { ...@@ -2602,8 +2600,6 @@ function _theme_table_cell($cell, $header = FALSE) {
* @see template_process() * @see template_process()
*/ */
function template_preprocess(&$variables, $hook) { function template_preprocess(&$variables, $hook) {
global $user;
// Tell all templates where they are located. // Tell all templates where they are located.
$variables['directory'] = path_to_theme(); $variables['directory'] = path_to_theme();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment