aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profiles.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profiles.php')
-rw-r--r--mod/profiles.php38
1 files changed, 25 insertions, 13 deletions
diff --git a/mod/profiles.php b/mod/profiles.php
index 7b3b6ccc1..eef58bb06 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -121,16 +121,17 @@ function profiles_post(&$a) {
$politic = notags(trim($_POST['politic']));
$religion = notags(trim($_POST['religion']));
- $about = escape_tags(trim($_POST['about']));
- $interest = escape_tags(trim($_POST['interest']));
- $contact = escape_tags(trim($_POST['contact']));
- $music = escape_tags(trim($_POST['music']));
- $book = escape_tags(trim($_POST['book']));
- $tv = escape_tags(trim($_POST['tv']));
- $film = escape_tags(trim($_POST['film']));
- $romance = escape_tags(trim($_POST['romance']));
- $work = escape_tags(trim($_POST['work']));
- $education = escape_tags(trim($_POST['education']));
+ $about = fix_mce_lf(escape_tags(trim($_POST['about'])));
+ $interest = fix_mce_lf(escape_tags(trim($_POST['interest'])));
+ $contact = fix_mce_lf(escape_tags(trim($_POST['contact'])));
+ $music = fix_mce_lf(escape_tags(trim($_POST['music'])));
+ $book = fix_mce_lf(escape_tags(trim($_POST['book'])));
+ $tv = fix_mce_lf(escape_tags(trim($_POST['tv'])));
+ $film = fix_mce_lf(escape_tags(trim($_POST['film'])));
+ $romance = fix_mce_lf(escape_tags(trim($_POST['romance'])));
+ $work = fix_mce_lf(escape_tags(trim($_POST['work'])));
+ $education = fix_mce_lf(escape_tags(trim($_POST['education'])));
+
$hide_friends = (($_POST['hide-friends'] == 1) ? 1: 0);
$r = q("UPDATE `profile`
@@ -361,7 +362,16 @@ function profiles_content(&$a) {
require_once('include/profile_selectors.php');
- $tpl = get_markup_template('profed_head.tpl');
+
+ $editselect = 'textareas';
+ if(intval(get_pconfig(local_user(),'system','plaintext')))
+ $editselect = 'none';
+
+ $a->page['htmlhead'] .= replace_macros(get_markup_template('profed_head.tpl'), array(
+ '$baseurl' => $a->get_baseurl(true),
+ '$editselect' => $editselect,
+ ));
+
$opt_tpl = get_markup_template("profile-hide-friends.tpl");
$hide_friends = replace_macros($opt_tpl,array(
@@ -372,10 +382,12 @@ function profiles_content(&$a) {
'$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "")
));
-
- $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl(true)));
$a->page['htmlhead'] .= "<script type=\"text/javascript\" src=\"js/country.js\" ></script>";
+
+
+
+
$f = get_config('system','birthday_input_format');
if(! $f)
$f = 'ymd';