[xoops-cvslog 2160] CVS update: xoops2jp/html/modules/user/admin/forms

Back to archive index

NobuNobu nobun****@users*****
2006年 2月 3日 (金) 16:35:15 JST


Index: xoops2jp/html/modules/user/admin/forms/UserAdminEditForm.class.php
diff -u xoops2jp/html/modules/user/admin/forms/UserAdminEditForm.class.php:1.1.2.6 xoops2jp/html/modules/user/admin/forms/UserAdminEditForm.class.php:1.1.2.7
--- xoops2jp/html/modules/user/admin/forms/UserAdminEditForm.class.php:1.1.2.6	Thu Feb  2 17:35:02 2006
+++ xoops2jp/html/modules/user/admin/forms/UserAdminEditForm.class.php	Fri Feb  3 16:35:15 2006
@@ -88,11 +88,11 @@
 		$this->mFieldProperties['user_from']->addVar('maxlength', 100);
 
 		$this->mFieldProperties['user_sig'] =& new XCube_FieldProperty($this);
-		$this->mFieldProperties['user_sig']->setDependsByArray(array(''));
-		$this->mFieldProperties['user_sig']->addMessage('required', _AD_USER_ERROR_REQUIRED, _AD_USER_LANG_USER_SIG);
+//		$this->mFieldProperties['user_sig']->setDependsByArray(array(''));
+//		$this->mFieldProperties['user_sig']->addMessage('required', _AD_USER_ERROR_REQUIRED, _AD_USER_LANG_USER_SIG);
 
 		$this->mFieldProperties['user_viewemail'] =& new XCube_FieldProperty($this);
-		$this->mFieldProperties['user_viewemail']->setDependsByArray(array(''));
+//		$this->mFieldProperties['user_viewemail']->setDependsByArray(array(''));
 
 		$this->mFieldProperties['user_aim'] =& new XCube_FieldProperty($this);
 		$this->mFieldProperties['user_aim']->setDependsByArray(array('maxlength'));
@@ -124,7 +124,7 @@
 		$this->mFieldProperties['posts']->addMessage('required', _AD_USER_ERROR_REQUIRED, _AD_USER_LANG_POSTS);
 
 		$this->mFieldProperties['attachsig'] =& new XCube_FieldProperty($this);
-		$this->mFieldProperties['attachsig']->setDependsByArray(array(''));
+//		$this->mFieldProperties['attachsig']->setDependsByArray(array(''));
 
 		$this->mFieldProperties['rank'] =& new XCube_FieldProperty($this);
 		$this->mFieldProperties['rank']->setDependsByArray(array('required'));
@@ -169,7 +169,7 @@
 		$this->mFieldProperties['user_occ']->addVar('maxlength', 100);
 
 		$this->mFieldProperties['bio'] =& new XCube_FieldProperty($this);
-		$this->mFieldProperties['bio']->setDependsByArray(array(''));
+//		$this->mFieldProperties['bio']->setDependsByArray(array(''));
 
 		$this->mFieldProperties['user_intrest'] =& new XCube_FieldProperty($this);
 		$this->mFieldProperties['user_intrest']->setDependsByArray(array('maxlength'));
@@ -177,14 +177,18 @@
 		$this->mFieldProperties['user_intrest']->addVar('maxlength', 150);
 
 		$this->mFieldProperties['user_mailok'] =& new XCube_FieldProperty($this);
-		$this->mFieldProperties['user_mailok']->setDependsByArray(array(''));
+//		$this->mFieldProperties['user_mailok']->setDependsByArray(array(''));
 	}
 	
 	function validateUname()
 	{
 		if ($this->get('uname') != null) {
 			$handler =& xoops_gethandler('user');
-			if ($handler->getCount(new Criteria('uname', $this->get('uname'))) > 0) {
+			$criteria =& new CriteriaCompo(new Criteria('uname', $this->get('uname')));
+			if ($this->get('uid')) {
+				$criteria->add(new Criteria('uid', $this->get('uid'), '<>'));
+			}
+			if ($handler->getCount($criteria) > 0) {
 				$this->addErrorMessage(_AD_USER_ERROR_UNAME_NO_UNIQUE);
 			}
 		}


xoops-cvslog メーリングリストの案内
Back to archive index