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

@ -214,12 +214,26 @@ class Hit
return realpath(__DIR__ . "/../../files/hits/".$feature) ; 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 * @param string $feature
* @return string|null * @return string|null
*/ */
public function getFeatureImgAsString($feature) { public function getFeatureImgAsString($feature) {
$filename = $this->getFeatureDirname($feature) .'/'.$this->getId().'.jpg'; $filename = $this->getFeatureFilename($feature);
if(!file_exists($filename)) { if(!file_exists($filename)) {
return null; return null;
} }

View file

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