aboutsummaryrefslogtreecommitdiffstats
path: root/install/update.php
diff options
context:
space:
mode:
authorredmatrix <redmatrix@redmatrix.me>2015-05-14 22:12:56 -0700
committerredmatrix <redmatrix@redmatrix.me>2015-05-14 22:12:56 -0700
commitf0cb3cba124e637fa46143b692dbb561d4ee3ae0 (patch)
tree4f68c7be82a55db67083c4618fa6dfa227994713 /install/update.php
parenta6cb90c81c29663e96d4fd96acd43fde1c28ac15 (diff)
parent291f3beccfa6aede56cd2df811701fecbbdbbbc1 (diff)
downloadvolse-hubzilla-f0cb3cba124e637fa46143b692dbb561d4ee3ae0.tar.gz
volse-hubzilla-f0cb3cba124e637fa46143b692dbb561d4ee3ae0.tar.bz2
volse-hubzilla-f0cb3cba124e637fa46143b692dbb561d4ee3ae0.zip
Merge branch 'master' into tres
Diffstat (limited to 'install/update.php')
-rw-r--r--install/update.php25
1 files changed, 23 insertions, 2 deletions
diff --git a/install/update.php b/install/update.php
index 36aa20373..13dd004c9 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1140 );
+define( 'UPDATE_VERSION' , 1141 );
/**
*
@@ -1602,4 +1602,25 @@ function update_r1139() {
return UPDATE_SUCCESS;
return UPDATE_FAILED;
-} \ No newline at end of file
+}
+
+function update_r1140() {
+ $r = q("select * from clients where true");
+ $x = false;
+ if($r) {
+ foreach($r as $rr) {
+ $m = q("INSERT INTO xperm (xp_client, xp_channel, xp_perm) VALUES ('%s', %d, '%s') ",
+ dbesc($rr['client_id']),
+ intval($rr['uid']),
+ dbesc('all')
+ );
+ if(! $m)
+ $x = true;
+ }
+ }
+ if($x)
+ return UPDATE_FAILED;
+ return UPDATE_SUCCESS;
+}
+
+