aboutsummaryrefslogtreecommitdiffstats
path: root/mod/profiles.php
diff options
context:
space:
mode:
Diffstat (limited to 'mod/profiles.php')
-rw-r--r--mod/profiles.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/mod/profiles.php b/mod/profiles.php
index e857c4216..173d97138 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -47,7 +47,7 @@ function profiles_init(&$a) {
if((argc() > 1) && (argv(1) === 'new')) {
- check_form_security_token_redirectOnErr('/profiles', 'profile_new', 't');
+// check_form_security_token_redirectOnErr('/profiles', 'profile_new', 't');
$r0 = q("SELECT `id` FROM `profile` WHERE `uid` = %d",
intval(local_user()));
@@ -59,7 +59,7 @@ function profiles_init(&$a) {
intval(local_user()));
$r2 = q("INSERT INTO `profile` (`aid`, `uid` , `profile_guid`, `profile_name` , `name`, `photo`, `thumb`)
- VALUES ( %d, '%s', '%s', '%s', '%s' )",
+ VALUES ( %d, '%s', '%s', '%s', '%s', '%s', '%s' )",
intval(get_account_id()),
intval(local_user()),
dbesc(random_string()),
@@ -200,6 +200,11 @@ function profiles_post(&$a) {
$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);
@@ -232,6 +237,7 @@ function profiles_post(&$a) {
$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'])));
+ $channels = fix_mce_lf(escape_tags(trim($_POST['channels'])));
$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'])));
@@ -393,6 +399,7 @@ function profiles_post(&$a) {
`about` = '%s',
`interest` = '%s',
`contact` = '%s',
+ `channels` = '%s',
`music` = '%s',
`book` = '%s',
`tv` = '%s',
@@ -426,6 +433,7 @@ function profiles_post(&$a) {
dbesc($about),
dbesc($interest),
dbesc($contact),
+ dbesc($channels),
dbesc($music),
dbesc($book),
dbesc($tv),
@@ -444,7 +452,7 @@ function profiles_post(&$a) {
$channel = $a->get_channel();
if($namechanged && $is_default) {
- $r = q("UPDATE xchan SET xchan_name = '%s', xchan_name_date` = '%s' WHERE xchan_hash = '%s' limit 1",
+ $r = q("UPDATE xchan SET xchan_name = '%s', xchan_name_date = '%s' WHERE xchan_hash = '%s' limit 1",
dbesc($name),
dbesc(datetime_convert()),
dbesc($channel['xchan_hash'])
@@ -516,6 +524,7 @@ function profiles_content(&$a) {
'$profile_drop_link' => 'profiles/drop/' . $r[0]['id'] . '?t='
. get_form_security_token("profile_drop"),
+ '$guid' => $r[0]['profile_guid'],
'$banner' => t('Edit Profile Details'),
'$submit' => t('Submit'),
'$viewprof' => t('View this profile'),
@@ -550,6 +559,7 @@ function profiles_content(&$a) {
'$lbl_about' => t('Tell us about yourself...'),
'$lbl_hobbies' => t('Hobbies/Interests'),
'$lbl_social' => t('Contact information and Social Networks'),
+ '$lbl_channels' => t('My other channels'),
'$lbl_music' => t('Musical interests'),
'$lbl_book' => t('Books, literature'),
'$lbl_tv' => t('Television'),
@@ -593,7 +603,8 @@ function profiles_content(&$a) {
'$romance' => $r[0]['romance'],
'$work' => $r[0]['work'],
'$education' => $r[0]['education'],
- '$contact' => $r[0]['contact']
+ '$contact' => $r[0]['contact'],
+ '$channels' => $r[0]['channels'],
));
$arr = array('profile' => $r[0], 'entry' => $o);