Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
d9c68413
Commit
d9c68413
authored
Feb 07, 2008
by
Clare Lenihan
Committed by
Clare Lenihan
Feb 07, 2008
Browse files
chaning cancel so it returns to myfriends/find/view page depeding on how the page was navigated to
parent
1b6d5f0f
Changes
6
Hide whitespace changes
Inline
Side-by-side
htdocs/theme/default/templates/user/view.tpl
View file @
d9c68413
...
...
@@ -14,16 +14,16 @@
<img
src=
"
{
$WWWROOT
}
thumb.php?type=profileicon&maxsize=100&id=
{
$USERID
}
"
alt=
""
>
{
if
$canmessage
}
<br>
<a
href=
"
{
$WWWROOT
}
user/sendmessage.php?id=
{
$USERID
}
"
>
{
str
tag
=
'sendmessage'
section
=
'group'
}
</a>
<a
href=
"
{
$WWWROOT
}
user/sendmessage.php?id=
{
$USERID
}
&returnto=view
"
>
{
str
tag
=
'sendmessage'
section
=
'group'
}
</a>
{/
if
}
{
if
$relationship
==
'existingfriend'
}
<br>
<a
href=
"
{
$WWWROOT
}
user/removefriend.php?id=
{
$USERID
}
"
>
{
str
tag
=
'removefromfriendslist'
section
=
'group'
}
</a>
<a
href=
"
{
$WWWROOT
}
user/removefriend.php?id=
{
$USERID
}
&returnto=view
"
>
{
str
tag
=
'removefromfriendslist'
section
=
'group'
}
</a>
{
elseif
$relationship
==
'none'
&&
$friendscontrol
==
'auto'
}
{
$newfriendform
}
{
elseif
$relationship
==
'none'
&&
$friendscontrol
==
'auth'
}
<br>
<a
href=
"
{
$WWWROOT
}
user/requestfriendship.php?id=
{
$USERID
}
"
>
{
str
tag
=
'requestfriendship'
section
=
'group'
}
</a>
<a
href=
"
{
$WWWROOT
}
user/requestfriendship.php?id=
{
$USERID
}
&returnto=view
"
>
{
str
tag
=
'requestfriendship'
section
=
'group'
}
</a>
{/
if
}
{
if
$inviteform
}
{
$inviteform
}
...
...
htdocs/user/denyrequest.php
View file @
d9c68413
...
...
@@ -33,6 +33,7 @@ require('searchlib.php');
safe_require
(
'search'
,
'internal'
);
$id
=
param_integer
(
'id'
);
$returnto
=
param_alpha
(
'returnto'
,
'myfriends'
);
if
(
!
record_exists
(
'usr_friend_request'
,
'owner'
,
$USER
->
get
(
'id'
),
'requester'
,
$id
))
{
throw
new
AccessDeniedException
(
get_string
(
'cantdenyrequest'
,
'group'
));
...
...
@@ -51,7 +52,7 @@ $form = pieform(array(
'submit'
=>
array
(
'type'
=>
'submitcancel'
,
'value'
=>
array
(
get_string
(
'denyfriendrequestlower'
,
'group'
),
get_string
(
'cancel'
)),
'goto'
=>
get_config
(
'wwwroot'
)
.
'user/view.php?id='
.
$id
,
'goto'
=>
get_config
(
'wwwroot'
)
.
(
$returnto
==
'find'
?
'user/find.php'
:
(
$returnto
==
'view'
?
'user/view.php?id='
.
$id
:
'user/myfriends.php'
))
,
)
)
));
...
...
htdocs/user/removefriend.php
View file @
d9c68413
...
...
@@ -30,6 +30,7 @@ require(dirname(dirname(__FILE__)) . '/init.php');
require_once
(
'pieforms/pieform.php'
);
$id
=
param_integer
(
'id'
);
$returnto
=
param_alpha
(
'returnto'
,
'myfriends'
);
if
(
!
is_friend
(
$id
,
$USER
->
get
(
'id'
)))
{
throw
new
AccessDeniedException
(
get_string
(
'cantremovefriend'
,
'group'
));
...
...
@@ -50,7 +51,7 @@ $form = pieform(array(
'submit'
=>
array
(
'type'
=>
'submitcancel'
,
'value'
=>
array
(
get_string
(
'removefriend'
,
'group'
),
get_string
(
'cancel'
)),
'goto'
=>
get_config
(
'wwwroot'
)
,
'user/view.php?id='
.
$id
'goto'
=>
get_config
(
'wwwroot'
)
.
(
$returnto
==
'find'
?
'user/find.php'
:
(
$returnto
==
'view'
?
'user/view.php?id='
.
$id
:
'user/myfriends.php'
)),
)
)
));
...
...
htdocs/user/requestfriendship.php
View file @
d9c68413
...
...
@@ -30,6 +30,7 @@ require(dirname(dirname(__FILE__)) . '/init.php');
require_once
(
'pieforms/pieform.php'
);
$id
=
param_integer
(
'id'
);
$returnto
=
param_alpha
(
'returnto'
,
'myfriends'
);
if
(
is_friend
(
$id
,
$USER
->
get
(
'id'
))
||
get_friend_request
(
$id
,
$USER
->
get
(
'id'
))
...
...
@@ -53,7 +54,7 @@ $form = pieform(array(
'submit'
=>
array
(
'type'
=>
'submitcancel'
,
'value'
=>
array
(
get_string
(
'requestfriendship'
,
'group'
),
get_string
(
'cancel'
)),
'goto'
=>
get_config
(
'wwwroot'
)
.
'user/view.php?id='
.
$id
,
'goto'
=>
get_config
(
'wwwroot'
)
.
(
$returnto
==
'find'
?
'user/find.php'
:
(
$returnto
==
'view'
?
'user/view.php?id='
.
$id
:
'user/myfriends.php'
))
,
)
)
));
...
...
htdocs/user/sendmessage.php
View file @
d9c68413
...
...
@@ -32,6 +32,7 @@ require('searchlib.php');
safe_require
(
'search'
,
'internal'
);
$id
=
param_integer
(
'id'
);
$returnto
=
param_alpha
(
'returnto'
,
'myfriends'
);
if
(
!
can_send_message
(
$USER
,
$id
))
{
throw
new
AccessDeniedException
(
get_string
(
'cantmessageuser'
,
'group'
));
...
...
@@ -52,7 +53,7 @@ $form = pieform(array(
'submit'
=>
array
(
'type'
=>
'submitcancel'
,
'value'
=>
array
(
get_string
(
'sendmessage'
,
'group'
),
get_string
(
'cancel'
)),
'goto'
=>
get_config
(
'wwwroot'
)
.
'user/view.php?id='
.
$id
,
'goto'
=>
get_config
(
'wwwroot'
)
.
(
$returnto
==
'find'
?
'user/find.php'
:
(
$returnto
==
'view'
?
'user/view.php?id='
.
$id
:
'user/myfriends.php'
))
,
)
)
));
...
...
htdocs/user/view.php
View file @
d9c68413
...
...
@@ -366,7 +366,7 @@ function addmember_submit(Pieform $form, $values) {
function
approve_deny_friendrequest_submit
(
Pieform
$form
,
$values
)
{
if
(
isset
(
$values
[
'deny'
]))
{
redirect
(
'/user/denyrequest.php?id='
.
$values
[
'id'
]);
redirect
(
'/user/denyrequest.php?id='
.
$values
[
'id'
]
.
'&returnto=view'
);
}
else
{
acceptfriend_submit
(
$form
,
$values
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment