aboutsummaryrefslogtreecommitdiff
path: root/mod/pages
diff options
context:
space:
mode:
Diffstat (limited to 'mod/pages')
-rw-r--r--mod/pages/actions/pages/delete.php4
-rw-r--r--mod/pages/friends.php2
-rw-r--r--mod/pages/history.php4
-rw-r--r--mod/pages/revision.php4
-rw-r--r--mod/pages/start.php35
-rw-r--r--mod/pages/view.php6
-rw-r--r--mod/pages/views/default/object/page_top.php2
-rw-r--r--mod/pages/views/default/pages/group_module.php4
-rw-r--r--mod/pages/views/default/widgets/pages/content.php2
9 files changed, 32 insertions, 31 deletions
diff --git a/mod/pages/actions/pages/delete.php b/mod/pages/actions/pages/delete.php
index 927da1299..077561b1e 100644
--- a/mod/pages/actions/pages/delete.php
+++ b/mod/pages/actions/pages/delete.php
@@ -33,9 +33,9 @@ if ($page) {
}
}
if (elgg_instanceof($container, 'group')) {
- forward("pg/pages/group/$container->guid/owner");
+ forward("pages/group/$container->guid/owner");
} else {
- forward("pg/pages/owner/$container->username/");
+ forward("pages/owner/$container->username");
}
}
}
diff --git a/mod/pages/friends.php b/mod/pages/friends.php
index d851edea3..13aa28578 100644
--- a/mod/pages/friends.php
+++ b/mod/pages/friends.php
@@ -10,7 +10,7 @@ if (!$owner) {
}
-elgg_push_breadcrumb($owner->name, "pg/pages/owner/$owner->username");
+elgg_push_breadcrumb($owner->name, "pages/owner/$owner->username");
elgg_push_breadcrumb(elgg_echo('friends'));
$title = elgg_echo('pages:friends');
diff --git a/mod/pages/history.php b/mod/pages/history.php
index 5a31723cb..7ed5ad7f7 100644
--- a/mod/pages/history.php
+++ b/mod/pages/history.php
@@ -20,9 +20,9 @@ if (!$container) {
elgg_set_page_owner_guid($container->getGUID());
if (elgg_instanceof($container, 'group')) {
- elgg_push_breadcrumb($container->name, "pg/pages/group/$container->guid/owner");
+ elgg_push_breadcrumb($container->name, "pages/group/$container->guid/owner");
} else {
- elgg_push_breadcrumb($container->name, "pg/pages/owner/$container->username");
+ elgg_push_breadcrumb($container->name, "pages/owner/$container->username");
}
pages_prepare_parent_breadcrumbs($page);
elgg_push_breadcrumb($page->title, $page->getURL());
diff --git a/mod/pages/revision.php b/mod/pages/revision.php
index 1537e0355..968c64b58 100644
--- a/mod/pages/revision.php
+++ b/mod/pages/revision.php
@@ -27,9 +27,9 @@ if (!$container) {
$title = $page->title . ": " . elgg_echo('pages:revision');
if (elgg_instanceof($container, 'group')) {
- elgg_push_breadcrumb($container->name, "pg/pages/group/$container->guid/owner");
+ elgg_push_breadcrumb($container->name, "pages/group/$container->guid/owner");
} else {
- elgg_push_breadcrumb($container->name, "pg/pages/owner/$container->username");
+ elgg_push_breadcrumb($container->name, "pages/owner/$container->username");
}
pages_prepare_parent_breadcrumbs($page);
elgg_push_breadcrumb($page->title, $page->getURL());
diff --git a/mod/pages/start.php b/mod/pages/start.php
index 8c2645f05..1c655bd07 100644
--- a/mod/pages/start.php
+++ b/mod/pages/start.php
@@ -16,7 +16,7 @@ function pages_init() {
// register a library of helper functions
elgg_register_library('elgg:pages', elgg_get_plugins_path() . 'pages/lib/pages.php');
- $item = new ElggMenuItem('pages', elgg_echo('pages'), 'pg/pages/all');
+ $item = new ElggMenuItem('pages', elgg_echo('pages'), 'pages/all');
elgg_register_menu_item('site', $item);
// Register a page handler, so we can have nice URLs
@@ -81,15 +81,15 @@ function pages_init() {
/**
* Dispatcher for pages.
* URLs take the form of
- * All pages: pg/pages/all
- * User's pages: pg/pages/owner/<username>
- * Friends' pages: pg/pages/friends/<username>
- * View page: pg/pages/view/<guid>/<title>
- * New page: pg/pages/add/<guid> (container: user, group, parent)
- * Edit page: pg/pages/edit/<guid>
- * History of page: pg/pages/history/<guid>
- * Revision of page: pg/pages/revision/<id>
- * Group pages: pg/pages/group/<guid>/owner
+ * All pages: pages/all
+ * User's pages: pages/owner/<username>
+ * Friends' pages: pages/friends/<username>
+ * View page: pages/view/<guid>/<title>
+ * New page: pages/add/<guid> (container: user, group, parent)
+ * Edit page: pages/edit/<guid>
+ * History of page: pages/history/<guid>
+ * Revision of page: pages/revision/<id>
+ * Group pages: pages/group/<guid>/owner
*
* Title is ignored
*
@@ -109,7 +109,7 @@ function pages_page_handler($page) {
$page[0] = 'all';
}
- elgg_push_breadcrumb(elgg_echo('pages'), 'pg/pages/all');
+ elgg_push_breadcrumb(elgg_echo('pages'), 'pages/all');
$base_dir = elgg_get_plugins_path() . 'pages';
@@ -161,7 +161,7 @@ function pages_page_handler($page) {
*/
function pages_url($entity) {
$title = elgg_get_friendly_title($entity->title);
- return "pg/pages/view/$entity->guid/$title";
+ return "pages/view/$entity->guid/$title";
}
/**
@@ -171,7 +171,7 @@ function pages_url($entity) {
* @return string
*/
function pages_revision_url($annotation) {
- return "pg/pages/revision/$annotation->id";
+ return "pages/revision/$annotation->id";
}
/**
@@ -199,12 +199,12 @@ function pages_icon_url_override($hook, $type, $returnvalue, $params) {
*/
function pages_owner_block_menu($hook, $type, $return, $params) {
if (elgg_instanceof($params['entity'], 'user')) {
- $url = "pg/pages/owner/{$params['entity']->username}";
+ $url = "pages/owner/{$params['entity']->username}";
$item = new ElggMenuItem('pages', elgg_echo('pages'), $url);
$return[] = $item;
} else {
if ($params['entity']->pages_enable != "no") {
- $url = "pg/pages/group/{$params['entity']->guid}/owner";
+ $url = "pages/group/{$params['entity']->guid}/owner";
$item = new ElggMenuItem('pages', elgg_echo('pages:group'), $url);
$return[] = $item;
}
@@ -230,7 +230,7 @@ function pages_entity_menu_setup($hook, $type, $return, $params) {
$options = array(
'name' => 'history',
'text' => elgg_echo('pages:history'),
- 'href' => "pg/pages/history/$entity->guid",
+ 'href' => "pages/history/$entity->guid",
'priority' => 150,
);
$return[] = ElggMenuItem::factory($options);
@@ -253,7 +253,8 @@ function page_notify_message($hook, $entity_type, $returnvalue, $params) {
if (($entity instanceof ElggEntity) && (($entity->getSubtype() == 'page_top') || ($entity->getSubtype() == 'page'))) {
$descr = $entity->description;
$title = $entity->title;
- $url = elgg_get_site_url() . "pg/view/" . $entity->guid;
+ //@todo why?
+ $url = elgg_get_site_url() . "view/" . $entity->guid;
$owner = $entity->getOwnerEntity();
return $owner->name . ' ' . elgg_echo("pages:via") . ': ' . $title . "\n\n" . $descr . "\n\n" . $entity->getURL();
}
diff --git a/mod/pages/view.php b/mod/pages/view.php
index e6189bae8..d3503709d 100644
--- a/mod/pages/view.php
+++ b/mod/pages/view.php
@@ -22,9 +22,9 @@ if (!$container) {
$title = $page->title;
if (elgg_instanceof($container, 'group')) {
- elgg_push_breadcrumb($container->name, "pg/pages/group/$container->guid/owner");
+ elgg_push_breadcrumb($container->name, "pages/group/$container->guid/owner");
} else {
- elgg_push_breadcrumb($container->name, "pg/pages/owner/$container->username");
+ elgg_push_breadcrumb($container->name, "pages/owner/$container->username");
}
pages_prepare_parent_breadcrumbs($page);
elgg_push_breadcrumb($title);
@@ -34,7 +34,7 @@ $content .= elgg_view_comments($page);
$buttons = '';
if ($page->canEdit()) {
- $url = "pg/pages/add/$page->guid";
+ $url = "pages/add/$page->guid";
$buttons = elgg_view('output/url', array(
'text' => elgg_echo('pages:newchild'),
'href' => $url,
diff --git a/mod/pages/views/default/object/page_top.php b/mod/pages/views/default/object/page_top.php
index 72d9720ef..301ee7add 100644
--- a/mod/pages/views/default/object/page_top.php
+++ b/mod/pages/views/default/object/page_top.php
@@ -31,7 +31,7 @@ $page_icon = elgg_view('pages/icon', array('annotation' => $annotation, 'size' =
$editor = get_entity($annotation->owner_guid);
$editor_link = elgg_view('output/url', array(
- 'href' => "pg/pages/owner/$editor->username",
+ 'href' => "pages/owner/$editor->username",
'text' => $editor->name,
));
diff --git a/mod/pages/views/default/pages/group_module.php b/mod/pages/views/default/pages/group_module.php
index 9d2f863dd..f36e30442 100644
--- a/mod/pages/views/default/pages/group_module.php
+++ b/mod/pages/views/default/pages/group_module.php
@@ -13,7 +13,7 @@ if ($group->pages_enable == "no") {
}
$all_link = elgg_view('output/url', array(
- 'href' => "pg/pages/group/$group->guid/owner",
+ 'href' => "pages/group/$group->guid/owner",
'text' => elgg_echo('link:view:all'),
));
@@ -38,7 +38,7 @@ if (!$content) {
}
$new_link = elgg_view('output/url', array(
- 'href' => "pg/pages/add/$group->guid",
+ 'href' => "pages/add/$group->guid",
'text' => elgg_echo('pages:add'),
));
$content .= "<span class='elgg-widget-more'>$new_link</span>";
diff --git a/mod/pages/views/default/widgets/pages/content.php b/mod/pages/views/default/widgets/pages/content.php
index eea482273..3ae0b8454 100644
--- a/mod/pages/views/default/widgets/pages/content.php
+++ b/mod/pages/views/default/widgets/pages/content.php
@@ -20,7 +20,7 @@ $content = elgg_list_entities($options);
echo $content;
if ($content) {
- $url = "pg/pages/owner/" . elgg_get_page_owner_entity()->username;
+ $url = "pages/owner/" . elgg_get_page_owner_entity()->username;
$more_link = elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('pages:more'),