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