mirror of
https://github.com/owncloudarchive/contacts.git
synced 2025-01-18 07:52:21 +01:00
Make sure all address books are activated on upgrade.
Workaround for the regression that address books can't be (de)activated.
This commit is contained in:
parent
eba736a03b
commit
143a97f832
@ -1,7 +1,12 @@
|
||||
<?php
|
||||
|
||||
$installedVersion=OCP\Config::getAppValue('contacts', 'installed_version');
|
||||
if (version_compare($installedVersion, '0.2.3', '<')) {
|
||||
if (version_compare($installedVersion, '0.2.5', '>=')) {
|
||||
// Set all address books active as (de)activating went awol at rewrite.
|
||||
$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*contacts_addressbooks` SET `active`= 1' );
|
||||
$result = $stmt->execute(array());
|
||||
}
|
||||
elseif (version_compare($installedVersion, '0.2.4', '==')) {
|
||||
// First set all address books in-active.
|
||||
$stmt = OCP\DB::prepare( 'UPDATE `*PREFIX*contacts_addressbooks` SET `active`=0' );
|
||||
$result = $stmt->execute(array());
|
||||
|
Loading…
x
Reference in New Issue
Block a user