From 792a4522a62ce29f3267a7a1eb9570938156d517 Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Thu, 29 Dec 2022 20:10:22 +0000 Subject: [PATCH] Remove broken method CRM_Utils_File::isHtml() --- CRM/Utils/File.php | 30 ------------------------------ 1 file changed, 30 deletions(-) diff --git a/CRM/Utils/File.php b/CRM/Utils/File.php index 4dbc7e47e3..bc882aa8f4 100644 --- a/CRM/Utils/File.php +++ b/CRM/Utils/File.php @@ -48,36 +48,6 @@ class CRM_Utils_File { return $ascii; } - /** - * Given a file name, determine if the file contents make it an html file - * - * @param string $name - * Name of file. - * - * @return bool - * true if file is html - */ - public static function isHtml($name) { - $fd = fopen($name, "r"); - if (!$fd) { - return FALSE; - } - - $html = FALSE; - $lineCount = 0; - while (!feof($fd) & $lineCount <= 5) { - $lineCount++; - $line = fgets($fd, 8192); - if (!CRM_Utils_String::isHtml($line)) { - $html = TRUE; - break; - } - } - - fclose($fd); - return $html; - } - /** * Create a directory given a path name, creates parent directories * if needed -- 2.25.1