For Programmers: Free Programming Magazines  


Home > Archive > PHP Mirrors > June 2005 > cvs: php-bugs-web /include functions.inc









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author cvs: php-bugs-web /include functions.inc
Helgi Þormar Þorbjörnsson

2005-06-05, 3:56 am

dufuz Sun Jun 5 01:26:31 2005 EDT

Modified files:
/php-bugs-web/include functions.inc
Log:
Website, Doc, LiveDoc and System operation bugs don't need PHP version as per request #33247

#Added the Irrelevant choice which only works with above mentioned categories.

http://cvs.php.net/diff.php/php-bug...5&r2=1.156&ty=u
Index: php-bugs-web/include/functions.inc
diff -u php-bugs-web/include/functions.inc:1.155 php-bugs-web/include/functions.inc:1.156
--- php-bugs-web/include/functions.inc:1.155 Fri Apr 22 09:17:37 2005
+++ php-bugs-web/include/functions.inc Sun Jun 5 01:26:30 2005
@@ -133,7 +133,16 @@

function show_version_options($current,$default="")
{
- $versions = array("4.3.11", "4.3.10", "4.3.9", "4CVS-".date("Y-m-d")." (stable)", "5.0.4", "5.0.3", "5CVS-".date("Y-m-d")." (dev)");
+ $versions = array(
+ "4.3.11",
+ "4.3.10",
+ "4.3.9",
+ "4CVS-".date("Y-m-d")." (stable)",
+ "5.0.4",
+ "5.0.3",
+ "5CVS-".date("Y-m-d")." (dev)",
+ "Irrelevant",
+ );
echo "<option value=\"\">--Please Select--</option>\n";
while (list(,$v) = each($versions)) {
echo "<option", ($current == $v ? " selected" : ""), ">$v</option>\n";
@@ -477,10 +486,14 @@
$errors[] = "Please select a valid PHP version. If your PHP version is too old, please upgrade first and see if the problem has not already been fixed.";
}

- if (empty($in['php_version'])) {
+ if (empty($in['php_version']) && !is_phpversion_irrelevant($in['bug_type'
])) {
$errors[] = "Please select a valid PHP version.";
}

+ if ($in['php_version'] == 'Irrelevant' && !is_phpversion_irrelevant($in['bug_type'
])) {
+ $errors[] = "This category requires you to pick a PHP version.";
+ }
+
if (empty($in['sdesc'])) {
$errors[] = "You must supply a short description of the bug you are reporting.";
}
mazzanet

2005-06-05, 8:55 am

Helgi Þormar Þorbjörnsson wrote:
> dufuz Sun Jun 5 01:26:31 2005 EDT
>
> Modified files:
> /php-bugs-web/include functions.inc
> Log:
> Website, Doc, LiveDoc and System operation bugs don't need PHP

version as per request #33247
>
> #Added the Irrelevant choice which only works with above mentioned

categories.
>
>

http://cvs.php.net/diff.php/php-bug...5&r2=1.156&ty=u
> Index: php-bugs-web/include/functions.inc
> diff -u php-bugs-web/include/functions.inc:1.155

php-bugs-web/include/functions.inc:1.156
> --- php-bugs-web/include/functions.inc:1.155 Fri Apr 22 09:17:37 2005
> +++ php-bugs-web/include/functions.inc Sun Jun 5 01:26:30 2005
> @@ -133,7 +133,16 @@
>
> function show_version_options($current,$default="")
> {
> - $versions = array("4.3.11", "4.3.10", "4.3.9",

"4CVS-".date("Y-m-d")." (stable)", "5.0.4", "5.0.3",
"5CVS-".date("Y-m-d")." (dev)");
> + $versions = array(
> + "4.3.11",
> + "4.3.10",
> + "4.3.9",
> + "4CVS-".date("Y-m-d")." (stable)",
> + "5.0.4",
> + "5.0.3",
> + "5CVS-".date("Y-m-d")." (dev)",
> + "Irrelevant",
> + );



Maybe remove the , after "Irrelevant". :)
Helgi Þormar

2005-06-05, 8:55 am

On Sun, 2005-06-05 at 16:42 +1000, mazzanet wrote:
> Helgi Þormar Þorbjörnsson wrote:
> version as per request #33247
> categories.
> http://cvs.php.net/diff.php/php-bug...5&r2=1.156&ty=u
> php-bugs-web/include/functions.inc:1.156
> "4CVS-".date("Y-m-d")." (stable)", "5.0.4", "5.0.3",
> "5CVS-".date("Y-m-d")." (dev)");
>
>
> Maybe remove the , after "Irrelevant". :)


No, there is no need, it works with that extra comma and actually helps
prevent parse errors from happening if some person adds a new option at
the bottom, forgets to add the comma and to test and just commits, plus
there is no need to nitpick on such small thing when you look at the
rest of php-bugs-web ;)

- Helgi
Wez Furlong

2005-06-05, 3:56 pm

Trailing commas are a good habit when using a revision control system;
if you later add a new element, the diff will show only one line, rather
than a slightly less clear two lines (one for the added comma, one for
the actual added line).

And Helgi's other reasons are also good :)

--Wez.

Helgi Þormar wrote:
> On Sun, 2005-06-05 at 16:42 +1000, mazzanet wrote:
>
> No, there is no need, it works with that extra comma and actually helps
> prevent parse errors from happening if some person adds a new option at
> the bottom, forgets to add the comma and to test and just commits, plus
> there is no need to nitpick on such small thing when you look at the
> rest of php-bugs-web ;)
>
> - Helgi

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com