[xoops-cvslog 4150] CVS update: xoops2jp/html/modules/pm/forms

Back to archive index

Minahito minah****@users*****
2006年 8月 17日 (木) 18:09:23 JST


Index: xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php
diff -u xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php:1.1.2.8 xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php:1.1.2.9
--- xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php:1.1.2.8	Wed Jul  5 11:36:23 2006
+++ xoops2jp/html/modules/pm/forms/PmliteEditForm.class.php	Thu Aug 17 18:09:23 2006
@@ -29,8 +29,8 @@
 		// set fields
 		$this->mFieldProperties['subject'] = new XCube_FieldProperty($this);
 		$this->mFieldProperties['subject']->setDependsByArray(array('required', 'maxlength'));
-		$this->mFieldProperties['subject']->addMessage("required", _MD_PM_ERROR_REQUIRED, _PM_SUBJECT);
-		$this->mFieldProperties['subject']->addMessage('maxlength', _MD_PM_ERROR_MAXLENGTH, _PM_SUBJECT, '255');
+		$this->mFieldProperties['subject']->addMessage("required", _MD_PM_ERROR_REQUIRED, _MD_PM_LANG_SUBJECT);
+		$this->mFieldProperties['subject']->addMessage('maxlength', _MD_PM_ERROR_MAXLENGTH, _MD_PM_LANG_SUBJECT, '255');
 		$this->mFieldProperties['subject']->addVar('maxlength', '255');
 
 		$this->mFieldProperties['message'] = new XCube_FieldProperty($this);
@@ -80,7 +80,7 @@
 
 			if (!(is_object($user) && $user->isActive())) {
 				$this->set('to_userid', 0);
-				$this->addErrorMessage(_PM_USERNOEXIST);
+				$this->addErrorMessage(_MD_PM_ERROR_USERNOEXIST);
 			}
 		}
 	}
@@ -116,13 +116,17 @@
 		if ($this->get('to_uname')) {
 			$handler =& xoops_gethandler('user');
 			$criteria =& new Criteria("uname", $this->get("to_uname"));
-			$userArr =& $userHandler->getObjects($criteria);
+			$userArr =& $handler->getObjects($criteria);
 
-			if (!(count($userArr) > 0 && is_object($userArr[0]) && $userArr[0]->isActive())) {
-				$this->addErrorMessage(_PM_USERNOEXIST);
+			if (count($userArr) > 0 && is_object($userArr[0]) && $userArr[0]->isActive()) {
+				$this->_mId = $userArr[0]->get('uid');
 			}
-			
-			$this->_mId = $userArr[0]->get('uid');
+			else {
+				$this->addErrorMessage(_MD_PM_ERROR_PLZTRYAGAIN);
+			}
+		}
+		else {
+			$this->addErrorMessage(_MD_PM_ERROR_PLZTRYAGAIN);
 		}
 	}
 
@@ -176,11 +180,11 @@
 					$user =& $handler->get($pm->get('from_userid'));
 					
 					if (!(is_object($user) && $user->isActive())) {
-						$this->addErrorMessage(_PM_USERNOEXIST);
+						$this->addErrorMessage(_MD_PM_ERROR_USERNOEXIST);
 					}
 					else {
 						$message = "[quote]\n";
-						$message .= sprintf(_PM_USERWROTE, $user->get('uname')) . "\n";
+						$message .= sprintf(_MD_PM_ERROR_USERWROTE, $user->get('uname')) . "\n";
 						$message .= $pm->get("msg_text") . "\n";
 						$message .= "[/quote]\n";
 						$form->set('message', $message);


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