aboutsummaryrefslogtreecommitdiff
path: root/mod
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 19:54:30 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-11-02 19:54:30 +0000
commit7dd19a4cb04803f4d05fcd109b3149c6926b6558 (patch)
treed0481513061bdc2e3ce16ecb1ad49f81d0ab706f /mod
parent172bbf136ab45a5c6e4f53f911d9901797bb0020 (diff)
downloadelgg-7dd19a4cb04803f4d05fcd109b3149c6926b6558.tar.gz
elgg-7dd19a4cb04803f4d05fcd109b3149c6926b6558.tar.bz2
Refs #2463: Removed many more graituitous calls to elgg_get_site_url(), $CONFIG->url, etc.
git-svn-id: http://code.elgg.org/elgg/trunk@7198 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod')
-rw-r--r--mod/bookmarks/start.php2
-rw-r--r--mod/diagnostics/start.php2
-rw-r--r--mod/diagnostics/views/default/diagnostics/runalltests.php2
-rw-r--r--mod/file/views/default/file/embed_upload.php2
-rw-r--r--mod/groups/start.php8
-rw-r--r--mod/invitefriends/start.php2
-rw-r--r--mod/invitefriends/views/default/invitefriends/form.php2
-rw-r--r--mod/logbrowser/views/default/logbrowser/form.php2
-rw-r--r--mod/messages/start.php4
-rw-r--r--mod/messages/views/default/messages/forms/view.php2
-rw-r--r--mod/notifications/groups.php2
-rw-r--r--mod/notifications/start.php4
-rw-r--r--mod/notifications/views/default/notifications/subscriptions/form.php2
-rw-r--r--mod/pages/index.php8
-rw-r--r--mod/pages/start.php2
-rw-r--r--mod/pages/view.php4
-rw-r--r--mod/pages/world.php6
-rw-r--r--mod/profile/start.php4
-rw-r--r--mod/profile/views/default/admin/appearance/defaultprofile.php2
-rw-r--r--mod/profile/views/default/profile/editdefaultprofile.php2
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/rivercomment.php2
-rw-r--r--mod/riverdashboard/views/default/riverdashboard/sitemessage.php4
-rw-r--r--mod/uservalidationbyemail/views/default/admin/users/unvalidated.php2
23 files changed, 36 insertions, 36 deletions
diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php
index 8baa52938..d8bae2350 100644
--- a/mod/bookmarks/start.php
+++ b/mod/bookmarks/start.php
@@ -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), elgg_get_site_url() . "pg/bookmarks/" . $page_owner->username . '/items');
+ //add_submenu_item(sprintf(elgg_echo("bookmarks:group"),$page_owner->name), "pg/bookmarks/" . $page_owner->username . '/items');
}
}
}
diff --git a/mod/diagnostics/start.php b/mod/diagnostics/start.php
index 4711cd9d6..45403e3b5 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'), elgg_get_site_url() . 'pg/diagnostics/');
+ add_submenu_item(elgg_echo('diagnostics'), 'pg/diagnostics/');
}
}
diff --git a/mod/diagnostics/views/default/diagnostics/runalltests.php b/mod/diagnostics/views/default/diagnostics/runalltests.php
index 8baf3eee0..05dd05d4d 100644
--- a/mod/diagnostics/views/default/diagnostics/runalltests.php
+++ b/mod/diagnostics/views/default/diagnostics/runalltests.php
@@ -7,5 +7,5 @@
$form_body .= elgg_view('input/submit', array('internalname' => 'execute', 'value' => elgg_echo('diagnostics:test:executeall')));
- echo elgg_view('input/form', array('action' => elgg_get_site_url() . "pg/diagnostics/tests/all", 'body' => $form_body));
+ echo elgg_view('input/form', array('action' => "pg/diagnostics/tests/all", 'body' => $form_body));
?> \ No newline at end of file
diff --git a/mod/file/views/default/file/embed_upload.php b/mod/file/views/default/file/embed_upload.php
index 50f77cbb8..8a54a4fa9 100644
--- a/mod/file/views/default/file/embed_upload.php
+++ b/mod/file/views/default/file/embed_upload.php
@@ -21,7 +21,7 @@ $form_body .= '<p>' . elgg_view('input/submit', array('value' => elgg_echo('uplo
echo elgg_view('input/form', array(
'body' => $form_body,
'internalid' => 'file_embed_upload',
- 'action' => elgg_get_site_url() . 'action/file/upload',
+ 'action' => 'action/file/upload',
));
?>
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 9782744ae..1d00782c4 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -209,12 +209,12 @@
add_submenu_item(elgg_echo('groups:membershiprequests'), $url, 'groupsactions1');
}
} else {
- add_submenu_item(elgg_echo('groups:all'), elgg_get_site_url()."pg/groups/world/", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:all'), "pg/groups/world/", 'groupslinks1');
if ($user = get_loggedin_user()) {
- 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');
+ add_submenu_item(elgg_echo('groups:owned'), "pg/groups/owned/$user->username", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:yours'), "pg/groups/member/$user->username", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:invitations'), "pg/groups/invitations/$user->username", 'groupslinks1');
}
}
}
diff --git a/mod/invitefriends/start.php b/mod/invitefriends/start.php
index 1841135f4..4b039bac3 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'),elgg_get_site_url()."mod/invitefriends/",'invite');
+ add_submenu_item(elgg_echo('friends:invite'), "mod/invitefriends/",'invite');
}
}
diff --git a/mod/invitefriends/views/default/invitefriends/form.php b/mod/invitefriends/views/default/invitefriends/form.php
index de8d77388..7ab9314f7 100644
--- a/mod/invitefriends/views/default/invitefriends/form.php
+++ b/mod/invitefriends/views/default/invitefriends/form.php
@@ -6,7 +6,7 @@
*/
echo elgg_view('input/form', array(
- 'action' => elgg_get_site_url() . 'action/invitefriends/invite',
+ 'action' => 'action/invitefriends/invite',
'body' => elgg_view('invitefriends/formitems'),
'method' => 'post'
)
diff --git a/mod/logbrowser/views/default/logbrowser/form.php b/mod/logbrowser/views/default/logbrowser/form.php
index eb2dd95ba..c87b67703 100644
--- a/mod/logbrowser/views/default/logbrowser/form.php
+++ b/mod/logbrowser/views/default/logbrowser/form.php
@@ -46,7 +46,7 @@
$wrappedform = elgg_view('input/form', array(
'body' => $form,
'method' => 'get',
- 'action' => elgg_get_site_url()."pg/admin/logbrowser",
+ 'action' => "pg/admin/logbrowser",
));
?>
diff --git a/mod/messages/start.php b/mod/messages/start.php
index 3c2fc22a7..fcf3afde9 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'), 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");
+ add_submenu_item(elgg_echo('messages:inbox'), "pg/messages/" . get_loggedin_user()->username);
+ add_submenu_item(elgg_echo('messages:sentmessages'), "mod/messages/sent.php");
}
// Extend system CSS with our own styles, which are defined in the shouts/css view
diff --git a/mod/messages/views/default/messages/forms/view.php b/mod/messages/views/default/messages/forms/view.php
index c957e9610..f8fce93a9 100644
--- a/mod/messages/views/default/messages/forms/view.php
+++ b/mod/messages/views/default/messages/forms/view.php
@@ -19,4 +19,4 @@ if($vars['page_view'] == "inbox"){
$body .= '<input class="cancel_button" type="button" onclick="javascript:$(\'input[type=checkbox]\').click();" value="'.elgg_echo('messages:toggle').'" />';
$body .= '</div>';
-echo elgg_view('input/form',array('body' => $body, 'action' => elgg_get_site_url() . 'action/messages/delete', 'method' => 'post', 'internalid' => 'messages_list_form')); \ No newline at end of file
+echo elgg_view('input/form',array('body' => $body, 'action' => 'action/messages/delete', 'method' => 'post', 'internalid' => 'messages_list_form')); \ No newline at end of file
diff --git a/mod/notifications/groups.php b/mod/notifications/groups.php
index 28f3b9f94..c4329f128 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' => elgg_get_site_url() . 'action/notificationsettings/groupsave'
+ 'action' => 'action/notificationsettings/groupsave'
));
// Insert it into the correct canvas layout
diff --git a/mod/notifications/start.php b/mod/notifications/start.php
index 307cfa936..4d3d2b7ee 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'), elgg_get_site_url() . "pg/notifications/personal");
+ add_submenu_item(elgg_echo('notifications:subscriptions:changesettings'), "pg/notifications/personal");
if (is_plugin_enabled('groups')) {
- add_submenu_item(elgg_echo('notifications:subscriptions:changesettings:groups'), elgg_get_site_url() . "pg/notifications/group");
+ add_submenu_item(elgg_echo('notifications:subscriptions:changesettings:groups'), "pg/notifications/group");
}
}
}
diff --git a/mod/notifications/views/default/notifications/subscriptions/form.php b/mod/notifications/views/default/notifications/subscriptions/form.php
index 9f1273488..6c18f6fca 100644
--- a/mod/notifications/views/default/notifications/subscriptions/form.php
+++ b/mod/notifications/views/default/notifications/subscriptions/form.php
@@ -23,7 +23,7 @@ echo elgg_view('input/form',array(
elgg_view('notifications/subscriptions/collections') .
elgg_view('notifications/subscriptions/forminternals'),
'method' => 'post',
- 'action' => elgg_get_site_url() . 'action/notificationsettings/save',
+ 'action' => 'action/notificationsettings/save',
));
?>
diff --git a/mod/pages/index.php b/mod/pages/index.php
index 67bb87092..7e48c06d8 100644
--- a/mod/pages/index.php
+++ b/mod/pages/index.php
@@ -12,12 +12,12 @@ global $CONFIG;
// Add menus
$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'),elgg_get_site_url()."mod/pages/world.php", 'pageslinksgeneral');
+ add_submenu_item(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral');
+ add_submenu_item(elgg_echo('pages:all'), "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');
- add_submenu_item(elgg_echo('pages:welcome'), $CONFIG->url . "pg/pages/welcome/" . $owner->username, 'pagesactions');
+ add_submenu_item(elgg_echo('pages:new'), "pg/pages/new/?container_guid=" . elgg_get_page_owner_guid(), 'pagesactions');
+ add_submenu_item(elgg_echo('pages:welcome'), "pg/pages/welcome/" . $owner->username, 'pagesactions');
}
// access check for closed groups
diff --git a/mod/pages/start.php b/mod/pages/start.php
index ff31bb1d5..fb09b2280 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -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), elgg_get_site_url() . "pg/pages/owned/" . $page_owner->username);
+ add_submenu_item(sprintf(elgg_echo("pages:group"),$page_owner->name), "pg/pages/owned/" . $page_owner->username);
}
}
}
diff --git a/mod/pages/view.php b/mod/pages/view.php
index 9c6019471..bbbed6d22 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'),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: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()}");
add_submenu_item(elgg_echo('pages:delete'), $delete_url, 'pagesactions', true);
}
diff --git a/mod/pages/world.php b/mod/pages/world.php
index 1dc1fbe9d..f423bf8d5 100644
--- a/mod/pages/world.php
+++ b/mod/pages/world.php
@@ -17,14 +17,14 @@ if ($page_owner === false || is_null($page_owner)) {
}
if (($page_owner instanceof ElggEntity) && ($page_owner->canWriteToContainer())){
- add_submenu_item(elgg_echo('pages:new'), $CONFIG->url . "pg/pages/new/", 'pagesactions');
+ add_submenu_item(elgg_echo('pages:new'), "pg/pages/new/", 'pagesactions');
}
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(sprintf(elgg_echo("pages:user"), elgg_get_page_owner()->name), "pg/pages/owned/" . elgg_get_page_owner()->username, 'pageslinksgeneral');
}
-add_submenu_item(elgg_echo('pages:all'),elgg_get_site_url()."mod/pages/world.php", 'pageslinksgeneral');
+add_submenu_item(elgg_echo('pages:all'), "mod/pages/world.php", 'pageslinksgeneral');
$limit = get_input("limit", 10);
$offset = get_input("offset", 0);
diff --git a/mod/profile/start.php b/mod/profile/start.php
index c47ecb594..caaf04055 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'), 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");
+ add_submenu_item(elgg_echo('profile:editdetails'), "pg/profile/{$page_owner->username}/edit/details");
+ add_submenu_item(elgg_echo('profile:editicon'), "pg/profile/{$page_owner->username}/edit/icon");
}
}
}
diff --git a/mod/profile/views/default/admin/appearance/defaultprofile.php b/mod/profile/views/default/admin/appearance/defaultprofile.php
index 16164397e..b935797fb 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' => elgg_get_site_url() . 'action/profile/editdefault/reset'
+ 'action' => 'action/profile/editdefault/reset'
)
);
diff --git a/mod/profile/views/default/profile/editdefaultprofile.php b/mod/profile/views/default/profile/editdefaultprofile.php
index ece99c290..4993e1c7f 100644
--- a/mod/profile/views/default/profile/editdefaultprofile.php
+++ b/mod/profile/views/default/profile/editdefaultprofile.php
@@ -26,4 +26,4 @@ $formbody = <<< END
END;
echo "<p class='margin_top'>" . elgg_echo('profile:explainchangefields') . "</p>";
-echo elgg_view('input/form', array('body' => $formbody, 'action' => elgg_get_site_url() . 'action/profile/editdefault'));
+echo elgg_view('input/form', array('body' => $formbody, 'action' => 'action/profile/editdefault'));
diff --git a/mod/riverdashboard/views/default/riverdashboard/rivercomment.php b/mod/riverdashboard/views/default/riverdashboard/rivercomment.php
index fdc5dd535..03bd91d10 100644
--- a/mod/riverdashboard/views/default/riverdashboard/rivercomment.php
+++ b/mod/riverdashboard/views/default/riverdashboard/rivercomment.php
@@ -14,5 +14,5 @@ if (isset($vars['entity']) && isloggedin()) {
$form_body .= elgg_view('input/hidden', array('internalname' => 'entity_guid', 'value' => $vars['entity']->getGUID()));
$form_body .= elgg_view('input/submit', array('value' => elgg_echo("Comment")));
$form_body .= "</div>";
- echo elgg_view('input/form', array('body' => $form_body, 'action' => elgg_get_site_url()."action/comments/add"));
+ echo elgg_view('input/form', array('body' => $form_body, 'action' => "action/comments/add"));
} \ No newline at end of file
diff --git a/mod/riverdashboard/views/default/riverdashboard/sitemessage.php b/mod/riverdashboard/views/default/riverdashboard/sitemessage.php
index 2d3c7aa57..443ad0fc6 100644
--- a/mod/riverdashboard/views/default/riverdashboard/sitemessage.php
+++ b/mod/riverdashboard/views/default/riverdashboard/sitemessage.php
@@ -49,7 +49,7 @@ if ($site_message) {
EOT;
//display the form
- echo elgg_view('input/form', array('action' => elgg_get_site_url()."action/$action", 'body' => $form_body));
+ echo elgg_view('input/form', array('action' => "action/$action", 'body' => $form_body));
}//end of admin if statement
@@ -71,7 +71,7 @@ EOT;
</div>
EOT;
//display the form
- echo elgg_view('input/form', array('action' => elgg_get_site_url()."action/$action", 'body' => $form_body));
+ echo elgg_view('input/form', array('action' => "action/$action", 'body' => $form_body));
}//end of admin check
}//end of main if
diff --git a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
index 999eab44f..756928d7c 100644
--- a/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
+++ b/mod/uservalidationbyemail/views/default/admin/users/unvalidated.php
@@ -43,6 +43,6 @@ $form_body .= elgg_echo('uservalidationbyemail:admin:with_checked') . elgg_view(
$form_body .= '<br />' . elgg_view('input/button', array('value' => elgg_echo('submit')));
echo elgg_view('input/form', array(
- 'action' => elgg_get_site_url() . 'action/uservalidationbyemail/bulk_action',
+ 'action' => 'action/uservalidationbyemail/bulk_action',
'body' => $form_body
)); \ No newline at end of file