aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-10 22:05:49 +0000
committerewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544>2011-03-10 22:05:49 +0000
commitadae1958a95d7e801de91d673e927cac348236d9 (patch)
treedeb60ecca44c95abc5301b0d64bcd08585e85798
parentea14bfe87eda3af8e8002c64ad909cf592d7fe76 (diff)
downloadelgg-adae1958a95d7e801de91d673e927cac348236d9.tar.gz
elgg-adae1958a95d7e801de91d673e927cac348236d9.tar.bz2
Fixes #2228: Major cleanup of urls -- remove leading pg/ and trailing / from most urls in core and plugins
git-svn-id: http://code.elgg.org/elgg/trunk@8653 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--actions/admin/plugins/activate.php2
-rw-r--r--actions/admin/plugins/deactivate.php2
-rw-r--r--actions/admin/user/delete.php2
-rw-r--r--actions/friends/collections/add.php4
-rw-r--r--actions/friends/collections/delete.php2
-rw-r--r--engine/classes/ElggSite.php8
-rw-r--r--engine/lib/admin.php10
-rw-r--r--engine/lib/cache.php2
-rw-r--r--engine/lib/cron.php20
-rw-r--r--engine/lib/elgglib.php2
-rw-r--r--engine/lib/entities.php2
-rw-r--r--engine/lib/input.php2
-rw-r--r--engine/lib/navigation.php2
-rw-r--r--engine/lib/output.php4
-rw-r--r--engine/lib/pagehandler.php2
-rw-r--r--engine/lib/pageowner.php49
-rw-r--r--engine/lib/plugins.php5
-rw-r--r--engine/lib/river.php2
-rw-r--r--engine/lib/user_settings.php6
-rw-r--r--engine/lib/users.php32
-rw-r--r--engine/tests/api/helpers.php8
-rw-r--r--index.php2
-rw-r--r--install/ElggInstaller.php2
-rw-r--r--js/lib/elgglib.js4
-rw-r--r--js/lib/languages.js2
-rw-r--r--js/lib/userpicker.js2
-rw-r--r--js/tests/ElggLibTest.js4
-rw-r--r--mod/blog/actions/blog/delete.php4
-rw-r--r--mod/blog/actions/blog/save.php2
-rw-r--r--mod/blog/lib/blog.php22
-rw-r--r--mod/blog/start.php28
-rw-r--r--mod/blog/views/default/blog/group_module.php4
-rw-r--r--mod/blog/views/default/blog/sidebar/archives.php2
-rw-r--r--mod/blog/views/default/blog/sidebar/revisions.php2
-rw-r--r--mod/blog/views/default/object/blog.php2
-rw-r--r--mod/blog/views/default/widgets/blog/content.php2
-rw-r--r--mod/bookmarks/actions/bookmarks/delete.php4
-rw-r--r--mod/bookmarks/actions/bookmarks/save.php2
-rw-r--r--mod/bookmarks/pages/friends.php2
-rw-r--r--mod/bookmarks/pages/view.php4
-rw-r--r--mod/bookmarks/start.php46
-rw-r--r--mod/bookmarks/views/default/bookmarks/bookmarklet.php2
-rw-r--r--mod/bookmarks/views/default/bookmarks/group_module.php4
-rw-r--r--mod/bookmarks/views/default/object/bookmarks.php2
-rw-r--r--mod/bookmarks/views/default/widgets/bookmarks/content.php2
-rw-r--r--mod/categories/start.php2
-rw-r--r--mod/categories/views/default/output/categories.php2
-rw-r--r--mod/developers/start.php4
-rw-r--r--mod/developers/views/default/admin/developers/preview.php2
-rw-r--r--mod/embed/start.php2
-rw-r--r--mod/embed/views/default/embed/embed.php2
-rw-r--r--mod/embed/views/default/embed/upload/content.php2
-rw-r--r--mod/externalpages/start.php2
-rw-r--r--mod/externalpages/views/default/expages/menu.php4
-rw-r--r--mod/file/actions/file/delete.php6
-rw-r--r--mod/file/actions/file/upload.php4
-rw-r--r--mod/file/edit.php2
-rw-r--r--mod/file/friends.php4
-rw-r--r--mod/file/index.php4
-rw-r--r--mod/file/search.php8
-rw-r--r--mod/file/start.php24
-rw-r--r--mod/file/upload.php6
-rw-r--r--mod/file/view.php6
-rw-r--r--mod/file/views/default/file/embed_upload.php2
-rw-r--r--mod/file/views/default/file/group_module.php4
-rw-r--r--mod/file/views/default/object/file.php2
-rw-r--r--mod/file/views/default/widgets/filerepo/content.php2
-rw-r--r--mod/groups/actions/discussion/delete.php2
-rw-r--r--mod/groups/actions/groups/delete.php2
-rw-r--r--mod/groups/actions/groups/membership/invite.php2
-rw-r--r--mod/groups/lib/discussion.php6
-rw-r--r--mod/groups/lib/groups.php2
-rw-r--r--mod/groups/start.php60
-rw-r--r--mod/groups/views/default/discussion/group_module.php4
-rw-r--r--mod/groups/views/default/groups/group_sort_menu.php2
-rw-r--r--mod/groups/views/default/groups/profile/activity_module.php2
-rw-r--r--mod/groups/views/default/groups/profile/buttons.php4
-rw-r--r--mod/groups/views/default/groups/side_menu.php4
-rw-r--r--mod/groups/views/default/groups/sidebar/find.php2
-rw-r--r--mod/groups/views/default/groups/sidebar/members.php4
-rw-r--r--mod/groups/views/default/widgets/a_users_groups/content.php2
-rw-r--r--mod/invitefriends/actions/invite.php2
-rw-r--r--mod/invitefriends/start.php2
-rw-r--r--mod/logbrowser/start.php2
-rw-r--r--mod/logbrowser/views/default/logbrowser/form.php3
-rw-r--r--mod/logbrowser/views/default/logbrowser/table.php2
-rw-r--r--mod/messageboard/pages/owner.php4
-rw-r--r--mod/messageboard/start.php12
-rw-r--r--mod/messageboard/views/default/widgets/messageboard/content.php4
-rw-r--r--mod/messages/actions/messages/send.php10
-rw-r--r--mod/messages/read.php4
-rw-r--r--mod/messages/start.php18
-rw-r--r--mod/messages/views/default/object/messages.php4
-rw-r--r--mod/notifications/start.php4
-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
-rw-r--r--mod/profile/start.php2
-rw-r--r--mod/reportedcontent/start.php4
-rw-r--r--mod/search/index.php8
-rw-r--r--mod/search/views/default/search/list.php2
-rw-r--r--mod/search/views/default/search/search_box.php2
-rw-r--r--mod/thewire/actions/add.php2
-rw-r--r--mod/thewire/actions/delete.php2
-rw-r--r--mod/thewire/pages/friends.php4
-rw-r--r--mod/thewire/pages/reply.php2
-rw-r--r--mod/thewire/pages/tag.php4
-rw-r--r--mod/thewire/pages/thread.php2
-rw-r--r--mod/thewire/pages/user.php2
-rw-r--r--mod/thewire/start.php24
-rw-r--r--mod/thewire/tests/regex.php4
-rw-r--r--mod/thewire/views/default/object/thewire.php2
-rw-r--r--mod/thewire/views/default/thewire/profile_status.php2
-rw-r--r--mod/thewire/views/default/widgets/thewire/content.php2
-rw-r--r--mod/twitterservice/start.php4
-rw-r--r--mod/twitterservice/twitterservice_lib.php10
-rw-r--r--mod/twitterservice/views/default/twitterservice/login.php2
-rw-r--r--mod/twitterservice/views/default/usersettings/twitterservice/edit.php2
-rw-r--r--mod/uservalidationbyemail/lib/functions.php2
-rw-r--r--mod/uservalidationbyemail/start.php2
-rw-r--r--mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php2
-rw-r--r--views/default/admin/appearance/default_widgets.php2
-rw-r--r--views/default/admin/header.php2
-rw-r--r--views/default/admin/plugins/advanced.php2
-rw-r--r--views/default/core/account/login_dropdown.php2
-rw-r--r--views/default/core/account/login_walled_garden.php2
-rw-r--r--views/default/core/members/nav.php6
-rw-r--r--views/default/core/members/sidebar.php4
-rw-r--r--views/default/forms/login.php2
-rw-r--r--views/default/group/search/finishblurb.php2
-rw-r--r--views/default/input/autocomplete.php2
-rw-r--r--views/default/object/plugin/advanced.php8
-rw-r--r--views/default/object/plugin/simple.php2
-rw-r--r--views/default/output/tagcloud.php4
-rw-r--r--views/default/output/tags.php2
-rw-r--r--views/default/page/default.php4
-rw-r--r--views/default/page/layouts/content/filter.php6
-rw-r--r--views/default/page/layouts/content/header.php2
-rw-r--r--views/default/page/layouts/two_column_left_sidebar.php2
-rw-r--r--views/default/user/search/finishblurb.php2
-rw-r--r--views/default/widgets/content_stats/content.php2
-rw-r--r--views/foaf/page/default.php2
-rw-r--r--views/installation/page/elements/footer.php2
-rw-r--r--views/rss/core/river/body.php2
150 files changed, 407 insertions, 401 deletions
diff --git a/actions/admin/plugins/activate.php b/actions/admin/plugins/activate.php
index 5196467b2..ad588f3db 100644
--- a/actions/admin/plugins/activate.php
+++ b/actions/admin/plugins/activate.php
@@ -38,7 +38,7 @@ elgg_invalidate_simplecache();
elgg_filepath_cache_reset();
if (count($plugin_guids) == 1) {
- forward("pg/admin/plugins/advanced#elgg-plugin-" . $plugin_guids[0]);
+ forward("admin/plugins/advanced#elgg-plugin-" . $plugin_guids[0]);
} else {
forward(REFERER);
} \ No newline at end of file
diff --git a/actions/admin/plugins/deactivate.php b/actions/admin/plugins/deactivate.php
index c1dd2d1b5..74c78e0fc 100644
--- a/actions/admin/plugins/deactivate.php
+++ b/actions/admin/plugins/deactivate.php
@@ -38,7 +38,7 @@ elgg_invalidate_simplecache();
elgg_filepath_cache_reset();
if (count($plugin_guids) == 1) {
- forward("pg/admin/plugins/advanced#elgg-plugin-" . $plugin_guids[0]);
+ forward("admin/plugins/advanced#elgg-plugin-" . $plugin_guids[0]);
} else {
forward(REFERER);
}
diff --git a/actions/admin/user/delete.php b/actions/admin/user/delete.php
index 39a0bc49c..7cfbd0925 100644
--- a/actions/admin/user/delete.php
+++ b/actions/admin/user/delete.php
@@ -34,7 +34,7 @@ if (($user instanceof ElggUser) && ($user->canEdit())) {
// forward to user administration if on a user's page as it no longer exists
$forward = REFERER;
if (strpos($_SERVER['HTTP_REFERER'], $username) != FALSE) {
- $forward = "pg/admin/users/newest";
+ $forward = "admin/users/newest";
}
forward($forward);
diff --git a/actions/friends/collections/add.php b/actions/friends/collections/add.php
index eac8bced8..8ec6a085f 100644
--- a/actions/friends/collections/add.php
+++ b/actions/friends/collections/add.php
@@ -26,11 +26,11 @@ if ($collection_name) {
// Success message
system_message(elgg_echo("friends:collectionadded"));
// Forward to the collections page
- forward("pg/collections/" . elgg_get_logged_in_user_entity()->username);
+ forward("collections/" . elgg_get_logged_in_user_entity()->username);
} else {
register_error(elgg_echo("friends:nocollectionname"));
// Forward to the add collection page
- forward("pg/collections/add");
+ forward("collections/add");
}
diff --git a/actions/friends/collections/delete.php b/actions/friends/collections/delete.php
index f0ceaf023..fe719d74b 100644
--- a/actions/friends/collections/delete.php
+++ b/actions/friends/collections/delete.php
@@ -33,4 +33,4 @@ if ($get_collection) {
}
// Forward to the collections page
-forward("pg/collections/" . elgg_get_logged_in_user_entity()->username);
+forward("collections/" . elgg_get_logged_in_user_entity()->username);
diff --git a/engine/classes/ElggSite.php b/engine/classes/ElggSite.php
index a6499cc97..d3cb0d488 100644
--- a/engine/classes/ElggSite.php
+++ b/engine/classes/ElggSite.php
@@ -398,16 +398,16 @@ class ElggSite extends ElggEntity {
// default public pages
$defaults = array(
'action/login',
- 'pg/register',
+ 'register',
'action/register',
'pages/account/forgotten_password\.php',
'action/user/requestnewpassword',
- 'pg/resetpassword',
+ 'resetpassword',
'upgrade\.php',
'xml-rpc\.php',
'mt/mt-xmlrpc\.cgi',
- 'pg/css/.*',
- 'pg/js/.*'
+ 'css/.*',
+ 'js/.*'
);
// include a hook for plugin authors to include public pages
diff --git a/engine/lib/admin.php b/engine/lib/admin.php
index 1459c7716..7774f78e0 100644
--- a/engine/lib/admin.php
+++ b/engine/lib/admin.php
@@ -133,7 +133,7 @@ function elgg_register_admin_menu_item($menu_id, $parent_id = NULL, $priority =
// in the admin section parents never have links
if ($parent_id) {
- $href = "pg/admin/$parent_id/$menu_id";
+ $href = "admin/$parent_id/$menu_id";
} else {
$href = NULL;
}
@@ -209,7 +209,7 @@ function admin_init() {
// dashboard
elgg_register_menu_item('page', array(
'name' => 'dashboard',
- 'href' => 'pg/admin/dashboard',
+ 'href' => 'admin/dashboard',
'text' => elgg_echo('admin:dashboard'),
'context' => 'admin',
'priority' => 10,
@@ -217,7 +217,7 @@ function admin_init() {
elgg_register_menu_item('topbar', array(
'name' => 'administration',
- 'href' => 'pg/admin',
+ 'href' => 'admin',
'text' => elgg_view_icon('settings') . elgg_echo('admin'),
'priority' => 100,
'section' => 'alt',
@@ -262,7 +262,7 @@ function elgg_admin_add_plugin_settings_menu() {
if (elgg_view_exists("settings/$plugin_id/edit")) {
elgg_register_menu_item('page', array(
'name' => $plugin_id,
- 'href' => "pg/admin/plugin_settings/$plugin_id",
+ 'href' => "admin/plugin_settings/$plugin_id",
'text' => $plugin->manifest->getName(),
'parent_name' => 'plugin_settings',
'context' => 'admin',
@@ -369,7 +369,7 @@ function admin_settings_page_handler($page) {
/**
* Serves up screenshots for plugins from
- * elgg/pg/admin_plugin_ss/<plugin_id>/<size>/<ss_name>.<ext>
+ * elgg/admin_plugin_ss/<plugin_id>/<size>/<ss_name>.<ext>
*
* @param array $pages The pages array
* @return true
diff --git a/engine/lib/cache.php b/engine/lib/cache.php
index 32f36ff03..bc279e8ea 100644
--- a/engine/lib/cache.php
+++ b/engine/lib/cache.php
@@ -168,7 +168,7 @@ function elgg_get_simplecache_url($type, $view) {
$viewtype = elgg_get_viewtype();
$url = elgg_get_site_url() . "cache/$type/$view/$viewtype/$view.$lastcache.$type";
} else {
- $url = elgg_get_site_url() . "pg/$type/$view.$lastcache.$type";
+ $url = elgg_get_site_url() . "$type/$view.$lastcache.$type";
}
return $url;
}
diff --git a/engine/lib/cron.php b/engine/lib/cron.php
index ef0cf17b2..2a0b1d665 100644
--- a/engine/lib/cron.php
+++ b/engine/lib/cron.php
@@ -74,16 +74,16 @@ function cron_page_handler($page) {
* @return array
*/
function cron_public_pages($hook, $type, $return_value, $params) {
- $return_value[] = 'pg/cron/minute';
- $return_value[] = 'pg/cron/fiveminute';
- $return_value[] = 'pg/cron/fifteenmin';
- $return_value[] = 'pg/cron/halfhour';
- $return_value[] = 'pg/cron/hourly';
- $return_value[] = 'pg/cron/daily';
- $return_value[] = 'pg/cron/weekly';
- $return_value[] = 'pg/cron/monthly';
- $return_value[] = 'pg/cron/yearly';
- $return_value[] = 'pg/cron/reboot';
+ $return_value[] = 'cron/minute';
+ $return_value[] = 'cron/fiveminute';
+ $return_value[] = 'cron/fifteenmin';
+ $return_value[] = 'cron/halfhour';
+ $return_value[] = 'cron/hourly';
+ $return_value[] = 'cron/daily';
+ $return_value[] = 'cron/weekly';
+ $return_value[] = 'cron/monthly';
+ $return_value[] = 'cron/yearly';
+ $return_value[] = 'cron/reboot';
return $return_value;
}
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index c97fa433c..bc272fbd7 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -1761,7 +1761,7 @@ function elgg_is_valid_options_for_batch_operation($options, $type) {
* @return boolean
*/
function elgg_walled_garden_index() {
- elgg_register_css('/pg/css/walled_garden.css');
+ elgg_register_css('/css/walled_garden.css');
$login = elgg_view('core/account/login_walled_garden');
echo elgg_view_page('', $login, 'walled_garden');
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index eff0330a1..3bf3259e2 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -1819,7 +1819,7 @@ function get_entity_url($entity_guid) {
}
if ($url == "") {
- $url = "pg/view/" . $entity_guid;
+ $url = "view/" . $entity_guid;
}
return elgg_normalize_url($url);
diff --git a/engine/lib/input.php b/engine/lib/input.php
index cbc112772..c3fabbe5d 100644
--- a/engine/lib/input.php
+++ b/engine/lib/input.php
@@ -197,7 +197,7 @@ function elgg_clear_sticky_value($form_name, $variable) {
/**
* Page handler for autocomplete endpoint.
*
- * /pg/livesearch/?q=<query>
+ * /livesearch?q=<query>
*
* Other options include:
* match_on string all|array(groups|users|friends|subtype)
diff --git a/engine/lib/navigation.php b/engine/lib/navigation.php
index 8c71de03a..891527d38 100644
--- a/engine/lib/navigation.php
+++ b/engine/lib/navigation.php
@@ -258,7 +258,7 @@ function elgg_entity_menu_setup($hook, $type, $return, $params) {
$options = array(
'name' => 'edit',
'text' => elgg_echo('edit'),
- 'href' => "pg/$handler/edit/{$entity->getGUID()}",
+ 'href' => "$handler/edit/{$entity->getGUID()}",
'priority' => 200,
);
$return[] = ElggMenuItem::factory($options);
diff --git a/engine/lib/output.php b/engine/lib/output.php
index cba1ffae9..7a38e5b8c 100644
--- a/engine/lib/output.php
+++ b/engine/lib/output.php
@@ -225,7 +225,7 @@ function elgg_clean_vars(array $vars = array()) {
*
* @example
* elgg_normalize_url(''); // 'http://my.site.com/'
- * elgg_normalize_url('pg/dashboard'); // 'http://my.site.com/pg/dashboard'
+ * elgg_normalize_url('dashboard'); // 'http://my.site.com/dashboard'
* elgg_normalize_url('http://google.com/'); // no change
* elgg_normalize_url('//google.com/'); // no change
*
@@ -255,7 +255,7 @@ function elgg_normalize_url($url) {
return "http://$url";
}
- // 'pg/page/handler', 'mod/plugin/file.php'
+ // 'page/handler', 'mod/plugin/file.php'
else {
// trim off any leading / because the site URL is stored
// with a trailing /
diff --git a/engine/lib/pagehandler.php b/engine/lib/pagehandler.php
index 1fa073c1e..e598d6821 100644
--- a/engine/lib/pagehandler.php
+++ b/engine/lib/pagehandler.php
@@ -53,7 +53,7 @@ function page_handler($handler, $page) {
* Registers a page handler for a particular identifier
*
* For example, you can register a function called 'blog_page_handler' for handler type 'blog'
- * For all URLs http://yoururl/pg/blog/*, the blog_page_handler() function will be called.
+ * For all URLs http://yoururl/blog/*, the blog_page_handler() function will be called.
* The part of the URL marked with * above will be exploded on '/' characters and passed as an
* array to that function.
* For example, the URL http://yoururl/blog/username/friends/ would result in the call:
diff --git a/engine/lib/pageowner.php b/engine/lib/pageowner.php
index c7ec0b52b..065a96bc2 100644
--- a/engine/lib/pageowner.php
+++ b/engine/lib/pageowner.php
@@ -68,12 +68,12 @@ function elgg_set_page_owner_guid($guid) {
* parameter. The request parameters used are 'username' and 'owner_guid'. If
* the page request is going through the page handling system, this function
* attempts to figure out the owner if the url fits the patterns of:
- * pg/<handler>/owner/<username>
- * pg/<handler>/friends/<username>
- * pg/<handler>/view/<entity guid>
- * pg/<handler>/add/<container guid>
- * pg/<handler>/edit/<entity guid>
- * pg/<handler>/group/<group guid>
+ * <handler>/owner/<username>
+ * <handler>/friends/<username>
+ * <handler>/view/<entity guid>
+ * <handler>/add/<container guid>
+ * <handler>/edit/<entity guid>
+ * <handler>/group/<group guid>
*
*
* @param string $hook 'page_owner'
@@ -113,34 +113,35 @@ function default_page_owner_handler($hook, $entity_type, $returnvalue, $params)
}
// ignore root and query
- $uri = current_page_url();
- $path = str_replace(elgg_get_site_url(), '', $uri);
- $path = trim($path, "/");
- if (strpos($path, "?")) {
- $path = substr($path, 0, strpos($path, "?"));
- }
-
- if (strpos($path, 'pg') === 0) {
+ $uri = current_page_url();
+ $path = str_replace(elgg_get_site_url(), '', $uri);
+ $path = trim($path, "/");
+ if (strpos($path, "?")) {
+ $path = substr($path, 0, strpos($path, "?"));
+ }
+
+ // @todo feels hacky
+ if (get_input('page', FALSE)) {
$segments = explode('/', $path);
- if (isset($segments[2]) && isset($segments[3])) {
- switch ($segments[2]) {
+ if (isset($segments[1]) && isset($segments[2])) {
+ switch ($segments[1]) {
case 'owner':
case 'friends':
- $user = get_user_by_username($segments[3]);
+ $user = get_user_by_username($segments[2]);
if ($user) {
return $user->getGUID();
}
break;
case 'view':
case 'edit':
- $entity = get_entity($segments[3]);
+ $entity = get_entity($segments[2]);
if ($entity) {
return $entity->getContainerGUID();
}
break;
case 'add':
case 'group':
- $entity = get_entity($segments[3]);
+ $entity = get_entity($segments[2]);
if ($entity) {
return $entity->getGUID();
}
@@ -160,8 +161,8 @@ function default_page_owner_handler($hook, $entity_type, $returnvalue, $params)
* output could be different for those two contexts ('blog' vs 'widget').
*
* Pages that pass through the page handling system set the context to the
- * first string after 'pg'. Example: http://elgg.org/pg/bookmarks/ results in
- * the initial context being set to 'bookmarks'.
+ * first string after the root url. Example: http://example.org/elgg/bookmarks/
+ * results in the initial context being set to 'bookmarks'.
*
* The context is a stack so that for a widget on a profile, the context stack
* may contain first 'profile' and then 'widget'.
@@ -261,8 +262,10 @@ function page_owner_boot() {
elgg_register_plugin_hook_handler('page_owner', 'system', 'default_page_owner_handler');
$CONFIG->context = array();
- if (preg_match("/\/pg\/([\w\-\_]+)/", $_SERVER['REQUEST_URI'], $matches)) {
- elgg_set_context($matches[1]);
+ // @todo Ew... hacky
+ $handler = get_input('handler', FALSE);
+ if ($handler) {
+ elgg_set_context($handler);
}
}
diff --git a/engine/lib/plugins.php b/engine/lib/plugins.php
index e0a6f134d..981896588 100644
--- a/engine/lib/plugins.php
+++ b/engine/lib/plugins.php
@@ -538,8 +538,9 @@ function elgg_get_calling_plugin_id($mainfilename = false) {
}
}
} else {
- if (preg_match("/pg\/([a-zA-Z0-9\-\_]*)\//", $_SERVER['REQUEST_URI'], $matches)) {
- return $matches[1];
+ //@todo this is a hack -- plugins do not have to match their page handler names!
+ if ($handler = get_input('handler', FALSE)) {
+ return $handler;
} else {
$file = $_SERVER["SCRIPT_NAME"];
$file = str_replace("\\", "/", $file);
diff --git a/engine/lib/river.php b/engine/lib/river.php
index 3a351805e..c0100bb81 100644
--- a/engine/lib/river.php
+++ b/engine/lib/river.php
@@ -532,7 +532,7 @@ function elgg_river_page_handler($page) {
*/
function elgg_river_init() {
elgg_register_page_handler('activity', 'elgg_river_page_handler');
- $item = new ElggMenuItem('activity', elgg_echo('activity'), 'pg/activity');
+ $item = new ElggMenuItem('activity', elgg_echo('activity'), 'activity');
elgg_register_menu_item('site', $item);
}
diff --git a/engine/lib/user_settings.php b/engine/lib/user_settings.php
index f3e586851..5c4d1fbe4 100644
--- a/engine/lib/user_settings.php
+++ b/engine/lib/user_settings.php
@@ -254,19 +254,19 @@ function usersettings_pagesetup() {
$params = array(
'name' => '1_account',
'text' => elgg_echo('usersettings:user:opt:linktext'),
- 'href' => "pg/settings/user/{$user->username}",
+ 'href' => "settings/user/{$user->username}",
);
elgg_register_menu_item('page', $params);
$params = array(
'name' => '1_plugins',
'text' => elgg_echo('usersettings:plugins:opt:linktext'),
- 'href' => "pg/settings/plugins/{$user->username}",
+ 'href' => "settings/plugins/{$user->username}",
);
elgg_register_menu_item('page', $params);
$params = array(
'name' => '1_statistics',
'text' => elgg_echo('usersettings:statistics:opt:linktext'),
- 'href' => "pg/settings/statistics/{$user->username}",
+ 'href' => "settings/statistics/{$user->username}",
);
elgg_register_menu_item('page', $params);
}
diff --git a/engine/lib/users.php b/engine/lib/users.php
index 318cd71bd..ef673cacb 100644
--- a/engine/lib/users.php
+++ b/engine/lib/users.php
@@ -689,7 +689,7 @@ function send_new_password_request($user_guid) {
// generate link
- $link = $CONFIG->site->url . "pg/resetpassword?u=$user_guid&c=$code";
+ $link = $CONFIG->site->url . "resetpassword?u=$user_guid&c=$code";
// generate email
$email = elgg_echo('email:resetreq:body', array($user->name, $_SERVER['REMOTE_ADDR'], $link));
@@ -1089,13 +1089,13 @@ function collections_submenu_items() {
elgg_register_menu_item('page', array(
'name' => 'friends:view:collections',
'text' => elgg_echo('friends:collections'),
- 'href' => "pg/collections/$user->username",
+ 'href' => "collections/$user->username",
));
/*
elgg_register_menu_item('page', array(
'name' => 'friends:collections:add',
'text' => elgg_echo('friends:collections:add'),
- 'href' => "pg/collections/add",
+ 'href' => "collections/add",
));
*
*/
@@ -1268,7 +1268,7 @@ function user_avatar_hook($hook, $entity_type, $returnvalue, $params) {
$size = $params['size'];
if (isset($user->icontime)) {
- return "pg/avatar/view/$user->username/$size/$user->icontime";
+ return "avatar/view/$user->username/$size/$user->icontime";
} else {
return "_graphics/icons/user/default{$size}.gif";
}
@@ -1294,12 +1294,12 @@ function elgg_user_hover_menu($hook, $type, $return, $params) {
$item->setSection('action');
$return[] = $item;
} else {
- $url = "pg/profile/$user->username/edit";
+ $url = "profile/$user->username/edit";
$item = new ElggMenuItem('profile:edit', elgg_echo('profile:edit'), $url);
$item->setSection('action');
$return[] = $item;
- $url = "pg/avatar/edit/$user->username";
+ $url = "avatar/edit/$user->username";
$item = new ElggMenuItem('avatar:edit', elgg_echo('avatar:edit'), $url);
$item->setSection('action');
$return[] = $item;
@@ -1336,7 +1336,7 @@ function elgg_user_hover_menu($hook, $type, $return, $params) {
$return[] = $item;
}
- $url = "pg/profile/$user->username/edit";
+ $url = "profile/$user->username/edit";
$item = new ElggMenuItem('profile:edit', elgg_echo('profile:edit'), $url);
$item->setSection('admin');
$return[] = $item;
@@ -1403,8 +1403,8 @@ function elgg_profile_fields_setup() {
/**
* Avatar page handler
*
- * /pg/avatar/edit/<username>
- * /pg/avatar/view/<username>/<size>/<icontime>
+ * /avatar/edit/<username>
+ * /avatar/view/<username>/<size>/<icontime>
*
* @param array $page
*/
@@ -1471,7 +1471,7 @@ function users_pagesetup() {
$params = array(
'name' => 'friends',
'text' => elgg_echo('friends'),
- 'href' => 'pg/friends/' . elgg_get_page_owner_entity()->username,
+ 'href' => 'friends/' . elgg_get_page_owner_entity()->username,
'contexts' => array('friends')
);
elgg_register_menu_item('page', $params);
@@ -1479,7 +1479,7 @@ function users_pagesetup() {
$params = array(
'name' => 'friends:of',
'text' => elgg_echo('friends:of'),
- 'href' => 'pg/friendsof/' . elgg_get_page_owner_entity()->username,
+ 'href' => 'friendsof/' . elgg_get_page_owner_entity()->username,
'contexts' => array('friends')
);
elgg_register_menu_item('page', $params);
@@ -1490,14 +1490,14 @@ function users_pagesetup() {
if ($user) {
elgg_register_menu_item('page', array(
'name' => 'edit_avatar',
- 'href' => "pg/avatar/edit/{$user->username}",
+ 'href' => "avatar/edit/{$user->username}",
'text' => elgg_echo('avatar:edit'),
'contexts' => array('profile_edit'),
));
elgg_register_menu_item('page', array(
'name' => 'edit_profile',
- 'href' => "pg/profile/{$user->username}/edit",
+ 'href' => "profile/{$user->username}/edit",
'text' => elgg_echo('profile:edit'),
'contexts' => array('profile_edit'),
));
@@ -1512,7 +1512,7 @@ function users_pagesetup() {
elgg_register_menu_item('topbar', array(
'name' => 'friends',
- 'href' => "pg/friends/{$user->username}",
+ 'href' => "friends/{$user->username}",
'text' => elgg_view_icon('friends'),
'title' => elgg_echo('friends'),
'priority' => 300,
@@ -1520,7 +1520,7 @@ function users_pagesetup() {
elgg_register_menu_item('topbar', array(
'name' => 'usersettings',
- 'href' => "pg/settings/user/{$user->username}",
+ 'href' => "settings/user/{$user->username}",
'text' => elgg_view_icon('settings') . elgg_echo('settings'),
'priority' => 500,
'section' => 'alt',
@@ -1557,7 +1557,7 @@ function users_init() {
elgg_register_page_handler('profile', 'elgg_profile_page_handler');
elgg_register_page_handler('collections', 'collections_page_handler');
- $item = new ElggMenuItem('members', elgg_echo('members'), 'pg/members');
+ $item = new ElggMenuItem('members', elgg_echo('members'), 'members');
elgg_register_menu_item('site', $item);
elgg_register_plugin_hook_handler('register', 'menu:user_hover', 'elgg_user_hover_menu');
diff --git a/engine/tests/api/helpers.php b/engine/tests/api/helpers.php
index e969eb6c8..488fd8390 100644
--- a/engine/tests/api/helpers.php
+++ b/engine/tests/api/helpers.php
@@ -76,15 +76,15 @@ class ElggCoreHelpersTest extends ElggCoreUnitTest {
'example.com' => 'http://example.com',
'example.com/subpage' => 'http://example.com/subpage',
- 'pg/page/handler' => elgg_get_site_url() . 'pg/page/handler',
- 'pg/page/handler?p=v&p2=v2' => elgg_get_site_url() . 'pg/page/handler?p=v&p2=v2',
+ 'page/handler' => elgg_get_site_url() . 'page/handler',
+ 'page/handler?p=v&p2=v2' => elgg_get_site_url() . 'page/handler?p=v&p2=v2',
'mod/plugin/file.php' => elgg_get_site_url() . 'mod/plugin/file.php',
'mod/plugin/file.php?p=v&p2=v2' => elgg_get_site_url() . 'mod/plugin/file.php?p=v&p2=v2',
'rootfile.php' => elgg_get_site_url() . 'rootfile.php',
'rootfile.php?p=v&p2=v2' => elgg_get_site_url() . 'rootfile.php?p=v&p2=v2',
- '/pg/page/handler' => elgg_get_site_url() . 'pg/page/handler',
- '/pg/page/handler?p=v&p2=v2' => elgg_get_site_url() . 'pg/page/handler?p=v&p2=v2',
+ '/page/handler' => elgg_get_site_url() . 'page/handler',
+ '/page/handler?p=v&p2=v2' => elgg_get_site_url() . 'page/handler?p=v&p2=v2',
'/mod/plugin/file.php' => elgg_get_site_url() . 'mod/plugin/file.php',
'/mod/plugin/file.php?p=v&p2=v2' => elgg_get_site_url() . 'mod/plugin/file.php?p=v&p2=v2',
'/rootfile.php' => elgg_get_site_url() . 'rootfile.php',
diff --git a/index.php b/index.php
index 72447d099..4c9392016 100644
--- a/index.php
+++ b/index.php
@@ -19,7 +19,7 @@ if (elgg_trigger_plugin_hook('index', 'system', null, FALSE) != FALSE) {
}
if (elgg_is_logged_in()) {
- forward('pg/activity/');
+ forward('activity');
}
diff --git a/install/ElggInstaller.php b/install/ElggInstaller.php
index 648716442..de111c5d4 100644
--- a/install/ElggInstaller.php
+++ b/install/ElggInstaller.php
@@ -506,7 +506,7 @@ class ElggInstaller {
$params = array();
if ($this->autoLogin) {
- $params['destination'] = 'pg/admin/';
+ $params['destination'] = 'admin';
} else {
$params['destination'] = 'index.php';
}
diff --git a/js/lib/elgglib.js b/js/lib/elgglib.js
index 12e89392f..3b409d134 100644
--- a/js/lib/elgglib.js
+++ b/js/lib/elgglib.js
@@ -238,7 +238,7 @@ elgg.inherit = function(Child, Parent) {
* If the url is already absolute or protocol-relative, no change is made.
*
* elgg.normalize_url(''); // 'http://my.site.com/'
- * elgg.normalize_url('pg/dashboard'); // 'http://my.site.com/pg/dashboard'
+ * elgg.normalize_url('dashboard'); // 'http://my.site.com/dashboard'
* elgg.normalize_url('http://google.com/'); // no change
* elgg.normalize_url('//google.com/'); // no change
*
@@ -272,7 +272,7 @@ elgg.normalize_url = function(url) {
return 'http://' + url;
}
- // 'pg/page/handler', 'mod/plugin/file.php'
+ // 'page/handler', 'mod/plugin/file.php'
else {
// trim off any leading / because the site URL is stored
// with a trailing /
diff --git a/js/lib/languages.js b/js/lib/languages.js
index e464fc0ff..10afa24b0 100644
--- a/js/lib/languages.js
+++ b/js/lib/languages.js
@@ -25,7 +25,7 @@ elgg.add_translation = function(lang, translations) {
*/
elgg.reload_all_translations = function(language) {
var lang = language || elgg.get_language();
- elgg.getJSON('pg/js/languages%252f' + lang + '.js', {
+ elgg.getJSON('js/languages%252f' + lang + '.js', {
data: {
'viewtype': 'default',
'lastcache': elgg.config.lastcache
diff --git a/js/lib/userpicker.js b/js/lib/userpicker.js
index 2b3d78d6b..5fc39bce3 100644
--- a/js/lib/userpicker.js
+++ b/js/lib/userpicker.js
@@ -11,7 +11,7 @@ elgg.userpicker.init = function() {
source: function(request, response) {
var params = elgg.userpicker.getSearchParams(this);
- elgg.get('pg/livesearch', {
+ elgg.get('livesearch', {
data: params,
dataType: 'json',
success: function(data) {
diff --git a/js/tests/ElggLibTest.js b/js/tests/ElggLibTest.js
index dda1ecd40..dd0267c5c 100644
--- a/js/tests/ElggLibTest.js
+++ b/js/tests/ElggLibTest.js
@@ -73,10 +73,10 @@ ElggLibTest.prototype.testNormalizeUrl = function() {
[
['', elgg.config.wwwroot],
- ['pg/test', elgg.config.wwwroot + 'pg/test'],
+ ['test', elgg.config.wwwroot + 'test'],
['http://google.com', 'http://google.com'],
['//example.com', '//example.com'],
- ['/pg/page', elgg.config.wwwroot + 'pg/page'],
+ ['/page', elgg.config.wwwroot + 'page'],
['mod/plugin/index.php', elgg.config.wwwroot + 'mod/plugin/index.php'],
].forEach(function(args) {
assertEquals(args[1], elgg.normalize_url(args[0]));
diff --git a/mod/blog/actions/blog/delete.php b/mod/blog/actions/blog/delete.php
index 64179e09c..6028480ff 100644
--- a/mod/blog/actions/blog/delete.php
+++ b/mod/blog/actions/blog/delete.php
@@ -13,9 +13,9 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) {
if ($blog->delete()) {
system_message(elgg_echo('blog:message:deleted_post'));
if (elgg_instanceof($container, 'group')) {
- forward("pg/blog/group/$container->guid/owner");
+ forward("blog/group/$container->guid/owner");
} else {
- forward("pg/blog/owner/$container->username/");
+ forward("blog/owner/$container->username");
}
} else {
register_error(elgg_echo('blog:error:cannot_delete_post'));
diff --git a/mod/blog/actions/blog/save.php b/mod/blog/actions/blog/save.php
index 099a89cc0..3f9e5e355 100644
--- a/mod/blog/actions/blog/save.php
+++ b/mod/blog/actions/blog/save.php
@@ -157,7 +157,7 @@ if (!$error) {
if ($blog->status == 'published') {
forward($blog->getURL());
} else {
- forward("pg/blog/edit/$blog->guid");
+ forward("blog/edit/$blog->guid");
}
} else {
register_error(elgg_echo('blog:error:cannot_save'));
diff --git a/mod/blog/lib/blog.php b/mod/blog/lib/blog.php
index 0a2c3a8ac..81d06ca0a 100644
--- a/mod/blog/lib/blog.php
+++ b/mod/blog/lib/blog.php
@@ -32,9 +32,9 @@ function blog_get_page_content_read($guid = NULL) {
$container = $blog->getContainerEntity();
$crumbs_title = $container->name;
if (elgg_instanceof($container, 'group')) {
- elgg_push_breadcrumb($crumbs_title, "pg/blog/group/$container->guid/owner");
+ elgg_push_breadcrumb($crumbs_title, "blog/group/$container->guid/owner");
} else {
- elgg_push_breadcrumb($crumbs_title, "pg/blog/owner/$container->username");
+ elgg_push_breadcrumb($crumbs_title, "blog/owner/$container->username");
}
elgg_push_breadcrumb($blog->title);
@@ -88,7 +88,7 @@ function blog_get_page_content_list($container_guid = NULL) {
if (elgg_instanceof($container, 'group')) {
$return['filter'] = '';
if ($container->isMember(elgg_get_logged_in_user_entity())) {
- $url = "pg/blog/add/$container->guid";
+ $url = "blog/add/$container->guid";
$params = array(
'href' => $url,
'text' => elgg_echo("blog:add"),
@@ -137,7 +137,7 @@ function blog_get_page_content_friends($user_guid) {
$return['title'] = elgg_echo('blog:title:friends');
$crumbs_title = $user->name;
- elgg_push_breadcrumb($crumbs_title, "pg/blog/owner/{$user->username}");
+ elgg_push_breadcrumb($crumbs_title, "blog/owner/{$user->username}");
elgg_push_breadcrumb(elgg_echo('friends'));
if (!$friends = get_user_friends($user_guid, ELGG_ENTITIES_ANY_VALUE, 0)) {
@@ -193,7 +193,7 @@ function blog_get_page_content_archive($owner_guid, $lower = 0, $upper = 0) {
elgg_set_page_owner_guid($owner_guid);
$crumbs_title = $user->name;
- elgg_push_breadcrumb($crumbs_title, "pg/blog/owner/{$user->username}");
+ elgg_push_breadcrumb($crumbs_title, "blog/owner/{$user->username}");
elgg_push_breadcrumb(elgg_echo('blog:archives'));
if ($lower) {
@@ -405,7 +405,7 @@ function blog_url_forwarder($page) {
$guid = $matches[1];
$entity = get_entity($guid);
if ($entity) {
- $url = "{$CONFIG->wwwroot}pg/blog/group/$guid/owner";
+ $url = "{$CONFIG->wwwroot}blog/group/$guid/owner";
register_error(elgg_echo("changebookmark"));
forward($url);
}
@@ -423,19 +423,19 @@ function blog_url_forwarder($page) {
switch ($page[1]) {
case "read":
- $url = "{$CONFIG->wwwroot}pg/blog/view/{$page[2]}/{$page[3]}";
+ $url = "{$CONFIG->wwwroot}blog/view/{$page[2]}/{$page[3]}";
break;
case "archive":
- $url = "{$CONFIG->wwwroot}pg/blog/archive/{$page[0]}/{$page[2]}/{$page[3]}";
+ $url = "{$CONFIG->wwwroot}blog/archive/{$page[0]}/{$page[2]}/{$page[3]}";
break;
case "friends":
- $url = "{$CONFIG->wwwroot}pg/blog/friends/{$page[0]}";
+ $url = "{$CONFIG->wwwroot}blog/friends/{$page[0]}";
break;
case "new":
- $url = "{$CONFIG->wwwroot}pg/blog/add/$user->guid";
+ $url = "{$CONFIG->wwwroot}blog/add/$user->guid";
break;
case "owner":
- $url = "{$CONFIG->wwwroot}pg/blog/owner/{$page[0]}";
+ $url = "{$CONFIG->wwwroot}blog/owner/{$page[0]}";
break;
}
diff --git a/mod/blog/start.php b/mod/blog/start.php
index 344da21d4..01d78b4dd 100644
--- a/mod/blog/start.php
+++ b/mod/blog/start.php
@@ -22,7 +22,7 @@ function blog_init() {
elgg_register_library('elgg:blog', elgg_get_plugins_path() . 'blog/lib/blog.php');
// add a site navigation item
- $item = new ElggMenuItem('blog', elgg_echo('blog:blogs'), 'pg/blog/all');
+ $item = new ElggMenuItem('blog', elgg_echo('blog:blogs'), 'blog/all');
elgg_register_menu_item('site', $item);
elgg_register_event_handler('upgrade', 'upgrade', 'blog_run_upgrades');
@@ -73,15 +73,15 @@ function blog_init() {
/**
* Dispatches blog pages.
* URLs take the form of
- * All blogs: pg/blog/all
- * User's blogs: pg/blog/owner/<username>
- * Friends' blog: pg/blog/friends/<username>
- * User's archives: pg/blog/archives/<username>/<time_start>/<time_stop>
- * Blog post: pg/blog/view/<guid>/<title>
- * New post: pg/blog/add/<guid>
- * Edit post: pg/blog/edit/<guid>/<revision>
- * Preview post: pg/blog/preview/<guid>
- * Group blog: pg/blog/group/<guid>/owner
+ * All blogs: blog/all
+ * User's blogs: blog/owner/<username>
+ * Friends' blog: blog/friends/<username>
+ * User's archives: blog/archives/<username>/<time_start>/<time_stop>
+ * Blog post: blog/view/<guid>/<title>
+ * New post: blog/add/<guid>
+ * Edit post: blog/edit/<guid>/<revision>
+ * Preview post: blog/preview/<guid>
+ * Group blog: blog/group/<guid>/owner
*
* Title is ignored
*
@@ -99,7 +99,7 @@ function blog_page_handler($page) {
blog_url_forwarder($page);
// push all blogs breadcrumb
- elgg_push_breadcrumb(elgg_echo('blog:blogs'), "pg/blog/all/");
+ elgg_push_breadcrumb(elgg_echo('blog:blogs'), "blog/all");
if (!isset($page[0])) {
$page[0] = 'all';
@@ -161,7 +161,7 @@ function blog_url_handler($entity) {
$friendly_title = elgg_get_friendly_title($entity->title);
- return "pg/blog/view/{$entity->guid}/$friendly_title";
+ return "blog/view/{$entity->guid}/$friendly_title";
}
/**
@@ -169,12 +169,12 @@ function blog_url_handler($entity) {
*/
function blog_owner_block_menu($hook, $type, $return, $params) {
if (elgg_instanceof($params['entity'], 'user')) {
- $url = "pg/blog/owner/{$params['entity']->username}";
+ $url = "blog/owner/{$params['entity']->username}";
$item = new ElggMenuItem('blog', elgg_echo('blog'), $url);
$return[] = $item;
} else {
if ($params['entity']->blog_enable != "no") {
- $url = "pg/blog/group/{$params['entity']->guid}/owner";
+ $url = "blog/group/{$params['entity']->guid}/owner";
$item = new ElggMenuItem('blog', elgg_echo('blog:group'), $url);
$return[] = $item;
}
diff --git a/mod/blog/views/default/blog/group_module.php b/mod/blog/views/default/blog/group_module.php
index 312c89c0c..14d41f07a 100644
--- a/mod/blog/views/default/blog/group_module.php
+++ b/mod/blog/views/default/blog/group_module.php
@@ -10,7 +10,7 @@ if ($group->blog_enable == "no") {
}
$all_link = elgg_view('output/url', array(
- 'href' => "pg/blog/group/$group->guid/owner",
+ 'href' => "blog/group/$group->guid/owner",
'text' => elgg_echo('link:view:all'),
));
@@ -35,7 +35,7 @@ if (!$content) {
}
$new_link = elgg_view('output/url', array(
- 'href' => "pg/blog/add/$group->guid",
+ 'href' => "blog/add/$group->guid",
'text' => elgg_echo('blog:write'),
));
$content .= "<span class='elgg-widget-more'>$new_link</span>";
diff --git a/mod/blog/views/default/blog/sidebar/archives.php b/mod/blog/views/default/blog/sidebar/archives.php
index 5eda64afb..3aa3db44f 100644
--- a/mod/blog/views/default/blog/sidebar/archives.php
+++ b/mod/blog/views/default/blog/sidebar/archives.php
@@ -17,7 +17,7 @@ if ($page_owner && $vars['page'] != 'friends') {
$timestamplow = mktime(0, 0, 0, substr($date,4,2) , 1, substr($date, 0, 4));
$timestamphigh = mktime(0, 0, 0, ((int) substr($date, 4, 2)) + 1, 1, substr($date, 0, 4));
- $link = elgg_get_site_url() . 'pg/blog/archive/' . $page_owner->username . '/' . $timestamplow . '/' . $timestamphigh;
+ $link = elgg_get_site_url() . 'blog/archive/' . $page_owner->username . '/' . $timestamplow . '/' . $timestamphigh;
$month = elgg_echo('date:month:' . substr($date, 4, 2), array(substr($date, 0, 4)));
$content .= "<li><a href=\"$link\" title=\"$month\">$month</a></li>";
}
diff --git a/mod/blog/views/default/blog/sidebar/revisions.php b/mod/blog/views/default/blog/sidebar/revisions.php
index 01eab01c4..e19516f71 100644
--- a/mod/blog/views/default/blog/sidebar/revisions.php
+++ b/mod/blog/views/default/blog/sidebar/revisions.php
@@ -33,7 +33,7 @@ if (elgg_instanceof($blog, 'object', 'blog') && $blog->canEdit()) {
$n = count($revisions);
$body = '<ul class="blog-revisions">';
- $load_base_url = "pg/blog/edit/{$blog->getGUID()}/";
+ $load_base_url = "blog/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 9687e8f34..c5425056e 100644
--- a/mod/blog/views/default/object/blog.php
+++ b/mod/blog/views/default/object/blog.php
@@ -19,7 +19,7 @@ $excerpt = $blog->excerpt;
$owner_icon = elgg_view_entity_icon($owner, 'tiny');
$owner_link = elgg_view('output/url', array(
- 'href' => "pg/blog/owner/$owner->username",
+ 'href' => "blog/owner/$owner->username",
'text' => $owner->name,
));
$author_text = elgg_echo('byline', array($owner_link));
diff --git a/mod/blog/views/default/widgets/blog/content.php b/mod/blog/views/default/widgets/blog/content.php
index 713c0f07d..7bbfc3c74 100644
--- a/mod/blog/views/default/widgets/blog/content.php
+++ b/mod/blog/views/default/widgets/blog/content.php
@@ -18,7 +18,7 @@ $content = elgg_list_entities($options);
echo $content;
if ($content) {
- $blog_url = "pg/blog/owner/" . elgg_get_page_owner_entity()->username;
+ $blog_url = "blog/owner/" . elgg_get_page_owner_entity()->username;
$more_link = elgg_view('output/url', array(
'href' => $blog_url,
'text' => elgg_echo('blog:moreblogs'),
diff --git a/mod/bookmarks/actions/bookmarks/delete.php b/mod/bookmarks/actions/bookmarks/delete.php
index ba89ec228..410a67bb7 100644
--- a/mod/bookmarks/actions/bookmarks/delete.php
+++ b/mod/bookmarks/actions/bookmarks/delete.php
@@ -13,9 +13,9 @@ if (elgg_instanceof($bookmark, 'object', 'bookmarks') && $bookmark->canEdit()) {
if ($bookmark->delete()) {
system_message(elgg_echo("bookmarks:delete:success"));
if (elgg_instanceof($container, 'group')) {
- forward("pg/bookmarks/group/$container->guid/owner");
+ forward("bookmarks/group/$container->guid/owner");
} else {
- forward("pg/bookmarks/owner/$container->username/");
+ forward("bookmarks/owner/$container->username");
}
}
}
diff --git a/mod/bookmarks/actions/bookmarks/save.php b/mod/bookmarks/actions/bookmarks/save.php
index 2f4f7b685..19bb3c73a 100644
--- a/mod/bookmarks/actions/bookmarks/save.php
+++ b/mod/bookmarks/actions/bookmarks/save.php
@@ -71,5 +71,5 @@ if ($bookmark->save()) {
forward($bookmark->getURL());
} else {
register_error(elgg_echo('bookmarks:save:failed'));
- forward("pg/bookmarks");
+ forward("bookmarks");
}
diff --git a/mod/bookmarks/pages/friends.php b/mod/bookmarks/pages/friends.php
index dedeeb5e9..6e3f77cf6 100644
--- a/mod/bookmarks/pages/friends.php
+++ b/mod/bookmarks/pages/friends.php
@@ -7,7 +7,7 @@
$owner = elgg_get_page_owner_entity();
-elgg_push_breadcrumb($owner->name, "pg/bookmarks/owner/$owner->username");
+elgg_push_breadcrumb($owner->name, "bookmarks/owner/$owner->username");
elgg_push_breadcrumb(elgg_echo('friends'));
$title = elgg_echo('bookmarks:friends');
diff --git a/mod/bookmarks/pages/view.php b/mod/bookmarks/pages/view.php
index b5a857857..142e0b246 100644
--- a/mod/bookmarks/pages/view.php
+++ b/mod/bookmarks/pages/view.php
@@ -12,9 +12,9 @@ $page_owner = elgg_get_page_owner_entity();
$crumbs_title = $page_owner->name;
if (elgg_instanceof($page_owner, 'group')) {
- elgg_push_breadcrumb($crumbs_title, "pg/bookmarks/group/$page_owner->guid/owner");
+ elgg_push_breadcrumb($crumbs_title, "bookmarks/group/$page_owner->guid/owner");
} else {
- elgg_push_breadcrumb($crumbs_title, "pg/bookmarks/owner/$page_owner->username");
+ elgg_push_breadcrumb($crumbs_title, "bookmarks/owner/$page_owner->username");
}
$title = $bookmark->title;
diff --git a/mod/bookmarks/start.php b/mod/bookmarks/start.php
index 0bd2e3134..bf7e372a3 100644
--- a/mod/bookmarks/start.php
+++ b/mod/bookmarks/start.php
@@ -26,7 +26,7 @@ function bookmarks_init() {
elgg_register_menu_item('site', array(
'name' => 'bookmarks',
'text' => elgg_echo('bookmarks'),
- 'href' => 'pg/bookmarks/all'
+ 'href' => 'bookmarks/all'
));
elgg_register_plugin_hook_handler('register', 'menu:page', 'bookmarks_page_menu');
@@ -45,7 +45,7 @@ function bookmarks_init() {
elgg_register_menu_item('extras', array(
'name' => 'bookmark',
'text' => elgg_view_icon('bookmark'),
- 'href' => "pg/bookmarks/add/$user_guid?address=$address",
+ 'href' => "bookmarks/add/$user_guid?address=$address",
'title' => elgg_echo('bookmarks:this'),
'rel' => 'nofollow',
));
@@ -73,14 +73,14 @@ function bookmarks_init() {
* Dispatcher for bookmarks.
*
* URLs take the form of
- * All bookmarks: pg/bookmarks/all
- * User's bookmarks: pg/bookmarks/owner/<username>
- * Friends' bookmarks: pg/bookmarks/friends/<username>
- * View bookmark: pg/bookmarks/view/<guid>/<title>
- * New bookmark: pg/bookmarks/add/<guid> (container: user, group, parent)
- * Edit bookmark: pg/bookmarks/edit/<guid>
- * Group bookmarks: pg/bookmarks/group/<guid>/owner
- * Bookmarklet: pg/bookmarks/bookmarklet/<guid> (user)
+ * All bookmarks: bookmarks/all
+ * User's bookmarks: bookmarks/owner/<username>
+ * Friends' bookmarks: bookmarks/friends/<username>
+ * View bookmark: bookmarks/view/<guid>/<title>
+ * New bookmark: bookmarks/add/<guid> (container: user, group, parent)
+ * Edit bookmark: bookmarks/edit/<guid>
+ * Group bookmarks: bookmarks/group/<guid>/owner
+ * Bookmarklet: bookmarks/bookmarklet/<guid> (user)
*
* Title is ignored
*
@@ -89,7 +89,7 @@ function bookmarks_init() {
function bookmarks_page_handler($page) {
elgg_load_library('elgg:bookmarks');
- elgg_push_breadcrumb(elgg_echo('bookmarks'), 'pg/bookmarks/all');
+ elgg_push_breadcrumb(elgg_echo('bookmarks'), 'bookmarks/all');
elgg_push_context('bookmarks');
// old group usernames
@@ -172,22 +172,22 @@ function bookmarks_url_forwarder($page) {
switch ($page[1]) {
case "read":
- $url = "{$CONFIG->wwwroot}pg/bookmarks/view/{$page[2]}/{$page[3]}";
+ $url = "{$CONFIG->wwwroot}bookmarks/view/{$page[2]}/{$page[3]}";
break;
case "inbox":
- $url = "{$CONFIG->wwwroot}pg/bookmarks/inbox/{$page[0]}/";
+ $url = "{$CONFIG->wwwroot}bookmarks/inbox/{$page[0]}";
break;
case "friends":
- $url = "{$CONFIG->wwwroot}pg/bookmarks/friends/{$page[0]}/";
+ $url = "{$CONFIG->wwwroot}bookmarks/friends/{$page[0]}";
break;
case "add":
- $url = "{$CONFIG->wwwroot}pg/bookmarks/add/{$page[0]}/";
+ $url = "{$CONFIG->wwwroot}bookmarks/add/{$page[0]}";
break;
case "items":
- $url = "{$CONFIG->wwwroot}pg/bookmarks/owner/{$page[0]}/";
+ $url = "{$CONFIG->wwwroot}bookmarks/owner/{$page[0]}";
break;
case "bookmarklet":
- $url = "{$CONFIG->wwwroot}pg/bookmarks/bookmarklet/{$page[0]}/";
+ $url = "{$CONFIG->wwwroot}bookmarks/bookmarklet/{$page[0]}";
break;
}
@@ -206,7 +206,7 @@ function bookmark_url($entity) {
$title = $entity->title;
$title = elgg_get_friendly_title($title);
- return $CONFIG->url . "pg/bookmarks/view/" . $entity->getGUID() . "/" . $title;
+ return $CONFIG->url . "bookmarks/view/" . $entity->getGUID() . "/" . $title;
}
/**
@@ -214,12 +214,12 @@ function bookmark_url($entity) {
*/
function bookmarks_owner_block_menu($hook, $type, $return, $params) {
if (elgg_instanceof($params['entity'], 'user')) {
- $url = "pg/bookmarks/owner/{$params['entity']->username}";
+ $url = "bookmarks/owner/{$params['entity']->username}";
$item = new ElggMenuItem('bookmarks', elgg_echo('bookmarks'), $url);
$return[] = $item;
} else {
if ($params['entity']->bookmarks_enable != 'no') {
- $url = "pg/bookmarks/group/{$params['entity']->guid}/owner";
+ $url = "bookmarks/group/{$params['entity']->guid}/owner";
$item = new ElggMenuItem('bookmarks', elgg_echo('bookmarks:group'), $url);
$return[] = $item;
}
@@ -244,7 +244,7 @@ function bookmarks_notify_message($hook, $entity_type, $returnvalue, $params) {
$descr = $entity->description;
$title = $entity->title;
global $CONFIG;
- $url = elgg_get_site_url() . "pg/view/" . $entity->guid;
+ $url = elgg_get_site_url() . "view/" . $entity->guid;
if ($method == 'sms') {
$owner = $entity->getOwnerEntity();
return $owner->name . ' ' . elgg_echo("bookmarks:via") . ': ' . $url . ' (' . $title . ')';
@@ -274,7 +274,7 @@ function bookmarks_user_hover_menu($hook, $type, $return, $params) {
$user = $params['entity'];
$title = elgg_echo('bookmarks');
- $url = "pg/bookmarks/owner/$user->username";
+ $url = "bookmarks/owner/$user->username";
$return[] = new ElggMenuItem('bookmarks', $title, $url);
return $return;
@@ -299,7 +299,7 @@ function bookmarks_page_menu($hook, $type, $return, $params) {
$title = elgg_echo('bookmarks:bookmarklet');
}
- $return[] = new ElggMenuItem('bookmarklet', $title, 'pg/bookmarks/bookmarklet/' . $page_owner->getGUID());
+ $return[] = new ElggMenuItem('bookmarklet', $title, 'bookmarks/bookmarklet/' . $page_owner->getGUID());
}
}
diff --git a/mod/bookmarks/views/default/bookmarks/bookmarklet.php b/mod/bookmarks/views/default/bookmarks/bookmarklet.php
index 091a15997..1d0b25498 100644
--- a/mod/bookmarks/views/default/bookmarks/bookmarklet.php
+++ b/mod/bookmarks/views/default/bookmarks/bookmarklet.php
@@ -21,7 +21,7 @@ if (!$name && ($user = elgg_get_logged_in_user_entity())) {
$url = elgg_get_site_url();
-$bookmarklet = "<a href=\"javascript:location.href='{$url}pg/bookmarks/add/$guid?address='"
+$bookmarklet = "<a href=\"javascript:location.href='{$url}bookmarks/add/$guid?address='"
. "+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title)\">"
. "<img src=\"{$url}mod/bookmarks/graphics/bookmarklet.gif\" alt=\"$title\" /> </a>";
diff --git a/mod/bookmarks/views/default/bookmarks/group_module.php b/mod/bookmarks/views/default/bookmarks/group_module.php
index 202f87783..ea1358aeb 100644
--- a/mod/bookmarks/views/default/bookmarks/group_module.php
+++ b/mod/bookmarks/views/default/bookmarks/group_module.php
@@ -12,7 +12,7 @@ if ($group->bookmarks_enable == "no") {
}
$all_link = elgg_view('output/url', array(
- 'href' => "pg/bookmarks/group/$group->guid/owner",
+ 'href' => "bookmarks/group/$group->guid/owner",
'text' => elgg_echo('link:view:all'),
));
@@ -36,7 +36,7 @@ if (!$content) {
}
$new_link = elgg_view('output/url', array(
- 'href' => "pg/bookmarks/add/$group->guid",
+ 'href' => "bookmarks/add/$group->guid",
'text' => elgg_echo('bookmarks:add'),
));
$content .= "<span class='elgg-widget-more'>$new_link</span>";
diff --git a/mod/bookmarks/views/default/object/bookmarks.php b/mod/bookmarks/views/default/object/bookmarks.php
index 8a4b982e1..9ee564173 100644
--- a/mod/bookmarks/views/default/object/bookmarks.php
+++ b/mod/bookmarks/views/default/object/bookmarks.php
@@ -21,7 +21,7 @@ $link = filter_tags(elgg_view('output/url', array('href' => $bookmark->address))
$description = elgg_view('output/longtext', array('value' => $bookmark->description, 'class' => 'pbl'));
$owner_link = elgg_view('output/url', array(
- 'href' => "pg/bookmarks/owner/$owner->username",
+ 'href' => "bookmarks/owner/$owner->username",
'text' => $owner->name,
));
$author_text = elgg_echo('byline', array($owner_link));
diff --git a/mod/bookmarks/views/default/widgets/bookmarks/content.php b/mod/bookmarks/views/default/widgets/bookmarks/content.php
index 5f9f469d1..ea7816345 100644
--- a/mod/bookmarks/views/default/widgets/bookmarks/content.php
+++ b/mod/bookmarks/views/default/widgets/bookmarks/content.php
@@ -20,7 +20,7 @@ $content = elgg_list_entities($options);
echo $content;
if ($content) {
- $url = "pg/bookmarks/owner/" . elgg_get_page_owner_entity()->username;
+ $url = "bookmarks/owner/" . elgg_get_page_owner_entity()->username;
$more_link = elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('bookmarks:more'),
diff --git a/mod/categories/start.php b/mod/categories/start.php
index 9ff729b25..190996d9b 100644
--- a/mod/categories/start.php
+++ b/mod/categories/start.php
@@ -62,7 +62,7 @@ function categories_on_activate() {
$site = elgg_get_site_entity();
if (!$site->categories) {
- $url = elgg_normalize_url('pg/admin/plugin_settings/categories');
+ $url = elgg_normalize_url('admin/plugin_settings/categories');
$message = elgg_echo('categories:on_enable_reminder', array($url));
elgg_add_admin_notice('categories_admin_notice_no_categories', $message);
}
diff --git a/mod/categories/views/default/output/categories.php b/mod/categories/views/default/output/categories.php
index df254da4b..4b3a3fb6a 100644
--- a/mod/categories/views/default/output/categories.php
+++ b/mod/categories/views/default/output/categories.php
@@ -14,7 +14,7 @@ if (isset($vars['entity']) && $vars['entity'] instanceof ElggEntity) {
$categories = array($categories);
}
foreach($categories as $category) {
- $link = elgg_get_site_url() . 'pg/categories/list/?category=' . urlencode($category);
+ $link = elgg_get_site_url() . 'categories/list?category=' . urlencode($category);
if (!empty($linkstr)) {
$linkstr .= ', ';
}
diff --git a/mod/developers/start.php b/mod/developers/start.php
index 8f437e317..ff33f3e91 100644
--- a/mod/developers/start.php
+++ b/mod/developers/start.php
@@ -31,7 +31,7 @@ function developers_setup_menu() {
*/
function developers_theme_preview_controller($page) {
if (!isset($page[0])) {
- forward('pg/theme_preview/general');
+ forward('theme_preview/general');
}
$pages = array(
@@ -48,7 +48,7 @@ function developers_theme_preview_controller($page) {
elgg_register_menu_item('page', array(
'name' => $page_name,
'text' => elgg_echo("theme_preview:$page_name"),
- 'href' => "pg/theme_preview/$page_name",
+ 'href' => "theme_preview/$page_name",
));
}
diff --git a/mod/developers/views/default/admin/developers/preview.php b/mod/developers/views/default/admin/developers/preview.php
index 3d16e5a42..920047d98 100644
--- a/mod/developers/views/default/admin/developers/preview.php
+++ b/mod/developers/views/default/admin/developers/preview.php
@@ -3,6 +3,6 @@
* CSS Preview
*/
-$url = elgg_get_site_url() . 'pg/theme_preview/';
+$url = elgg_get_site_url() . 'theme_preview';
?>
<iframe id="developers-iframe" src="<?php echo $url; ?>"></iframe> \ No newline at end of file
diff --git a/mod/embed/start.php b/mod/embed/start.php
index 1a6cfce94..f5d17b18c 100644
--- a/mod/embed/start.php
+++ b/mod/embed/start.php
@@ -32,7 +32,7 @@ function embed_longtext_menu($hook, $type, $items, $vars) {
$items[] = ElggMenuItem::factory(array(
'name' => 'embed',
- 'href' => "pg/embed/?{$active_section}internal_name={$vars['name']}",
+ 'href' => "embed?{$active_section}internal_name={$vars['name']}",
'text' => elgg_echo('media:insert'),
'rel' => 'facebox',
'class' => 'elgg-longtext-control',
diff --git a/mod/embed/views/default/embed/embed.php b/mod/embed/views/default/embed/embed.php
index b27c53f6b..e64160852 100644
--- a/mod/embed/views/default/embed/embed.php
+++ b/mod/embed/views/default/embed/embed.php
@@ -137,7 +137,7 @@ $(document).ready(function() {
// tabs
$('.embed_section').click(function() {
var section = $(this).attr('id');
- var url = elgg.config.wwwroot + 'pg/embed/embed?active_section=' + section + '&internal_name=' + internal_name;
+ var url = elgg.config.wwwroot + 'embed/embed?active_section=' + section + '&internal_name=' + internal_name;
$('#facebox .body .content').load(url);
return false;
diff --git a/mod/embed/views/default/embed/upload/content.php b/mod/embed/views/default/embed/upload/content.php
index e738f8570..5eb9b31a2 100644
--- a/mod/embed/views/default/embed/upload/content.php
+++ b/mod/embed/views/default/embed/upload/content.php
@@ -36,7 +36,7 @@ if ($upload_sections) {
// change for dropdown
$('#embed_upload').change(function() {
var upload_section = $(this).val();
- var url = elgg.get_site_url() + 'pg/embed/embed?active_section=upload&active_upload_section=' + upload_section;
+ var url = elgg.get_site_url() + 'embed/embed?active_section=upload&active_upload_section=' + upload_section;
$('#facebox .body .content').load(url);
});
diff --git a/mod/externalpages/start.php b/mod/externalpages/start.php
index 4dffe93c5..533d71104 100644
--- a/mod/externalpages/start.php
+++ b/mod/externalpages/start.php
@@ -27,7 +27,7 @@ function expages_init() {
function expages_setup_footer_menu() {
$pages = array('about', 'terms', 'privacy');
foreach ($pages as $page) {
- $url = "pg/expages/read/$page";
+ $url = "expages/read/$page";
$item = new ElggMenuItem($page, elgg_echo("expages:$page"), $url);
$item->setSection('alt');
elgg_register_menu_item('footer', $item);
diff --git a/mod/externalpages/views/default/expages/menu.php b/mod/externalpages/views/default/expages/menu.php
index e471619b8..caa04917e 100644
--- a/mod/externalpages/views/default/expages/menu.php
+++ b/mod/externalpages/views/default/expages/menu.php
@@ -8,14 +8,14 @@
$type = $vars['type'];
//set the url
- $url = $vars['url'] . "pg/admin/site/expages?type=";
+ $url = $vars['url'] . "admin/site/expages?type=";
$pages = array('about', 'terms', 'privacy');
$tabs = array();
foreach ($pages as $page) {
$tabs[] = array(
'title' => elgg_echo("expages:$page"),
- 'url' => "pg/admin/site/expages?type=$page",
+ 'url' => "admin/site/expages?type=$page",
'selected' => $page == $type,
);
}
diff --git a/mod/file/actions/file/delete.php b/mod/file/actions/file/delete.php
index fe03e5077..622d02277 100644
--- a/mod/file/actions/file/delete.php
+++ b/mod/file/actions/file/delete.php
@@ -10,7 +10,7 @@ $guid = (int) get_input('guid');
$file = new FilePluginFile($guid);
if (!$file->guid) {
register_error(elgg_echo("file:deletefailed"));
- forward('pg/file/all');
+ forward('file/all');
}
if (!$file->canEdit()) {
@@ -27,7 +27,7 @@ if (!$file->delete()) {
}
if (elgg_instanceof($container, 'group')) {
- forward("pg/file/group/$container->guid/owner");
+ forward("file/group/$container->guid/owner");
} else {
- forward("pg/file/owner/$container->username");
+ forward("file/owner/$container->username");
}
diff --git a/mod/file/actions/file/upload.php b/mod/file/actions/file/upload.php
index 2749812d5..4deaabcac 100644
--- a/mod/file/actions/file/upload.php
+++ b/mod/file/actions/file/upload.php
@@ -187,9 +187,9 @@ if ($new_file) {
if (!$ajax) {
$container = get_entity($container_guid);
if (elgg_instanceof($container, 'group')) {
- forward("pg/file/group/$container->guid/owner");
+ forward("file/group/$container->guid/owner");
} else {
- forward("pg/file/owner/$container->username");
+ forward("file/owner/$container->username");
}
}
diff --git a/mod/file/edit.php b/mod/file/edit.php
index 12e910a26..66529af0b 100644
--- a/mod/file/edit.php
+++ b/mod/file/edit.php
@@ -20,7 +20,7 @@ if (!$file->canEdit()) {
$title = elgg_echo('file:edit');
-elgg_push_breadcrumb(elgg_echo('file'), "pg/file/all/");
+elgg_push_breadcrumb(elgg_echo('file'), "file/all");
elgg_push_breadcrumb($file->title, $file->getURL());
elgg_push_breadcrumb($title);
diff --git a/mod/file/friends.php b/mod/file/friends.php
index dada7494e..65fc66f62 100644
--- a/mod/file/friends.php
+++ b/mod/file/friends.php
@@ -7,8 +7,8 @@
$owner = elgg_get_page_owner_entity();
-elgg_push_breadcrumb(elgg_echo('file'), "pg/file/all/");
-elgg_push_breadcrumb($owner->name, "pg/file/owner/$owner->username");
+elgg_push_breadcrumb(elgg_echo('file'), "file/all");
+elgg_push_breadcrumb($owner->name, "file/owner/$owner->username");
elgg_push_breadcrumb(elgg_echo('friends'));
diff --git a/mod/file/index.php b/mod/file/index.php
index de2e46408..44382ce02 100644
--- a/mod/file/index.php
+++ b/mod/file/index.php
@@ -10,7 +10,7 @@ group_gatekeeper();
$owner = elgg_get_page_owner_entity();
-elgg_push_breadcrumb(elgg_echo('file'), "pg/file/all/");
+elgg_push_breadcrumb(elgg_echo('file'), "file/all");
elgg_push_breadcrumb($owner->name);
$params = array();
@@ -30,7 +30,7 @@ if ($owner->guid == elgg_get_logged_in_user_guid()) {
$title = elgg_echo("file:user", array($owner->name));
$params['filter'] = '';
if ($owner->isMember(elgg_get_logged_in_user_entity())) {
- $url = "pg/file/add/$owner->guid";
+ $url = "file/add/$owner->guid";
$vars = array(
'href' => $url,
'text' => elgg_echo("file:add"),
diff --git a/mod/file/search.php b/mod/file/search.php
index b7f82e951..bcaa2cad9 100644
--- a/mod/file/search.php
+++ b/mod/file/search.php
@@ -24,16 +24,16 @@ $friends = get_input('friends', false);
// breadcrumbs
-elgg_push_breadcrumb(elgg_echo('file'), "pg/file/all/");
+elgg_push_breadcrumb(elgg_echo('file'), "file/all");
if ($owner) {
if (elgg_instanceof($owner, 'user')) {
- elgg_push_breadcrumb($owner->name, "pg/file/owner/$owner->username");
+ elgg_push_breadcrumb($owner->name, "file/owner/$owner->username");
} else {
- elgg_push_breadcrumb($owner->name, "pg/file/group/$owner->guid/owner");
+ elgg_push_breadcrumb($owner->name, "file/group/$owner->guid/owner");
}
}
if ($friends && $owner) {
- elgg_push_breadcrumb(elgg_echo('friends'), "pg/file/friends/$owner->username");
+ elgg_push_breadcrumb(elgg_echo('friends'), "file/friends/$owner->username");
}
if ($tag) {
elgg_push_breadcrumb(elgg_echo("file:type:$tag"));
diff --git a/mod/file/start.php b/mod/file/start.php
index c2f445d5d..f7642c166 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -16,7 +16,7 @@ function file_init() {
elgg_register_library('elgg:file', elgg_get_plugins_path() . 'file/lib/file.php');
// Site navigation
- $item = new ElggMenuItem('file', elgg_echo('file'), 'pg/file/all');
+ $item = new ElggMenuItem('file', elgg_echo('file'), 'file/all');
elgg_register_menu_item('site', $item);
// Extend CSS
@@ -67,13 +67,13 @@ function file_init() {
/**
* Dispatches file pages.
* URLs take the form of
- * All files: pg/file/all
- * User's files: pg/file/owner/<username>
- * Friends' files: pg/file/friends/<username>
- * View file: pg/file/view/<guid>/<title>
- * New file: pg/file/add/<guid>
- * Edit file: pg/file/edit/<guid>
- * Group files: pg/file/group/<guid>/owner
+ * All files: file/all
+ * User's files: file/owner/<username>
+ * Friends' files: file/friends/<username>
+ * View file: file/view/<guid>/<title>
+ * New file: file/add/<guid>
+ * Edit file: file/edit/<guid>
+ * Group files: file/group/<guid>/owner
*
* Title is ignored
*
@@ -132,7 +132,7 @@ function file_notify_message($hook, $entity_type, $returnvalue, $params) {
if (($entity instanceof ElggEntity) && ($entity->getSubtype() == 'file')) {
$descr = $entity->description;
$title = $entity->title;
- $url = elgg_get_site_url() . "pg/view/" . $entity->guid;
+ $url = elgg_get_site_url() . "view/" . $entity->guid;
$owner = $entity->getOwnerEntity();
return $owner->name . ' ' . elgg_echo("file:via") . ': ' . $entity->title . "\n\n" . $descr . "\n\n" . $entity->getURL();
}
@@ -144,12 +144,12 @@ function file_notify_message($hook, $entity_type, $returnvalue, $params) {
*/
function file_owner_block_menu($hook, $type, $return, $params) {
if (elgg_instanceof($params['entity'], 'user')) {
- $url = "pg/file/owner/{$params['entity']->username}";
+ $url = "file/owner/{$params['entity']->username}";
$item = new ElggMenuItem('file', elgg_echo('file'), $url);
$return[] = $item;
} else {
if ($params['entity']->files_enable != "no") {
- $url = "pg/file/group/{$params['entity']->guid}/owner";
+ $url = "file/group/{$params['entity']->guid}/owner";
$item = new ElggMenuItem('file', elgg_echo('file:group'), $url);
$return[] = $item;
}
@@ -261,7 +261,7 @@ function get_filetype_cloud($owner_guid = "", $friends = false) {
function file_url_override($entity) {
$title = $entity->title;
$title = elgg_get_friendly_title($title);
- return "pg/file/view/" . $entity->getGUID() . "/" . $title;
+ return "file/view/" . $entity->getGUID() . "/" . $title;
}
/**
diff --git a/mod/file/upload.php b/mod/file/upload.php
index 9f0220b95..c19522530 100644
--- a/mod/file/upload.php
+++ b/mod/file/upload.php
@@ -15,11 +15,11 @@ group_gatekeeper();
$title = elgg_echo('file:add');
// set up breadcrumbs
-elgg_push_breadcrumb(elgg_echo('file'), "pg/file/all/");
+elgg_push_breadcrumb(elgg_echo('file'), "file/all");
if (elgg_instanceof($owner, 'user')) {
- elgg_push_breadcrumb($owner->name, "pg/file/owner/$owner->username");
+ elgg_push_breadcrumb($owner->name, "file/owner/$owner->username");
} else {
- elgg_push_breadcrumb($owner->name, "pg/file/group/$owner->guid/owner");
+ elgg_push_breadcrumb($owner->name, "file/group/$owner->guid/owner");
}
elgg_push_breadcrumb($title);
diff --git a/mod/file/view.php b/mod/file/view.php
index 9e89fbd56..1d7c27337 100644
--- a/mod/file/view.php
+++ b/mod/file/view.php
@@ -9,13 +9,13 @@ $file = get_entity(get_input('guid'));
$owner = elgg_get_page_owner_entity();
-elgg_push_breadcrumb(elgg_echo('file'), 'pg/file/all');
+elgg_push_breadcrumb(elgg_echo('file'), 'file/all');
$crumbs_title = $owner->name;
if (elgg_instanceof($owner, 'group')) {
- elgg_push_breadcrumb($crumbs_title, "pg/file/group/$owner->guid/owner");
+ elgg_push_breadcrumb($crumbs_title, "file/group/$owner->guid/owner");
} else {
- elgg_push_breadcrumb($crumbs_title, "pg/file/owner/$owner->username");
+ elgg_push_breadcrumb($crumbs_title, "file/owner/$owner->username");
}
$title = $file->title;
diff --git a/mod/file/views/default/file/embed_upload.php b/mod/file/views/default/file/embed_upload.php
index 8536acd77..9014809c1 100644
--- a/mod/file/views/default/file/embed_upload.php
+++ b/mod/file/views/default/file/embed_upload.php
@@ -17,7 +17,7 @@ $(document).ready(function() {
var info = jQuery.parseJSON(data);
if (info.status == 'success') {
- $('.popup .content').load('<?php echo elgg_get_site_url() . 'pg/embed/embed'; ?>?active_section=file');
+ $('.popup .content').load('<?php echo elgg_get_site_url() . 'embed/embed'; ?>?active_section=file');
} else {
$('.popup .content').find('form').prepend('<p>' + info.message + '</p>');
}
diff --git a/mod/file/views/default/file/group_module.php b/mod/file/views/default/file/group_module.php
index c3ca5cf9e..c82e499ec 100644
--- a/mod/file/views/default/file/group_module.php
+++ b/mod/file/views/default/file/group_module.php
@@ -10,7 +10,7 @@ if ($group->file_enable == "no") {
}
$all_link = elgg_view('output/url', array(
- 'href' => "pg/file/group/$group->guid/owner",
+ 'href' => "file/group/$group->guid/owner",
'text' => elgg_echo('link:view:all'),
));
@@ -35,7 +35,7 @@ if (!$content) {
}
$new_link = elgg_view('output/url', array(
- 'href' => "pg/file/add/$group->guid",
+ 'href' => "file/add/$group->guid",
'text' => elgg_echo('file:add'),
));
$content .= "<span class='elgg-widget-more'>$new_link</span>";
diff --git a/mod/file/views/default/object/file.php b/mod/file/views/default/object/file.php
index 75c72e2b5..2c2a5f3af 100644
--- a/mod/file/views/default/object/file.php
+++ b/mod/file/views/default/object/file.php
@@ -22,7 +22,7 @@ $base_type = substr($mime, 0, strpos($mime,'/'));
$body = elgg_view('output/longtext', array('value' => $file->description));
$owner_link = elgg_view('output/url', array(
- 'href' => "pg/file/owner/$owner->username",
+ 'href' => "file/owner/$owner->username",
'text' => $owner->name,
));
$author_text = elgg_echo('byline', array($owner_link));
diff --git a/mod/file/views/default/widgets/filerepo/content.php b/mod/file/views/default/widgets/filerepo/content.php
index d3deece56..4288b9e56 100644
--- a/mod/file/views/default/widgets/filerepo/content.php
+++ b/mod/file/views/default/widgets/filerepo/content.php
@@ -21,7 +21,7 @@ $content = elgg_list_entities($options);
echo $content;
if ($content) {
- $url = "pg/file/owner/" . elgg_get_page_owner_entity()->username;
+ $url = "file/owner/" . elgg_get_page_owner_entity()->username;
$more_link = elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('file:more'),
diff --git a/mod/groups/actions/discussion/delete.php b/mod/groups/actions/discussion/delete.php
index c3de612d7..f307aa091 100644
--- a/mod/groups/actions/discussion/delete.php
+++ b/mod/groups/actions/discussion/delete.php
@@ -26,4 +26,4 @@ if ($result) {
register_error(elgg_echo('discussion:error:notdeleted'));
}
-forward("pg/discussion/owner/$container->guid");
+forward("discussion/owner/$container->guid");
diff --git a/mod/groups/actions/groups/delete.php b/mod/groups/actions/groups/delete.php
index 9ed7954dc..932d03355 100644
--- a/mod/groups/actions/groups/delete.php
+++ b/mod/groups/actions/groups/delete.php
@@ -34,4 +34,4 @@ if (($entity) && ($entity instanceof ElggGroup)) {
}
$url_name = elgg_get_logged_in_user_entity()->username;
-forward(elgg_get_site_url() . "pg/groups/member/{$url_name}");
+forward(elgg_get_site_url() . "groups/member/{$url_name}");
diff --git a/mod/groups/actions/groups/membership/invite.php b/mod/groups/actions/groups/membership/invite.php
index b106e4869..db90ecf3a 100644
--- a/mod/groups/actions/groups/membership/invite.php
+++ b/mod/groups/actions/groups/membership/invite.php
@@ -26,7 +26,7 @@ if (sizeof($user_guid)) {
add_entity_relationship($group->guid, 'invited', $user->guid);
// Send email
- $url = elgg_normalize_url("pg/groups/invitations/$user->username");
+ $url = elgg_normalize_url("groups/invitations/$user->username");
$result = notify_user($user->getGUID(), $group->owner_guid,
elgg_echo('groups:invite:subject', array($user->name, $group->name)),
elgg_echo('groups:invite:body', array(
diff --git a/mod/groups/lib/discussion.php b/mod/groups/lib/discussion.php
index 2a3de783b..fb70d6c00 100644
--- a/mod/groups/lib/discussion.php
+++ b/mod/groups/lib/discussion.php
@@ -95,7 +95,7 @@ function discussion_handle_edit_page($type, $guid) {
$title = elgg_echo('groups:addtopic');
- elgg_push_breadcrumb($group->name, "pg/discussion/owner/$group->guid");
+ elgg_push_breadcrumb($group->name, "discussion/owner/$group->guid");
elgg_push_breadcrumb($title);
$body_vars = discussion_prepare_form_vars();
@@ -114,7 +114,7 @@ function discussion_handle_edit_page($type, $guid) {
$title = elgg_echo('groups:edittopic');
- elgg_push_breadcrumb($group->name, "pg/discussion/owner/$group->guid");
+ elgg_push_breadcrumb($group->name, "discussion/owner/$group->guid");
elgg_push_breadcrumb($topic->title, $topic->getURL());
elgg_push_breadcrumb($title);
@@ -159,7 +159,7 @@ function discussion_handle_view_page($guid) {
group_gatekeeper();
- elgg_push_breadcrumb($group->name, "pg/discussion/owner/$group->guid");
+ elgg_push_breadcrumb($group->name, "discussion/owner/$group->guid");
elgg_push_breadcrumb($topic->title);
$content = elgg_view_entity($topic, true);
diff --git a/mod/groups/lib/groups.php b/mod/groups/lib/groups.php
index d3b8bd26a..dbbaf4366 100644
--- a/mod/groups/lib/groups.php
+++ b/mod/groups/lib/groups.php
@@ -189,7 +189,7 @@ function groups_handle_profile_page($guid) {
$group = get_entity($guid);
if (!$group) {
- forward('pg/groups/all');
+ forward('groups/all');
}
elgg_push_breadcrumb($group->name);
diff --git a/mod/groups/start.php b/mod/groups/start.php
index 9a80fd366..8c3246660 100644
--- a/mod/groups/start.php
+++ b/mod/groups/start.php
@@ -21,7 +21,7 @@ function groups_init() {
elgg_register_entity_type('group', '');
// Set up the menu
- $item = new ElggMenuItem('groups', elgg_echo('groups'), 'pg/groups/all');
+ $item = new ElggMenuItem('groups', elgg_echo('groups'), 'groups/all');
elgg_register_menu_item('site', $item);
// Register a page handler, so we can have nice URLs
@@ -137,16 +137,16 @@ function groups_submenus() {
if (elgg_get_context() == 'groups') {
if ($page_owner instanceof ElggGroup) {
if (elgg_is_logged_in() && $page_owner->canEdit() && !$page_owner->isPublicMembership()) {
- $url = elgg_get_site_url() . "pg/groups/requests/{$page_owner->getGUID()}";
+ $url = elgg_get_site_url() . "groups/requests/{$page_owner->getGUID()}";
add_submenu_item(elgg_echo('groups:membershiprequests'), $url, 'groupsactions1');
}
} else {
- add_submenu_item(elgg_echo('groups:all'), "pg/groups/all", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:all'), "groups/all", 'groupslinks1');
if ($user = elgg_get_logged_in_user_entity()) {
- add_submenu_item(elgg_echo('groups:owned'), "pg/groups/owner/$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');
+ add_submenu_item(elgg_echo('groups:owned'), "groups/owner/$user->username", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:yours'), "groups/member/$user->username", 'groupslinks1');
+ add_submenu_item(elgg_echo('groups:invitations'), "groups/invitations/$user->username", 'groupslinks1');
}
}
}
@@ -156,17 +156,17 @@ function groups_submenus() {
* Groups page handler
*
* URLs take the form of
- * All groups: pg/groups/all
- * User's owned groups: pg/groups/owner/<username>
- * User's member groups: pg/groups/member/<username>
- * Group profile: pg/groups/profile/<guid>/<title>
- * New group: pg/groups/add/<guid>
- * Edit group: pg/groups/edit/<guid>
- * Group invitations: pg/groups/invitations/<username>
- * Invite to group: pg/groups/invite/<guid>
- * Membership requests: pg/groups/requests/<guid>
- * Group activity: pg/groups/activity/<guid>
- * Group members: pg/groups/members/<guid>
+ * All groups: groups/all
+ * User's owned groups: groups/owner/<username>
+ * User's member groups: groups/member/<username>
+ * Group profile: groups/profile/<guid>/<title>
+ * New group: groups/add/<guid>
+ * Edit group: groups/edit/<guid>
+ * Group invitations: groups/invitations/<username>
+ * Invite to group: groups/invite/<guid>
+ * Membership requests: groups/requests/<guid>
+ * Group activity: groups/activity/<guid>
+ * Group members: groups/members/<guid>
*
* @param array $page Array of url segments for routing
*/
@@ -174,7 +174,7 @@ function groups_page_handler($page) {
elgg_load_library('elgg:groups');
- elgg_push_breadcrumb(elgg_echo('groups'), "pg/groups/all");
+ elgg_push_breadcrumb(elgg_echo('groups'), "groups/all");
switch ($page[0]) {
case 'all':
@@ -243,7 +243,7 @@ function groups_icon_handler($page) {
function groups_url($entity) {
$title = elgg_get_friendly_title($entity->name);
- return "pg/groups/profile/{$entity->guid}/$title";
+ return "groups/profile/{$entity->guid}/$title";
}
/**
@@ -258,7 +258,7 @@ function groups_icon_url_override($hook, $type, $returnvalue, $params) {
if (isset($group->icontime)) {
// return thumbnail
$icontime = $group->icontime;
- return "pg/groupicon/$group->guid/$size/$icontime.jpg";
+ return "groupicon/$group->guid/$size/$icontime.jpg";
}
return "mod/groups/graphics/default{$size}.gif";
@@ -270,7 +270,7 @@ function groups_icon_url_override($hook, $type, $returnvalue, $params) {
function groups_activity_owner_block_menu($hook, $type, $return, $params) {
if (elgg_instanceof($params['entity'], 'group')) {
if ($params['entity']->activity_enable != "no") {
- $url = "pg/groups/activity/{$params['entity']->guid}";
+ $url = "groups/activity/{$params['entity']->guid}";
$item = new ElggMenuItem('activity', elgg_echo('groups:activity'), $url);
$return[] = $item;
}
@@ -553,7 +553,7 @@ function activity_profile_menu($hook, $entity_type, $return_value, $params) {
if ($params['owner'] instanceof ElggGroup) {
$return_value[] = array(
'text' => elgg_echo('Activity'),
- 'href' => "pg/groups/activity/{$params['owner']->getGUID()}"
+ 'href' => "groups/activity/{$params['owner']->getGUID()}"
);
}
return $return_value;
@@ -629,11 +629,11 @@ function discussion_init() {
* Discussion page handler
*
* URLs take the form of
- * All topics in site: pg/discussion/all
- * List topics in forum: pg/discussion/owner/<guid>
- * View discussion topic: pg/discussion/view/<guid>
- * Add discussion topic: pg/discussion/add/<guid>
- * Edit discussion topic: pg/discussion/edit/<guid>
+ * All topics in site: discussion/all
+ * List topics in forum: discussion/owner/<guid>
+ * View discussion topic: discussion/view/<guid>
+ * Add discussion topic: discussion/add/<guid>
+ * Edit discussion topic: discussion/edit/<guid>
*
* @param array $page Array of url segments for routing
*/
@@ -641,7 +641,7 @@ function discussion_page_handler($page) {
elgg_load_library('elgg:discussion');
- elgg_push_breadcrumb(elgg_echo('discussion'), 'pg/discussion/all');
+ elgg_push_breadcrumb(elgg_echo('discussion'), 'discussion/all');
switch ($page[0]) {
case 'all':
@@ -669,7 +669,7 @@ function discussion_page_handler($page) {
* @return string
*/
function discussion_override_topic_url($entity) {
- return 'pg/discussion/view/' . $entity->guid;
+ return 'discussion/view/' . $entity->guid;
}
/**
@@ -687,7 +687,7 @@ function discussion_comment_override($hook, $type, $return, $params) {
function discussion_owner_block_menu($hook, $type, $return, $params) {
if (elgg_instanceof($params['entity'], 'group')) {
if ($params['entity']->forum_enable != "no") {
- $url = "pg/discussion/owner/{$params['entity']->guid}";
+ $url = "discussion/owner/{$params['entity']->guid}";
$item = new ElggMenuItem('discussion', elgg_echo('discussion:group'), $url);
$return[] = $item;
}
diff --git a/mod/groups/views/default/discussion/group_module.php b/mod/groups/views/default/discussion/group_module.php
index b606579cb..cbefe8e7c 100644
--- a/mod/groups/views/default/discussion/group_module.php
+++ b/mod/groups/views/default/discussion/group_module.php
@@ -13,7 +13,7 @@ $group = $vars['entity'];
$all_link = elgg_view('output/url', array(
- 'href' => "pg/discussion/owner/$group->guid",
+ 'href' => "discussion/owner/$group->guid",
'text' => elgg_echo('link:view:all'),
));
@@ -38,7 +38,7 @@ if (!$content) {
}
$new_link = elgg_view('output/url', array(
- 'href' => "pg/discussion/add/" . $group->getGUID(),
+ 'href' => "discussion/add/" . $group->getGUID(),
'text' => elgg_echo('groups:addtopic'),
));
$content .= "<span class='elgg-widget-more'>$new_link</span>";
diff --git a/mod/groups/views/default/groups/group_sort_menu.php b/mod/groups/views/default/groups/group_sort_menu.php
index 2ba0e5f0e..863515a85 100644
--- a/mod/groups/views/default/groups/group_sort_menu.php
+++ b/mod/groups/views/default/groups/group_sort_menu.php
@@ -9,7 +9,7 @@ $group_count = (int)elgg_get_entities(array('types' => 'group', 'count' => true)
$selected = elgg_extract('selected', $vars);
-$url = elgg_get_site_url() . "pg/groups/all/";
+$url = elgg_get_site_url() . "groups/all";
?>
<div class="elgg-tabs mtm">
diff --git a/mod/groups/views/default/groups/profile/activity_module.php b/mod/groups/views/default/groups/profile/activity_module.php
index 9955b598f..4ea97cad6 100644
--- a/mod/groups/views/default/groups/profile/activity_module.php
+++ b/mod/groups/views/default/groups/profile/activity_module.php
@@ -17,7 +17,7 @@ if (!$group) {
}
$all_link = elgg_view('output/url', array(
- 'href' => "pg/groups/activity/$group->guid",
+ 'href' => "groups/activity/$group->guid",
'text' => elgg_echo('link:view:all'),
));
diff --git a/mod/groups/views/default/groups/profile/buttons.php b/mod/groups/views/default/groups/profile/buttons.php
index 836dd2982..55e99f59c 100644
--- a/mod/groups/views/default/groups/profile/buttons.php
+++ b/mod/groups/views/default/groups/profile/buttons.php
@@ -17,9 +17,9 @@ $actions = array();
// group owners
if ($vars['entity']->canEdit()) {
// edit and invite
- $url = elgg_get_site_url() . "pg/groups/edit/{$vars['entity']->getGUID()}";
+ $url = elgg_get_site_url() . "groups/edit/{$vars['entity']->getGUID()}";
$actions[$url] = elgg_echo('groups:edit');
- $url = elgg_get_site_url() . "pg/groups/invite/{$vars['entity']->getGUID()}";
+ $url = elgg_get_site_url() . "groups/invite/{$vars['entity']->getGUID()}";
$actions[$url] = elgg_echo('groups:invite');
}
diff --git a/mod/groups/views/default/groups/side_menu.php b/mod/groups/views/default/groups/side_menu.php
index df2314689..88a56830b 100644
--- a/mod/groups/views/default/groups/side_menu.php
+++ b/mod/groups/views/default/groups/side_menu.php
@@ -6,8 +6,8 @@
<ul class="submenu page_navigation">
<?php
if(elgg_is_logged_in()){
- echo "<li><a href=\"".elgg_get_site_url()."pg/groups/member/{elgg_get_logged_in_user_entity()->username}\">". elgg_echo('groups:yours') ."</a></li>";
- echo "<li><a href=\"".elgg_get_site_url()."pg/groups/invitations/{elgg_get_logged_in_user_entity()->username}\">". elgg_echo('groups:invitations') ."</a></li>";
+ echo "<li><a href=\"".elgg_get_site_url()."groups/member/{elgg_get_logged_in_user_entity()->username}\">". elgg_echo('groups:yours') ."</a></li>";
+ echo "<li><a href=\"".elgg_get_site_url()."groups/invitations/{elgg_get_logged_in_user_entity()->username}\">". elgg_echo('groups:invitations') ."</a></li>";
}
?>
</ul> \ No newline at end of file
diff --git a/mod/groups/views/default/groups/sidebar/find.php b/mod/groups/views/default/groups/sidebar/find.php
index 0d31ee711..181f437e3 100644
--- a/mod/groups/views/default/groups/sidebar/find.php
+++ b/mod/groups/views/default/groups/sidebar/find.php
@@ -4,7 +4,7 @@
*
* @package ElggGroups
*/
-$url = elgg_get_site_url() . 'pg/groups/world';
+$url = elgg_get_site_url() . 'groups/world';
$body = elgg_view_form('groups/search', array('action' => $url, 'method' => 'get'));
echo elgg_view_module('aside', elgg_echo('groups:searchtag'), $body);
diff --git a/mod/groups/views/default/groups/sidebar/members.php b/mod/groups/views/default/groups/sidebar/members.php
index 4fbb54456..c18366c1b 100644
--- a/mod/groups/views/default/groups/sidebar/members.php
+++ b/mod/groups/views/default/groups/sidebar/members.php
@@ -8,7 +8,7 @@
*/
$all_link = elgg_view('output/url', array(
- 'href' => 'pg/groups/members/' . $vars['entity']->guid,
+ 'href' => 'groups/members/' . $vars['entity']->guid,
'text' => elgg_echo('groups:members:more'),
));
@@ -20,4 +20,4 @@ foreach ($members as $mem) {
$body .= '</ul>';
$body .= "<div class='center mts'>$all_link</div>";
-echo elgg_view_module('aside', elgg_echo('groups:members'), $body); \ No newline at end of file
+echo elgg_view_module('aside', elgg_echo('groups:members'), $body);
diff --git a/mod/groups/views/default/widgets/a_users_groups/content.php b/mod/groups/views/default/widgets/a_users_groups/content.php
index c15e4507e..81d355442 100644
--- a/mod/groups/views/default/widgets/a_users_groups/content.php
+++ b/mod/groups/views/default/widgets/a_users_groups/content.php
@@ -21,7 +21,7 @@ $content = elgg_list_entities_from_relationship($options);
echo $content;
if ($content) {
- $url = "pg/group/member/" . elgg_get_page_owner_entity()->username;
+ $url = "group/member/" . elgg_get_page_owner_entity()->username;
$more_link = elgg_view('output/url', array(
'href' => $url,
'text' => elgg_echo('groups:more'),
diff --git a/mod/invitefriends/actions/invite.php b/mod/invitefriends/actions/invite.php
index 1a8956419..d9b6db792 100644
--- a/mod/invitefriends/actions/invite.php
+++ b/mod/invitefriends/actions/invite.php
@@ -47,7 +47,7 @@ foreach ($emails as $email) {
continue;
}
- $link = elgg_get_site_url() . 'pg/register?friend_guid=' . $current_user->guid . '&invitecode=' . generate_invite_code($current_user->username);
+ $link = elgg_get_site_url() . 'register?friend_guid=' . $current_user->guid . '&invitecode=' . generate_invite_code($current_user->username);
$message = elgg_echo('invitefriends:email', array(
$site->name,
$current_user->name,
diff --git a/mod/invitefriends/start.php b/mod/invitefriends/start.php
index 123ab7364..8f71314b3 100644
--- a/mod/invitefriends/start.php
+++ b/mod/invitefriends/start.php
@@ -15,7 +15,7 @@ function invitefriends_init() {
$params = array(
'name' => 'invite',
'text' => elgg_echo('friends:invite'),
- 'href' => "pg/invite/",
+ 'href' => "invite",
'contexts' => array('friends'),
);
elgg_register_menu_item('page', $params);
diff --git a/mod/logbrowser/start.php b/mod/logbrowser/start.php
index 2bbd08980..5b4e0541e 100644
--- a/mod/logbrowser/start.php
+++ b/mod/logbrowser/start.php
@@ -23,7 +23,7 @@ function logbrowser_init() {
function logbrowser_user_hover_menu($hook, $type, $return, $params) {
$user = $params['entity'];
- $url = "pg/admin/overview/logbrowser/?user_guid={$user->guid}";
+ $url = "admin/overview/logbrowser?user_guid={$user->guid}";
$item = new ElggMenuItem('logbrowser', elgg_echo('logbrowser:explore'), $url);
$item->setSection('admin');
$return[] = $item;
diff --git a/mod/logbrowser/views/default/logbrowser/form.php b/mod/logbrowser/views/default/logbrowser/form.php
index e7c2257ce..b09fd79dd 100644
--- a/mod/logbrowser/views/default/logbrowser/form.php
+++ b/mod/logbrowser/views/default/logbrowser/form.php
@@ -54,7 +54,7 @@
$wrappedform = elgg_view('input/form', array(
'body' => $form,
'method' => 'get',
- 'action' => "pg/admin/overview/logbrowser/",
+ 'action' => "admin/overview/logbrowser",
'disable_security' => true,
));
?>
@@ -68,6 +68,7 @@
</div>
</div>
<p>
+ <?php //@todo JS 1.8: no ?>
<a class="link" href="#" onclick="elgg_slide_toggle(this,'#logbrowser-search-area','#log-browser-search-form');">
<?php echo elgg_echo('logbrowser:search'); ?>
</a>
diff --git a/mod/logbrowser/views/default/logbrowser/table.php b/mod/logbrowser/views/default/logbrowser/table.php
index 5db495fae..8b3ed5901 100644
--- a/mod/logbrowser/views/default/logbrowser/table.php
+++ b/mod/logbrowser/views/default/logbrowser/table.php
@@ -27,7 +27,7 @@ $log_entries = $vars['log_entries'];
'text' => $user->name
));
$user_guid_link = elgg_view('output/url', array(
- 'href' => elgg_get_site_url() . "pg/admin/overview/logbrowser/?user_guid=$user->guid",
+ 'href' => "admin/overview/logbrowser?user_guid=$user->guid",
'text' => $user->getGUID()
));
} else {
diff --git a/mod/messageboard/pages/owner.php b/mod/messageboard/pages/owner.php
index 7a65ec68b..7fd88a9d4 100644
--- a/mod/messageboard/pages/owner.php
+++ b/mod/messageboard/pages/owner.php
@@ -24,9 +24,9 @@ if ($history_user) {
$title = elgg_echo('messageboard:owner_history', array($history_user->name, $page_owner->name));
if ($page_owner instanceof ElggGroup) {
- $mb_url = "pg/messageboard/group/$page_owner->guid/owner";
+ $mb_url = "messageboard/group/$page_owner->guid/owner";
} else {
- $mb_url = "pg/messageboard/owner/$page_owner->username";
+ $mb_url = "messageboard/owner/$page_owner->username";
}
} else {
$title = elgg_echo('messageboard:owner', array($page_owner->name));
diff --git a/mod/messageboard/start.php b/mod/messageboard/start.php
index f8dcd8266..349885429 100644
--- a/mod/messageboard/start.php
+++ b/mod/messageboard/start.php
@@ -33,10 +33,10 @@ function messageboard_init() {
* Profile (and eventually group) widgets handle their own.
*
* URLs take the form of
- * User's messageboard: pg/messageboard/owner/<username>
- * Y's history of posts on X's board: pg/messageboard/owner/<X>/history/<Y>
- * New post: pg/messageboard/add/<guid> (container: user or group)
- * Group messageboard: pg/messageboard/group/<guid>/owner
+ * User's messageboard: messageboard/owner/<username>
+ * Y's history of posts on X's board: messageboard/owner/<X>/history/<Y>
+ * New post: messageboard/add/<guid> (container: user or group)
+ * Group messageboard: messageboard/group/<guid>/owner
*
* @param array $page Array of page elements
* @return bool
@@ -47,7 +47,7 @@ function messageboard_page_handler($page) {
// if the first part is a username, forward to new format
if (isset($page[0]) && !in_array($page[0], $new_section_one) && get_user_by_username($page[0])) {
register_error(elgg_echo("changebookmark"));
- $url = "pg/messageboard/owner/{$page[0]}";
+ $url = "messageboard/owner/{$page[0]}";
forward($url);
}
@@ -119,7 +119,7 @@ function messageboard_add($poster, $owner, $message, $access_id = ACCESS_PUBLIC)
$body = elgg_echo('messageboard:email:body', array(
$poster->name,
$message,
- elgg_get_site_url() . "pg/messageboard/" . $owner->username,
+ elgg_get_site_url() . "messageboard/" . $owner->username,
$poster->name,
$poster->getURL()
));
diff --git a/mod/messageboard/views/default/widgets/messageboard/content.php b/mod/messageboard/views/default/widgets/messageboard/content.php
index 04dbb00d2..55b12f29b 100644
--- a/mod/messageboard/views/default/widgets/messageboard/content.php
+++ b/mod/messageboard/views/default/widgets/messageboard/content.php
@@ -23,9 +23,9 @@ $options = array(
echo elgg_list_annotations($options);
if ($owner instanceof ElggGroup) {
- $url = "pg/messageboard/group/$owner->guid/owner";
+ $url = "messageboard/group/$owner->guid/owner";
} else {
- $url = "pg/messageboard/owner/$owner->username";
+ $url = "messageboard/owner/$owner->username";
}
echo elgg_view('output/url', array(
diff --git a/mod/messages/actions/messages/send.php b/mod/messages/actions/messages/send.php
index a643b44b4..9d9f6c8b7 100644
--- a/mod/messages/actions/messages/send.php
+++ b/mod/messages/actions/messages/send.php
@@ -15,19 +15,19 @@ elgg_make_sticky_form('messages');
if (!$recipient_guid) {
register_error(elgg_echo("messages:user:blank"));
- forward("pg/messages/compose");
+ forward("messages/compose");
}
$user = get_user($recipient_guid);
if (!$user) {
register_error(elgg_echo("messages:user:nonexist"));
- forward("pg/messages/compose");
+ forward("messages/compose");
}
// Make sure the message field, send to field and title are not blank
if (!$body || !$subject) {
register_error(elgg_echo("messages:blank"));
- forward("pg/messages/compose");
+ forward("messages/compose");
}
// Otherwise, 'send' the message
@@ -36,11 +36,11 @@ $result = messages_send($subject, $body, $recipient_guid, 0, $reply);
// Save 'send' the message
if (!$result) {
register_error(elgg_echo("messages:error"));
- forward("pg/messages/compose");
+ forward("messages/compose");
}
elgg_clear_sticky_form('messages');
system_message(elgg_echo("messages:posted"));
-forward('pg/messages/inbox/' . elgg_get_logged_in_user_entity()->username);
+forward('messages/inbox/' . elgg_get_logged_in_user_entity()->username);
diff --git a/mod/messages/read.php b/mod/messages/read.php
index 47d9b45dc..c5d1d4941 100644
--- a/mod/messages/read.php
+++ b/mod/messages/read.php
@@ -20,9 +20,9 @@ $title = $message->title;
$inbox = false;
if ($page_owner->getGUID() == $message->toId) {
$inbox = true;
- elgg_push_breadcrumb(elgg_echo('messages:inbox'), 'pg/messages/inbox/' . $page_owner->username);
+ elgg_push_breadcrumb(elgg_echo('messages:inbox'), 'messages/inbox/' . $page_owner->username);
} else {
- elgg_push_breadcrumb(elgg_echo('messages:sent'), 'pg/messages/sent/' . $page_owner->username);
+ elgg_push_breadcrumb(elgg_echo('messages:sent'), 'messages/sent/' . $page_owner->username);
}
elgg_push_breadcrumb($title);
diff --git a/mod/messages/start.php b/mod/messages/start.php
index 76acb36a9..3e57eda79 100644
--- a/mod/messages/start.php
+++ b/mod/messages/start.php
@@ -19,14 +19,14 @@ function messages_init() {
elgg_register_menu_item('page', array(
'name' => 'messages:inbox',
'text' => elgg_echo('messages:inbox'),
- 'href' => "pg/messages/inbox/" . elgg_get_logged_in_user_entity()->username,
+ 'href' => "messages/inbox/" . elgg_get_logged_in_user_entity()->username,
'context' => 'messages',
));
elgg_register_menu_item('page', array(
'name' => 'messages:sentmessages',
'text' => elgg_echo('messages:sentmessages'),
- 'href' => "pg/messages/sent/" . elgg_get_logged_in_user_entity()->username,
+ 'href' => "messages/sent/" . elgg_get_logged_in_user_entity()->username,
'context' => 'messages',
));
@@ -41,7 +41,7 @@ function messages_init() {
elgg_register_menu_item('topbar', array(
'name' => 'messages',
- 'href' => 'pg/messages/inbox/' . elgg_get_logged_in_user_entity()->username,
+ 'href' => 'messages/inbox/' . elgg_get_logged_in_user_entity()->username,
'text' => $text,
'priority' => 600,
));
@@ -89,13 +89,13 @@ function messages_page_handler($page) {
elgg_load_library('elgg:messages');
- elgg_push_breadcrumb(elgg_echo('messages'), 'pg/messages/inbox/' . elgg_get_logged_in_user_entity()->username);
+ elgg_push_breadcrumb(elgg_echo('messages'), 'messages/inbox/' . elgg_get_logged_in_user_entity()->username);
if (!isset($page[0])) {
$page[0] = 'inbox';
}
- // supporting the old inbox url /pg/messages/<username>
+ // supporting the old inbox url /messages/<username>
$user = get_user_by_username($page[0]);
if ($user) {
$page[1] = $page[0];
@@ -281,9 +281,9 @@ function messages_send($subject, $body, $send_to, $from = 0, $reply = 0, $notify
$body = elgg_echo('messages:email:body', array(
elgg_get_logged_in_user_entity()->name,
$message_contents,
- elgg_get_site_url() . "pg/messages/inbox/" . $user->username,
+ elgg_get_site_url() . "messages/inbox/" . $user->username,
elgg_get_logged_in_user_entity()->name,
- elgg_get_site_url() . "pg/messages/compose?send_to=" . elgg_get_logged_in_user_guid()
+ elgg_get_site_url() . "messages/compose?send_to=" . elgg_get_logged_in_user_guid()
));
notify_user($send_to, elgg_get_logged_in_user_guid(), $subject, $body);
@@ -300,7 +300,7 @@ function messages_send($subject, $body, $send_to, $from = 0, $reply = 0, $notify
* @return string
*/
function messages_url($message) {
- $url = elgg_get_site_url() . 'pg/messages/read/' . $message->getGUID();
+ $url = elgg_get_site_url() . 'messages/read/' . $message->getGUID();
return $url;
}
@@ -363,7 +363,7 @@ function messages_user_hover_menu($hook, $type, $return, $params) {
$user = $params['entity'];
if (elgg_is_logged_in() && elgg_get_logged_in_user_guid() != $user->guid) {
- $url = "pg/messages/compose?send_to={$user->guid}";
+ $url = "messages/compose?send_to={$user->guid}";
$item = new ElggMenuItem('send', elgg_echo('messages:sendmessage'), $url);
$item->setSection('action');
$return[] = $item;
diff --git a/mod/messages/views/default/object/messages.php b/mod/messages/views/default/object/messages.php
index 1c97c8e36..196d8a3ad 100644
--- a/mod/messages/views/default/object/messages.php
+++ b/mod/messages/views/default/object/messages.php
@@ -21,7 +21,7 @@ if ($message->toId == elgg_get_page_owner_guid()) {
$user = get_entity($message->fromId);
$icon = elgg_view_entity_icon($user, 'tiny');
$user_link = elgg_view('output/url', array(
- 'href' => "pg/messages/compose?send_to=$user->guid",
+ 'href' => "messages/compose?send_to=$user->guid",
'text' => $user->name,
));
@@ -36,7 +36,7 @@ if ($message->toId == elgg_get_page_owner_guid()) {
$user = get_entity($message->toId);
$icon = elgg_view_entity_icon($user, 'tiny');
$user_link = elgg_view('output/url', array(
- 'href' => "pg/messages/compose?send_to=$user->guid",
+ 'href' => "messages/compose?send_to=$user->guid",
'text' => elgg_echo('messages:to_user', array($user->name)),
));
diff --git a/mod/notifications/start.php b/mod/notifications/start.php
index b8c2aae1d..0f1e11a57 100644
--- a/mod/notifications/start.php
+++ b/mod/notifications/start.php
@@ -70,7 +70,7 @@ function notifications_plugin_pagesetup() {
$params = array(
'name' => '2_a_user_notify',
'text' => elgg_echo('notifications:subscriptions:changesettings'),
- 'href' => "pg/notifications/personal",
+ 'href' => "notifications/personal",
);
elgg_register_menu_item('page', $params);
@@ -78,7 +78,7 @@ function notifications_plugin_pagesetup() {
$params = array(
'name' => '2_group_notify',
'text' => elgg_echo('notifications:subscriptions:changesettings:groups'),
- 'href' => "pg/notifications/group",
+ 'href' => "notifications/group",
);
elgg_register_menu_item('page', $params);
}
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'),
diff --git a/mod/profile/start.php b/mod/profile/start.php
index 8ef304cc2..9f4e37b6d 100644
--- a/mod/profile/start.php
+++ b/mod/profile/start.php
@@ -88,7 +88,7 @@ function profile_page_handler($page) {
* @return string User URL
*/
function profile_url($user) {
- return elgg_get_site_url() . "pg/profile/" . $user->username;
+ return elgg_get_site_url() . "profile/" . $user->username;
}
/**
diff --git a/mod/reportedcontent/start.php b/mod/reportedcontent/start.php
index e42d86cf8..a7e3afe19 100644
--- a/mod/reportedcontent/start.php
+++ b/mod/reportedcontent/start.php
@@ -21,7 +21,7 @@ function reportedcontent_init() {
// Extend footer with report content link
if (elgg_is_logged_in()) {
- $href = "javascript:elgg.forward('pg/reportedcontent/add'";
+ $href = "javascript:elgg.forward('reportedcontent/add'";
$href .= "+'?address='+encodeURIComponent(location.href)";
$href .= "+'&title='+encodeURIComponent(document.title));";
@@ -84,7 +84,7 @@ function reportedcontent_user_hover_menu($hook, $type, $return, $params) {
$profile_url = urlencode($user->getURL());
$name = urlencode($user->name);
- $url = "pg/reportedcontent/add/?address=$profile_url&title=$name";
+ $url = "reportedcontent/add?address=$profile_url&title=$name";
if (elgg_is_logged_in() && elgg_get_logged_in_user_guid() != $user->guid) {
$item = new ElggMenuItem(
diff --git a/mod/search/index.php b/mod/search/index.php
index c51b0fe0d..4da6f95ef 100644
--- a/mod/search/index.php
+++ b/mod/search/index.php
@@ -75,7 +75,7 @@ $data = htmlspecialchars(http_build_query(array(
'search_type' => 'all',
//'friends' => $friends
)));
-$url = elgg_get_site_url() . "pg/search/?$data";
+$url = elgg_get_site_url() . "search?$data";
$menu_item = new ElggMenuItem('all', elgg_echo('all'), $url);
elgg_register_menu_item('page', $menu_item);
@@ -94,7 +94,7 @@ foreach ($types as $type => $subtypes) {
'friends' => $friends
)));
- $url = elgg_get_site_url()."pg/search/?$data";
+ $url = elgg_get_site_url()."search?$data";
$menu_item = new ElggMenuItem($label, elgg_echo($label), $url);
elgg_register_menu_item('page', $menu_item);
}
@@ -109,7 +109,7 @@ foreach ($types as $type => $subtypes) {
'friends' => $friends
)));
- $url = elgg_get_site_url() . "pg/search/?$data";
+ $url = elgg_get_site_url() . "search?$data";
$menu_item = new ElggMenuItem($label, elgg_echo($label), $url);
elgg_register_menu_item('page', $menu_item);
@@ -129,7 +129,7 @@ foreach ($custom_types as $type) {
'friends' => $friends
)));
- $url = elgg_get_site_url()."pg/search/?$data";
+ $url = elgg_get_site_url()."search?$data";
$menu_item = new ElggMenuItem($label, elgg_echo($label), $url);
elgg_register_menu_item('page', $menu_item);
diff --git a/mod/search/views/default/search/list.php b/mod/search/views/default/search/list.php
index c2cee5ff9..c5afaaa86 100644
--- a/mod/search/views/default/search/list.php
+++ b/mod/search/views/default/search/list.php
@@ -34,7 +34,7 @@ $query = http_build_query(
)
);
-$url = elgg_get_site_url() . "pg/search?$query";
+$url = elgg_get_site_url() . "search?$query";
// get pagination
if (array_key_exists('pagination', $vars) && $vars['pagination']) {
diff --git a/mod/search/views/default/search/search_box.php b/mod/search/views/default/search/search_box.php
index 9de861179..7561a3767 100644
--- a/mod/search/views/default/search/search_box.php
+++ b/mod/search/views/default/search/search_box.php
@@ -19,7 +19,7 @@ $value = stripslashes($value);
?>
-<form class="elgg-search" action="<?php echo elgg_get_site_url(); ?>pg/search/" method="get">
+<form class="elgg-search" action="<?php echo elgg_get_site_url(); ?>search" method="get">
<fieldset>
<input type="text" size="21" name="q" value="<?php echo elgg_echo('search'); ?>" onblur="if (this.value=='') { this.value='<?php echo elgg_echo('search'); ?>' }" onfocus="if (this.value=='<?php echo elgg_echo('search'); ?>') { this.value='' };" class="search-input" />
<input type="submit" value="<?php echo elgg_echo('search:go'); ?>" class="search-submit-button" />
diff --git a/mod/thewire/actions/add.php b/mod/thewire/actions/add.php
index f32f7e555..33936d5ee 100644
--- a/mod/thewire/actions/add.php
+++ b/mod/thewire/actions/add.php
@@ -26,7 +26,7 @@ if (!$guid) {
if ($parent_guid) {
thewire_send_response_notification($guid, $parent_guid, $user);
$parent = get_entity($parent_guid);
- forward("pg/thewire/thread/$parent->wire_thread");
+ forward("thewire/thread/$parent->wire_thread");
}
system_message(elgg_echo("thewire:posted"));
diff --git a/mod/thewire/actions/delete.php b/mod/thewire/actions/delete.php
index 7758b4b03..9d629325a 100644
--- a/mod/thewire/actions/delete.php
+++ b/mod/thewire/actions/delete.php
@@ -35,5 +35,5 @@ if ($thewire->getSubtype() == "thewire" && $thewire->canEdit()) {
register_error(elgg_echo("thewire:notdeleted"));
}
- forward("pg/thewire/owner/" . $owner->username);
+ forward("thewire/owner/" . $owner->username);
}
diff --git a/mod/thewire/pages/friends.php b/mod/thewire/pages/friends.php
index 239359ec2..6e8642544 100644
--- a/mod/thewire/pages/friends.php
+++ b/mod/thewire/pages/friends.php
@@ -7,8 +7,8 @@ $owner = elgg_get_page_owner_entity();
$title = elgg_echo('thewire:friends');
-elgg_push_breadcrumb(elgg_echo('thewire'), "pg/thewire/all/");
-elgg_push_breadcrumb($owner->name, "pg/thewire/owner/$owner->username");
+elgg_push_breadcrumb(elgg_echo('thewire'), "thewire/all");
+elgg_push_breadcrumb($owner->name, "thewire/owner/$owner->username");
elgg_push_breadcrumb(elgg_echo('friends'));
$content = list_user_friends_objects($owner->guid, 'thewire', 15, false);
diff --git a/mod/thewire/pages/reply.php b/mod/thewire/pages/reply.php
index e349761f2..c29f81669 100644
--- a/mod/thewire/pages/reply.php
+++ b/mod/thewire/pages/reply.php
@@ -10,7 +10,7 @@ $post = get_entity(get_input('guid'));
$title = elgg_echo('thewire:reply');
-elgg_push_breadcrumb(elgg_echo('thewire'), 'pg/thewire/all');
+elgg_push_breadcrumb(elgg_echo('thewire'), 'thewire/all');
elgg_push_breadcrumb($title);
$content = elgg_view('thewire/reply', array('post' => $post));
diff --git a/mod/thewire/pages/tag.php b/mod/thewire/pages/tag.php
index 7e62a33de..53f9e9db9 100644
--- a/mod/thewire/pages/tag.php
+++ b/mod/thewire/pages/tag.php
@@ -5,10 +5,10 @@
$tag = get_input('tag');
if (!$tag) {
- forward('pg/thewire/all');
+ forward('thewire/all');
}
-elgg_push_breadcrumb(elgg_echo('thewire'), 'pg/thewire/all');
+elgg_push_breadcrumb(elgg_echo('thewire'), 'thewire/all');
elgg_push_breadcrumb('#' . $tag);
// remove # from tag
diff --git a/mod/thewire/pages/thread.php b/mod/thewire/pages/thread.php
index 49ca3afd1..8b6ee4bd0 100644
--- a/mod/thewire/pages/thread.php
+++ b/mod/thewire/pages/thread.php
@@ -7,7 +7,7 @@ $thread_id = get_input('thread_id');
$title = elgg_echo('thewire:thread');
-elgg_push_breadcrumb(elgg_echo('thewire'), 'pg/thewire/all');
+elgg_push_breadcrumb(elgg_echo('thewire'), 'thewire/all');
elgg_push_breadcrumb($title);
$content = elgg_list_entities_from_metadata(array(
diff --git a/mod/thewire/pages/user.php b/mod/thewire/pages/user.php
index cc966697f..5645b23ba 100644
--- a/mod/thewire/pages/user.php
+++ b/mod/thewire/pages/user.php
@@ -8,7 +8,7 @@ $owner = elgg_get_page_owner_entity();
$title = elgg_echo('thewire:user', array($owner->name));
-elgg_push_breadcrumb(elgg_echo('thewire'), "pg/thewire/all/");
+elgg_push_breadcrumb(elgg_echo('thewire'), "thewire/all");
elgg_push_breadcrumb($owner->name);
if (get_loggedin_userid() == $owner->guid) {
diff --git a/mod/thewire/start.php b/mod/thewire/start.php
index a9a576904..1724a33a9 100644
--- a/mod/thewire/start.php
+++ b/mod/thewire/start.php
@@ -22,7 +22,7 @@ function thewire_init() {
}
// add a site navigation item
- $item = new ElggMenuItem('thewire', elgg_echo('thewire'), 'pg/thewire/all');
+ $item = new ElggMenuItem('thewire', elgg_echo('thewire'), 'thewire/all');
elgg_register_menu_item('site', $item);
// remove entity menu items edit and access because they don't apply here.
@@ -66,19 +66,19 @@ function thewire_init() {
* The wire page handler
*
* Supports:
- * pg/thewire/all View site wire posts
- * pg/thewire/owner/<username> View this user's wire posts
- * pg/thewire/following/<username> View the posts of those this user follows
- * pg/thewire/reply/<guid> Reply to a post
- * pg/thewire/view/<guid> View a conversation thread
- * pg/thewire/tag/<tag> View wire posts tagged with <tag>
+ * thewire/all View site wire posts
+ * thewire/owner/<username> View this user's wire posts
+ * thewire/following/<username> View the posts of those this user follows
+ * thewire/reply/<guid> Reply to a post
+ * thewire/view/<guid> View a conversation thread
+ * thewire/tag/<tag> View wire posts tagged with <tag>
*
* @param array $page From the page_handler function
* @return true|false Depending on success
*/
function thewire_page_handler($page) {
- // if just pg/thewire/ go to global view in the else statement
+ // if just /thewire go to global view in the else statement
if (isset($page[0]) && $page[0]) {
switch ($page[0]) {
@@ -133,7 +133,7 @@ function thewire_page_handler($page) {
*/
function thewire_url($thewirepost) {
global $CONFIG;
- return $CONFIG->url . "pg/thewire/view/" . $thewirepost->guid;
+ return $CONFIG->url . "thewire/view/" . $thewirepost->guid;
}
/**
@@ -163,7 +163,7 @@ function thewire_notify_message($hook, $entity_type, $returnvalue, $params) {
$body = sprintf(elgg_echo('thewire:notify:post'), $owner->name);
}
$body .= "\n\n" . $descr . "\n\n";
- $body .= elgg_echo('thewire') . ": {$CONFIG->url}pg/thewire/";
+ $body .= elgg_echo('thewire') . ": {$CONFIG->url}thewire";
return $body;
}
return $returnvalue;
@@ -206,13 +206,13 @@ function thewire_filter($text) {
// usernames
$text = preg_replace(
'/(^|[^\w])@([\w]+)/',
- '$1<a href="' . $CONFIG->wwwroot . 'pg/thewire/owner/$2">@$2</a>',
+ '$1<a href="' . $CONFIG->wwwroot . 'thewire/owner/$2">@$2</a>',
$text);
// hashtags
$text = preg_replace(
'/(^|[^\w])#(\w*[^\s\d!-\/:-@]+\w*)/',
- '$1<a href="' . $CONFIG->wwwroot . 'pg/thewire/tag/$2">#$2</a>',
+ '$1<a href="' . $CONFIG->wwwroot . 'thewire/tag/$2">#$2</a>',
$text);
$text = trim($text);
diff --git a/mod/thewire/tests/regex.php b/mod/thewire/tests/regex.php
index 5b53c69d6..a1a432a20 100644
--- a/mod/thewire/tests/regex.php
+++ b/mod/thewire/tests/regex.php
@@ -39,13 +39,13 @@ class TheWireRegexTest extends ElggCoreUnitTest {
}
protected function getUserWireLink($username) {
- $url = "pg/thewire/owner/$username";
+ $url = "thewire/owner/$username";
$url = elgg_normalize_url($url);
return "<a href=\"$url\">@$username</a>";
}
protected function getHashtagLink($tag) {
- $url = "pg/thewire/tag/$tag";
+ $url = "thewire/tag/$tag";
$url = elgg_normalize_url($url);
return "<a href=\"$url\">#$tag</a>";
}
diff --git a/mod/thewire/views/default/object/thewire.php b/mod/thewire/views/default/object/thewire.php
index b784c5c08..dcc5e925a 100644
--- a/mod/thewire/views/default/object/thewire.php
+++ b/mod/thewire/views/default/object/thewire.php
@@ -23,7 +23,7 @@ $owner = $post->getOwnerEntity();
$owner_icon = elgg_view_entity_icon($owner, 'tiny');
$owner_link = elgg_view('output/url', array(
- 'href' => "pg/thewire/owner/$owner->username",
+ 'href' => "thewire/owner/$owner->username",
'text' => $owner->name,
));
$author_text = elgg_echo('byline', array($owner_link));
diff --git a/mod/thewire/views/default/thewire/profile_status.php b/mod/thewire/views/default/thewire/profile_status.php
index cdf1e9409..7b04cba50 100644
--- a/mod/thewire/views/default/thewire/profile_status.php
+++ b/mod/thewire/views/default/thewire/profile_status.php
@@ -23,7 +23,7 @@ if ($latest_wire && count($latest_wire) > 0) {
$button = '';
if ($owner == elgg_get_logged_in_user_guid()) {
- $url_to_wire = "pg/thewire/owner/" . $vars['entity']->username;
+ $url_to_wire = "thewire/owner/" . $vars['entity']->username;
$button = elgg_view('output/url', array(
'text' => elgg_echo('thewire:update'),
'href' => $url_to_wire,
diff --git a/mod/thewire/views/default/widgets/thewire/content.php b/mod/thewire/views/default/widgets/thewire/content.php
index a8471a4b1..835a328b0 100644
--- a/mod/thewire/views/default/widgets/thewire/content.php
+++ b/mod/thewire/views/default/widgets/thewire/content.php
@@ -18,7 +18,7 @@ $content = elgg_list_entities($options);
echo $content;
if ($content) {
- $owner_url = "pg/thewire/owner/" . elgg_get_page_owner_entity()->username;
+ $owner_url = "thewire/owner/" . elgg_get_page_owner_entity()->username;
$more_link = elgg_view('output/url', array(
'href' => $owner_url,
'text' => elgg_echo('thewire:moreposts'),
diff --git a/mod/twitterservice/start.php b/mod/twitterservice/start.php
index f62527593..33319a659 100644
--- a/mod/twitterservice/start.php
+++ b/mod/twitterservice/start.php
@@ -144,8 +144,8 @@ function twitterservice_fetch_tweets($user_guid, $options=array()) {
* @param unknown_type $params
*/
function twitterservice_public_pages($hook, $type, $return_value, $params) {
- $return_value[] = 'pg/twitterservice/forward';
- $return_value[] = 'pg/twitterservice/login';
+ $return_value[] = 'twitterservice/forward';
+ $return_value[] = 'twitterservice/login';
return $return_value;
}
diff --git a/mod/twitterservice/twitterservice_lib.php b/mod/twitterservice/twitterservice_lib.php
index e58b13030..8e886f2d9 100644
--- a/mod/twitterservice/twitterservice_lib.php
+++ b/mod/twitterservice/twitterservice_lib.php
@@ -34,7 +34,7 @@ function twitterservice_forward() {
forward();
}
- $callback = elgg_normalize_url("pg/twitterservice/login");
+ $callback = elgg_normalize_url("twitterservice/login");
$request_link = twitterservice_get_authorize_url($callback);
forward($request_link, 'twitterservice');
@@ -140,7 +140,7 @@ function twitterservice_login() {
$site_name = elgg_get_site_entity()->name;
system_message(elgg_echo('twitterservice:login:email', array($site_name)));
- $forward = "pg/settings/user/{$user->username}";
+ $forward = "settings/user/{$user->username}";
}
// set twitter services tokens
@@ -218,7 +218,7 @@ function twitterservice_authorize() {
$token = twitterservice_get_access_token();
if (!isset($token['oauth_token']) || !isset($token['oauth_token_secret'])) {
register_error(elgg_echo('twitterservice:authorize:error'));
- forward('pg/settings/plugins', 'twitterservice');
+ forward('settings/plugins', 'twitterservice');
}
// make sure no other users are registered to this twitter account.
@@ -251,7 +251,7 @@ function twitterservice_authorize() {
elgg_trigger_plugin_hook('authorize', 'twitterservice', array('token' => $token));
system_message(elgg_echo('twitterservice:authorize:success'));
- forward('pg/settings/plugins', 'twitterservice');
+ forward('settings/plugins', 'twitterservice');
}
/**
@@ -264,7 +264,7 @@ function twitterservice_revoke() {
elgg_unset_plugin_user_setting('access_secret');
system_message(elgg_echo('twitterservice:revoke:success'));
- forward('pg/settings/plugins', 'twitterservice');
+ forward('settings/plugins', 'twitterservice');
}
/**
diff --git a/mod/twitterservice/views/default/twitterservice/login.php b/mod/twitterservice/views/default/twitterservice/login.php
index 65adba1f7..d4bc04150 100644
--- a/mod/twitterservice/views/default/twitterservice/login.php
+++ b/mod/twitterservice/views/default/twitterservice/login.php
@@ -3,7 +3,7 @@
*
*/
-$url = elgg_get_site_url() . 'pg/twitterservice/forward';
+$url = elgg_get_site_url() . 'twitterservice/forward';
$img_url = elgg_get_site_url() . 'mod/twitterservice/graphics/sign_in_with_twitter.gif';
$login = <<<__HTML
diff --git a/mod/twitterservice/views/default/usersettings/twitterservice/edit.php b/mod/twitterservice/views/default/usersettings/twitterservice/edit.php
index 66f5c54f5..2a5ef8b05 100644
--- a/mod/twitterservice/views/default/usersettings/twitterservice/edit.php
+++ b/mod/twitterservice/views/default/usersettings/twitterservice/edit.php
@@ -16,7 +16,7 @@ if (!$access_key || !$access_secret) {
$request_link = twitterservice_get_authorize_url();
echo '<div>' . elgg_echo('twitterservice:usersettings:request', array($request_link, $site_name)) . '</div>';
} else {
- $url = elgg_get_site_url() . "pg/twitterservice/revoke";
+ $url = elgg_get_site_url() . "twitterservice/revoke";
echo '<div class="twitter_anywhere">' . elgg_echo('twitterservice:usersettings:authorized', array($site_name, $twitter_name)) . '</div>';
echo '<div>' . sprintf(elgg_echo('twitterservice:usersettings:revoke'), $url) . '</div>';
}
diff --git a/mod/uservalidationbyemail/lib/functions.php b/mod/uservalidationbyemail/lib/functions.php
index 8a97c40b5..eaca374f4 100644
--- a/mod/uservalidationbyemail/lib/functions.php
+++ b/mod/uservalidationbyemail/lib/functions.php
@@ -39,7 +39,7 @@ function uservalidationbyemail_request_validation($user_guid, $admin_requested =
if (($user) && ($user instanceof ElggUser)) {
// Work out validate link
$code = uservalidationbyemail_generate_code($user_guid, $user->email);
- $link = "{$site->url}pg/uservalidationbyemail/confirm?u=$user_guid&c=$code";
+ $link = "{$site->url}uservalidationbyemail/confirm?u=$user_guid&c=$code";
// Send validation email
diff --git a/mod/uservalidationbyemail/start.php b/mod/uservalidationbyemail/start.php
index 91bb454cf..175905d1d 100644
--- a/mod/uservalidationbyemail/start.php
+++ b/mod/uservalidationbyemail/start.php
@@ -204,7 +204,7 @@ function uservalidationbyemail_validate_new_admin_user($event, $type, $user) {
* Registers public pages to allow in the case walled garden has been enabled.
*/
function uservalidationbyemail_public_pages($hook, $type, $return_value, $params) {
- $return_value[] = 'pg/uservalidationbyemail/confirm';
+ $return_value[] = 'uservalidationbyemail/confirm';
return $return_value;
}
diff --git a/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
index 9f04aca94..f979d5e2c 100644
--- a/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
+++ b/mod/uservalidationbyemail/views/default/forms/uservalidationbyemail/bulk_action.php
@@ -40,7 +40,7 @@ elgg_set_ignore_access($ia);
// setup pagination
$pagination = elgg_view('navigation/pagination',array(
- 'baseurl' => $vars['url'] . '/pg/uservalidationbyemail/admin/',
+ 'baseurl' => $vars['url'] . '/uservalidationbyemail/admin',
'offset' => $offset,
'count' => $count,
'limit' => $limit,
diff --git a/views/default/admin/appearance/default_widgets.php b/views/default/admin/appearance/default_widgets.php
index 01ea1653c..7462dfa7c 100644
--- a/views/default/admin/appearance/default_widgets.php
+++ b/views/default/admin/appearance/default_widgets.php
@@ -18,7 +18,7 @@ if (!$widget_context && $list) {
$current_info = null;
$tabs = array();
foreach ($list as $info) {
- $url = "pg/admin/appearance/default_widgets?widget_context={$info['widget_context']}";
+ $url = "admin/appearance/default_widgets?widget_context={$info['widget_context']}";
$selected = false;
if ($widget_context == $info['widget_context']) {
$selected = true;
diff --git a/views/default/admin/header.php b/views/default/admin/header.php
index 826fbdb9a..3919c017e 100644
--- a/views/default/admin/header.php
+++ b/views/default/admin/header.php
@@ -14,7 +14,7 @@ $logout = elgg_view('output/url', array(
));
?>
<h1 class="elgg-heading-site">
- <a href="<?php echo elgg_get_site_url(); ?>pg/admin/">
+ <a href="<?php echo elgg_get_site_url(); ?>admin">
<?php echo $admin_title; ?>
</a>
</h1>
diff --git a/views/default/admin/plugins/advanced.php b/views/default/admin/plugins/advanced.php
index 39919f9c7..49e31d9c1 100644
--- a/views/default/admin/plugins/advanced.php
+++ b/views/default/admin/plugins/advanced.php
@@ -55,7 +55,7 @@ $category_button = elgg_view('input/submit', array(
$category_form = elgg_view('input/form', array(
'body' => $category_dropdown . $category_button,
'method' => 'get',
- 'action' => 'pg/admin/plugins/advanced',
+ 'action' => 'admin/plugins/advanced',
'disable_security' => true,
));
diff --git a/views/default/core/account/login_dropdown.php b/views/default/core/account/login_dropdown.php
index 3c62a5448..f3f105be1 100644
--- a/views/default/core/account/login_dropdown.php
+++ b/views/default/core/account/login_dropdown.php
@@ -19,7 +19,7 @@ $body = elgg_view_form('login', array('action' => "{$login_url}action/login"), a
<div id="login-dropdown">
<?php
echo elgg_view('output/url', array(
- 'href' => 'pg/login',
+ 'href' => 'login',
'text' => elgg_echo('login'),
));
echo elgg_view_module('dropdown', '', $body, array('id' => 'login-dropdown-box'));
diff --git a/views/default/core/account/login_walled_garden.php b/views/default/core/account/login_walled_garden.php
index dbb9f866f..57c3c31d7 100644
--- a/views/default/core/account/login_walled_garden.php
+++ b/views/default/core/account/login_walled_garden.php
@@ -5,7 +5,7 @@
* @todo still requires clean up
*/
-$reg_url = elgg_normalize_url('pg/register/');
+$reg_url = elgg_normalize_url('register');
$forgot_url = elgg_normalize_url('pages/account/forgotten_password.php');
$cancel_button = elgg_view('input/button', array(
'value' => elgg_echo('cancel'),
diff --git a/views/default/core/members/nav.php b/views/default/core/members/nav.php
index a713fa8a3..510d1849b 100644
--- a/views/default/core/members/nav.php
+++ b/views/default/core/members/nav.php
@@ -6,17 +6,17 @@
$tabs = array(
'newest' => array(
'title' => elgg_echo('members:label:newest'),
- 'url' => "pg/members/newest/",
+ 'url' => "members/newest",
'selected' => $vars['selected'] == 'newest',
),
'popular' => array(
'title' => elgg_echo('members:label:popular'),
- 'url' => "pg/members/popular/",
+ 'url' => "members/popular",
'selected' => $vars['selected'] == 'popular',
),
'online' => array(
'title' => elgg_echo('members:label:online'),
- 'url' => "pg/members/online/",
+ 'url' => "members/online",
'selected' => $vars['selected'] == 'online',
),
);
diff --git a/views/default/core/members/sidebar.php b/views/default/core/members/sidebar.php
index 3a00bf700..8fa0fe02b 100644
--- a/views/default/core/members/sidebar.php
+++ b/views/default/core/members/sidebar.php
@@ -6,7 +6,7 @@
// Tag search
$params = array(
'method' => 'get',
- 'action' => elgg_get_site_url() . 'pg/members/search/tag/',
+ 'action' => elgg_get_site_url() . 'members/search/tag',
'disable_security' => true,
);
@@ -17,7 +17,7 @@ echo elgg_view_module('aside', elgg_echo('members:searchtag'), $body);
// name search
$params = array(
'method' => 'get',
- 'action' => elgg_get_site_url() . 'pg/members/search/name/',
+ 'action' => elgg_get_site_url() . 'members/search/name',
'disable_security' => true,
);
$body = elgg_view_form('members/name_search', $params);
diff --git a/views/default/forms/login.php b/views/default/forms/login.php
index a4d9e57c6..452c4c425 100644
--- a/views/default/forms/login.php
+++ b/views/default/forms/login.php
@@ -36,7 +36,7 @@
<ul class="elgg-menu elgg-menu-footer">
<?php
if (elgg_get_config('allow_registration')) {
- echo '<li><a class="registration_link" href="' . elgg_get_site_url() . 'pg/register/">' . elgg_echo('register') . '</a></li>';
+ echo '<li><a class="registration_link" href="' . elgg_get_site_url() . 'register">' . elgg_echo('register') . '</a></li>';
}
?>
<li><a class="forgotten_password_link" href="<?php echo elgg_get_site_url(); ?>pages/account/forgotten_password.php">
diff --git a/views/default/group/search/finishblurb.php b/views/default/group/search/finishblurb.php
index a21f95881..ceaeb0ff0 100644
--- a/views/default/group/search/finishblurb.php
+++ b/views/default/group/search/finishblurb.php
@@ -9,7 +9,7 @@ elgg_deprecated_notice('view groups/search/finishblurb was deprecated.', 1.7);
if ($vars['count'] > $vars['threshold']) {
?>
-<div class="contentWrapper"><a href="<?php echo elgg_get_site_url(); ?>pg/search/groups/?tag=<?php echo urlencode($vars['tag']); ?>">
+<div class="contentWrapper"><a href="<?php echo elgg_get_site_url(); ?>search/groups?tag=<?php echo urlencode($vars['tag']); ?>">
<?php
echo elgg_echo("group:search:finishblurb");
?></a>
diff --git a/views/default/input/autocomplete.php b/views/default/input/autocomplete.php
index 1093de2d3..61f338611 100644
--- a/views/default/input/autocomplete.php
+++ b/views/default/input/autocomplete.php
@@ -35,7 +35,7 @@ elgg_register_js('js/lib/autocomplete.js', 'autocomplete', 'head');
<script type="text/javascript">
elgg.provide('elgg.autocomplete');
-elgg.autocomplete.url = "<?php elgg_get_site_url() . 'pg/livesearch?' . $ac_url_params; ?>";
+elgg.autocomplete.url = "<?php elgg_get_site_url() . 'livesearch?' . $ac_url_params; ?>";
</script>
<input type="text" <?php echo elgg_format_attributes($vars); ?> />
diff --git a/views/default/object/plugin/advanced.php b/views/default/object/plugin/advanced.php
index 1c8914ffe..4b5a3ba48 100644
--- a/views/default/object/plugin/advanced.php
+++ b/views/default/object/plugin/advanced.php
@@ -112,7 +112,7 @@ if ($can_activate) {
$categories_html = '';
if ($categories) {
$categories_arr = array();
- $base_url = elgg_get_site_url() . "pg/admin/plugins?category=";
+ $base_url = elgg_get_site_url() . "admin/plugins?category=";
foreach ($categories as $category) {
$url = $base_url . urlencode($category);
@@ -129,8 +129,8 @@ if ($screenshots) {
foreach ($screenshots as $screenshot) {
$desc = elgg_echo($screenshot['description']);
$alt = htmlentities($desc, ENT_QUOTES, 'UTF-8');
- $screenshot_full = "{$vars['url']}pg/admin_plugin_screenshot/{$plugin->getID()}/full/{$screenshot['path']}";
- $screenshot_src = "{$vars['url']}pg/admin_plugin_screenshot/{$plugin->getID()}/thumbnail/{$screenshot['path']}";
+ $screenshot_full = "{$vars['url']}admin_plugin_screenshot/{$plugin->getID()}/full/{$screenshot['path']}";
+ $screenshot_src = "{$vars['url']}admin_plugin_screenshot/{$plugin->getID()}/thumbnail/{$screenshot['path']}";
$screenshots_html .= "<li class=\"elgg-plugin-screenshot prm ptm\"><a href=\"$screenshot_full\">"
. "<img src=\"$screenshot_src\" alt=\"$alt\"></a></li>";
@@ -166,7 +166,7 @@ $license = elgg_view('output/text', array('value' => $plugin->manifest->getLicen
<?php
$settings_view = 'settings/' . $plugin->getID() . '/edit';
if (elgg_view_exists($settings_view)) {
- $link = elgg_get_site_url() . "pg/admin/plugin_settings/" . $plugin->getID();
+ $link = elgg_get_site_url() . "admin/plugin_settings/" . $plugin->getID();
$settings_link = "<a class='plugin_settings small link' href='$link'>[" . elgg_echo('settings') . "]</a>";
}
?>
diff --git a/views/default/object/plugin/simple.php b/views/default/object/plugin/simple.php
index 49ef58313..0361666ff 100644
--- a/views/default/object/plugin/simple.php
+++ b/views/default/object/plugin/simple.php
@@ -43,7 +43,7 @@ if ($website) {
}
if (elgg_view_exists("settings/$plugin_id/edit")) {
- $settings_href = elgg_get_site_url() . "pg/admin/plugin_settings/$plugin_id";
+ $settings_href = elgg_get_site_url() . "admin/plugin_settings/$plugin_id";
$plugin_footer .= "<li><a class='plugin_settings link' href='$settings_href'>" . elgg_echo('settings') . "</a></li>";
}
diff --git a/views/default/output/tagcloud.php b/views/default/output/tagcloud.php
index 6742d9954..3bc04a3fb 100644
--- a/views/default/output/tagcloud.php
+++ b/views/default/output/tagcloud.php
@@ -49,7 +49,7 @@ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
if ($size < 100) {
$size = 100;
}
- $url = elgg_get_site_url()."pg/search/?q=". urlencode($tag->tag) . "&search_type=tags$type$subtype";
+ $url = elgg_get_site_url()."search?q=". urlencode($tag->tag) . "&search_type=tags$type$subtype";
$url = elgg_format_url($url);
$cloud .= "<a href=\"$url\" style=\"font-size: $size%\" title=\"".addslashes($tag->tag)." ($tag->total)\">" . htmlspecialchars($tag->tag, ENT_QUOTES, 'UTF-8') . "</a>";
}
@@ -58,7 +58,7 @@ if (!empty($vars['tagcloud']) && is_array($vars['tagcloud'])) {
$cloud .= '<p class="small">';
$cloud .= elgg_view_icon('tag');
$cloud .= elgg_view('output/url', array(
- 'href' => 'pg/tags',
+ 'href' => 'tags',
'text' => elgg_echo('tagcloud:allsitetags'),
));
$cloud .= '</p>';
diff --git a/views/default/output/tags.php b/views/default/output/tags.php
index 2af4c2757..345b256c4 100644
--- a/views/default/output/tags.php
+++ b/views/default/output/tags.php
@@ -41,7 +41,7 @@ if (!empty($vars['tags'])) {
} else {
$type = "";
}
- $url = elgg_get_site_url() . 'pg/search/?q=' . urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}";
+ $url = elgg_get_site_url() . 'search?q=' . urlencode($tag) . "&search_type=tags{$type}{$subtype}{$object}";
if (is_string($tag)) {
echo '<li>';
echo elgg_view('output/url', array('href' => $url, 'text' => $tag, 'rel' => 'tag'));
diff --git a/views/default/page/default.php b/views/default/page/default.php
index a7190c90e..6604b047c 100644
--- a/views/default/page/default.php
+++ b/views/default/page/default.php
@@ -12,9 +12,9 @@
*/
// backward compatability support for plugins that are not using the new approach
-// of routing through pg/admin. See reportedcontent plugin for a simple example.
+// of routing through admin. See reportedcontent plugin for a simple example.
if (elgg_get_context() == 'admin') {
- elgg_deprecated_notice("admin plugins should route through pg/admin.", 1.8);
+ elgg_deprecated_notice("admin plugins should route through 'admin'.", 1.8);
elgg_admin_add_plugin_settings_menu();
elgg_unregister_css('elgg');
echo elgg_view('page/shells/admin', $vars);
diff --git a/views/default/page/layouts/content/filter.php b/views/default/page/layouts/content/filter.php
index 0af293e24..701c6418a 100644
--- a/views/default/page/layouts/content/filter.php
+++ b/views/default/page/layouts/content/filter.php
@@ -24,19 +24,19 @@ if (elgg_is_logged_in() && $context) {
$tabs = array(
'all' => array(
'text' => elgg_echo('all'),
- 'href' => (isset($vars['all_link'])) ? $vars['all_link'] : "pg/$context/all/",
+ 'href' => (isset($vars['all_link'])) ? $vars['all_link'] : "$context/all",
'selected' => ($filter_context == 'all'),
'priority' => 200,
),
'mine' => array(
'text' => elgg_echo('mine'),
- 'href' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "pg/$context/owner/$username/",
+ 'href' => (isset($vars['mine_link'])) ? $vars['mine_link'] : "$context/owner/$username",
'selected' => ($filter_context == 'mine'),
'priority' => 300,
),
'friend' => array(
'text' => elgg_echo('friends'),
- 'href' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "pg/$context/friends/$username/",
+ 'href' => (isset($vars['friend_link'])) ? $vars['friend_link'] : "$context/friends/$username",
'selected' => ($filter_context == 'friends'),
'priority' => 400,
),
diff --git a/views/default/page/layouts/content/header.php b/views/default/page/layouts/content/header.php
index 830c33885..e9c099b70 100644
--- a/views/default/page/layouts/content/header.php
+++ b/views/default/page/layouts/content/header.php
@@ -35,7 +35,7 @@ if ($context) {
elgg_register_menu_item('title', array(
'name' => 'add',
- 'href' => elgg_extract('new_link', $vars, "pg/$context/add/$guid"),
+ 'href' => elgg_extract('new_link', $vars, "$context/add/$guid"),
'text' => elgg_echo("$context:add"),
'class' => 'elgg-button elgg-button-action',
));
diff --git a/views/default/page/layouts/two_column_left_sidebar.php b/views/default/page/layouts/two_column_left_sidebar.php
index 97f4d2719..e395a5053 100644
--- a/views/default/page/layouts/two_column_left_sidebar.php
+++ b/views/default/page/layouts/two_column_left_sidebar.php
@@ -17,7 +17,7 @@ unset($vars['area2']);
unset($vars['area3']);
// backward compatability support for plugins that are not using the new approach
-// of routing through pg/admin
+// of routing through 'admin'
if (elgg_get_context() == 'admin') {
echo elgg_view('page/layouts/admin', $vars);
return true;
diff --git a/views/default/user/search/finishblurb.php b/views/default/user/search/finishblurb.php
index 1e48d6145..a3878a803 100644
--- a/views/default/user/search/finishblurb.php
+++ b/views/default/user/search/finishblurb.php
@@ -10,7 +10,7 @@ elgg_deprecated_notice('view user/search/finishblurb was deprecated.', 1.7);
if ($vars['count'] > $vars['threshold']) {
?>
-<a href="<?php echo elgg_get_site_url(); ?>pg/search/users/?tag=<?php echo urlencode($vars['tag']); ?>"><?php
+<a href="<?php echo elgg_get_site_url(); ?>search/users?tag=<?php echo urlencode($vars['tag']); ?>"><?php
echo elgg_echo("user:search:finishblurb");
?></a>
<?php
diff --git a/views/default/widgets/content_stats/content.php b/views/default/widgets/content_stats/content.php
index 568ebeeff..7086e4b9e 100644
--- a/views/default/widgets/content_stats/content.php
+++ b/views/default/widgets/content_stats/content.php
@@ -20,6 +20,6 @@ foreach ($object_stats as $subtype => $num) {
echo '</table>';
echo elgg_view('output/url', array(
- 'href' => 'pg/admin/statistics/overview',
+ 'href' => 'admin/statistics/overview',
'text' => 'more',
));
diff --git a/views/foaf/page/default.php b/views/foaf/page/default.php
index f955279d0..7dac2a0aa 100644
--- a/views/foaf/page/default.php
+++ b/views/foaf/page/default.php
@@ -6,7 +6,7 @@
* @subpackage Core
*
* // @todo removed below because blog is a plugin
- * <foaf:weblog rdf:resource="<?php echo elgg_get_site_url(); ?>pg/blog/<?php echo $owner->username; ?>" />
+ * <foaf:weblog rdf:resource="<?php echo elgg_get_site_url(); ?>blog/<?php echo $owner->username; ?>" />
*/
header("Content-Type: text/xml");
diff --git a/views/installation/page/elements/footer.php b/views/installation/page/elements/footer.php
index 69cd27f66..3f7bdf189 100644
--- a/views/installation/page/elements/footer.php
+++ b/views/installation/page/elements/footer.php
@@ -6,5 +6,5 @@
<ul>
<li><a href="http://docs.elgg.org/wiki/Installation">Install instructions</a></li>
<li><a href="http://docs.elgg.org/wiki/Install_Troubleshooting">Install troubleshooting</a></li>
- <li><a href="http://community.elgg.org/pg/groups/world/">Elgg community forums</a></li>
+ <li><a href="http://community.elgg.org/pg/groups/world">Elgg community forums</a></li>
</ul> \ No newline at end of file
diff --git a/views/rss/core/river/body.php b/views/rss/core/river/body.php
index a168dd6a9..f84e6ccf0 100644
--- a/views/rss/core/river/body.php
+++ b/views/rss/core/river/body.php
@@ -19,7 +19,7 @@ $object = $item->getObjectEntity();
if ($object) {
$url = htmlspecialchars($object->getURL());
} else {
- $url = elgg_get_site_url() . 'pg/activity';
+ $url = elgg_get_site_url() . 'activity';
}
?>