git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
show reason for mime type detection failure in setup check
[phorkie.git]
/
src
/
phorkie
/
Repository
/
Post.php
diff --git
a/src/phorkie/Repository/Post.php
b/src/phorkie/Repository/Post.php
index 39798b57608d36ac1b1ab8fa5cd4604e8dc4322b..09cb977e2ac4eed1e7bd6894c5fd44e0bace25dc 100644
(file)
--- a/
src/phorkie/Repository/Post.php
+++ b/
src/phorkie/Repository/Post.php
@@
-151,6
+151,10
@@
class Repository_Post
->setOption('force')
->setOption('message', "$notes")
->execute();
->setOption('force')
->setOption('message', "$notes")
->execute();
+ //update info for dumb git HTTP transport
+ //the post-update hook should do that IMO, but does not somehow
+ $vc->getCommand('update-server-info')->execute();
+
$bChanged = true;
}
$bChanged = true;
}
@@
-228,13
+232,17
@@
class Repository_Post
return $prefix . $num;
}
return $prefix . $num;
}
- p
rotected function getType($content
)
+ p
ublic function getType($content, $returnError = false
)
{
$tmp = tempnam(sys_get_temp_dir(), 'phorkie-autodetect-');
file_put_contents($tmp, $content);
{
$tmp = tempnam(sys_get_temp_dir(), 'phorkie-autodetect-');
file_put_contents($tmp, $content);
- $type =
\
MIME_Type_PlainDetect::autoDetect($tmp);
+ $type =
Tool_
MIME_Type_PlainDetect::autoDetect($tmp);
unlink($tmp);
unlink($tmp);
+ if ($returnError && $type instanceof \PEAR_Error) {
+ return $type;
+ }
+
return $this->findExtForType($type);
}
return $this->findExtForType($type);
}