]> git.mxchange.org Git - friendica.git/blobdiff - mod/profiles.php
.
[friendica.git] / mod / profiles.php
index 013e8e82002617ac88b23940909567c29d6bf106..eaa603a282bf537fbdebe9719969199078b98df4 100644 (file)
@@ -42,6 +42,13 @@ function profiles_post(&$a) {
                $day = intval($_POST['day']);
                        if(($day > $mtab[$month]) || ($day < 0))
                                $day = 0;
+
+               // It's OK to have an empty (0) year, but if you supplied a year you have to have a non-zero month and day
+               if($year && ! $month)
+                       $month = 1;
+               if($year && ! $day)
+                       $day = 1;
+
                $dob = '0000-00-00';
                $dob = sprintf('%04d-%02d-%02d',$year,$month,$day);
 
@@ -554,9 +561,12 @@ function profiles_content(&$a) {
                require_once('include/profile_selectors.php');
 
 
-               $editselect = 'textareas';
-               if(intval(get_pconfig(local_user(),'system','plaintext')))
-                       $editselect = 'none';
+/*             $editselect = 'textareas';
+               if( intval(get_pconfig(local_user(),'system','plaintext')) || !feature_enabled(local_user(),'richtext') )
+                       $editselect = 'none';*/
+               $editselect = 'none';
+               if( feature_enabled(local_user(),'richtext') )
+                       $editselect = 'textareas';
 
                $a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array(
                        '$baseurl' => $a->get_baseurl(true),
@@ -592,6 +602,7 @@ function profiles_content(&$a) {
                        '$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t=' . get_form_security_token("profile_drop"),
                        '$banner' => t('Edit Profile Details'),
                        '$submit' => t('Submit'),
+                       '$profpic' => t('Change Profile Photo'),
                        '$viewprof' => t('View this profile'),
                        '$cr_prof' => t('Create a new profile using these settings'),
                        '$cl_prof' => t('Clone this profile'),