aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profiles.php
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2012-06-02 02:30:26 -0700
committerfriendica <info@friendica.com>2012-06-02 02:30:26 -0700
commit608d424b0b94eacd99ceeeca3e2caf112abd5b48 (patch)
treea2bb50fd0f913ce039f8b7ad2f1be8974d053472 /mod/profiles.php
parent29bdf432f012af9b1959d5b4a33b3c45d220fd64 (diff)
downloadvolse-hubzilla-608d424b0b94eacd99ceeeca3e2caf112abd5b48.tar.gz
volse-hubzilla-608d424b0b94eacd99ceeeca3e2caf112abd5b48.tar.bz2
volse-hubzilla-608d424b0b94eacd99ceeeca3e2caf112abd5b48.zip
"howlong" added to marital status.
Diffstat (limited to 'mod/profiles.php')
-rw-r--r--mod/profiles.php10
1 files changed, 10 insertions, 0 deletions
diff --git a/mod/profiles.php b/mod/profiles.php
index ca3890eb9..e32fdb33d 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;
@@ -207,6 +213,7 @@ function profiles_post(&$a) {
`country-name` = '%s',
`marital` = '%s',
`with` = '%s',
+ `howlong` = '%s',
`sexual` = '%s',
`homepage` = '%s',
`politic` = '%s',
@@ -237,6 +244,7 @@ function profiles_post(&$a) {
dbesc($country_name),
dbesc($marital),
dbesc($with),
+ dbesc($howlong),
dbesc($sexual),
dbesc($homepage),
dbesc($politic),
@@ -558,6 +566,7 @@ 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_politic' => t('Political Views:'),
@@ -595,6 +604,7 @@ 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'],