From e4936e67782f6b41901deee9ed0a1deabf8f2068 Mon Sep 17 00:00:00 2001 From: Dieter Hametner Date: Fri, 20 Jul 2007 19:16:54 +0000 Subject: - Make AJAX work when no 'epgImages' path has been specified. --- pages/content.ecpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'pages') diff --git a/pages/content.ecpp b/pages/content.ecpp index ec6f5b8..5f1780a 100644 --- a/pages/content.ecpp +++ b/pages/content.ecpp @@ -24,14 +24,17 @@ reply.setContentType(mime); // dsyslog("vdrlive::content::mimetype(%s)", mime.c_str()); // FileCache::ptr_type f = LiveFileCache().get("/tmp/live/" + request.getPathInfo()); -string path(request.getPathInfo()); +string const path(request.getPathInfo()); FileCache::ptr_type f; -if (path.find(LiveSetup().GetEpgImageDir()) != 0) - f = LiveFileCache().get(Plugin::GetConfigDirectory() + "/" + path); -else +string const epgImgPath(LiveSetup().GetEpgImageDir()); +if (!epgImgPath.empty() && path.find(epgImgPath) != string::npos) { f = LiveFileCache().get(path); +} +else { + f = LiveFileCache().get(Plugin::GetConfigDirectory() + "/" + path); +} if (f.get() == 0) { return DECLINED; -- cgit v1.2.3