Commit 97194d3f authored by Nigel McNie's avatar Nigel McNie
Browse files

Change paths that were referring to view/view.php?id=..&artefact=.. to instead...

Change paths that were referring to view/view.php?id=..&artefact=.. to instead point to view/artefact.php?artefact=..&view=..

This is related to the viewartefactsplit branch. Now the existing code actually uses the new artefact.php script.
parent 2e86430f
......@@ -255,8 +255,8 @@ class ArtefactTypeBlog extends ArtefactType {
$smarty = smarty_core();
if (isset($options['viewid'])) {
$smarty->assign('artefacttitle', '<a href="' . get_config('wwwroot') . 'view/view.php?id='
. $options['viewid'] . '&artefact=' . $this->get('id')
$smarty->assign('artefacttitle', '<a href="' . get_config('wwwroot') . 'view/artefact.php?artefact='
. $this->get('id') . '&view=' . $options['viewid']
. '">' . $this->get('title') . '</a>');
}
else {
......@@ -472,8 +472,8 @@ class ArtefactTypeBlogPost extends ArtefactType {
$smarty = smarty_core();
if (empty($options['hidetitle'])) {
if (isset($options['viewid'])) {
$smarty->assign('artefacttitle', '<a href="' . get_config('wwwroot') . 'view/view.php?id='
. $options['viewid'] . '&artefact=' . $this->get('id')
$smarty->assign('artefacttitle', '<a href="' . get_config('wwwroot') . 'view/artefact.php?artefact='
. $this->get('id') . '&view=' . $options['viewid']
. '">' . $this->get('title') . '</a>');
}
else {
......@@ -496,7 +496,7 @@ class ArtefactTypeBlogPost extends ArtefactType {
$f = artefact_instance_from_id($attachment->id);
$attachment->size = $f->describe_size();
$attachment->iconpath = $f->get_icon(array('id' => $attachment->id, 'viewid' => $options['viewid']));
$attachment->viewpath = get_config('wwwroot') . 'view/view.php?id=' . $options['viewid'] . '&artefact=' . $attachment->id;
$attachment->viewpath = get_config('wwwroot') . 'view/artefact.php?artefact=' . $attachment->id . '&view=' . $options['viewid'];
$attachment->downloadpath = get_config('wwwroot') . 'artefact/file/download.php?file=' . $attachment->id;
if (isset($options['viewid'])) {
$attachment->downloadpath .= '&id=' . $options['viewid'];
......
......@@ -54,7 +54,7 @@ class PluginBlocktypeFiledownload extends PluginBlocktype {
'viewid' => $instance->get('view'),
);
$detailsurl = get_config('wwwroot') . 'view/view.php?id=' . $instance->get('view') . '&artefact=' . $artefactid;
$detailsurl = get_config('wwwroot') . 'view/artefact.php?artefact=' . $artefactid . '&view=' . $instance->get('view');
if ($artefact instanceof ArtefactTypeProfileIcon) {
require_once('file.php');
$downloadurl = get_config('wwwroot') . 'thumb.php?type=profileiconbyid&id=' . $artefactid;
......
......@@ -66,7 +66,7 @@ class PluginBlocktypeImage extends PluginBlocktype {
}
$result = '<div class="center"><div>';
$result .= '<a href="' . get_config('wwwroot') . 'view/view.php?id=' . $instance->get('view') . '&artefact=' . $configdata['artefactid'] . '"><img src="' . hsc($src) . '" alt="' . hsc($description) .'"></a>';
$result .= '<a href="' . get_config('wwwroot') . 'view/artefact.php?artefact=' . $configdata['artefactid'] . '&view=' . $instance->get('view') . '"><img src="' . hsc($src) . '" alt="' . hsc($description) .'"></a>';
$result .= '</div>';
$description = (is_a($image, 'ArtefacttypeImage')) ? $image->get('description') : $image->get('title');
......
......@@ -107,7 +107,7 @@ function handle_activity($activitytype, $data, $cron=false) {
// . ' ' . get_string('onview', 'activity') . ' ' . $view->title;
// }
// else {
// $data->url = get_config('wwwroot') . 'view/view.php?artefact=' . $data->artefact . '&id=' . $data->view;
// $data->url = get_config('wwwroot') . 'view/artefact.php?artefact=' . $data->artefact . '&view=' . $data->view;
// if (!$artefacttitle = get_field('artefact', 'title', 'id', $data->artefact)) {
// throw new InvalidArgumentException("Couldn't find artefact with id " . $data->view);
// }
......@@ -202,8 +202,8 @@ function handle_activity($activitytype, $data, $cron=false) {
// $data->subject .= ' ' .$artefact->get('title');
// if (empty($data->url)) {
// // @todo this might change later
// $data->url = get_config('wwwroot') . 'view/view.php?artefact='
// . $data->artefact . '&id=' . $data->view;
// $data->url = get_config('wwwroot') . 'view/artefact.php?artefact='
// . $data->artefact . '&view=' . $data->view;
// }
// }
// else { // feedback on view.
......@@ -614,7 +614,7 @@ class ActivityTypeObjectionable extends ActivityTypeAdmin {
if (!$artefacttitle = get_field('artefact', 'title', 'id', $this->artefact)) {
throw new ArtefactNotFoundException(get_string('artefactnotfound', 'error', $this->artefact));
}
$this->url = get_config('wwwroot') . 'view/view.php?artefact=' . $this->artefact . '&id=' . $this->view;
$this->url = get_config('wwwroot') . 'view/artefact.php?artefact=' . $this->artefact . '&view=' . $this->view;
$this->subject = get_string('objectionablecontentartefact', 'activity')
. ' ' . get_string('onartefact', 'activity') . ' ' . $artefacttitle;
}
......@@ -707,8 +707,8 @@ class ActivityTypeFeedback extends ActivityType {
$userid = $artefact->get('owner');
}
if (empty($this->url)) {
$this->url = get_config('wwwroot') . 'view/view.php?artefact='
. $this->artefact . '&id=' . $this->view;
$this->url = get_config('wwwroot') . 'view/artefact.php?artefact='
. $this->artefact . '&view=' . $this->view;
}
}
else { // feedback on view.
......
Supports Markdown
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