From 608d424b0b94eacd99ceeeca3e2caf112abd5b48 Mon Sep 17 00:00:00 2001 From: friendica Date: Sat, 2 Jun 2012 02:30:26 -0700 Subject: "howlong" added to marital status. --- mod/profiles.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'mod') 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(' 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'], -- cgit v1.2.3