Commit bce64834 authored by Gervase Markham's avatar Gervase Markham Committed by Gervase Markham

Bug 962571 - Fix syntax highlighting of code blocks. r=LpSolit, a=justdave.

parent 10cc520e
.. highlight:: perl
.. _customization:
......@@ -406,7 +406,7 @@ In between those sections, you'll find snippets of code like:
# Allow the assignee to change anything.
if ($ownerid eq $whoid) {
return 1;
return 1;
}
It's fairly obvious what this piece of code does.
......@@ -428,12 +428,12 @@ or a negative check, which returns 0 (deny.) E.g.:
::
if ($field eq "qacontact") {
if (Bugzilla->user->in_group("quality_assurance")) {
return 1;
}
else {
return 0;
}
if (Bugzilla->user->in_group("quality_assurance")) {
return 1;
}
else {
return 0;
}
}
This says that only users in the group "quality_assurance" can change
......@@ -444,14 +444,14 @@ Getting more weird:
::
if (($field eq "priority") &&
(Bugzilla->user->email =~ /.*\\@example\\.com$/))
(Bugzilla->user->email =~ /.*\\@example\\.com$/))
{
if ($oldvalue eq "P1") {
return 1;
}
else {
return 0;
}
if ($oldvalue eq "P1") {
return 1;
}
else {
return 0;
}
}
This says that if the user is trying to change the priority field,
......
.. highlight:: console
.. _install-perlmodules-manual:
......@@ -17,12 +17,12 @@ apply this magic incantation, as root:
::
bash# tar -xzvf <module>.tar.gz
bash# cd <module>
bash# perl Makefile.PL
bash# make
bash# make test
bash# make install
# tar -xzvf <module>.tar.gz
# cd <module>
# perl Makefile.PL
# make
# make test
# make install
.. note:: In order to compile source code under Windows you will need to obtain
a 'make' utility. The :command:`nmake` utility provided with
......
.. highlight:: console
.. _troubleshooting:
......@@ -55,7 +55,7 @@ Bugzilla.
::
bash$ ./testserver.pl http://landfill.bugzilla.org/bugzilla-tip
$ ./testserver.pl http://landfill.bugzilla.org/bugzilla-tip
TEST-OK Webserver is running under group id in $webservergroup.
TEST-OK Got ant picture.
TEST-OK Webserver is executing CGIs.
......@@ -97,23 +97,27 @@ To fix this, go to
:file:`<path-to-perl>/lib/DBD/sponge.pm`
in your Perl installation and replace
::
.. code-block:: perl
my $numFields;
if ($attribs->{'NUM_OF_FIELDS'}) {
$numFields = $attribs->{'NUM_OF_FIELDS'};
} elsif ($attribs->{'NAME'}) {
$numFields = @{$attribs->{NAME}};
$numFields = $attribs->{'NUM_OF_FIELDS'};
}
elsif ($attribs->{'NAME'}) {
$numFields = @{$attribs->{NAME}};
}
with
::
.. code-block:: perl
my $numFields;
if ($attribs->{'NUM_OF_FIELDS'}) {
$numFields = $attribs->{'NUM_OF_FIELDS'};
} elsif ($attribs->{'NAMES'}) {
$numFields = @{$attribs->{NAMES}};
$numFields = $attribs->{'NUM_OF_FIELDS'};
}
elsif ($attribs->{'NAMES'}) {
$numFields = @{$attribs->{NAMES}};
}
(note the S added to NAME.)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment