Last Comment Bug 349137 - no way to disable bugzilla munging on a per-channel basis
: no way to disable bugzilla munging on a per-channel basis
Status: VERIFIED FIXED
[cz-0.9.78]
: polish
Product: Other Applications
Classification: Client Software
Component: ChatZilla (show other bugs)
: unspecified
: All All
: -- enhancement (vote)
: ---
Assigned To: Robert Ginda
: Samuel Sieb
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-18 04:59 PDT by Paolo Bonzini
Modified: 2006-12-18 16:23 PST (History)
2 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
patch to add the feature (1.58 KB, patch)
2006-08-18 05:00 PDT, Paolo Bonzini
bugzilla-mozilla-20000923: review+
Details | Diff | Splinter Review

Description Paolo Bonzini 2006-08-18 04:59:24 PDT
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
Comment 1 Paolo Bonzini 2006-08-18 05:00:10 PDT
Created attachment 234390 [details] [diff] [review]
patch to add the feature
Comment 2 Paolo Bonzini 2006-12-13 10:47:57 PST
ping?
Comment 3 Stephanie Daugherty [:sdaugherty] 2006-12-13 11:02:58 PST
Comment on attachment 234390 [details] [diff] [review]
patch to add the feature

Can you look at this and see if this patch is acceptable?
Comment 4 :Gijs Kruitbosch 2006-12-13 11:11:16 PST
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
Comment 5 James Ross 2006-12-16 08:52:34 PST
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.
Comment 6 :Gijs Kruitbosch 2006-12-16 12:34:11 PST
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
Comment 7 Stephanie Daugherty [:sdaugherty] 2006-12-18 16:23:26 PST
Works as described on latest nightly - with bugzilla url blank, munging does not occur, with bugzilla URL filled, munging happens as expected.

Note You need to log in before you can comment on or make changes to this bug.