aboutsummaryrefslogtreecommitdiff
path: root/views/default
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 /views/default
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
Diffstat (limited to 'views/default')
-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
20 files changed, 30 insertions, 30 deletions
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',
));