diff options
| author | Christian Weiske <cweiske@cweiske.de> | 2012-03-29 23:17:34 +0200 |
|---|---|---|
| committer | Christian Weiske <cweiske@cweiske.de> | 2012-03-29 23:17:34 +0200 |
| commit | 5c314428027bea7f3743d24968bd294e65b662ca (patch) | |
| tree | 690aafd5b7facfd50460ffaeca89049738c77eea /src/Phorkie/Repository.php | |
| parent | 88909f2355e6e53eec67a990c877cb64653cded4 (diff) | |
| download | phorkie-5c314428027bea7f3743d24968bd294e65b662ca.tar.gz phorkie-5c314428027bea7f3743d24968bd294e65b662ca.zip | |
merge paste creation and paste edit code
Diffstat (limited to 'src/Phorkie/Repository.php')
| -rw-r--r-- | src/Phorkie/Repository.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Phorkie/Repository.php b/src/Phorkie/Repository.php index 5273b60..d9fc234 100644 --- a/src/Phorkie/Repository.php +++ b/src/Phorkie/Repository.php @@ -76,7 +76,7 @@ class Repository return $arFiles; } - public function getFileByName($name) + public function getFileByName($name, $bHasToExist = true) { $base = basename($name); if ($base != $name) { @@ -86,7 +86,7 @@ class Repository throw new Exception_Input('Empty file name given'); } $path = $this->repoDir . '/' . $base; - if (!is_readable($path)) { + if ($bHasToExist && !is_readable($path)) { throw new Exception_Input('File does not exist'); } return new File($path, $this); |
