Skip to content

Commit

Permalink
* Fixed class re-declaration error
Browse files Browse the repository at this point in the history
* Coding style updates
  • Loading branch information
ekala committed Jun 17, 2011
1 parent d136aa7 commit d57bc76
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 40 deletions.
3 changes: 2 additions & 1 deletion application/controllers/admin/addons/plugins.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,12 @@ public function index()
$path = $this->_find_install($plugin->plugin_name);
if ($path)
{
include $path;
require_once $path;

// Run the installer
$install = new $class;
$install->run_install();

}

// Mark as Active and Mark as Installed
Expand Down
45 changes: 14 additions & 31 deletions themes/default/views/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<div id="main" class="clearingfix">
<div id="mainmiddle" class="floatbox withright">

<?php if($site_message != '') { ?>
<?php if($site_message != ''): ?>
<div class="green-box">
<h3><?php echo $site_message; ?></h3>
</div>
<?php } ?>
<?php endif; ?>

<!-- right column -->
<div id="right" class="clearingfix">
Expand Down Expand Up @@ -61,10 +61,7 @@
</ul>
<!-- / category filters -->

<?php
if ($layers)
{
?>
<?php if ($layers): ?>
<!-- Layers (KML/KMZ) -->
<div class="cat-filters clearingfix" style="margin-top:20px;">
<strong><?php echo Kohana::lang('ui_main.layers_filter');?> <span>[<a href="javascript:toggleLayer('kml_switch_link', 'kml_switch')" id="kml_switch_link"><?php echo Kohana::lang('ui_main.hide'); ?></a>]</span></strong>
Expand All @@ -87,15 +84,10 @@
?>
</ul>
<!-- /Layers -->
<?php
}
?>
<?php endif; ?>


<?php
if ($shares)
{
?>
<?php if ($shares): ?>
<!-- Layers (Other Ushahidi Layers) -->
<div class="cat-filters clearingfix" style="margin-top:20px;">
<strong><?php echo Kohana::lang('ui_main.other_ushahidi_instances');?> <span>[<a href="javascript:toggleLayer('sharing_switch_link', 'sharing_switch')" id="sharing_switch_link"><?php echo Kohana::lang('ui_main.hide'); ?></a>]</span></strong>
Expand All @@ -112,18 +104,13 @@
?>
</ul>
<!-- /Layers -->
<?php
}
?>
<?php endif; ?>


<br />

<!-- additional content -->
<?php
if (Kohana::config('settings.allow_reports'))
{
?>
<?php if (Kohana::config('settings.allow_reports')): ?>
<div class="additional-content">
<h5><?php echo Kohana::lang('ui_main.how_to_report'); ?></h5>
<ol>
Expand All @@ -147,7 +134,7 @@
</ol>

</div>
<?php } ?>
<?php endif; ?>
<!-- / additional content -->

<?php
Expand Down Expand Up @@ -212,30 +199,26 @@
</tr>
</thead>
<tbody>
<?php
if ($total_items == 0)
{
?>
<?php if ($total_items == 0): ?>
<tr><td colspan="3"><?php echo Kohana::lang('ui_main.no_reports'); ?></td></tr>

<?php
}
<?php endif; ?>
<?php
foreach ($incidents as $incident)
{
$incident_id = $incident->id;
$incident_title = text::limit_chars($incident->incident_title, 40, '...', True);
$incident_date = $incident->incident_date;
$incident_date = date('M j Y', strtotime($incident->incident_date));
$incident_location = $incident->location->location_name;
?>
?>
<tr>
<td><a href="<?php echo url::site() . 'reports/view/' . $incident_id; ?>"> <?php echo $incident_title ?></a></td>
<td><?php echo $incident_location ?></td>
<td><?php echo $incident_date; ?></td>
</tr>
<?php
<?php
}
?>
?>

</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions themes/default/views/reports_comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<h5><?php echo Kohana::lang('ui_main.comments'); ?></h5>

<?php foreach($incident_comments as $comment) { ?>
<?php foreach($incident_comments as $comment): ?>
<div class="report-comment-box">

<div>
Expand All @@ -26,7 +26,7 @@
</div>

</div>
<?php } ?>
<?php endif; ?>

</div>

Expand Down
8 changes: 2 additions & 6 deletions themes/default/views/reports_comments_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
<div class="comment-block">

<h5><?php echo Kohana::lang('ui_main.leave_a_comment');?></h5>
<?php
if ($form_error) {
?>
<?php if ($form_error): ?>
<!-- red-box -->
<div class="red-box">
<h3><?php echo Kohana::lang('ui_main.error');?></h3>
Expand All @@ -17,9 +15,7 @@
?>
</ul>
</div>
<?php
}
?>
<?php endif; ?>
<?php print form::open(NULL, array('id' => 'commentForm', 'name' => 'commentForm')); ?>
<div class="report_row">
<strong><?php echo Kohana::lang('ui_main.name');?>:</strong><br />
Expand Down

0 comments on commit d57bc76

Please sign in to comment.