diff options
author | Cash Costello <cash.costello@gmail.com> | 2009-12-12 19:51:49 +0000 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2009-12-12 19:51:49 +0000 |
commit | 621177abc2bc60e9edb3ca723a4afaa9d9e713ef (patch) | |
tree | d6064f1fe767d042ea41e4adea88e57b8e5138ff /pages/ownedalbums.php | |
parent | b40060fafaba46e2fb8800b2c2e557a8c6bde9db (diff) | |
download | elgg-621177abc2bc60e9edb3ca723a4afaa9d9e713ef.tar.gz elgg-621177abc2bc60e9edb3ca723a4afaa9d9e713ef.tar.bz2 |
convert line endings to Unix
Diffstat (limited to 'pages/ownedalbums.php')
-rw-r--r-- | pages/ownedalbums.php | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/pages/ownedalbums.php b/pages/ownedalbums.php index c3dc54d24..f43c2c5eb 100644 --- a/pages/ownedalbums.php +++ b/pages/ownedalbums.php @@ -1,51 +1,51 @@ -<?php
- /**
- * tidypics photo gallery album listing page for a person/group
- *
- * Shows all the albums that belong to that person or group
- */
-
- include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php";
-
- // if this page belongs to a closed group, prevent anyone outside group from seeing
- if (is_callable('group_gatekeeper')) group_gatekeeper();
-
- //get the owner of the current page
- $owner = page_owner_entity();
-
-
- //if page owner cannot be found, forward to world album list
- if (is_null($owner->username) || empty($owner->username)) {
- forward('pg/photos/world');
- }
-
-
- // setup group menu for album index
- if ($owner instanceof ElggGroup) {
- add_submenu_item( sprintf(elgg_echo('album:group'),$owner->name),
- $CONFIG->wwwroot . "pg/photos/owned/" . $owner->username);
- if (can_write_to_container(0, $owner->guid)) {
- add_submenu_item( elgg_echo('album:create'),
- $CONFIG->wwwroot . 'pg/photos/new/' . $owner->username,
- 'tidypics');
- }
- }
-
- //set the title
- $title = sprintf(elgg_echo('album:user'), $owner->name);
- $area2 = elgg_view_title($title);
-
- // Get objects
- set_context('search');
- set_input('search_viewtype', 'gallery');
- if ($owner instanceof ElggGroup)
- $area2 .= list_entities("object", "album", $owner->guid, 12, false);
- else
- $area2 .= list_entities("object", "album", $owner->guid, 12, false);
-
- set_context('photos');
- $body = elgg_view_layout('two_column_left_sidebar', '', $area2);
-
- // Finally draw the page
- page_draw($title, $body);
+<?php + /** + * tidypics photo gallery album listing page for a person/group + * + * Shows all the albums that belong to that person or group + */ + + include_once dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php"; + + // if this page belongs to a closed group, prevent anyone outside group from seeing + if (is_callable('group_gatekeeper')) group_gatekeeper(); + + //get the owner of the current page + $owner = page_owner_entity(); + + + //if page owner cannot be found, forward to world album list + if (is_null($owner->username) || empty($owner->username)) { + forward('pg/photos/world'); + } + + + // setup group menu for album index + if ($owner instanceof ElggGroup) { + add_submenu_item( sprintf(elgg_echo('album:group'),$owner->name), + $CONFIG->wwwroot . "pg/photos/owned/" . $owner->username); + if (can_write_to_container(0, $owner->guid)) { + add_submenu_item( elgg_echo('album:create'), + $CONFIG->wwwroot . 'pg/photos/new/' . $owner->username, + 'tidypics'); + } + } + + //set the title + $title = sprintf(elgg_echo('album:user'), $owner->name); + $area2 = elgg_view_title($title); + + // Get objects + set_context('search'); + set_input('search_viewtype', 'gallery'); + if ($owner instanceof ElggGroup) + $area2 .= list_entities("object", "album", $owner->guid, 12, false); + else + $area2 .= list_entities("object", "album", $owner->guid, 12, false); + + set_context('photos'); + $body = elgg_view_layout('two_column_left_sidebar', '', $area2); + + // Finally draw the page + page_draw($title, $body); ?>
\ No newline at end of file |