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

namespace Zotlabs\Update;

class _1246 {

	function run() {

		q("START TRANSACTION");

		$r1 = dbq("UPDATE xchan SET xchan_deleted = 2 WHERE xchan_network = 'zot' AND xchan_deleted = 0");
		$r2 = dbq("UPDATE hubloc SET hubloc_deleted = 2 WHERE hubloc_network = 'zot' AND hubloc_deleted = 0");

		if($r1 && $r2) {
			q("COMMIT");
			return UPDATE_SUCCESS;
		}

		q("ROLLBACK");
		return UPDATE_FAILED;

	}

}