Commit 947131d7 by Robert Lyon

Bug 1735252: Index and display the actualy country name rather than ISO code

So we can search for 'Zealand' insdead of 'nz' and get country profile result
and the country profile field shows 'New Zealand' instead of 'nz'

behatnotneeded

Change-Id: Id17a645f176653482346635aa6ace879e9a33063
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent c06a3565
......@@ -214,6 +214,10 @@ class ElasticsearchType_artefact extends ElasticsearchType {
$terms = explode ( "|", $map [$record->artefacttype] );
$record->mainfacetterm = $terms [2];
$record->secfacetterm = $terms [1];
if ($record->artefacttype == 'country') {
// We need to index the actual name and not the iso code
$record->title = get_string("country.{$record->title}");
}
require_once( get_config ( 'docroot' ) . 'artefact/resume/lib.php' );
if (PluginArtefactResume::is_active ()) {
......@@ -278,6 +282,10 @@ class ElasticsearchType_artefact extends ElasticsearchType {
"\n",
"\r"
), ' ', strip_tags ( $record->title ) );
if ($record->artefacttype == 'country') {
// We need to display the actual name and not the iso code
$record->title = get_string("country.{$record->title}");
}
$record->description = str_replace ( array (
"\r\n",
"\n",
......
Markdown is supported
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