mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 02:05:19 +02:00
move hidewall to user table - queries are getting too complicated and servers falling over
This commit is contained in:
parent
c221d5ea59
commit
84d12c3e08
9 changed files with 34 additions and 30 deletions
13
update.php
13
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`");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue