diff options
Diffstat (limited to 'Zotlabs/Update')
-rw-r--r-- | Zotlabs/Update/_1241.php | 19 | ||||
-rw-r--r-- | Zotlabs/Update/_1242.php | 21 | ||||
-rw-r--r-- | Zotlabs/Update/_1243.php | 17 |
3 files changed, 52 insertions, 5 deletions
diff --git a/Zotlabs/Update/_1241.php b/Zotlabs/Update/_1241.php index 5f806b7d1..1b2024aad 100644 --- a/Zotlabs/Update/_1241.php +++ b/Zotlabs/Update/_1241.php @@ -2,14 +2,23 @@ namespace Zotlabs\Update; -require_once('include/account.php'); - class _1241 { function run() { + + q("START TRANSACTION"); - return verify_register_scheme(); + // remove duplicated profile photos + $r = dbq("DELETE FROM photo WHERE imgscale IN (4, 5, 6) AND photo_usage = 0"); + + if($r) { + q("COMMIT"); + return UPDATE_SUCCESS; + } + + q("ROLLBACK"); + return UPDATE_FAILED; + + } - } - } diff --git a/Zotlabs/Update/_1242.php b/Zotlabs/Update/_1242.php new file mode 100644 index 000000000..c2c9a66d0 --- /dev/null +++ b/Zotlabs/Update/_1242.php @@ -0,0 +1,21 @@ +<?php + +namespace Zotlabs\Update; + +class _1242 { + + function run() { + $p = dbq("SELECT * FROM pconfig WHERE k LIKE '%password%'"); + foreach ($p as $pp) { + if ($pp['v'][0] === '{') { + $a = json_decode($pp['v'], true); + if (isset($a['encrypted'])) { + $v = crypto_unencapsulate($a, get_config('system', 'prvkey')); + set_pconfig($pp['uid'], $pp['cat'], $pp['k'], obscurify($v)); + } + } + } + return UPDATE_SUCCESS; + } + +}
\ No newline at end of file diff --git a/Zotlabs/Update/_1243.php b/Zotlabs/Update/_1243.php new file mode 100644 index 000000000..850cb1d6c --- /dev/null +++ b/Zotlabs/Update/_1243.php @@ -0,0 +1,17 @@ +<?php + +namespace Zotlabs\Update; + +class _1243 { + + function run() { + + $x = get_config('system','filesystem_storage_thumbnails'); + del_config('system','filesystem_storage_thumbnails'); + if ($x !== false) + set_config('system','photo_storage_type', intval($x)); + + return UPDATE_SUCCESS; + } + +} |