<commit_before><?
$device_names = Array(
  'iphone' => 'iPhone',
  'android' => 'Android',
  'webos' => 'webOS',
  'winmo' => 'Windows Mobile',
  'blackberry' => 'Blackberry',
  'symbian' => 'Symbian',
  'palmos' => 'Palm OS',
  'featurephone' => 'Feature Phone',
  'computer' => 'Computer',
  'spider' => 'Robot',
  );

$device_apps = Array(
  'blackberry' => 'media/HarvardBBLauncher.jad',
  );

$device_instructions = Array(
  'blackberry' => 'On the next screen, click "Download", and "OK" or "Run" once the download is complete.',
  );

$download_items = Array(
  'blackberry' => 'shortcut',
);

$device_name = $device_names[$page->platform];

if (array_key_exists($page->platform, $device_apps)) {

  $download_url = $device_apps[$page->platform];
  $instructions = $device_instructions[$page->platform];
  $download_item = $download_items[$page->platform];
  require "$page->branch/index.html";
  $page->cache();

} else {

  $page->prepare_error_page('Download', 'download', 'Sorry, we do not have downloads for ' . $device_name . ' devices yet');<commit_msg>adding support to bbplus for BB downloads<commit_after><?
$device_names = Array(
  'iphone' => 'iPhone',
  'android' => 'Android',
  'webos' => 'webOS',
  'winmo' => 'Windows Mobile',
  'bbplus' => "BlackBerry"
  'blackberry' => 'BlackBerry',
  'symbian' => 'Symbian',
  'palmos' => 'Palm OS',
  'featurephone' => 'Feature Phone',
  'computer' => 'Computer',
  'spider' => 'Robot',
  );

$device_apps = Array(
  'bbplus' => 'media/HarvardBBLauncher.jad',
  'blackberry' => 'media/HarvardBBLauncher.jad',
  );

$device_instructions = Array(
  'bbplus' => 'On the next screen, click "Download", and "OK" or "Run" once the download is complete.',
  'blackberry' => 'On the next screen, click "Download", and "OK" or "Run" once the download is complete.',
  );

$download_items = Array(
  'bbplus' => 'shortcut',
  'blackberry' => 'shortcut',
);

$device_name = $device_names[$page->platform];

if (array_key_exists($page->platform, $device_apps)) {

  $download_url = $device_apps[$page->platform];
  $instructions = $device_instructions[$page->platform];
  $download_item = $download_items[$page->platform];
  require "$page->branch/index.html";
  $page->cache();

} else {

  $page->prepare_error_page('Download', 'download', 'Sorry, we do not have downloads for ' . $device_name . ' devices yet');
{'fraction_non_alphanumeric': 0.19289340101522842, 'fraction_numerical': 0.0, 'mean_word_length': 4.942211055276382, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 49, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 21, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4794319', 'n_tokens_mistral': 828, 'n_tokens_neox': 818, 'n_words': 185}