aboutsummaryrefslogtreecommitdiff
path: root/mod/blog
diff options
context:
space:
mode:
Diffstat (limited to 'mod/blog')
-rw-r--r--mod/blog/start.php7
-rw-r--r--mod/blog/views/default/blog/forms/edit.php4
-rw-r--r--mod/blog/views/default/blog/sidebar_edit.php2
-rw-r--r--mod/blog/views/default/blog/sidebar_revisions.php2
-rw-r--r--mod/blog/views/default/object/blog.php2
5 files changed, 7 insertions, 10 deletions
diff --git a/mod/blog/start.php b/mod/blog/start.php
index a4a4a7c65..c61e818ad 100644
--- a/mod/blog/start.php
+++ b/mod/blog/start.php
@@ -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",
);
}
diff --git a/mod/blog/views/default/blog/forms/edit.php b/mod/blog/views/default/blog/forms/edit.php
index 88d41d269..2b07fae94 100644
--- a/mod/blog/views/default/blog/forms/edit.php
+++ b/mod/blog/views/default/blog/forms/edit.php
@@ -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
));
diff --git a/mod/blog/views/default/blog/sidebar_edit.php b/mod/blog/views/default/blog/sidebar_edit.php
index 3b884437f..9b56f9a73 100644
--- a/mod/blog/views/default/blog/sidebar_edit.php
+++ b/mod/blog/views/default/blog/sidebar_edit.php
@@ -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);
diff --git a/mod/blog/views/default/blog/sidebar_revisions.php b/mod/blog/views/default/blog/sidebar_revisions.php
index 43215963b..e53ba9e52 100644
--- a/mod/blog/views/default/blog/sidebar_revisions.php
+++ b/mod/blog/views/default/blog/sidebar_revisions.php
@@ -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') {
diff --git a/mod/blog/views/default/object/blog.php b/mod/blog/views/default/object/blog.php
index fc88eea25..b93608b7e 100644
--- a/mod/blog/views/default/object/blog.php
+++ b/mod/blog/views/default/object/blog.php
@@ -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'),