Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error sending or reading book from additional dbs #72

Closed
malkavi opened this issue Jan 3, 2024 · 1 comment
Closed

Error sending or reading book from additional dbs #72

malkavi opened this issue Jan 3, 2024 · 1 comment
Labels
backend About COPS backend (PHP code)

Comments

@malkavi
Copy link

malkavi commented Jan 3, 2024

Hi,
I'm trying to send books from others dbs differents to 0 and I can't. Reading a little bit the code I see that epubreader.php only read data param from url and not the db param needed for identify the correct db. If I try to send a book from db different to 0 I received a book from db=0.
URL example: https://copsurl/epubreader.php?data=7852&db=2

Code used to read the book (EPubReader.php). The db param is readed from the book data not from a param.

  public static function getReader($idData, $request)
    {
        $book = Book::getBookByDataId($idData);
        $params = ['data' => $idData, 'db' => $book->getDatabaseId()];

Sorry If I am not enough clear or I am missing information.

Thanks for the hard work!

mikespub added a commit that referenced this issue Feb 15, 2024
@mikespub
Copy link
Member

You're absolutely right - I did miss sending the right database information when I split off the EpubReader and Mail classes. Fixed in the latest release

@mikespub mikespub added the backend About COPS backend (PHP code) label Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend About COPS backend (PHP code)
Projects
None yet
Development

No branches or pull requests

2 participants