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

Back to archive index

NobuNobu nobun****@users*****
2006年 2月 4日 (土) 22:35:32 JST


Index: xoops2jp/html/modules/user/class/RegistMailBuilder.class.php
diff -u xoops2jp/html/modules/user/class/RegistMailBuilder.class.php:1.1.2.2 xoops2jp/html/modules/user/class/RegistMailBuilder.class.php:1.1.2.3
--- xoops2jp/html/modules/user/class/RegistMailBuilder.class.php:1.1.2.2	Sat Feb  4 16:52:47 2006
+++ xoops2jp/html/modules/user/class/RegistMailBuilder.class.php	Sat Feb  4 22:35:32 2006
@@ -1,135 +1,142 @@
-<?php
-
-class UserRegistMailDirector
-{
-	var $mBuilder;
-	var $mUser;
-	var $mXoopsConfig;
-	var $mUserConfig;
-
-	function UserRegistMailDirector(&$user,$xoopsConfig,$userConfig)
-	{
-		$this->mUser=&$user;
-		$this->mXoopsConfig=$xoopsConfig;
-		$this->mUserConfig=$userConfig;
-	}
-	
-	function contruct(&$builder)
-	{
-		$builder->setTemplate();
-		$builder->setToUsers($this->mUser,$this->mUserConfig);
-		$builder->setFromEmail($this->mXoopsConfig);
-		$builder->setSubject($this->mUser,$this->mXoopsConfig);
-		$builder->setBody($this->mUser,$this->mXoopsConfig);
-	}
-}
-
-class RegistUserActivateMailBuilder
-{
-	var $mMailer;
-	
-	function RegistUserActivateMailBuilder()
-	{
-		$this->mMailer=&getMailer();
-		$this->mMailer->useMail();
-	}
-
-	function setTemplate()
-	{
-		$this->mMailer->setTemplate("register.tpl");
-	}
-
-	function setToUsers($user,$userConfig)
-	{
-		$this->mMailer->setToUsers($user);
-	}
-	
-	function setFromEmail($xoopsConfig)
-	{
-		$this->mMailer->setFromEmail($xoopsConfig['adminmail']);
-		$this->mMailer->setFromName($xoopsConfig['sitename']);
-	}
-	
-	function setSubject($user,$xoopsConfig)
-	{
-		$this->mMailer->setSubject(@sprintf(_US_USERKEYFOR,$user->getVar('uname')));
-	}
-
-	function setBody($user,$xoopsConfig)
-	{
-		$this->mMailer->assign("SITENAME",$xoopsConfig['sitename']);
-		$this->mMailer->assign("ADMINMAIL",$xoopsConfig['adminmail']);
-		$this->mMailer->assign("SITEURL",XOOPS_URL."/");
-	}
-	
-	function &getResult()
-	{
-		return $this->mMailer;
-	}
-}
-
-class RegistUserAdminActivateMailBuilder extends RegistUserActivateMailBuilder
-{
-	function setTemplate()
-	{
-		$this->mMailer->setTemplate("adminactivate.tpl");
-	}
-
-	function setToUsers($user,$userConfig)
-	{
-		$memberHandler=&xoops_gethandler('member');
-		$this->mMailer->setToGroups($memberHandler->getGroup($userConfig['activation_group']));
-		$this->mMailer->setToUsers($user);
-	}
-	
-	function setFromUser($xoopsConfig)
-	{
-		$this->mMailer->setFromEmail($xoopsConfig['adminmail']);
-		$this->mMailer->setFromName($xoopsConfig['sitename']);
-	}
-	
-	function setSubject($user,$xoopsConfig)
-	{
-		$this->mMailer->setSubject(@sprintf(_US_USERKEYFOR,$user->getVar('uname')));
-	}
-
-	function setBody($user,$xoopsConfig)
-	{
-		parent::doAssign();
-		$this->mMailer->assign('USERNAME', $user->getVar('uname'));
-		$this->mMailer->assign('USEREMAIL', $user->getVar('email'));
-		$this->mMailer->assign('USERACTLINK', XOOPS_URL.'/user.php?op=actv&id='.$user->getVar('uid').'&actkey='.$user->getVar('actkey'));
-	}
-}
-
-class RegistUserNotifyMailBuilder extends RegistUserActivateMailBuilder
-{
-	function setTemplate()
-	{
-	}
-
-	function setToUsers($user,$userConfig)
-	{
-		$memberHandler=&xoops_gethandler('member');
-		$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']));
-	}
-
-	function setBody($user,$xoopsConfig)
-	{
-		$this->mMailer->setBody(@sprintf(_US_HASJUSTREG, $user->getVar('uname')));
-	}
-}
-
-
+<?php
+
+class UserRegistMailDirector
+{
+	var $mBuilder;
+	var $mUser;
+	var $mXoopsConfig;
+	var $mUserConfig;
+
+	function UserRegistMailDirector(&$user,$xoopsConfig,$userConfig)
+	{
+		$this->mUser=&$user;
+		$this->mXoopsConfig=$xoopsConfig;
+		$this->mUserConfig=$userConfig;
+	}
+	
+	function contruct(&$builder)
+	{
+		$builder->setTemplate();
+		$builder->setToUsers($this->mUser,$this->mUserConfig);
+		$builder->setFromEmail($this->mXoopsConfig);
+		$builder->setSubject($this->mUser,$this->mXoopsConfig);
+		$builder->setBody($this->mUser,$this->mXoopsConfig);
+	}
+}
+
+class RegistUserActivateMailBuilder
+{
+	var $mMailer;
+	
+	function RegistUserActivateMailBuilder()
+	{
+		$this->mMailer=&getMailer();
+		$this->mMailer->useMail();
+	}
+
+	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("register.tpl");
+	}
+
+	function setToUsers($user,$userConfig)
+	{
+		$this->mMailer->setToUsers($user);
+	}
+	
+	function setFromEmail($xoopsConfig)
+	{
+		$this->mMailer->setFromEmail($xoopsConfig['adminmail']);
+		$this->mMailer->setFromName($xoopsConfig['sitename']);
+	}
+	
+	function setSubject($user,$xoopsConfig)
+	{
+		$this->mMailer->setSubject(@sprintf(_US_USERKEYFOR,$user->getVar('uname')));
+	}
+
+	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('USERACTLINK', XOOPS_URL.'/modules/user/index.php?action=UserActivate&uid='.$user->getVar('uid').'&actkey='.$user->getVar('actkey'));
+	}
+	
+	function &getResult()
+	{
+		return $this->mMailer;
+	}
+}
+
+class RegistUserAdminActivateMailBuilder 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("adminactivate.tpl");
+	}
+
+	function setToUsers($user,$userConfig)
+	{
+		$memberHandler=&xoops_gethandler('member');
+		$this->mMailer->setToGroups($memberHandler->getGroup($userConfig['activation_group']));
+		$this->mMailer->setToUsers($user);
+	}
+	
+	function setFromUser($xoopsConfig)
+	{
+		$this->mMailer->setFromEmail($xoopsConfig['adminmail']);
+		$this->mMailer->setFromName($xoopsConfig['sitename']);
+	}
+	
+	function setSubject($user,$xoopsConfig)
+	{
+		$this->mMailer->setSubject(@sprintf(_US_USERKEYFOR,$user->getVar('uname')));
+	}
+
+	function setBody($user,$xoopsConfig)
+	{
+		parent::doAssign();
+		$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'));
+	}
+}
+
+class RegistUserNotifyMailBuilder extends RegistUserActivateMailBuilder
+{
+	function setTemplate()
+	{
+	}
+
+	function setToUsers($user,$userConfig)
+	{
+		$memberHandler=&xoops_gethandler('member');
+		$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']));
+	}
+
+	function setBody($user,$xoopsConfig)
+	{
+		$this->mMailer->setBody(@sprintf(_US_HASJUSTREG, $user->getVar('uname')));
+	}
+}
+
+
 ?>
\ No newline at end of file


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