aboutsummaryrefslogtreecommitdiff
path: root/mod/file/views/default/object/file.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/file/views/default/object/file.php')
-rw-r--r--mod/file/views/default/object/file.php26
1 files changed, 13 insertions, 13 deletions
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index 6c979f13e..c1d2a3d13 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -28,8 +28,8 @@
echo "<div class='filerepo_gallery_item'>";
if ($vars['entity']->smallthumb) {
echo "<p class='filerepo_title'>" . $file->title . "</p>";
- echo "<p><a href=\"{$file->getURL()}\"><img src=\"{$vars['url']}mod/file/thumbnail.php?size=medium&file_guid={$vars['entity']->getGUID()}\" border=\"0\" /></a></p>";
- echo "<p class='filerepo_timestamp'><small><a href=\"{$vars['url']}pg/file/{$owner->username}\">{$owner->username}</a> {$friendlytime}</small></p>";
+ echo "<p><a href=\"{$file->getURL()}\"><img src=\"".elgg_get_site_url()."mod/file/thumbnail.php?size=medium&file_guid={$vars['entity']->getGUID()}\" border=\"0\" /></a></p>";
+ echo "<p class='filerepo_timestamp'><small><a href=\"".elgg_get_site_url()."pg/file/{$owner->username}\">{$owner->username}</a> {$friendlytime}</small></p>";
//get the number of comments
$numcomments = elgg_count_comments($vars['entity']);
@@ -40,10 +40,10 @@
//if the user can edit, display edit and delete links
if ($file->canEdit()) {
echo "<div class='filerepo_controls'><p>";
- echo "<a href=\"{$vars['url']}mod/file/edit.php?file_guid={$file->getGUID()}\">" . elgg_echo('edit') . "</a>&nbsp;";
+ echo "<a href=\"".elgg_get_site_url()."mod/file/edit.php?file_guid={$file->getGUID()}\">" . elgg_echo('edit') . "</a>&nbsp;";
echo elgg_view('output/confirmlink',array(
- 'href' => $vars['url'] . "action/file/delete?file=" . $file->getGUID(),
+ 'href' => elgg_get_site_url() . "action/file/delete?file=" . $file->getGUID(),
'text' => elgg_echo("delete"),
'confirm' => elgg_echo("file:delete:confirm"),
'is_action' => true,
@@ -56,7 +56,7 @@
} else {
echo "<p class='filerepo_title'>{$title}</p>";
echo "<a href=\"{$file->getURL()}\">" . elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid, 'size' => 'large')) . "</a>";
- echo "<p class='filerepo_timestamp'><small><a href=\"{$vars['url']}pg/file/{$owner->username}\">{$owner->name}</a> {$friendlytime}</small></p>";
+ echo "<p class='filerepo_timestamp'><small><a href=\"".elgg_get_site_url()."pg/file/{$owner->username}\">{$owner->name}</a> {$friendlytime}</small></p>";
//get the number of comments
$numcomments = elgg_count_comments($file);
if ($numcomments)
@@ -68,7 +68,7 @@
} else {
$info = "<p class='entity_title'> <a href=\"{$file->getURL()}\">{$title}</a></p>";
- $info .= "<p class='entity_subtext'><a href=\"{$vars['url']}pg/file/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
+ $info .= "<p class='entity_subtext'><a href=\"".elgg_get_site_url()."pg/file/{$owner->username}\">{$owner->name}</a> {$friendlytime}";
$numcomments = elgg_count_comments($file);
if ($numcomments)
$info .= ", <a href=\"{$file->getURL()}\">" . sprintf(elgg_echo("comments")) . " (" . $numcomments . ")</a>";
@@ -84,7 +84,7 @@
?>
<div class="filerepo_file">
<div class="filerepo_icon">
- <a href="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php
+ <a href="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php
echo elgg_view("file/icon", array("mimetype" => $mime, 'thumbnail' => $file->thumbnail, 'file_guid' => $file_guid));
@@ -94,17 +94,17 @@
<div class="filerepo_title_owner_wrapper">
<?php
//get the user and a link to their gallery
- $user_gallery = $vars['url'] . "mod/file/search.php?md_type=simpletype&subtype=file&tag=image&owner_guid=" . $owner->guid . "&search_viewtype=gallery";
+ $user_gallery = elgg_get_site_url() . "mod/file/search.php?md_type=simpletype&subtype=file&tag=image&owner_guid=" . $owner->guid . "&search_viewtype=gallery";
?>
<div class="filerepo_user_gallery_link"><a href="<?php echo $user_gallery; ?>"><?php echo sprintf(elgg_echo("file:user:gallery"),''); ?></a></div>
- <div class="filerepo_title"><h2><a href="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php echo $title; ?></a></h2></div>
+ <div class="filerepo_title"><h2><a href="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php echo $title; ?></a></h2></div>
<div class="filerepo_owner">
<?php
echo elgg_view("profile/icon",array('entity' => $owner, 'size' => 'tiny'));
?>
- <p class="filerepo_owner_details"><b><a href="<?php echo $vars['url']; ?>pg/file/<?php echo $owner->username; ?>"><?php echo $owner->name; ?></a></b><br />
+ <p class="filerepo_owner_details"><b><a href="<?php echo elgg_get_site_url(); ?>pg/file/<?php echo $owner->username; ?>"><?php echo $owner->name; ?></a></b><br />
<small><?php echo $friendlytime; ?></small></p>
</div>
</div>
@@ -138,7 +138,7 @@
?>
- <div class="filerepo_download"><p><a class="action_button small" href="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php echo elgg_echo("file:download"); ?></a></p></div>
+ <div class="filerepo_download"><p><a class="action_button small" href="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $file_guid; ?>"><?php echo elgg_echo("file:download"); ?></a></p></div>
<?php
@@ -147,11 +147,11 @@
<div class="filerepo_controls">
<p>
- <a href="<?php echo $vars['url']; ?>mod/file/edit.php?file_guid=<?php echo $file->getGUID(); ?>"><?php echo elgg_echo('edit'); ?></a>&nbsp;
+ <a href="<?php echo elgg_get_site_url(); ?>mod/file/edit.php?file_guid=<?php echo $file->getGUID(); ?>"><?php echo elgg_echo('edit'); ?></a>&nbsp;
<?php
echo elgg_view('output/confirmlink',array(
- 'href' => $vars['url'] . "action/file/delete?file=" . $file->getGUID(),
+ 'href' => elgg_get_site_url() . "action/file/delete?file=" . $file->getGUID(),
'text' => elgg_echo("delete"),
'confirm' => elgg_echo("file:delete:confirm"),
'is_action' => true,