aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1239.php
blob: ed8de30bbb7bdf15d161ff6d66cb4a221f9a212e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php

namespace Zotlabs\Update;

class _1239 {

	function run() {
	
		dbq("START TRANSACTION");

		// remove broken activitypub hubloc entries
		$r = dbq("DELETE FROM hubloc WHERE hubloc_network = 'activitypub' and hubloc_callback = ''");

		// remove broken hubloc entries from friendica
		$r1 = dbq("DELETE FROM hubloc WHERE hubloc_hash = ''");

		if($r && $r1) {
			dbq("COMMIT");
			return UPDATE_SUCCESS;
		}

		dbq("ROLLBACK");
		return UPDATE_FAILED;

	}

}