diff --git a/lib/DatabaseConnection.php b/lib/DatabaseConnection.php index 09d9517..0b49da8 100644 --- a/lib/DatabaseConnection.php +++ b/lib/DatabaseConnection.php @@ -93,6 +93,7 @@ } array_push($varQueryPaths, "db/{$strQuery}"); + array_push($varQueryPaths, $strQuery); } while (count($varQueryPaths) > 0) diff --git a/lib/Request.php b/lib/Request.php index 79fab27..9bddddb 100644 --- a/lib/Request.php +++ b/lib/Request.php @@ -145,6 +145,14 @@ return null; } + public static function getParams() + { + if (is_array($_GET)) + return $_GET; + + return null; + } + public static function getHeader($strKey) { if (is_array($_SERVER)) @@ -180,12 +188,17 @@ } // Returns the value of the posted field - public static function getPosted($strKey) + public static function getPosted($strKey = null) { if (is_array($_POST)) + { + if ($strKey == null) + return $_POST; + if (array_key_exists($strKey, $_POST)) if (strlen($_POST[$strKey]) > 0) return $_POST[$strKey]; + } return null; }