- if(!is_numeric($amount) || $amount < 0) $this->post_redirect_get("$URL_INTERNAL?account=".urlencode($account_from),"Lze převádět jen kladné částky", true);
+ $account_redirect=$account_from;
+ if(!is_numeric($amount)) $this->post_redirect_get("$URL_INTERNAL?account=".urlencode($account_from),"Převáděnou částkou musí být celé číslo.", true);
+ if($amount < 0) {
+ $amount=abs($amount);
+ list($account_from,$account_to)=array($account_to,$account_from); //swap from/to
+ }