Register globals

This commit is contained in:
Alan Garcia 2012-08-22 14:20:30 +00:00
parent 43ce9c4138
commit 279fa9bd1e
4 changed files with 30 additions and 13 deletions

View File

@ -5,6 +5,18 @@ if (!$admin->enabled) {
exit();
}
$fields = array (
"name" => array ("post", "string", ""),
"description" => array ("post", "string", ""),
"target" => array ("post", "string", ""),
"entry" => array ("post", "string", ""),
"compatibility" => array ("post", "string", ""),
"enable" => array ("post", "string", ""),
"only_dns" => array ("post", "string", ""),
"need_dns" => array ("post", "string", ""),
"advanced" => array ("post", "string", ""),
);
getFields($fields);
if ( ! $dom->domains_type_update($name, $description, $target, $entry, $compatibility, $enable, $only_dns, $need_dns, $advanced) ) {
die($err->errstr());

View File

@ -30,6 +30,12 @@
require_once("../class/config.php");
include_once("head.php");
$fields = array (
"id" => array ("post", "string", ""),
"restfile" => array ("post", "string", ""),
);
getFields($fields);
if (!$r=$mysql->get_mysql_details($id)) {
$error=$err->errstr();

View File

@ -185,7 +185,6 @@ class m_dom {
function domains_type_update($name, $description, $target, $entry, $compatibility, $enable, $only_dns, $need_dns,$advanced) {
global $err,$cuid,$db;
$id=intval($id);
// The name MUST contain only letter and digits, it's an identifier after all ...
if (!preg_match("#^[a-z0-9]+$#",$name)) {
$err->raise("dom", 26);