Closed Bug 248822 Opened 20 years ago Closed 20 years ago

TB extension should have a download now link instead of install now

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

x86
Windows XP
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 247200

People

(Reporter: jaap, Assigned: wolf)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040625 Firefox/0.9
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7) Gecko/20040625 Firefox/0.9

If you click on the install now link of TB extension it will try to install the
extension in FF, which consequently fails. The user should download the
extension so Download now would be better instead of install now. With some php
code you can make sure that the file gets downloaded instead of installed. This
is the php code  I use:
----------
<?php

$completeFilePath = substr($_SERVER['PATH_INFO'], 1);

if ( stristr($completeFilePath, 'tp://') ) {

$fileName = basename($completeFilePath);

header('Cache-Control: no-cache, must-revalidate');
header('Pragma: no-cache');

// C-D: attachment; ?
header("Content-type: application/octet-stream\nContent-Disposition: inline;
filename=\"".$fileName."\"");

$fd=fopen($completeFilePath,'r');

fpassthru($fd);

} else {

header('Location: /');

}

?>

-----

Then you can make sure that the extension is downloaded by using the following link.

http://dictionarysearch.mozdev.org/download.php/http://downloads.mozdev.org/dictionarysearch/dictionarysearch_0.6.1.xpi

Reproducible: Always
Steps to Reproduce:
Thanks for the PHP code here, but it won't work with update.. the
update.mozilla.org server doesn't have the files on it, it redirects to the
ftp.m.o mirrors.

This bug is also a duplicate.. Marking as such.

*** This bug has been marked as a duplicate of 247200 ***
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Component: Update → Web Site
Product: mozilla.org → Update
Version: other → unspecified
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.