git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
automatically add file extension to new files when it has no extension
[phorkie.git]
/
src
/
phorkie
/
Repository
/
Post.php
diff --git
a/src/phorkie/Repository/Post.php
b/src/phorkie/Repository/Post.php
index 1b6075214e389b9d151a1669d44872baf6f19e22..b9d9be5aa626e6af73ca4556e2debc6481f66196 100644
(file)
--- a/
src/phorkie/Repository/Post.php
+++ b/
src/phorkie/Repository/Post.php
@@
-48,6
+48,10
@@
class Repository_Post
if (!isset($orignalName) || $orignalName == '') {
//new file
$bNew = true;
if (!isset($orignalName) || $orignalName == '') {
//new file
$bNew = true;
+ if (strpos($name, '.') === false) {
+ //automatically append file extension if none is there
+ $name .= '.' . $arFile['type'];
+ }
} else if (!$this->repo->hasFile($orignalName)) {
//unknown file
//FIXME: Show error message
} else if (!$this->repo->hasFile($orignalName)) {
//unknown file
//FIXME: Show error message