]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2463: Removed gratuitous references to $CONFIG->url, etc. in blog - groups...
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 2 Nov 2010 21:36:21 +0000 (21:36 +0000)
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>
Tue, 2 Nov 2010 21:36:21 +0000 (21:36 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7204 36083f99-b078-4883-b0ff-0f9b5a30f544

20 files changed:
mod/blog/start.php
mod/blog/views/default/blog/forms/edit.php
mod/blog/views/default/blog/sidebar_edit.php
mod/blog/views/default/blog/sidebar_revisions.php
mod/blog/views/default/object/blog.php
mod/bookmarks/start.php
mod/bookmarks/views/default/object/bookmarks.php
mod/diagnostics/views/default/diagnostics/forms/download.php
mod/file/start.php
mod/file/views/default/object/file.php
mod/groups/actions/addtogroup.php
mod/groups/actions/join.php
mod/groups/all.php
mod/groups/index.php
mod/groups/membership.php
mod/groups/start.php
mod/groups/views/default/forum/maintopic.php
mod/groups/views/default/groups/invitationrequests.php
mod/groups/views/default/groups/membershiprequests.php
mod/groups/views/default/object/groupforumtopic.php

index a4a4a7c65211585a9a7254b89cd2c587e35b0329..c61e818ad670fdad5142c95a9e35ada66be7175b 100644 (file)
@@ -167,8 +167,6 @@ function blog_page_handler($page) {
  * @return string URL of blog.
  */
 function blog_url_handler($entity) {
-       global $CONFIG;
-
        if (!$user = get_entity($entity->owner_guid)) {
                // default to a standard view if no owner.
                return FALSE;
@@ -176,8 +174,7 @@ function blog_url_handler($entity) {
 
        $friendly_title = elgg_get_friendly_title($entity->title);
 
-       $url = "{$CONFIG->site->url}pg/blog/{$user->username}/read/{$entity->getGUID()}/$friendly_title";
-       return $url;
+       return "pg/blog/{$user->username}/read/{$entity->guid}/$friendly_title";
 }
 
 /**
@@ -200,7 +197,7 @@ function blog_profile_menu($hook, $entity_type, $return_value, $params) {
        if (!($params['owner'] instanceof ElggGroup)) {
                $return_value[] = array(
                        'text' => elgg_echo('blog'),
-                       'href' => "{$CONFIG->url}pg/blog/{$params['owner']->username}/read",
+                       'href' => "pg/blog/{$params['owner']->username}/read",
                );
        }
 
index 88d41d269e7021cfee58171e3e687ee078bad209..2b07fae9415c8a9cfa70274e979131a4d7ca9fa3 100644 (file)
@@ -64,7 +64,7 @@ if (isset ($vars['entity'])) {
        }
 
        // add a delete button if editing
-       $delete_url = elgg_get_site_url()."action/blog/delete?guid={$blog->getGUID()}";
+       $delete_url = "action/blog/delete?guid={$blog->getGUID()}";
        $delete_link = elgg_view('output/confirmlink', array(
                'href' => $delete_url,
                'text' => elgg_echo('delete'),
@@ -219,7 +219,7 @@ ___END;
 echo elgg_view('input/form', array(
        'internalid' => 'blog_post_edit',
        'internalname' => 'blog_post',
-       'action' => elgg_get_site_url()."action/blog/save",
+       'action' => "action/blog/save",
        'body' => $form_body
 ));
 
index 3b884437f5fee58586616b0dda4ed5daa8c24782..9b56f9a730dbb9bf3b66619f22548543c2e62054 100644 (file)
@@ -27,7 +27,7 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) {
 
 if ($revisions) {
        echo '<ul class="blog_revisions">';
-       $load_base_url = elgg_get_site_url()."pg/blog/{$owner->username}/edit/{$blog->getGUID()}/";
+       $load_base_url = "pg/blog/{$owner->username}/edit/{$blog->getGUID()}/";
 
        foreach ($revisions as $revision) {
                $time = elgg_view_friendly_time($revision->time_created);
index 43215963bbbb667b898854fc4a9e0c68ec358121..e53ba9e529bc25fbdf9a55907ffbe840e0702dfd 100644 (file)
@@ -31,7 +31,7 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) {
                $n = count($revisions);
                echo '<ul class="blog_revisions">';
 
-               $load_base_url = elgg_get_site_url()."pg/blog/{$owner->username}/edit/{$blog->getGUID()}/";
+               $load_base_url = "pg/blog/{$owner->username}/edit/{$blog->getGUID()}/";
 
                // show the "published revision"
                if ($blog->status == 'published') {
index fc88eea25189e57ad16a5d5574b3f21ad67c6734..b93608b7e7afeadd53d3a6791ab9474ef5216c79 100644 (file)
@@ -51,7 +51,7 @@ if ($blog->canEdit()) {
        $edit_url = elgg_get_site_url()."pg/blog/{$owner->username}/edit/{$blog->getGUID()}/";
        $edit_link = "<span class='entity_edit'><a href=\"$edit_url\">" . elgg_echo('edit') . '</a></span>';
 
-       $delete_url = elgg_get_site_url()."action/blog/delete?guid={$blog->getGUID()}";
+       $delete_url = "action/blog/delete?guid={$blog->getGUID()}";
        $delete_link = "<span class='delete_button'>" . elgg_view('output/confirmlink', array(
                'href' => $delete_url,
                'text' => elgg_echo('delete'),
index d8bae23508d44af204f51f4649fa1a4d4c85563b..e65f7d17941b71b13adaacb4fbf040208d70ce4a 100644 (file)
@@ -225,16 +225,16 @@ function bookmarks_page_handler($page) {
                        $header .= elgg_view("page_elements/content_header", array(
                                'context' => $context,
                                'type' => 'bookmarks',
-                               'all_link' => "{$CONFIG->url}pg/bookmarks/",
-                               'new_link' => "{$CONFIG->url}pg/bookmarks/{$owner_name}/add"
+                               'all_link' => "pg/bookmarks/",
+                               'new_link' => "pg/bookmarks/{$owner_name}/add"
                        ));
                }
        }else{
                $header .= elgg_view("page_elements/content_header", array(
                                'context' => $context,
                                'type' => 'bookmarks',
-                               'all_link' => "{$CONFIG->url}pg/bookmarks/",
-                               'new_link' => "{$CONFIG->url}pg/bookmarks/{$owner_name}/add"
+                               'all_link' => "pg/bookmarks/",
+                               'new_link' => "pg/bookmarks/{$owner_name}/add"
                        ));
        }
 
@@ -257,7 +257,7 @@ function bookmark_url($entity) {
        global $CONFIG;
        $title = $entity->title;
        $title = elgg_get_friendly_title($title);
-       return $CONFIG->url . "pg/bookmarks/" . $entity->getOwnerEntity()->username . "/read/" . $entity->getGUID() . "/" . $title;
+       return "pg/bookmarks/" . $entity->getOwnerEntity()->username . "/read/" . $entity->getGUID() . "/" . $title;
 }
 
 /**
@@ -320,7 +320,7 @@ function bookmarks_profile_menu($hook, $entity_type, $return_value, $params) {
 
        $return_value[] = array(
                'text' => elgg_echo('bookmarks'),
-               'href' => "{$CONFIG->url}pg/bookmarks/{$params['owner']->username}",
+               'href' => "pg/bookmarks/{$params['owner']->username}",
        );
 
        return $return_value;
index db41eee40a8a62bc336b61d18751037a27b2e09c..aa4874610116cc0e106139696a16070c51bc07b2 100644 (file)
@@ -56,7 +56,7 @@ if (@file_exists($faviconurl)) {
 //delete
 if($vars['entity']->canEdit()){
        $delete .= "<span class='delete_button'>" . elgg_view('output/confirmlink',array(
-                               'href' => elgg_get_site_url() . "action/bookmarks/delete?bookmark_guid=" . $vars['entity']->guid,
+                               'href' => "action/bookmarks/delete?bookmark_guid=" . $vars['entity']->guid,
                                'text' => elgg_echo("delete"),
                                'confirm' => elgg_echo("bookmarks:delete:confirm"),
                                )) . "</span>";
index 93e03d7adef5677344d7ff54e89579f8cdaa88c0..cbbd414df9ed182dfc549dc1a4d27da4d6aa5b7c 100644 (file)
@@ -6,5 +6,5 @@
         */
        
        $form_body = elgg_view('input/submit', array('value' => elgg_echo('diagnostics:download')));
-       echo elgg_view('input/form', array('body' => $form_body, 'action' => $CONFIG->url . "action/diagnostics/download"));
+       echo elgg_view('input/form', array('body' => $form_body, 'action' => "action/diagnostics/download"));
 ?>
\ No newline at end of file
index 00501906075d605247ecbe1637e572dae0a5b5f2..544024d49ca35e6655b819f5c2a264fadc104ac1 100644 (file)
         * @return string File URL
         */
                function file_url($entity) {
-                       
-                       global $CONFIG;
                        $title = $entity->title;
                        $title = elgg_get_friendly_title($title);
-                       return $CONFIG->url . "pg/file/" . $entity->getOwnerEntity()->username . "/read/" . $entity->getGUID() . "/" . $title;  
+                       return "pg/file/" . $entity->getOwnerEntity()->username . "/read/" . $entity->getGUID() . "/" . $title; 
                }
        
        // Make sure test_init is called on initialisation
index c1d2a3d13e566286c3fab97038f06bc06713c95d..2511f5af6b02f2a1b46a89c86417d12e33b56588 100644 (file)
@@ -43,7 +43,7 @@
                                        echo "<a href=\"".elgg_get_site_url()."mod/file/edit.php?file_guid={$file->getGUID()}\">" . elgg_echo('edit') . "</a>&nbsp;";
                                        echo elgg_view('output/confirmlink',array(
                                                
-                                                       'href' => elgg_get_site_url() . "action/file/delete?file=" . $file->getGUID(),
+                                                       'href' => "action/file/delete?file=" . $file->getGUID(),
                                                        'text' => elgg_echo("delete"),
                                                        'confirm' => elgg_echo("file:delete:confirm"),
                                                        'is_action' => true,
                                        <?php 
                                                echo elgg_view('output/confirmlink',array(
                                                
-                                                       'href' => elgg_get_site_url() . "action/file/delete?file=" . $file->getGUID(),
+                                                       'href' => "action/file/delete?file=" . $file->getGUID(),
                                                        'text' => elgg_echo("delete"),
                                                        'confirm' => elgg_echo("file:delete:confirm"),
                                                        'is_action' => true,
index 6f63ff44692705b231882f9e565e2a88e5254d06..dab44666dccd34244a1122629b72f0cf08bc3ffd 100644 (file)
@@ -69,7 +69,7 @@
                                                        add_entity_relationship($group->guid, 'invited', $user->guid);
 
                                                        // Send email
-                                                       $url = "{$CONFIG->url}pg/groups/invited?user_guid={$user->guid}&group_guid={$group->guid}";
+                                                       $url = elgg_get_site_url()."pg/groups/invited?user_guid={$user->guid}&group_guid={$group->guid}";
                                                        if (notify_user($user->getGUID(), $group->owner_guid,
                                                                        sprintf(elgg_echo('groups:invite:subject'), $user->name, $group->name),
                                                                        sprintf(elgg_echo('groups:invite:body'), $user->name, $logged_in_user->name, $group->name, $url),
index 158da372cbcfb5c3550d80e5ba8dc936918346f9..40f227ba7a1b8e912bc965528d54d9419ef3af54 100644 (file)
@@ -51,7 +51,7 @@
                {
                        // Closed group, request membership
                        system_message(elgg_echo('groups:privategroup'));
-                       forward(elgg_add_action_tokens_to_url($CONFIG->url . "action/groups/joinrequest?user_guid=$user_guid&group_guid=$group_guid", FALSE));
+                       forward(elgg_add_action_tokens_to_url("action/groups/joinrequest?user_guid=$user_guid&group_guid=$group_guid", FALSE));
                        exit;
                }
        }
index c51097910f43fdb43bd74279ad10c519a4087326..354437c7ee31b8b6ede2dba61d4f8c4e74c5dc03 100644 (file)
@@ -56,7 +56,7 @@
 
        $title = sprintf(elgg_echo("groups:all"), elgg_get_page_owner()->name);
        if(isloggedin()){
-               $area1 .= elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups', 'new_link' => "{$CONFIG->url}pg/groups/new"));
+               $area1 .= elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups', 'new_link' => "pg/groups/new"));
        }
        $area1 .= elgg_view("groups/group_sort_menu", array("count" => $group_count, "filter" => $filter)) . $objects;
        $body = elgg_view_layout('one_column_with_sidebar', $area1, $area2);
index 3989960720e9a01bf5a0f4758750142a2513ade0..48ff99805a368359dda72397b1fd6dac70b6eb98 100644 (file)
@@ -13,7 +13,7 @@
        $title = elgg_echo("groups:owned");
 
        // Get objects
-       $area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups', 'new_link' => "{$CONFIG->url}pg/groups/new"));
+       $area1 = elgg_view('page_elements/content_header', array('context' => "everyone", 'type' => 'groups', 'new_link' => "pg/groups/new"));
        
        set_context('search');
        $objects = elgg_list_entities(array('types' => 'group', 'owner_guid' => elgg_get_page_owner_guid(), 'limit' => $limit, 'offset' => $offset, 'full_view' => FALSE));
index b479018ca2a85f489fb8ee173229ad5ff9b6b4f2..ace899772a8477e66fc7b0afd9aeb334b30a12ab 100644 (file)
@@ -19,7 +19,7 @@
        } else $title = elgg_echo("groups:owned");
 
        // Get objects
-       $area2 = elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'groups', 'new_link' => "{$CONFIG->url}pg/groups/new"));
+       $area2 = elgg_view('page_elements/content_header', array('context' => "mine", 'type' => 'groups', 'new_link' => "pg/groups/new"));
        
        set_context('search');
        // offset is grabbed in the list_entities_from_relationship() function
index 1d00782c43561688e94cc72b96d702f9a35b1789..f24a3106a91c8b9493a4c333e32ab329e9a06e1d 100644 (file)
         * @return string File URL
         */
        function groups_url($entity) {
-
-               global $CONFIG;
-
                $title = elgg_get_friendly_title($entity->name);
 
-               return $CONFIG->url . "pg/groups/{$entity->guid}/$title/";
+               return "pg/groups/{$entity->guid}/$title/";
        }
 
        function groups_groupforumtopic_url($entity) {
-
-               global $CONFIG;
-               return $CONFIG->url . 'mod/groups/topicposts.php?topic='. $entity->guid .'&group_guid=' . $entity->container_guid;
-
+               return 'mod/groups/topicposts.php?topic='. $entity->guid .'&group_guid=' . $entity->container_guid;
        }
 
        /**
                        $filehandler->setFilename("groups/" . $entity->guid . $size . ".jpg");
 
                        if ($filehandler->exists()) {
-                               $url = $CONFIG->url . "pg/groupicon/{$entity->guid}/$size/$icontime.jpg";
+                               $url = elgg_get_site_url() . "pg/groupicon/{$entity->guid}/$size/$icontime.jpg";
 
                                return $url;
                        }
        function group_topicpost_url($annotation) {
                if ($parent = get_entity($annotation->entity_guid)) {
                        global $CONFIG;
-                       return elgg_get_site_url() . 'mod/groups/topicposts.php?topic='.$parent->guid.'&amp;group_guid='.$parent->container_guid.'#' . $annotation->id;
+                       return 'mod/groups/topicposts.php?topic='.$parent->guid.'&amp;group_guid='.$parent->container_guid.'#' . $annotation->id;
                }
        }
 
                if ($params['owner'] instanceof ElggGroup && $group_owner->forum_enable != 'no') {
                        $return_value[] = array(
                                'text' => elgg_echo('groups:forum'),
-                               'href' => "{$CONFIG->url}pg/groups/forum/{$params['owner']->getGUID()}"
+                               'href' => "pg/groups/forum/{$params['owner']->getGUID()}"
                        );
                }
                return $return_value;
                if ($params['owner'] instanceof ElggGroup) {
                        $return_value[] = array(
                                'text' => elgg_echo('Activity'),
-                               'href' => "{$CONFIG->url}pg/groups/activity/{$params['owner']->getGUID()}"
+                               'href' => "pg/groups/activity/{$params['owner']->getGUID()}"
                        );
                }
                return $return_value;
index 9a3cc64cb36193433ca19f99f663bdbae3961a25..61b6c49fd64299e300dc46abc5f15c14df3f63e8 100644 (file)
@@ -26,7 +26,7 @@
            if (groups_can_edit_discussion($vars['entity'], elgg_get_page_owner()->owner_guid)) {\r
                        echo "<div class='entity_metadata'>";\r
                echo "<span class='delete_button'>".elgg_view("output/confirmlink",array(\r
-                               'href' => elgg_get_site_url() . "action/groups/deletepost?post=" . $vars['entity']->id . "&topic=" . get_input('topic') . "&group=" . get_input('group_guid'),\r
+                               'href' => "action/groups/deletepost?post=" . $vars['entity']->id . "&topic=" . get_input('topic') . "&group=" . get_input('group_guid'),\r
                                'text' => elgg_echo('delete'),\r
                                'confirm' => elgg_echo('deleteconfirm')\r
                                ))."</span>";\r
index 297dc31d4fbf8822873f92ef56fc5791a97e35cb..c905cf8f70b7ebd3d89dbec63d97055cfdd7410b 100644 (file)
@@ -21,7 +21,7 @@ if (!empty($vars['invitations']) && is_array($vars['invitations'])) {
                        <a href="<?php echo $url; ?>" class="submit_button"><?php echo elgg_echo('accept'); ?></a>
                        <?php           
                                echo str_replace('<a', '<a class="action_button disabled" ', elgg_view('output/confirmlink',array(
-                                       'href' => elgg_get_site_url() . "action/groups/killinvitation?user_guid={$user->getGUID()}&group_guid={$group->getGUID()}",
+                                       'href' => "action/groups/killinvitation?user_guid={$user->getGUID()}&group_guid={$group->getGUID()}",
                                        'confirm' => elgg_echo('groups:invite:remove:check'),
                                        'text' => elgg_echo('delete'),
                                )));
index 6dde33bd460f1fbafc848f5251c940effa55d208..dbd65a667843441c7ad4d061ac491400d954c8c1 100644 (file)
@@ -22,7 +22,7 @@
                                        <a href="<?php echo $url; ?>" class="submit_button"><?php echo elgg_echo('accept'); ?></a>
                                        <?php   
                                        echo str_replace('<a', '<a class="action_button disabled" ', elgg_view('output/confirmlink',array(
-                                               'href' => elgg_get_site_url() . 'action/groups/killrequest?user_guid='.$request->guid.'&group_guid=' . $vars['entity']->guid,
+                                               'href' => 'action/groups/killrequest?user_guid='.$request->guid.'&group_guid=' . $vars['entity']->guid,
                                                'confirm' => elgg_echo('groups:joinrequest:remove:check'),
                                                'text' => elgg_echo('delete'),
                                        )));
index 9729c9d83da9a70c50e0d1c39efb6fba1cdc4995..2d5b1e0947411bb7a1d7424cb03a4a874c3ddbc3 100644 (file)
@@ -53,14 +53,14 @@ if (get_context() == "search") {
                // display the delete link to those allowed to delete
                $info .= "<div class='entity_metadata'>";
                        $info .= '<span class="entity_edit">' . elgg_view("output/url", array(
-                                                                                                                                               'href' => elgg_get_site_url() . "mod/groups/edittopic.php?group={$vars['entity']->container_guid}&topic={$vars['entity']->guid}",
+                                                                                                                                               'href' => "mod/groups/edittopic.php?group={$vars['entity']->container_guid}&topic={$vars['entity']->guid}",
                                                                                                                                                'text' => elgg_echo('edit'),
                                                                                                                                        ));
                        $info .= '</span>';
                        
                // display the delete link to those allowed to delete
                $info .= '<span class="delete_button">' . elgg_view("output/confirmlink", array(
-                                                                                                                                               'href' => elgg_get_site_url() . "action/groups/deletetopic?topic=" . $vars['entity']->guid . "&group=" . $vars['entity']->container_guid,
+                                                                                                                                               'href' => "action/groups/deletetopic?topic=" . $vars['entity']->guid . "&group=" . $vars['entity']->container_guid,
                                                                                                                                                'text' => elgg_echo('delete'),
                                                                                                                                                'confirm' => elgg_echo('deleteconfirm'),
                                                                                                                                        ));