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 /pages/edit_multiple.php | |
parent | 791ec4925346cb38ecca9a2f2574b012ab64a88a (diff) | |
download | elgg-73403645808a81425381f43c25e0ea2c92705312.tar.gz elgg-73403645808a81425381f43c25e0ea2c92705312.tar.bz2 |
first go at brining tidypics up to code standards
Diffstat (limited to 'pages/edit_multiple.php')
-rw-r--r-- | pages/edit_multiple.php | 72 |
1 files changed, 36 insertions, 36 deletions
diff --git a/pages/edit_multiple.php b/pages/edit_multiple.php index 49b7dd6f3..ec507ba4b 100644 --- a/pages/edit_multiple.php +++ b/pages/edit_multiple.php @@ -1,47 +1,47 @@ <?php - /** - * Tidypics: Edit the properties of multiple images - * - * Called after upload only - */ +/** + * Tidypics: Edit the properties of multiple images + * + * Called after upload only + */ - include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"; +include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"; - gatekeeper(); - set_context('photos'); +gatekeeper(); +set_context('photos'); - // parse out photo guids - $file_string = get_input('files'); - $file_array_sent = explode('-', $file_string); - $new_file_array = array(); +// parse out photo guids +$file_string = get_input('files'); +$file_array_sent = explode('-', $file_string); +$new_file_array = array(); - // set owner of page based on first photo guid - $photo_guid = (int)$file_array_sent[0]; - $photo = get_entity($photo_guid); +// set owner of page based on first photo guid +$photo_guid = (int)$file_array_sent[0]; +$photo = get_entity($photo_guid); - // set page owner based on owner of photo album - set_page_owner($photo->owner_guid); - $album = get_entity($photo->container_guid); - if ($album) { - $owner_guid = $album->container_guid; - if ($owner_guid) - set_page_owner($owner_guid); +// set page owner based on owner of photo album +set_page_owner($photo->owner_guid); +$album = get_entity($photo->container_guid); +if ($album) { + $owner_guid = $album->container_guid; + if ($owner_guid) { + set_page_owner($owner_guid); } +} - foreach ($file_array_sent as $file_guid) { - if ($entity = get_entity($file_guid)) { - if ($entity->canEdit()){ - array_push($new_file_array, $file_guid); - } - if (!$album_guid) - $album_guid = $entity->container_guid; - +foreach ($file_array_sent as $file_guid) { + if ($entity = get_entity($file_guid)) { + if ($entity->canEdit()) { + array_push($new_file_array, $file_guid); + } + if (!$album_guid) { + $album_guid = $entity->container_guid; } } +} - $title = elgg_echo('tidypics:editprops'); - $area2 .= elgg_view_title($title); - $area2 .= elgg_view("tidypics/forms/edit_multi", array('file_array' => $new_file_array, 'album_guid' => $album_guid)); - $body = elgg_view_layout('two_column_left_sidebar', $area1, $area2); - page_draw($title, $body); -?> +$title = elgg_echo('tidypics:editprops'); +$area2 .= elgg_view_title($title); +$area2 .= elgg_view("tidypics/forms/edit_multi", array('file_array' => $new_file_array, 'album_guid' => $album_guid)); +$body = elgg_view_layout('two_column_left_sidebar', $area1, $area2); +page_draw($title, $body); |