Changeset eef5297 for wordpress


Ignore:
Timestamp:
28/01/2012 11:16:17 (10 years ago)
Author:
Eric van der Vlist <vdv@dyomedea.com>
Branches:
master
Children:
bbe3c7f
Parents:
6332cf6
git-author:
Eric van der Vlist <vdv@dyomedea.com> (28/01/2012 11:16:17)
git-committer:
Eric van der Vlist <vdv@dyomedea.com> (28/01/2012 11:16:17)
Message:

Quick fix for Wikipedia archives issues #6.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wordpress/plugins/owark/owark.php

    r1581728 reef5297  
    440440            $arc_loc = home_url() . $loc; 
    441441 
    442             $file_location = '.'. $loc .'/index.html'; 
     442            // The file name is either index.html or guessed from the URL  
     443            if ($home_url[strlen($home_url)] == '/') { 
     444                $file_location = '.'. $loc .'/index.html'; 
     445            } else { 
     446                $parts = str_split($home_url, '/'); 
     447                $file_location = '.'. $loc . $parts[count($parts)] . '.html'; 
     448            } 
     449 
    443450            if (!file_exists($file_location)) { 
    444451                // If index.html doesn't exist, find another html file! 
Note: See TracChangeset for help on using the changeset viewer.