Skip to content

Commit

Permalink
Remove broken method CRM_Utils_File::isHtml()
Browse files Browse the repository at this point in the history
  • Loading branch information
braders committed Dec 29, 2022
1 parent 9547c0a commit 792a452
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 792a452

Please sign in to comment.