Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
mevdschee committed Jun 25, 2020
1 parent ac30afd commit 2e19ea6
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion skel/pages/add().php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php echo '<?php' ?>
<?php echo '<?php'."\n" ?>
<?php foreach ($belongsTo as $relation): $referencedTable = $relation['KEY_COLUMN_USAGE']['REFERENCED_TABLE_NAME']; $referencedColumn = $relation['KEY_COLUMN_USAGE']['REFERENCED_COLUMN_NAME']; ?>
$<?php echo $referencedTable; ?> = DB::selectPairs('select `<?php echo $referencedColumn; ?>`,`<?php echo $findDisplayField($referencedTable); ?>` from `<?php echo $referencedTable; ?>`');
<?php endforeach;?>
Expand Down
2 changes: 1 addition & 1 deletion skel/pages/delete($id).php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php echo '<?php' ?>
<?php echo '<?php'."\n" ?>
if (!empty($_POST)) {
$rows = DB::delete('DELETE FROM `<?php echo $table; ?>` WHERE `id` = ?', $id);
if (!$rows) Flash::set('danger','<?php echo ucfirst($singularize($humanize($table))); ?> not deleted');
Expand Down
2 changes: 1 addition & 1 deletion skel/pages/edit($id).php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php echo '<?php' ?>
<?php echo '<?php'."\n" ?>
<?php foreach ($belongsTo as $relation): $referencedTable = $relation['KEY_COLUMN_USAGE']['REFERENCED_TABLE_NAME']; $referencedColumn = $relation['KEY_COLUMN_USAGE']['REFERENCED_COLUMN_NAME']; ?>
$<?php echo $referencedTable; ?> = DB::selectPairs('select `<?php echo $referencedColumn; ?>`,`<?php echo $findDisplayField($referencedTable); ?>` from `<?php echo $referencedTable; ?>`');
<?php endforeach;?>
Expand Down
6 changes: 3 additions & 3 deletions skel/pages/view(admin).phtml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
<dt><?php echo ucfirst($humanize($column)); ?></dt>
<?php endif;?>
<?php if ($relation = $findBelongsTo($column)): $referencedTable = $relation['KEY_COLUMN_USAGE']['REFERENCED_TABLE_NAME']; ?>
<dd><?php echo '<?php' ?> e($<?php echo $referencedTable; ?>[$data['<?php echo $table; ?>']['<?php echo $column; ?>']]);?></dd>
<dd><?php echo '<?php' ?> e($<?php echo $referencedTable; ?>[$data['<?php echo $table; ?>']['<?php echo $column; ?>']]);?></dd>
<?php else: ?>
<dd><?php echo '<?php' ?> e($data['<?php echo $table; ?>']['<?php echo $column; ?>']);?></dd>
<dd><?php echo '<?php' ?> e($data['<?php echo $table; ?>']['<?php echo $column; ?>']);?></dd>
<?php endif;?>
</dl>
</dl>
<?php endforeach;?>
</div>
<p>
Expand Down

0 comments on commit 2e19ea6

Please sign in to comment.