diff options
author | Raghu Nayyar <me@iraghu.com> | 2013-04-26 21:12:38 -0700 |
---|---|---|
committer | Raghu Nayyar <me@iraghu.com> | 2013-04-26 21:12:38 -0700 |
commit | 2bcb64e7813e5118676958a79910cdb604f9439b (patch) | |
tree | 0e892caa817759417df4f37f2e7bae9eea521a27 /lib/templatelayout.php | |
parent | 7b2c64236ce3ddd6cf1a09c67745a8f7ab9c356b (diff) | |
parent | b6fee2d25794ff3214e1bbf857861f6d681c4cf2 (diff) | |
download | nextcloud-server-2bcb64e7813e5118676958a79910cdb604f9439b.tar.gz nextcloud-server-2bcb64e7813e5118676958a79910cdb604f9439b.zip |
Merge pull request #3114 from owncloud/update-notification
Add an update notification
Diffstat (limited to 'lib/templatelayout.php')
-rw-r--r-- | lib/templatelayout.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/templatelayout.php b/lib/templatelayout.php index 686a38a7386..d385bb7f19d 100644 --- a/lib/templatelayout.php +++ b/lib/templatelayout.php @@ -18,6 +18,20 @@ class OC_TemplateLayout extends OC_Template { $this->assign('bodyid', 'body-user'); } + // Update notification + if(OC_Config::getValue('updatechecker', true) === true) { + $data=OC_Updater::check(); + if(isset($data['version']) && $data['version'] != '' and $data['version'] !== Array() && OC_User::isAdminUser(OC_User::getUser())) { + $this->assign('updateAvailable', true); + $this->assign('updateVersion', $data['versionstring']); + $this->assign('updateLink', $data['web']); + } else { + $this->assign('updateAvailable', false); // No update available or not an admin user + } + } else { + $this->assign('updateAvailable', false); // Update check is disabled + } + // Add navigation entry $this->assign( 'application', '', false ); $navigation = OC_App::getNavigation(); |