The rotating feature on the front page assumes that:
a) there is already a feature that exists -- it barfs when there are zero features in the database for a given application
b) the main preview (preview='yes' in previews):
i) exists
ii) is a reasonable size
Some additions to the reviews manager would be:
a) adding the "feature" screenshot along with the review so admins have control over what the actual feature looks like
b) possibly requireing screenshots marked as "preview" to be a certain dimension so we can actually rely on the pixel width assumption
git-svn-id: svn://10.0.0.236/trunk@188458 18797224-902f-48f8-a5cc-f745e15eee43
48 lines
1.2 KiB
PHP
48 lines
1.2 KiB
PHP
<?php
|
|
/**
|
|
* Overview provides an inside look at what is going on for an application.
|
|
*
|
|
* @package amo
|
|
* @subpackage docs
|
|
*
|
|
* @todo Do something to spice up this page.
|
|
* @todo Get main template spruced up.
|
|
*/
|
|
|
|
$currentTab = 'home';
|
|
|
|
startProcessing('index.tpl', null, $compileId, 'nonav');
|
|
require_once('includes.php');
|
|
|
|
// If app is not set or empty, set it to null for our switch.
|
|
$_GET['app'] = (!empty($_GET['app'])) ? $_GET['app'] : null;
|
|
|
|
// Determine our application.
|
|
switch( $_GET['app'] ) {
|
|
case 'mozilla':
|
|
$clean['app'] = 'Mozilla';
|
|
break;
|
|
case 'thunderbird':
|
|
$clean['app'] = 'Thunderbird';
|
|
break;
|
|
case 'firefox':
|
|
default:
|
|
$clean['app'] = 'Firefox';
|
|
break;
|
|
}
|
|
|
|
// $sql['app'] can equal $clean['app'] since it was assigned in a switch().
|
|
// We have to ucfirst() it because the DB has caps.
|
|
$sql['app'] = $clean['app'];
|
|
|
|
$amo = new AMO_Object();
|
|
|
|
// Assign template variables.
|
|
$tpl->assign(
|
|
array( 'popularExtensions' => $amo->getPopularAddons($sql['app'],'E',5),
|
|
'feature' => $amo->getFeature($sql['app']),
|
|
'title' => $clean['app'].' Addons',
|
|
'currentTab' => $currentTab)
|
|
);
|
|
?>
|