Closed Bug 232903 Opened 19 years ago Closed 19 years ago

"edit" hook for global/useful-links.html.tmpl

Categories

(Bugzilla :: User Interface, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.18

People

(Reporter: myk, Assigned: gerv)

References

()

Details

Attachments

(1 file)

We need a hook for the example in the documentation.

template: global/useful-links.html.tmpl
where: 
    [% ', <a href="editkeywords.cgi">keywords</a>' 
                                              IF user.groups.editkeywords %]
    [% Hook.process("edit") %]

purpose: let extensions add more links to the "edit: foo, bar, baz" section of
the footer.

extension: will be used by testrunner, among others
http://www.willowriver.net/products/testrunner.php

Dave, does this look good to you?
*** Bug 232908 has been marked as a duplicate of this bug. ***
Attached patch Patch v.1Splinter Review
Patch from bug 232908 ;-)

Gerv
Assignee: myk → gerv
Status: NEW → ASSIGNED
Attachment #140452 - Flags: review?(myk)
Comment on attachment 140452 [details] [diff] [review]
Patch v.1

Yup, looks good.
Attachment #140452 - Flags: review?(myk) → review+
myk: can you approve?

Gerv
Flags: approval?
a=myk
Flags: approval? → approval+
Fixed.

Checking in template/en/default/global/useful-links.html.tmpl;
/cvsroot/mozilla/webtools/bugzilla/template/en/default/global/useful-links.html.tmpl,v
 <--  useful-links.html.tmpl
new revision: 1.22; previous revision: 1.21
done

Gerv
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Target Milestone: --- → Bugzilla 2.18
not ok 65 - (en/default) template/en/default/global/useful-links.html.tmpl has
unfiltered directives:
#   73: Hook.process("edit") 
# --ERROR
#     Failed test (t/008filter.t at line 117)

Failed Test   Stat Wstat Total Fail  Failed  List of Failed
-------------------------------------------------------------------------------
t/008filter.t    1   256   137    1   0.73%  65
/usr/opt/perl-5.8.0/bin/perl runtests.pl --verbose complete
/usr/opt/perl-5.8.0/bin/perl runtests.pl --verbose found FATAL compile errors

Tinderbox is burning, if you didn't catch that. :)
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
I'm not sure what the correct fix for this is, but I couldn't fix it by adding
to filterexceptions, and cooked up this which fixes the redness locally:

diff -u -p -r1.7 008filter.t
--- t/008filter.t       6 Sep 2003 19:23:43 -0000       1.7
+++ t/008filter.t       3 Feb 2004 11:17:28 -0000
@@ -182,6 +182,9 @@ sub directive_ok {
     
     # Params
     return 1 if $directive =~ /^Param\(/;
+    
+    # Hooks
+    return 1 if $directive =~ /^Hook.process\(/;
 
     # Other functions guaranteed to return OK output
     return 1 if $directive =~ /^(time2str|GetBugLink|url)\(/;

Is this what should be done?
Kiko: that's the correct fix. Hook.process directives should be exempt from
filter checks.

Gerv
Checked in assuming that's a stamp, on the rationale that the forest is burning
-- back me out and punish me later if I did wrong.
Status: REOPENED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → FIXED
Looks good to me.  Thanks, kiko!
Yes - thanks :-)

Gerv
No...  I think the edit section is getting too cluttered already.  I've been
hoping to make it all go away in favor of specific links to preferences and
system admin, which would then in turn have the links to the specific places.
Dave: was that comment meant for bug 232338?

Gerv
hmm, no, it was meant for this bug, but I had bugmail out of order, and it was
way out of context.  Feel free to ignore it. :)
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.