aboutsummaryrefslogtreecommitdiffstats
path: root/install/update.php
diff options
context:
space:
mode:
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 c36864908..d6953cdbc 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1130 );
+define( 'UPDATE_VERSION' , 1131 );
/**
*
@@ -1464,3 +1464,23 @@ function update_r1129() {
return UPDATE_FAILED;
}
+function update_r1130() {
+ $myperms = PERMS_R_STREAM|PERMS_R_PROFILE|PERMS_R_PHOTOS|PERMS_R_ABOOK
+ |PERMS_W_STREAM|PERMS_W_WALL|PERMS_W_COMMENT|PERMS_W_MAIL|PERMS_W_CHAT
+ |PERMS_R_STORAGE|PERMS_R_PAGES|PERMS_W_LIKE;
+
+ $r = q("select abook_channel, abook_my_perms from abook where (abook_flags & %d) and abook_my_perms != 0",
+ intval(ABOOK_FLAG_SELF)
+ );
+ if($r) {
+ foreach($r as $rr) {
+ set_pconfig($rr['abook_channel'],'system','autoperms',$rr['abook_my_perms']);
+ }
+ }
+ $r = q("update abook set abook_my_perms = %d where (abook_flags & %d) and abook_my_perms = 0",
+ intval($myperms),
+ intval(ABOOK_FLAG_SELF)
+ );
+
+ return UPDATE_SUCCESS;
+} \ No newline at end of file