aboutsummaryrefslogtreecommitdiffstats
path: root/mod/contacts.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-02-08 21:15:26 -0800
committerfriendica <info@friendica.com>2012-02-08 21:15:26 -0800
commit11517a027b3778c56aabb4df20af46dcb24a93d0 (patch)
tree45d641b2c4ac09bf53e50622c79f20df963e7f9e /mod/contacts.php
parent03435853b369227f914026c85c6bb1240386e3ba (diff)
downloadvolse-hubzilla-11517a027b3778c56aabb4df20af46dcb24a93d0.tar.gz
volse-hubzilla-11517a027b3778c56aabb4df20af46dcb24a93d0.tar.bz2
volse-hubzilla-11517a027b3778c56aabb4df20af46dcb24a93d0.zip
if removing a contact after viewing the third page of contacts, go back to page 3
Diffstat (limited to 'mod/contacts.php')
-rwxr-xr-xmod/contacts.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/mod/contacts.php b/mod/contacts.php
index 51c6920d3..206128f9d 100755
--- a/mod/contacts.php
+++ b/mod/contacts.php
@@ -111,7 +111,6 @@ function contacts_content(&$a) {
$o = '';
nav_set_selected('contacts');
- $_SESSION['return_url'] = $a->get_baseurl() . '/' . $a->cmd;
if(! local_user()) {
notice( t('Permission denied.') . EOL);
@@ -211,7 +210,10 @@ function contacts_content(&$a) {
contact_remove($orig_record[0]['id']);
info( t('Contact has been removed.') . EOL );
- goaway($a->get_baseurl() . '/contacts');
+ if(x($_SESSION,'return_url'))
+ goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
+ else
+ goaway($a->get_baseurl() . '/contacts');
return; // NOTREACHED
}
}
@@ -354,6 +356,7 @@ function contacts_content(&$a) {
}
+ $_SESSION['return_url'] = $a->query_string;
if(($a->argc == 2) && ($a->argv[1] === 'all'))
$sql_extra = '';