Coding style endforeach (must be avoided)

This commit is contained in:
Marien Fressinaud
2014-12-17 21:15:24 +01:00
parent 7f4ca35fc3
commit 875b8a72f9
3 changed files with 8 additions and 8 deletions

View File

@@ -15,7 +15,7 @@
<a target="_blank" class="btn" title="<?php echo _t('conf.sharing.more_information'); ?>" href="##help##"><?php echo _i('help'); ?></a>
</div></div>'>
<legend><?php echo _t('conf.sharing'); ?></legend>
<?php foreach (FreshRSS_Context::$conf->sharing as $key => $sharing): ?>
<?php foreach (FreshRSS_Context::$conf->sharing as $key => $sharing) { ?>
<?php $share = FreshRSS_Context::$conf->shares[$sharing['type']]; ?>
<div class="form-group" id="group-share-<?php echo $key; ?>">
<label class="group-name">
@@ -36,14 +36,14 @@
<?php } ?>
</div>
</div>
<?php endforeach;?>
<?php } ?>
<div class="form-group">
<div class="group-controls">
<select>
<?php foreach(FreshRSS_Context::$conf->shares as $key => $params):?>
<?php foreach(FreshRSS_Context::$conf->shares as $key => $params) { ?>
<option value='<?php echo $key?>' data-form='<?php echo $params['form']?>' data-help='<?php if (!empty($params['help'])) {echo $params['help'];}?>'><?php echo _t('conf.sharing.' . $key) ?></option>
<?php endforeach; ?>
<?php } ?>
</select>
<a href='#' class='share add btn'><?php echo _i('add'); ?></a>
</div>

View File

@@ -141,7 +141,7 @@ if (!empty($this->entries)) {
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close"></a></li>
<?php
foreach ($sharing as $share) :
foreach ($sharing as $share) {
$type_share = FreshRSS_Context::$conf->shares[$share['type']];
$has_specific_title = ($type_share['form'] === 'advanced');
?>
@@ -150,7 +150,7 @@ if (!empty($this->entries)) {
<?php echo $has_specific_title ? $share['name'] : _t('index.share.' . $share['name']); ?>
</a>
</li>
<?php endforeach;?>
<?php } ?>
</ul>
</div>
<?php } ?>

View File

@@ -52,14 +52,14 @@
</tr>
</thead>
<tbody>
<?php foreach ($this->topFeed as $feed): ?>
<?php foreach ($this->topFeed as $feed) { ?>
<tr>
<td><a href="<?php echo _url('stats', 'repartition', 'id', $feed['id']); ?>"><?php echo $feed['name']; ?></a></td>
<td><?php echo $feed['category']; ?></td>
<td class="numeric"><?php echo format_number($feed['count']); ?></td>
<td class="numeric"><?php echo format_number($feed['count'] / $this->repartition['all_feeds']['total'] * 100, 1);?></td>
</tr>
<?php endforeach;?>
<?php } ?>
</tbody>
</table>
</div>