bug fixed, the library name is no longer used in the urls of the web library

This commit is contained in:
Luis Ángel San Martín
2013-07-02 18:59:57 +02:00
parent 9fcf7366b1
commit 8a50379d30
10 changed files with 51 additions and 28 deletions

View File

@ -37,7 +37,7 @@ void RequestMapper::service(HttpRequest& request, HttpResponse& response) {
QRegExp cover("/library/.+/cover/[0-9a-f]+.jpg"); //get comic cover (navigation)
QRegExp comicPage("/library/.+/comic/[0-9]+/page/[0-9]+/?"); //get comic page
QRegExp library("/library/([^/]+)/.+"); //permite verificar que la biblioteca solicitada existe
QRegExp library("/library/([0-9]+)/.+"); //permite verificar que la biblioteca solicitada existe
path = QUrl::fromPercentEncoding(path).toLatin1();
@ -53,7 +53,7 @@ void RequestMapper::service(HttpRequest& request, HttpResponse& response) {
HttpSession session=Static::sessionStore->getSession(request,response,false);
if(!session.isNull() && session.contains("ySession"))
{
if(library.indexIn(path)!=-1 && DBHelper::getLibraries().contains(library.cap(1)) )
if(library.indexIn(path)!=-1 && DBHelper::getLibraries().count() > library.cap(1).toInt() )
{
//listar el contenido del folder
if(folder.exactMatch(path))