Merge pull request #2031 from eMerzh/fix_empty_display_name
Avoid to display empty DisplayNames for menu and title
This commit is contained in:
commit
37295deeb7
|
@ -2,7 +2,7 @@
|
||||||
<html class="ng-csp">
|
<html class="ng-csp">
|
||||||
<head>
|
<head>
|
||||||
<title><?php p(!empty($_['application'])?$_['application'].' | ':'') ?>ownCloud
|
<title><?php p(!empty($_['application'])?$_['application'].' | ':'') ?>ownCloud
|
||||||
<?php p(!empty($_['user_displayname'])?' ('.$_['user_displayname'].') ':'') ?></title>
|
<?php p(trim($_['user_displayname']) != '' ?' ('.$_['user_displayname'].') ':'') ?></title>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="apple-itunes-app" content="app-id=543672169">
|
<meta name="apple-itunes-app" content="app-id=543672169">
|
||||||
<link rel="shortcut icon" href="<?php print_unescaped(image_path('', 'favicon.png')); ?>" />
|
<link rel="shortcut icon" href="<?php print_unescaped(image_path('', 'favicon.png')); ?>" />
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
|
|
||||||
<ul id="settings" class="svg">
|
<ul id="settings" class="svg">
|
||||||
<span id="expand">
|
<span id="expand">
|
||||||
<span id="expandDisplayName"><?php p($_['user_displayname']) ?></span>
|
<span id="expandDisplayName"><?php p(trim($_['user_displayname']) != '' ? $_['user_displayname'] : $_['user_uid']) ?></span>
|
||||||
<img class="svg" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" />
|
<img class="svg" src="<?php print_unescaped(image_path('', 'actions/caret.svg')); ?>" />
|
||||||
</span>
|
</span>
|
||||||
<div id="expanddiv">
|
<div id="expanddiv">
|
||||||
|
|
|
@ -31,6 +31,7 @@ class OC_TemplateLayout extends OC_Template {
|
||||||
}
|
}
|
||||||
$user_displayname = OC_User::getDisplayName();
|
$user_displayname = OC_User::getDisplayName();
|
||||||
$this->assign( 'user_displayname', $user_displayname );
|
$this->assign( 'user_displayname', $user_displayname );
|
||||||
|
$this->assign( 'user_uid', OC_User::getUser() );
|
||||||
} else if ($renderas == 'guest' || $renderas == 'error') {
|
} else if ($renderas == 'guest' || $renderas == 'error') {
|
||||||
parent::__construct('core', 'layout.guest');
|
parent::__construct('core', 'layout.guest');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue