Vox Populi(x) forum

Alexandria Book Library => Supporto (Support) => Topic started by: le5 on 25 November 2015, 15:29:40

Title: Edit a Book problem
Post by: le5 on 25 November 2015, 15:29:40
Hello

I just noticed, if you added authors and/or tags to a book and later you want to remove all tags or authors, it's not possible. At least on Tag and/or Author will be assigned to the book.

so i looked at the model in the backend and changed following.

models\book.php

if (parent::save($data)) {
if (isset($data['idauth'])){
$this->storeauthor($this->getState('book.id'), $data['idauth']);
}
if (isset($data['idtag'])){
    $this->storetag($this->getState('book.id'), $data['idtag']);
}
return true;
}


to

if (parent::save($data)) {
$this->storeauthor($this->getState('book.id'), $data['idauth']);
$this->storetag($this->getState('book.id'), $data['idtag']);
return true;
}


looks to like a bug... or did I oversee something

thx pawel
Title: Re: Edit a Book problem
Post by: federica on 13 December 2015, 10:34:10
le5, many thanks! I fixed the bugs using your code.