diff options
author | Andreas Gohr <andi@splitbrain.org> | 2007-07-25 23:13:24 +0200 |
---|---|---|
committer | Andreas Gohr <andi@splitbrain.org> | 2007-07-25 23:13:24 +0200 |
commit | 4b030ce797e5645d4a29543c5dd004c97a99b3ca (patch) | |
tree | e76fe58d9a86842db49f1ce3289bb9fa963b0827 /inc/common.php | |
parent | 43078d10727954e0bdd01453555c690206289637 (diff) | |
download | rpg-4b030ce797e5645d4a29543c5dd004c97a99b3ca.tar.gz rpg-4b030ce797e5645d4a29543c5dd004c97a99b3ca.tar.bz2 |
skipempty parameter for buildAttributes
darcs-hash:20070725211324-7ad00-97ee12f6e28ab8298775218adbcb571a3b79c2d6.gz
Diffstat (limited to 'inc/common.php')
-rw-r--r-- | inc/common.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/inc/common.php b/inc/common.php index 3bdfc7c72..bed083392 100644 --- a/inc/common.php +++ b/inc/common.php @@ -197,10 +197,11 @@ function buildURLparams($params, $sep='&'){ * * @author Andreas Gohr */ -function buildAttributes($params){ +function buildAttributes($params,$skipempty=false){ $url = ''; foreach($params as $key => $val){ if($key{0} == '_') continue; + if(empty($val) && $skipempty) continue; $url .= $key.'="'; $url .= htmlspecialchars ($val); |