diff --git a/html/ops/gallery.inc b/html/ops/gallery.inc index 5bcd8852f6..f1d28b3421 100644 --- a/html/ops/gallery.inc +++ b/html/ops/gallery.inc @@ -3,7 +3,7 @@ require_once("../html_user/project_specific/project.inc"); require_once("../html_user/profile.inc"); require_once("../html_user/util.inc"); -require_once("../html_user/sanitize_html.inc"); + // Generates the html files which comprise the photo gallery. // $room: which gallery to generate (user, computer). @@ -65,7 +65,7 @@ function build_picture_pages($width, $height) { for ($col = 0; $col < $width; $col++) { if ($count < $numIds) { - fwrite($descriptor, ""); + fwrite($descriptor, ""); $count++; } } @@ -83,7 +83,6 @@ function build_picture_pages($width, $height) { page_tail($descriptor); - //fwrite($descriptor, ""); fclose($descriptor); } @@ -111,8 +110,10 @@ function build_country_pages() { $row2 = mysql_fetch_assoc($result2); if ($row2['country']) { - $countryMembers[$row2['country']][] = $row2['id']; - $numIds++; + $countryMembers[$row2['country']][] = $row2['id']; + $numIds++; + } else { + $countryMembers['Other'][] = $row2['id']; } } @@ -122,6 +123,7 @@ function build_country_pages() { //echo "$numIds users have profiles AND non-null country entries.
"; $countries = array_keys($countryMembers); + sort($countries); // Build the pages. // TODO: Define a constant for the desired number of rows per page.