mirror of
https://github.com/friendica/friendica
synced 2024-11-09 23:02:54 +00:00
added "secret" profile search keywords
This commit is contained in:
parent
4a2d83fcff
commit
24a9a41f96
8 changed files with 29 additions and 3 deletions
1
INSTALL
1
INSTALL
|
@ -23,6 +23,7 @@ encryption support
|
|||
- PHP *command line* access with register_argc_argv set to true in the
|
||||
php.ini file
|
||||
- curl, gd, mysql, and openssl extensions
|
||||
- some form of email server or email gateway such that PHP mail() works
|
||||
- mcrypt (optional; used for end-to-end message encryption)
|
||||
|
||||
- Mysql 5.x
|
||||
|
|
2
boot.php
2
boot.php
|
@ -2,7 +2,7 @@
|
|||
|
||||
set_time_limit(0);
|
||||
|
||||
define ( 'BUILD_ID', 1024 );
|
||||
define ( 'BUILD_ID', 1025 );
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.0' );
|
||||
|
||||
define ( 'EOL', "<br />\r\n" );
|
||||
|
|
|
@ -292,6 +292,7 @@ CREATE TABLE IF NOT EXISTS `profile` (
|
|||
`sexual` char(255) NOT NULL,
|
||||
`politic` char(255) NOT NULL,
|
||||
`religion` char(255) NOT NULL,
|
||||
`keywords` text NOT NULL,
|
||||
`about` text NOT NULL,
|
||||
`summary` char(255) NOT NULL,
|
||||
`music` text NOT NULL,
|
||||
|
|
|
@ -37,7 +37,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`) AGAINST ('$search' IN BOOLEAN MODE) " : "");
|
||||
$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) " : "");
|
||||
|
||||
|
||||
$r = q("SELECT COUNT(*) AS `total` FROM `profile` LEFT JOIN `user` ON `user`.`uid` = `profile`.`uid` WHERE `is-default` = 1 AND `publish` = 1 AND `user`.`blocked` = 0 $sql_extra ");
|
||||
|
|
|
@ -52,7 +52,7 @@ function profiles_post(&$a) {
|
|||
$region = notags(trim($_POST['region']));
|
||||
$postal_code = notags(trim($_POST['postal_code']));
|
||||
$country_name = notags(trim($_POST['country_name']));
|
||||
|
||||
$keywords = notags(trim($_POST['keywords']));
|
||||
$marital = notags(trim($_POST['marital']));
|
||||
if($marital != $orig[0]['marital'])
|
||||
$maritalchanged = true;
|
||||
|
@ -138,6 +138,7 @@ function profiles_post(&$a) {
|
|||
`homepage` = '%s',
|
||||
`politic` = '%s',
|
||||
`religion` = '%s',
|
||||
`keywords` = '%s',
|
||||
`about` = '%s',
|
||||
`interest` = '%s',
|
||||
`contact` = '%s',
|
||||
|
@ -165,6 +166,7 @@ function profiles_post(&$a) {
|
|||
dbesc($homepage),
|
||||
dbesc($politic),
|
||||
dbesc($religion),
|
||||
dbesc($keywords),
|
||||
dbesc($about),
|
||||
dbesc($interest),
|
||||
dbesc($contact),
|
||||
|
@ -369,6 +371,7 @@ function profiles_content(&$a) {
|
|||
'$homepage' => $r[0]['homepage'],
|
||||
'$politic' => $r[0]['politic'],
|
||||
'$religion' => $r[0]['religion'],
|
||||
'$keywords' => $r[0]['keywords'],
|
||||
'$music' => $r[0]['music'],
|
||||
'$book' => $r[0]['book'],
|
||||
'$tv' => $r[0]['tv'],
|
||||
|
|
|
@ -243,3 +243,7 @@ function update_1023() {
|
|||
ADD `login_date` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `register_date` ");
|
||||
}
|
||||
|
||||
function update_1024() {
|
||||
q("ALTER TABLE `profile` ADD `keywords` TEXT NOT NULL AFTER `religion` ");
|
||||
}
|
||||
|
||||
|
|
|
@ -40,6 +40,7 @@ $gender
|
|||
<div id="profile-edit-dob" >
|
||||
$dob $age
|
||||
</div>
|
||||
</div>
|
||||
<div id="profile-edit-dob-end"></div>
|
||||
|
||||
$hide_friends
|
||||
|
@ -126,6 +127,13 @@ $sexual
|
|||
</div>
|
||||
<div id="profile-edit-religion-end"></div>
|
||||
|
||||
<div id="profile-edit-keywords-wrapper" >
|
||||
<label id="profile-edit-keywords-label" for="profile-edit-keywords" >Keywords: </label>
|
||||
<input type="text" size="32" name="keywords" id="profile-edit-keywords" title="Example: fishing photography software" value="$keywords" />
|
||||
</div><div id="profile-edit-keywords-desc">(Used for searching public profiles, never shown to others)</div>
|
||||
<div id="profile-edit-keywords-end"></div>
|
||||
|
||||
|
||||
<div class="profile-edit-submit-wrapper" >
|
||||
<input type="submit" name="submit" class="profile-edit-submit-button" value="Submit" />
|
||||
</div>
|
||||
|
|
|
@ -720,6 +720,7 @@ input#dfrn-url {
|
|||
#profile-edit-sexual-label,
|
||||
#profile-edit-politic-label,
|
||||
#profile-edit-religion-label,
|
||||
#profile-edit-keywords-label,
|
||||
#profile-edit-homepage-label {
|
||||
float: left;
|
||||
width: 175px;
|
||||
|
@ -738,6 +739,7 @@ input#dfrn-url {
|
|||
#sexual-select,
|
||||
#profile-edit-politic,
|
||||
#profile-edit-religion,
|
||||
#profile-edit-keywords,
|
||||
#profile-in-dir-yes,
|
||||
#profile-in-dir-no,
|
||||
#profile-in-netdir-yes,
|
||||
|
@ -768,6 +770,12 @@ input#dfrn-url {
|
|||
margin-left: 20px;
|
||||
}
|
||||
|
||||
#profile-edit-keywords-desc {
|
||||
float: left;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
|
||||
#profile-edit-homepage {
|
||||
float: left;
|
||||
margin-bottom: 35px;
|
||||
|
@ -800,6 +808,7 @@ input#dfrn-url {
|
|||
#profile-edit-sexual-end,
|
||||
#profile-edit-politic-end,
|
||||
#profile-edit-religion-end,
|
||||
#profile-edit-keywords-end,
|
||||
#profile-edit-homepage-end,
|
||||
#profile-in-dir-break,
|
||||
#profile-in-dir-end,
|
||||
|
|
Loading…
Reference in a new issue