From 716a304706cf19d02e861518a78650f7618f88cd Mon Sep 17 00:00:00 2001 From: Sebastiaan Stok Date: Fri, 31 Aug 2012 16:46:45 +0200 Subject: [PATCH] Removed unknownAsBin parameter of isBinary() in Util/Repository.php --- src/GitList/Util/Repository.php | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/src/GitList/Util/Repository.php b/src/GitList/Util/Repository.php index bab5c32..39b1b07 100644 --- a/src/GitList/Util/Repository.php +++ b/src/GitList/Util/Repository.php @@ -137,16 +137,13 @@ class Repository * Returns whether the file is binary. * * @param string $file - * @param boolean $unknownAsBin if the file-type is unknown tread it as binary * * @return boolean */ - public function isBinary($file, $unknownAsBin = false) + public function isBinary($file) { if (($pos = strrpos($file, '.')) !== false) { $fileType = substr($file, $pos + 1); - } elseif ($unknownAsBin) { - return true; } else { return false; } @@ -155,17 +152,11 @@ class Repository return true; } - if (!empty($this->app['binary_filetypes'])) { - if (array_key_exists($fileType, $this->app['binary_filetypes'])) { - return $this->app['binary_filetypes'][$fileType]; - } + if (!empty($this->app['binary_filetypes']) && array_key_exists($fileType, $this->app['binary_filetypes'])) { + return $this->app['binary_filetypes'][$fileType]; } - if ($unknownAsBin) { - return true; - } else { - return false; - } + return false; } public function getReadme($repo, $branch = 'master')