aboutsummaryrefslogtreecommitdiffstats
path: root/install/update.php
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2015-08-03 21:53:01 +0200
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2015-08-03 21:53:01 +0200
commit5adb41a0edd22c7ec9519ab0cdb5c06dda7140ff (patch)
treed3012cd1acd070372f3afb1403268c1506c8b584 /install/update.php
parent98fa996b3f5125b60e2653bca2218b08041ad6a4 (diff)
parentdb70c76494997dfda4f850b4ee63ddae2c608bde (diff)
downloadvolse-hubzilla-5adb41a0edd22c7ec9519ab0cdb5c06dda7140ff.tar.gz
volse-hubzilla-5adb41a0edd22c7ec9519ab0cdb5c06dda7140ff.tar.bz2
volse-hubzilla-5adb41a0edd22c7ec9519ab0cdb5c06dda7140ff.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'install/update.php')
-rw-r--r--install/update.php22
1 files changed, 21 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php
index fb49e9a16..e8c4f578e 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1144 );
+define( 'UPDATE_VERSION' , 1145 );
/**
*
@@ -1666,4 +1666,24 @@ function update_r1143() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
+}
+
+function update_r1144() {
+ $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