aboutsummaryrefslogtreecommitdiffstats
path: root/mod/viewconnections.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
committerfriendica <info@friendica.com>2015-04-23 19:49:41 -0700
commit6679734135fb04f4a7beccb81663bf1e9574f062 (patch)
tree887488543d98b5dd297d917718bdd99844e83ba5 /mod/viewconnections.php
parent08b757a22cd2804bfec8ecf682b6987b8c06ca49 (diff)
parentc696860cc53bc25558d83de5eda65d9b583da382 (diff)
downloadvolse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.gz
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.tar.bz2
volse-hubzilla-6679734135fb04f4a7beccb81663bf1e9574f062.zip
Merge branch 'master' into tres
Conflicts: include/Contact.php include/ItemObject.php include/api.php include/attach.php include/diaspora.php include/dir_fns.php include/enotify.php include/event.php include/expire.php include/items.php include/notifier.php include/notify.php include/photos.php include/taxonomy.php include/text.php include/widgets.php include/zot.php mod/admin.php mod/channel.php mod/dirsearch.php mod/display.php mod/editwebpage.php mod/events.php mod/home.php mod/item.php mod/manage.php mod/mood.php mod/network.php mod/page.php mod/photos.php mod/ping.php mod/post.php mod/thing.php mod/viewsrc.php view/css/mod_events.css
Diffstat (limited to 'mod/viewconnections.php')
-rw-r--r--mod/viewconnections.php35
1 files changed, 28 insertions, 7 deletions
diff --git a/mod/viewconnections.php b/mod/viewconnections.php
index e35d5ca21..c1da07292 100644
--- a/mod/viewconnections.php
+++ b/mod/viewconnections.php
@@ -28,6 +28,10 @@ function viewconnections_content(&$a) {
return;
}
+ if(! $_REQUEST['aj'])
+ $_SESSION['return_url'] = $a->query_string;
+
+
$is_owner = ((local_channel() && local_channel() == $a->profile['uid']) ? true : false);
$abook_flags = ABOOK_FLAG_PENDING|ABOOK_FLAG_SELF;
@@ -53,7 +57,7 @@ function viewconnections_content(&$a) {
intval($a->pager['start'])
);
- if(! $r) {
+ if((! $r) && (! $_REQUEST['aj'])) {
info( t('No connections.') . EOL );
return $o;
}
@@ -80,13 +84,30 @@ function viewconnections_content(&$a) {
}
- $tpl = get_markup_template("viewcontact_template.tpl");
- $o .= replace_macros($tpl, array(
- '$title' => t('View Connections'),
- '$contacts' => $contacts,
- '$paginate' => paginate($a),
- ));
+ if($_REQUEST['aj']) {
+ if($contacts) {
+ $o = replace_macros(get_markup_template('viewcontactsajax.tpl'),array(
+ '$contacts' => $contacts
+ ));
+ }
+ else {
+ $o = '<div id="content-complete"></div>';
+ }
+ echo $o;
+ killme();
+ }
+ else {
+ $o .= "<script> var page_query = '" . $_GET['q'] . "'; var extra_args = '" . extra_query_args() . "' ; </script>";
+ $tpl = get_markup_template("viewcontact_template.tpl");
+ $o .= replace_macros($tpl, array(
+ '$title' => t('View Connections'),
+ '$contacts' => $contacts,
+// '$paginate' => paginate($a),
+ ));
+ }
+ if(! $contacts)
+ $o .= '<div id="content-complete"></div>';
return $o;
}