aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
Diffstat (limited to 'mod')
-rw-r--r--mod/directory.php7
-rw-r--r--mod/profiles.php5
2 files changed, 10 insertions, 2 deletions
diff --git a/mod/directory.php b/mod/directory.php
index f70cd6df8..0504ac321 100644
--- a/mod/directory.php
+++ b/mod/directory.php
@@ -40,7 +40,7 @@ function directory_content(&$a) {
if($search)
$search = dbesc($search);
- $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : "");
+ $sql_extra = ((strlen($search)) ? " AND MATCH (`profile`.`name`, `user`.`nickname`, `pdesc`, `locality`,`region`,`country-name`,`gender`,`marital`,`sexual`,`about`,`romance`,`work`,`education`,`keywords` ) AGAINST ('$search' IN BOOLEAN MODE) " : "");
$publish = ((get_config('system','publish_all')) ? '' : " AND `publish` = 1 " );
@@ -68,6 +68,9 @@ function directory_content(&$a) {
$profile_link = $a->get_baseurl() . '/profile/' . ((strlen($rr['nickname'])) ? $rr['nickname'] : $rr['profile_uid']);
+
+ $pdesc = (($rr['pdesc']) ? $rr['pdesc'] . '<br />' : '');
+
$details = '';
if(strlen($rr['locality']))
$details .= $rr['locality'];
@@ -94,7 +97,7 @@ function directory_content(&$a) {
'$photo' => $rr[$photo],
'$alt-text' => $rr['name'],
'$name' => $rr['name'],
- '$details' => $details
+ '$details' => $pdesc . $details
));
diff --git a/mod/profiles.php b/mod/profiles.php
index 3488c8687..54c57f73e 100644
--- a/mod/profiles.php
+++ b/mod/profiles.php
@@ -46,6 +46,7 @@ function profiles_post(&$a) {
if($orig[0]['name'] != $name)
$namechanged = true;
+ $pdesc = notags(trim($_POST['pdesc']));
$gender = notags(trim($_POST['gender']));
$address = notags(trim($_POST['address']));
$locality = notags(trim($_POST['locality']));
@@ -125,6 +126,7 @@ function profiles_post(&$a) {
$r = q("UPDATE `profile`
SET `profile-name` = '%s',
`name` = '%s',
+ `pdesc` = '%s',
`gender` = '%s',
`dob` = '%s',
`address` = '%s',
@@ -153,6 +155,7 @@ function profiles_post(&$a) {
WHERE `id` = %d AND `uid` = %d LIMIT 1",
dbesc($profile_name),
dbesc($name),
+ dbesc($pdesc),
dbesc($gender),
dbesc($dob),
dbesc($address),
@@ -208,6 +211,7 @@ function profiles_post(&$a) {
function profiles_content(&$a) {
+
$o = '';
$o .= '<script> $(document).ready(function() { $(\'#nav-profiles-link\').addClass(\'nav-selected\'); });</script>';
@@ -356,6 +360,7 @@ function profiles_content(&$a) {
'$profile_name' => $r[0]['profile-name'],
'$default' => (($is_default) ? '<p id="profile-edit-default-desc">' . t('This is your <strong>public</strong> profile.<br />It <strong>may</strong> be visible to anybody using the internet.') . '</p>' : ""),
'$name' => $r[0]['name'],
+ '$pdesc' => $r[0]['pdesc'],
'$dob' => dob($r[0]['dob']),
'$hide_friends' => $hide_friends,
'$address' => $r[0]['address'],