diff options
| author | Christian Weiske <christian.weiske@netresearch.de> | 2013-09-04 15:51:58 +0200 |
|---|---|---|
| committer | Christian Weiske <christian.weiske@netresearch.de> | 2013-09-04 15:51:58 +0200 |
| commit | fe6c3d3a27c1d44c185552b2b7c8560bc3cd3bf9 (patch) | |
| tree | b3b6dfc6c77f9f247a8fe8a452ba1d178682910b | |
| parent | 4fbcf4905db42c59dcb3a9322a8c9d8bbd857417 (diff) | |
| download | phorkie-fe6c3d3a27c1d44c185552b2b7c8560bc3cd3bf9.tar.gz phorkie-fe6c3d3a27c1d44c185552b2b7c8560bc3cd3bf9.zip | |
detect xml and json as text
| -rw-r--r-- | src/phorkie/File.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/phorkie/File.php b/src/phorkie/File.php index 63d23e6..dc90d9b 100644 --- a/src/phorkie/File.php +++ b/src/phorkie/File.php @@ -165,7 +165,9 @@ class File $type = $GLOBALS['phorkie']['languages'][$ext]['mime']; return substr($type, 0, 5) === 'text/' - || $type == 'application/javascript'; + || $type == 'application/javascript' + || substr($type, -4) == '+xml' + || substr($type, -5) == '+json'; } } |
