aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs/Update/_1144.php
blob: 848897de7d40a4b981b4ba08b8359975b529a749 (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 _1144 {
function run() {
	$r = q("select flags, id from attach where flags != 0");
	if($r) {
		foreach($r as $rr) {
			if($rr['flags'] & 1) {
				q("update attach set is_dir = 1 where id = %d",
					intval($rr['id'])
				);
			}
			if($rr['flags'] & 2) {
				q("update attach set os_storage = 1 where id = %d",
					intval($rr['id'])
				);
			}
		}
	}

	return UPDATE_SUCCESS;
}


}