mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-20 01:15:13 +00:00
db update for changing default access group
This commit is contained in:
parent
1e6eda1c0d
commit
ed82a9e0a7
2 changed files with 28 additions and 1 deletions
27
Code/Update/_1269.php
Normal file
27
Code/Update/_1269.php
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Code\Update;
|
||||||
|
|
||||||
|
class _1269
|
||||||
|
{
|
||||||
|
public function run()
|
||||||
|
{
|
||||||
|
$channels = q("select * from channel where true");
|
||||||
|
if ($channels) {
|
||||||
|
foreach ($channels as $channel) {
|
||||||
|
if ($channel['allow_gid']) {
|
||||||
|
$channel['allow_gid'] = '<' . 'connections:' . $channel['channel_hash'] . '>';
|
||||||
|
q("update channel set allow_gid = '%s' where channel_id = %d",
|
||||||
|
dbesc($channel['allow_gid']),
|
||||||
|
(int)$channel['channel_id']
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function verify()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
2
boot.php
2
boot.php
|
@ -26,7 +26,7 @@ use Code\Lib\Url;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const REPOSITORY_ID = 'streams';
|
const REPOSITORY_ID = 'streams';
|
||||||
const DB_UPDATE_VERSION = 1268;
|
const DB_UPDATE_VERSION = 1269;
|
||||||
const PROJECT_BASE = __DIR__;
|
const PROJECT_BASE = __DIR__;
|
||||||
const ACTIVITYPUB_ENABLED = true;
|
const ACTIVITYPUB_ENABLED = true;
|
||||||
const NOMAD_PROTOCOL_VERSION = '11.0';
|
const NOMAD_PROTOCOL_VERSION = '11.0';
|
||||||
|
|
Loading…
Reference in a new issue