diff --git a/application/core/Survey_Common_Action.php b/application/core/Survey_Common_Action.php
index e0a2ac589a9..360e9d1078d 100644
--- a/application/core/Survey_Common_Action.php
+++ b/application/core/Survey_Common_Action.php
@@ -389,46 +389,9 @@ protected function _updatenotification()
if (!Yii::app()->user->isGuest && Yii::app()->getConfig('updatable')) {
$updateModel = new UpdateForm();
$updateNotification = $updateModel->updateNotification;
- $urlUpdate = Yii::app()->createUrl("admin/update");
- $currentVersion = Yii::app()->getConfig("buildnumber");
- $superadmins = User::model()->getSuperAdmins();
if ($updateNotification->result) {
- if ($updateNotification->security_update) {
- UniqueNotification::broadcast(
- array(
- 'title' => gT('Security update!')." (".gT("Current version: ")
- . $currentVersion.")",
- 'message' => gT('A security update is available.')." "
- . gT('Click here to use ComfortUpdate.')."",
- 'importance' => Notification::HIGH_IMPORTANCE
- ),
- $superadmins
- );
- } elseif (Yii::app()->session['unstable_update']) {
- UniqueNotification::broadcast(
- array(
- 'title' => gT('New UNSTABLE update available')." ("
- . gT("Current version: ").$currentVersion.")",
- 'markAsNew' => false,
- 'message' => gT('A security update is available.').""
- . gT('Click here to use ComfortUpdate.')."",
- 'importance' => Notification::HIGH_IMPORTANCE
- ),
- $superadmins
- );
- } else {
- UniqueNotification::broadcast(
- array(
- 'title' => gT('New update available')." (".gT("Current version: ").$currentVersion.")",
- 'markAsNew' => false,
- 'message' => gT('A security update is available.').""
- . gT('Click here to use ComfortUpdate.')."",
- 'importance' => Notification::HIGH_IMPORTANCE
- ),
- $superadmins
- );
- }
+ return $this->getController()->renderPartial("/admin/update/_update_notification", array('security_update_available'=>$updateNotification->security_update));
}
}
}