[xoops-cvslog 2292] CVS update: xoops2jp/html/modules/user/class

Zurück zum Archiv-Index

NobuNobu nobun****@users*****
2006年 2月 5日 (日) 19:33:39 JST


Index: xoops2jp/html/modules/user/class/AbstractEditAction.class.php
diff -u xoops2jp/html/modules/user/class/AbstractEditAction.class.php:1.1.2.3 xoops2jp/html/modules/user/class/AbstractEditAction.class.php:1.1.2.4
--- xoops2jp/html/modules/user/class/AbstractEditAction.class.php:1.1.2.3	Thu Jan 19 21:12:51 2006
+++ xoops2jp/html/modules/user/class/AbstractEditAction.class.php	Sun Feb  5 19:33:39 2006
@@ -5,6 +5,7 @@
 	var $mObject = null;
 	var $mObjectHandler = null;
 	var $mActionForm = null;
+	var $mConfig;
 
 	function _getId()
 	{
@@ -36,8 +37,10 @@
 		return true;
 	}
 
-	function prepare(&$controller, &$xoopsUser)
+	function prepare(&$controller, &$xoopsUser, &$moduleConfig)
 	{
+		$this->mConfig=&$moduleConfig;
+
 		$this->_setupActionForm();
 		$this->_setupObject();
 	}
Index: xoops2jp/html/modules/user/class/RegistMailBuilder.class.php
diff -u xoops2jp/html/modules/user/class/RegistMailBuilder.class.php:1.1.2.3 xoops2jp/html/modules/user/class/RegistMailBuilder.class.php:1.1.2.4
--- xoops2jp/html/modules/user/class/RegistMailBuilder.class.php:1.1.2.3	Sat Feb  4 22:35:32 2006
+++ xoops2jp/html/modules/user/class/RegistMailBuilder.class.php	Sun Feb  5 19:33:39 2006
@@ -38,8 +38,8 @@
 	{
 		$root=&XCube_Root::getSingleton();
 		$language = $root->mController->getConfig('language');
-		$this->mMailer->setTemplateDir(XOOPS_ROOT_PATH."/modules/user/language/".$language."/mail_template/");
-		$this->mMailer->setTemplate("register.tpl");
+		$this->mMailer->setTemplateDir(XOOPS_ROOT_PATH.'/modules/user/language/'.$language.'/mail_template/');
+		$this->mMailer->setTemplate('register.tpl');
 	}
 
 	function setToUsers($user,$userConfig)
@@ -60,9 +60,9 @@
 
 	function setBody($user,$xoopsConfig)
 	{
-		$this->mMailer->assign("SITENAME",$xoopsConfig['sitename']);
-		$this->mMailer->assign("ADMINMAIL",$xoopsConfig['adminmail']);
-		$this->mMailer->assign("SITEURL",XOOPS_URL."/");
+		$this->mMailer->assign('SITENAME',$xoopsConfig['sitename']);
+		$this->mMailer->assign('ADMINMAIL',$xoopsConfig['adminmail']);
+		$this->mMailer->assign('SITEURL',XOOPS_URL.'/');
 		$this->mMailer->assign('USERACTLINK', XOOPS_URL.'/modules/user/index.php?action=UserActivate&uid='.$user->getVar('uid').'&actkey='.$user->getVar('actkey'));
 	}
 	
@@ -78,8 +78,8 @@
 	{
 		$root=&XCube_Root::getSingleton();
 		$language = $root->mController->getConfig('language');
-		$this->mMailer->setTemplateDir(XOOPS_ROOT_PATH."/modules/user/language/".$language."/mail_template/");
-		$this->mMailer->setTemplate("adminactivate.tpl");
+		$this->mMailer->setTemplateDir(XOOPS_ROOT_PATH.'/modules/user/language/'.$language.'/mail_template/');
+		$this->mMailer->setTemplate('adminactivate.tpl');
 	}
 
 	function setToUsers($user,$userConfig)
@@ -102,7 +102,7 @@
 
 	function setBody($user,$xoopsConfig)
 	{
-		parent::doAssign();
+		parent::setBody($user,$xoopsConfig);
 		$this->mMailer->assign('USERNAME', $user->getVar('uname'));
 		$this->mMailer->assign('USEREMAIL', $user->getVar('email'));
 		$this->mMailer->assign('USERACTLINK', XOOPS_URL.'/modules/user/index.php?action=UserActivate&uid='.$user->getVar('uid').'&actkey='.$user->getVar('actkey'));
@@ -121,12 +121,6 @@
 		$this->mMailer->setToGroups($memberHandler->getGroup($userConfig['new_user_notify_group']));
 	}
 	
-	function setFromUser($xoopsConfig)
-	{
-		$this->mMailer->setFromEmail($xoopsConfig['adminmail']);
-		$this->mMailer->setFromName($xoopsConfig['sitename']);
-	}
-	
 	function setSubject($user,$xoopsConfig)
 	{
 		$this->mMailer->setSubject(@sprintf(_US_NEWUSERREGAT,$xoopsConfig['sitename']));
@@ -138,5 +132,20 @@
 	}
 }
 
+class RegistAdminCommitMailBuilder extends RegistUserActivateMailBuilder
+{
+	function setTemplate()
+	{
+		$root=&XCube_Root::getSingleton();
+		$language = $root->mController->getConfig('language');
+		$this->mMailer->setTemplateDir(XOOPS_ROOT_PATH.'/modules/user/language/'.$language.'/mail_template/');
+		$this->mMailer->setTemplate('activated.tpl');
+	}
+	
+	function setSubject($user,$xoopsConfig)
+	{
+		$this->mMailer->setSubject(@sprintf(_US_YOURACCOUNT,$xoopsConfig['sitename']));
+	}
+}
 
 ?>
\ No newline at end of file


xoops-cvslog メーリングリストの案内
Zurück zum Archiv-Index