add fulltext index on keywords, missed some directory localisations

This commit is contained in:
Friendika 2011-03-22 16:34:12 -07:00
parent 8f31935b7d
commit e0202d82a1
4 changed files with 15 additions and 5 deletions

View File

@ -4,7 +4,7 @@ set_time_limit(0);
define ( 'FRIENDIKA_VERSION', '2.1.926' );
define ( 'DFRN_PROTOCOL_VERSION', '2.1' );
define ( 'DB_UPDATE_VERSION', 1044 );
define ( 'DB_UPDATE_VERSION', 1045 );
define ( 'EOL', "<br />\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );

View File

@ -315,7 +315,9 @@ CREATE TABLE IF NOT EXISTS `profile` (
`thumb` char(255) NOT NULL,
`publish` tinyint(1) NOT NULL DEFAULT '0',
`net-publish` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
PRIMARY KEY (`id`),
FULLTEXT KEY `pub_keywords` (`pub_keywords`),
FULLTEXT KEY `prv_keywords` (`prv_keywords`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------

View File

@ -86,10 +86,10 @@ function directory_content(&$a) {
}
if(strlen($rr['dob'])) {
if(($years = age($rr['dob'],$rr['timezone'],'')) != 0)
$details .= "<br />Age: $years" ;
$details .= '<br />' . t('Age: ') . $years ;
}
if(strlen($rr['gender']))
$details .= '<br />Gender: ' . $rr['gender'];
$details .= '<br />' . t('Gender: ') . $rr['gender'];
$entry = replace_macros($tpl,array(
'$id' => $rr['id'],
@ -115,7 +115,7 @@ function directory_content(&$a) {
}
else
notice("No entries (some entries may be hidden).");
notice( t("No entries \x28some entries may be hidden\x29.") . EOL);
return $o;
}

View File

@ -410,3 +410,11 @@ function update_1042() {
function update_1043() {
q("ALTER TABLE `user` ADD `blockwall` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `blocked` ");
}
function update_1044() {
q("ALTER TABLE `profile` ADD FULLTEXT ( `pub_keywords` ) ");
q("ALTER TABLE `profile` ADD FULLTEXT ( `prv_keywords` ) ");
}