From df3475eced66f7e8e63b231828587475ee3f32ca Mon Sep 17 00:00:00 2001
From: xue <>
Date: Sat, 24 Dec 2005 23:00:41 +0000
Subject:

---
 framework/Web/UI/WebControls/TRadioButton.php | 16 +++++++++-------
 1 file changed, 9 insertions(+), 7 deletions(-)

(limited to 'framework/Web/UI')

diff --git a/framework/Web/UI/WebControls/TRadioButton.php b/framework/Web/UI/WebControls/TRadioButton.php
index 78dc6549..85a28941 100644
--- a/framework/Web/UI/WebControls/TRadioButton.php
+++ b/framework/Web/UI/WebControls/TRadioButton.php
@@ -109,14 +109,16 @@ class TRadioButton extends TCheckBox
 			if($uniqueID!=='')
 			{
 				if(($pos=strrpos($uniqueID,TControl::ID_SEPARATOR))!==false)
-					$this->_uniqueGroupName=substr($uniqueID,0,$pos+1).$groupName;
-				else if($this->getNameContainer() instanceof TRadioButtonList)
-					$this->_uniqueGroupName=substr($uniqueID,0,$pos);
-				if(empty($this->_uniqueGroupName))
-					$this->_uniqueGroupName=$uniqueID;
+				{
+					if($groupName!=='')
+						$groupName=substr($uniqueID,0,$pos+1).$groupName;
+					else if($this->getNamingContainer() instanceof TRadioButtonList)
+						$groupName=substr($uniqueID,0,$pos);
+				}
+				if($groupName==='')
+					$groupName=$uniqueID;
 			}
-			else
-				$this->_uniqueGroupName=$groupName;
+			$this->_uniqueGroupName=$groupName;
 		}
 		return $this->_uniqueGroupName;
 	}
-- 
cgit v1.2.3