Commit 9ef2afd8 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Use clean urls elsewhere in lib/view.php



Bug #1006634, part 3

- Releasing submitted views
- Display of view titles
- Redirects after submitting the objection form, and marking views as unobjectionable

Change-Id: I878eca87cbe8e2b5dc7e0603a2ddf66a40ef56a4
Signed-off-by: default avatarRichard Mansfield <richard.mansfield@catalyst.net.nz>
parent a1ddaf05
......@@ -1106,7 +1106,7 @@ class View {
ArtefactType::update_locked($this->owner);
db_commit();
$ownerlang = get_user_language($this->get('owner'));
$url = 'view/view.php?id=' . $this->get('id');
$url = $this->get_url(false);
require_once('activity.php');
activity_occurred('maharamessage',
array(
......@@ -3710,7 +3710,7 @@ class View {
}
if ($titlelink) {
$title = '<a href="' . get_config('wwwroot') . 'view/view.php?id=' . $this->id . '">' . hsc($this->title) . '</a>';
$title = '<a href="' . $this->get_url() . '">' . hsc($this->title) . '</a>';
}
else {
$title = '<strong>' . hsc($this->title) . '</strong>';
......@@ -4459,7 +4459,7 @@ function objection_form_submit(Pieform $form, $values) {
$goto = get_config('wwwroot') . 'view/artefact.php?artefact=' . $artefact->get('id') . '&view='.$view->get('id');
}
else {
$goto = get_config('wwwroot') . 'view/view.php?id='.$view->get('id');
$goto = $view->get_url();
}
$form->reply(PIEFORM_OK, array(
'message' => get_string('reportsent', 'view'),
......@@ -4495,7 +4495,7 @@ function viewnotrude_submit(Pieform $form, $values) {
$goto = get_config('wwwroot') . 'view/artefact.php?artefact=' . $artefact->get('id') . '&view='.$view->get('id');
}
else {
$goto = get_config('wwwroot') . 'view/view.php?id='.$view->get('id');
$goto = $view->get_url();
}
$data = (object) array(
......@@ -4531,7 +4531,7 @@ function viewnotrude_submit(Pieform $form, $values) {
function objection_form_cancel_submit(Pieform $form) {
global $view;
$form->reply(PIEFORM_OK, array(
'goto' => '/view/view.php?id=' . $view->get('id'),
'goto' => $view->get_url(),
));
}
......
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