aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mod/blog/start.php7
-rw-r--r--mod/blog/views/default/blog/forms/edit.php4
-rw-r--r--mod/blog/views/default/blog/sidebar_edit.php2
-rw-r--r--mod/blog/views/default/blog/sidebar_revisions.php2
-rw-r--r--mod/blog/views/default/object/blog.php2
-rw-r--r--mod/bookmarks/start.php12
-rw-r--r--mod/bookmarks/views/default/object/bookmarks.php2
-rw-r--r--mod/diagnostics/views/default/diagnostics/forms/download.php2
-rw-r--r--mod/file/start.php4
-rw-r--r--mod/file/views/default/object/file.php4
-rw-r--r--mod/groups/actions/addtogroup.php2
-rw-r--r--mod/groups/actions/join.php2
-rw-r--r--mod/groups/all.php2
-rw-r--r--mod/groups/index.php2
-rw-r--r--mod/groups/membership.php2
-rw-r--r--mod/groups/start.php18
-rw-r--r--mod/groups/views/default/forum/maintopic.php2
-rw-r--r--mod/groups/views/default/groups/invitationrequests.php2
-rw-r--r--mod/groups/views/default/groups/membershiprequests.php2
-rw-r--r--mod/groups/views/default/object/groupforumtopic.php4
20 files changed, 34 insertions, 45 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php
index a4a4a7c65..c61e818ad 100644
--- a/mod/blog/start.php
+++ b/mod/blog/start.php
@@ -167,8 +167,6 @@ function blog_page_handler($page) {
* @return string URL of blog.
*/
function blog_url_handler($entity) {
- global $CONFIG;
-
if (!$user = get_entity($entity->owner_guid)) {
// default to a standard view if no owner.
return FALSE;
@@ -176,8 +174,7 @@ function blog_url_handler($entity) {
$friendly_title = elgg_get_friendly_title($entity->title);
- $url = "{$CONFIG->site->url}pg/blog/{$user->username}/read/{$entity->getGUID()}/$friendly_title";
- return $url;
+ return "pg/blog/{$user->username}/read/{$entity->guid}/$friendly_title";
}
/**
@@ -200,7 +197,7 @@ function blog_profile_menu($hook, $entity_type, $return_value, $params) {
if (!($params['owner'] instanceof ElggGroup)) {
$return_value[] = array(
'text' => elgg_echo('blog'),
- 'href' => "{$CONFIG->url}pg/blog/{$params['owner']->username}/read",
+ 'href' => "pg/blog/{$params['owner']->username}/read",
);
}
diff --git a/mod/blog/views/default/blog/forms/edit.php b/mod/blog/views/default/blog/forms/edit.php
index 88d41d269..2b07fae94 100644
--- a/mod/blog/views/default/blog/forms/edit.php
+++ b/mod/blog/views/default/blog/forms/edit.php
@@ -64,7 +64,7 @@ if (isset ($vars['entity'])) {
}
// add a delete button if editing
- $delete_url = elgg_get_site_url()."action/blog/delete?guid={$blog->getGUID()}";
+ $delete_url = "action/blog/delete?guid={$blog->getGUID()}";
$delete_link = elgg_view('output/confirmlink', array(
'href' => $delete_url,
'text' => elgg_echo('delete'),
@@ -219,7 +219,7 @@ ___END;
echo elgg_view('input/form', array(
'internalid' => 'blog_post_edit',
'internalname' => 'blog_post',
- 'action' => elgg_get_site_url()."action/blog/save",
+ 'action' => "action/blog/save",
'body' => $form_body
));
diff --git a/mod/blog/views/default/blog/sidebar_edit.php b/mod/blog/views/default/blog/sidebar_edit.php
index 3b884437f..9b56f9a73 100644
--- a/mod/blog/views/default/blog/sidebar_edit.php
+++ b/mod/blog/views/default/blog/sidebar_edit.php
@@ -27,7 +27,7 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) {
if ($revisions) {
echo '<ul class="blog_revisions">';
- $load_base_url = elgg_get_site_url()."pg/blog/{$owner->username}/edit/{$blog->getGUID()}/";
+ $load_base_url = "pg/blog/{$owner->username}/edit/{$blog->getGUID()}/";
foreach ($revisions as $revision) {
$time = elgg_view_friendly_time($revision->time_created);
diff --git a/mod/blog/views/default/blog/sidebar_revisions.php b/mod/blog/views/default/blog/sidebar_revisions.php
index 43215963b..e53ba9e52 100644
--- a/mod/blog/views/default/blog/sidebar_revisions.php
+++ b/mod/blog/views/default/blog/sidebar_revisions.php
@@ -31,7 +31,7 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) {
$n = count($revisions);
echo '<ul class="blog_revisions">';
- $load_base_url = elgg_get_site_url()."pg/blog/{$owner->username}/edit/{$blog->getGUID()}/";
+ $load_base_url = "pg/blog/{$owner->username}/edit/{$blog->getGUID()}/";
// show the "published revision"
if ($blog->status == 'published') {
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php
index fc88eea25..b93608b7e 100644
--- a/mod/blog/views/default/object/blog.php
+++ b/mod/blog/views/default/object/blog.php
@@ -51,7 +51,7 @@ if ($blog->canEdit()) {
$edit_url = elgg_get_site_url()."pg/blog/{$owner->username}/edit/{$blog->getGUID()}/";
$edit_link = "<span class='entity_edit'><a href=\"$edit_url\">" . elgg_echo('edit') . '</a></span>';
- $delete_url = elgg_get_site_url()."action/blog/delete?guid={$blog->getGUID()}";
+ $delete_url = "action/blog/delete?guid={$blog->getGUID()}";
$delete_link = "<span class='delete_button'>" . elgg_view('output/confirmlink', array(
'href' => $delete_url,
'text' => elgg_echo('delete'),
diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php
index d8bae2350..e65f7d179 100644
--- a/mod/bookmarks/start.php
+++ b/mod/bookmarks/start.php
@@ -225,16 +225,16 @@ function bookmarks_page_handler($page) {
$header .= elgg_view("page_elements/content_header", array(
'context' => $context,
'type' => 'bookmarks',
- 'all_link' => "{$CONFIG->url}pg/bookmarks/",
- 'new_link' => "{$CONFIG->url}pg/bookmarks/{$owner_name}/add"
+ 'all_link' => "pg/bookmarks/",
+ 'new_link' => "pg/bookmarks/{$owner_name}/add"
));
}
}else{
$header .= elgg_view("page_elements/content_header", array(
'context' => $context,
'type' => 'bookmarks',
- 'all_link' => "{$CONFIG->url}pg/bookmarks/",
- 'new_link' => "{$CONFIG->url}pg/bookmarks/{$owner_name}/add"
+ 'all_link' => "pg/bookmarks/",
+ 'new_link' => "pg/bookmarks/{$owner_name}/add"
));
}
@@ -257,7 +257,7 @@ function bookmark_url($entity) {
global $CONFIG;
$title = $entity->title;
$title = elgg_get_friendly_title($title);
- return $CONFIG->url . "pg/bookmarks/" . $entity->getOwnerEntity()->username . "/read/" . $entity->getGUID() . "/" . $title;
+ return "pg/bookmarks/" . $entity->getOwnerEntity()->username . "/read/" . $entity->getGUID() . "/" . $title;
}
/**
@@ -320,7 +320,7 @@ function bookmarks_profile_menu($hook, $entity_type, $return_value, $params) {
$return_value[] = array(
'text' => elgg_echo('bookmarks'),
- 'href' => "{$CONFIG->url}pg/bookmarks/{$params['owner']->username}",
+ 'href' => "pg/bookmarks/{$params['owner']->username}",
);
return $return_value;
diff --git a/mod/bookmarks/views/default/object/bookmarks.php b/mod/bookmarks/views/default/object/bookmarks.php
index db41eee40..aa4874610 100644
--- a/mod/bookmarks/views/default/object/bookmarks.php
+++ b/mod/bookmarks/views/default/object/bookmarks.php
@@ -56,7 +56,7 @@ if (@file_exists($faviconurl)) {
//delete
if($vars['entity']->canEdit()){
$delete .= "<span class='delete_button'>" . elgg_view('output/confirmlink',array(
- 'href' => elgg_get_site_url() . "action/bookmarks/delete?bookmark_guid=" . $vars['entity']->guid,
+ 'href' => "action/bookmarks/delete?bookmark_guid=" . $vars['entity']->guid,
'text' => elgg_echo("delete"),
'confirm' => elgg_echo("bookmarks:delete:confirm"),
)) . "</span>";
diff --git a/mod/diagnostics/views/default/diagnostics/forms/download.php b/mod/diagnostics/views/default/diagnostics/forms/download.php
index 93e03d7ad..cbbd414df 100644
--- a/mod/diagnostics/views/default/diagnostics/forms/download.php
+++ b/mod/diagnostics/views/default/diagnostics/forms/download.php
@@ -6,5 +6,5 @@
*/
$form_body = elgg_view('input/submit', array('value' => elgg_echo('diagnostics:download')));
- echo elgg_view('input/form', array('body' => $form_body, 'action' => $CONFIG->url . "action/diagnostics/download"));
+ echo elgg_view('input/form', array('body' => $form_body, 'action' => "action/diagnostics/download"));
?> \ No newline at end of file
diff --git a/mod/file/start.php b/mod/file/start.php
index 005019060..544024d49 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -291,11 +291,9 @@
* @return string File URL
*/
function file_url($entity) {
-
- global $CONFIG;
$title = $entity->title;
$title = elgg_get_friendly_title($title);
- return $CONFIG->url . "pg/file/" . $entity->getOwnerEntity()->username . "/read/" . $entity->getGUID() . "/" . $title;
+ return "pg/file/" . $entity->getOwnerEntity()->username . "/read/" . $entity->getGUID() . "/" . $title;
}
// Make sure test_init is called on initialisation
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index c1d2a3d13..2511f5af6 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -43,7 +43,7 @@
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' => elgg_get_site_url() . "action/file/delete?file=" . $file->getGUID(),
+ 'href' => "action/file/delete?file=" . $file->getGUID(),
'text' => elgg_echo("delete"),
'confirm' => elgg_echo("file:delete:confirm"),
'is_action' => true,
@@ -151,7 +151,7 @@
<?php
echo elgg_view('output/confirmlink',array(
- 'href' => elgg_get_site_url() . "action/file/delete?file=" . $file->getGUID(),
+ 'href' => "action/file/delete?file=" . $file->getGUID(),
'text' => elgg_echo("delete"),
'confirm' => elgg_echo("file:delete:confirm"),
'is_action' => true,
diff --git a/mod/groups/actions/addtogroup.php b/mod/groups/actions/addtogroup.php
index 6f63ff446..dab44666d 100644
--- a/mod/groups/actions/addtogroup.php
+++ b/mod/groups/actions/addtogroup.php
@@ -69,7 +69,7 @@
add_entity_relationship($group->guid, 'invited', $user->guid);
// Send email
- $url = "{$CONFIG->url}pg/groups/invited?user_guid={$user->guid}&group_guid={$group->guid}";
+ $url = elgg_get_site_url()."pg/groups/invited?user_guid={$user->guid}&group_guid={$group->guid}";
if (notify_user($user->getGUID(), $group->owner_guid,
sprintf(elgg_echo('groups:invite:subject'), $user->name, $group->name),
sprintf(elgg_echo('groups:invite:body'), $user->name, $logged_in_user->name, $group->name, $url),
diff --git a/mod/groups/actions/join.php b/mod/groups/actions/join.php
index 158da372c..40f227ba7 100644
--- a/mod/groups/actions/join.php
+++ b/mod/groups/actions/join.php
@@ -51,7 +51,7 @@
{
// Closed group, request membership
system_message(elgg_echo('groups:privategroup'));
- forward(elgg_add_action_tokens_to_url($CONFIG->url . "action/groups/joinrequest?user_guid=$user_guid&group_guid=$group_guid", FALSE));
+ forward(elgg_add_action_tokens_to_url("action/groups/joinrequest?user_guid=$user_guid&group_guid=$group_guid", FALSE));
exit;
}
}
diff --git a/mod/groups/all.php b/mod/groups/all.php
index c51097910..354437c7e 100644
--- a/mod/groups/all.php
+++ b/mod/groups/all.php
@@ -56,7 +56,7 @@
$title = sprintf(elgg_echo("groups:all"), elgg_get_page_owner()->name);
if(isloggedin()){
- $area1 .= elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups', 'new_link' => "{$CONFIG->url}pg/groups/new"));
+ $area1 .= elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups', 'new_link' => "pg/groups/new"));
}
$area1 .= elgg_view("groups/group_sort_menu", array("count" => $group_count, "filter" => $filter)) . $objects;
$body = elgg_view_layout('one_column_with_sidebar', $area1, $area2);
diff --git a/mod/groups/index.php b/mod/groups/index.php
index 398996072..48ff99805 100644
--- a/mod/groups/index.php
+++ b/mod/groups/index.php
@@ -13,7 +13,7 @@
$title = elgg_echo("groups:owned");
// Get objects
- $area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups', 'new_link' => "{$CONFIG->url}pg/groups/new"));
+ $area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups', 'new_link' => "pg/groups/new"));
set_context('search');
$objects = elgg_list_entities(array('types' => 'group', 'owner_guid' => elgg_get_page_owner_guid(), 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE));
diff --git a/mod/groups/membership.php b/mod/groups/membership.php
index b479018ca..ace899772 100644
--- a/mod/groups/membership.php
+++ b/mod/groups/membership.php
@@ -19,7 +19,7 @@
} else $title = elgg_echo("groups:owned");
// Get objects
- $area2 = elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'groups', 'new_link' => "{$CONFIG->url}pg/groups/new"));
+ $area2 = elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'groups', 'new_link' => "pg/groups/new"));
set_context('search');
// offset is grabbed in the list_entities_from_relationship() function
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 1d00782c4..f24a3106a 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -335,19 +335,13 @@
* @return string File URL
*/
function groups_url($entity) {
-
- global $CONFIG;
-
$title = elgg_get_friendly_title($entity->name);
- return $CONFIG->url . "pg/groups/{$entity->guid}/$title/";
+ return "pg/groups/{$entity->guid}/$title/";
}
function groups_groupforumtopic_url($entity) {
-
- global $CONFIG;
- return $CONFIG->url . 'mod/groups/topicposts.php?topic='. $entity->guid .'&group_guid=' . $entity->container_guid;
-
+ return 'mod/groups/topicposts.php?topic='. $entity->guid .'&group_guid=' . $entity->container_guid;
}
/**
@@ -502,7 +496,7 @@
$filehandler->setFilename("groups/" . $entity->guid . $size . ".jpg");
if ($filehandler->exists()) {
- $url = $CONFIG->url . "pg/groupicon/{$entity->guid}/$size/$icontime.jpg";
+ $url = elgg_get_site_url() . "pg/groupicon/{$entity->guid}/$size/$icontime.jpg";
return $url;
}
@@ -536,7 +530,7 @@
function group_topicpost_url($annotation) {
if ($parent = get_entity($annotation->entity_guid)) {
global $CONFIG;
- return elgg_get_site_url() . 'mod/groups/topicposts.php?topic='.$parent->guid.'&amp;group_guid='.$parent->container_guid.'#' . $annotation->id;
+ return 'mod/groups/topicposts.php?topic='.$parent->guid.'&amp;group_guid='.$parent->container_guid.'#' . $annotation->id;
}
}
@@ -581,7 +575,7 @@
if ($params['owner'] instanceof ElggGroup && $group_owner->forum_enable != 'no') {
$return_value[] = array(
'text' => elgg_echo('groups:forum'),
- 'href' => "{$CONFIG->url}pg/groups/forum/{$params['owner']->getGUID()}"
+ 'href' => "pg/groups/forum/{$params['owner']->getGUID()}"
);
}
return $return_value;
@@ -593,7 +587,7 @@
if ($params['owner'] instanceof ElggGroup) {
$return_value[] = array(
'text' => elgg_echo('Activity'),
- 'href' => "{$CONFIG->url}pg/groups/activity/{$params['owner']->getGUID()}"
+ 'href' => "pg/groups/activity/{$params['owner']->getGUID()}"
);
}
return $return_value;
diff --git a/mod/groups/views/default/forum/maintopic.php b/mod/groups/views/default/forum/maintopic.php
index 9a3cc64cb..61b6c49fd 100644
--- a/mod/groups/views/default/forum/maintopic.php
+++ b/mod/groups/views/default/forum/maintopic.php
@@ -26,7 +26,7 @@
if (groups_can_edit_discussion($vars['entity'], elgg_get_page_owner()->owner_guid)) {
echo "<div class='entity_metadata'>";
echo "<span class='delete_button'>".elgg_view("output/confirmlink",array(
- 'href' => elgg_get_site_url() . "action/groups/deletepost?post=" . $vars['entity']->id . "&topic=" . get_input('topic') . "&group=" . get_input('group_guid'),
+ 'href' => "action/groups/deletepost?post=" . $vars['entity']->id . "&topic=" . get_input('topic') . "&group=" . get_input('group_guid'),
'text' => elgg_echo('delete'),
'confirm' => elgg_echo('deleteconfirm')
))."</span>";
diff --git a/mod/groups/views/default/groups/invitationrequests.php b/mod/groups/views/default/groups/invitationrequests.php
index 297dc31d4..c905cf8f7 100644
--- a/mod/groups/views/default/groups/invitationrequests.php
+++ b/mod/groups/views/default/groups/invitationrequests.php
@@ -21,7 +21,7 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
<a href="<?php echo $url; ?>" class="submit_button"><?php echo elgg_echo('accept'); ?></a>
<?php
echo str_replace('<a', '<a class="action_button disabled" ', elgg_view('output/confirmlink',array(
- 'href' => elgg_get_site_url() . "action/groups/killinvitation?user_guid={$user->getGUID()}&group_guid={$group->getGUID()}",
+ 'href' => "action/groups/killinvitation?user_guid={$user->getGUID()}&group_guid={$group->getGUID()}",
'confirm' => elgg_echo('groups:invite:remove:check'),
'text' => elgg_echo('delete'),
)));
diff --git a/mod/groups/views/default/groups/membershiprequests.php b/mod/groups/views/default/groups/membershiprequests.php
index 6dde33bd4..dbd65a667 100644
--- a/mod/groups/views/default/groups/membershiprequests.php
+++ b/mod/groups/views/default/groups/membershiprequests.php
@@ -22,7 +22,7 @@
<a href="<?php echo $url; ?>" class="submit_button"><?php echo elgg_echo('accept'); ?></a>
<?php
echo str_replace('<a', '<a class="action_button disabled" ', elgg_view('output/confirmlink',array(
- 'href' => elgg_get_site_url() . 'action/groups/killrequest?user_guid='.$request->guid.'&group_guid=' . $vars['entity']->guid,
+ 'href' => 'action/groups/killrequest?user_guid='.$request->guid.'&group_guid=' . $vars['entity']->guid,
'confirm' => elgg_echo('groups:joinrequest:remove:check'),
'text' => elgg_echo('delete'),
)));
diff --git a/mod/groups/views/default/object/groupforumtopic.php b/mod/groups/views/default/object/groupforumtopic.php
index 9729c9d83..2d5b1e094 100644
--- a/mod/groups/views/default/object/groupforumtopic.php
+++ b/mod/groups/views/default/object/groupforumtopic.php
@@ -53,14 +53,14 @@ if (get_context() == "search") {
// display the delete link to those allowed to delete
$info .= "<div class='entity_metadata'>";
$info .= '<span class="entity_edit">' . elgg_view("output/url", array(
- 'href' => elgg_get_site_url() . "mod/groups/edittopic.php?group={$vars['entity']->container_guid}&topic={$vars['entity']->guid}",
+ 'href' => "mod/groups/edittopic.php?group={$vars['entity']->container_guid}&topic={$vars['entity']->guid}",
'text' => elgg_echo('edit'),
));
$info .= '</span>';
// display the delete link to those allowed to delete
$info .= '<span class="delete_button">' . elgg_view("output/confirmlink", array(
- 'href' => elgg_get_site_url() . "action/groups/deletetopic?topic=" . $vars['entity']->guid . "&group=" . $vars['entity']->container_guid,
+ 'href' => "action/groups/deletetopic?topic=" . $vars['entity']->guid . "&group=" . $vars['entity']->container_guid,
'text' => elgg_echo('delete'),
'confirm' => elgg_echo('deleteconfirm'),
));