diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 22:15:36 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-10-30 22:15:36 +0000 |
commit | 9255088a79a034c3cdf4eb46124504b9dd0c838e (patch) | |
tree | a225048f7475ea8ddb4820b539f8482655d9da8e /mod | |
parent | 323e3ee1dafdf7bdd60607fd960e53957fce770d (diff) | |
download | elgg-9255088a79a034c3cdf4eb46124504b9dd0c838e.tar.gz elgg-9255088a79a034c3cdf4eb46124504b9dd0c838e.tar.bz2 |
Refs #2598: Converted virtually all uses of $CONFIG->wwwroot to elgg_get_site_url()
git-svn-id: http://code.elgg.org/elgg/trunk@7146 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
51 files changed, 81 insertions, 81 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php index 4c0fa66a5..a87a14ca2 100644 --- a/mod/blog/start.php +++ b/mod/blog/start.php @@ -23,7 +23,7 @@ function blog_init() { global $CONFIG; require_once dirname(__FILE__) . '/blog_lib.php'; - add_menu(elgg_echo('blog:blogs'), "{$CONFIG->wwwroot}pg/blog/", array()); + add_menu(elgg_echo('blog:blogs'), elgg_get_site_url()."pg/blog/", array()); // run the setup upon activations or to upgrade old installations. run_function_once('blog_runonce', '1269370108'); diff --git a/mod/blog/views/default/blog/sidebar_menu.php b/mod/blog/views/default/blog/sidebar_menu.php index ab00433c8..f69e23e29 100644 --- a/mod/blog/views/default/blog/sidebar_menu.php +++ b/mod/blog/views/default/blog/sidebar_menu.php @@ -49,7 +49,7 @@ if ($page_owner) { $page_owner = elgg_get_page_owner(); } - $link = $CONFIG->wwwroot . 'pg/blog/' . $page_owner->username . '/archive/' . $timestamplow . '/' . $timestamphigh; + $link = elgg_get_site_url() . 'pg/blog/' . $page_owner->username . '/archive/' . $timestamplow . '/' . $timestamphigh; $month = sprintf(elgg_echo('date:month:' . substr($date,4,2)), substr($date, 0, 4)); echo "<li><a href=\"$link\" title=\"$month\">$month</a></li>"; } diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php index 25b87b6c7..2c82ca674 100644 --- a/mod/bookmarks/start.php +++ b/mod/bookmarks/start.php @@ -11,7 +11,7 @@ function bookmarks_init() { global $CONFIG; //add a tools menu option - add_menu(elgg_echo('bookmarks'), $CONFIG->wwwroot . 'pg/bookmarks'); + add_menu(elgg_echo('bookmarks'), elgg_get_site_url() . 'pg/bookmarks'); // Register a page handler, so we can have nice URLs register_page_handler('bookmarks', 'bookmarks_page_handler'); @@ -59,7 +59,7 @@ function bookmarks_pagesetup() { if (isloggedin()) { if ($page_owner instanceof ElggGroup && get_context() == 'groups') { if ($page_owner->bookmarks_enable != "no") { - //add_submenu_item(sprintf(elgg_echo("bookmarks:group"),$page_owner->name), $CONFIG->wwwroot . "pg/bookmarks/" . $page_owner->username . '/items'); + //add_submenu_item(sprintf(elgg_echo("bookmarks:group"),$page_owner->name), elgg_get_site_url() . "pg/bookmarks/" . $page_owner->username . '/items'); } } } @@ -276,7 +276,7 @@ function bookmarks_notify_message($hook, $entity_type, $returnvalue, $params) { $descr = $entity->description; $title = $entity->title; global $CONFIG; - $url = $CONFIG->wwwroot . "pg/view/" . $entity->guid; + $url = elgg_get_site_url() . "pg/view/" . $entity->guid; if ($method == 'sms') { $owner = $entity->getOwnerEntity(); return $owner->name . ' ' . elgg_echo("bookmarks:via") . ': ' . $url . ' (' . $title . ')'; diff --git a/mod/diagnostics/index.php b/mod/diagnostics/index.php index abc5c2b31..e4620cb95 100644 --- a/mod/diagnostics/index.php +++ b/mod/diagnostics/index.php @@ -24,7 +24,7 @@ $test_body .= "<p>" . elgg_echo('diagnostics:unittester:warning') . "</p>"; if (isset($CONFIG->debug)) { // create a button to run tests - $js = "onclick=\"window.location='{$CONFIG->wwwroot}engine/tests/suite.php'\""; + $js = "onclick=\"window.location='".elgg_get_site_url()."engine/tests/suite.php'\""; $params = array('type' => 'button', 'value' => elgg_echo('diagnostics:test:executeall'), 'js' => $js); $test_body .= elgg_view('input/button', $params); } else { diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php index d2fc1b5a1..4711cd9d6 100644 --- a/mod/diagnostics/start.php +++ b/mod/diagnostics/start.php @@ -28,7 +28,7 @@ function diagnostics_pagesetup() { if (get_context() == 'admin' && isadminloggedin()) { global $CONFIG; - add_submenu_item(elgg_echo('diagnostics'), $CONFIG->wwwroot . 'pg/diagnostics/'); + add_submenu_item(elgg_echo('diagnostics'), elgg_get_site_url() . 'pg/diagnostics/'); } } diff --git a/mod/file/actions/save.php b/mod/file/actions/save.php index 923bc043b..17a9b16fb 100644 --- a/mod/file/actions/save.php +++ b/mod/file/actions/save.php @@ -17,7 +17,7 @@ if (!$file = get_entity($guid)) { register_error(elgg_echo("file:uploadfailed")); - forward($CONFIG->wwwroot . "pg/file/" . get_loggedin_user()->username); + forward(elgg_get_site_url() . "pg/file/" . get_loggedin_user()->username); exit; } @@ -44,5 +44,5 @@ else register_error(elgg_echo("file:uploadfailed")); - forward($CONFIG->wwwroot . "pg/file/" . $container->username); + forward(elgg_get_site_url() . "pg/file/" . $container->username); ?>
\ No newline at end of file diff --git a/mod/file/actions/upload.php b/mod/file/actions/upload.php index 367488d7c..82744730c 100644 --- a/mod/file/actions/upload.php +++ b/mod/file/actions/upload.php @@ -193,7 +193,7 @@ if (!$ajax) { $container_user = get_entity($container_guid); - forward($CONFIG->wwwroot . "pg/file/" . $container_user->username); + forward(elgg_get_site_url() . "pg/file/" . $container_user->username); } } else { diff --git a/mod/file/start.php b/mod/file/start.php index 60e863df5..228e4788b 100644 --- a/mod/file/start.php +++ b/mod/file/start.php @@ -28,7 +28,7 @@ global $CONFIG; // Set up menu (tools dropdown) - add_menu(elgg_echo('files'), $CONFIG->wwwroot . "pg/file/"); + add_menu(elgg_echo('files'), elgg_get_site_url() . "pg/file/"); // Extend CSS elgg_extend_view('css', 'file/css'); @@ -138,7 +138,7 @@ $descr = $entity->description; $title = $entity->title; global $CONFIG; - $url = $CONFIG->wwwroot . "pg/view/" . $entity->guid; + $url = elgg_get_site_url() . "pg/view/" . $entity->guid; if ($method == 'sms') { $owner = $entity->getOwnerEntity(); return $owner->name . ' ' . elgg_echo("file:via") . ': ' . $url . ' (' . $title . ')'; diff --git a/mod/file/views/default/file/icon/application/default.php b/mod/file/views/default/file/icon/application/default.php index eea8cbafe..d9d60901b 100644 --- a/mod/file/views/default/file/icon/application/default.php +++ b/mod/file/views/default/file/icon/application/default.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/application{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/application{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/application/excel.php b/mod/file/views/default/file/icon/application/excel.php index ba2460fec..a4123ea6e 100644 --- a/mod/file/views/default/file/icon/application/excel.php +++ b/mod/file/views/default/file/icon/application/excel.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/application/msword.php b/mod/file/views/default/file/icon/application/msword.php index 20efb1069..074f7ed91 100644 --- a/mod/file/views/default/file/icon/application/msword.php +++ b/mod/file/views/default/file/icon/application/msword.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/word{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/word{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/application/pdf.php b/mod/file/views/default/file/icon/application/pdf.php index 6a5a7369c..1aeafdb7b 100644 --- a/mod/file/views/default/file/icon/application/pdf.php +++ b/mod/file/views/default/file/icon/application/pdf.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/pdf{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/pdf{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/application/powerpoint.php b/mod/file/views/default/file/icon/application/powerpoint.php index 1857d513f..47a15b639 100644 --- a/mod/file/views/default/file/icon/application/powerpoint.php +++ b/mod/file/views/default/file/icon/application/powerpoint.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/application/vnd.ms-excel.php b/mod/file/views/default/file/icon/application/vnd.ms-excel.php index ba2460fec..a4123ea6e 100644 --- a/mod/file/views/default/file/icon/application/vnd.ms-excel.php +++ b/mod/file/views/default/file/icon/application/vnd.ms-excel.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/excel{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/application/vnd.ms-powerpoint.php b/mod/file/views/default/file/icon/application/vnd.ms-powerpoint.php index 1857d513f..47a15b639 100644 --- a/mod/file/views/default/file/icon/application/vnd.ms-powerpoint.php +++ b/mod/file/views/default/file/icon/application/vnd.ms-powerpoint.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/ppt{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/application/vnd.oasis.opendocument.text.php b/mod/file/views/default/file/icon/application/vnd.oasis.opendocument.text.php index d0bde81df..309977160 100644 --- a/mod/file/views/default/file/icon/application/vnd.oasis.opendocument.text.php +++ b/mod/file/views/default/file/icon/application/vnd.oasis.opendocument.text.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/openoffice{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/openoffice{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/archive.php b/mod/file/views/default/file/icon/archive.php index 4fffd9346..694574e8f 100644 --- a/mod/file/views/default/file/icon/archive.php +++ b/mod/file/views/default/file/icon/archive.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/archive{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/archive{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/audio.php b/mod/file/views/default/file/icon/audio.php index 73c55be7b..ce6f6ab4f 100644 --- a/mod/file/views/default/file/icon/audio.php +++ b/mod/file/views/default/file/icon/audio.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/music{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/music{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/default.php b/mod/file/views/default/file/icon/default.php index 844ee312c..ed1b71547 100644 --- a/mod/file/views/default/file/icon/default.php +++ b/mod/file/views/default/file/icon/default.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "{$CONFIG->wwwroot}mod/file/graphics/icons/general{$ext}.gif"; + echo elgg_get_site_url()."mod/file/graphics/icons/general{$ext}.gif"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/document.php b/mod/file/views/default/file/icon/document.php index 8823514b8..fed4660fb 100644 --- a/mod/file/views/default/file/icon/document.php +++ b/mod/file/views/default/file/icon/document.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/text{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/text{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/text/directory.php b/mod/file/views/default/file/icon/text/directory.php index a08e098c6..863e53d68 100644 --- a/mod/file/views/default/file/icon/text/directory.php +++ b/mod/file/views/default/file/icon/text/directory.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/vcard{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/vcard{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/file/views/default/file/icon/video.php b/mod/file/views/default/file/icon/video.php index 94617abff..db3f001f7 100644 --- a/mod/file/views/default/file/icon/video.php +++ b/mod/file/views/default/file/icon/video.php @@ -5,6 +5,6 @@ } else { $ext = ''; } - echo "<img src=\"{$CONFIG->wwwroot}mod/file/graphics/icons/video{$ext}.gif\" border=\"0\" />"; + echo "<img src=\"".elgg_get_site_url()."mod/file/graphics/icons/video{$ext}.gif\" border=\"0\" />"; ?>
\ No newline at end of file diff --git a/mod/groups/actions/forums/addtopic.php b/mod/groups/actions/forums/addtopic.php index 5f9c8e709..0b8a0f590 100644 --- a/mod/groups/actions/forums/addtopic.php +++ b/mod/groups/actions/forums/addtopic.php @@ -67,7 +67,7 @@ // Forward to the group forum page global $CONFIG; - $url = $CONFIG->wwwroot . "pg/groups/forum/{$group_guid}/"; + $url = elgg_get_site_url() . "pg/groups/forum/{$group_guid}/"; forward($url); } diff --git a/mod/groups/actions/forums/deletetopic.php b/mod/groups/actions/forums/deletetopic.php index 57e4b314f..c67228a2f 100644 --- a/mod/groups/actions/forums/deletetopic.php +++ b/mod/groups/actions/forums/deletetopic.php @@ -30,7 +30,7 @@ register_error(elgg_echo("groupstopic:notdeleted")); } // Forward to the group forum page - $url = $CONFIG->wwwroot . "pg/groups/forum/{$group_guid}/"; + $url = elgg_get_site_url() . "pg/groups/forum/{$group_guid}/"; forward($url); } diff --git a/mod/groups/actions/forums/edittopic.php b/mod/groups/actions/forums/edittopic.php index 59c46af73..247c06c8c 100644 --- a/mod/groups/actions/forums/edittopic.php +++ b/mod/groups/actions/forums/edittopic.php @@ -61,6 +61,6 @@ if ($topic){ } // Forward to the discussion global $CONFIG; -$url = $CONFIG->wwwroot . "mod/groups/topicposts.php?topic={$topic_guid}&group_guid={$group_guid}/"; +$url = elgg_get_site_url() . "mod/groups/topicposts.php?topic={$topic_guid}&group_guid={$group_guid}/"; forward($url); diff --git a/mod/groups/activity.php b/mod/groups/activity.php index 38d94fa4e..d0e24be97 100644 --- a/mod/groups/activity.php +++ b/mod/groups/activity.php @@ -16,7 +16,7 @@ global $CONFIG; // set up breadcrumbs
$group = get_entity($group_guid);
-elgg_push_breadcrumb(elgg_echo('groups'), $CONFIG->wwwroot."pg/groups/world/");
+elgg_push_breadcrumb(elgg_echo('groups'), elgg_get_site_url()."pg/groups/world/");
elgg_push_breadcrumb($group->name, $group->getURL());
elgg_push_breadcrumb(elgg_echo('groups:activity'));
diff --git a/mod/groups/forum.php b/mod/groups/forum.php index a6b88f9fb..d3e4a471c 100644 --- a/mod/groups/forum.php +++ b/mod/groups/forum.php @@ -28,7 +28,7 @@ $topics = elgg_list_entities($options); // set up breadcrumbs $group = get_entity($group_guid); -elgg_push_breadcrumb(elgg_echo('groups'), $CONFIG->wwwroot."pg/groups/world/"); +elgg_push_breadcrumb(elgg_echo('groups'), elgg_get_site_url()."pg/groups/world/"); elgg_push_breadcrumb($group->name, $group->getURL()); elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic')); diff --git a/mod/groups/start.php b/mod/groups/start.php index b81ae81ce..d6db817b8 100644 --- a/mod/groups/start.php +++ b/mod/groups/start.php @@ -14,7 +14,7 @@ global $CONFIG; // Set up the menu - add_menu(elgg_echo('groups'), $CONFIG->wwwroot . "pg/groups/world/"); + add_menu(elgg_echo('groups'), elgg_get_site_url() . "pg/groups/world/"); // Register a page handler, so we can have nice URLs register_page_handler('groups','groups_page_handler'); @@ -205,16 +205,16 @@ if (get_context() == 'groups') { if ($page_owner instanceof ElggGroup) { if (isloggedin() && $page_owner->canEdit() && !$page_owner->isPublicMembership()) { - $url = "{$CONFIG->wwwroot}mod/groups/membershipreq.php?group_guid={$page_owner->getGUID()}"; + $url = elgg_get_site_url()."mod/groups/membershipreq.php?group_guid={$page_owner->getGUID()}"; add_submenu_item(elgg_echo('groups:membershiprequests'), $url, 'groupsactions1'); } } else { - add_submenu_item(elgg_echo('groups:all'), "{$CONFIG->wwwroot}pg/groups/world/", 'groupslinks1'); + add_submenu_item(elgg_echo('groups:all'), elgg_get_site_url()."pg/groups/world/", 'groupslinks1'); if ($user = get_loggedin_user()) { - add_submenu_item(elgg_echo('groups:owned'), "{$CONFIG->wwwroot}pg/groups/owned/$user->username", 'groupslinks1'); - add_submenu_item(elgg_echo('groups:yours'), "{$CONFIG->wwwroot}pg/groups/member/$user->username", 'groupslinks1'); - add_submenu_item(elgg_echo('groups:invitations'), "{$CONFIG->wwwroot}pg/groups/invitations/$user->username", 'groupslinks1'); + add_submenu_item(elgg_echo('groups:owned'), elgg_get_site_url()."pg/groups/owned/$user->username", 'groupslinks1'); + add_submenu_item(elgg_echo('groups:yours'), elgg_get_site_url()."pg/groups/member/$user->username", 'groupslinks1'); + add_submenu_item(elgg_echo('groups:invitations'), elgg_get_site_url()."pg/groups/invitations/$user->username", 'groupslinks1'); } } } @@ -534,7 +534,7 @@ function group_topicpost_url($annotation) { if ($parent = get_entity($annotation->entity_guid)) { global $CONFIG; - return $CONFIG->wwwroot . 'mod/groups/topicposts.php?topic='.$parent->guid.'&group_guid='.$parent->container_guid.'#' . $annotation->id; + return elgg_get_site_url() . 'mod/groups/topicposts.php?topic='.$parent->guid.'&group_guid='.$parent->container_guid.'#' . $annotation->id; } } diff --git a/mod/groups/views/default/forms/forums/addtopic.php b/mod/groups/views/default/forms/forums/addtopic.php index 7272cbbc0..3fedbd0dc 100644 --- a/mod/groups/views/default/forms/forums/addtopic.php +++ b/mod/groups/views/default/forms/forums/addtopic.php @@ -23,9 +23,9 @@ $group = get_entity($group_guid); $access_id = $group->group_acl; $options = group_access_options($group); - elgg_push_breadcrumb(elgg_echo('groups'), $CONFIG->wwwroot."pg/groups/world/"); + elgg_push_breadcrumb(elgg_echo('groups'), elgg_get_site_url()."pg/groups/world/"); elgg_push_breadcrumb($group->name, $group->getURL()); - elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), $CONFIG->wwwroot."pg/groups/forum/{$group_guid}/"); + elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), elgg_get_site_url()."pg/groups/forum/{$group_guid}/"); elgg_push_breadcrumb(elgg_echo("groups:addtopic")); echo elgg_view('navigation/breadcrumbs'); diff --git a/mod/groups/views/default/forum/viewposts.php b/mod/groups/views/default/forum/viewposts.php index 407869314..2eb532830 100644 --- a/mod/groups/views/default/forum/viewposts.php +++ b/mod/groups/views/default/forum/viewposts.php @@ -6,9 +6,9 @@ // set up breadcrumbs $group_guid = get_input('group_guid'); $group = get_entity($group_guid); -elgg_push_breadcrumb(elgg_echo('groups'), $CONFIG->wwwroot."pg/groups/world/"); +elgg_push_breadcrumb(elgg_echo('groups'), elgg_get_site_url()."pg/groups/world/"); elgg_push_breadcrumb($group->name, $group->getURL()); -elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), $CONFIG->wwwroot."pg/groups/forum/{$vars['entity']->container_guid}"); +elgg_push_breadcrumb(elgg_echo('item:object:groupforumtopic'), elgg_get_site_url()."pg/groups/forum/{$vars['entity']->container_guid}"); elgg_push_breadcrumb($vars['entity']->title); echo elgg_view('navigation/breadcrumbs'); diff --git a/mod/invitefriends/actions/invite.php b/mod/invitefriends/actions/invite.php index d942bd36c..fa95ec23d 100644 --- a/mod/invitefriends/actions/invite.php +++ b/mod/invitefriends/actions/invite.php @@ -45,7 +45,7 @@ foreach ($emails as $email) { continue; } - $link = $CONFIG->wwwroot . 'pg/register?friend_guid=' . $current_user->guid . '&invitecode=' . generate_invite_code($current_user->username); + $link = elgg_get_site_url() . 'pg/register?friend_guid=' . $current_user->guid . '&invitecode=' . generate_invite_code($current_user->username); $message = sprintf(elgg_echo('invitefriends:email'), $CONFIG->site->name, $current_user->name, diff --git a/mod/invitefriends/start.php b/mod/invitefriends/start.php index 41b137d53..1841135f4 100644 --- a/mod/invitefriends/start.php +++ b/mod/invitefriends/start.php @@ -13,7 +13,7 @@ function invitefriends_pagesetup() { if (get_context() == "friends" || get_context() == "friendsof" || get_context() == "collections") { - add_submenu_item(elgg_echo('friends:invite'),$CONFIG->wwwroot."mod/invitefriends/",'invite'); + add_submenu_item(elgg_echo('friends:invite'),elgg_get_site_url()."mod/invitefriends/",'invite'); } } diff --git a/mod/members/index.php b/mod/members/index.php index 4bcdef0fd..e85817dec 100644 --- a/mod/members/index.php +++ b/mod/members/index.php @@ -23,9 +23,9 @@ $filter = get_input("filter", "newest"); $tag = get_input('tag'); // friends links -$area1 = "<ul class='submenu page_navigation'><li><a href=\"" . $CONFIG->wwwroot."pg/friends/" . elgg_get_page_owner()->username . "\">". elgg_echo('friends') . "</a></li>"; -$area1 .= "<li><a href=\"" . $CONFIG->wwwroot."pg/friendsof/" . elgg_get_page_owner()->username . "\">". elgg_echo('friends:of') . "</a></li>"; -$area1 .= "<li class='selected'><a href=\"" . $CONFIG->wwwroot."mod/members/index.php\">". elgg_echo('members:browse') . "</a></li>"; +$area1 = "<ul class='submenu page_navigation'><li><a href=\"" . elgg_get_site_url()."pg/friends/" . elgg_get_page_owner()->username . "\">". elgg_echo('friends') . "</a></li>"; +$area1 .= "<li><a href=\"" . elgg_get_site_url()."pg/friendsof/" . elgg_get_page_owner()->username . "\">". elgg_echo('friends:of') . "</a></li>"; +$area1 .= "<li class='selected'><a href=\"" . elgg_get_site_url()."mod/members/index.php\">". elgg_echo('members:browse') . "</a></li>"; $area1 .= "</ul>"; //search members diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php index b1d5f5b63..88d7c72f3 100644 --- a/mod/messageboard/start.php +++ b/mod/messageboard/start.php @@ -73,7 +73,7 @@ function messageboard_add($poster, $owner, $message, $access_id = ACCESS_PUBLIC) elgg_echo('messageboard:email:body'), $poster->name, $message, - $CONFIG->wwwroot . "pg/messageboard/" . $owner->username, + elgg_get_site_url() . "pg/messageboard/" . $owner->username, $poster->name, $poster->getURL() ); diff --git a/mod/messages/index.php b/mod/messages/index.php index e3351d566..0f793a9f6 100644 --- a/mod/messages/index.php +++ b/mod/messages/index.php @@ -32,7 +32,7 @@ $messages = elgg_get_entities_from_metadata(array( // Set the page title $area2 = "<div id='content_header'><div class='content_header_title'>"; $area2 .= elgg_view_title(elgg_echo("messages:inbox"))."</div>"; -$area2 .= "<div class='content_header_options'><a class='action_button' href='{$CONFIG->wwwroot}mod/messages/send.php'>" . elgg_echo('messages:compose') . "</a></div></div>"; +$area2 .= "<div class='content_header_options'><a class='action_button' href='".elgg_get_site_url()."mod/messages/send.php'>" . elgg_echo('messages:compose') . "</a></div></div>"; // Display them. The last variable 'page_view' is to allow the view page to know where this data is coming from, // in this case it is the inbox, this is necessary to ensure the correct display diff --git a/mod/messages/sent.php b/mod/messages/sent.php index 36a054e86..24aa721cf 100644 --- a/mod/messages/sent.php +++ b/mod/messages/sent.php @@ -28,7 +28,7 @@ $messages = elgg_get_entities_from_metadata(array('metadata_name' => 'fromId', ' // Set the page title $area2 = "<div id='content_header'><div class='content_header_title'>"; $area2 .= elgg_view_title(elgg_echo("messages:sentmessages"))."</div>"; -$area2 .= "<div class='content_header_options'><a class='action_button' href='{$CONFIG->wwwroot}mod/messages/send.php'>" . elgg_echo('messages:compose') . "</a></div></div>"; +$area2 .= "<div class='content_header_options'><a class='action_button' href='".elgg_get_site_url()."mod/messages/send.php'>" . elgg_echo('messages:compose') . "</a></div></div>"; // Set content $area2 .= elgg_view("messages/forms/view",array('entity' => $messages, 'page_view' => "sent", 'limit' => $limit, 'offset' => $offset)); diff --git a/mod/messages/start.php b/mod/messages/start.php index a340169c1..3c2fc22a7 100644 --- a/mod/messages/start.php +++ b/mod/messages/start.php @@ -23,8 +23,8 @@ function messages_init() { //add submenu options if (get_context() == "messages") { - add_submenu_item(elgg_echo('messages:inbox'), $CONFIG->wwwroot . "pg/messages/" . get_loggedin_user()->username); - add_submenu_item(elgg_echo('messages:sentmessages'), $CONFIG->wwwroot . "mod/messages/sent.php"); + add_submenu_item(elgg_echo('messages:inbox'), elgg_get_site_url() . "pg/messages/" . get_loggedin_user()->username); + add_submenu_item(elgg_echo('messages:sentmessages'), elgg_get_site_url() . "mod/messages/sent.php"); } // Extend system CSS with our own styles, which are defined in the shouts/css view @@ -112,9 +112,9 @@ function messages_notification_msg($hook_name, $entity_type, $return_value, $par elgg_echo('messages:email:body'), get_loggedin_user()->name, strip_tags($parameters['entity']->description), - $CONFIG->wwwroot . "pg/messages/" . $user->username, + elgg_get_site_url() . "pg/messages/" . $user->username, get_loggedin_user()->name, - $CONFIG->wwwroot . "mod/messages/send.php?send_to=" . get_loggedin_userid() + elgg_get_site_url() . "mod/messages/send.php?send_to=" . get_loggedin_userid() ); } else if ($parameters['method'] == 'site') return false;*/ } @@ -231,9 +231,9 @@ function messages_send($subject, $body, $send_to, $from = 0, $reply = 0, $notify elgg_echo('messages:email:body'), get_loggedin_user()->name, $message_contents, - $CONFIG->wwwroot . "pg/messages/" . $user->username, + elgg_get_site_url() . "pg/messages/" . $user->username, get_loggedin_user()->name, - $CONFIG->wwwroot . "mod/messages/send.php?send_to=" . get_loggedin_userid() + elgg_get_site_url() . "mod/messages/send.php?send_to=" . get_loggedin_userid() ) ); diff --git a/mod/notifications/groups.php b/mod/notifications/groups.php index 1c1ad77d2..28f3b9f94 100644 --- a/mod/notifications/groups.php +++ b/mod/notifications/groups.php @@ -26,7 +26,7 @@ $form_body = elgg_view('notifications/subscriptions/groupsform',array('groups' = $body = elgg_view('input/form',array( 'body' => $form_body, 'method' => 'post', - 'action' => $CONFIG->wwwroot . 'action/notificationsettings/groupsave' + 'action' => elgg_get_site_url() . 'action/notificationsettings/groupsave' )); // Insert it into the correct canvas layout diff --git a/mod/notifications/start.php b/mod/notifications/start.php index bdc7f15ff..307cfa936 100644 --- a/mod/notifications/start.php +++ b/mod/notifications/start.php @@ -62,9 +62,9 @@ function notifications_page_handler($page) { function notifications_plugin_pagesetup() { global $CONFIG; if (get_context() == 'settings') { - add_submenu_item(elgg_echo('notifications:subscriptions:changesettings'), $CONFIG->wwwroot . "pg/notifications/personal"); + add_submenu_item(elgg_echo('notifications:subscriptions:changesettings'), elgg_get_site_url() . "pg/notifications/personal"); if (is_plugin_enabled('groups')) { - add_submenu_item(elgg_echo('notifications:subscriptions:changesettings:groups'), $CONFIG->wwwroot . "pg/notifications/group"); + add_submenu_item(elgg_echo('notifications:subscriptions:changesettings:groups'), elgg_get_site_url() . "pg/notifications/group"); } } } diff --git a/mod/pages/index.php b/mod/pages/index.php index 50d11af1d..67bb87092 100644 --- a/mod/pages/index.php +++ b/mod/pages/index.php @@ -13,7 +13,7 @@ global $CONFIG; $owner = elgg_get_page_owner(); if (!($owner instanceof ElggGroup)) { add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral'); - add_submenu_item(elgg_echo('pages:all'),$CONFIG->wwwroot."mod/pages/world.php", 'pageslinksgeneral'); + add_submenu_item(elgg_echo('pages:all'),elgg_get_site_url()."mod/pages/world.php", 'pageslinksgeneral'); } if (($owner instanceof ElggEntity) && (can_write_to_container(0,$owner->guid))){ add_submenu_item(elgg_echo('pages:new'), $CONFIG->url . "pg/pages/new/?container_guid=" . elgg_get_page_owner_guid(), 'pagesactions'); diff --git a/mod/pages/start.php b/mod/pages/start.php index 3dcacd457..d688c2033 100644 --- a/mod/pages/start.php +++ b/mod/pages/start.php @@ -12,7 +12,7 @@ function pages_init() { global $CONFIG; - add_menu(elgg_echo('pages'), $CONFIG->wwwroot . "mod/pages/world.php"); + add_menu(elgg_echo('pages'), elgg_get_site_url() . "mod/pages/world.php"); // Register a page handler, so we can have nice URLs register_page_handler('pages','pages_page_handler'); @@ -87,7 +87,7 @@ function pages_submenus() { // Group submenu option if ($page_owner instanceof ElggGroup && get_context() == 'groups') { if($page_owner->pages_enable != "no"){ - add_submenu_item(sprintf(elgg_echo("pages:group"),$page_owner->name), $CONFIG->wwwroot . "pg/pages/owned/" . $page_owner->username); + add_submenu_item(sprintf(elgg_echo("pages:group"),$page_owner->name), elgg_get_site_url() . "pg/pages/owned/" . $page_owner->username); } } } @@ -133,7 +133,7 @@ function pages_page_handler($page) { $entity = get_entity($page[1]); add_submenu_item(elgg_echo('pages:label:view'), $CONFIG->url . "pg/pages/view/{$page[1]}", 'pageslinks'); - // add_submenu_item(elgg_echo('pages:user'), $CONFIG->wwwroot . "pg/pages/owned/" . get_loggedin_user()->username, 'pageslinksgeneral'); + // add_submenu_item(elgg_echo('pages:user'), elgg_get_site_url() . "pg/pages/owned/" . get_loggedin_user()->username, 'pageslinksgeneral'); if (($entity) && ($entity->canEdit())) { add_submenu_item(elgg_echo('pages:label:edit'), $CONFIG->url . "pg/pages/edit/{$page[1]}", 'pagesactions'); } @@ -200,7 +200,7 @@ function page_notify_message($hook, $entity_type, $returnvalue, $params) { $descr = $entity->description; $title = $entity->title; global $CONFIG; - $url = $CONFIG->wwwroot . "pg/view/" . $entity->guid; + $url = elgg_get_site_url() . "pg/view/" . $entity->guid; if ($method == 'sms') { $owner = $entity->getOwnerEntity(); return $owner->name . ' ' . elgg_echo("pages:via") . ': ' . $url . ' (' . $title . ')'; diff --git a/mod/pages/view.php b/mod/pages/view.php index 24684bff7..9c6019471 100644 --- a/mod/pages/view.php +++ b/mod/pages/view.php @@ -31,8 +31,8 @@ global $CONFIG; // add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral'); if ($pages->canEdit()) { - add_submenu_item(elgg_echo('pages:newchild'),"{$CONFIG->wwwroot}pg/pages/new/?parent_guid={$pages->getGUID()}&container_guid=" . elgg_get_page_owner_guid(), 'pagesactions'); - $delete_url = elgg_add_action_tokens_to_url("{$CONFIG->wwwroot}action/pages/delete?page={$pages->getGUID()}"); + add_submenu_item(elgg_echo('pages:newchild'),elgg_get_site_url()."pg/pages/new/?parent_guid={$pages->getGUID()}&container_guid=" . elgg_get_page_owner_guid(), 'pagesactions'); + $delete_url = elgg_add_action_tokens_to_url(elgg_get_site_url()."action/pages/delete?page={$pages->getGUID()}"); add_submenu_item(elgg_echo('pages:delete'), $delete_url, 'pagesactions', true); } diff --git a/mod/pages/views/default/pages/breadcrumbs.php b/mod/pages/views/default/pages/breadcrumbs.php index 0ab175339..9c95c64c2 100644 --- a/mod/pages/views/default/pages/breadcrumbs.php +++ b/mod/pages/views/default/pages/breadcrumbs.php @@ -10,7 +10,7 @@ $parent = $vars['parent']; $breadcrumbs = ''; -$owner_url = $CONFIG->wwwroot . "pg/pages/owned/" . get_entity($page_owner)->username; +$owner_url = elgg_get_site_url() . "pg/pages/owned/" . get_entity($page_owner)->username; echo "<div id='breadcrumbs'><b><a href=\"{$owner_url}\">" . elgg_echo('pages:user') . "</a></b>"; //see if the new page's parent has a parent diff --git a/mod/pages/world.php b/mod/pages/world.php index f00fb3acd..1dc1fbe9d 100644 --- a/mod/pages/world.php +++ b/mod/pages/world.php @@ -24,7 +24,7 @@ if(isloggedin()) { add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), $CONFIG->url . "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral'); } -add_submenu_item(elgg_echo('pages:all'),$CONFIG->wwwroot."mod/pages/world.php", 'pageslinksgeneral'); +add_submenu_item(elgg_echo('pages:all'),elgg_get_site_url()."mod/pages/world.php", 'pageslinksgeneral'); $limit = get_input("limit", 10); $offset = get_input("offset", 0); diff --git a/mod/profile/actions/addcomment.php b/mod/profile/actions/addcomment.php index 0e241db0a..86d3cbd47 100644 --- a/mod/profile/actions/addcomment.php +++ b/mod/profile/actions/addcomment.php @@ -26,7 +26,7 @@ if ($user && !empty($message_content)) { elgg_echo('profile:comment:body'), get_loggedin_user()->name, $message_content, - $CONFIG->wwwroot . "pg/profile/" . $user->username, + elgg_get_site_url() . "pg/profile/" . $user->username, get_loggedin_user()->name, get_loggedin_user()->getURL() ) diff --git a/mod/profile/start.php b/mod/profile/start.php index d1840babb..c47ecb594 100644 --- a/mod/profile/start.php +++ b/mod/profile/start.php @@ -176,8 +176,8 @@ function profile_pagesetup() if (get_context() == "profile") { $page_owner = elgg_get_page_owner(); if ($page_owner && $page_owner->canEdit()) { - add_submenu_item(elgg_echo('profile:editdetails'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/details"); - add_submenu_item(elgg_echo('profile:editicon'), $CONFIG->wwwroot . "pg/profile/{$page_owner->username}/edit/icon"); + add_submenu_item(elgg_echo('profile:editdetails'), elgg_get_site_url() . "pg/profile/{$page_owner->username}/edit/details"); + add_submenu_item(elgg_echo('profile:editicon'), elgg_get_site_url() . "pg/profile/{$page_owner->username}/edit/icon"); } } } @@ -217,7 +217,7 @@ function profile_iconjs_handler($page) { */ function profile_url($user) { global $CONFIG; - return $CONFIG->wwwroot . "pg/profile/" . $user->username; + return elgg_get_site_url() . "pg/profile/" . $user->username; } /** @@ -255,7 +255,7 @@ function profile_usericon_hook($hook, $entity_type, $returnvalue, $params){ if ($filehandler->exists()) { //$url = $CONFIG->url . "pg/icon/$username/$size/$icontime.jpg"; - return $CONFIG->wwwroot . 'mod/profile/icondirect.php?lastcache='.$icontime.'&joindate=' . $entity->time_created . '&guid=' . $entity->guid . '&size='.$size; + return elgg_get_site_url() . 'mod/profile/icondirect.php?lastcache='.$icontime.'&joindate=' . $entity->time_created . '&guid=' . $entity->guid . '&size='.$size; } } } diff --git a/mod/profile/views/default/admin/appearance/defaultprofile.php b/mod/profile/views/default/admin/appearance/defaultprofile.php index e584c88b0..16164397e 100644 --- a/mod/profile/views/default/admin/appearance/defaultprofile.php +++ b/mod/profile/views/default/admin/appearance/defaultprofile.php @@ -31,7 +31,7 @@ $listing = elgg_view('profile/editdefaultprofileitems',array('items' => $items, $resetlisting = elgg_view('input/form', array ( 'body' => elgg_view('input/submit', array('value' => elgg_echo('profile:resetdefault'), 'class' => 'action_button disabled')), - 'action' => $CONFIG->wwwroot . 'action/profile/editdefault/reset' + 'action' => elgg_get_site_url() . 'action/profile/editdefault/reset' ) ); diff --git a/mod/reportedcontent/views/default/reportedcontent/user_report.php b/mod/reportedcontent/views/default/reportedcontent/user_report.php index 1b5ff9501..78fcf92fd 100644 --- a/mod/reportedcontent/views/default/reportedcontent/user_report.php +++ b/mod/reportedcontent/views/default/reportedcontent/user_report.php @@ -1,5 +1,5 @@ <li class="user_menu_profile"> <?php - echo "<a class='report_this' href=\"javascript:location.href='". $CONFIG->wwwroot . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">" . elgg_echo('reportedcontent:report') . "</a>"; + echo "<a class='report_this' href=\"javascript:location.href='". elgg_get_site_url() . "mod/reportedcontent/add.php?address='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">" . elgg_echo('reportedcontent:report') . "</a>"; ?> </li>
\ No newline at end of file diff --git a/mod/riverdashboard/start.php b/mod/riverdashboard/start.php index 7c7332be8..34ea29217 100644 --- a/mod/riverdashboard/start.php +++ b/mod/riverdashboard/start.php @@ -9,7 +9,7 @@ function riverdashboard_init() { global $CONFIG; // Register and optionally replace the dashboard register_page_handler('dashboard', 'riverdashboard_page_handler'); - add_menu(elgg_echo('activity'), $CONFIG->wwwroot . "pg/activity/"); + add_menu(elgg_echo('activity'), elgg_get_site_url() . "pg/activity/"); // Page handler register_page_handler('activity', 'riverdashboard_page_handler'); diff --git a/mod/search/index.php b/mod/search/index.php index 88e313841..705f6e0a8 100644 --- a/mod/search/index.php +++ b/mod/search/index.php @@ -76,7 +76,7 @@ $data = htmlspecialchars(http_build_query(array( 'search_type' => 'all', //'friends' => $friends ))); -$url = "{$CONFIG->wwwroot}pg/search/?$data"; +$url = elgg_get_site_url()."pg/search/?$data"; add_submenu_item(elgg_echo('all'), $url); foreach ($types as $type => $subtypes) { @@ -94,7 +94,7 @@ foreach ($types as $type => $subtypes) { 'friends' => $friends ))); - $url = "{$CONFIG->wwwroot}pg/search/?$data"; + $url = elgg_get_site_url()."pg/search/?$data"; add_submenu_item(elgg_echo($label), $url); } @@ -109,7 +109,7 @@ foreach ($types as $type => $subtypes) { 'friends' => $friends ))); - $url = "{$CONFIG->wwwroot}pg/search/?$data"; + $url = elgg_get_site_url()."pg/search/?$data"; add_submenu_item(elgg_echo($label), $url); } @@ -128,7 +128,7 @@ foreach ($custom_types as $type) { 'friends' => $friends ))); - $url = "{$CONFIG->wwwroot}pg/search/?$data"; + $url = elgg_get_site_url()."pg/search/?$data"; add_submenu_item(elgg_echo($label), $url); } diff --git a/mod/thewire/start.php b/mod/thewire/start.php index c47e17d5c..b33cd9e3b 100644 --- a/mod/thewire/start.php +++ b/mod/thewire/start.php @@ -23,7 +23,7 @@ global $CONFIG; // Set up menu for logged in users - add_menu(elgg_echo('thewire:title'), $CONFIG->wwwroot . "pg/thewire"); + add_menu(elgg_echo('thewire:title'), elgg_get_site_url() . "pg/thewire"); // Extend system CSS with our own styles, which are defined in the thewire/css view elgg_extend_view('css','thewire/css'); |