aboutsummaryrefslogtreecommitdiff
path: root/views/default/input
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 20:58:21 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-08-22 20:58:21 +0000
commit46c278c3603765b623fa441e2435274fbeda05ad (patch)
treec2b926d3195aa71524f9c8b692e567cfd4605b9b /views/default/input
parentf9ee6f1429f800c3eed3c0ef59d98219be32fba8 (diff)
downloadelgg-46c278c3603765b623fa441e2435274fbeda05ad.tar.gz
elgg-46c278c3603765b623fa441e2435274fbeda05ad.tar.bz2
Merged r6620:6653 from 1.7 branch into trunk
git-svn-id: http://code.elgg.org/elgg/trunk@6846 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default/input')
-rw-r--r--views/default/input/checkboxes.php5
-rw-r--r--views/default/input/radio.php8
2 files changed, 7 insertions, 6 deletions
diff --git a/views/default/input/checkboxes.php b/views/default/input/checkboxes.php
index 088a97709..dfab90a0a 100644
--- a/views/default/input/checkboxes.php
+++ b/views/default/input/checkboxes.php
@@ -49,9 +49,8 @@ if ($options) {
// ignores the label (because it's just the index) and sets the value ($option)
// as the label.
// Wow.
- $labelint = (int) $label;
-
- if ("{$label}" == "{$labelint}") {
+ // @todo deprecate in Elgg 1.8
+ if (is_integer($label)) {
$label = $option;
}
diff --git a/views/default/input/radio.php b/views/default/input/radio.php
index fe7335b8a..8520b2b83 100644
--- a/views/default/input/radio.php
+++ b/views/default/input/radio.php
@@ -30,11 +30,13 @@ foreach($vars['options'] as $label => $option) {
} else {
$selected = "checked = \"checked\"";
}
- $labelint = (int) $label;
- if ("{$label}" == "{$labelint}") {
+
+ // handle indexed array where label is not specified
+ // @todo deprecate in Elgg 1.8
+ if (is_integer($label)) {
$label = $option;
}
-
+
if (isset($vars['internalid'])) {
$id = "id=\"{$vars['internalid']}\"";
}