Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
4dc30b0b
Commit
4dc30b0b
authored
Oct 10, 2007
by
Nigel McNie
Browse files
Merge branch 'master' of
git+ssh://git.catalyst.net.nz/git/public/mahara
parents
c1108e71
57bf3b79
Changes
5
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/internal/lib.php
View file @
4dc30b0b
...
@@ -481,12 +481,10 @@ class ArtefactTypeTown extends ArtefactTypeProfileField {}
...
@@ -481,12 +481,10 @@ class ArtefactTypeTown extends ArtefactTypeProfileField {}
class
ArtefactTypeCity
extends
ArtefactTypeProfileField
{}
class
ArtefactTypeCity
extends
ArtefactTypeProfileField
{}
class
ArtefactTypeCountry
extends
ArtefactTypeProfileField
{
class
ArtefactTypeCountry
extends
ArtefactTypeProfileField
{
public
function
listself
(
$options
)
{
public
function
listself
(
$options
)
{
$countries
=
getoptions_country
();
return
array
(
'html'
=>
get_string
(
"country.
{
$this
->
title
}
"
),
'javascript'
=>
null
);
return
array
(
'html'
=>
$countries
[
$this
->
title
],
'javascript'
=>
null
);
}
}
public
function
render_full
(
$options
)
{
public
function
render_full
(
$options
)
{
$countries
=
getoptions_country
();
return
array
(
'html'
=>
get_string
(
"country.
{
$this
->
title
}
"
),
'javascript'
=>
null
);
return
array
(
'html'
=>
$countries
[
$this
->
title
],
'javascript'
=>
null
);
}
}
}
}
class
ArtefactTypeHomenumber
extends
ArtefactTypeProfileField
{}
class
ArtefactTypeHomenumber
extends
ArtefactTypeProfileField
{}
...
...
htdocs/lib/searchlib.php
View file @
4dc30b0b
...
@@ -106,6 +106,9 @@ function search_user($query_string, $limit, $offset = 0) {
...
@@ -106,6 +106,9 @@ function search_user($query_string, $limit, $offset = 0) {
$result
[
$field
]
=
$value
;
$result
[
$field
]
=
$value
;
}
}
}
}
if
(
isset
(
$result
[
'country'
]))
{
$result
[
'country'
]
=
get_string
(
'country.'
.
$result
[
'country'
]);
}
}
}
}
}
...
...
htdocs/lib/web.php
View file @
4dc30b0b
...
@@ -794,7 +794,7 @@ function getoptions_country() {
...
@@ -794,7 +794,7 @@ function getoptions_country() {
if
(
!
empty
(
$countries
))
{
if
(
!
empty
(
$countries
))
{
return
$countries
;
return
$countries
;
}
}
$co
untri
es
=
array
(
$co
d
es
=
array
(
'af'
,
'af'
,
'ax'
,
'ax'
,
'al'
,
'al'
,
...
@@ -1040,10 +1040,10 @@ function getoptions_country() {
...
@@ -1040,10 +1040,10 @@ function getoptions_country() {
'zw'
,
'zw'
,
);
);
$countries
=
array_map
(
foreach
(
$codes
as
$c
)
{
create_function
(
'$a'
,
'return
get_string("country.{$
a
}");
'
),
$countries
[
$c
]
=
get_string
(
"country.
{
$
c
}
"
);
$countries
};
);
uasort
(
$countries
,
'strcoll'
);
return
$countries
;
return
$countries
;
}
}
...
...
htdocs/search/solr/readme.txt
0 → 100644
View file @
4dc30b0b
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.
htdocs/user/view.php
View file @
4dc30b0b
...
@@ -110,6 +110,9 @@ foreach (array_keys($publicfields) as $field) {
...
@@ -110,6 +110,9 @@ foreach (array_keys($publicfields) as $field) {
}
}
}
}
}
}
if
(
isset
(
$userfields
[
'country'
]))
{
$userfields
[
'country'
]
=
get_string
(
'country.'
.
$userfields
[
'country'
]);
}
// Get viewable views
// Get viewable views
$views
=
array
();
$views
=
array
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment