diff options
author | friendica <info@friendica.com> | 2015-01-15 16:37:47 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-01-15 16:37:47 -0800 |
commit | e7932d97a25bf621082e93f47816a2a107a6d05f (patch) | |
tree | 3b94988ec1074e6c645e430da2c181dd9700f3bc /mod/connedit.php | |
parent | 1c9299ed4224d37716079be173d75319d2501b71 (diff) | |
download | volse-hubzilla-e7932d97a25bf621082e93f47816a2a107a6d05f.tar.gz volse-hubzilla-e7932d97a25bf621082e93f47816a2a107a6d05f.tar.bz2 volse-hubzilla-e7932d97a25bf621082e93f47816a2a107a6d05f.zip |
editing stuff for poco reputation
Diffstat (limited to 'mod/connedit.php')
-rw-r--r-- | mod/connedit.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/mod/connedit.php b/mod/connedit.php index cf6ff6aad..87d5e9eca 100644 --- a/mod/connedit.php +++ b/mod/connedit.php @@ -107,6 +107,14 @@ function connedit_post(&$a) { if($closeness < 0) $closeness = 99; + $rating = intval($_POST['rating']); + if($rating < (-10)) + $rating = (-10); + if($rating > 10) + $rating = 10; + + $rating_text = escape_tags($_REQUEST['rating_text']); + $abook_my_perms = 0; foreach($_POST as $k => $v) { @@ -125,11 +133,13 @@ function connedit_post(&$a) { $new_friend = true; } - $r = q("UPDATE abook SET abook_profile = '%s', abook_my_perms = %d , abook_closeness = %d, abook_flags = %d + $r = q("UPDATE abook SET abook_profile = '%s', abook_my_perms = %d , abook_closeness = %d, abook_rating = %d, abook_rating_text = '%s', abook_flags = %d where abook_id = %d AND abook_channel = %d", dbesc($profile_id), intval($abook_my_perms), intval($closeness), + intval($rating), + dbesc($rating_text), intval($abook_flags), intval($contact_id), intval(local_user()) @@ -561,8 +571,11 @@ function connedit_content(&$a) { '$buttons' => (($self) ? '' : $buttons), '$viewprof' => t('View Profile'), '$lbl_slider' => t('Slide to adjust your degree of friendship'), - '$lbl_rating' => t('Rating (this information is public)'), + '$lbl_rating' => t('Rating (this information may be public)'), + '$lbl_rating_txt' => t('Optionally explain your rating (this information may be public)'), + '$rating_txt' => $contact['abook_rating_text'], '$rating' => $rating, + '$rating_val' => $contact['abook_rating'], '$slide' => $slide, '$tabs' => $t, '$tab_str' => $tab_str, |