diff --git a/Code/Lib/Channel.php b/Code/Lib/Channel.php index d133d176e..e4ee34cfb 100644 --- a/Code/Lib/Channel.php +++ b/Code/Lib/Channel.php @@ -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( diff --git a/Code/Lib/DB_Upgrade.php b/Code/Lib/DB_Upgrade.php index 0dd25a85e..2785688f2 100644 --- a/Code/Lib/DB_Upgrade.php +++ b/Code/Lib/DB_Upgrade.php @@ -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); }