Selaa lähdekoodia

Remove the is_numeric on format_phone.

markjcrane 10 vuotta sitten
vanhempi
commit
63cc248e30
2 muutettua tiedostoa jossa 12 lisäystä ja 9 poistoa
  1. 5 0
      core/domain_settings/domains.php
  2. 7 9
      resources/functions.php

+ 5 - 0
core/domain_settings/domains.php

@@ -87,6 +87,11 @@ else {
 		}
 	}
 
+//redirect the user
+	if (file_exists($_SERVER["DOCUMENT_ROOT"]."/app/domains/domains.php")) {
+		$href = '/app/domains/domains.php';
+	}
+
 //includes
 	require_once "resources/header.php";
 	$document['title'] = $text['title-domains'];

+ 7 - 9
resources/functions.php

@@ -771,15 +771,13 @@ function format_string ($format, $data) {
 
 //get the format and use it to format the phone number
 	function format_phone($phone_number) {
-		if (is_numeric($phone_number)) {
-			foreach ($_SESSION["format"]["phone"] as &$format) {
-				$format_count = substr_count($format, 'x');
-				$format_count = $format_count + substr_count($format, 'R');
-				$format_count = $format_count + substr_count($format, 'r');
-				if ($format_count == strlen($phone_number)) {
-					//format the number
-					$phone_number = format_string($format, $phone_number);
-				}
+		foreach ($_SESSION["format"]["phone"] as &$format) {
+			$format_count = substr_count($format, 'x');
+			$format_count = $format_count + substr_count($format, 'R');
+			$format_count = $format_count + substr_count($format, 'r');
+			if ($format_count == strlen($phone_number)) {
+				//format the number
+				$phone_number = format_string($format, $phone_number);
 			}
 		}
 		return $phone_number;