Bug 40933
Merge Wiki (Bug 13593) and ViewVC (Bug 37020) integration into Bugzilla 3.2 (+refuck) git-svn-id: svn://svn.office.custis.ru/3rdparty/bugzilla.org/trunk@79 6955db30-a419-402b-8a0d-67ecbb4d7f56custis
parent
b67247e53b
commit
bf6ab899d4
|
@ -43,6 +43,7 @@ use constant DB_COLUMNS => qw(
|
||||||
initialowner
|
initialowner
|
||||||
initialqacontact
|
initialqacontact
|
||||||
description
|
description
|
||||||
|
wiki_url
|
||||||
);
|
);
|
||||||
|
|
||||||
use constant REQUIRED_CREATE_FIELDS => qw(
|
use constant REQUIRED_CREATE_FIELDS => qw(
|
||||||
|
@ -416,10 +417,11 @@ sub product {
|
||||||
#### Accessors ####
|
#### Accessors ####
|
||||||
###############################
|
###############################
|
||||||
|
|
||||||
sub id { return $_[0]->{'id'}; }
|
sub id { return $_[0]->{id}; }
|
||||||
sub name { return $_[0]->{'name'}; }
|
sub name { return $_[0]->{name}; }
|
||||||
sub description { return $_[0]->{'description'}; }
|
sub description { return $_[0]->{description}; }
|
||||||
sub product_id { return $_[0]->{'product_id'}; }
|
sub wiki_url { return $_[0]->{wiki_url}; }
|
||||||
|
sub product_id { return $_[0]->{product_id}; }
|
||||||
|
|
||||||
###############################
|
###############################
|
||||||
#### Subroutines ####
|
#### Subroutines ####
|
||||||
|
|
|
@ -119,7 +119,8 @@ sub get_param_list {
|
||||||
choices => ['', @legal_OS],
|
choices => ['', @legal_OS],
|
||||||
default => '',
|
default => '',
|
||||||
checker => \&check_opsys
|
checker => \&check_opsys
|
||||||
} );
|
},
|
||||||
|
);
|
||||||
return @param_list;
|
return @param_list;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
# ëÏÎÆÉÇÕÒÁÃÉÑ ÉÎÔÅÇÒÁÃÉÉ ÓÏ ×ÓÅ×ÏÚÍÏÖÎÙÍÉ ÷ÉËÁÍÉ É ÷ØÀ×ÉÓÑÍÉ
|
||||||
|
|
||||||
|
package extensions::custis::lib::Config;
|
||||||
|
|
||||||
|
use strict;
|
||||||
|
use warnings;
|
||||||
|
|
||||||
|
use Bugzilla::Config::Common;
|
||||||
|
|
||||||
|
sub get_param_list
|
||||||
|
{
|
||||||
|
return (
|
||||||
|
{
|
||||||
|
name => 'wiki_url',
|
||||||
|
type => 's',
|
||||||
|
default => 'http://wiki.office.custis.ru/wiki/index.php/',
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name => 'viewvc_url',
|
||||||
|
type => 's',
|
||||||
|
default => 'http://viewvc.office.custis.ru/viewvc.py/',
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name => 'smwiki_url',
|
||||||
|
type => 's',
|
||||||
|
default => 'http://penguin.office.custis.ru/smwiki/index.php/',
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name => 'smboa_url',
|
||||||
|
type => 's',
|
||||||
|
default => 'http://penguin.office.custis.ru/smboa/index.php/',
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name => 'sbwiki_url',
|
||||||
|
type => 's',
|
||||||
|
default => 'http://sobin.office.custis.ru/sbwiki/index.php/',
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name => 'rdwiki_url',
|
||||||
|
type => 's',
|
||||||
|
default => 'http://radey.office.custis.ru/rdwiki/index.php/',
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
1;
|
|
@ -1071,6 +1071,7 @@ use constant ABSTRACT_SCHEMA => {
|
||||||
COLUMN => 'userid',
|
COLUMN => 'userid',
|
||||||
DELETE => 'SET NULL'}},
|
DELETE => 'SET NULL'}},
|
||||||
description => {TYPE => 'MEDIUMTEXT', NOTNULL => 1},
|
description => {TYPE => 'MEDIUMTEXT', NOTNULL => 1},
|
||||||
|
wiki_url => {TYPE => 'TINYTEXT', NOTNULL => 1},
|
||||||
],
|
],
|
||||||
INDEXES => [
|
INDEXES => [
|
||||||
components_product_id_idx => {FIELDS => [qw(product_id name)],
|
components_product_id_idx => {FIELDS => [qw(product_id name)],
|
||||||
|
|
|
@ -55,6 +55,9 @@ use IO::Dir;
|
||||||
|
|
||||||
use base qw(Template);
|
use base qw(Template);
|
||||||
|
|
||||||
|
my ($custom_p, $custom_proto);
|
||||||
|
$custom_proto = do (bz_locations()->{libpath} . "/extensions/custom_url.pl");
|
||||||
|
|
||||||
# As per the Template::Base documentation, the _init() method is being called
|
# As per the Template::Base documentation, the _init() method is being called
|
||||||
# by the new() constructor. We take advantage of this in order to plug our
|
# by the new() constructor. We take advantage of this in order to plug our
|
||||||
# UTF-8-aware Parser object in neatly after the original _init() method has
|
# UTF-8-aware Parser object in neatly after the original _init() method has
|
||||||
|
@ -208,6 +211,17 @@ sub quoteUrls {
|
||||||
("\0\0" . ($count-1) . "\0\0")
|
("\0\0" . ($count-1) . "\0\0")
|
||||||
~egox;
|
~egox;
|
||||||
|
|
||||||
|
if ($custom_proto && %$custom_proto)
|
||||||
|
{
|
||||||
|
$custom_p ||= join '|', keys %$custom_proto;
|
||||||
|
$text =~ s
|
||||||
|
~\b($custom_p):([^\s<>\"\#]+)(\#[^\s<>\"\#]+)?
|
||||||
|
~($tmp = &{$custom_proto->{$1}}(html_quote($2),$3)) &&
|
||||||
|
($things[$count++] = "<a href=\"$tmp\">$&</a>") &&
|
||||||
|
("\0\0" . ($count-1) . "\0\0")
|
||||||
|
~gesox;
|
||||||
|
}
|
||||||
|
|
||||||
# We have to quote now, otherwise the html itself is escaped
|
# We have to quote now, otherwise the html itself is escaped
|
||||||
# THIS MEANS THAT A LITERAL ", <, >, ' MUST BE ESCAPED FOR A MATCH
|
# THIS MEANS THAT A LITERAL ", <, >, ' MUST BE ESCAPED FOR A MATCH
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
#!/usr/bin/perl
|
||||||
|
# Custom URL protocol definitions for CustIS Bugzilla
|
||||||
|
|
||||||
|
use Bugzilla::Util;
|
||||||
|
|
||||||
|
sub processWikiAnchor
|
||||||
|
{
|
||||||
|
my ($anchor) = (@_);
|
||||||
|
return "" unless $anchor;
|
||||||
|
$anchor = url_quote(substr($anchor,1));
|
||||||
|
$anchor =~ s/%/./g;
|
||||||
|
return $anchor;
|
||||||
|
}
|
||||||
|
|
||||||
|
sub processWikiUrl
|
||||||
|
{
|
||||||
|
Bugzilla->params->{$_[0]."_url"} . $_[1] . '#' . processWikiAnchor($_[2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
wiki => sub { processWikiUrl("wiki", @_) },
|
||||||
|
smwiki => sub { processWikiUrl("smwiki", @_) },
|
||||||
|
smboa => sub { processWikiUrl("smboa", @_) },
|
||||||
|
sbwiki => sub { processWikiUrl("sbwiki", @_) },
|
||||||
|
fawiki => sub { processWikiUrl("fawiki", @_) },
|
||||||
|
kswiki => sub { processWikiUrl("kswiki", @_) },
|
||||||
|
rdwiki => sub { processWikiUrl("rdwiki", @_) },
|
||||||
|
};
|
|
@ -260,12 +260,16 @@
|
||||||
cols = constants.COMMENT_COLS
|
cols = constants.COMMENT_COLS
|
||||||
%]
|
%]
|
||||||
<br>
|
<br>
|
||||||
<div id="knob-buttons">
|
<div id="knob-buttons" style="text-align: right">
|
||||||
<input type="button" value="Preview" onclick="document.getElementById('wrapcommentpreview').style.display='table-cell';document.getElementById('commentpreview').src='page.cgi?id=previewcomment.html&comment='+escape(document.changeform.comment.value);scrTo('commentpreview')">
|
<input type="button" value="Preview" onclick="document.getElementById('wrapcommentpreview').style.display='table-cell';document.getElementById('commentpreview').src='page.cgi?id=previewcomment.html&comment='+escape(document.changeform.comment.value);scrTo('commentpreview')">
|
||||||
<input type="submit" value="Commit" id="commit">
|
<input type="submit" value="Commit" id="commit">
|
||||||
[% IF bug.user.canmove %]
|
[% IF bug.user.canmove %]
|
||||||
<input type="submit" name="action" id="action" value="[% Param("move-button-text") %]">
|
<input type="submit" name="action" id="action" value="[% Param("move-button-text") %]">
|
||||||
[% END %]
|
[% END %]
|
||||||
|
<br>Look for [% terms.Bug %] in:
|
||||||
|
<a href="[% Param('viewvc_url') %]?view=query&comment=bug[% bug.bug_id %]+[% bug.bug_id %]&comment_match=fulltext&querysort=date&date=all">CVS&SVN</a>
|
||||||
|
/
|
||||||
|
<a href="[% bug.component_obj.wiki_url || Param('wiki_url') %][% terms.Bug %]_[% bug.bug_id %]">Wiki</a>
|
||||||
</div>
|
</div>
|
||||||
<table class="status">
|
<table class="status">
|
||||||
<tr>
|
<tr>
|
||||||
|
|
Loading…
Reference in New Issue