[[patches:vegadns-0.9.10-php5.3.patch]]
 
diff -ruN vegadns-0.9.10/index.php vegadns-0.9.10-php5.3/index.php
--- vegadns-0.9.10/index.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/index.php	2011-01-18 00:36:08.269033662 +0200
@@ -23,6 +23,7 @@
 ini_set('log_errors', 1);
 ini_set('allow_url_fopen', 0);
 ini_set('session.use_cookies',0);
+ini_set('session.use_only_cookies',0);
 ini_set('error_reporting', E_ALL);
 
 // Check that register_globals is off
@@ -93,7 +94,7 @@
 // Setup session
 session_name('VDNSSessid');
 session_save_path($session_dir);
-session_start();
+if(!session_start()) die("Error: session_start() failed.");
 $smarty->assign('session_name', session_name());
 $smarty->assign('session_id', session_id());
 
@@ -108,7 +109,6 @@
     }
 
     // MAIN
-
     $smarty->display('header.tpl');
     $smarty->display('login_screen.tpl');
     $smarty->display('footer.tpl');
@@ -167,8 +167,6 @@
             header("Location: ".$_SERVER['PHP_SELF']."?".SID."&state=logged_in");
             exit;
         }
-        
-        
     }
 
 } else if($_REQUEST['state'] == "logged_in") {
diff -ruN vegadns-0.9.10/src/account_form.php vegadns-0.9.10-php5.3/src/account_form.php
--- vegadns-0.9.10/src/account_form.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/account_form.php	2011-01-18 00:36:09.839871140 +0200
@@ -15,7 +15,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/add_record_form.php vegadns-0.9.10-php5.3/src/add_record_form.php
--- vegadns-0.9.10/src/add_record_form.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/add_record_form.php	2011-01-18 00:36:09.839871140 +0200
@@ -15,7 +15,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/change_owner.php vegadns-0.9.10-php5.3/src/change_owner.php
--- vegadns-0.9.10/src/change_owner.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/change_owner.php	2011-01-18 00:36:09.839871140 +0200
@@ -15,7 +15,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/check_account_data.php vegadns-0.9.10-php5.3/src/check_account_data.php
--- vegadns-0.9.10/src/check_account_data.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/check_account_data.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/config.php vegadns-0.9.10-php5.3/src/config.php
--- vegadns-0.9.10/src/config.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/config.php	2011-01-18 01:10:05.170922889 +0200
@@ -70,7 +70,7 @@
 
 $version = '0.9.10';
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF']) 
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF']) 
     && !ereg(".*/axfr_get.php$", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
diff -ruN vegadns-0.9.10/src/connect.php vegadns-0.9.10-php5.3/src/connect.php
--- vegadns-0.9.10/src/connect.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/connect.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/create_tables.php vegadns-0.9.10-php5.3/src/create_tables.php
--- vegadns-0.9.10/src/create_tables.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/create_tables.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/data.php vegadns-0.9.10-php5.3/src/data.php
--- vegadns-0.9.10/src/data.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/data.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/default_records.php vegadns-0.9.10-php5.3/src/default_records.php
--- vegadns-0.9.10/src/default_records.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/default_records.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
@@ -142,7 +142,7 @@
         }
 
         // Add domain to 'name'
-        if(!eregi("^.*\.(DOMAIN)$", $_REQUEST['name']) && !eregi("^(DOMAIN)$", $_REQUEST['name'])
+        if(!preg_match("#^.*\.(DOMAIN)$#i", $_REQUEST['name']) && !preg_match("#^(DOMAIN)$#i", $_REQUEST['name'])
             && $_REQUEST['type'] != 'PTR') {
             if(strlen($_REQUEST['name']) > 0) {
                 $name = $_REQUEST['name'].".DOMAIN";
@@ -163,7 +163,7 @@
             '".$_REQUEST['ttl']."',
             '$default_type')";
         } else if($_REQUEST['type'] == 'MX') {
-            if(!ereg("\..+$", $_REQUEST['address'])) {
+            if(!preg_match("#\..+$#", $_REQUEST['address'])) {
                 $mxaddress = $_REQUEST['address'].".DOMAIN";
             } else {
                 $mxaddress = $_REQUEST['address'];
diff -ruN vegadns-0.9.10/src/dnsquery.php vegadns-0.9.10-php5.3/src/dnsquery.php
--- vegadns-0.9.10/src/dnsquery.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/dnsquery.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
@@ -57,7 +57,7 @@
     $smarty->assign('command', $command);
     set_time_limit(0);
     $result = shell_exec($command);
-    $smarty->assign('result', ereg_replace("\n", '<br>', $result));
+    $smarty->assign('result', preg_replace("#\n#", '<br>', $result));
 
 }
 
diff -ruN vegadns-0.9.10/src/domains.php vegadns-0.9.10-php5.3/src/domains.php
--- vegadns-0.9.10/src/domains.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/domains.php	2011-01-18 00:36:09.839871140 +0200
@@ -15,7 +15,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
@@ -34,8 +34,8 @@
 
     // Get search string if it exists
     if(isset($_REQUEST['search']) && $_REQUEST['search'] != "") {
-        $tempstring = ereg_replace("[*]", "%", $_REQUEST['search']);
-        $tempstring = ereg_replace("[ ]", "%", $tempstring);
+        $tempstring = preg_replace("#[*]#", "%", $_REQUEST['search']);
+        $tempstring = preg_replace("#[ ]#", "%", $tempstring);
         $searchstring = "domain like '%".mysql_escape_string($tempstring)."%'";
         // Set appropriate query
         if($user_info['Account_Type'] == 'senior_admin') {
@@ -152,7 +152,7 @@
 
     while(list($key,$val) = each($sort_array)) {
         $newsortway = get_sortway($sortfield, $val, $sortway);
-        $url = "<a href='$sortbaseurl&sortway=$newsortway&sortfield=$val'>".ereg_replace('_', ' ', $key)."</a>";
+        $url = "<a href='$sortbaseurl&sortway=$newsortway&sortfield=$val'>".preg_replace('#_#', ' ', $key)."</a>";
         if($sortfield == $val) $url .= "&nbsp;<img border=0 alt='$sortway' src=images/$sortway.png>";
         $smarty->assign($key, $url);
     }
@@ -212,7 +212,7 @@
 
     $domain = strtolower($_REQUEST['domain']);
     // make sure it's at least a second level domain
-    if(!eregi(".*\..*", $domain)) {
+    if(!preg_match("#.*\..*#i", $domain)) {
         set_msg_err("Error: domain $domain does not appear to be at least a second level domain");
         $smarty->display('header.tpl');
         require('src/new_domain_form.php');
@@ -220,7 +220,7 @@
         exit;
     }
     // make sure it's at least a correct domain name
-	if (!eregi("^[\.a-z0-9-]+$",$domain)) {
+	if (!preg_match("#^[\.a-z0-9-]+$#",$domain)) {
         set_msg_err("Error: domain $domain does not appear to be a valid domain name");
         $smarty->display('header.tpl');
         require('src/new_domain_form.php');
@@ -309,8 +309,8 @@
 
 
     // Add SOA record
-    $host = ereg_replace("DOMAIN", $domain, $soa_array['host']);
-    $val = ereg_replace("DOMAIN", $domain, $soa_array['val']);
+    $host = preg_replace("#DOMAIN#", $domain, $soa_array['host']);
+    $val = preg_replace("#DOMAIN#", $domain, $soa_array['val']);
     $q = "insert into records (domain_id,host,type,val,ttl)
             values('$id',
             '".mysql_escape_string($host)."',
@@ -324,8 +324,8 @@
 
     if(is_array($records_array)) {
         while(list($key,$row) = each($records_array)) {
-            $host = ereg_replace("DOMAIN", $domain, $row['host']);
-            $val = ereg_replace("DOMAIN", $domain, $row['val']);
+            $host = preg_replace("#DOMAIN#", $domain, $row['host']);
+            $val = preg_replace("#DOMAIN#", $domain, $row['val']);
             $q = "insert into records (domain_id,host,type,val,distance,ttl)
                 values('$id',
                 '".mysql_escape_string($host)."',
@@ -528,7 +528,7 @@
         $array_notunique[$key] = trim($domain_untrimmed);
     }
     reset($array_notunique);
-    $array = array_unique($array_notunique);
+    $array = array_unique((array)$array_notunique);
 
     $counter = 0;
     // default SOA and NS
@@ -567,7 +567,7 @@
 
         // Make $out an array
         $out_array = explode("\n", $out);
-        if(ereg("^#.*$", $out_array[0])) {
+        if(preg_match("#^#.*$#", $out_array[0])) {
             $out_array['domain'] = $domain;
             $domains_array[$counter] = $out_array;
             $counter++;
@@ -594,7 +594,7 @@
             $skip_ns = 'TRUE';
             if(is_array($def_ns)) {
                 foreach ($def_ns as $ns) {
-	                $host = ereg_replace("DOMAIN", $domain, $ns['host']);
+	                $host = preg_replace("#DOMAIN#", $domain, $ns['host']);
                     $q = "insert into records 
                         (domain_id,host,type,val,distance,ttl) 
                         values(
@@ -610,7 +610,7 @@
 	        }
 	    }
         while(list($line_key,$value) = each($line)) {
-            if($line_key != 'domain' && !ereg("^#", $value)) {
+            if($line_key != 'domain' && !preg_atch("/^#/", $value)) {
                 $result = parse_dataline($value);
                 if(!is_array($result)) continue;
 		        if ((isset($_REQUEST['default_soa']) && $_REQUEST['default_soa']=="on") && ($result['type']=='S')) {
@@ -623,7 +623,7 @@
                     (domain_id,host,type,val,distance,ttl) 
                     values(
                         $domain_id,
-                        '".mysql_escape_string(ereg_replace("[\]052", "*", $result['host']))."',
+                        '".mysql_escape_string(preg_replace("/[\]052/", "*", $result['host']))."',
                         '".$result['type']."',
                         '".mysql_escape_string($result['val'])."',
                         '".$result['distance']."',
@@ -720,6 +720,7 @@
                 exit;
             }
 
+	    $change_group = 0;
             if($user_info['Account_Type'] == 'senior_admin' && isset($_REQUEST['group_email_address']) && $_REQUEST['group_email_address'] != '') {
                 $group_owner_id = get_cid(strtolower($_REQUEST['group_email_address']));
                 $q = "select 'Email' from accounts where cid='$group_owner_id' and Account_Type='group_admin'";
diff -ruN vegadns-0.9.10/src/edit_default_soa_form.php vegadns-0.9.10-php5.3/src/edit_default_soa_form.php
--- vegadns-0.9.10/src/edit_default_soa_form.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/edit_default_soa_form.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/edit_soa_form.php vegadns-0.9.10-php5.3/src/edit_soa_form.php
--- vegadns-0.9.10/src/edit_soa_form.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/edit_soa_form.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/functions.php vegadns-0.9.10-php5.3/src/functions.php
--- vegadns-0.9.10/src/functions.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/functions.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
@@ -125,7 +125,7 @@
 
 function check_email_format($address) {
 
-    $result = ereg("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$", 
+    $result = preg_match("#^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*$#", 
         strtolower($address));
     return $result;
 
@@ -134,12 +134,12 @@
 function check_domain_name_format($name) {
 
     // Hack to allow for DOMAIN substitutions in default records
-    $name = ereg_replace('DOMAIN', 'test.com', $name);
+    $name = preg_replace('#DOMAIN#', 'test.com', $name);
 
-    if(ereg('\.\.', $name)) {
+    if(preg_match('#\.\.#', $name)) {
         return FALSE;
     } else {
-        $result = eregi("^[\*\.a-z0-9-]+\.[a-z0-9-]+$", strtolower($name));
+        $result = preg_match("#^[\*\.a-z0-9-]+\.[a-z0-9-]+$#i", strtolower($name));
         return $result;
     }
 
@@ -214,7 +214,7 @@
     } else {
         foreach($tmp AS $sub) {
             if($return != FALSE) {
-                if(!eregi("^([0-9])", $sub)) {
+                if(!preg_match("#^([0-9])#i", $sub)) {
                     $return = FALSE;
                 } else if($sub > 255){
                     $return = FALSE;
@@ -264,13 +264,13 @@
         if(check_domain_name_format($name) == FALSE) {
             return "\"$name\" is not a valid MX record name";
         }
-        if(!eregi("^([0-9])+$", $distance)) 
+        if(!preg_match("#^([0-9])+$#i", $distance)) 
             return "\"$distance\" is not a valid MX distance";
     }
 
     // verify PTR
     if($type == 'P') {
-       if(!eregi("^.*\.in-addr.arpa\.*$", $name))
+       if(!preg_match("#^.*\.in-addr.arpa\.*$#i", $name))
             return "PTR \"$name\" does not end in .in-addr.arpa.";
     }
 
@@ -388,7 +388,7 @@
 function parse_dataline($line) {
 
     // Strip first char
-    $stripped = ereg_replace("^.", "", $line);
+    $stripped = preg_replace("#^.#", "", $line);
     $array = explode(":", $stripped);
     $out_array = '';
 
diff -ruN vegadns-0.9.10/src/help.php vegadns-0.9.10-php5.3/src/help.php
--- vegadns-0.9.10/src/help.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/help.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/import_form.php vegadns-0.9.10-php5.3/src/import_form.php
--- vegadns-0.9.10/src/import_form.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/import_form.php	2011-01-18 00:36:09.839871140 +0200
@@ -15,7 +15,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/new_domain_form.php vegadns-0.9.10-php5.3/src/new_domain_form.php
--- vegadns-0.9.10/src/new_domain_form.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/new_domain_form.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
diff -ruN vegadns-0.9.10/src/records.php vegadns-0.9.10-php5.3/src/records.php
--- vegadns-0.9.10/src/records.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/records.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
@@ -80,8 +80,8 @@
 
     // Get search string if it exists
     if(isset($_REQUEST['search']) && $_REQUEST['search'] != "") {
-        $searchstring = ereg_replace("[*]", "%", $_REQUEST['search']);
-        $searchstring = ereg_replace("[ ]", "%", $searchstring);
+        $searchstring = preg_replace("#[*]#", "%", $_REQUEST['search']);
+        $searchstring = preg_replace("#[ ]#", "%", $searchstring);
         $searchstring = "host like '%".mysql_escape_string($_REQUEST['search'])."%' and type != 'S' and ";
         $smarty->assign('search', $_REQUEST['search']);
         $smarty->assign('searchtexttag', " matching \"".$_REQUEST['search']."\"");
@@ -278,7 +278,7 @@
 } else if($_REQUEST['record_mode'] == 'add_record_now') {
 
     // Add domain to 'name'
-    if(!eregi("^.*\.($domain)\.*$", $_REQUEST['name']) && !eregi("^($domain)\.*$", $_REQUEST['name'])) {
+    if(!preg_match("#^.*\.($domain)\.*$#i", $_REQUEST['name']) && !preg_match("#^($domain)\.*$#i", $_REQUEST['name'])) {
         if(strlen($_REQUEST['name']) > 0) {
             $name = $_REQUEST['name'].".$domain";
         } else {
@@ -311,7 +311,7 @@
             '".mysql_escape_string($_REQUEST['address'])."',
             '".$_REQUEST['ttl']."')";
         } else if($_REQUEST['type'] == 'MX') {
-            if(!ereg("\..+$", $_REQUEST['address'])) {
+            if(!preg_match("#\..+$#", $_REQUEST['address'])) {
                 $mxaddress = $_REQUEST['address'].".".$domain;
             } else {
                 $mxaddress = $_REQUEST['address'];
@@ -414,7 +414,7 @@
 
 } if($_REQUEST['record_mode'] == 'edit_soa_now') {
 
-    if(!eregi("^[^.].*\..*", ereg_replace("\.$", "", $_REQUEST['primary_name_server']))) {
+    if(!preg_match("#^[^.].*\..*#i", preg_replace("#\.$#", "", $_REQUEST['primary_name_server']))) {
         set_msg_err("Error: primary name server ".$_REQUEST['primary_name_server']." does not appear to be a valid second level or or more domain");
         $smarty->display('header.tpl');
         require('src/edit_soa_form.php');
@@ -494,7 +494,7 @@
 } else if($_REQUEST['record_mode'] == 'edit_record_now') {
 
     // Add domain to 'name'
-    if(!eregi("^.*\.($domain)\.*$", $_REQUEST['name']) && !eregi("^($domain)\.*$", $_REQUEST['name'])) {
+    if(!preg_match("#^.*\.($domain)\.*$#i", $_REQUEST['name']) && !preg_match("#^($domain)\.*$#i", $_REQUEST['name'])) {
         if(strlen($_REQUEST['name']) > 0) {
             $name = $_REQUEST['name'].".$domain";
         } else {
diff -ruN vegadns-0.9.10/src/users.php vegadns-0.9.10-php5.3/src/users.php
--- vegadns-0.9.10/src/users.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/users.php	2011-01-18 00:36:09.839871140 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php$#", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }
@@ -250,7 +250,7 @@
 
         while(list($key,$val) = each($sort_array)) {
             $newsortway = get_sortway($sortfield, $val, $sortway);
-            $url = "<a href='$sortbaseurl&sortway=$newsortway&sortfield=$val'>".ereg_replace('_', ' ', $key)."</a>";
+            $url = "<a href='$sortbaseurl&sortway=$newsortway&sortfield=$val'>".preg_replace('#_#', ' ', $key)."</a>";
             if($sortfield == $val) $url .= "&nbsp;<img border=0 alt='$sortway' src=images/$sortway.png>";
             $smarty->assign($key, $url);
         }
diff -ruN vegadns-0.9.10/src/view_log.php vegadns-0.9.10-php5.3/src/view_log.php
--- vegadns-0.9.10/src/view_log.php	2006-09-06 04:38:19.000000000 +0300
+++ vegadns-0.9.10-php5.3/src/view_log.php	2011-01-18 00:36:09.849830225 +0200
@@ -16,7 +16,7 @@
  * 
  */ 
 
-if(!ereg(".*/index.php$", $_SERVER['PHP_SELF'])) {
+if(!preg_match("#.*/index.php#$", $_SERVER['PHP_SELF'])) {
     header("Location:../index.php");
     exit;
 }

download

 
Copyright 2009 Jukka Kurkela <jukka.kurkela@tjc.fi>
patches/vegadns-0.9.10-php5.3.patch.txt · Last modified: 2011/01/18 01:32 by jukka_kurkela