]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2598: Converted virtually all uses of $CONFIG->wwwroot to elgg_get_site_url()
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 30 Oct 2010 22:15:36 +0000 (22:15 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Sat, 30 Oct 2010 22:15:36 +0000 (22:15 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7146 36083f99-b078-4883-b0ff-0f9b5a30f544

59 files changed:
engine/lib/export.php
engine/lib/relationships.php
install/ElggInstaller.php
mod/blog/start.php
mod/blog/views/default/blog/sidebar_menu.php
mod/bookmarks/start.php
mod/diagnostics/index.php
mod/diagnostics/start.php
mod/file/actions/save.php
mod/file/actions/upload.php
mod/file/start.php
mod/file/views/default/file/icon/application/default.php
mod/file/views/default/file/icon/application/excel.php
mod/file/views/default/file/icon/application/msword.php
mod/file/views/default/file/icon/application/pdf.php
mod/file/views/default/file/icon/application/powerpoint.php
mod/file/views/default/file/icon/application/vnd.ms-excel.php
mod/file/views/default/file/icon/application/vnd.ms-powerpoint.php
mod/file/views/default/file/icon/application/vnd.oasis.opendocument.text.php
mod/file/views/default/file/icon/archive.php
mod/file/views/default/file/icon/audio.php
mod/file/views/default/file/icon/default.php
mod/file/views/default/file/icon/document.php
mod/file/views/default/file/icon/text/directory.php
mod/file/views/default/file/icon/video.php
mod/groups/actions/forums/addtopic.php
mod/groups/actions/forums/deletetopic.php
mod/groups/actions/forums/edittopic.php
mod/groups/activity.php
mod/groups/forum.php
mod/groups/start.php
mod/groups/views/default/forms/forums/addtopic.php
mod/groups/views/default/forum/viewposts.php
mod/invitefriends/actions/invite.php
mod/invitefriends/start.php
mod/members/index.php
mod/messageboard/start.php
mod/messages/index.php
mod/messages/sent.php
mod/messages/start.php
mod/notifications/groups.php
mod/notifications/start.php
mod/pages/index.php
mod/pages/start.php
mod/pages/view.php
mod/pages/views/default/pages/breadcrumbs.php
mod/pages/world.php
mod/profile/actions/addcomment.php
mod/profile/start.php
mod/profile/views/default/admin/appearance/defaultprofile.php
mod/reportedcontent/views/default/reportedcontent/user_report.php
mod/riverdashboard/start.php
mod/search/index.php
mod/thewire/start.php
views/default/page_elements/content_header.php
views/default/usersettings/main_opt/plugins.php
views/default/usersettings/main_opt/statistics.php
views/default/usersettings/main_opt/user.php
views/installation/input/button.php

index eaf2fd3ddf27703491fe8a8c76776fc8d871a9d0..3a5c74a0f5e92d85b81a249f7453f685d4c07397 100644 (file)
@@ -42,7 +42,7 @@ function get_uuid_from_object($object) {
 function guid_to_uuid($guid) {
        global $CONFIG;
 
-       return $CONFIG->wwwroot  . "export/opendd/$guid/";
+       return elgg_get_site_url()  . "export/opendd/$guid/";
 }
 
 /**
@@ -55,7 +55,7 @@ function guid_to_uuid($guid) {
 function is_uuid_this_domain($uuid) {
        global $CONFIG;
 
-       if (strpos($uuid, $CONFIG->wwwroot) === 0) {
+       if (strpos($uuid, elgg_get_site_url()) === 0) {
                return true;
        }
 
index 6c43b1757fd874eca1945f942f7c8bfe063ba63f..987ba95b08ff0930ad86d286b3ea9a7aabd06305 100644 (file)
@@ -702,7 +702,7 @@ function get_relationship_url($id) {
                if ($url == "") {
                        $nameid = $relationship->id;
 
-                       $url = $CONFIG->wwwroot  . "export/$view/$guid/relationship/$nameid/";
+                       $url = elgg_get_site_url()  . "export/$view/$guid/relationship/$nameid/";
                }
 
                return $url;
index 480a2ed1ee733c18fb0ddf0c9ab3f26069bbf765..1527572d6b3167f9df828d31fb5e767aa5fcd670 100644 (file)
@@ -369,7 +369,7 @@ class ElggInstaller {
                                ),
                        'wwwroot' => array(
                                'type' => 'text',
-                               'value' => $CONFIG->wwwroot,
+                               'value' => elgg_get_site_url(),
                                'required' => TRUE,
                                ),
                        'path' => array(
@@ -551,7 +551,7 @@ class ElggInstaller {
        protected function getNextStepUrl($currentStep) {
                global $CONFIG;
                $nextStep = $this->getNextStep($currentStep);
-               return "{$CONFIG->wwwroot}install.php?step=$nextStep";
+               return elgg_get_site_url()."install.php?step=$nextStep";
        }
 
        /**
@@ -659,15 +659,15 @@ class ElggInstaller {
                }
 
                if ($this->status['settings'] == FALSE) {
-                       forward("{$CONFIG->wwwroot}install.php?step=settings");
+                       forward(elgg_get_site_url()."install.php?step=settings");
                }
 
                if ($this->status['admin'] == FALSE) {
-                       forward("{$CONFIG->wwwroot}install.php?step=admin");
+                       forward(elgg_get_site_url()."install.php?step=admin");
                }
 
                // everything appears to be set up
-               forward("{$CONFIG->wwwroot}install.php?step=complete");
+               forward(elgg_get_site_url()."install.php?step=complete");
        }
 
        /**
@@ -1029,7 +1029,7 @@ class ElggInstaller {
                require_once(dirname(__FILE__) . "/ElggRewriteTester.php");
 
                $tester = new ElggRewriteTester();
-               $url = "{$CONFIG->wwwroot}rewrite.php";
+               $url = elgg_get_site_url()."rewrite.php";
                $report['rewrite'] = array($tester->run($url, $CONFIG->path));
        }
 
index 4c0fa66a5f5a2d6fd63a8b3034dc77a47962d8a2..a87a14ca261c584c653aff639f531d954ed6fb1c 100644 (file)
@@ -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');
index ab00433c848006c50bb93372e7d7c62d1808e88b..f69e23e298a8c4d4a1c336ea2304581ce4d32a2f 100644 (file)
@@ -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>";
                }
index 25b87b6c7e5b99630ac416ef1843560be7172794..2c82ca674f57815fc9cd5b75a606ecc9685c766e 100644 (file)
@@ -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 . ')';
index abc5c2b31931866bb4cc704d9d831454e00be419..e4620cb95b7356806953bd13d4d6e0d47b9ca2ab 100644 (file)
@@ -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 {
index d2fc1b5a1d1469e3f73c4ff5f12dc55f881991f5..4711cd9d622768eafb53490af2c10439d63f9e64 100644 (file)
@@ -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/');
        }
 }
 
index 923bc043b1f08b67a21c1685766c4323115a5830..17a9b16fbb6216b35dcff0bd48916167a1e3342e 100644 (file)
@@ -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
index 367488d7c652d03fbc7fb9a4b2037db8f44e5aaf..82744730c32bdb8aa50b77c66ec70943d30fe421 100644 (file)
        
                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 {
index 60e863df5ab3f6a74f9520690556e6a0c1e0f335..228e4788b7a1362475fcaf234d3f320b80ff5819 100644 (file)
@@ -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');
                                $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 . ')';
index eea8cbafecf4678629bd8c745a365c7a25423575..d9d60901bc9600aeeea84601322bff36b2274541 100644 (file)
@@ -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
index ba2460fecd3c82937521351d1a0c991b42eefb15..a4123ea6e213ad0b614c549a023978e06e1c65bc 100644 (file)
@@ -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
index 20efb10697eaed0db3e72adc7ecf33824ea74c3c..074f7ed918d1be1e93f89c59a893819749b50f0c 100644 (file)
@@ -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
index 6a5a7369cefac605039f40fc521ab5bfa731c381..1aeafdb7bf5da7f798c67a729db24e0a65297c77 100644 (file)
@@ -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
index 1857d513fd93e0604a49ccaa2866ca16db1f12b5..47a15b639b625bcc306c7b2c3442408cf95b9407 100644 (file)
@@ -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
index ba2460fecd3c82937521351d1a0c991b42eefb15..a4123ea6e213ad0b614c549a023978e06e1c65bc 100644 (file)
@@ -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
index 1857d513fd93e0604a49ccaa2866ca16db1f12b5..47a15b639b625bcc306c7b2c3442408cf95b9407 100644 (file)
@@ -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
index d0bde81dff22be27627193eaa694e90b66122e28..30997716005476dbf7d67e90a3f75b1180b2ce6d 100644 (file)
@@ -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
index 4fffd9346eb4c35fcce8bf221ced7a9bc90da2c7..694574e8fa75925c13e315f06927ebf826db46ff 100644 (file)
@@ -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
index 73c55be7b80fea2eec9fa3f609b31362bc68873f..ce6f6ab4f911b3c4fec586dcc3cb484096016017 100644 (file)
@@ -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
index 844ee312c3719befb32f9e13ecb204cffd2f2d7f..ed1b71547e3daafaec88617e278264d468a2d9ac 100644 (file)
@@ -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
index 8823514b866bb52c49f6bf01c7b8e5360ab6f1dd..fed4660fbe5a1a54b8c4e12f042dbfd0cb46fab9 100644 (file)
@@ -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
index a08e098c6fa1551b7fad2678b549d8283d218d7d..863e53d6870b830711d09d7e96fa91cf971aa71e 100644 (file)
@@ -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
index 94617abff8d8c0f6f6a8c263309c3c68830f4c67..db3f001f7e7a2e218ba0094fc18d7ff4ac48f4c1 100644 (file)
@@ -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
index 5f9c8e70963b02b4ce85225ac360fcbbb7ba9512..0b8a0f5909075e739fdc26021846a7e8490cca6f 100644 (file)
@@ -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);
                                
                }
index 57e4b314fb59d8d8a653a7adbda166c931c49779..c67228a2fb1a68073fab0b012c0a22801721598a 100644 (file)
@@ -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);
                
                }
index 59c46af734d6e192eb42c64f3c819d7fdab9da28..247c06c8c052532ba0be07685e7946e6bcdb0867 100644 (file)
@@ -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);
 
index 38d94fa4eec6cabfbdc067651041b06b76518106..d0e24be977a5a5eb67333c7bd35abfcf13539013 100644 (file)
@@ -16,7 +16,7 @@ global $CONFIG;
 \r
 // set up breadcrumbs\r
 $group = get_entity($group_guid);\r
-elgg_push_breadcrumb(elgg_echo('groups'), $CONFIG->wwwroot."pg/groups/world/");\r
+elgg_push_breadcrumb(elgg_echo('groups'), elgg_get_site_url()."pg/groups/world/");\r
 elgg_push_breadcrumb($group->name, $group->getURL());\r
 elgg_push_breadcrumb(elgg_echo('groups:activity'));\r
 \r
index a6b88f9fb735aa5b47dae434fb3de07d2a7b3b0d..d3e4a471ca78a76f53524d4b0ec21defdd1a6a91 100644 (file)
@@ -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'));
 
index b81ae81cef70408dd37c93479f4ccb954a72c325..d6db817b8a60494534c8111dbd7f637897882fc4 100644 (file)
@@ -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');
                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');
                                }
                        }
                }
        function group_topicpost_url($annotation) {
                if ($parent = get_entity($annotation->entity_guid)) {
                        global $CONFIG;
-                       return $CONFIG->wwwroot . 'mod/groups/topicposts.php?topic='.$parent->guid.'&amp;group_guid='.$parent->container_guid.'#' . $annotation->id;
+                       return elgg_get_site_url() . 'mod/groups/topicposts.php?topic='.$parent->guid.'&amp;group_guid='.$parent->container_guid.'#' . $annotation->id;
                }
        }
 
index 7272cbbc0d2610d3dbb7dfc8121da982d5cafc0c..3fedbd0dc48e29fff6705eab7c5871f3590edd5a 100644 (file)
@@ -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');
index 407869314f074ddc32b7f0a8c6fa74514cd1e326..2eb532830c0329e7bbf97978f8d608d1c33dc63c 100644 (file)
@@ -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');
index d942bd36c4c3a52abe75f657521c46c58579a3a1..fa95ec23d5278f4a0ea178ee2bcb2453047e085d 100644 (file)
@@ -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,
index 41b137d5362888489b9c925c770e7df0156451bb..1841135f4a10110a2be6483a6cd413ce388871a8 100644 (file)
@@ -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');
        }
 }
 
index 4bcdef0fdef0d5bb0bc2ea7bdf885556bc19b54f..e85817dec7f2ce9988ca3cc06774460eec63ea98 100644 (file)
@@ -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
index b1d5f5b63bd1bb455257fa11ea25d5e627e2d63f..88d7c72f3b4403aec37d4162494d151f6d745387 100644 (file)
@@ -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()
                                                );
index e3351d5667a4142bb2bf436eb72fa817c1e7ca2c..0f793a9f69f7099fac828528d4fbaf941a303b0d 100644 (file)
@@ -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
index 36a054e86fca18f691deed5e56abc9c66bb741c6..24aa721cf81e4bf3a1e38f1d8c2aa27a7ba9fac4 100644 (file)
@@ -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));
index a340169c18e8f39033719e372f677d24d0fce4ea..3c2fc22a79fece18a61c28cc2c3b4b054ba02f57 100644 (file)
@@ -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()
                                                )
                        );
                        
index 1c1ad77d2a99c1eec08b68de95ec5b346c4f8400..28f3b9f94a910e88c5354caf03b44a0df50c2ea8 100644 (file)
@@ -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
index bdc7f15fff5392951a81b2d888286fa975759c3d..307cfa9367d49ec1a5edffd6dbf889eba9baccb8 100644 (file)
@@ -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");
                }
        }
 }
index 50d11af1d6d2286a273e1378bc05446536d99a6b..67bb870922b16408bdc9e81191585bfe69c90a31 100644 (file)
@@ -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');
index 3dcacd457ae33ebd97577fb0260b35d64142bf90..d688c2033004e07ed25655835c2e0fa03bebce52 100644 (file)
@@ -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 . ')';
index 24684bff7584123e913d135fbdea9151519cc4ab..9c601947199fcf8c05bfce36a5bf4582b138180d 100644 (file)
@@ -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);
 }
 
index 0ab175339183de1de6aad2db959c71b9c77d9433..9c95c64c25ce180fdebdfd5104fb532367564573 100644 (file)
@@ -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
index f00fb3acd84cb4a47f11d119becf56ebb3a64526..1dc1fbe9d384e51d804021c8ad2f671a8a2765cc 100644 (file)
@@ -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);
index 0e241db0ac1e48795f02af91fd8064a7676cfd23..86d3cbd47b9200e211bd3fcb6fd81f15e71d6742 100644 (file)
@@ -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()
                                                )
index d1840babbd158a63443874fb8076435d52ee4615..c47ecb594948e600dd764f9ff6eb7e31358e299e 100644 (file)
@@ -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;
                }
        }
 }
index e584c88b036e31dc22f4b8aeef31657c942f43b6..16164397edfefd4d3b34eadddf9fc290ec2ec6f4 100644 (file)
@@ -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'
                                                )
                                        );
                                        
index 1b5ff95015da01d605d0ba87f634879700491603..78fcf92fd3fb97fe9a95911a13bc3cba8fa264c0 100644 (file)
@@ -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
index 7c7332be8f8e4bce59baa84c96212641aa14181d..34ea292175f0e1680844eb5555d816b864814002 100644 (file)
@@ -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');
index 88e313841d305d319133ccf464e1c5ef4fb97855..705f6e0a8b32d6e1f0989b684922bf14fd0b5313 100644 (file)
@@ -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);
 }
index c47e17d5c45ac9dca502597b9823442aaa61aeb2..b33cd9e3b0b89c9b6a87297a6bba848afa89e3ba 100644 (file)
@@ -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');
index 91e73f4afd405aa7aca4e43b7ff071b7afc2ec54..6ae5849ae7ce98ed328fb331c049513a67829572 100644 (file)
@@ -69,10 +69,10 @@ if (isloggedin()) {
        } else {
                // @todo remove the hard coded reference to the videolist plugin
                if (get_context() == "videolist"){
-                       $video_link = $CONFIG->wwwroot . "pg/videolist/browse/$username/";
+                       $video_link = elgg_get_site_url() . "pg/videolist/browse/$username/";
                        $new_button = "<a href=\"{$video_link}\" class='action_button'>" . elgg_echo('videolist:browsemenu') . '</a>';
                } else {
-                       $new_link = (isset($vars['new_link'])) ? $vars['new_link'] : "{$CONFIG->wwwroot}pg/$type/$username/new";
+                       $new_link = (isset($vars['new_link'])) ? $vars['new_link'] : elgg_get_site_url()."pg/$type/$username/new";
                        $new_button = "<a href=\"{$new_link}\" class='action_button'>" . elgg_echo($type . ':new') . '</a>';
                }
                $new_button = "<div class='content_header_options'>$new_button</div>";
index 0454a94d2468ce2136a23bbadf3d29fe91ccd728..ab5743d36d6a1695b748266bffff5916b27b2cfe 100644 (file)
@@ -11,5 +11,5 @@ global $CONFIG;
 <div class="menu_admin_option">
        <h2><?php echo elgg_echo('usersettings:plugins'); ?> </h2>
        <p><?php echo elgg_echo('usersettings:plugins:opt:description'); ?><br />
-       <a href="<?php echo $CONFIG->wwwroot . "pg/settings/plugins/"; ?>"><?php echo elgg_echo('usersettings:plugins:opt:linktext'); ?></a></p>
+       <a href="<?php echo elgg_get_site_url() . "pg/settings/plugins/"; ?>"><?php echo elgg_echo('usersettings:plugins:opt:linktext'); ?></a></p>
 </div>
\ No newline at end of file
index 0ca5b5d518f20a8519990b6d682464764a8529fc..0f38721436a3b657e38f49671a08eb93e044c36e 100644 (file)
@@ -9,5 +9,5 @@
 <div class="menu_admin_option">
        <h2><?php echo elgg_echo('usersettings:statistics'); ?> </h2>
        <p><?php echo elgg_echo('usersettings:statistics:opt:description'); ?><br />
-       <a href="<?php echo $CONFIG->wwwroot . "pg/settings/statistics/"; ?>"><?php echo elgg_echo('usersettings:statistics:opt:linktext'); ?></a></p>
+       <a href="<?php echo elgg_get_site_url() . "pg/settings/statistics/"; ?>"><?php echo elgg_echo('usersettings:statistics:opt:linktext'); ?></a></p>
 </div>
index f6e28d63ee4a004520fe5084abe9fc4cea054516..d9f2b56770d0e2dbac5cdeb8c39b1f71c96660a0 100644 (file)
@@ -9,5 +9,5 @@
 <div class="menu_admin_option">
        <h2><?php echo elgg_echo('usersettings:user'); ?> </h2>
        <p><?php echo elgg_echo('usersettings:user:opt:description'); ?><br />
-       <a href="<?php echo $CONFIG->wwwroot . "pg/settings/user/"; ?>"><?php echo elgg_echo('usersettings:user:opt:linktext'); ?></a></p>
+       <a href="<?php echo elgg_get_site_url() . "pg/settings/user/"; ?>"><?php echo elgg_echo('usersettings:user:opt:linktext'); ?></a></p>
 </div>
\ No newline at end of file
index 7b6beec73cc901c3bed260798a6e90451fb5a84f..1b70800e98ee40e61972195343479f0f3900d147 100644 (file)
@@ -44,7 +44,7 @@ $value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8');
 $name = $vars['internalname'];
 $src = $vars['src'];
 // blank src if trying to access an offsite image.
-if (strpos($src,$CONFIG->wwwroot)===false) {
+if (strpos($src,elgg_get_site_url())===false) {
        $src = "";
 }
 ?>