aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1241.php
diff options
context:
space:
mode:
authorMax Kostikov <max@kostikov.co>2021-01-23 14:00:38 +0100
committerMax Kostikov <max@kostikov.co>2021-01-23 14:00:38 +0100
commit33951dc1e4695bece701b85275d4c282c1936150 (patch)
tree8af2c3191c3211bac73440f56219044c4bdcc503 /Zotlabs/Update/_1241.php
parent893847c649a9f3eb99cbaa8fc3bb795bc3184b7a (diff)
downloadvolse-hubzilla-33951dc1e4695bece701b85275d4c282c1936150.tar.gz
volse-hubzilla-33951dc1e4695bece701b85275d4c282c1936150.tar.bz2
volse-hubzilla-33951dc1e4695bece701b85275d4c282c1936150.zip
Remove duplicated profile photos
Diffstat (limited to 'Zotlabs/Update/_1241.php')
-rw-r--r--Zotlabs/Update/_1241.php24
1 files changed, 24 insertions, 0 deletions
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;
+
+ }
+
+}