Ticket #5171: weather_am.diff

File weather_am.diff, 1.6 KB (added by knightr@…, 12 years ago)

fix for the above descrbed problem

  • mythplugins/mythweb/includes/data_dir.php

     
    2424
    2525// New hard-coded cache directory
    2626    define('cache_dir', 'data/cache');
     27    define('cache_url', root.cache_dir.'/');
    2728
    2829// Make sure the image cache path exists and is writable
    2930    if (!is_dir(cache_dir) && !mkdir(cache_dir, 0755)) {
  • mythplugins/mythweb/modules/weather/tmpl/default/weather.am.php

     
    3232            echo "imageTotal = ". $matches[2] .";\n";
    3333            for ($i=0; $i<$matches[2]; $i++)  {
    3434                echo "images[$i] = new Image();\n";
    35                 echo "images[$i].src = \"/". cache_dir ."/". $matches[1] ."-$i\";\n";
     35                echo "images[$i].src = \"". cache_url . $matches[1] ."-$i\";\n";
    3636            }
    3737?>
    3838        function nextFrame (inc) {
     
    6868?>
    6969
    7070        output += ' <b>Faster</b><br>'
    71         output += '<img name="animation" src="<?php echo "/". cache_dir ."/". $matches[1] ."-0" ?>" alt="Animation" onload="setTimeout(\'animate()\', delay)">'
     71        output += '<img name="animation" src="<?php echo cache_url . $matches[1] ."-0" ?>" alt="Animation" onload="setTimeout(\'animate()\', delay)">'
    7272        output += '</form>'
    7373        document.write(output);
    7474