diff options
author | Bart Visscher <bartv@thisnet.nl> | 2013-02-07 18:07:27 +0100 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2013-02-07 18:07:27 +0100 |
commit | 20b6cb28b16fd663ea386fd6faf6c3129a97f42b (patch) | |
tree | 29b29046b25628712fb59146e8ff94d47a9f2779 | |
parent | e969a78cf998a6a5607e605d65b7bf1b35259cb8 (diff) | |
download | nextcloud-server-20b6cb28b16fd663ea386fd6faf6c3129a97f42b.tar.gz nextcloud-server-20b6cb28b16fd663ea386fd6faf6c3129a97f42b.zip |
Fix warning with displayname in user layout template
-rw-r--r-- | core/templates/layout.user.php | 2 | ||||
-rw-r--r-- | lib/templatelayout.php | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/core/templates/layout.user.php b/core/templates/layout.user.php index 2547278547f..ecba54497c7 100644 --- a/core/templates/layout.user.php +++ b/core/templates/layout.user.php @@ -1,7 +1,7 @@ <!DOCTYPE html> <html> <head> - <title><?php echo isset($_['application']) && !empty($_['application'])?$_['application'].' | ':'' ?>ownCloud <?php echo OC_User::getDisplayName()?' ('.OC_Util::sanitizeHTML(OC_User::getDisplayName()).') ':'' ?></title> + <title><?php echo !empty($_['application'])?$_['application'].' | ':'' ?>ownCloud <?php echo !empty($_['user_displayname'])?' ('.$_['user_displayname'].') ':'' ?></title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="apple-itunes-app" content="app-id=543672169"> <link rel="shortcut icon" href="<?php echo image_path('', 'favicon.png'); ?>" /><link rel="apple-touch-icon-precomposed" href="<?php echo image_path('', 'favicon-touch.png'); ?>" /> diff --git a/lib/templatelayout.php b/lib/templatelayout.php index 37ece91047f..28bdca6be0a 100644 --- a/lib/templatelayout.php +++ b/lib/templatelayout.php @@ -19,6 +19,7 @@ class OC_TemplateLayout extends OC_Template { } // Add navigation entry + $this->assign( 'application', '', false ); $navigation = OC_App::getNavigation(); $this->assign( 'navigation', $navigation, false); $this->assign( 'settingsnavigation', OC_App::getSettingsNavigation(), false); @@ -28,6 +29,8 @@ class OC_TemplateLayout extends OC_Template { break; } } + $user_displayname = OC_User::getDisplayName(); + $this->assign( 'user_displayname', $user_displayname ); } else if ($renderas == 'guest') { parent::__construct('core', 'layout.guest'); } else { |