Index: themes/Default/video.php
===================================================================
--- themes/Default/video.php (revision 7006)
+++ themes/Default/video.php (working copy)
@@ -40,12 +40,19 @@
if( $Filter_Category == -1)
echo "selected";
echo ">All\n";
- for($i=0;$i<=$Total_Categories;$i++) {
- echo "\n";
+ $i=0; // Represents the category's intid
+ $count=0; // Number of categories printed so far
+ while ($count <= $Total_Categories) {
+ // Check if a category exists with this intid.
+ if (isset($Category_String[$i])) {
+ echo "\n";
+ $count++;
+ }
+ $i++;
}
?>
@@ -116,7 +123,7 @@
echo 'MythVideo:';
echo " ";
- echo "";
echo t('Reverse Order');
echo "";
+ echo " | ";
+ echo "Videos";
+ echo " | ";
+ echo "Categories";
}
}
Index: includes/sorting.php
===================================================================
--- includes/sorting.php (revision 7006)
+++ includes/sorting.php (working copy)
@@ -185,4 +185,8 @@
return ($a->transcoder > $b->transcoder) ? 1 : -1;
}
+ function by_intid(&$a, &$b) {
+ if ($a->intid == $b->profile) return 0;
+ return ($a->intid > $b->intid) ? 1 : -1;
+ }
?>
Index: video_edit.php
===================================================================
--- video_edit.php (revision 7006)
+++ video_edit.php (working copy)
@@ -96,7 +96,7 @@
$result = mysql_query('SELECT * FROM videocategory')
or trigger_error('SQL Error: '.mysql_error(), FATAL);
while( $cat_data = mysql_fetch_assoc($result) ) {
- $num_cat++;
+ $num_cat = $cat_data["intid"];
$cat_str = $cat_data["category"]; ?>
}