Commit 544c62b7 authored by Christopher Tombleson's avatar Christopher Tombleson
Browse files

Use institution display name (Bug #941551)



Replace institution name with institution display name.

Change-Id: Id1c358802b22665b300601062056c72f39a71723
Signed-off-by: default avatarChristopher Tombleson <christopher@catalyst.net.nz>
parent 7f2cda97
......@@ -30,6 +30,7 @@ require_once(get_config('docroot') . 'auth/lib.php');
require_once(get_config('libroot') . 'peer.php');
require_once(get_config('libroot') . 'applicationset.php');
require_once(get_config('docroot') . 'api/xmlrpc/lib.php');
require_once(get_config('libroot') . 'institution.php');
/**
* The XMLRPC authentication method, which authenticates users against the
......@@ -108,7 +109,7 @@ class AuthXmlrpc extends Auth {
$peer = get_peer($remotewwwroot);
if ($peer->deleted != 0 || $this->config['theyssoin'] != 1) {
throw new XmlrpcClientException('We don\'t accept SSO connections from ' . $peer->name);
throw new XmlrpcClientException('We don\'t accept SSO connections from ' . institution_display_name($peer->name));
}
$client = new Client();
......
......@@ -2431,6 +2431,7 @@ function profile_sideblock() {
global $USER, $SESSION;
safe_require('notification', 'internal');
require_once('group.php');
require_once('institution.php');
$data = array(
'id' => $USER->get('id'),
'myname' => display_name($USER, null, true),
......@@ -2444,7 +2445,7 @@ function profile_sideblock() {
if ($authobj->authname == 'xmlrpc') {
$peer = get_peer($authobj->wwwroot);
if ($SESSION->get('mnetuser')) {
$data['mnetloggedinfrom'] = get_string('youhaveloggedinfrom', 'auth.xmlrpc', $authobj->wwwroot, $peer->name);
$data['mnetloggedinfrom'] = get_string('youhaveloggedinfrom', 'auth.xmlrpc', $authobj->wwwroot, institution_display_name($peer->name));
}
else {
$data['peer'] = array('name' => $peer->name, 'wwwroot' => $peer->wwwroot);
......
......@@ -35,6 +35,7 @@ require(dirname(dirname(__FILE__)) . '/init.php');
require_once(get_config('libroot') . 'view.php');
require_once(get_config('libroot') . 'collection.php');
require_once('institution.php');
require_once('group.php');
safe_require('artefact', 'comment');
......@@ -310,7 +311,7 @@ if ($mnetviewlist = $SESSION->get('mnetviewaccess')) {
require_once(get_config('docroot') . 'api/xmlrpc/lib.php');
if ($peer = get_peer_from_instanceid($SESSION->get('authinstance'))) {
$smarty->assign('mnethost', array(
'name' => $peer->name,
'name' => institution_display_name($peer->name),
'url' => $returnurl ? $returnurl : $peer->wwwroot,
));
}
......
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