Ticket #402: category_list_ids.2.diff

File category_list_ids.2.diff, 1.3 KB (added by Adam Di Carlo <aph@…>, 19 years ago)

updated patch against 0.18 branch; includes the corresponding fix in video_edit.php

  • mythweb/video_edit.php

     
    8787       $result = mysql_query('SELECT * FROM videocategory')
    8888            or trigger_error('SQL Error: '.mysql_error(), FATAL);
    8989           while( $cat_data = mysql_fetch_assoc($result) )  {
    90            $num_cat++;
    91            $cat_str = $cat_data["category"]; ?>
    92        <option <?if ($category == $num_cat) print "selected"; ?> value="<?print $num_cat; ?>"><?print $cat_str; ?></option>
     90      ?><option <?if ($category == $cat_data["intid"]) print "selected"; ?> value="<?print $cat_data["intid"]; ?>"><?print $cat_data["category"]; ?></option>
    9391       <?}
    9492   ?></td>
    9593</tr><tr>
  • mythweb/themes/Default/video.php

     
    4040    if( $Filter_Category == -1)
    4141        echo "selected";
    4242    echo ">All</option>\n";
    43     for($i=0;$i<=$Total_Categories;$i++) {
     43    foreach (array_keys($Category_String) as $i) {
    4444        echo "<option value=$i ";
    4545        if( $i == $Filter_Category )
    4646            echo "selected";