Ticket #8000: mythweb-video-path.patch

File mythweb-video-path.patch, 1.3 KB (added by Robert S, 14 years ago)

Patch for broken path

  • mythweb/modules/video/handler.php

     
    167167                if (!isset($PATH['subs'][$path])) {
    168168                    $p = '';
    169169                    for ($i=0; $i<=$key;$i++) {
    170                         $p .=$paths[$i];
     170                        $p .='/'.$paths[$i];
    171171                    }
    172172                    $PATH['subs'][$path] = array('display' => $path,
    173173                                                 'path'    => "/$dir/$p",
     
    264264    if (isset($_SESSION['video']['path'])) {
    265265        $where .= ' AND CONCAT("/", IF(INSTR(filename,"/"), LEFT(filename, LENGTH(filename) - LOCATE("/", REVERSE(filename))), "")) = '.$db->escape($_SESSION['video']['path']);
    266266    }
     267
    267268// Deal with the parental locks
    268269    if (isset($_REQUEST['VideoAdminPassword']))
    269270        $_SESSION['video']['VideoAdminPassword'] = $_REQUEST['VideoAdminPassword'];
     
    272273        $where .= ' AND videometadata.showlevel <= '.$db->escape(setting('VideoDefaultParentalLevel', hostname));
    273274
    274275    if ($where)
    275         $where = 'WHERE '.substr($where, 4);
     276        //$where = 'WHERE '.substr($where, 4);
     277        $where = 'WHERE filename LIKE '.$db->escape('%'.$_SESSION['video']['path'].'%');
    276278
    277279    $sh = $db->query('
    278280        SELECT      videometadata.intid