本文整理汇总了PHP中CKunenaTools::KDeletePosts方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaTools::KDeletePosts方法的具体用法?PHP CKunenaTools::KDeletePosts怎么用?PHP CKunenaTools::KDeletePosts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaTools
的用法示例。
在下文中一共展示了CKunenaTools::KDeletePosts方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
//.........这里部分代码省略.........
$kunena_app->redirect(CKunenaLink::GetProfileURL($userid, false), $success_msg);
}
}
$success_msg = '';
if ($catid && $kunena_my->id) {
$query = "DELETE FROM #__kunena_subscriptions_categories WHERE catid={$catid} AND userid={$kunena_my->id}";
$kunena_db->setQuery($query);
if ($kunena_db->query() && $kunena_db->getAffectedRows() == 1) {
$success_msg = JText::_('COM_KUNENA_GEN_CATEGORY_UNSUBCRIBED');
}
KunenaError::checkDatabaseError();
}
if ($userid == 0) {
while (@ob_end_clean()) {
}
$kunena_app->redirect(CKunenaLink::GetCategoryURL('showcat', $catid, false), $success_msg);
} else {
while (@ob_end_clean()) {
}
$kunena_app->redirect(CKunenaLink::GetProfileURL($userid, false), $success_msg);
}
break;
case 'karma':
include JPATH_COMPONENT . '/lib/kunena.karma.php';
break;
case 'thankyou':
require_once JPATH_COMPONENT . '/lib/kunena.thankyou.php';
$thankyou = new CKunenaThankyou();
$thankyou->setThankyou();
break;
case 'bulkactions':
switch ($do) {
case "bulkDel":
CKunenaTools::KDeletePosts();
break;
case "bulkMove":
CKunenaTools::KMovePosts($catid);
break;
case "bulkFavorite":
if (!JRequest::checkToken()) {
$kunena_app->enqueueMessage(JText::_('COM_KUNENA_ERROR_TOKEN'), 'error');
while (@ob_end_clean()) {
}
$kunena_app->redirect(CKunenaLink::GetProfileURL($kunena_my->id, false));
}
require_once JPATH_ROOT . '/administrator/components/com_kunena/libraries/api.php';
$KunenaUserAPI = new KunenaUserAPI();
$cb = KGetArrayReverseInts("cb");
$result = $KunenaUserAPI->unfavoriteThreads($kunena_my->id, $cb);
if ($result) {
$message = JText::_('COM_KUNENA_USER_UNFAVORITE_YES');
} else {
$message = JText::_('COM_KUNENA_POST_UNFAVORITED_TOPIC');
}
while (@ob_end_clean()) {
}
$kunena_app->redirect(CKunenaLink::GetProfileURL($kunena_my->id, false), $message);
break;
case "bulkSub":
if (!JRequest::checkToken()) {
$kunena_app->enqueueMessage(JText::_('COM_KUNENA_ERROR_TOKEN'), 'error');
while (@ob_end_clean()) {
}
$kunena_app->redirect(CKunenaLink::GetProfileURL($kunena_my->id, false));
}
require_once JPATH_ROOT . '/administrator/components/com_kunena/libraries/api.php';