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/pages | |
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/pages')
-rw-r--r-- | mod/pages/index.php | 2 | ||||
-rw-r--r-- | mod/pages/start.php | 8 | ||||
-rw-r--r-- | mod/pages/view.php | 4 | ||||
-rw-r--r-- | mod/pages/views/default/pages/breadcrumbs.php | 2 | ||||
-rw-r--r-- | mod/pages/world.php | 2 |
5 files changed, 9 insertions, 9 deletions
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); |