diff options
Diffstat (limited to 'Zotlabs')
-rw-r--r-- | Zotlabs/Lib/Libzot.php | 3 | ||||
-rw-r--r-- | Zotlabs/Update/_1241.php | 24 |
2 files changed, 25 insertions, 2 deletions
diff --git a/Zotlabs/Lib/Libzot.php b/Zotlabs/Lib/Libzot.php index 8847f0975..150a6af03 100644 --- a/Zotlabs/Lib/Libzot.php +++ b/Zotlabs/Lib/Libzot.php @@ -667,9 +667,8 @@ class Libzot { $arr['connect_url'] = ''; if ($r) { - if ($arr['photo'] && array_key_exists('updated', $arr['photo']) && $r[0]['xchan_photo_date'] != $arr['photo']['updated']) { + if ($arr['photo'] && array_key_exists('updated', $arr['photo']) && $arr['photo']['updated'] > $r[0]['xchan_photo_date']) $import_photos = true; - } // if we import an entry from a site that's not ours and either or both of us is off the grid - hide the entry. /** @TODO: check if we're the same directory realm, which would mean we are allowed to see it */ diff --git a/Zotlabs/Update/_1241.php b/Zotlabs/Update/_1241.php new file mode 100644 index 000000000..1b2024aad --- /dev/null +++ b/Zotlabs/Update/_1241.php @@ -0,0 +1,24 @@ +<?php + +namespace Zotlabs\Update; + +class _1241 { + + function run() { + + q("START TRANSACTION"); + + // 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; + + } + +} |