From: <tr...@us...> - 2011-10-15 15:40:18
|
Revision: 7888 http://xoops.svn.sourceforge.net/xoops/?rev=7888&view=rev Author: trabis Date: 2011-10-15 15:40:10 +0000 (Sat, 15 Oct 2011) Log Message: ----------- Fixing @package for class/kernel Modified Paths: -------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/class.zipfile.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/criteria.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/downloader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/pagenav.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/preload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/tardownloader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/tree.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/uploader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsformloader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopskernel.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslocal.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopssecurity.php XoopsCore/branches/2.6.x/2.6.0/htdocs/class/zipdownloader.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configitem.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configoption.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/group.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/groupperm.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/image.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagecategory.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imageset.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagesetimg.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/member.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/online.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/privmessage.php XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/user.php Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/membership.php Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/class.zipfile.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/class.zipfile.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/class.zipfile.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -25,7 +25,6 @@ * Official ZIP file format: http://www.pkware.com/appnote.txt * * @copyright (c) 2002 - www.ipunkt.biz (rok) - * @access public * @package class */ class zipfile Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/commentrenderer.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,8 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel - * @subpackage comment + * @package class * @since 2.0.0 * @author Kazumi Ono <on...@xo...> * @version $Id$ @@ -24,7 +23,7 @@ * Display comments * * @author Kazumi Ono <on...@xo...> - * @access public + * @package class */ class XoopsCommentRenderer { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/criteria.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/criteria.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/criteria.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,8 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel - * @subpackage database + * @package class * @since 2.0.0 * @author Kazumi Ono <on...@xo...> * @author Nathan Dial @@ -27,6 +26,7 @@ * Abstract base class should never be instantiated directly. * * @abstract + * @package class */ abstract class CriteriaElement { @@ -178,6 +178,7 @@ /** * Collection of multiple {@link CriteriaElement}s * + * @package class */ class CriteriaCompo extends CriteriaElement { @@ -281,6 +282,7 @@ /** * A single criteria * + * @package class */ class Criteria extends CriteriaElement { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/downloader.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/downloader.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/downloader.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,7 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.0.0 * @author Kazumi Ono <on...@xo...> * @version $Id$ @@ -22,6 +22,7 @@ /** * Sends non HTML files through a http socket * + * @package class */ abstract class XoopsDownloader { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/pagenav.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/pagenav.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/pagenav.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,7 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.0.0 * @author Kazumi Ono (http://www.myweb.ne.jp/, http://jp.xoops.org/) * @version $Id$ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/preload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/preload.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/preload.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,12 +11,10 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel - * @subpackage class + * @package class * @since 2.4.0 * @author trabis <lus...@gm...> * @version $Id: preload.php 3437 2009-08-27 13:52:28Z trabis $ - * @deprecated To be deprecated in XOOPS 3 */ /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/tardownloader.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/tardownloader.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/tardownloader.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,11 +11,12 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.0.0 * @author Kazumi Ono (http://www.myweb.ne.jp/, http://jp.xoops.org/) * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); class XoopsTarDownloader extends XoopsDownloader Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/template.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -14,8 +14,7 @@ * @author Kazumi Ono <on...@xo...> * @author Skalpa Keo <sk...@xo...> * @author Taiwen Jiang <ph...@us...> - * @package kernel - * @subpackage core + * @package class * @version $Id$ */ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -14,8 +14,7 @@ * @author Skalpa Keo <sk...@xo...> * @author Taiwen Jiang <ph...@us...> * @since 2.3.0 - * @package kernel - * @subpackage xos_opal_Theme + * @package class * @version $Id$ */ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/theme_blocks.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -13,7 +13,7 @@ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) * @author Skalpa Keo <sk...@xo...> * @since 2.3.0 - * @package kernel + * @package class * @version $Id$ */ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/tree.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/tree.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/tree.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,7 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.0.0 * @author Kazumi Ono (http://www.myweb.ne.jp/, http://jp.xoops.org/) * @version $Id$ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/uploader.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/uploader.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/uploader.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,7 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.0.0 * @author Kazumi Ono (http://www.myweb.ne.jp/, http://jp.xoops.org/) * @author Taiwen Jiang <ph...@us...> Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/userutility.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,7 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.3.0 * @author Taiwen Jiang <ph...@us...> * @version $Id$ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsformloader.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsformloader.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsformloader.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,7 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.0.0 * @version $Id$ */ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopskernel.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopskernel.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopskernel.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -13,10 +13,9 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.0.0 * @version $Id$ - * @deprecated */ defined('XOOPS_ROOT_PATH') or die('Restricted access'); Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslists.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,7 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.0.0 * @version $Id$ */ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsload.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -15,8 +15,8 @@ * @since 2.3.0 * @author Taiwen Jiang <ph...@us...> * @version $Id$ - * @todo For PHP 5 compliant */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); class XoopsLoad Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslocal.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslocal.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopslocal.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,7 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.3.0 * @author Taiwen Jiang <ph...@us...> * @version $Id$ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopsmailer.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,7 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.0.0 * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopssecurity.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopssecurity.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/xoopssecurity.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,7 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.0.0 * @version $Id$ */ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/class/zipdownloader.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/class/zipdownloader.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/class/zipdownloader.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -11,7 +11,7 @@ * * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) - * @package kernel + * @package class * @since 2.0.0 * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ @@ -26,7 +26,6 @@ * @author John Neill <cat...@xo...> * @copyright copyright (c) XOOPS.org * @package class - * @access public */ class XoopsZipDownloader extends XoopsDownloader { Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configitem.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configitem.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configitem.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -16,6 +16,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /**#@+ Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configoption.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configoption.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/configoption.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -16,6 +16,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/group.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/group.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/group.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -16,6 +16,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** @@ -108,91 +109,4 @@ } } -/** - * membership of a user in a group - * - * @author Kazumi Ono <on...@xo...> - * @copyright copyright (c) 2000-2003 XOOPS.org - * @package kernel - */ -class XoopsMembership extends XoopsObject -{ - /** - * Constructor - */ - public function __construct() - { - $this->initVar('linkid', XOBJ_DTYPE_INT, null, false); - $this->initVar('groupid', XOBJ_DTYPE_INT, null, false); - $this->initVar('uid', XOBJ_DTYPE_INT, null, false); - } -} - -/** - * XOOPS membership handler class. (Singleton) - * - * This class is responsible for providing data access mechanisms to the data source - * of XOOPS group membership class objects. - * - * @author Kazumi Ono <on...@xo...> - * @copyright copyright (c) 2000-2003 XOOPS.org - * @package kernel - */ -class XoopsMembershipHandler extends XoopsPersistableObjectHandler -{ - /** - * Constructor - * - * @param XoopsDatabase|null $db {@link XoopsDatabase} - */ - public function __construct(XoopsDatabase $db = null) - { - parent::__construct($db, 'groups_users_link', 'XoopsMembership', 'linkid', 'groupid'); - } - - /** - * retrieve groups for a user - * - * @param int $uid ID of the user - * objects? FALSE returns associative array. - * @return array array of groups the user belongs to - */ - public function getGroupsByUser($uid) - { - $ret = array(); - $sql = 'SELECT groupid FROM ' . $this->db->prefix('groups_users_link') . ' WHERE uid=' . intval($uid); - $result = $this->db->query($sql); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $ret[] = $myrow['groupid']; - } - return $ret; - } - - /** - * retrieve users belonging to a group - * - * @param int $groupid ID of the group - * FALSE will return arrays - * @param int $limit number of entries to return - * @param int $start offset of first entry to return - * @return array array of users belonging to the group - */ - public function getUsersByGroup($groupid, $limit = 0, $start = 0) - { - $ret = array(); - $sql = 'SELECT uid FROM ' . $this->db->prefix('groups_users_link') . ' WHERE groupid=' . intval($groupid); - $result = $this->db->query($sql, $limit, $start); - if (!$result) { - return $ret; - } - while ($myrow = $this->db->fetchArray($result)) { - $ret[] = $myrow['uid']; - } - return $ret; - } -} - ?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/groupperm.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/groupperm.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/groupperm.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -16,6 +16,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/image.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/image.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/image.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -16,6 +16,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagecategory.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagecategory.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagecategory.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -16,6 +16,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imageset.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imageset.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imageset.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -16,6 +16,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagesetimg.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagesetimg.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/imagesetimg.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -16,6 +16,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/member.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/member.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/member.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -16,11 +16,9 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); -require_once $GLOBALS['xoops']->path('kernel/user.php'); -require_once $GLOBALS['xoops']->path('kernel/group.php'); - /** * XOOPS member handler class. * This class provides simple interface (a facade class) for handling groups/users/ @@ -37,17 +35,22 @@ /**#@+ * holds reference to group handler(DAO) class + * @var XoopsGrouppermHandler * @access private */ private $_gHandler; /** * holds reference to user handler(DAO) class + * + * @var XoopsUserHandler */ private $_uHandler; /** * holds reference to membership handler(DAO) class + * + * @var XoopsMembershipHandler */ private $_mHandler; @@ -64,9 +67,9 @@ */ public function __construct($db = null) { - $this->_gHandler = new XoopsGroupHandler($db); - $this->_uHandler = new XoopsUserHandler($db); - $this->_mHandler = new XoopsMembershipHandler($db); + $this->_gHandler = xoops_getHandler('group'); + $this->_uHandler = xoops_getHandler('user'); + $this->_mHandler = xoops_getHandler('membership'); } /** Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/membership.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/membership.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/membership.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -0,0 +1,109 @@ +<?php +/** + * XOOPS Kernel Class + * + * 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. + * + * @copyright The XOOPS Project http://sourceforge.net/projects/xoops/ + * @license GNU GPL 2 (http://www.gnu.org/licenses/old-licenses/gpl-2.0.html) + * @package kernel + * @since 2.6.0 + * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ + * @version $Id: $ + */ + +defined('XOOPS_ROOT_PATH') or die('Restricted access'); + +/** + * membership of a user in a group + * + * @author Kazumi Ono <on...@xo...> + * @copyright copyright (c) 2000-2003 XOOPS.org + * @package kernel + */ +class XoopsMembership extends XoopsObject +{ + /** + * Constructor + */ + public function __construct() + { + $this->initVar('linkid', XOBJ_DTYPE_INT, null, false); + $this->initVar('groupid', XOBJ_DTYPE_INT, null, false); + $this->initVar('uid', XOBJ_DTYPE_INT, null, false); + } +} + +/** + * XOOPS membership handler class. (Singleton) + * + * This class is responsible for providing data access mechanisms to the data source + * of XOOPS group membership class objects. + * + * @author Kazumi Ono <on...@xo...> + * @copyright copyright (c) 2000-2003 XOOPS.org + * @package kernel + */ +class XoopsMembershipHandler extends XoopsPersistableObjectHandler +{ + /** + * Constructor + * + * @param XoopsDatabase|null $db {@link XoopsDatabase} + */ + public function __construct(XoopsDatabase $db = null) + { + parent::__construct($db, 'groups_users_link', 'XoopsMembership', 'linkid', 'groupid'); + } + + /** + * retrieve groups for a user + * + * @param int $uid ID of the user + * objects? FALSE returns associative array. + * @return array array of groups the user belongs to + */ + public function getGroupsByUser($uid) + { + $ret = array(); + $sql = 'SELECT groupid FROM ' . $this->db->prefix('groups_users_link') . ' WHERE uid=' . intval($uid); + $result = $this->db->query($sql); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $ret[] = $myrow['groupid']; + } + return $ret; + } + + /** + * retrieve users belonging to a group + * + * @param int $groupid ID of the group + * FALSE will return arrays + * @param int $limit number of entries to return + * @param int $start offset of first entry to return + * @return array array of users belonging to the group + */ + public function getUsersByGroup($groupid, $limit = 0, $start = 0) + { + $ret = array(); + $sql = 'SELECT uid FROM ' . $this->db->prefix('groups_users_link') . ' WHERE groupid=' . intval($groupid); + $result = $this->db->query($sql, $limit, $start); + if (!$result) { + return $ret; + } + while ($myrow = $this->db->fetchArray($result)) { + $ret[] = $myrow['uid']; + } + return $ret; + } +} + +?> \ No newline at end of file Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/module.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -15,6 +15,7 @@ * @since 2.0.0 * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/notification.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -17,6 +17,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); // RMV-NOTIFY Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/online.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/online.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/online.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -16,6 +16,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/privmessage.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/privmessage.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/privmessage.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -16,6 +16,7 @@ * @author Kazumi Ono (AKA onokazu) http://www.myweb.ne.jp/, http://jp.xoops.org/ * @version $Id$ */ + defined('XOOPS_ROOT_PATH') or die('Restricted access'); /** Modified: XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/user.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/user.php 2011-10-15 15:17:55 UTC (rev 7887) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/kernel/user.php 2011-10-15 15:40:10 UTC (rev 7888) @@ -35,12 +35,6 @@ private $_groups = array(); /** - * @var bool is the user admin? - * @access private - */ - private $_isAdmin = null; - - /** * @var string user's rank * @access private */ @@ -258,8 +252,9 @@ public function isOnline() { if (!isset($this->_isOnline)) { - $onlinehandler = xoops_gethandler('online'); - $this->_isOnline = ($onlinehandler->getCount(new Criteria('online_uid', $this->getVar('uid'))) > 0) ? true : false; + /* @var $online_handler XoopsOnlineHandler */ + $online_handler = xoops_gethandler('online'); + $this->_isOnline = ($online_handler->getCount(new Criteria('online_uid', $this->getVar('uid'))) > 0) ? true : false; } return $this->_isOnline; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |