Closed Bug 278919 Opened 20 years ago Closed 20 years ago

new search feature is crazy broken

Categories

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

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: ted, Assigned: ted)

References

()

Details

Attachments

(1 file, 2 obsolete files)

Yeah.  Something goes terribly wrong with certain searches.

I'm on it.
Search results for Pinball says I'm on page 2 of 2, results 11-12.  There's
nothing on the page.  I also would only expect 1 result (or very few).  We're
looking for a simple search and simple results.  This should only be pulling
from the main table (for now)
Status: NEW → ASSIGNED
Target Milestone: 1.0 → 1.1
Attached patch Fixes some stuff (obsolete) — Splinter Review
Yeah, not enough testing on my part.  Also the style sucks less now.
Attachment #171711 - Flags: first-review?(Bugzilla-alanjstrBugs)
Comment on attachment 171711 [details] [diff] [review]
Fixes some stuff

I don't like that the page header is an h3 and the names are h2s.  

$pageid = $_GET["pageid"];
And then when you go to use it later, you're not escaping it.  Nor are you
making sure it is an integer.

if ($_GET["q"] || $_GET["pageid"]) $didSearch = 1;

If we don't have a q, then how did we do a search?  

$typedirs = array("E"=>"extensions","T"=>"themes","U"=>"update");
Move that outside of the loop

General issue:
are we sure the content inside the database is html safe (trustable)?
Attachment #171711 - Flags: first-review?(Bugzilla-alanjstrBugs) → first-review-
Attached patch Fixes the issues. (obsolete) — Splinter Review
Ok.  "Results" is in a h1 now.	$didSearch only gets set if $q is set.	$pageid
is ensured integer.  I removed #mainContent and it seems to look better. 
$typedirs moved outside the array.  The search results are h2, and extension
names and descriptions get escaped with htmlspecialchars().
Attachment #171711 - Attachment is obsolete: true
Attachment #171715 - Flags: first-review?(Bugzilla-alanjstrBugs)
Blocks: 278940
Comment on attachment 171715 [details] [diff] [review]
Fixes the issues.

Great!	Thanks.
Attachment #171715 - Flags: first-review?(Bugzilla-alanjstrBugs) → first-review+
Things like "&section" within the HREF attribute should be encoded as
"&section". Also, instead of using « I think we should use the actual
character. Since update is using UTF-8 that is possible. Why is the  
exactly needed?

Also, most files have a newline at the end. Not sure how update does that though.
Oops, that's my bad on the & missing.  Should have caught that.  I have no
idea how to actually insert a Unicode character for what we currently have as
entities.  Is it really important, or just good practice, or what?

As for the  s, I don't really know why they're there.  If they bother you
we could take them out.
You know how we have that big gap on the left?  How about a simple box that
links to Home like https://addons.update.mozilla.org/plugins/
I didn't do anything about   or the Unicode characters.
Attachment #171715 - Attachment is obsolete: true
Attachment #171816 - Flags: first-review?(Bugzilla-alanjstrBugs)
Comment on attachment 171816 [details] [diff] [review]
Escape those ampersands

Why are we getting the page id if didSearch !=1.
Attachment #171816 - Flags: first-review?(Bugzilla-alanjstrBugs) → first-review+
Fix checked in on branch and trunk by mconnor
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
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

Created:
Updated:
Size: