diff --git a/include/ferien.class.php b/include/ferien.class.php index dc6767d4b..953130a08 100644 --- a/include/ferien.class.php +++ b/include/ferien.class.php @@ -205,5 +205,22 @@ class ferien extends basis_db return true; return false; } + + /** + * Liefert ein Array mit den Ferien zum angegebenen Datum + * + * @param $timestamp + * @return array + */ + public function getFerien($timestamp) + { + $ret = array(); + + foreach ($this->ferien AS $f) + if ($timestamp>=$f->vontimestamp && $timestamp<=$f->bistimestamp) + $ret[]=$f->bezeichnung; + + return $ret; + } } ?> \ No newline at end of file diff --git a/include/wochenplan.class.php b/include/wochenplan.class.php index 9d2b2d11a..6b101c6fe 100644 --- a/include/wochenplan.class.php +++ b/include/wochenplan.class.php @@ -937,8 +937,22 @@ class wochenplan extends basis_db $index=1; $bgcolor=$cfgStdBgcolor[$index+3]; if ($isferien) + { $bgcolor='#FFFF55'; - echo 'getFerien($datum) as $bezeichnung) + { + if($ferienbezeichnung!='') + $ferienbezeichnung.=', '; + $ferienbezeichnung .= $bezeichnung; + } + } + echo '