Commit 4dc30b0b authored by Nigel McNie's avatar Nigel McNie
Browse files
parents c1108e71 57bf3b79
......@@ -481,12 +481,10 @@ class ArtefactTypeTown extends ArtefactTypeProfileField {}
class ArtefactTypeCity extends ArtefactTypeProfileField {}
class ArtefactTypeCountry extends ArtefactTypeProfileField {
public function listself($options) {
$countries = getoptions_country();
return array('html' => $countries[$this->title], 'javascript' => null);
return array('html' => get_string("country.{$this->title}"), 'javascript' => null);
}
public function render_full($options) {
$countries = getoptions_country();
return array('html' => $countries[$this->title], 'javascript' => null);
return array('html' => get_string("country.{$this->title}"), 'javascript' => null);
}
}
class ArtefactTypeHomenumber extends ArtefactTypeProfileField {}
......
......@@ -106,6 +106,9 @@ function search_user($query_string, $limit, $offset = 0) {
$result[$field] = $value;
}
}
if (isset($result['country'])) {
$result['country'] = get_string('country.' . $result['country']);
}
}
}
......
......@@ -794,7 +794,7 @@ function getoptions_country() {
if (!empty($countries)) {
return $countries;
}
$countries = array(
$codes = array(
'af',
'ax',
'al',
......@@ -1040,10 +1040,10 @@ function getoptions_country() {
'zw',
);
$countries = array_map(
create_function('$a', 'return get_string("country.{$a}");'),
$countries
);
foreach ($codes as $c) {
$countries[$c] = get_string("country.{$c}");
};
uasort($countries, 'strcoll');
return $countries;
}
......
To install & activate the Mahara solr plugin using Solr 1.2 from the
solr-tomcat5.5 debian package:
For existing Maharas, make sure $cfg->searchplugin does not appear in
config.php
As admin, set searchplugin to 'Solr' in site options, and in plugin
administration, set the Solr URL. For tomcat this will usually be
something like http://foo.com:8150/solr/. For the jetty package, the
default port is 8983.
In the solr installation, edit /etc/solr/conf/solrconfig.xml.
Comment out
<requestHandler name="/update" class="solr.XmlUpdateRequestHandler" />
Change handleSelect to "false" in
<requestDispatcher handleSelect="true" >
Copy the schema.xml file in this directory into /etc/solr/conf/ on the
solr server.
......@@ -110,6 +110,9 @@ foreach (array_keys($publicfields) as $field) {
}
}
}
if (isset($userfields['country'])) {
$userfields['country'] = get_string('country.' . $userfields['country']);
}
// Get viewable views
$views = array();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment