This commit is contained in:
Mike Macgirvin 2023-08-15 21:01:27 +10:00
parent 1a6bc9d435
commit 8d2f5e094c
2 changed files with 18 additions and 17 deletions

View file

@ -8,6 +8,7 @@ namespace Code\Lib;
*/
use App;
use Code\Entity\Channel as ChannelEntity;
use Code\Lib\Libzot;
use Code\Lib\Libsync;
use Code\Lib\AccessList;
@ -368,22 +369,22 @@ class Channel
$expire = 0;
$r = self::channel_store_lowlevel(
[
'channel_account_id' => intval($arr['account_id']),
'channel_primary' => intval($primary),
'channel_name' => $name,
'channel_parent' => $parent_channel_hash,
'channel_address' => $nick,
'channel_guid' => $guid,
'channel_guid_sig' => $sig,
'channel_hash' => $hash,
'channel_prvkey' => $key['prvkey'],
'channel_pubkey' => $key['pubkey'],
'channel_pageflags' => intval($pageflags),
'channel_system' => intval($system),
'channel_expire_days' => intval($expire),
'channel_timezone' => date_default_timezone_get()
]
(new ChannelEntity())
->setAccountId(intval($arr['account_id']))
->setPrimary(intval($primary))
->setName($name)
->setParent($parent_channel_hash)
->setAddress($nick)
->setGuid($guid)
->setGuidSig($sig)
->setHash($hash)
->setPrvkey($key['prvkey'])
->setPubkey($key['pubkey'])
->setPageflags(intval($pageflags))
->setSystem(intval($system))
->setExpireDays($expire)
->setTimezone(date_default_timezone_get())
->toArray()
);
$r = q(

View file

@ -19,7 +19,7 @@ class DB_Upgrade
$this->func_prefix = '_';
$build = get_config('system', 'db_version', 0);
if (!(int)$build)) {
if (!(int)$build) {
$build = set_config('system', 'db_version', $db_revision);
}