Skip to content

Commit

Permalink
Dev: Notify superadmins after latest db udpate
Browse files Browse the repository at this point in the history
  • Loading branch information
olleharstedt committed Aug 4, 2016
1 parent 837e21e commit e9ca4eb
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions application/helpers/update/updatedb_helper.php
Expand Up @@ -1432,6 +1432,14 @@ function db_upgrade_all($iOldDBVersion, $bSilent=false) {
));
$oDB->createCommand()->createIndex('notif_index', '{{notifications}}', 'entity, entity_id, status', false);
$oDB->createCommand()->update('{{settings_global}}',array('stg_value'=>259),"stg_name='DBVersion'");

// Inform superadmin about update
$superadmins = User::model()->getSuperAdmins();
Notification::broadcast(array(
'title' => gT('Database update'),
'message' => gT('The database has been updated to version 259. New version includes notification system.')
), $superadmins);

}

$oTransaction->commit();
Expand Down

0 comments on commit e9ca4eb

Please sign in to comment.