aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profiles.php
diff options
context:
space:
mode:
authorRedMatrix <info@friendica.com>2014-10-19 08:53:49 +1100
committerRedMatrix <info@friendica.com>2014-10-19 08:53:49 +1100
commitfb183a29b9e92d22981019c97f4651fbc5fe0c9a (patch)
tree644377b1a4b2a3e6f44fb31d7e00a26517021416 /mod/profiles.php
parente5a17b5d77f44f7df94594186defa8fe493094e5 (diff)
parent7c4f55af9f8e28a761155eaf6d0d379b28d88f23 (diff)
downloadvolse-hubzilla-fb183a29b9e92d22981019c97f4651fbc5fe0c9a.tar.gz
volse-hubzilla-fb183a29b9e92d22981019c97f4651fbc5fe0c9a.tar.bz2
volse-hubzilla-fb183a29b9e92d22981019c97f4651fbc5fe0c9a.zip
Merge pull request #646 from pafcu/master
Initial stab at better general datetime picker
Diffstat (limited to 'mod/profiles.php')
-rw-r--r--mod/profiles.php30
1 files changed, 1 insertions, 29 deletions
diff --git a/mod/profiles.php b/mod/profiles.php
index 5d0416e9a..b23ae5cc5 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -233,41 +233,13 @@ function profiles_post(&$a) {
return;
}
- if($_POST['dob']) {
- $year = substr($_POST['dob'],0,4);
- $month = substr($_POST['dob'],5,2);
- $day = substr($_POST['dob'],8,2);
- }
-
- $year = intval($_POST['year']);
- if($year < 1900 || $year > 2100 || $year < 0)
- $year = 0;
- $month = intval($_POST['month']);
- if(($month > 12) || ($month < 0))
- $month = 0;
- $mtab = array(0,31,29,31,30,31,30,31,31,30,31,30,31);
- $day = intval($_POST['day']);
- if(($day > $mtab[$month]) || ($day < 0))
- $day = 0;
-
-// if($year && (! ($month && $day))) {
-// $month = 1; $day = 1;
-// }
-
-
- $dob = '0000-00-00';
- $dob = sprintf('%04d-%02d-%02d',$year,$month,$day);
-
+ $dob = $_POST['dob'] ? escape_tags(trim($_POST['dob'])) : '0000-00-00'; // FIXME: Needs to be validated?
$name = escape_tags(trim($_POST['name']));
if($orig[0]['name'] != $name)
$namechanged = true;
-
-
-
-
$pdesc = escape_tags(trim($_POST['pdesc']));
$gender = escape_tags(trim($_POST['gender']));
$address = escape_tags(trim($_POST['address']));