Bilder für Erklärtexte in eigene Ordner ausgelagert
@@ -136,7 +136,7 @@ class TopicData
|
||||
if (!isset($article)) {
|
||||
$article = "Kein Erklärtext vorhanden";
|
||||
}
|
||||
$article = str_replace('$TOPICPATH', Config::getTopicDirectory($subjectId, $topicId), $article);
|
||||
$article = str_replace('$TOPICPATH', Config::getTopicDirectory($subjectId, $topicId) . "images", $article);
|
||||
|
||||
$result->article = $article;
|
||||
|
||||
@@ -232,7 +232,7 @@ class TopicData
|
||||
*/
|
||||
public function addImage(string $name, string $tmp_name): bool
|
||||
{
|
||||
$imageDirectory = Config::getTopicDirectory($this->getSubjectId() , $this->getId()) . "";
|
||||
$imageDirectory = Config::getTopicDirectory($this->getSubjectId() , $this->getId()) . "images/";
|
||||
|
||||
if(!is_dir($imageDirectory)) {
|
||||
if(!mkdir($imageDirectory)) {
|
||||
@@ -248,13 +248,13 @@ class TopicData
|
||||
}
|
||||
|
||||
/**
|
||||
* Löscht eine downloadbare Datei des Themas
|
||||
* Löscht ein Bild des Themas
|
||||
* @param string $name Dateiname
|
||||
* @return bool true, wenn erfolgreich, sonst false
|
||||
*/
|
||||
public function deleteImage(string $name): bool
|
||||
{
|
||||
if(!unlink(Config::getTopicDirectory($this->getSubjectId() , $this->getId()) . "$name")) {
|
||||
if(!unlink(Config::getTopicDirectory($this->getSubjectId() , $this->getId()) . "images/$name")) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 788 KiB After Width: | Height: | Size: 788 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 130 KiB After Width: | Height: | Size: 130 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 297 KiB After Width: | Height: | Size: 297 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 297 KiB After Width: | Height: | Size: 297 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
|
Before Width: | Height: | Size: 159 KiB After Width: | Height: | Size: 159 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |
|
Before Width: | Height: | Size: 5.0 KiB |