aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-07-30 17:16:23 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-07-30 17:16:23 -0700
commitec41899328bc2a5de4be089268501e4f80c84e13 (patch)
tree2ffc5f0ea52d5c1d244a59d205e552417d76c047 /install
parent26411ab385f77b2edaa5edd4b33fbaff60789fd4 (diff)
downloadvolse-hubzilla-ec41899328bc2a5de4be089268501e4f80c84e13.tar.gz
volse-hubzilla-ec41899328bc2a5de4be089268501e4f80c84e13.tar.bz2
volse-hubzilla-ec41899328bc2a5de4be089268501e4f80c84e13.zip
update some of the old attach.flag values to the new schema
Diffstat (limited to 'install')
-rw-r--r--install/update.php17
1 files changed, 16 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php
index 0f9ec4c79..e8c4f578e 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1669,6 +1669,21 @@ function update_r1143() {
}
function update_r1144() {
- // hubzilla update does not apply here, but we're keeping the numbers in sync
+ $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;
} \ No newline at end of file