inc/record.inc.php
changeset 79 0c0aa144356a
parent 78 effde559e0e9
child 81 c72d6d51f3d3
--- a/inc/record.inc.php	Mon Mar 03 20:32:33 2008 +0000
+++ b/inc/record.inc.php	Mon Mar 10 19:15:59 2008 +0000
@@ -955,7 +955,7 @@
  * if a user id is below 5 this function will only retrieve records for that user.
  * return values: the array of domains or -1 if nothing is found.
  */
-function get_domains($userid=true,$letterstart=all,$rowstart=0,$rowamount=999999)
+function get_domains($userid=true,$letterstart='all',$rowstart=0,$rowamount=999999)
 {
 	global $db;
 	global $sql_regexp;
@@ -976,7 +976,7 @@
 	LEFT JOIN zones ON domains.id=zones.domain_id 
 	LEFT JOIN records ON records.domain_id=domains.id
 	WHERE 1=1 $add ";
-	if ($letterstart!=all && $letterstart!=1) {
+	if ($letterstart!='all' && $letterstart!=1) {
 	   $sqlq.=" AND substring(domains.name,1,1) ".$sql_regexp." ".$db->quote("^".$letterstart);
 	} elseif ($letterstart==1) {
 	   $sqlq.=" AND substring(domains.name,1,1) ".$sql_regexp." '^[[:digit:]]'";
@@ -1008,7 +1008,7 @@
 		$andnot="";
 	}
 
-	if ($letterstart!=all && $letterstart!=1) {
+	if ($letterstart!='all' && $letterstart!=1) {
 
 		$sqlq = "SELECT domains.id AS domain_id,
 		count(DISTINCT record_owners.record_id) AS aantal,
@@ -1056,7 +1056,7 @@
 	}
 
 
-	if ($letterstart!=all && $letterstart!=1) {
+	if ($letterstart!='all' && $letterstart!=1) {
 
 		while($r = $result_extra->fetchRow())
 		{
@@ -1105,7 +1105,7 @@
  * @return integer the number of zones
  */
 
-function zone_count($userid=true, $letterstart=all) {
+function zone_count($userid=true, $letterstart='all') {
         global $db;
 	global $sql_regexp;
         if((!level(5) || !$userid) && !level(10) && !level(5))
@@ -1130,7 +1130,7 @@
                 $add = "";
         }
 
-        if ($letterstart!=all && $letterstart!=1) {
+        if ($letterstart!='all' && $letterstart!=1) {
            $add .=" AND domains.name LIKE ".$db->quote($letterstart."%")." ";
         } elseif ($letterstart==1) {
            $add .=" AND substring(domains.name,1,1) ".$sql_regexp." '^[[:digit:]]'";
@@ -1367,7 +1367,7 @@
 function change_domain_type($type, $id)
 {
 	global $db;
-	unset($add);
+	$add = '';
         if (is_numeric($id))
 	{
 		// It is not really neccesary to clear the master field if a