Quick fix for Wikipedia archives issues #6.
This commit is contained in:
parent
6332cf69a5
commit
eef5297f98
|
@ -439,7 +439,14 @@ if (!class_exists("Owark")) {
|
||||||
$loc = '/wp-content/plugins/owark' . substr($link->arc_location, $pos);
|
$loc = '/wp-content/plugins/owark' . substr($link->arc_location, $pos);
|
||||||
$arc_loc = home_url() . $loc;
|
$arc_loc = home_url() . $loc;
|
||||||
|
|
||||||
|
// The file name is either index.html or guessed from the URL
|
||||||
|
if ($home_url[strlen($home_url)] == '/') {
|
||||||
$file_location = '.'. $loc .'/index.html';
|
$file_location = '.'. $loc .'/index.html';
|
||||||
|
} else {
|
||||||
|
$parts = str_split($home_url, '/');
|
||||||
|
$file_location = '.'. $loc . $parts[count($parts)] . '.html';
|
||||||
|
}
|
||||||
|
|
||||||
if (!file_exists($file_location)) {
|
if (!file_exists($file_location)) {
|
||||||
// If index.html doesn't exist, find another html file!
|
// If index.html doesn't exist, find another html file!
|
||||||
$dir = opendir('.'.$loc);
|
$dir = opendir('.'.$loc);
|
||||||
|
|
Loading…
Reference in New Issue