From: <du...@us...> - 2012-12-24 01:41:24
|
Revision: 10534 http://sourceforge.net/p/xoops/svn/10534 Author: dugris Date: 2012-12-24 01:41:20 +0000 (Mon, 24 Dec 2012) Log Message: ----------- Comments plugin for user post synchronization Added Paths: ----------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/comments/class/plugin/system.php Removed Paths: ------------- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/plugin/system.php Added: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/comments/class/plugin/system.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/comments/class/plugin/system.php (rev 0) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/comments/class/plugin/system.php 2012-12-24 01:41:20 UTC (rev 10534) @@ -0,0 +1,32 @@ +<?php +/** + * Comments module + * + * 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 Comments + * @since 2.6.0 + * @author Laurent JEN (Aka DuGris) + * @version $Id$ + */ + +class CommentsSystemPlugin extends Xoops_Plugin_Abstract implements SystemPluginInterface +{ + public function UserSync($uid) + { + $xoops = Xoops::getInstance(); + $comment_handler = Comments::getInstance()->getHandlerComment(); + + $criteria = new CriteriaCompo(); + $criteria->add(new Criteria('status', COMMENTS_ACTIVE)); + $criteria->add(new Criteria('uid', $uid)); + return $comment_handler->getCount($criteria); + } +} \ No newline at end of file Property changes on: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/comments/class/plugin/system.php ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +Author Date Id Revision URL \ No newline at end of property Deleted: XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/plugin/system.php =================================================================== --- XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/plugin/system.php 2012-12-24 00:06:38 UTC (rev 10533) +++ XoopsCore/branches/2.6.x/2.6.0/htdocs/modules/system/class/plugin/system.php 2012-12-24 01:41:20 UTC (rev 10534) @@ -1,39 +0,0 @@ -<?php -/* - 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 http://www.fsf.org/copyleft/gpl.html GNU public license - * @author Laurent JEN (aka DuGris) - * @version $Id$ - */ - -class SystemSystemPlugin extends Xoops_Plugin_Abstract implements SystemPluginInterface -{ - public function UserSync($uid) - { - $xoops = Xoops::getInstance(); - $count = 0; - - // Comments Start - include_once $xoops->path('include/comment_constants.php'); - - $criteria = new CriteriaCompo(); - $criteria->add(new Criteria('com_status', XOOPS_COMMENT_ACTIVE)); - $criteria->add(new Criteria('com_uid', $uid)); - - $comment_handler = $xoops->getHandlerComment(); - $count += $comment_handler->getCount($criteria); - // Comments End - - return $count; - } -} \ No newline at end of file |