diff --git a/CLI/FetchToncoinTransactions.php b/CLI/FetchToncoinTransactions.php index 1bcdb7e7..11bfa417 100755 --- a/CLI/FetchToncoinTransactions.php +++ b/CLI/FetchToncoinTransactions.php @@ -46,8 +46,8 @@ class FetchToncoinTransactions extends Command return Command::FAILURE; } - $testnet_subdomain = OPENVK_ROOT_CONF["openvk"]["preferences"]["ton"]["testnet"] ? "testnet." : ""; - $url = "https://" . $testnet_subdomain . "toncenter.com/api/v2/getTransactions?"; + $testnetSubdomain = OPENVK_ROOT_CONF["openvk"]["preferences"]["ton"]["testnet"] ? "testnet." : ""; + $url = "https://" . $testnetSubdomain . "toncenter.com/api/v2/getTransactions?"; $opts = [ "http" => [ @@ -57,14 +57,14 @@ class FetchToncoinTransactions extends Command ]; $selection = $this->transactions->select('hash, lt')->order("id DESC")->limit(1)->fetch(); - $tr_hash = $selection->hash ?? NULL; - $tr_lt = $selection->lt ?? NULL; + $trHash = $selection->hash ?? NULL; + $trLt = $selection->lt ?? NULL; $data = http_build_query([ "address" => OPENVK_ROOT_CONF["openvk"]["preferences"]["ton"]["address"], "limit" => 100, - "hash" => $tr_hash, - "to_lt" => $tr_lt + "hash" => $trHash, + "to_lt" => $trLt ]); $response = file_get_contents($url . $data, false, stream_context_create($opts)); @@ -75,7 +75,7 @@ class FetchToncoinTransactions extends Command $output_array; preg_match('/' . OPENVK_ROOT_CONF["openvk"]["preferences"]["ton"]["regex"] . '/', $transfer["in_msg"]["message"], $output_array); $userid = ctype_digit($output_array[1]) ? intval($output_array[1]) : NULL; - if($userid === NULL) { + if(is_null($userid)) { $header->writeln("Well, that's a donation. Thanks! XD"); } else { $user = (new Users)->get($userid); diff --git a/Web/Presenters/WallPresenter.php b/Web/Presenters/WallPresenter.php index 8706f82f..ee3cc651 100644 --- a/Web/Presenters/WallPresenter.php +++ b/Web/Presenters/WallPresenter.php @@ -273,6 +273,7 @@ final class WallPresenter extends OpenVKPresenter try { $post = new Post; + $post->setOwner($this->user->id); $post->setWall($wall); $post->setCreated(time()); diff --git a/Web/Presenters/templates/User/Settings.xml b/Web/Presenters/templates/User/Settings.xml index 31433a91..424e08c6 100644 --- a/Web/Presenters/templates/User/Settings.xml +++ b/Web/Presenters/templates/User/Settings.xml @@ -399,13 +399,13 @@ function convertCurrency(coin) { var currencyTON = {php echo OPENVK_ROOT_CONF['openvk']['preferences']['ton']['rate']}; - u('.coins_dialog_conv').nodes[0].innerHTML = tr("transfer_ton_currency_per_ton", coin * currencyTON); + u(".coins_dialog_conv").nodes[0].innerHTML = tr("transfer_ton_currency_per_ton", coin * currencyTON); } function showCoinsTopUpTroughTon() { MessageBox(tr("transfer_trough_ton"), `