From dea0bfd01f8a4a937ee9dbac2a995944bfee0b0e Mon Sep 17 00:00:00 2001 From: Jeroen De meerleer Date: Sun, 7 Jul 2019 22:36:14 +0200 Subject: [PATCH 1/8] changed unavailable to In a relation, deleted available --- src/Content/ContactSelector.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Content/ContactSelector.php b/src/Content/ContactSelector.php index 22bfe08b5..2b86a6e75 100644 --- a/src/Content/ContactSelector.php +++ b/src/Content/ContactSelector.php @@ -231,8 +231,7 @@ class ContactSelector '' => L10n::t('No answer'), 'Single' => L10n::t('Single'), 'Lonely' => L10n::t('Lonely'), - 'Available' => L10n::t('Available'), - 'Unavailable' => L10n::t('Unavailable'), + 'In a relation' => L10n::t('In a relation'), 'Has crush' => L10n::t('Has crush'), 'Infatuated' => L10n::t('Infatuated'), 'Dating' => L10n::t('Dating'), From 9c8051ef648782adcc97f5cbf9fa2c6f8364135b Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Sun, 7 Jul 2019 23:06:37 +0200 Subject: [PATCH 2/8] Created updatescript --- config/dbstructure.config.php | 2 +- update.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/config/dbstructure.config.php b/config/dbstructure.config.php index 3c2b81352..284a6ae8a 100755 --- a/config/dbstructure.config.php +++ b/config/dbstructure.config.php @@ -34,7 +34,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1316); + define('DB_UPDATE_VERSION', 1317); } return [ diff --git a/update.php b/update.php index aead1b93d..0c6b4393e 100644 --- a/update.php +++ b/update.php @@ -374,3 +374,13 @@ function update_1315() { DBA::delete('item-delivery-data', ['postopts' => '', 'inform' => '', 'queue_count' => 0, 'queue_done' => 0]); } + +function update_1316() +{ + DBA::update('profile', ['marital' => "In a relation"], ['marital' => "Unavailable"]); + DBA::update('profile', ['marital' => "Single"], ['marital' => "Available"]); + + Worker::add(PRIORITY_LOW, 'ProfileUpdate'); + Contact::updateSelfFromUserID(); + GContact::updateForUser(); +} \ No newline at end of file From 884638c0938b54f05f8fb5ae942ed6e51d33b19b Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Sun, 7 Jul 2019 23:14:03 +0200 Subject: [PATCH 3/8] Whoops --- update.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update.php b/update.php index 0c6b4393e..6ce4b7e87 100644 --- a/update.php +++ b/update.php @@ -375,7 +375,7 @@ function update_1315() DBA::delete('item-delivery-data', ['postopts' => '', 'inform' => '', 'queue_count' => 0, 'queue_done' => 0]); } -function update_1316() +function update_1317() { DBA::update('profile', ['marital' => "In a relation"], ['marital' => "Unavailable"]); DBA::update('profile', ['marital' => "Single"], ['marital' => "Available"]); From e33733f2977e796f5c3531b45fda9019ca574090 Mon Sep 17 00:00:00 2001 From: Jeroen De meerleer Date: Mon, 8 Jul 2019 00:00:48 +0200 Subject: [PATCH 4/8] not needed update contacts as marital status is not there --- update.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/update.php b/update.php index 6ce4b7e87..1690e0434 100644 --- a/update.php +++ b/update.php @@ -381,6 +381,4 @@ function update_1317() DBA::update('profile', ['marital' => "Single"], ['marital' => "Available"]); Worker::add(PRIORITY_LOW, 'ProfileUpdate'); - Contact::updateSelfFromUserID(); - GContact::updateForUser(); -} \ No newline at end of file +} From 898fd0353b6810b34769addf6e5faed9a823056f Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 8 Jul 2019 07:45:59 +0200 Subject: [PATCH 5/8] Updated DB_UPDATE_VERSION request by mrpetovan --- config/dbstructure.config.php | 2 +- update.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/dbstructure.config.php b/config/dbstructure.config.php index 284a6ae8a..01ea0c5bc 100755 --- a/config/dbstructure.config.php +++ b/config/dbstructure.config.php @@ -34,7 +34,7 @@ use Friendica\Database\DBA; if (!defined('DB_UPDATE_VERSION')) { - define('DB_UPDATE_VERSION', 1317); + define('DB_UPDATE_VERSION', 1318); } return [ diff --git a/update.php b/update.php index 1690e0434..65589b372 100644 --- a/update.php +++ b/update.php @@ -375,7 +375,7 @@ function update_1315() DBA::delete('item-delivery-data', ['postopts' => '', 'inform' => '', 'queue_count' => 0, 'queue_done' => 0]); } -function update_1317() +function update_1318() { DBA::update('profile', ['marital' => "In a relation"], ['marital' => "Unavailable"]); DBA::update('profile', ['marital' => "Single"], ['marital' => "Available"]); From 98b6764bfdb970c5751cd4e41dcc3538299eceb4 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 8 Jul 2019 08:11:53 +0200 Subject: [PATCH 6/8] Fixed DB_UPDATE_VERSION in database.sql thanks @nupplaphil --- database.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database.sql b/database.sql index 7dc24b603..95da79d2f 100644 --- a/database.sql +++ b/database.sql @@ -1,6 +1,6 @@ -- ------------------------------------------ -- Friendica 2019.09-dev (Dalmatian Bellflower) --- DB_UPDATE_VERSION 1316 +-- DB_UPDATE_VERSION 1318 -- ------------------------------------------ From 9af20096a3cae87b241282b9ded002ff4ae9c6be Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 8 Jul 2019 09:34:25 +0200 Subject: [PATCH 7/8] Added `return Update::Success` --- update.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/update.php b/update.php index 65589b372..3ff2a216e 100644 --- a/update.php +++ b/update.php @@ -373,6 +373,7 @@ function update_1309() function update_1315() { DBA::delete('item-delivery-data', ['postopts' => '', 'inform' => '', 'queue_count' => 0, 'queue_done' => 0]); + return Update::Success; } function update_1318() @@ -381,4 +382,5 @@ function update_1318() DBA::update('profile', ['marital' => "Single"], ['marital' => "Available"]); Worker::add(PRIORITY_LOW, 'ProfileUpdate'); + return Update::Success; } From 0b2f5be1c08000af510d9ddf69939136176d6d97 Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Mon, 8 Jul 2019 09:35:32 +0200 Subject: [PATCH 8/8] code style --- update.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/update.php b/update.php index 3ff2a216e..523232ef3 100644 --- a/update.php +++ b/update.php @@ -373,7 +373,7 @@ function update_1309() function update_1315() { DBA::delete('item-delivery-data', ['postopts' => '', 'inform' => '', 'queue_count' => 0, 'queue_done' => 0]); - return Update::Success; + return Update::Success; } function update_1318() @@ -382,5 +382,5 @@ function update_1318() DBA::update('profile', ['marital' => "Single"], ['marital' => "Available"]); Worker::add(PRIORITY_LOW, 'ProfileUpdate'); - return Update::Success; + return Update::Success; }