From onokazu @ users.sourceforge.jp Mon Aug 1 19:18:13 2005
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Mon, 1 Aug 2005 19:18:13 +0900
Subject: [xoops-cvslog 262] CVS update:
xoops2jp/html/modules/news/language/japanese/mail_template
Message-ID: <20050801101813.DD7C22AC01F@users.sourceforge.jp>
Index: xoops2jp/html/modules/news/language/japanese/mail_template/story_approve_notify.tpl
diff -u /dev/null xoops2jp/html/modules/news/language/japanese/mail_template/story_approve_notify.tpl:1.1
--- /dev/null Mon Aug 1 19:18:13 2005
+++ xoops2jp/html/modules/news/language/japanese/mail_template/story_approve_notify.tpl Mon Aug 1 19:18:13 2005
@@ -0,0 +1,21 @@
+{X_UNAME}さん、こんにちは
+
+{X_SITENAME}にて下記ニュース記事が承認されました。
+
+記事タイトル: {STORY_NAME}
+
+このニュース記事を読むには下記URLにアクセスしてください:
+{STORY_URL}
+
+-----------
+
+このメールはXOOPSの自動通知機能によって送信されています
+
+自動通知を停止したい場合は下記のURLにアクセスしてください:
+{X_UNSUBSCRIBE_URL}
+
+-----------
+{X_SITENAME} ({X_SITEURL})
+管理人
+{X_ADMINMAIL}
+-----------
\ No newline at end of file
Index: xoops2jp/html/modules/news/language/japanese/mail_template/story_approve_notify.tpl000644
diff -u xoops2jp/html/modules/news/language/japanese/mail_template/story_approve_notify.tpl000644:1.1 xoops2jp/html/modules/news/language/japanese/mail_template/story_approve_notify.tpl000644:removed
--- xoops2jp/html/modules/news/language/japanese/mail_template/story_approve_notify.tpl000644:1.1 Thu Sep 9 19:03:23 2004
+++ xoops2jp/html/modules/news/language/japanese/mail_template/story_approve_notify.tpl000644 Mon Aug 1 19:18:13 2005
@@ -1,21 +0,0 @@
-{X_UNAME}さん、こんにちは
-
-{X_SITENAME}にて下記ニュース記事が承認されました。
-
-記事タイトル: {STORY_NAME}
-
-このニュース記事を読むには下記URLにアクセスしてください:
-{STORY_URL}
-
------------
-
-このメールはXOOPSの自動通知機能によって送信されています
-
-自動通知を停止したい場合は下記のURLにアクセスしてください:
-{X_UNSUBSCRIBE_URL}
-
------------
-{X_SITENAME} ({X_SITEURL})
-管理人
-{X_ADMINMAIL}
------------
\ No newline at end of file
From onokazu @ users.sourceforge.jp Wed Aug 3 21:39:11 2005
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Wed, 3 Aug 2005 21:39:11 +0900
Subject: [xoops-cvslog 264] CVS update: xoops2jp/html
Message-ID: <20050803123911.37C532AC03A@users.sourceforge.jp>
Index: xoops2jp/html/admin.php
diff -u xoops2jp/html/admin.php:1.3 xoops2jp/html/admin.php:1.4
--- xoops2jp/html/admin.php:1.3 Sat Jun 11 11:32:38 2005
+++ xoops2jp/html/admin.php Wed Aug 3 21:39:11 2005
@@ -1,5 +1,5 @@
xoops_setCaching(0);
$xoopsTpl->display($xoopsConfig['theme_set'].'/theme.html');
Index: xoops2jp/html/header.php
diff -u xoops2jp/html/header.php:1.3 xoops2jp/html/header.php:1.4
--- xoops2jp/html/header.php:1.3 Sat Jun 11 11:32:38 2005
+++ xoops2jp/html/header.php Wed Aug 3 21:39:11 2005
@@ -1,5 +1,5 @@
assign(array('xoops_isuser' => true, 'xoops_userid' => $xoopsUser->getVar('uid'), 'xoops_uname' => $xoopsUser->getVar('uname'), 'xoops_isadmin' => $xoopsUserIsAdmin));
if (!empty($xoopsModule)) {
// set page title
@@ -109,7 +109,7 @@
$xoopsTpl->assign(array('xoops_isuser' => false, 'xoops_isadmin' => false));
if (!empty($xoopsModule)) {
// set page title
- $xoopsTpl->assign(array('xoops_pagetitle' => $xoopsModule->getVar('name'), 'xoops_modulename' => $xoopsModule->getVar('name'), 'xoops_moduledir' => $xoopsModule->getVar('dirname')));
+ $xoopsTpl->assign(array('xoops_pagetitle' => $xoopsModule->getVar('name'), 'xoops_modulename' => $xoopsModule->getVar('name'), 'xoops_dirname' => $xoopsModule->getVar('dirname')));
if (preg_match("/index\.php$/i", xoops_getenv('PHP_SELF')) && $xoopsConfig['startpage'] == $xoopsModule->getVar('dirname')) {
$block_arr =& $xoopsblock->getAllByGroupModule(XOOPS_GROUP_ANONYMOUS, $xoopsModule->getVar('mid'), true, XOOPS_BLOCK_VISIBLE);
} else {
Index: xoops2jp/html/image.php
diff -u xoops2jp/html/image.php:1.3 xoops2jp/html/image.php:1.4
--- xoops2jp/html/image.php:1.3 Sat Jun 11 11:32:38 2005
+++ xoops2jp/html/image.php Wed Aug 3 21:39:11 2005
@@ -1,5 +1,5 @@
'._SR_SHOWALLR.'
';
+ echo ' '._SR_SHOWALLR.'';
}
}
}
Index: xoops2jp/html/user.php
diff -u xoops2jp/html/user.php:1.3 xoops2jp/html/user.php:1.4
--- xoops2jp/html/user.php:1.3 Sat Jun 11 11:32:38 2005
+++ xoops2jp/html/user.php Wed Aug 3 21:39:11 2005
@@ -1,5 +1,5 @@
parse()) {
- $response->add(new XoopsXmlRpcFault(102));
+ $response->add(new XoopsXmlRpcFault(102));
} else {
- $module_handler =& xoops_gethandler('module');
- $module =& $module_handler->getByDirname('news');
- if (!is_object($module)) {
- $response->add(new XoopsXmlRpcFault(110));
- } else {
- $methods = explode('.', $parser->getMethodName());
- switch ($methods[0]) {
- case 'blogger':
- include_once XOOPS_ROOT_PATH.'/class/xml/rpc/bloggerapi.php';
- $rpc_api = new BloggerApi($parser->getParam(), $response, $module);
- break;
- case 'metaWeblog':
- include_once XOOPS_ROOT_PATH.'/class/xml/rpc/metaweblogapi.php';
- $rpc_api = new MetaWeblogApi($parser->getParam(), $response, $module);
- break;
- case 'mt':
- include_once XOOPS_ROOT_PATH.'/class/xml/rpc/movabletypeapi.php';
- $rpc_api = new MovableTypeApi($parser->getParam(), $response, $module);
- break;
- case 'xoops':
- default:
- include_once XOOPS_ROOT_PATH.'/class/xml/rpc/xoopsapi.php';
- $rpc_api = new XoopsApi($parser->getParam(), $response, $module);
- break;
- }
- $method = $methods[1];
- if (!method_exists($rpc_api, $method)) {
- $response->add(new XoopsXmlRpcFault(107));
- } else {
- $rpc_api->$method();
- }
- }
+ $module_handler =& xoops_gethandler('module');
+ $module =& $module_handler->getByDirname('news');
+ if (!is_object($module)) {
+ $response->add(new XoopsXmlRpcFault(110));
+ } else {
+ $methods = explode('.', $parser->getMethodName());
+ switch ($methods[0]) {
+ case 'blogger':
+ include_once XOOPS_ROOT_PATH.'/class/xml/rpc/bloggerapi.php';
+ $rpc_api = new BloggerApi($parser->getParam(), $response, $module);
+ break;
+ case 'metaWeblog':
+ include_once XOOPS_ROOT_PATH.'/class/xml/rpc/metaweblogapi.php';
+ $rpc_api = new MetaWeblogApi($parser->getParam(), $response, $module);
+ break;
+ case 'mt':
+ include_once XOOPS_ROOT_PATH.'/class/xml/rpc/movabletypeapi.php';
+ $rpc_api = new MovableTypeApi($parser->getParam(), $response, $module);
+ break;
+ case 'xoops':
+ default:
+ include_once XOOPS_ROOT_PATH.'/class/xml/rpc/xoopsapi.php';
+ $rpc_api = new XoopsApi($parser->getParam(), $response, $module);
+ break;
+ }
+ $method = $methods[1];
+ if (!method_exists($rpc_api, $method)) {
+ $response->add(new XoopsXmlRpcFault(107));
+ } else {
+ $rpc_api->$method();
+ }
+ }
}
$payload =& $response->render();
//$fp = fopen(XOOPS_CACHE_PATH.'/xmllog.txt', 'w');
From onokazu @ users.sourceforge.jp Wed Aug 3 21:39:10 2005
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Wed, 3 Aug 2005 21:39:10 +0900
Subject: [xoops-cvslog 263] CVS update: xoops2jp/docs
Message-ID: <20050803123910.006412AC02D@users.sourceforge.jp>
Index: xoops2jp/docs/CHANGES.txt
diff -u xoops2jp/docs/CHANGES.txt:1.5 xoops2jp/docs/CHANGES.txt:1.6
--- xoops2jp/docs/CHANGES.txt:1.5 Thu Jun 30 14:55:55 2005
+++ xoops2jp/docs/CHANGES.txt Wed Aug 3 21:39:10 2005
@@ -1,12 +1,42 @@
- XOOPS v2 Changelog
+XOOPS v2 Changelog
============================
+2005/ 7/31: Version 2.0.11 JP
+===============================
+- Fixed infinite refresh of page in visit.php of mydownloads/mylinks
+
+
+2005/ 7/21: Version 2.0.11 JP RC2
+===============================
+- Added security patch to prevent SQL injection in xmlrpcapi.php
+- Added security patch for XSS vulnerability in comment post
+- Fixed minor display bugs in search result URLs
+- Fixed incorrect Smarty tag name being assigned in header.php
+- Fixed PHP notice errors in several parts
+
+
2005/ 6/30: Version 2.0.10.2 JP
===============================
- Added security patch to prevent SQL injection in xmlrpcapi.php
- Added security patch for XSS vulnerability in comment post
+2005/ 6/29: Version 2.0.11 JP RC1
+===============================
+- Merged CriteriaString with the original Cirteria class
+- Fixed bug in image admin section when register_globals off.
+- Code cleanup in headlinerender.php
+- Added missing language constant in the news module
+- Fixed bug in xoopspartners admin section when register_globals off.
+- Fixed smarty variable typo in common.php
+- Fixed invalid template path in template set admin section
+- Fixed comment delete button bug
+- Changed & to & in some files
+- Added missing parameter to redirect URL of newbb/mydownload modules
+- Fixed invalid cache header in footer.php
+- Fixed bug not being able to send mails when over 200 registered users
+
+
2005/ 6/28: Version 2.0.10.1 JP
===============================
- Added security patch to prevent login spoofing
@@ -17,6 +47,15 @@
- Fixed typo: $xoopsConfig -> $xoopsModuleConfig in news module
+2005/ 6/15: Version 2.0.11 JP Beta
+===============================
+- Fixed parse error in the sections module
+- Fixed incorrect use of anonpost option variable in the news module
+- Fixed bug not being able to add users to group when active users over 200
+- Fixed bug not being able to add user from the user admin page
+- Fixed bug not being able to delete posts in the newbb module
+
+
2005/ 6/10: Version 2.0.10 JP
===============================
- Added fix for better module version number handling
From onokazu @ users.sourceforge.jp Wed Aug 3 21:39:11 2005
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Wed, 3 Aug 2005 21:39:11 +0900
Subject: [xoops-cvslog 265] CVS update: xoops2jp/html/class/xml/rpc
Message-ID: <20050803123911.984492AC03A@users.sourceforge.jp>
Index: xoops2jp/html/class/xml/rpc/xmlrpcapi.php
diff -u xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.4 xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.5
--- xoops2jp/html/class/xml/rpc/xmlrpcapi.php:1.4 Thu Jun 30 14:07:51 2005
+++ xoops2jp/html/class/xml/rpc/xmlrpcapi.php Wed Aug 3 21:39:11 2005
@@ -1,5 +1,5 @@
user =& $member_handler->loginUser(addSlashes($username), addSlashes($password));
+ $this->user =& $member_handler->loginUser(addslashes($username), addslashes($password));
if (!is_object($this->user)) {
unset($this->user);
return false;
From onokazu @ users.sourceforge.jp Wed Aug 3 21:39:11 2005
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Wed, 3 Aug 2005 21:39:11 +0900
Subject: [xoops-cvslog 266] CVS update: xoops2jp/html/class/xml
Message-ID: <20050803123911.B6D022AC03B@users.sourceforge.jp>
Index: xoops2jp/html/class/xml/saxparser.php
diff -u xoops2jp/html/class/xml/saxparser.php:1.3 xoops2jp/html/class/xml/saxparser.php:1.4
--- xoops2jp/html/class/xml/saxparser.php:1.3 Sat Jun 11 11:32:39 2005
+++ xoops2jp/html/class/xml/saxparser.php Wed Aug 3 21:39:11 2005
@@ -1,5 +1,5 @@
xml/SaxParser.class
From onokazu @ users.sourceforge.jp Wed Aug 3 21:39:11 2005
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Wed, 3 Aug 2005 21:39:11 +0900
Subject: [xoops-cvslog 267] CVS update: xoops2jp/html/class/xoopsform
Message-ID: <20050803123911.DD3B12AC02D@users.sourceforge.jp>
Index: xoops2jp/html/class/xoopsform/form.php
diff -u xoops2jp/html/class/xoopsform/form.php:1.3 xoops2jp/html/class/xoopsform/form.php:1.4
--- xoops2jp/html/class/xoopsform/form.php:1.3 Sat Jun 11 11:32:39 2005
+++ xoops2jp/html/class/xoopsform/form.php Wed Aug 3 21:39:11 2005
@@ -1,5 +1,5 @@
//
Index: xoops2jp/html/class/xoopsform/formtextdateselect.php
diff -u xoops2jp/html/class/xoopsform/formtextdateselect.php:1.3 xoops2jp/html/class/xoopsform/formtextdateselect.php:1.4
--- xoops2jp/html/class/xoopsform/formtextdateselect.php:1.3 Sat Jun 11 11:32:39 2005
+++ xoops2jp/html/class/xoopsform/formtextdateselect.php Wed Aug 3 21:39:11 2005
@@ -1,5 +1,5 @@
//
From onokazu @ users.sourceforge.jp Wed Aug 3 21:39:12 2005
From: onokazu @ users.sourceforge.jp (onokazu)
Date: Wed, 3 Aug 2005 21:39:12 +0900
Subject: [xoops-cvslog 268] CVS update: xoops2jp/html/kernel
Message-ID: <20050803123912.6DEA42AC03B@users.sourceforge.jp>
Index: xoops2jp/html/kernel/block.php
diff -u xoops2jp/html/kernel/block.php:1.3 xoops2jp/html/kernel/block.php:1.4
--- xoops2jp/html/kernel/block.php:1.3 Sat Jun 11 11:32:41 2005
+++ xoops2jp/html/kernel/block.php Wed Aug 3 21:39:12 2005
@@ -1,5 +1,5 @@
//
-// ------------------------------------------------------------------------ //
-// This program is free software; you can redistribute it and/or modify //
-// it under the terms of the GNU General Public License as published by //
-// the Free Software Foundation; either version 2 of the License, or //
-// (at your option) any later version. //
-// //
-// You may not change or alter any portion of this comment or credits //
-// of supporting developers from this source code or any supporting //
-// source code which is considered copyrighted (c) material of the //
-// original comment or credit authors. //
-// //
-// This program is distributed in the hope that it will be useful, //
-// but WITHOUT ANY WARRANTY; without even the implied warranty of //
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
-// GNU General Public License for more details. //
-// //
-// You should have received a copy of the GNU General Public License //
-// along with this program; if not, write to the Free Software //
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
-// ------------------------------------------------------------------------ //
-// Author: Kazumi Ono (AKA onokazu) //
-// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
-// Project: The XOOPS Project //
-// ------------------------------------------------------------------------- //
-
-if (!defined('XOOPS_ROOT_PATH')) {
- exit();
-}
-require_once XOOPS_ROOT_PATH.'/kernel/user.php';
-require_once XOOPS_ROOT_PATH.'/kernel/group.php';
-
-/**
-* XOOPS member handler class.
-* This class provides simple interface (a facade class) for handling groups/users/
-* membership data.
-*
-*
-* @author Kazumi Ono
-* @copyright copyright (c) 2000-2003 XOOPS.org
-* @package kernel
-*/
-
-class XoopsMemberHandler{
-
- /**#@+
- * holds reference to group handler(DAO) class
- * @access private
- */
- var $_gHandler;
-
- /**
- * holds reference to user handler(DAO) class
- */
- var $_uHandler;
-
- /**
- * holds reference to membership handler(DAO) class
- */
- var $_mHandler;
-
- /**
- * holds temporary user objects
- */
- var $_members = array();
- /**#@-*/
-
- /**
- * constructor
- *
- */
- function XoopsMemberHandler(&$db)
- {
- $this->_gHandler = new XoopsGroupHandler($db);
- $this->_uHandler = new XoopsUserHandler($db);
- $this->_mHandler = new XoopsMembershipHandler($db);
- }
-
- /**
- * create a new group
- *
- * @return object XoopsGroup reference to the new group
- */
- function &createGroup()
- {
- return $this->_gHandler->create();
- }
-
- /**
- * create a new user
- *
- * @return object XoopsUser reference to the new user
- */
- function &createUser()
- {
- return $this->_uHandler->create();
- }
-
- /**
- * retrieve a group
- *
- * @param int $id ID for the group
- * @return object XoopsGroup reference to the group
- */
- function getGroup($id)
- {
- return $this->_gHandler->get($id);
- }
-
- /**
- * retrieve a user
- *
- * @param int $id ID for the user
- * @return object XoopsUser reference to the user
- */
- function &getUser($id)
- {
- if (!isset($this->_members[$id])) {
- $this->_members[$id] =& $this->_uHandler->get($id);
- }
- return $this->_members[$id];
- }
-
- /**
- * delete a group
- *
- * @param object $group reference to the group to delete
- * @return bool FALSE if failed
- */
- function deleteGroup(&$group)
- {
- $this->_gHandler->delete($group);
- $this->_mHandler->deleteAll(new Criteria('groupid', $group->getVar('groupid')));
- return true;
- }
-
- /**
- * delete a user
- *
- * @param object $user reference to the user to delete
- * @return bool FALSE if failed
- */
- function deleteUser(&$user)
- {
- $this->_uHandler->delete($user);
- $this->_mHandler->deleteAll(new Criteria('uid', $user->getVar('uid')));
- return true;
- }
-
- /**
- * insert a group into the database
- *
- * @param object $group reference to the group to insert
- * @return bool TRUE if already in database and unchanged
- * FALSE on failure
- */
- function insertGroup(&$group)
- {
- return $this->_gHandler->insert($group);
- }
-
- /**
- * insert a user into the database
- *
- * @param object $user reference to the user to insert
- * @return bool TRUE if already in database and unchanged
- * FALSE on failure
- */
- function insertUser(&$user, $force = false)
- {
- return $this->_uHandler->insert($user, $force);
- }
-
- /**
- * retrieve groups from the database
- *
- * @param object $criteria {@link CriteriaElement}
- * @param bool $id_as_key use the group's ID as key for the array?
- * @return array array of {@link XoopsGroup} objects
- */
- function getGroups($criteria = null, $id_as_key = false)
- {
- return $this->_gHandler->getObjects($criteria, $id_as_key);
- }
-
- /**
- * retrieve users from the database
- *
- * @param object $criteria {@link CriteriaElement}
- * @param bool $id_as_key use the group's ID as key for the array?
- * @return array array of {@link XoopsUser} objects
- */
- function getUsers($criteria = null, $id_as_key = false)
- {
- return $this->_uHandler->getObjects($criteria, $id_as_key);
- }
-
- /**
- * get a list of groupnames and their IDs
- *
- * @param object $criteria {@link CriteriaElement} object
- * @return array associative array of group-IDs and names
- */
- function &getGroupList($criteria = null)
- {
- $groups =& $this->_gHandler->getObjects($criteria, true);
- $ret = array();
- foreach (array_keys($groups) as $i) {
- $ret[$i] = $groups[$i]->getVar('name');
- }
- return $ret;
- }
-
- /**
- * get a list of usernames and their IDs
- *
- * @param object $criteria {@link CriteriaElement} object
- * @return array associative array of user-IDs and names
- */
- function getUserList($criteria = null)
- {
- $users =& $this->_uHandler->getObjects($criteria, true);
- $ret = array();
- foreach (array_keys($users) as $i) {
- $ret[$i] = $users[$i]->getVar('uname');
- }
- return $ret;
- }
-
- /**
- * add a user to a group
- *
- * @param int $group_id ID of the group
- * @param int $user_id ID of the user
- * @return object XoopsMembership
- */
- function addUserToGroup($group_id, $user_id)
- {
- $mship =& $this->_mHandler->create();
- $mship->setVar('groupid', $group_id);
- $mship->setVar('uid', $user_id);
- return $this->_mHandler->insert($mship);
- }
-
- /**
- * remove a list of users from a group
- *
- * @param int $group_id ID of the group
- * @param array $user_ids array of user-IDs
- * @return bool success?
- */
- function removeUsersFromGroup($group_id, $user_ids = array())
- {
- $criteria = new CriteriaCompo();
- $criteria->add(new Criteria('groupid', $group_id));
- $criteria2 = new CriteriaCompo();
- foreach ($user_ids as $uid) {
- $criteria2->add(new Criteria('uid', $uid), 'OR');
- }
- $criteria->add($criteria2);
- return $this->_mHandler->deleteAll($criteria);
- }
-
- /**
- * get a list of users belonging to a group
- *
- * @param int $group_id ID of the group
- * @param bool $asobject return the users as objects?
- * @param int $limit number of users to return
- * @param int $start index of the first user to return
- * @return array Array of {@link XoopsUser} objects (if $asobject is TRUE)
- * or of associative arrays matching the record structure in the database.
- */
- function getUsersByGroup($group_id, $asobject = false, $limit = 0, $start = 0)
- {
- $user_ids =& $this->_mHandler->getUsersByGroup($group_id, $limit, $start);
- if (!$asobject) {
- return $user_ids;
- } else {
- $ret = array();
- foreach ($user_ids as $u_id) {
- $user =& $this->getUser($u_id);
- if (is_object($user)) {
- $ret[] =& $user;
- }
- unset($user);
- }
- return $ret;
- }
- }
-
- /**
- * get a list of groups that a user is member of
- *
- * @param int $user_id ID of the user
- * @param bool $asobject return groups as {@link XoopsGroup} objects or arrays?
- * @return array array of objects or arrays
- */
- function getGroupsByUser($user_id, $asobject = false)
- {
- $group_ids =& $this->_mHandler->getGroupsByUser($user_id);
- if (!$asobject) {
- return $group_ids;
- } else {
- foreach ($group_ids as $g_id) {
- $ret[] =& $this->getGroup($g_id);
- }
- return $ret;
- }
- }
-
- /**
- * log in a user
- *
- * @param string $uname username as entered in the login form
- * @param string $pwd password entered in the login form
- * @return object XoopsUser reference to the logged in user. FALSE if failed to log in
- */
- function &loginUser($uname, $pwd)
- {
- $criteria = new CriteriaCompo(new CriteriaString('uname', $uname));
- $criteria->add(new CriteriaString('pass', md5($pwd)));
- $user =& $this->_uHandler->getObjects($criteria, false);
- if (!$user || count($user) != 1) {
- return false;
- }
- return $user[0];
- }
-
- /**
- * logs in a user with an nd5 encrypted password
- *
- * @param string $uname username
- * @param string $md5pwd password encrypted with md5
- * @return object XoopsUser reference to the logged in user. FALSE if failed to log in
- */
- function &loginUserMd5($uname, $md5pwd)
- {
- $criteria = new CriteriaCompo(new CriteriaString('uname', $uname));
- $criteria->add(new CriteriaString('pass', $md5pwd));
- $user =& $this->_uHandler->getObjects($criteria, false);
- if (!$user || count($user) != 1) {
- return false;
- }
- return $user[0];
- }
-
- /**
- * count users matching certain conditions
- *
- * @param object $criteria {@link CriteriaElement} object
- * @return int
- */
- function getUserCount($criteria = null)
- {
- return $this->_uHandler->getCount($criteria);
- }
-
- /**
- * count users belonging to a group
- *
- * @param int $group_id ID of the group
- * @return int
- */
- function getUserCountByGroup($group_id)
- {
- return $this->_mHandler->getCount(new Criteria('groupid', $group_id));
- }
-
- /**
- * updates a single field in a users record
- *
- * @param object $user reference to the {@link XoopsUser} object
- * @param string $fieldName name of the field to update
- * @param string $fieldValue updated value for the field
- * @return bool TRUE if success or unchanged, FALSE on failure
- */
- function updateUserByField(&$user, $fieldName, $fieldValue)
- {
- $user->setVar($fieldName, $fieldValue);
- return $this->insertUser($user);
- }
-
- /**
- * updates a single field in a users record
- *
- * @param string $fieldName name of the field to update
- * @param string $fieldValue updated value for the field
- * @param object $criteria {@link CriteriaElement} object
- * @return bool TRUE if success or unchanged, FALSE on failure
- */
- function updateUsersByField($fieldName, $fieldValue, $criteria = null)
- {
- return $this->_uHandler->updateAll($fieldName, $fieldValue, $criteria);
- }
-
- /**
- * activate a user
- *
- * @param object $user reference to the {@link XoopsUser} object
- * @return bool successful?
- */
- function activateUser(&$user)
- {
- if ($user->getVar('level') != 0) {
- return true;
- }
- $user->setVar('level', 1);
- return $this->_uHandler->insert($user, true);
- }
-
-}
-?>
+ //
+// ------------------------------------------------------------------------ //
+// This program is free software; you can redistribute it and/or modify //
+// it under the terms of the GNU General Public License as published by //
+// the Free Software Foundation; either version 2 of the License, or //
+// (at your option) any later version. //
+// //
+// You may not change or alter any portion of this comment or credits //
+// of supporting developers from this source code or any supporting //
+// source code which is considered copyrighted (c) material of the //
+// original comment or credit authors. //
+// //
+// This program is distributed in the hope that it will be useful, //
+// but WITHOUT ANY WARRANTY; without even the implied warranty of //
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
+// GNU General Public License for more details. //
+// //
+// You should have received a copy of the GNU General Public License //
+// along with this program; if not, write to the Free Software //
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA //
+// ------------------------------------------------------------------------ //
+// Author: Kazumi Ono (AKA onokazu) //
+// URL: http://www.myweb.ne.jp/, http://www.xoops.org/, http://jp.xoops.org/ //
+// Project: The XOOPS Project //
+// ------------------------------------------------------------------------- //
+
+if (!defined('XOOPS_ROOT_PATH')) {
+ exit();
+}
+require_once XOOPS_ROOT_PATH.'/kernel/user.php';
+require_once XOOPS_ROOT_PATH.'/kernel/group.php';
+
+/**
+* XOOPS member handler class.
+* This class provides simple interface (a facade class) for handling groups/users/
+* membership data.
+*
+*
+* @author Kazumi Ono
+* @copyright copyright (c) 2000-2003 XOOPS.org
+* @package kernel
+*/
+
+class XoopsMemberHandler{
+
+ /**#@+
+ * holds reference to group handler(DAO) class
+ * @access private
+ */
+ var $_gHandler;
+
+ /**
+ * holds reference to user handler(DAO) class
+ */
+ var $_uHandler;
+
+ /**
+ * holds reference to membership handler(DAO) class
+ */
+ var $_mHandler;
+
+ /**
+ * holds temporary user objects
+ */
+ var $_members = array();
+ /**#@-*/
+
+ /**
+ * constructor
+ *
+ */
+ function XoopsMemberHandler(&$db)
+ {
+ $this->_gHandler = new XoopsGroupHandler($db);
+ $this->_uHandler = new XoopsUserHandler($db);
+ $this->_mHandler = new XoopsMembershipHandler($db);
+ }
+
+ /**
+ * create a new group
+ *
+ * @return object XoopsGroup reference to the new group
+ */
+ function &createGroup()
+ {
+ return $this->_gHandler->create();
+ }
+
+ /**
+ * create a new user
+ *
+ * @return object XoopsUser reference to the new user
+ */
+ function &createUser()
+ {
+ return $this->_uHandler->create();
+ }
+
+ /**
+ * retrieve a group
+ *
+ * @param int $id ID for the group
+ * @return object XoopsGroup reference to the group
+ */
+ function getGroup($id)
+ {
+ return $this->_gHandler->get($id);
+ }
+
+ /**
+ * retrieve a user
+ *
+ * @param int $id ID for the user
+ * @return object XoopsUser reference to the user
+ */
+ function &getUser($id)
+ {
+ if (!isset($this->_members[$id])) {
+ $this->_members[$id] =& $this->_uHandler->get($id);
+ }
+ return $this->_members[$id];
+ }
+
+ /**
+ * delete a group
+ *
+ * @param object $group reference to the group to delete
+ * @return bool FALSE if failed
+ */
+ function deleteGroup(&$group)
+ {
+ $this->_gHandler->delete($group);
+ $this->_mHandler->deleteAll(new Criteria('groupid', $group->getVar('groupid')));
+ return true;
+ }
+
+ /**
+ * delete a user
+ *
+ * @param object $user reference to the user to delete
+ * @return bool FALSE if failed
+ */
+ function deleteUser(&$user)
+ {
+ $this->_uHandler->delete($user);
+ $this->_mHandler->deleteAll(new Criteria('uid', $user->getVar('uid')));
+ return true;
+ }
+
+ /**
+ * insert a group into the database
+ *
+ * @param object $group reference to the group to insert
+ * @return bool TRUE if already in database and unchanged
+ * FALSE on failure
+ */
+ function insertGroup(&$group)
+ {
+ return $this->_gHandler->insert($group);
+ }
+
+ /**
+ * insert a user into the database
+ *
+ * @param object $user reference to the user to insert
+ * @return bool TRUE if already in database and unchanged
+ * FALSE on failure
+ */
+ function insertUser(&$user, $force = false)
+ {
+ return $this->_uHandler->insert($user, $force);
+ }
+
+ /**
+ * retrieve groups from the database
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @param bool $id_as_key use the group's ID as key for the array?
+ * @return array array of {@link XoopsGroup} objects
+ */
+ function getGroups($criteria = null, $id_as_key = false)
+ {
+ return $this->_gHandler->getObjects($criteria, $id_as_key);
+ }
+
+ /**
+ * retrieve users from the database
+ *
+ * @param object $criteria {@link CriteriaElement}
+ * @param bool $id_as_key use the group's ID as key for the array?
+ * @return array array of {@link XoopsUser} objects
+ */
+ function getUsers($criteria = null, $id_as_key = false)
+ {
+ return $this->_uHandler->getObjects($criteria, $id_as_key);
+ }
+
+ /**
+ * get a list of groupnames and their IDs
+ *
+ * @param object $criteria {@link CriteriaElement} object
+ * @return array associative array of group-IDs and names
+ */
+ function &getGroupList($criteria = null)
+ {
+ $groups =& $this->_gHandler->getObjects($criteria, true);
+ $ret = array();
+ foreach (array_keys($groups) as $i) {
+ $ret[$i] = $groups[$i]->getVar('name');
+ }
+ return $ret;
+ }
+
+ /**
+ * get a list of usernames and their IDs
+ *
+ * @param object $criteria {@link CriteriaElement} object
+ * @return array associative array of user-IDs and names
+ */
+ function getUserList($criteria = null)
+ {
+ $users =& $this->_uHandler->getObjects($criteria, true);
+ $ret = array();
+ foreach (array_keys($users) as $i) {
+ $ret[$i] = $users[$i]->getVar('uname');
+ }
+ return $ret;
+ }
+
+ /**
+ * add a user to a group
+ *
+ * @param int $group_id ID of the group
+ * @param int $user_id ID of the user
+ * @return object XoopsMembership
+ */
+ function addUserToGroup($group_id, $user_id)
+ {
+ $mship =& $this->_mHandler->create();
+ $mship->setVar('groupid', $group_id);
+ $mship->setVar('uid', $user_id);
+ return $this->_mHandler->insert($mship);
+ }
+
+ /**
+ * remove a list of users from a group
+ *
+ * @param int $group_id ID of the group
+ * @param array $user_ids array of user-IDs
+ * @return bool success?
+ */
+ function removeUsersFromGroup($group_id, $user_ids = array())
+ {
+ $criteria = new CriteriaCompo();
+ $criteria->add(new Criteria('groupid', $group_id));
+ $criteria2 = new CriteriaCompo();
+ foreach ($user_ids as $uid) {
+ $criteria2->add(new Criteria('uid', $uid), 'OR');
+ }
+ $criteria->add($criteria2);
+ return $this->_mHandler->deleteAll($criteria);
+ }
+
+ /**
+ * get a list of users belonging to a group
+ *
+ * @param int $group_id ID of the group
+ * @param bool $asobject return the users as objects?
+ * @param int $limit number of users to return
+ * @param int $start index of the first user to return
+ * @return array Array of {@link XoopsUser} objects (if $asobject is TRUE)
+ * or of associative arrays matching the record structure in the database.
+ */
+ function getUsersByGroup($group_id, $asobject = false, $limit = 0, $start = 0)
+ {
+ $user_ids =& $this->_mHandler->getUsersByGroup($group_id, $limit, $start);
+ if (!$asobject) {
+ return $user_ids;
+ } else {
+ $ret = array();
+ foreach ($user_ids as $u_id) {
+ $user =& $this->getUser($u_id);
+ if (is_object($user)) {
+ $ret[] =& $user;
+ }
+ unset($user);
+ }
+ return $ret;
+ }
+ }
+
+ /**
+ * get a list of groups that a user is member of
+ *
+ * @param int $user_id ID of the user
+ * @param bool $asobject return groups as {@link XoopsGroup} objects or arrays?
+ * @return array array of objects or arrays
+ */
+ function getGroupsByUser($user_id, $asobject = false)
+ {
+ $group_ids =& $this->_mHandler->getGroupsByUser($user_id);
+ if (!$asobject) {
+ return $group_ids;
+ } else {
+ foreach ($group_ids as $g_id) {
+ $ret[] =& $this->getGroup($g_id);
+ }
+ return $ret;
+ }
+ }
+
+ /**
+ * log in a user
+ *
+ * @param string $uname username as entered in the login form
+ * @param string $pwd password entered in the login form
+ * @return object XoopsUser reference to the logged in user. FALSE if failed to log in
+ */
+ function &loginUser($uname, $pwd)
+ {
+ $criteria = new CriteriaCompo(new Criteria('uname', $uname));
+ $criteria->add(new Criteria('pass', md5($pwd)));
+ $user =& $this->_uHandler->getObjects($criteria, false);
+ if (!$user || count($user) != 1) {
+ return false;
+ }
+ return $user[0];
+ }
+
+ /**
+ * logs in a user with an nd5 encrypted password
+ *
+ * @param string $uname username
+ * @param string $md5pwd password encrypted with md5
+ * @return object XoopsUser reference to the logged in user. FALSE if failed to log in
+ */
+ function &loginUserMd5($uname, $md5pwd)
+ {
+ $criteria = new CriteriaCompo(new Criteria('uname', $uname));
+ $criteria->add(new Criteria('pass', $md5pwd));
+ $user =& $this->_uHandler->getObjects($criteria, false);
+ if (!$user || count($user) != 1) {
+ return false;
+ }
+ return $user[0];
+ }
+
+ /**
+ * count users matching certain conditions
+ *
+ * @param object $criteria {@link CriteriaElement} object
+ * @return int
+ */
+ function getUserCount($criteria = null)
+ {
+ return $this->_uHandler->getCount($criteria);
+ }
+
+ /**
+ * count users belonging to a group
+ *
+ * @param int $group_id ID of the group
+ * @return int
+ */
+ function getUserCountByGroup($group_id)
+ {
+ return $this->_mHandler->getCount(new Criteria('groupid', $group_id));
+ }
+
+ /**
+ * updates a single field in a users record
+ *
+ * @param object $user reference to the {@link XoopsUser} object
+ * @param string $fieldName name of the field to update
+ * @param string $fieldValue updated value for the field
+ * @return bool TRUE if success or unchanged, FALSE on failure
+ */
+ function updateUserByField(&$user, $fieldName, $fieldValue)
+ {
+ $user->setVar($fieldName, $fieldValue);
+ return $this->insertUser($user);
+ }
+
+ /**
+ * updates a single field in a users record
+ *
+ * @param string $fieldName name of the field to update
+ * @param string $fieldValue updated value for the field
+ * @param object $criteria {@link CriteriaElement} object
+ * @return bool TRUE if success or unchanged, FALSE on failure
+ */
+ function updateUsersByField($fieldName, $fieldValue, $criteria = null)
+ {
+ return $this->_uHandler->updateAll($fieldName, $fieldValue, $criteria);
+ }
+
+ /**
+ * activate a user
+ *
+ * @param object $user reference to the {@link XoopsUser} object
+ * @return bool successful?
+ */
+ function activateUser(&$user)
+ {
+ if ($user->getVar('level') != 0) {
+ return true;
+ }
+ $user->setVar('level', 1);
+ return $this->_uHandler->insert($user, true);
+ }
+
+}
+?>
Index: xoops2jp/html/kernel/module.php
diff -u xoops2jp/html/kernel/module.php:1.3 xoops2jp/html/kernel/module.php:1.4
--- xoops2jp/html/kernel/module.php:1.3 Sat Jun 11 11:32:41 2005
+++ xoops2jp/html/kernel/module.php Wed Aug 3 21:39:12 2005
@@ -1,5 +1,5 @@
Index: xoops2jp/html/language/japanese/notification.php
diff -u xoops2jp/html/language/japanese/notification.php:1.3 xoops2jp/html/language/japanese/notification.php:1.4
--- xoops2jp/html/language/japanese/notification.php:1.3 Sat Jun 11 11:32:41 2005
+++ xoops2jp/html/language/japanese/notification.php Wed Aug 3 21:39:12 2005
@@ -1,5 +1,5 @@
Index: xoops2jp/html/modules/contact/index.php
diff -u xoops2jp/html/modules/contact/index.php:1.3 xoops2jp/html/modules/contact/index.php:1.4
--- xoops2jp/html/modules/contact/index.php:1.3 Sat Jun 11 11:32:41 2005
+++ xoops2jp/html/modules/contact/index.php Wed Aug 3 21:39:12 2005
@@ -1,5 +1,5 @@
Index: xoops2jp/html/modules/mydownloads/admin/index.php
diff -u xoops2jp/html/modules/mydownloads/admin/index.php:1.3 xoops2jp/html/modules/mydownloads/admin/index.php:1.4
--- xoops2jp/html/modules/mydownloads/admin/index.php:1.3 Sat Jun 11 11:32:42 2005
+++ xoops2jp/html/modules/mydownloads/admin/index.php Wed Aug 3 21:39:12 2005
@@ -1,5 +1,5 @@
";
echo "";
echo "\n";
- echo myTextForm("index.php?op=delNewDownload&lid=$lid",_MD_DELETE);
+ echo myTextForm("index.php?op=delNewDownload&lid=$lid",_MD_DELETE);
echo "