aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profiles.php
diff options
context:
space:
mode:
authorzottel <github@zottel.net>2012-06-03 14:21:51 +0200
committerzottel <github@zottel.net>2012-06-03 14:21:51 +0200
commit70c4ab68754941749a5e89434d6db19f6bba1e16 (patch)
tree525a6536b6ab7f9020e83daf9287c785303ad584 /mod/profiles.php
parentdf2fdf08ddf8cb354022992d4353ced4295b77b3 (diff)
parentdaa4f5213f726b22846859f2f12d06889e9bdc9b (diff)
downloadvolse-hubzilla-70c4ab68754941749a5e89434d6db19f6bba1e16.tar.gz
volse-hubzilla-70c4ab68754941749a5e89434d6db19f6bba1e16.tar.bz2
volse-hubzilla-70c4ab68754941749a5e89434d6db19f6bba1e16.zip
Merge remote branch 'upstream/master'
Diffstat (limited to 'mod/profiles.php')
-rw-r--r--mod/profiles.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/mod/profiles.php b/mod/profiles.php
index ca3890eb9..6a8ce9e1e 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -62,9 +62,15 @@ function profiles_post(&$a) {
$pub_keywords = notags(trim($_POST['pub_keywords']));
$prv_keywords = notags(trim($_POST['prv_keywords']));
$marital = notags(trim($_POST['marital']));
+ $howlong = notags(trim($_POST['howlong']));
$with = ((x($_POST,'with')) ? notags(trim($_POST['with'])) : '');
+ if(! strlen($howlong))
+ $howlong = '0000-00-00 00:00:00';
+ else
+ $howlong = datetime_convert(date_default_timezone_get(),'UTC',$howlong);
+
// linkify the relationship target if applicable
$withchanged = false;
@@ -120,6 +126,7 @@ function profiles_post(&$a) {
$sexual = notags(trim($_POST['sexual']));
$homepage = notags(trim($_POST['homepage']));
+ $hometown = notags(trim($_POST['hometown']));
$politic = notags(trim($_POST['politic']));
$religion = notags(trim($_POST['religion']));
@@ -207,8 +214,10 @@ function profiles_post(&$a) {
`country-name` = '%s',
`marital` = '%s',
`with` = '%s',
+ `howlong` = '%s',
`sexual` = '%s',
`homepage` = '%s',
+ `hometown` = '%s',
`politic` = '%s',
`religion` = '%s',
`pub_keywords` = '%s',
@@ -237,8 +246,10 @@ function profiles_post(&$a) {
dbesc($country_name),
dbesc($marital),
dbesc($with),
+ dbesc($howlong),
dbesc($sexual),
dbesc($homepage),
+ dbesc($hometown),
dbesc($politic),
dbesc($religion),
dbesc($pub_keywords),
@@ -558,8 +569,10 @@ function profiles_content(&$a) {
'$lbl_marital' => t('<span class="heart">&hearts;</span> Marital Status:'),
'$lbl_with' => t("Who: \x28if applicable\x29"),
'$lbl_ex1' => t('Examples: cathy123, Cathy Williams, cathy@example.com'),
+ '$lbl_howlong' => t('Since [date]:'),
'$lbl_sexual' => t('Sexual Preference:'),
'$lbl_homepage' => t('Homepage URL:'),
+ '$lbl_hometown' => t('Hometown:'),
'$lbl_politic' => t('Political Views:'),
'$lbl_religion' => t('Religious Views:'),
'$lbl_pubkey' => t('Public Keywords:'),
@@ -595,9 +608,11 @@ function profiles_content(&$a) {
'$gender' => gender_selector($r[0]['gender']),
'$marital' => marital_selector($r[0]['marital']),
'$with' => strip_tags($r[0]['with']),
+ '$howlong' => ($r[0]['howlong'] === '0000-00-00 00:00:00' ? '' : datetime_convert('UTC',date_default_timezone_get(),$r[0]['howlong'])),
'$sexual' => sexpref_selector($r[0]['sexual']),
'$about' => $r[0]['about'],
'$homepage' => $r[0]['homepage'],
+ '$hometown' => $r[0]['hometown'],
'$politic' => $r[0]['politic'],
'$religion' => $r[0]['religion'],
'$pub_keywords' => $r[0]['pub_keywords'],