2018-02-16 20:42:02 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Zotlabs\Update;
|
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
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) {
|
2021-12-03 03:01:39 +00:00
|
|
|
q(
|
|
|
|
"update attach set is_dir = 1 where id = %d",
|
2021-12-02 23:02:31 +00:00
|
|
|
intval($rr['id'])
|
|
|
|
);
|
|
|
|
}
|
|
|
|
if ($rr['flags'] & 2) {
|
2021-12-03 03:01:39 +00:00
|
|
|
q(
|
|
|
|
"update attach set os_storage = 1 where id = %d",
|
2021-12-02 23:02:31 +00:00
|
|
|
intval($rr['id'])
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-02-16 20:42:02 +00:00
|
|
|
|
2021-12-02 23:02:31 +00:00
|
|
|
return UPDATE_SUCCESS;
|
|
|
|
}
|
2021-12-03 03:01:39 +00:00
|
|
|
}
|