Added non-db folder query checking location and added params convenience method
This commit is contained in:
parent
4340b14067
commit
4086da30b1
@ -93,6 +93,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
array_push($varQueryPaths, "db/{$strQuery}");
|
array_push($varQueryPaths, "db/{$strQuery}");
|
||||||
|
array_push($varQueryPaths, $strQuery);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (count($varQueryPaths) > 0)
|
while (count($varQueryPaths) > 0)
|
||||||
|
@ -145,6 +145,14 @@
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getParams()
|
||||||
|
{
|
||||||
|
if (is_array($_GET))
|
||||||
|
return $_GET;
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
public static function getHeader($strKey)
|
public static function getHeader($strKey)
|
||||||
{
|
{
|
||||||
if (is_array($_SERVER))
|
if (is_array($_SERVER))
|
||||||
@ -180,12 +188,17 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Returns the value of the posted field
|
// Returns the value of the posted field
|
||||||
public static function getPosted($strKey)
|
public static function getPosted($strKey = null)
|
||||||
{
|
{
|
||||||
if (is_array($_POST))
|
if (is_array($_POST))
|
||||||
|
{
|
||||||
|
if ($strKey == null)
|
||||||
|
return $_POST;
|
||||||
|
|
||||||
if (array_key_exists($strKey, $_POST))
|
if (array_key_exists($strKey, $_POST))
|
||||||
if (strlen($_POST[$strKey]) > 0)
|
if (strlen($_POST[$strKey]) > 0)
|
||||||
return $_POST[$strKey];
|
return $_POST[$strKey];
|
||||||
|
}
|
||||||
|
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user