*/
private function _sanitizeDataRecursive($data)
{
- foreach ($data AS $key => $value)
+ foreach ($data as $key => $value)
{
if (is_array($value))
{
public function escape($str, $force = true)
{
$db = BSApp::$db;
- if ($this->magicquotes AND !$force)
+ if ($this->magicquotes && !$force)
{
if ($db)
{
*/
public function inputCleanArray($vars)
{
- foreach ($vars AS $varname => $type)
+ foreach ($vars as $varname => $type)
{
$this->inputClean($varname, $type);
}
*/
private function _cleanArray($array, $type)
{
- foreach ($array AS $key => $value)
+ foreach ($array as $key => $value)
{
$array["$key"] = $this->clean($value, $type);
}
{
$host = ($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_ENV['HTTP_HOST'];
- if ($host AND $_SERVER['HTTP_REFERER'])
+ if ($host && $_SERVER['HTTP_REFERER'])
{
$parts = parse_url($_SERVER['HTTP_REFERER']);
$ourhost = $parts['host'] . (isset($parts['port']) ? ":$parts[port]" : '');