diff options
author | Cash Costello <cash.costello@gmail.com> | 2010-07-25 02:01:36 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2010-07-25 02:01:36 +0000 |
commit | 73403645808a81425381f43c25e0ea2c92705312 (patch) | |
tree | 83fb73e9a122054f6f4c2e1c44e399572ee13e28 /views/default/widgets/latest_photos | |
parent | 791ec4925346cb38ecca9a2f2574b012ab64a88a (diff) | |
download | elgg-73403645808a81425381f43c25e0ea2c92705312.tar.gz elgg-73403645808a81425381f43c25e0ea2c92705312.tar.bz2 |
first go at brining tidypics up to code standards
Diffstat (limited to 'views/default/widgets/latest_photos')
-rw-r--r-- | views/default/widgets/latest_photos/edit.php | 8 | ||||
-rw-r--r-- | views/default/widgets/latest_photos/view.php | 17 |
2 files changed, 14 insertions, 11 deletions
diff --git a/views/default/widgets/latest_photos/edit.php b/views/default/widgets/latest_photos/edit.php index 3b334d722..06693648d 100644 --- a/views/default/widgets/latest_photos/edit.php +++ b/views/default/widgets/latest_photos/edit.php @@ -1,9 +1,11 @@ <p> <?php - echo elgg_echo("tidypics:widget:num_latest") . ": "; +echo elgg_echo("tidypics:widget:num_latest") . ": "; + +if ($vars['entity']->num_display == '') { + $vars['entity']->num_display = 6; +} - if($vars['entity']->num_display == '') $vars['entity']->num_display = 6; - ?> <select name="params[num_display]"> <option value="6" <?php if($vars['entity']->num_display == 6) echo "SELECTED"; ?>>6</option> diff --git a/views/default/widgets/latest_photos/view.php b/views/default/widgets/latest_photos/view.php index 0c3193907..d6bc4a0df 100644 --- a/views/default/widgets/latest_photos/view.php +++ b/views/default/widgets/latest_photos/view.php @@ -1,15 +1,16 @@ <div class="contentWrapper"> <?php - //the number of files to display - $number = (int) $vars['entity']->num_display; - //if no number has been set, default to 6 - if (!$number) - $number = 6; +//the number of files to display +$number = (int) $vars['entity']->num_display; +//if no number has been set, default to 6 +if (!$number) { + $number = 6; +} - echo '<div class="tidypics_widget_latest">'; - echo tp_get_latest_photos($number, page_owner()); - echo '</div>'; +echo '<div class="tidypics_widget_latest">'; +echo tp_get_latest_photos($number, page_owner()); +echo '</div>'; ?> </div>
\ No newline at end of file |