diff options
author | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-10 22:05:49 +0000 |
---|---|---|
committer | ewinslow <ewinslow@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2011-03-10 22:05:49 +0000 |
commit | adae1958a95d7e801de91d673e927cac348236d9 (patch) | |
tree | deb60ecca44c95abc5301b0d64bcd08585e85798 /mod/thewire | |
parent | ea14bfe87eda3af8e8002c64ad909cf592d7fe76 (diff) | |
download | elgg-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 'mod/thewire')
-rw-r--r-- | mod/thewire/actions/add.php | 2 | ||||
-rw-r--r-- | mod/thewire/actions/delete.php | 2 | ||||
-rw-r--r-- | mod/thewire/pages/friends.php | 4 | ||||
-rw-r--r-- | mod/thewire/pages/reply.php | 2 | ||||
-rw-r--r-- | mod/thewire/pages/tag.php | 4 | ||||
-rw-r--r-- | mod/thewire/pages/thread.php | 2 | ||||
-rw-r--r-- | mod/thewire/pages/user.php | 2 | ||||
-rw-r--r-- | mod/thewire/start.php | 24 | ||||
-rw-r--r-- | mod/thewire/tests/regex.php | 4 | ||||
-rw-r--r-- | mod/thewire/views/default/object/thewire.php | 2 | ||||
-rw-r--r-- | mod/thewire/views/default/thewire/profile_status.php | 2 | ||||
-rw-r--r-- | mod/thewire/views/default/widgets/thewire/content.php | 2 |
12 files changed, 26 insertions, 26 deletions
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'), |