diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-02 21:38:55 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-11-02 21:38:55 +0000 |
commit | e40958a97ddce771ac9a9f2a8473da7ee3e6534f (patch) | |
tree | 2e11cad9676db5a0421b3aa98a570cd78a83cbf2 /mod/pages | |
parent | 1d3d21b69eafb45c97e283ead86f63e7bf1731dc (diff) | |
download | elgg-e40958a97ddce771ac9a9f2a8473da7ee3e6534f.tar.gz elgg-e40958a97ddce771ac9a9f2a8473da7ee3e6534f.tar.bz2 |
Fixes #2463: Removed gratuitous references to $CONFIG->url, etc. from the rest of the plugins.
git-svn-id: http://code.elgg.org/elgg/trunk@7205 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/pages')
-rw-r--r-- | mod/pages/history.php | 2 | ||||
-rw-r--r-- | mod/pages/new.php | 2 | ||||
-rw-r--r-- | mod/pages/start.php | 21 | ||||
-rw-r--r-- | mod/pages/view.php | 4 | ||||
-rw-r--r-- | mod/pages/welcome.php | 2 |
5 files changed, 15 insertions, 16 deletions
diff --git a/mod/pages/history.php b/mod/pages/history.php index dfbe3ab59..9228a65a9 100644 --- a/mod/pages/history.php +++ b/mod/pages/history.php @@ -25,7 +25,7 @@ $offset = (int)get_input('offset'); $page_guid = get_input('page_guid'); $pages = get_entity($page_guid); -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(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral'); $title = $pages->title . ": " . elgg_echo("pages:history"); $content = elgg_view_title($title); diff --git a/mod/pages/new.php b/mod/pages/new.php index 2003b183e..2674daf16 100644 --- a/mod/pages/new.php +++ b/mod/pages/new.php @@ -28,7 +28,7 @@ if(get_input('parent_guid')){ } 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'); +add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral'); $title = elgg_echo("pages:new"); $area2 .= elgg_view_title($title); diff --git a/mod/pages/start.php b/mod/pages/start.php index fb09b2280..4c7bb1d15 100644 --- a/mod/pages/start.php +++ b/mod/pages/start.php @@ -68,10 +68,9 @@ function pages_init() { } function pages_url($entity) { - global $CONFIG; $title = elgg_get_friendly_title($entity->title); - return $CONFIG->url . "pg/pages/view/{$entity->guid}/$title"; + return "pg/pages/view/{$entity->guid}/$title"; } /** @@ -132,12 +131,12 @@ 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:label:view'), "pg/pages/view/{$page[1]}", 'pageslinks'); // 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'); + add_submenu_item(elgg_echo('pages:label:edit'), "pg/pages/edit/{$page[1]}", 'pagesactions'); } - add_submenu_item(elgg_echo('pages:label:history'), $CONFIG->url . "pg/pages/history/{$page[1]}", 'pageslinks'); + add_submenu_item(elgg_echo('pages:label:history'), "pg/pages/history/{$page[1]}", 'pageslinks'); include($CONFIG->pluginspath . "pages/edit.php"); break; @@ -150,12 +149,12 @@ function pages_page_handler($page) { elgg_extend_view('metatags','pages/metatags'); $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:label:view'), "pg/pages/view/{$page[1]}", 'pageslinks'); if (($entity) && ($entity->canEdit())) { - add_submenu_item(elgg_echo('pages:label:edit'), $CONFIG->url . "pg/pages/edit/{$page[1]}", 'pagesactions'); + add_submenu_item(elgg_echo('pages:label:edit'), "pg/pages/edit/{$page[1]}", 'pagesactions'); } - add_submenu_item(elgg_echo('pages:label:history'), $CONFIG->url . "pg/pages/history/{$page[1]}", 'pageslinks'); + add_submenu_item(elgg_echo('pages:label:history'), "pg/pages/history/{$page[1]}", 'pageslinks'); include($CONFIG->pluginspath . "pages/view.php"); break; @@ -168,11 +167,11 @@ function pages_page_handler($page) { elgg_extend_view('metatags','pages/metatags'); $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:label:view'), "pg/pages/view/{$page[1]}", 'pageslinks'); if (($entity) && ($entity->canEdit())) { - add_submenu_item(elgg_echo('pages:label:edit'), $CONFIG->url . "pg/pages/edit/{$page[1]}", 'pagesactions'); + add_submenu_item(elgg_echo('pages:label:edit'), "pg/pages/edit/{$page[1]}", 'pagesactions'); } - add_submenu_item(elgg_echo('pages:label:history'), $CONFIG->url . "pg/pages/history/{$page[1]}", 'pageslinks'); + add_submenu_item(elgg_echo('pages:label:history'), "pg/pages/history/{$page[1]}", 'pageslinks'); include($CONFIG->pluginspath . "pages/history.php"); break; diff --git a/mod/pages/view.php b/mod/pages/view.php index bbbed6d22..6eb58ed8e 100644 --- a/mod/pages/view.php +++ b/mod/pages/view.php @@ -28,11 +28,11 @@ if ($container) { } 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'); +// add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral'); if ($pages->canEdit()) { add_submenu_item(elgg_echo('pages:newchild'), "pg/pages/new/?parent_guid={$pages->getGUID()}&container_guid=" . elgg_get_page_owner_guid(), 'pagesactions'); - $delete_url = elgg_add_action_tokens_to_url($CONFIG->url . "action/pages/delete?page={$pages->getGUID()}"); + $delete_url = elgg_add_action_tokens_to_url("action/pages/delete?page={$pages->getGUID()}"); add_submenu_item(elgg_echo('pages:delete'), $delete_url, 'pagesactions', true); } diff --git a/mod/pages/welcome.php b/mod/pages/welcome.php index 759114965..41fa87aa1 100644 --- a/mod/pages/welcome.php +++ b/mod/pages/welcome.php @@ -24,7 +24,7 @@ if ($page_owner === false || is_null($page_owner)) { //get the owners welcome message if it exists $welcome_message = elgg_get_entities(array('types' => 'object', 'subtypes' => 'pages_welcome', 'container_guid' => $page_owner->getGUID(), 'limit' => 1)); 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'); +add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral'); $title = elgg_echo("pages:welcome"); $area2 .= elgg_view_title($title); |