diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-03-21 18:12:50 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-03-21 18:12:50 +0000 |
commit | 7acd3a2947f7bd92ded5bc5f02baa5db87f6b212 (patch) | |
tree | 7c1a8394f0aa6b1f1b384b445702329c55db8818 /actions/edit_multi.php | |
parent | 26be16aaf2189a4b50b06494aab6c6690480a371 (diff) | |
download | elgg-7acd3a2947f7bd92ded5bc5f02baa5db87f6b212.tar.gz elgg-7acd3a2947f7bd92ded5bc5f02baa5db87f6b212.tar.bz2 |
cleaned up actions - formatting
Diffstat (limited to 'actions/edit_multi.php')
-rw-r--r-- | actions/edit_multi.php | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/actions/edit_multi.php b/actions/edit_multi.php index 9bb9c4eed..a857e92d7 100644 --- a/actions/edit_multi.php +++ b/actions/edit_multi.php @@ -1,62 +1,62 @@ <?php
/**
- * Elgg album: multi image edit action
+ * Elgg album: multi image edit action
*
*/
// Make sure we're logged in (send us to the front page if not)
- if (!isloggedin()) forward();
+ if (!isloggedin()) forward();
// Get input data
- $cover = get_input('cover');
- $title_array = get_input('title');
- $caption_array = get_input('caption');
- $tags_array = get_input('tags');
- $image_guid_array = get_input('image_guid');
- $container_guid = get_input('container_guid');
- $album_entity = get_entity($container_guid);
- $not_updated = array();
+ $cover = get_input('cover');
+ $title_array = get_input('title');
+ $caption_array = get_input('caption');
+ $tags_array = get_input('tags');
+ $image_guid_array = get_input('image_guid');
+ $container_guid = get_input('container_guid');
+ $album_entity = get_entity($container_guid);
+ $not_updated = array();
- foreach($image_guid_array as $key => $im){
+ foreach($image_guid_array as $key => $im) {
$image = get_entity($im);
- if ($image->canEdit()){
+ if ($image->canEdit()) {
- // Convert string of tags into a preformatted array
+ // Convert string of tags into a preformatted array
$tagarray = string_to_tag_array($tags_array[$key]);
- //set description appropriately
+ //set description appropriately
$image->title = $title_array[$key];
- //set description appropriately
+ //set description appropriately
$image->description = $caption_array[$key];
- // Before we can set metadata, we need to save the image
+ // Before we can set metadata, we need to save the image
if (!$image->save()) {
array_push($not_updated, $image->guid);
}
- // Now let's add tags. We can pass an array directly to the object property! Easy.
+ // Now let's add tags. We can pass an array directly to the object property! Easy.
$image->clearMetadata('tags');
if (is_array($tagarray)) {
$image->tags = $tagarray;
}
- //if cover meta is sent from image save as metadata
- if($cover == $im){
+ //if cover meta is sent from image save as metadata
+ if ($cover == $im) {
$album_entity->cover = $im;
}
}
- }
- // Success message
- if (count($not_updated) > 0) {
- register_error(elgg_echo("images:notedited"));
- } else {
- system_message(elgg_echo("images:edited"));
- }
+ }
+
+ // Success message
+ if (count($not_updated) > 0) {
+ register_error(elgg_echo("images:notedited"));
+ } else {
+ system_message(elgg_echo("images:edited"));
+ }
- // Forward to the main album page
- forward($album_entity->getURL());
-
+ // Forward to the main album page
+ forward($album_entity->getURL());
?>
\ No newline at end of file |