aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1219.php
blob: be253400100e49b0692d760ccf0089eb29a971c1 (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
<?php

namespace Zotlabs\Update;

class _1219 {

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

		$r = q("DELETE FROM xchan WHERE
			xchan_hash like '%s' AND
			xchan_network = 'activitypub'",
			dbesc(z_root()) . '%'
		);

		if($r) {
			q("COMMIT");
			return UPDATE_SUCCESS;
		}
		else {        
			q("ROLLBACK");
			return UPDATE_FAILED;
		}
	}

}