Commit 0709b4e6 authored by Marvin Scholz's avatar Marvin Scholz
Browse files

Only look for admin include if no local found

This switches the behaviour introduced with the last commit
so that now the admin folder is only checked for includes if
in the specified path none is found.
parent 5b416b31
......@@ -207,16 +207,19 @@ static xmlDocPtr custom_loader(const xmlChar *URI,
xsltStylesheet *c;
ice_config_t *config;
final_URI = xmlStrdup(URI);
struct stat file;
switch (type) {
/* In case an include is loaded */
/* Not look in admindir if the include file exists */
if (stat((char *)URI, &file) == 0)
c = (xsltStylesheet *) ctxt;
/* Check if we actually have context/path */
if (ctxt == NULL || c->doc->URL == NULL)
rel_path = xmlBuildRelativeURI(URI, c->doc->URL);
if (rel_path != NULL && admin_path != NULL) {
struct stat file;
fn = xmlBuildURI(rel_path, admin_path);
if (fn != NULL && stat((char *)fn, &file) == 0) {
final_URI = fn;
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment