mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-22 10:15:19 +00:00
29 lines
697 B
PHP
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;
|
|
}
|
|
}
|