Edit a Book problem

Started by le5, 25 November 2015, 15:29:40

Previous topic - Next topic
A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

le5

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

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

federica

le5, many thanks! I fixed the bugs using your code.
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]