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

Back to archive index

Minahito minah****@users*****
2007年 2月 28日 (水) 19:09:32 JST


Index: xoops2jp/html/modules/user/class/mailjob.php
diff -u xoops2jp/html/modules/user/class/mailjob.php:1.1.2.7.2.1 xoops2jp/html/modules/user/class/mailjob.php:1.1.2.7.2.1.2.1
--- xoops2jp/html/modules/user/class/mailjob.php:1.1.2.7.2.1	Sat Oct 14 23:17:57 2006
+++ xoops2jp/html/modules/user/class/mailjob.php	Wed Feb 28 19:09:32 2007
@@ -7,6 +7,7 @@
 	var $mUsers = array();
 	var $_mUsersLoadedFlag = false;
 	var $mUserCount = 0;
+	var $_mUserCountLoadedFlag = false;
 	
 	/**
 	 * @var XCube_Delegate
@@ -49,8 +50,12 @@
 	 */	
 	function loadUserCount()
 	{
-		$handler =& xoops_getmodulehandler('mailjob_link', 'user');
-		$this->mUserCount = $handler->getCount(new Criteria('mailjob_id', $this->get('mailjob_id')));
+		if (!$this->_mUserCountLoadedFlag)
+		{
+			$handler =& xoops_getmodulehandler('mailjob_link', 'user');
+			$this->mUserCount = $handler->getCount(new Criteria('mailjob_id', $this->get('mailjob_id')));
+			$this->_mUserCountLoadedFlag = true;
+		}
 	}
 	
 	/**
@@ -82,6 +87,16 @@
 		return $arr;
 	}
 	
+	/**
+	 * Gets count of users who this mailjob will send mail to.
+	 * @return int count of users 
+	 */
+	function getUserCount()
+	{
+		$this->loadUserCount();
+		return $this->mUserCount;
+	}
+	
 	function send($from_user)
 	{
 		$root =& XCube_Root::getSingleton();


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