From 19d469fb07a0af7d334e4fd27e4d93803ca21840 Mon Sep 17 00:00:00 2001 From: Dries Buytaert <dries@buytaert.net> Date: Sun, 11 Sep 2011 20:28:49 -0400 Subject: [PATCH] - Patch #999040 by Niklas Fiekas: corrected alternative control structure syntax in theme templates. --- modules/aggregator/aggregator-item.tpl.php | 6 +++--- modules/aggregator/aggregator-summary-item.tpl.php | 4 ++-- modules/book/book-all-books-block.tpl.php | 8 ++++---- modules/book/book-export-html.tpl.php | 2 +- modules/book/book-navigation.tpl.php | 6 +++--- modules/field/theme/field.tpl.php | 4 ++-- modules/profile/profile-block.tpl.php | 4 ++-- modules/profile/profile-listing.tpl.php | 2 +- modules/search/search-block-form.tpl.php | 2 +- modules/search/search-result.tpl.php | 6 +++--- modules/search/search-results.tpl.php | 2 +- modules/user/user-profile-category.tpl.php | 2 +- themes/garland/comment.tpl.php | 2 +- 13 files changed, 25 insertions(+), 25 deletions(-) diff --git a/modules/aggregator/aggregator-item.tpl.php b/modules/aggregator/aggregator-item.tpl.php index c5dd70c67b5d..e9ad1e0d7560 100644 --- a/modules/aggregator/aggregator-item.tpl.php +++ b/modules/aggregator/aggregator-item.tpl.php @@ -24,19 +24,19 @@ </h3> <div class="feed-item-meta"> - <?php if ($source_url) : ?> + <?php if ($source_url): ?> <a href="<?php print $source_url; ?>" class="feed-item-source"><?php print $source_title; ?></a> - <?php endif; ?> <span class="feed-item-date"><?php print $source_date; ?></span> </div> -<?php if ($content) : ?> +<?php if ($content): ?> <div class="feed-item-body"> <?php print $content; ?> </div> <?php endif; ?> -<?php if ($categories) : ?> +<?php if ($categories): ?> <div class="feed-item-categories"> <?php print t('Categories'); ?>: <?php print implode(', ', $categories); ?> </div> diff --git a/modules/aggregator/aggregator-summary-item.tpl.php b/modules/aggregator/aggregator-summary-item.tpl.php index 1c8299938be0..fcd57c7a4629 100644 --- a/modules/aggregator/aggregator-summary-item.tpl.php +++ b/modules/aggregator/aggregator-summary-item.tpl.php @@ -18,6 +18,6 @@ <a href="<?php print $feed_url; ?>"><?php print $feed_title; ?></a> <span class="age"><?php print $feed_age; ?></span> -<?php if ($source_url) : ?>, -<span class="source"><a href="<?php print $source_url; ?>"><?php print $source_title; ?></a></span> +<?php if ($source_url): ?>, + <span class="source"><a href="<?php print $source_url; ?>"><?php print $source_title; ?></a></span> <?php endif; ?> diff --git a/modules/book/book-all-books-block.tpl.php b/modules/book/book-all-books-block.tpl.php index d22ff2ccc972..626a5f26482a 100644 --- a/modules/book/book-all-books-block.tpl.php +++ b/modules/book/book-all-books-block.tpl.php @@ -11,8 +11,8 @@ * render() on each to print it as an unordered list. */ ?> -<?php foreach ($book_menus as $book_id => $menu) : ?> -<div id="book-block-menu-<?php print $book_id; ?>" class="book-block-menu"> - <?php print render($menu); ?> -</div> +<?php foreach ($book_menus as $book_id => $menu): ?> + <div id="book-block-menu-<?php print $book_id; ?>" class="book-block-menu"> + <?php print render($menu); ?> + </div> <?php endforeach; ?> diff --git a/modules/book/book-export-html.tpl.php b/modules/book/book-export-html.tpl.php index 180f3ae7783f..4b25a766e18c 100644 --- a/modules/book/book-export-html.tpl.php +++ b/modules/book/book-export-html.tpl.php @@ -40,7 +40,7 @@ */ $div_close = ''; ?> - <?php for ($i = 1; $i < $depth; $i++) : ?> + <?php for ($i = 1; $i < $depth; $i++): ?> <div class="section-<?php print $i; ?>"> <?php $div_close .= '</div>'; ?> <?php endfor; ?> diff --git a/modules/book/book-navigation.tpl.php b/modules/book/book-navigation.tpl.php index e5883dc56ec8..5d8e9aa7fcb6 100644 --- a/modules/book/book-navigation.tpl.php +++ b/modules/book/book-navigation.tpl.php @@ -35,13 +35,13 @@ <?php if ($has_links): ?> <div class="page-links clearfix"> - <?php if ($prev_url) : ?> + <?php if ($prev_url): ?> <a href="<?php print $prev_url; ?>" class="page-previous" title="<?php print t('Go to previous page'); ?>"><?php print t('‹ ') . $prev_title; ?></a> <?php endif; ?> - <?php if ($parent_url) : ?> + <?php if ($parent_url): ?> <a href="<?php print $parent_url; ?>" class="page-up" title="<?php print t('Go to parent page'); ?>"><?php print t('up'); ?></a> <?php endif; ?> - <?php if ($next_url) : ?> + <?php if ($next_url): ?> <a href="<?php print $next_url; ?>" class="page-next" title="<?php print t('Go to next page'); ?>"><?php print $next_title . t(' ›'); ?></a> <?php endif; ?> </div> diff --git a/modules/field/theme/field.tpl.php b/modules/field/theme/field.tpl.php index e4cd85cd025b..9e76e3b9c12f 100644 --- a/modules/field/theme/field.tpl.php +++ b/modules/field/theme/field.tpl.php @@ -49,11 +49,11 @@ HTML comment. --> <div class="<?php print $classes; ?> clearfix"<?php print $attributes; ?>> - <?php if (!$label_hidden) : ?> + <?php if (!$label_hidden): ?> <div class="field-label"<?php print $title_attributes; ?>><?php print $label ?>: </div> <?php endif; ?> <div class="field-items"<?php print $content_attributes; ?>> - <?php foreach ($items as $delta => $item) : ?> + <?php foreach ($items as $delta => $item): ?> <div class="field-item <?php print $delta % 2 ? 'odd' : 'even'; ?>"<?php print $item_attributes[$delta]; ?>><?php print render($item); ?></div> <?php endforeach; ?> </div> diff --git a/modules/profile/profile-block.tpl.php b/modules/profile/profile-block.tpl.php index 0bd8331486d7..dbdbcd84e4e1 100644 --- a/modules/profile/profile-block.tpl.php +++ b/modules/profile/profile-block.tpl.php @@ -31,9 +31,9 @@ ?> <?php print $user_picture; ?> -<?php foreach ($profile as $field) : ?> +<?php foreach ($profile as $field): ?> <p> - <?php if ($field->type != 'checkbox') : ?> + <?php if ($field->type != 'checkbox'): ?> <strong><?php print $field->title; ?></strong><br /> <?php endif; ?> <?php print $field->value; ?> diff --git a/modules/profile/profile-listing.tpl.php b/modules/profile/profile-listing.tpl.php index d484ed26bec4..d8b835af3696 100644 --- a/modules/profile/profile-listing.tpl.php +++ b/modules/profile/profile-listing.tpl.php @@ -43,7 +43,7 @@ <?php print $name; ?> </div> - <?php foreach ($profile as $field) : ?> + <?php foreach ($profile as $field): ?> <div class="field"> <?php print $field->value; ?> </div> diff --git a/modules/search/search-block-form.tpl.php b/modules/search/search-block-form.tpl.php index 78447463c6f9..da58403c2c47 100644 --- a/modules/search/search-block-form.tpl.php +++ b/modules/search/search-block-form.tpl.php @@ -30,7 +30,7 @@ */ ?> <div class="container-inline"> - <?php if (empty($variables['form']['#block']->subject)) : ?> + <?php if (empty($variables['form']['#block']->subject)): ?> <h2 class="element-invisible"><?php print t('Search form'); ?></h2> <?php endif; ?> <?php print $search_form; ?> diff --git a/modules/search/search-result.tpl.php b/modules/search/search-result.tpl.php index db9f2202fc23..949452ac34cb 100644 --- a/modules/search/search-result.tpl.php +++ b/modules/search/search-result.tpl.php @@ -45,7 +45,7 @@ * for its existence before printing. The default keys of 'type', 'user' and * 'date' always exist for node searches. Modules may provide other data. * @code - * <?php if (isset($info_split['comment'])) : ?> + * <?php if (isset($info_split['comment'])): ?> * <span class="info-comment"> * <?php print $info_split['comment']; ?> * </span> @@ -69,10 +69,10 @@ </h3> <?php print render($title_suffix); ?> <div class="search-snippet-info"> - <?php if ($snippet) : ?> + <?php if ($snippet): ?> <p class="search-snippet"<?php print $content_attributes; ?>><?php print $snippet; ?></p> <?php endif; ?> - <?php if ($info) : ?> + <?php if ($info): ?> <p class="search-info"><?php print $info; ?></p> <?php endif; ?> </div> diff --git a/modules/search/search-results.tpl.php b/modules/search/search-results.tpl.php index 4de724bec196..e35be1edcfaa 100644 --- a/modules/search/search-results.tpl.php +++ b/modules/search/search-results.tpl.php @@ -21,7 +21,7 @@ * @see template_preprocess_search_results() */ ?> -<?php if ($search_results) : ?> +<?php if ($search_results): ?> <h2><?php print t('Search results');?></h2> <ol class="search-results <?php print $module; ?>-results"> <?php print $search_results; ?> diff --git a/modules/user/user-profile-category.tpl.php b/modules/user/user-profile-category.tpl.php index 0de7d5d0061c..0a86c762a97b 100644 --- a/modules/user/user-profile-category.tpl.php +++ b/modules/user/user-profile-category.tpl.php @@ -24,7 +24,7 @@ * @see template_preprocess_user_profile_category() */ ?> -<?php if ($title) : ?> +<?php if ($title): ?> <h3><?php print $title; ?></h3> <?php endif; ?> diff --git a/themes/garland/comment.tpl.php b/themes/garland/comment.tpl.php index 900afc106535..952cc0170325 100644 --- a/themes/garland/comment.tpl.php +++ b/themes/garland/comment.tpl.php @@ -6,7 +6,7 @@ <span class="submitted"><?php print $submitted ?></span> - <?php if ($new) : ?> + <?php if ($new): ?> <span class="new"><?php print drupal_ucfirst($new) ?></span> <?php endif; ?> -- GitLab