aboutsummaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
authorDylan Hardison <dylan@hardison.net>2022-10-29 13:08:25 -0700
committerGitHub <noreply@github.com>2022-10-29 13:08:25 -0700
commit1b6b074d03d3102ec84d7ce6afe77010517a5c96 (patch)
treef5fc39db9e314d6542c4f94cd55a30d59dac7e0c /Bugzilla
parentb9244bd1fa389ff2bfc1a3b70a7db5589f1366a3 (diff)
downloadbugs-1b6b074d03d3102ec84d7ce6afe77010517a5c96.tar
bugs-1b6b074d03d3102ec84d7ce6afe77010517a5c96.tar.gz
bugs-1b6b074d03d3102ec84d7ce6afe77010517a5c96.tar.bz2
bugs-1b6b074d03d3102ec84d7ce6afe77010517a5c96.tar.xz
bugs-1b6b074d03d3102ec84d7ce6afe77010517a5c96.zip
Fix pod tests by adding documentation (#123)
Added documentation for all undocumented functions in Bugzilla::Util. fixed pod syntax as well.
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Util.pm40
1 files changed, 33 insertions, 7 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 57ce5f6b6..5ceef4ef7 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -1263,18 +1263,44 @@ if Bugzilla is currently using the shadowdb or not. Used like:
=back
-=head1 B<Methods in need of POD>
-
=over
-=item do_ssl_redirect_if_required
+=item C<write_text($filename, $content)>
+
+Writes $content to $filename. The content will be encoded as UTF-8. Returns 1 if
+the atomic write was successful, 0 otherwise. C<$!> will be set to the error
+from C<rename()>.
+
+=item C<read_text($filename)>
+
+Reads the contents of $filename and returns it as a string. The string will be
+decoded as UTF-8.
+
+=item C<is_ipv4>
+
+Returns true if the given IP address is an IPv4 address.
+
+=item C<is_ipv6>
+
+Returns true if the given IP address is an IPv6 address.
+
+=item C<do_ssl_redirect_if_required>
+
+If Bugzilla is configured to redirect all HTTP requests to HTTPS, this function
+will redirect the user to the HTTPS version of the current page. It will not do
+anything if the user is already on HTTPS, or if there is no C<sslbase> parameter
+set.
-=item validate_time
+=item C<validate_time>
-=item is_ipv4
+Validates a time string. Returns true or false depending on whether the time
+string is valid.
-=item is_ipv6
+=item C<display_value>
-=item display_value
+Returns the display value for a given field and value. This value comes from the
+value_descs template variable. The value_descs variable is set in the template
+file C<global/value-descs.none.tmpl>. This is used for localizing Bugzilla to
+other languages.
=back