merged changes

This commit is contained in:
Felix Kauselmann
2014-09-23 21:47:35 +02:00
35 changed files with 182 additions and 111 deletions

View File

@ -11,6 +11,7 @@
#include "static.h"
#include <QApplication>
StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
:HttpRequestHandler(parent)
{
@ -25,8 +26,8 @@ StaticFileController::StaticFileController(QSettings* settings, QObject* parent)
#endif
{
#if defined Q_OS_UNIX && ! defined Q_OS_MAC
QFileInfo configFile(QString(DATADIR)+"/YACReader");
docroot=QFileInfo(QString(DATADIR)+"/YACReader",docroot).absoluteFilePath();
QFileInfo configFile(QString(DATADIR)+"/yacreader");
docroot=QFileInfo(QString(DATADIR)+"/yacreader",docroot).absoluteFilePath();
#else
QFileInfo configFile(QApplication::applicationDirPath());
docroot=QFileInfo(QApplication::applicationDirPath(),docroot).absoluteFilePath();

View File

@ -23,8 +23,8 @@ TemplateLoader::TemplateLoader(QSettings* settings, QObject* parent)
#endif
{
#if defined Q_OS_UNIX && !defined Q_OS_MAC
QFileInfo configFile(QString(DATADIR)+"/YACReader");
templatePath=QFileInfo(QString(DATADIR)+"/YACReader",templatePath).absoluteFilePath();
QFileInfo configFile(QString(DATADIR)+"/yacreader");
templatePath=QFileInfo(QString(DATADIR)+"/yacreader",templatePath).absoluteFilePath();
#else
QFileInfo configFile(QApplication::applicationDirPath());
templatePath=QFileInfo(QApplication::applicationDirPath(),templatePath).absoluteFilePath();

View File

@ -122,9 +122,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).toInt()) )
if(library.indexIn(path)!=-1 && DBHelper::getLibraries().contains(library.cap(1).toInt()) )
{
//listar el contenido del folder
if(folder.exactMatch(path))

View File

@ -27,7 +27,7 @@ QString Static::getConfigDir() {
}
// Search config file
#if defined Q_OS_UNIX && !defined Q_OS_MAC
QString binDir=(QString(DATADIR) + "/YACReader");
QString binDir=(QString(DATADIR)+"/yacreader");
#else
QString binDir=QCoreApplication::applicationDirPath();
#endif