streams/Zotlabs/Update/_1144.php
2021-12-03 14:01:39 +11:00

29 lines
697 B
PHP

<?php
namespace Zotlabs\Update;
class _1144
{
public 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;
}
}