summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordeva <deva>2009-04-13 10:01:11 +0000
committerdeva <deva>2009-04-13 10:01:11 +0000
commit9be2a7a340ff28510533c503227b56ff7522f064 (patch)
tree9eff61601d8f78128d06217f8b61386164993fc1
parenteec8fdf3fd36f6f8511bdb4bea0899f82bf3f6ab (diff)
Made admin convert all vars (strip slashes and convert xml special chars)
-rw-r--r--pages/admin.php3
-rw-r--r--utils/convert.php13
2 files changed, 15 insertions, 1 deletions
diff --git a/pages/admin.php b/pages/admin.php
index 3f924c7..60596ab 100644
--- a/pages/admin.php
+++ b/pages/admin.php
@@ -39,7 +39,8 @@ if($admin_module) {
<?php
if($admin_submodule) {
echo "<div class=\"submodule_header\">$admin_submodule_name</div>\n";
- $admin_module->admin($admin_submodule, $a, $vars);
+ include_once($UTIL_DIR . "/convert.php");
+ $admin_module->admin($admin_submodule, $a, convert_array($vars));
}
?>
</div>
diff --git a/utils/convert.php b/utils/convert.php
index 6ba1964..4471e8f 100644
--- a/utils/convert.php
+++ b/utils/convert.php
@@ -8,4 +8,17 @@ function convert($message)
return $message;
}
+function convert_array($vs)
+{
+ $vars = array();
+
+ if(sizeof($vs)) {
+ foreach($vs as $k => $v) {
+ $vars[$k] = convert($v);
+ }
+ }
+
+ return $vars;
+}
+
?> \ No newline at end of file