no way to disable bugzilla munging on a per-channel basis

VERIFIED FIXED

Status

Other Applications
ChatZilla
--
enhancement
VERIFIED FIXED
11 years ago
11 years ago

People

(Reporter: Paolo Bonzini, Assigned: Robert Ginda)

Tracking

({polish})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [cz-0.9.78])

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6
Build Identifier: 

The attached patch will disable bugzilla link munging on channels/networks where the bugURL is redefined to be the empty string.

Reproducible: Always
(Reporter)

Comment 1

11 years ago
Created attachment 234390 [details] [diff] [review]
patch to add the feature
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: polish
(Reporter)

Comment 2

11 years ago
ping?
Comment on attachment 234390 [details] [diff] [review]
patch to add the feature

Can you look at this and see if this patch is acceptable?
Attachment #234390 - Flags: review?(rginda)

Comment 4

11 years ago
Comment on attachment 234390 [details] [diff] [review]
patch to add the feature

The review flags are there for a reason :-)

Also, your patch doesn't adhere to the code style ChatZilla code uses. (Just in case you're wondering, I'm not a peer/owner for this module, so whatever I say about your patch ultimately means very little in whether or not it gets in - which is why I'm asking review from someone who does have that authority)

For coding style, see http://www.hacksrus.com/~ginda/pedant.html
Attachment #234390 - Flags: review?(silver)
Whiteboard: [patch]

Comment 5

11 years ago
Comment on attachment 234390 [details] [diff] [review]
patch to add the feature

>-    anchor.setAttribute ("href", bugURL.replace("%s", idOrAlias));
>-    anchor.setAttribute ("class", "chatzilla-link");
>-    anchor.setAttribute ("target", "_content");
>-    insertHyphenatedWord (matchText, anchor);
>-    containerTag.appendChild (anchor);
>-
>+    if (bugURL.length > 0)
>+    {
>+        var idOrAlias = matchText.match(/bug\s+#?(\d{3,6}|[^\s,]{1,20})/i)[1];
>+        var anchor = document.createElementNS ("http://www.w3.org/1999/xhtml",
>+                                               "html:a");
>+
>+        anchor.setAttribute ("href", bugURL.replace("%s", idOrAlias));
>+        anchor.setAttribute ("class", "chatzilla-link");
>+        anchor.setAttribute ("target", "_content");
>+        insertHyphenatedWord (matchText, anchor);
>+        containerTag.appendChild (anchor);

Style: no spaces before the functions' parentheses (in all lines changes/moved).

>+    } else
>+        insertHyphenatedWord (matchText, containerTag);

Style: braces on the else block, because the if block has them.

r=silver with those fixed.
Attachment #234390 - Flags: review?(silver)
Attachment #234390 - Flags: review?(rginda)
Attachment #234390 - Flags: review+

Comment 6

11 years ago
Checking in mozilla/extensions/irc/xul/content/static.js;
/cvsroot/mozilla/extensions/irc/xul/content/static.js,v  <--  static.js
new revision: 1.221; previous revision: 1.220
done
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED

Updated

11 years ago
Whiteboard: [patch] → [cz-0.9.78]
Works as described on latest nightly - with bugzilla url blank, munging does not occur, with bugzilla URL filled, munging happens as expected.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.