diff -NBurp mythweb-old/includes/sorting.php mythweb/includes/sorting.php --- mythweb-old/includes/sorting.php 2006-02-26 03:20:07.000000000 -0600 +++ mythweb/includes/sorting.php 2006-02-26 04:39:45.000000000 -0600 @@ -70,42 +70,52 @@ isset($_GET['reverse']) or $_GET['reverse'] = $_POST['reverse']; isset($_GET['sortby']) or $_GET['sortby'] = $_POST['sortby']; // Now we build an array the user's sort preferences - if (!is_array($_SESSION[$session]) || !count($_SESSION[$session])) + if (!is_array($_SESSION[$session]) || !count($_SESSION[$session])) { $_SESSION[$session] = array(array('field' => 'airdate', 'reverse' => false), array('field' => 'title', 'reverse' => false)); + } // If we were given a sort parameter, let's put it into the sort preferences if ($_GET['sortby']) { $_GET['sortby'] = strtolower($_GET['sortby']); - if (!function_exists('by_'.$_GET['sortby'])) + if (!function_exists('by_'.$_GET['sortby'])) { $_GET['sortby'] = 'title'; + } // This sortby method is the first element in the sort array, let's reverse it (unless told otherwise) if ($_SESSION[$session][0]['field'] == $_GET['sortby']) { - if (isset($_GET['reverse'])) + if (isset($_GET['reverse'])) { $_SESSION[$session][0]['reverse'] = ($_GET['reverse'] > 0 || eregi('^y', $_GET['reverse'])) ? true : false; - else + } + else { $_SESSION[$session][0]['reverse'] = $_SESSION[$session][0]['reverse'] ? false : true; + } } // Otherwise, we need to parse the array, and add the current choice to the top else { // Scan the sort array for any entries matching the current choice, and remove them foreach ($_SESSION[$session] as $key => $sort) { // Found a match, or an old/accidental sort method - remove the sort entry - if ($sort['field'] == $_GET['sortby'] || !function_exists('by_'.$sort['field'])) + if ($sort['field'] == $_GET['sortby'] || !function_exists('by_'.$sort['field'])) { unset($_SESSION[$session][$key]); + } } // Add this choice to the top of the list array_unshift($_SESSION[$session], array('field' => $_GET['sortby'], - 'reverse' => $_GET['reverse'] ? true : false)); + 'reverse' => $_GET['reverse'] ? false : false)); } } // No sortby, but requested a reversal of the main field - elseif ($_GET['reverse']) + elseif ($_GET['reverse']) { $_SESSION[$session][0]['reverse'] = $_SESSION[$session][0]['reverse'] ? false : true; + } + else { + $_SESSION[$session][0]['reverse'] = false; + } // Once we've processed the information, we should make sure that we're actually sorting an array - if (!count($programs)) + if (!count($programs)) { return; + } // Now we just need to sort the array $GLOBALS['user_sort_choice'] = &$_SESSION[$session]; usort($programs, 'by_user_choice'); diff -NBurp mythweb-old/modules/video/edit.php mythweb/modules/video/edit.php --- mythweb-old/modules/video/edit.php 2006-02-26 03:20:07.000000000 -0600 +++ mythweb/modules/video/edit.php 2006-02-26 04:40:27.000000000 -0600 @@ -44,7 +44,7 @@ if (isset($_POST['submit'])) { ?> - + - - + + - - - - - - - + + + + + + + - - - + + + -
coverfile))) - echo ''; + echo '' . html_entities($show->title) . ''; else echo ' '; ?> url.'">'.html_entities($show->title).'' ?>director ?>plot ?>category] ?>director) ?>plot) ?>category]) ?> rating ?> inetref ?> length * 60) ?> userrating ?> year ?> +