Skip to content

Commit

Permalink
Don't bother the user with formats they can't use
Browse files Browse the repository at this point in the history
  • Loading branch information
francois committed Jul 15, 2010
1 parent 023fcd8 commit 489e4cf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions adgear-ad-manager/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,17 @@ function adgear_update_formats_csv($old_value, $new_value) {
$formats = adgear_get_service_data( 'list_formats' );
$rows = array();
foreach( $formats["formats"] as $format ) {
/* Only keep formats which are good for Standard ads. That filters out Mobile App ad formats. */
$accepted = FALSE;
foreach( $format["accepted_families"] as $family ) {
if ( $family["name"] == "Standard" ) {
$accepted = TRUE;
break;
}
}

if ( ! $accepted ) continue;

$id = $format["id"];
$name = $format["name"];
$width = $format["width"];
Expand Down

0 comments on commit 489e4cf

Please sign in to comment.