diff --git a/includes/ajaxHandler.class.php b/includes/ajaxHandler.class.php
index b68d6712..ba73ef5c 100644
--- a/includes/ajaxHandler.class.php
+++ b/includes/ajaxHandler.class.php
@@ -204,8 +204,8 @@ class AjaxHandler
*/
private function handleCookie()
{
- if (User::$id && $this->params && !empty($this->get[$this->params[0]]))
- if (DB::Aowow()->query('REPLACE INTO ?_account_cookies VALUES (?d, ?, ?)', User::$id, $this->params[0], $this->get[$this->params[0]]))
+ if (User::$id && $this->params && $this->get($this->params[0]))
+ if (DB::Aowow()->query('REPLACE INTO ?_account_cookies VALUES (?d, ?, ?)', User::$id, $this->params[0], $this->get($this->params[0])))
return 0;
return null;
@@ -552,7 +552,7 @@ class AjaxHandler
break;
case 'flag-reply':
- if (!User::$id || $this->post('id'))
+ if (!User::$id || !$this->post('id'))
break;
DB::Aowow()->query(
@@ -633,11 +633,11 @@ class AjaxHandler
// should probably occur in g_user.excludegroups (dont forget to also set g_users.settings = {})
return '';
case 'weightscales':
- if (!$this->post('save'))
+ if ($this->post('save'))
{
- if (!isset($this->post['id']))
+ if (!$this->post('id'))
{
- $res = DB::Aowow()->selectRow('SELECT max(id) as max, count(id) as num FROM ?_account_weightscales WHERE userId = ?d', User::$id);
+ $res = DB::Aowow()->selectRow('SELECT MAX(id) AS max, count(id) AS num FROM ?_account_weightscales WHERE userId = ?d', User::$id);
if ($res['num'] < 5) // more or less hard-defined in LANG.message_weightscalesaveerror
$this->post['id'] = ++$res['max'];
else
diff --git a/includes/types/item.class.php b/includes/types/item.class.php
index e8a9f2ba..93d3845b 100644
--- a/includes/types/item.class.php
+++ b/includes/types/item.class.php
@@ -593,14 +593,14 @@ class ItemList extends BaseType
$dps = $speed ? ($dmgmin1 + $dmgmax1) / (2 * $speed) : 0;
if ($_class == ITEM_CLASS_AMMUNITION && $dmgmin1 && $dmgmax1)
- $x .= Lang::item('addsDps').' '.Lang::nf(($dmgmin1 + $dmgmax1) / 2, 1).' '.Lang::item('dps2').'
';
+ $x .= Lang::item('addsDps').' '.number_format(($dmgmin1 + $dmgmax1) / 2, 1).' '.Lang::item('dps2').'
';
else if ($dps)
{
if ($_class == ITEM_CLASS_WEAPON)
{
$x .= '
| '.sprintf($this->curTpl['dmgType1'] ? Lang::item('damageMagic') : Lang::item('damagePhys'), $this->curTpl['dmgMin1'].' - '.$this->curTpl['dmgMax1'], Lang::game('sc', $this->curTpl['dmgType1'])).' | '; - $x .= ''.Lang::item('speed').' '.Lang::nf($speed, 2).' | '; + $x .= ''.Lang::item('speed').' '.number_format($speed, 2).' | '; // do not use localized format here! $x .= '
|---|