mike.morgan%oregonstate.edu acde7a345e Fixed cache problems in recommended.php, search.php, update.php.
git-svn-id: svn://10.0.0.236/trunk@190635 18797224-902f-48f8-a5cc-f745e15eee43
2006-02-21 01:02:28 +00:00

44 lines
1.2 KiB
PHP

<?php
/**
* Home page for extensions, switchable on application.
*
* @package amo
* @subpackage docs
* @todo make this dynamic based on an SQL field (recommended)
*/
startProcessing('recommended.tpl', 'recommended', $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( 'recommendedExtensions' => $amo->getRecommendedAddons($sql['app'],'E',10),
'title' => 'Recommended '.$clean['app'].' Addons',
'content' => 'recommended.tpl',
'cats' => $amo->getCats('E'))
);
?>