Skip to content

Commit

Permalink
back out due to regressions bug 690150
Browse files Browse the repository at this point in the history
  • Loading branch information
rhelmer committed Nov 7, 2011
1 parent f4e8013 commit c091798
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 45 deletions.
19 changes: 0 additions & 19 deletions webapp-php/application/views/common/dashboard_product.php
Expand Up @@ -36,25 +36,6 @@
<div id="release_channels">
<?php
$i = 0;

// sort top crashers from highest to lowest
function compare($prod1, $prod2) {

$firstProdVersion = $prod1->version;
$secondProdVersion = $prod2->version;

// get only the number from the string avoiding decimals and string characters
$firstVerNumber = (int) substr($firstProdVersion, 0, strrpos($firstProdVersion, "."));
$secondVerNumber = (int) substr($secondProdVersion, 0, strrpos($secondProdVersion, "."));

if($firstVerNumber == $secondVerNumber) {
return 0;
}
return $secondVerNumber - $firstVerNumber;
}

usort($top_crashers, "compare");

foreach ($top_crashers as $prodversion) {
$num_columns = count($top_crashers);
$i++;
Expand Down
28 changes: 2 additions & 26 deletions webapp-php/application/views/layout.php
Expand Up @@ -59,27 +59,7 @@
</optgroup>
<?php if (isset($featured_versions) && !empty($featured_versions)) { ?>
<optgroup label=" ">
<?php

// sort top crashers from highest to lowest
function compare_versions($prod1, $prod2) {

$firstProdVersion = $prod1->version;
$secondProdVersion = $prod2->version;

// get only the number from the string avoiding decimals and string characters
$firstVerNumber = (int) substr($firstProdVersion, 0, strrpos($firstProdVersion, "."));
$secondVerNumber = (int) substr($secondProdVersion, 0, strrpos($secondProdVersion, "."));

if($firstVerNumber == $secondVerNumber) {
return 0;
}
return $secondVerNumber - $firstVerNumber;
}

usort($featured_versions, "compare_versions");

foreach ($featured_versions as $featured_version) { ?>
<?php foreach ($featured_versions as $featured_version) { ?>
<option value="<?php out::H($featured_version->version); ?>"
<?php if ($featured_version->version == $chosen_version['version']) echo 'SELECTED'; ?>
><?php out::H($featured_version->version); ?></option>
Expand All @@ -88,11 +68,7 @@ function compare_versions($prod1, $prod2) {
<?php } ?>
<?php if (isset($unfeatured_versions) && !empty($unfeatured_versions)) { ?>
<optgroup label=" ">
<?php
usort($unfeatured_versions, "compare_versions");

foreach ($unfeatured_versions as $unfeatured_version) {
?>
<?php foreach ($unfeatured_versions as $unfeatured_version) { ?>
<option value="<?php out::H($unfeatured_version->version); ?>"
<?php if ($unfeatured_version->version == $chosen_version['version']) echo 'SELECTED'; ?>
><?php out::H($unfeatured_version->version); ?></option>
Expand Down

0 comments on commit c091798

Please sign in to comment.