[chora] [PATCH] Minor Chora::url() fix...
Ryan C. Gordon
icculus at clutteredmind.org
Sun Jun 8 00:43:49 PDT 2003
Just a minor fix here. We're using Chora at http://cvs.icculus.org/, and
it works like a champ, but someone noticed that the "diff ignoring
whitespace" links in the revision listings don't actually do so.
The reason is that Chora::url() discards the "ws=0" arg because the "0"
fails the !empty() test.
This patch checks uses strlen on the arg instead to make sure it isn't
blank, which I assume was the original intention...at any rate, it seems
to fix the diff-with-no-whitespace link without any other problems.
Attached in unified diff format against latest CVS.
--ryan.
-------------- next part --------------
Index: Chora.php
===================================================================
RCS file: /repository/chora/lib/Chora.php,v
retrieving revision 1.36
diff -u -r1.36 Chora.php
--- Chora.php 27 May 2003 19:00:15 -0000 1.36
+++ Chora.php 8 Jun 2003 07:32:16 -0000
@@ -323,7 +323,7 @@
$argarr = array();
foreach ($arglist as $key => $val) {
- if (!empty($val)) {
+ if ( (isset($val)) && (strlen($val) > 0) ) {
$val = htmlspecialchars($val);
$argarr[] = "$key=$val";
}
More information about the chora
mailing list