mirror of
https://github.com/silverstripe/silverstripe-docsviewer
synced 2024-10-22 11:05:56 +02:00
Allow absolute paths in DocumentationSearch::$index_location
This commit is contained in:
parent
49f56888f2
commit
b3d4e402a5
@ -205,10 +205,15 @@ class DocumentationSearch {
|
||||
self::$index_location = DOCSVIEWER_DIR;
|
||||
}
|
||||
|
||||
return Controller::join_links(
|
||||
TEMP_FOLDER,
|
||||
trim(self::$index_location, '/')
|
||||
);
|
||||
if(file_exists(self::$index_location)) {
|
||||
return self::$index_location;
|
||||
} else {
|
||||
return Controller::join_links(
|
||||
TEMP_FOLDER,
|
||||
trim(self::$index_location, '/')
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user