diff options
Diffstat (limited to 'install/update.php')
-rw-r--r-- | install/update.php | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/install/update.php b/install/update.php index 0b1fa5d2e..d6953cdbc 100644 --- a/install/update.php +++ b/install/update.php @@ -1,6 +1,6 @@ <?php -define( 'UPDATE_VERSION' , 1129 ); +define( 'UPDATE_VERSION' , 1131 ); /** * @@ -1457,3 +1457,30 @@ function update_r1128() { } +function update_r1129() { + $r = q("update hubloc set hubloc_network = 'zot' where hubloc_network = ''"); + if($r) + return UPDATE_SUCCESS; + 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 |