Skip to content

Commit

Permalink
Make ident grat again
Browse files Browse the repository at this point in the history
  • Loading branch information
Touxten committed May 29, 2018
1 parent 6d49c0e commit 7a3da48
Showing 1 changed file with 18 additions and 14 deletions.
32 changes: 18 additions & 14 deletions classes/Employee.php
Expand Up @@ -379,9 +379,10 @@ public static function employeeExists($email)
}

return (bool)Db::getInstance()->getValue('
SELECT `id_employee`
FROM `'._DB_PREFIX_.'employee`
WHERE `email` = \''.pSQL($email).'\'');
SELECT `id_employee`
FROM `'._DB_PREFIX_.'employee`
WHERE `email` = \''.pSQL($email).'\'
');
}

/**
Expand Down Expand Up @@ -419,10 +420,11 @@ public static function checkPassword($idEmployee, $passwordHash)
public static function countProfile($idProfile, $activeOnly = false)
{
return Db::getInstance()->getValue('
SELECT COUNT(*)
FROM `'._DB_PREFIX_.'employee`
WHERE `id_profile` = '.(int) $idProfile.'
'.($activeOnly ? ' AND `active` = 1' : ''));
SELECT COUNT(*)
FROM `'._DB_PREFIX_.'employee`
WHERE `id_profile` = '.(int) $idProfile.'
'.($activeOnly ? ' AND `active` = 1' : '')
);
}

/**
Expand Down Expand Up @@ -507,9 +509,10 @@ public function logout()
public function favoriteModulesList()
{
return Db::getInstance()->executeS('
SELECT `module`
FROM `'._DB_PREFIX_.'module_preference`
WHERE `id_employee` = '.(int)$this->id.' AND `favorite` = 1 AND (`interest` = 1 OR `interest` IS NULL)');
SELECT `module`
FROM `'._DB_PREFIX_.'module_preference`
WHERE `id_employee` = '.(int)$this->id.' AND `favorite` = 1 AND (`interest` = 1 OR `interest` IS NULL)'
);
}

/**
Expand Down Expand Up @@ -577,10 +580,11 @@ public function getDefaultShopID()
public static function getEmployeesByProfile($idProfile, $activeOnly = false)
{
return Db::getInstance()->executeS('
SELECT *
FROM `'._DB_PREFIX_.'employee`
WHERE `id_profile` = '.(int) $idProfile.'
'.($activeOnly ? ' AND `active` = 1' : ''));
SELECT *
FROM `'._DB_PREFIX_.'employee`
WHERE `id_profile` = '.(int) $idProfile.'
'.($activeOnly ? ' AND `active` = 1' : '')
);
}

/**
Expand Down

0 comments on commit 7a3da48

Please sign in to comment.