X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fprofiles.php;h=d74219501a0ce3501888994bf715e908320188af;hb=3ad7c395fb9a33319531e04673563e7c9983d8f0;hp=3488c8687e4b1e3a35a45c44f5a38cf873f7a11f;hpb=2d80c601df1e2f80033194e44d90380c26e42346;p=friendica.git diff --git a/mod/profiles.php b/mod/profiles.php index 3488c8687e..d74219501a 100644 --- a/mod/profiles.php +++ b/mod/profiles.php @@ -10,6 +10,8 @@ function profiles_post(&$a) { $namechanged = false; + call_hooks('profile_post', $_POST); + if(($a->argc > 1) && ($a->argv[1] !== "new") && intval($a->argv[1])) { $orig = q("SELECT * FROM `profile` WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($a->argv[1]), @@ -46,6 +48,7 @@ function profiles_post(&$a) { if($orig[0]['name'] != $name) $namechanged = true; + $pdesc = notags(trim($_POST['pdesc'])); $gender = notags(trim($_POST['gender'])); $address = notags(trim($_POST['address'])); $locality = notags(trim($_POST['locality'])); @@ -125,6 +128,7 @@ function profiles_post(&$a) { $r = q("UPDATE `profile` SET `profile-name` = '%s', `name` = '%s', + `pdesc` = '%s', `gender` = '%s', `dob` = '%s', `address` = '%s', @@ -153,6 +157,7 @@ function profiles_post(&$a) { WHERE `id` = %d AND `uid` = %d LIMIT 1", dbesc($profile_name), dbesc($name), + dbesc($pdesc), dbesc($gender), dbesc($dob), dbesc($address), @@ -198,8 +203,8 @@ function profiles_post(&$a) { $php_path = ((strlen($a->config['php_path'])) ? $a->config['php_path'] : 'php'); $url = $_SESSION['my_url']; if($url && strlen(get_config('system','directory_submit_url'))) - proc_close(proc_open("\"$php_path\" \"include/directory.php\" \"$url\" &", - array(),$foo)); + //proc_close(proc_open("\"$php_path\" \"include/directory.php\" \"$url\" &", array(),$foo)); + proc_run($php_path,"include/directory.php","$url"); } } } @@ -208,6 +213,7 @@ function profiles_post(&$a) { function profiles_content(&$a) { + $o = ''; $o .= ''; @@ -356,6 +362,7 @@ function profiles_content(&$a) { '$profile_name' => $r[0]['profile-name'], '$default' => (($is_default) ? '

' . t('This is your public profile.
It may be visible to anybody using the internet.') . '

' : ""), '$name' => $r[0]['name'], + '$pdesc' => $r[0]['pdesc'], '$dob' => dob($r[0]['dob']), '$hide_friends' => $hide_friends, '$address' => $r[0]['address'], @@ -384,6 +391,9 @@ function profiles_content(&$a) { '$contact' => $r[0]['contact'] )); + $arr = array('profile' => $r[0], 'entry' => $o); + call_hooks('profile_edit', $arr); + return $o; } else {