Ticket #51: mythweb-nonlocalpng2.patch

File mythweb-nonlocalpng2.patch, 975 bytes (added by Mark Edwards, 20 years ago)

Third time lucky, this one should work and not break anything else

  • mythweb/includes/mythbackend.php

     
    267267                     $show->starttime,    // dummy org airdate
    268268                     '',                  // trailing separator
    269269                    );
    270         $lastmodified = strtotime(backend_command($cmd));
     270        if (is_file($pngpath)) {
     271            $lastmodified = filemtime($pngpath);
    271272    // Delete outdated images, but not until the show has finished recording
    272         if (is_file($pngpath) && $lastmodified < $show->lastmodified && $show->lastmodified >= $show->endtime) {
    273             unlink($pngpath);
    274             clearstatcache();
     273            if ($lastmodified < $show->lastmodified && $show->lastmodified >= $show->endtime) {
     274                 unlink($pngpath);
     275                 clearstatcache();
     276            }
    275277        }
    276278    // Need a new pixmap?
    277279        if (!is_file($pngpath)) {