Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
bugzilla
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
bugzilla
Commits
f8e82d84
Commit
f8e82d84
authored
Dec 18, 2008
by
ghendricks%novell.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug 419748 - Need to hook deleting products
patch by ghendricks@novell.com r=mkanat a=mkanat
parent
f8a27359
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
0 deletions
+43
-0
Hook.pm
Bugzilla/Hook.pm
+12
-0
editproducts.cgi
editproducts.cgi
+2
-0
products-confirm_delete.pl
extensions/example/code/products-confirm_delete.pl
+27
-0
confirm-delete.html.tmpl
template/en/default/admin/products/confirm-delete.html.tmpl
+2
-0
No files found.
Bugzilla/Hook.pm
View file @
f8e82d84
...
...
@@ -462,6 +462,18 @@ Params:
=back
=head2 product-confirm_delete
Called before displaying the confirmation message when deleting a product.
Params:
=over
=item C<vars> - The template vars hashref.
=back
=head2 webservice
This hook allows you to add your own modules to the WebService. (See
...
...
editproducts.cgi
View file @
f8e82d84
...
...
@@ -211,6 +211,8 @@ if ($action eq 'del') {
$vars
->
{
'product'
}
=
$product
;
$vars
->
{
'token'
}
=
issue_session_token
(
'delete_product'
);
Bugzilla::Hook::
process
(
"product-confirm_delete"
,
{
vars
=>
$vars
});
$template
->
process
(
"admin/products/confirm-delete.html.tmpl"
,
$vars
)
||
ThrowTemplateError
(
$template
->
error
());
exit
;
...
...
extensions/example/code/products-confirm_delete.pl
0 → 100644
View file @
f8e82d84
#!/usr/bin/perl -w
# -*- Mode: perl; indent-tabs-mode: nil -*-
#
# The contents of this file are subject to the Mozilla Public
# License Version 1.1 (the "License"); you may not use this file
# except in compliance with the License. You may obtain a copy of
# the License at http://www.mozilla.org/MPL/
#
# Software distributed under the License is distributed on an "AS
# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
# implied. See the License for the specific language governing
# rights and limitations under the License.
#
# The Original Code is the Bugzilla Testopia System.
#
# The Initial Developer of the Original Code is Greg Hendricks.
# Portions created by Greg Hendricks are Copyright (C) 2008
# Novell. All Rights Reserved.
#
# Contributor(s): Greg Hendricks <ghendricks@novell.com>
use
strict
;
my
$vars
=
Bugzilla
->
hook_args
->
{
vars
};
$vars
->
{
'example'
}
=
1
\ No newline at end of file
template/en/default/admin/products/confirm-delete.html.tmpl
View file @
f8e82d84
...
...
@@ -241,6 +241,8 @@
[% END %]
[% Hook.process("confirmation") %]
[% IF product.bug_count == 0 || Param('allowbugdeletion') %]
<p>Do you really want to delete this product?</p>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment