Permalink
Browse files

Merge pull request #978 from andraskende/master

removed a non used $i, spacing between actions. changed to single quotes
  • Loading branch information...
2 parents 1f35d82 + b191f42 commit 85c7ef8ec41191cd7412bcde50fd70236ede96d9 @markstory markstory committed Nov 26, 2012
Showing with 7 additions and 8 deletions.
  1. +7 −8 lib/Cake/View/Scaffolds/index.ctp
@@ -26,29 +26,28 @@
<th><?php echo __d('cake', 'Actions'); ?></th>
</tr>
<?php
-$i = 0;
foreach (${$pluralVar} as ${$singularVar}):
- echo "<tr>";
+ echo '<tr>';
foreach ($scaffoldFields as $_field) {
$isKey = false;
if (!empty($associations['belongsTo'])) {
foreach ($associations['belongsTo'] as $_alias => $_details) {
if ($_field === $_details['foreignKey']) {
$isKey = true;
- echo "<td>" . $this->Html->link(${$singularVar}[$_alias][$_details['displayField']], array('controller' => $_details['controller'], 'action' => 'view', ${$singularVar}[$_alias][$_details['primaryKey']])) . "</td>";
+ echo '<td>' . $this->Html->link(${$singularVar}[$_alias][$_details['displayField']], array('controller' => $_details['controller'], 'action' => 'view', ${$singularVar}[$_alias][$_details['primaryKey']])) . '</td>';
break;
}
}
}
if ($isKey !== true) {
- echo "<td>" . h(${$singularVar}[$modelClass][$_field]) . "</td>";
+ echo '<td>' . h(${$singularVar}[$modelClass][$_field]) . '</td>';
}
}
echo '<td class="actions">';
echo $this->Html->link(__d('cake', 'View'), array('action' => 'view', ${$singularVar}[$modelClass][$primaryKey]));
- echo $this->Html->link(__d('cake', 'Edit'), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey]));
- echo $this->Form->postLink(
+ echo ' ' . $this->Html->link(__d('cake', 'Edit'), array('action' => 'edit', ${$singularVar}[$modelClass][$primaryKey]));
+ echo ' ' . $this->Form->postLink(
__d('cake', 'Delete'),
array('action' => 'delete', ${$singularVar}[$modelClass][$primaryKey]),
null,
@@ -83,8 +82,8 @@ endforeach;
foreach ($associations as $_type => $_data) {
foreach ($_data as $_alias => $_details) {
if ($_details['controller'] != $this->name && !in_array($_details['controller'], $done)) {
- echo "<li>" . $this->Html->link(__d('cake', 'List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . "</li>";
- echo "<li>" . $this->Html->link(__d('cake', 'New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . "</li>";
+ echo '<li>' . $this->Html->link(__d('cake', 'List %s', Inflector::humanize($_details['controller'])), array('controller' => $_details['controller'], 'action' => 'index')) . '</li>';
+ echo '<li>' . $this->Html->link(__d('cake', 'New %s', Inflector::humanize(Inflector::underscore($_alias))), array('controller' => $_details['controller'], 'action' => 'add')) . '</li>';
$done[] = $_details['controller'];
}
}

0 comments on commit 85c7ef8

Please sign in to comment.