[xoops-cvslog 173] CVS update: xoops2jp/html/modules/system/admin/mailusers

アーカイブの一覧に戻る

Minahito minah****@users*****
2005年 6月 16日 (木) 22:35:53 JST


Index: xoops2jp/html/modules/system/admin/mailusers/mailusers.php
diff -u xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2 xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2.2.1
--- xoops2jp/html/modules/system/admin/mailusers/mailusers.php:1.2.6.2	Fri May 13 20:02:42 2005
+++ xoops2jp/html/modules/system/admin/mailusers/mailusers.php	Thu Jun 16 22:35:53 2005
@@ -1,5 +1,5 @@
 <?php
-// $Id: mailusers.php,v 1.2.6.2 2005/05/13 11:02:42 minahito Exp $
+// $Id: mailusers.php,v 1.2.6.2.2.1 2005/06/16 13:35:53 minahito Exp $
 //  ------------------------------------------------------------------------ //
 //                XOOPS - PHP Content Management System                      //
 //                    Copyright (c) 2000 XOOPS.org                           //
@@ -65,35 +65,34 @@
 		} else {
 			if (!empty($_POST['mail_mailok'])) {
 				$criteria[] = 'user_mailok = 1';
-			} else {
-				if (!empty($_POST['mail_to_group'])) {
-					$member_handler =& xoops_gethandler('member');
-					$user_list = array();
-					foreach ($_POST['mail_to_group'] as $groupid ) {
-						$members =& $member_handler->getUsersByGroup($groupid, false);
-						// Mith: Changed this to not fetch user objects with getUsersByGroup 
-						// as it is resource-intensive and all we want is the userIDs
-						$user_list = array_merge($members, $user_list);
+			}
+			if (!empty($_POST['mail_to_group'])) {
+				$member_handler =& xoops_gethandler('member');
+				$user_list = array();
+				foreach ($_POST['mail_to_group'] as $groupid ) {
+					$members =& $member_handler->getUsersByGroup($groupid, false);
+					// Mith: Changed this to not fetch user objects with getUsersByGroup 
+					// as it is resource-intensive and all we want is the userIDs
+					$user_list = array_merge($members, $user_list);
 						
-						// RMV: changed this because makes more sense to me
-						// if options all grouped by 'AND', not 'OR'
-						/*
-						foreach ($members as $member) {
-							if (!in_array($member->getVar('uid'), $user_list)) {
-								$user_list[] = $member->getVar('uid');
-							}
+					// RMV: changed this because makes more sense to me
+					// if options all grouped by 'AND', not 'OR'
+					/*
+					foreach ($members as $member) {
+						if (!in_array($member->getVar('uid'), $user_list)) {
+							$user_list[] = $member->getVar('uid');
 						}
-						*/
-						//	if (!in_array($member->getVar('uid'), $added_id) ) {
-						//		$added_id[] = $member->getVar('uid');
-						//		$added[] =& $member;
-						//		unset($member);
-						//	}
-						//}
-					}
-					if (!empty($user_list)) {
-						$criteria[] = 'uid IN (' . join(',', $user_list) . ')';
 					}
+					*/
+					//	if (!in_array($member->getVar('uid'), $added_id) ) {
+					//		$added_id[] = $member->getVar('uid');
+					//		$added[] =& $member;
+					//		unset($member);
+					//	}
+					//}
+				}
+				if (!empty($user_list)) {
+					$criteria[] = 'uid IN (' . join(',', $user_list) . ')';
 				}
 			}
 			if ( !empty($_POST['mail_lastlog_min']) ) {
@@ -202,7 +201,8 @@
 						$form->addElement($group_hidden);
 					}
 				}
-				$inactive_hidden = new XoopsFormHidden("mail_inactive", $mail_inactive);
+				$inactive_hidden = new XoopsFormHidden("mail_inactive", intval($_POST['mail_inactive']));
+				$mailok_hidden = new XoopsFormHidden("mail_mailok", intval($_POST['mail_mailok']));
 				$lastlog_min_hidden = new XoopsFormHidden("mail_lastlog_min", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_min']));
 				$lastlog_max_hidden = new XoopsFormHidden("mail_lastlog_max", $myts->makeTboxData4PreviewInForm($_POST['mail_lastlog_max']));
 				$regd_min_hidden = new XoopsFormHidden("mail_regd_min", $myts->makeTboxData4PreviewInForm($_POST['mail_regd_max']));
@@ -220,6 +220,7 @@
 				$sent_label = new XoopsFormLabel(_AM_SENT, sprintf(_AM_SENTNUM, $_POST['mail_start']+1, $mail_end, $added_count));
 				$form->addElement($sent_label);
 				$form->addElement($inactive_hidden);
+				$form->addElement($mailok_hidden);
 				$form->addElement($lastlog_min_hidden);
 				$form->addElement($lastlog_max_hidden);
 				$form->addElement($regd_min_hidden);


xoops-cvslog メーリングリストの案内
アーカイブの一覧に戻る