Skip to content

Commit

Permalink
Merge pull request #25233 from braders/remove-isHtml
Browse files Browse the repository at this point in the history
Remove broken method CRM_Utils_File::isHtml()
  • Loading branch information
eileenmcnaughton authored Dec 29, 2022
2 parents 9547c0a + 792a452 commit f2795c8
Showing 1 changed file with 0 additions and 30 deletions.
30 changes: 0 additions & 30 deletions CRM/Utils/File.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,36 +48,6 @@ public static function isAscii($name) {
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
Expand Down

0 comments on commit f2795c8

Please sign in to comment.