Small fixes Hit

This commit is contained in:
Ruben 2016-09-19 17:20:55 +01:00
parent 163aa57373
commit d525c4938e
2 changed files with 16 additions and 1 deletions

View File

@ -213,13 +213,27 @@ class Hit
return realpath(__DIR__ . "/../../files/hits/".$feature) ;
}
/**
* @param string $feature
* @return string|false false if not exists
* @throws \Exception
*/
public function getFeatureFilename(string $feature) {
$dir = $this->getFeatureDirname($feature);
return $dir . '/'.$this->getId().'.jpg';
}
/**
* @param string $feature
* @return string|null
*/
public function getFeatureImgAsString($feature) {
$filename = $this->getFeatureDirname($feature) .'/'.$this->getId().'.jpg';
$filename = $this->getFeatureFilename($feature);
if(!file_exists($filename)) {
return null;
}

View File

@ -72,6 +72,7 @@ font-size:80%;
.mouth .emo-block{
width:50%;
float:left;
height:12%;
}
.mouth .emotitle{
display:block;