Minahito
minah****@users*****
2006年 11月 11日 (土) 16:06:23 JST
Index: xoops2jp/html/modules/legacy/admin/actions/CommentDeleteAction.class.php diff -u xoops2jp/html/modules/legacy/admin/actions/CommentDeleteAction.class.php:1.1.2.2 xoops2jp/html/modules/legacy/admin/actions/CommentDeleteAction.class.php:1.1.2.3 --- xoops2jp/html/modules/legacy/admin/actions/CommentDeleteAction.class.php:1.1.2.2 Sun Oct 15 00:48:54 2006 +++ xoops2jp/html/modules/legacy/admin/actions/CommentDeleteAction.class.php Sat Nov 11 16:06:23 2006 @@ -87,10 +87,12 @@ // We think we should not use getUser() and updateUserByField in XCube 2.1. // $user =& $handler->getUser($comment->get('com_uid')); - $count = $user->get('posts'); + if (is_object($user)) { + $count = $user->get('posts'); - if($count > 0) { - $handler->updateUserByField($user, 'posts', $count - 1); + if($count > 0) { + $handler->updateUserByField($user, 'posts', $count - 1); + } } } Index: xoops2jp/html/modules/legacy/admin/actions/CommentEditAction.class.php diff -u xoops2jp/html/modules/legacy/admin/actions/CommentEditAction.class.php:1.1.2.3 xoops2jp/html/modules/legacy/admin/actions/CommentEditAction.class.php:1.1.2.4 --- xoops2jp/html/modules/legacy/admin/actions/CommentEditAction.class.php:1.1.2.3 Fri Nov 10 14:33:57 2006 +++ xoops2jp/html/modules/legacy/admin/actions/CommentEditAction.class.php Sat Nov 11 16:06:23 2006 @@ -140,7 +140,9 @@ // We think we should not use getUser() and updateUserByField in XCube 2.1. // $user =& $handler->getUser($comment->get('com_uid')); - $handler->updateUserByField($user, 'posts', $user->get('posts') + 1); + if (is_obejct($user)) { + $handler->updateUserByField($user, 'posts', $user->get('posts') + 1); + } } function doUpdate($comment) @@ -156,7 +158,9 @@ // We think we should not use getUser() and updateUserByField in XCube 2.1. // $user =& $handler->getUser($comment->get('com_uid')); - $handler->updateUserByField($user, 'posts', $user->get('posts') + 1); + if (is_obejct($user)) { + $handler->updateUserByField($user, 'posts', $user->get('posts') + 1); + } } //