aboutsummaryrefslogtreecommitdiffstats
path: root/update.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-07-05 23:23:43 -0700
committerFriendika <info@friendika.com>2011-07-05 23:23:43 -0700
commit84d12c3e08ae4b6fe228ce881b0c1570175d1667 (patch)
treebb8f4ccca207ff6c226cf79f4ce348c5bc8d9df9 /update.php
parentc221d5ea597040c27a8918f9c08629e979a6e273 (diff)
downloadvolse-hubzilla-84d12c3e08ae4b6fe228ce881b0c1570175d1667.tar.gz
volse-hubzilla-84d12c3e08ae4b6fe228ce881b0c1570175d1667.tar.bz2
volse-hubzilla-84d12c3e08ae4b6fe228ce881b0c1570175d1667.zip
move hidewall to user table - queries are getting too complicated and servers falling over
Diffstat (limited to 'update.php')
-rw-r--r--update.php13
1 files changed, 12 insertions, 1 deletions
diff --git a/update.php b/update.php
index 66908b8d3..f2cd5573f 100644
--- a/update.php
+++ b/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1074 );
+define( 'UPDATE_VERSION' , 1075 );
/**
*
@@ -590,3 +590,14 @@ function update_1073() {
q("ALTER TABLE `contact` ADD `remote_self` TINYINT( 1 ) NOT NULL DEFAULT '0' AFTER `self` ");
}
+function update_1074() {
+ q("ALTER TABLE `user` ADD `hidewall` TINYINT( 1) NOT NULL DEFAULT '0' AFTER `blockwall` ");
+ $r = q("SELECT `uid` FROM `profile` WHERE `is-default` = 1 AND `hidewall` = 1");
+ if(count($r)) {
+ foreach($r as $rr)
+ q("UPDATE `user` SET `hidewall` = 1 WHERE `uid` = %d LIMIT 1",
+ intval($rr['uid'])
+ );
+ }
+ q("ALTER TABLE `profile` DROP `hidewall`");
+}