Commit 73735f18 authored by Richard Mansfield's avatar Richard Mansfield

Redirect non-portfolio views to correct url & remove 2nd view title when using...

Redirect non-portfolio views to correct url & remove 2nd view title when using microheaders (bug #547524)
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent 5cb4c211
......@@ -82,13 +82,12 @@ else if (param_variable('delete_comment_submit', null)) {
$owner = $view->get('owner');
$viewtype = $view->get('type');
if ($viewtype == 'profile') {
define('TITLE', display_name($owner, null, true));
}
else {
define('TITLE', $view->get('title'));
if ($viewtype == 'profile' || $viewtype == 'dashboard' || $viewtype == 'grouphomepage') {
redirect($view->get_url());
}
define('TITLE', $view->get('title'));
$submittedgroup = (int)$view->get('submittedgroup');
if ($USER->is_logged_in() && $submittedgroup && group_user_can_assess_submitted_views($submittedgroup, $USER->get('id'))) {
// The user is a tutor of the group that this view has
......@@ -209,16 +208,7 @@ if (get_config('viewmicroheaders')) {
if ($can_edit) {
$smarty->assign('visitstring', $view->visit_message());
if ($viewtype == 'profile') {
$microheaderlinks = array(
array(
'name' => get_string('editprofileview', 'view'),
'image' => $THEME->get_url('images/edit.gif'),
'url' => get_config('wwwroot') . 'view/blocks.php?profile=1',
),
);
}
else if ($new) {
if ($new) {
$microheaderlinks = array(
array(
'name' => get_string('back'),
......@@ -254,11 +244,8 @@ else if ($can_edit) {
$title = hsc(TITLE);
if ($viewtype != 'profile' && !get_config('viewmicroheaders')) {
if (!get_config('viewmicroheaders')) {
$title = $collection ? hsc($collection->get('name')) : $view->display_title();
}
if ($viewtype != 'profile' || !get_config('viewmicroheaders')) {
$smarty->assign('maintitle', $title);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment