aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Tosh <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-08 11:44:01 +0000
committerDave Tosh <dave@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-04-08 11:44:01 +0000
commit1f035267896de76c0c92b66d79456836ffd2f944 (patch)
tree7acf5200dfdcf30c4e6d918444aa3b82d152cbcd
parent031b32c3cbd35da918b41b9a2e0c21060298c85b (diff)
downloadelgg-1f035267896de76c0c92b66d79456836ffd2f944.tar.gz
elgg-1f035267896de76c0c92b66d79456836ffd2f944.tar.bz2
moved declared page_owner so videos can play when viewed logged out.
-rw-r--r--watch.php21
1 files changed, 10 insertions, 11 deletions
diff --git a/watch.php b/watch.php
index 7ca752265..65993ae2b 100644
--- a/watch.php
+++ b/watch.php
@@ -16,21 +16,20 @@ require_once(dirname(dirname(dirname(__FILE__))) . "/engine/start.php");
$video_id = (int) get_input('video_id');
$video = get_entity($video_id);
-// set up breadcrumbs
-$page_owner = page_owner_entity();
-if ($page_owner === false || is_null($page_owner)) {
- $page_owner = $_SESSION['user'];
- set_page_owner($page_owner->getGUID());
-}
-elgg_push_breadcrumb(elgg_echo('videolist:all'), $CONFIG->wwwroot."mod/videolist/all.php");
-elgg_push_breadcrumb(sprintf(elgg_echo("videolist:user"),$page_owner->name), $CONFIG->wwwroot."pg/videolist/".$page_owner->username);
-elgg_push_breadcrumb(sprintf($video->title));
-$area1 = elgg_view('navigation/breadcrumbs');
-
// If we can get out the video corresponding to video_id object ...
if ($videos = get_entity($video_id)) {
set_page_owner($videos->container_guid);
$videos_container = get_entity($videos->container_guid);
+ // set up breadcrumbs
+ $page_owner = page_owner_entity();
+ if ($page_owner === false || is_null($page_owner)) {
+ $page_owner = $_SESSION['user'];
+ set_page_owner($page_owner->getGUID());
+ }
+ elgg_push_breadcrumb(elgg_echo('videolist:all'), $CONFIG->wwwroot."mod/videolist/all.php");
+ elgg_push_breadcrumb(sprintf(elgg_echo("videolist:user"),$page_owner->name), $CONFIG->wwwroot."pg/videolist/".$page_owner->username);
+ elgg_push_breadcrumb(sprintf($video->title));
+ $area1 = elgg_view('navigation/breadcrumbs');
if($videos_container->type == "group") {
set_context("groupsvideos");