diff options
author | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-02-13 14:07:56 +0000 |
---|---|---|
committer | icewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2008-02-13 14:07:56 +0000 |
commit | d30e100e2360b3c0806ea55a9a9080d5fd319761 (patch) | |
tree | 1e29f36e7e86c1e1466e35f09e3424ab0f9a5f0c /engine/lib/input.php | |
parent | df3deed9b49426cce4490c4e1cf5befbd565958f (diff) | |
download | elgg-d30e100e2360b3c0806ea55a9a9080d5fd319761.tar.gz elgg-d30e100e2360b3c0806ea55a9a9080d5fd319761.tar.bz2 |
Added input method
git-svn-id: https://code.elgg.org/elgg/trunk@22 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/input.php')
-rw-r--r-- | engine/lib/input.php | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/engine/lib/input.php b/engine/lib/input.php new file mode 100644 index 000000000..c62539f49 --- /dev/null +++ b/engine/lib/input.php @@ -0,0 +1,31 @@ +<?php + /** + * Parameter input functions. + * This file contains functions for getting input from get/post variables. + * + * @package Elgg + * @subpackage Core + * @license http://www.gnu.org/licenses/old-licenses/gpl-2.0.html GNU Public License version 2 + * @author Marcus Povey <marcus@dushka.co.uk> + * @copyright Curverider Ltd 2008 + * @link http://elgg.org/ + */ + + /** + * Get some input from passed variables. + * + * @param $variable string The variable we want to return. + * @param $default mixed A default value for the variable if it is not found. + */ + function get_input($variable, $default = "") + { + + + // TODO: Some nice filtering here + + if (isset($_REQUEST[$variable])) + return trim($_REQUEST[$variable]); + + return $default; + } +?>
\ No newline at end of file |