aboutsummaryrefslogtreecommitdiff
path: root/mod/file/start.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-31 15:47:41 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-31 15:47:41 +0000
commitcc8554abadc047469087fcd4f8f469ba733fceb0 (patch)
treea9837273d0142dfc649feb2b031158db4105a4f9 /mod/file/start.php
parent24ef7261d523155ee1c58e8297516e726b4ce80b (diff)
downloadelgg-cc8554abadc047469087fcd4f8f469ba733fceb0.tar.gz
elgg-cc8554abadc047469087fcd4f8f469ba733fceb0.tar.bz2
file index page now working for both users and groups
git-svn-id: http://code.elgg.org/elgg/trunk@7790 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'mod/file/start.php')
-rw-r--r--mod/file/start.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/mod/file/start.php b/mod/file/start.php
index ff0dcbc48..d58940f40 100644
--- a/mod/file/start.php
+++ b/mod/file/start.php
@@ -59,7 +59,7 @@ function file_init() {
* Friends' files: pg/file/friends/<username>
* View file: pg/file/view/<guid>/<title>
* New file: pg/file/new/<guid>
- * Edit file: pg/file/edit/<guid>/<revision>
+ * Edit file: pg/file/edit/<guid>
* Group files: pg/file/group/<guid>/owner
*
* Title is ignored
@@ -78,7 +78,8 @@ function file_page_handler($page) {
$page_type = $page[0];
switch ($page_type) {
case 'owner':
- set_input('username', $page[1]);
+ $owner = get_user_by_username($page[1]);
+ set_input('guid', $owner->guid);
include "$file_dir/index.php";
break;
case 'friends':
@@ -98,6 +99,8 @@ function file_page_handler($page) {
include "$file_dir/edit.php";
break;
case 'group':
+ set_input('guid', $page[1]);
+ include "$file_dir/index.php";
break;
case 'all':
default:
@@ -150,7 +153,7 @@ function file_owner_block_menu($hook, $type, $return, $params) {
$return[] = $item;
} else {
if ($params['entity']->file_enable != "no") {
- $url = "pg/file/owner/{$params['entity']->username}";
+ $url = "pg/file/group/{$params['entity']->guid}/owner";
$item = new ElggMenuItem('file', elgg_echo('file:group'), $url);
$return[] = $item;
}