aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profiles.php
diff options
context:
space:
mode:
authormrjive <mrjive@mrjive.it>2015-12-04 10:32:14 +0100
committermrjive <mrjive@mrjive.it>2015-12-04 10:32:14 +0100
commit051346325609f5f2e78ef0deaf182c65d7823bbc (patch)
treef3660377b3daf6599623d2e4fb95b4d33c30d8cc /mod/profiles.php
parent53a796afcc0cff6f9e3f51457df4506a43db1945 (diff)
parent8a9d743f6f518d3af35014130dcef8f148148113 (diff)
downloadvolse-hubzilla-051346325609f5f2e78ef0deaf182c65d7823bbc.tar.gz
volse-hubzilla-051346325609f5f2e78ef0deaf182c65d7823bbc.tar.bz2
volse-hubzilla-051346325609f5f2e78ef0deaf182c65d7823bbc.zip
Merge pull request #9 from redmatrix/master
updating from original codebase
Diffstat (limited to 'mod/profiles.php')
-rw-r--r--mod/profiles.php16
1 files changed, 12 insertions, 4 deletions
diff --git a/mod/profiles.php b/mod/profiles.php
index 19e5ffc50..282d741ac 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -1,5 +1,6 @@
<?php
+require_once('include/identity.php');
function profiles_init(&$a) {
@@ -37,6 +38,12 @@ function profiles_init(&$a) {
if($r)
info( t('Profile deleted.') . EOL);
+ // @fixme this is a much more complicated sync - add any changed abook entries and
+ // also add deleted flag to profile structure
+ // profiles_build_sync is just here as a placeholder - it doesn't work at all here
+
+ // profiles_build_sync(local_channel());
+
goaway($a->get_baseurl(true) . '/profiles');
return; // NOTREACHED
}
@@ -118,7 +125,10 @@ function profiles_init(&$a) {
dbesc($name)
);
info( t('New profile created.') . EOL);
- if(count($r3) == 1)
+
+ profiles_build_sync(local_channel());
+
+ if(($r3) && (count($r3) == 1))
goaway($a->get_baseurl(true) . '/profiles/' . $r3[0]['id']);
goaway($a->get_baseurl(true) . '/profiles');
@@ -193,7 +203,6 @@ function profiles_post(&$a) {
$namechanged = false;
- call_hooks('profile_post', $_POST);
// import from json export file.
// Only import fields that are allowed on this hub
@@ -220,6 +229,7 @@ function profiles_post(&$a) {
}
}
+ call_hooks('profile_post', $_POST);
if((argc() > 1) && (argv(1) !== "new") && intval(argv(1))) {
@@ -564,8 +574,6 @@ function profiles_post(&$a) {
}
-
-
function profiles_content(&$a) {
$o = '';