Ticket #7674: Video.php.diff

File Video.php.diff, 1.1 KB (added by soless@…, 10 years ago)

Fixed version of patch, using a relative path to video_covers dir

  • ./classes/Video.php

    old new  
    11<?php
    2 
    32class Video {
    43
    54    var $intid;
     
    5352        $this->length       = $video['length'];
    5453        $this->showlevel    = $video['showlevel'];
    5554        $this->filename     = $video['filename'];
    56         $this->cover_file   = $video['coverfile'];
     55        $this->cover_root   = 'data/video_covers/';
     56        $this->cover_file   = $this->cover_root . $video['coverfile'];
    5757        $this->browse       = $video['browse'];
    5858    // And the artwork URL
    5959        if ($this->cover_file != 'No Cover' && file_exists($this->cover_file) ) {
     
    146146                    $this->length,
    147147                    $this->showlevel,
    148148                    $this->filename,
    149                     ( @filesize($this->cover_file) > 0 ? $this->cover_file : 'No Cover' ),
     149                    ( @filesize('data/video_covers/'.$this->cover_file) > 0 ? $this->cover_file : 'No Cover' ),
    150150                    $this->browse,
    151151                    $this->intid
    152152                    );