Closed Bug 290958 Opened 20 years ago Closed 20 years ago

Must hack url to get Thunderbird XPI

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 291616

People

(Reporter: artooro, Assigned: artooro)

References

Details

Attachments

(6 obsolete files)

When reviewing extensions you must hack the url in order to get the XPI for
Thunderbird extensions.
http://lxr.mozilla.org/update1.0/source/developers/approval.php#155

These lines will need to be reordered a bit to retain whether it was for
Thunderbird and change the install link to a pure download link for both themes
and extensions.
Status: NEW → ASSIGNED
Target Milestone: 1.0 → 1.1
Version: unspecified → 1.0
Yeah, will attach a patch soon
Attached patch Fixes Tb install links (obsolete) — Splinter Review
this patch should worth although I'm not able to test it. I would need an SQL
dump for testing something like this.
Attachment #181137 - Flags: first-review?
Comment on attachment 181137 [details] [diff] [review]
Fixes Tb install links

>      while ($row3 = mysql_fetch_array($sql_result3)) {
>   echo"".ucwords($row3[shortname])." $row3[MinAppVer]-$row3[MaxAppVer] \n";
>+     $shortName = $row3['shortname'];
>     }

You're in the middle of a while loop.  What guarantee is there that you'll get
the one you want as last?

>+    switch ($shortName) {
>+        case 'tb':
>+        case 'fx':
>     }

We have more applications than just TB and FX.	Mozilla 1.x also supports
triggers, although not necesarily the same format (I can't remember).  Nvu and
Sunbird will need download links when they come along.
Attachment #181137 - Flags: first-review? → first-review-
heh, one of my crazy mistakes. (What happens when your in a hurry)
Why is there a loop like this in the first place?
>> while ($row3 = mysql_fetch_array($sql_result3)) {

It should always return something and go through a single cycle. Why not change
it to:

$row3 = mysql_fetch_array($sql_result3);
echo"".ucwords($row3[shortname])." $row3[MinAppVer]-$row3[MaxAppVer] \n";

because it's only expecting one row in the first place. And it will return a row
unless there is somthing really wrong.

I'll make the Suite and Fx the same. Nvu should probably be the same way as Tb
but I don't know what the Nvu shortname will be so it will just use the default
link until that can be changed.
Attached patch Patch 2 (obsolete) — Splinter Review
This patch fixes problems.

I made Tb have links straight to XPI but everything else is the same.
Sunbird and Nvu will probably be added after the 2.0 rewrite anyway.

I also fixed a mismatching span as a bonus :)
Attachment #181137 - Attachment is obsolete: true
Comment on attachment 181159 [details] [diff] [review]
Patch 2


>-     while ($row3 = mysql_fetch_array($sql_result3)) {
>-  echo"".ucwords($row3[shortname])." $row3[MinAppVer]-$row3[MaxAppVer] \n";
>-    }
>+    $row3 = mysql_fetch_array($sql_result3);
>+    echo ucwords($row3['shortname'])." $row3[MinAppVer]-$row3[MaxAppVer] \n";
>+    

You can't get rid of the while loop.  If something works for multiple things,
like FX and TB, you need to list them.

try 

while () {
...
if (ucwords($row3['shortname']) == 'TB') { hasTB = true }
}
Attachment #181159 - Flags: first-review-
Attached patch Loop readded (obsolete) — Splinter Review
OK, I knew there was a catch which is why I didn't set the review flag on that
one.

Well I think this one is ready to go. Assuming the shortname for Nvu will be nv
I added support for it as well.

Sunbird can come later.
Attachment #181159 - Attachment is obsolete: true
Attachment #181180 - Flags: first-review?
Comment on attachment 181180 [details] [diff] [review]
Loop readded

OK, looks good to me, with one caveat:	you should lowercase the value you're
comparing to make sure that you never run into Tb or TB
Attachment #181180 - Flags: first-review? → first-review?(mike.morgan)
uh, caveat not understood. It is lowercased.
ok, now I understand. Your caveat. But I don't really think it's possible to get
a Tb, or TB.
Attached patch Forces lowercase string check (obsolete) — Splinter Review
Attachment #181180 - Attachment is obsolete: true
Attachment #181187 - Flags: first-review?
Attachment #181180 - Flags: first-review?(mike.morgan)
Attachment #181187 - Flags: first-review? → first-review?(mike.morgan)
OS: MacOS X → All
Hardware: Macintosh → All
Comment on attachment 181187 [details] [diff] [review]
Forces lowercase string check

This patch gives direct link to XPI even if it's browser compatible and only
checks for Thunderbird. Will work on it some more.
Attachment #181187 - Flags: first-review?(mike.morgan) → first-review-
Attached patch Make sure it's not a browser (obsolete) — Splinter Review
This patch makes sure it's not a browser before changing the link. Also it
changes the link to Download Now for non browser extensions.
Attachment #181187 - Attachment is obsolete: true
Attachment #181591 - Flags: first-review?(mike.morgan)
Comment on attachment 181591 [details] [diff] [review]
Make sure it's not a browser

Improper use of in_array() causes warnings:
> +    if (!in_array('fx') && !in_array('mz')) {

Improper use of \n in download link:
> +        echo '<span><a href="' . $installink . '">( Install Now )</a></span>\n"';
Attachment #181591 - Flags: first-review?(mike.morgan) → first-review-
Attached patch Fixes in_array() args (obsolete) — Splinter Review
in_array() arguments fixed.

I will no longer be submitting patches because it's a hopeless can if you can't
test anything.
Attachment #181591 - Attachment is obsolete: true
Attachment #182056 - Flags: first-review?(mike.morgan)
Depends on: 291616
Let me just expound on that a little. I decided to not submit patches anymore
because it's not very productive if I cannot test my own patches.
The in_array() problem was just a result of that.
Artooro -

Have you requested a dev environment on chameleon?
alanjstr, yes I have. But have not recieved reply from kveton in about a week or so.

*** This bug has been marked as a duplicate of 291616 ***
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → DUPLICATE
Attachment #182056 - Attachment is obsolete: true
Attachment #182056 - Flags: first-review?(mike.morgan) → first-review-
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: