git.cweiske.de
/
phorkie.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
simple cache for rendered files
[phorkie.git]
/
src
/
phorkie
/
SetupCheck.php
diff --git
a/src/phorkie/SetupCheck.php
b/src/phorkie/SetupCheck.php
index c4d365c7a79552166aea7e88413f44ef0087f821..9cae724698168e4adf200450db4580d4ca4083ba 100644
(file)
--- a/
src/phorkie/SetupCheck.php
+++ b/
src/phorkie/SetupCheck.php
@@
-26,6
+26,7
@@
class SetupCheck
$this->writableDirs = array(
'gitdir' => Tools::foldPath($cfg['gitdir']),
'workdir' => Tools::foldPath($cfg['workdir']),
$this->writableDirs = array(
'gitdir' => Tools::foldPath($cfg['gitdir']),
'workdir' => Tools::foldPath($cfg['workdir']),
+ 'cachedir' => Tools::foldPath($cfg['cachedir']),
);
$this->elasticsearch = $cfg['elasticsearch'];
}
);
$this->elasticsearch = $cfg['elasticsearch'];
}
@@
-46,6
+47,13
@@
class SetupCheck
public function checkConfigFiles()
{
public function checkConfigFiles()
{
+ if (!isset($GLOBALS['phorkie']['cfgfiles'])
+ || count($GLOBALS['phorkie']['cfgfiles']) == 0
+ ) {
+ $this->info('No config files registered');
+ return;
+ }
+
foreach ($GLOBALS['phorkie']['cfgfiles'] as $file => $loaded) {
if ($loaded) {
$this->ok('Loaded config file: ' . Tools::foldPath($file));
foreach ($GLOBALS['phorkie']['cfgfiles'] as $file => $loaded) {
if ($loaded) {
$this->ok('Loaded config file: ' . Tools::foldPath($file));
@@
-133,8
+141,13
@@
class SetupCheck
public function checkMimeTypeDetection()
{
$rp = new Repository_Post();
public function checkMimeTypeDetection()
{
$rp = new Repository_Post();
- if ($rp->getType('<?php echo "foo"; ?>') != 'php') {
- $this->fail('MIME type detection fails');
+ $type = $rp->getType('<?php echo "foo"; ?>', true);
+ if ($type != 'php') {
+ $msg = 'MIME type detection fails';
+ if ($type instanceof \PEAR_Error) {
+ $msg .= '. Error: ' . $type->getMessage();
+ }
+ $this->fail($msg);
}
}
}
}