mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-09-15 17:33:37 +02:00
yweb: re-introduce 'WebsiteMain.hosted_directory'
* this directory can be used to host some of your cracy stuff.
yhtm, yjs and ysh will also parsed now. it is reachable with
<boxip>/hosted/
* if exist a subdir named 'logos' in this directory you can use
this as an external logo-dir for yweb too
* path can be configured with '--with-hosted_httpddir=PATH'
Origin commit data
------------------
Commit: 9078775a0a
Author: vanhofen <vanhofen@gmx.de>
Date: 2013-06-27 (Thu, 27 Jun 2013)
Origin message was:
------------------
- yweb: re-introduce 'WebsiteMain.hosted_directory'
* this directory can be used to host some of your cracy stuff.
yhtm, yjs and ysh will also parsed now. it is reachable with
<boxip>/hosted/
* if exist a subdir named 'logos' in this directory you can use
this as an external logo-dir for yweb too
* path can be configured with '--with-hosted_httpddir=PATH'
This commit is contained in:
@@ -490,7 +490,7 @@ void Cyhttpd::ReadConfig(void) {
|
||||
Config->setString("Language.selected", HTTPD_DEFAULT_LANGUAGE);
|
||||
Config->setString("Language.directory", HTTPD_LANGUAGEDIR);
|
||||
if (Config->getString("WebsiteMain.hosted_directory", "") == "")
|
||||
Config->setString("WebsiteMain.hosted_directory", "/var/hosted");
|
||||
Config->setString("WebsiteMain.hosted_directory", HOSTEDDOCUMENTROOT);
|
||||
Config->saveConfig(HTTPD_CONFIGFILE);
|
||||
}
|
||||
}
|
||||
@@ -527,14 +527,20 @@ void Cyhttpd::ReadConfig(void) {
|
||||
|
||||
// Check location of logos
|
||||
if (Config->getString("Tuxbox.LogosURL", "") == "") {
|
||||
if (access(std::string(ConfigList["WebsiteMain.directory"] + "/logos").c_str(), 4) == 0) {
|
||||
Config->setString("Tuxbox.LogosURL", ConfigList["WebsiteMain.directory"] + "/logos");
|
||||
have_config = false; //save config
|
||||
}
|
||||
else if (access(std::string(ConfigList["WebsiteMain.override_directory"] ).c_str(), 4) == 0){
|
||||
if (access(std::string(ConfigList["WebsiteMain.override_directory"] + "/logos").c_str(), 4) == 0) {
|
||||
Config->setString("Tuxbox.LogosURL", ConfigList["WebsiteMain.override_directory"] + "/logos");
|
||||
have_config = false; //save config
|
||||
}
|
||||
else if (access(std::string(ConfigList["WebsiteMain.directory"] + "/logos").c_str(), 4) == 0){
|
||||
Config->setString("Tuxbox.LogosURL", ConfigList["WebsiteMain.directory"] + "/logos");
|
||||
have_config = false; //save config
|
||||
}
|
||||
#ifdef Y_CONFIG_USE_HOSTEDWEB
|
||||
else if (access(std::string(ConfigList["WebsiteMain.hosted_directory"] + "/logos").c_str(), 4) == 0){
|
||||
Config->setString("Tuxbox.LogosURL", ConfigList["WebsiteMain.hosted_directory"] + "/logos");
|
||||
have_config = false; //save config
|
||||
}
|
||||
#endif //Y_CONFIG_USE_HOSTEDWEB
|
||||
}
|
||||
ConfigList["Tuxbox.LogosURL"] = Config->getString("Tuxbox.LogosURL", "");
|
||||
|
||||
|
Reference in New Issue
Block a user