diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 22:23:45 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 22:23:45 +0000 |
commit | bb1f45eb02bac603d67ac08cb674c4050a245c28 (patch) | |
tree | 239c6afba40d3160be53c22984e3b7ba1b7442ec /mod/file/views/default | |
parent | b5c5261077640d2390f4e3c44cc51bfe4bed2e4c (diff) | |
download | elgg-bb1f45eb02bac603d67ac08cb674c4050a245c28.tar.gz elgg-bb1f45eb02bac603d67ac08cb674c4050a245c28.tar.bz2 |
Refs #2598: Converted most $vars['url'] to elgg_get_site_url()
git-svn-id: http://code.elgg.org/elgg/trunk@7149 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/views/default')
-rw-r--r-- | mod/file/views/default/file/css.php | 2 | ||||
-rw-r--r-- | mod/file/views/default/file/embed_upload.php | 4 | ||||
-rw-r--r-- | mod/file/views/default/file/groupprofile_files.php | 2 | ||||
-rw-r--r-- | mod/file/views/default/file/icon.php | 2 | ||||
-rw-r--r-- | mod/file/views/default/file/specialcontent/audio/mid.php | 2 | ||||
-rw-r--r-- | mod/file/views/default/file/specialcontent/audio/mp3.php | 2 | ||||
-rw-r--r-- | mod/file/views/default/file/specialcontent/audio/mpeg.php | 2 | ||||
-rw-r--r-- | mod/file/views/default/file/specialcontent/audio/x-wav.php | 2 | ||||
-rw-r--r-- | mod/file/views/default/file/specialcontent/image/default.php | 2 | ||||
-rw-r--r-- | mod/file/views/default/file/typecloud.php | 2 | ||||
-rw-r--r-- | mod/file/views/default/file/upload.php | 2 | ||||
-rw-r--r-- | mod/file/views/default/object/file.php | 26 | ||||
-rw-r--r-- | mod/file/views/default/widgets/filerepo/view.php | 2 |
13 files changed, 26 insertions, 26 deletions
diff --git a/mod/file/views/default/file/css.php b/mod/file/views/default/file/css.php index 74f18427e..46913dea7 100644 --- a/mod/file/views/default/file/css.php +++ b/mod/file/views/default/file/css.php @@ -99,7 +99,7 @@ } .filerepo_user_gallery_link a { padding:2px 25px 5px 0; - background: transparent url(<?php echo $vars['url']; ?>mod/file/graphics/icon_gallery.gif) no-repeat right top; + background: transparent url(<?php echo elgg_get_site_url(); ?>mod/file/graphics/icon_gallery.gif) no-repeat right top; display:block; } .filerepo_user_gallery_link a:hover { diff --git a/mod/file/views/default/file/embed_upload.php b/mod/file/views/default/file/embed_upload.php index 60c75bfb9..50f77cbb8 100644 --- a/mod/file/views/default/file/embed_upload.php +++ b/mod/file/views/default/file/embed_upload.php @@ -21,7 +21,7 @@ $form_body .= '<p>' . elgg_view('input/submit', array('value' => elgg_echo('uplo echo elgg_view('input/form', array( 'body' => $form_body, 'internalid' => 'file_embed_upload', - 'action' => $vars['url'] . 'action/file/upload', + 'action' => elgg_get_site_url() . 'action/file/upload', )); ?> @@ -35,7 +35,7 @@ $(document).ready(function() { var info = jQuery.parseJSON(data); if (info.status == 'success') { - $('.popup .content').load('<?php echo $vars['url'] . 'pg/embed/embed'; ?>?active_section=file'); + $('.popup .content').load('<?php echo elgg_get_site_url() . 'pg/embed/embed'; ?>?active_section=file'); } else { $('.popup .content').find('form').prepend('<p>' + info.message + '</p>'); } diff --git a/mod/file/views/default/file/groupprofile_files.php b/mod/file/views/default/file/groupprofile_files.php index f520f0d2e..23b087c31 100644 --- a/mod/file/views/default/file/groupprofile_files.php +++ b/mod/file/views/default/file/groupprofile_files.php @@ -41,7 +41,7 @@ //get a link to the users files - $users_file_url = $vars['url'] . "pg/file/" . elgg_get_page_owner()->username; + $users_file_url = elgg_get_site_url() . "pg/file/" . elgg_get_page_owner()->username; echo "<p><a href=\"{$users_file_url}\">" . elgg_echo('file:more') . "</a></p>"; diff --git a/mod/file/views/default/file/icon.php b/mod/file/views/default/file/icon.php index 1af8f0273..f2cb38785 100644 --- a/mod/file/views/default/file/icon.php +++ b/mod/file/views/default/file/icon.php @@ -36,7 +36,7 @@ case 'image/gif' : case 'image/bmp' : if ($thumbnail) { - echo "<img src=\"{$vars['url']}mod/file/thumbnail.php?file_guid={$vars['file_guid']}&size={$size}\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/thumbnail.php?file_guid={$vars['file_guid']}&size={$size}\" border=\"0\" />"; } else { if (!empty($mime) && elgg_view_exists("file/icon/{$mime}")) { echo elgg_view("file/icon/{$mime}", $vars); diff --git a/mod/file/views/default/file/specialcontent/audio/mid.php b/mod/file/views/default/file/specialcontent/audio/mid.php index cf216a3b3..61b3218f1 100644 --- a/mod/file/views/default/file/specialcontent/audio/mid.php +++ b/mod/file/views/default/file/specialcontent/audio/mid.php @@ -1,4 +1,4 @@ -<object type="audio/midi" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> +<object type="audio/midi" data="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> <param name="autoplay" value="false"> <param name="autoStart" value="0"> </object>
\ No newline at end of file diff --git a/mod/file/views/default/file/specialcontent/audio/mp3.php b/mod/file/views/default/file/specialcontent/audio/mp3.php index 83b77c391..cb4ab9376 100644 --- a/mod/file/views/default/file/specialcontent/audio/mp3.php +++ b/mod/file/views/default/file/specialcontent/audio/mp3.php @@ -1,4 +1,4 @@ -<object type="audio/mpeg" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> +<object type="audio/mpeg" data="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> <param name="autoplay" value="false"> <param name="autoStart" value="0"> </object>
\ No newline at end of file diff --git a/mod/file/views/default/file/specialcontent/audio/mpeg.php b/mod/file/views/default/file/specialcontent/audio/mpeg.php index 83b77c391..cb4ab9376 100644 --- a/mod/file/views/default/file/specialcontent/audio/mpeg.php +++ b/mod/file/views/default/file/specialcontent/audio/mpeg.php @@ -1,4 +1,4 @@ -<object type="audio/mpeg" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> +<object type="audio/mpeg" data="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> <param name="autoplay" value="false"> <param name="autoStart" value="0"> </object>
\ No newline at end of file diff --git a/mod/file/views/default/file/specialcontent/audio/x-wav.php b/mod/file/views/default/file/specialcontent/audio/x-wav.php index 21af956c2..b637eb1e1 100644 --- a/mod/file/views/default/file/specialcontent/audio/x-wav.php +++ b/mod/file/views/default/file/specialcontent/audio/x-wav.php @@ -1,4 +1,4 @@ -<object type="audio/x-wav" data="<?php echo $vars['url']; ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> +<object type="audio/x-wav" data="<?php echo elgg_get_site_url(); ?>mod/file/download.php?file_guid=<?php echo $vars['entity']->getGUID(); ?>" width="200" height="20"> <param name="autoplay" value="false"> <param name="autoStart" value="0"> </object>
\ No newline at end of file diff --git a/mod/file/views/default/file/specialcontent/image/default.php b/mod/file/views/default/file/specialcontent/image/default.php index b034857c2..8034c87d4 100644 --- a/mod/file/views/default/file/specialcontent/image/default.php +++ b/mod/file/views/default/file/specialcontent/image/default.php @@ -2,7 +2,7 @@ if ($vars['full'] && $smallthumb = $vars['entity']->smallthumb) { - echo "<p><a href=\"{$vars['url']}mod/file/download.php?file_guid={$vars['entity']->getGUID()}\"><img src=\"{$vars['url']}mod/file/thumbnail.php?file_guid={$vars['entity']->getGUID()}&size=large\" border=\"0\" /></a></p>"; + echo "<p><a href=\"".elgg_get_site_url()."mod/file/download.php?file_guid={$vars['entity']->getGUID()}\"><img src=\"".elgg_get_site_url()."mod/file/thumbnail.php?file_guid={$vars['entity']->getGUID()}&size=large\" border=\"0\" /></a></p>"; } diff --git a/mod/file/views/default/file/typecloud.php b/mod/file/views/default/file/typecloud.php index e404327ae..0e2f3a53c 100644 --- a/mod/file/views/default/file/typecloud.php +++ b/mod/file/views/default/file/typecloud.php @@ -21,7 +21,7 @@ $label = elgg_echo('all'); } - $url = $vars['url'] . "mod/file/search.php?subtype=file"; + $url = elgg_get_site_url() . "mod/file/search.php?subtype=file"; if ($tag != "all") $url .= "&md_type=simpletype&tag=" . urlencode($tag); if (isset($vars['friend_guid']) && $vars['friend_guid'] != false) { diff --git a/mod/file/views/default/file/upload.php b/mod/file/views/default/file/upload.php index f89cf86d3..b7b99e3b3 100644 --- a/mod/file/views/default/file/upload.php +++ b/mod/file/views/default/file/upload.php @@ -38,7 +38,7 @@ ?> -<form action="<?php echo $vars['url']; ?>action/<?php echo $action; ?>" enctype="multipart/form-data" method="post" class="margin_top"> +<form action="<?php echo elgg_get_site_url(); ?>action/<?php echo $action; ?>" enctype="multipart/form-data" method="post" class="margin_top"> <p> <label> <?php 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> "; + echo "<a href=\"".elgg_get_site_url()."mod/file/edit.php?file_guid={$file->getGUID()}\">" . elgg_echo('edit') . "</a> "; 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> + <a href="<?php echo elgg_get_site_url(); ?>mod/file/edit.php?file_guid=<?php echo $file->getGUID(); ?>"><?php echo elgg_echo('edit'); ?></a> <?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, diff --git a/mod/file/views/default/widgets/filerepo/view.php b/mod/file/views/default/widgets/filerepo/view.php index 74c7810d9..aac2c4012 100644 --- a/mod/file/views/default/widgets/filerepo/view.php +++ b/mod/file/views/default/widgets/filerepo/view.php @@ -58,7 +58,7 @@ //get a link to the users files - $users_file_url = $vars['url'] . "pg/file/" . get_user($f->owner_guid)->username; + $users_file_url = elgg_get_site_url() . "pg/file/" . get_user($f->owner_guid)->username; echo "<div class='filerepo_widget_singleitem_more'><a href=\"{$users_file_url}\">" . elgg_echo('file:more') . "</a></div>"; echo "</div>"; |