本文整理汇总了PHP中CKunenaTools::reCountUserPosts方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaTools::reCountUserPosts方法的具体用法?PHP CKunenaTools::reCountUserPosts怎么用?PHP CKunenaTools::reCountUserPosts使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaTools
的用法示例。
在下文中一共展示了CKunenaTools::reCountUserPosts方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
/**
* Method to delete the KunenaCategory object from the database
*
* @access public
* @return boolean True on success
* @since 1.6
*/
public function delete()
{
if (!$this->exists()) {
return true;
}
// Create the user table object
$table =& $this->getTable();
$result = $table->delete($this->id);
if (!$result) {
$this->setError($table->getError());
}
$this->_exists = false;
$db = JFactory::getDBO();
// Clear sessions
$queries[] = "UPDATE #__kunena_sessions SET allowed='na'";
// Delete moderators
$queries[] = "DELETE FROM #__kunena_moderation WHERE catid={$db->quote($this->id)}";
// Delete favorites
$queries[] = "DELETE f FROM #__kunena_favorites AS f LEFT JOIN #__kunena_messages AS m ON m.id=f.thread WHERE m.catid={$db->quote($this->id)}";
// Delete subscriptions
$queries[] = "DELETE s FROM #__kunena_subscriptions AS s LEFT JOIN #__kunena_messages AS m ON m.id=s.thread WHERE m.catid={$db->quote($this->id)}";
// Delete category subscriptions
$queries[] = "DELETE FROM #__kunena_subscriptions_categories WHERE catid={$db->quote($this->id)}";
// Delete thank yous
$queries[] = "DELETE t FROM #__kunena_thankyou AS t LEFT JOIN #__kunena_messages AS m ON m.id=t.postid WHERE m.catid={$db->quote($this->id)}";
// Delete poll users
$queries[] = "DELETE p FROM #__kunena_polls_users AS p LEFT JOIN #__kunena_messages AS m ON m.id=p.pollid WHERE m.catid={$db->quote($this->id)}";
// Delete poll options
$queries[] = "DELETE p FROM #__kunena_polls_options AS p LEFT JOIN #__kunena_messages AS m ON m.id=p.pollid WHERE m.catid={$db->quote($this->id)}";
// Delete polls
$queries[] = "DELETE p FROM #__kunena_polls AS p LEFT JOIN #__kunena_messages AS m ON m.id=p.threadid WHERE m.catid={$db->quote($this->id)}";
// Delete messages
$queries[] = "DELETE m, t FROM #__kunena_messages AS m INNER JOIN #__kunena_messages_text AS t ON m.id=t.mesid WHERE m.catid={$db->quote($this->id)}";
// TODO: delete attachments
foreach ($queries as $query) {
$db->setQuery($query);
$db->query();
KunenaError::checkDatabaseError();
}
// TODO: remove dependency
require_once KPATH_SITE . '/class.kunena.php';
CKunenaTools::reCountUserPosts();
CKunenaTools::reCountBoards();
return $result;
}
示例2: trashrestore
function trashrestore($option, $cid)
{
$kunena_app =& JFactory::getApplication();
$kunena_db =& JFactory::getDBO();
JArrayHelper::toInteger($cid);
if ($cid) {
foreach ($cid as $id) {
$kunena_db->setQuery("SELECT * FROM #__kunena_messages WHERE id={$id} AND hold=2");
$mes = $kunena_db->loadObject();
if (KunenaError::checkDatabaseError()) {
return;
}
$kunena_db->setQuery("UPDATE #__kunena_messages SET hold=0 WHERE hold IN (2,3) AND thread={$mes->thread} ");
$kunena_db->query();
if (KunenaError::checkDatabaseError()) {
return;
}
CKunenaTools::reCountUserPosts();
CKunenaTools::reCountBoards();
}
}
while (@ob_end_clean()) {
}
$kunena_app->redirect(JURI::base() . "index.php?option={$option}&task=showtrashview", JText::_('COM_KUNENA_TRASH_RESTORE_DONE'));
}
示例3: browseUploaded
browseUploaded($kunena_db, $option, 1);
break;
case "browseFiles":
browseUploaded($kunena_db, $option, 0);
break;
case "replaceImage":
replaceImage($kunena_db, $option, JRequest::getVar('img', ''), JRequest::getInt('OxP', 1));
break;
case "deleteFile":
deleteFile($kunena_db, $option, JRequest::getVar('fileName', ''));
break;
case "showAdministration":
showAdministration($option);
break;
case 'recount':
CKunenaTools::reCountUserPosts();
CKunenaTools::reCountBoards();
// Also reset the name info stored with messages
//CKunenaTools::updateNameInfo();
$app->redirect(JURI::base() . 'index.php?option=com_kunena', _KUNENA_RECOUNTFORUMS_DONE);
break;
case "showsmilies":
showsmilies($option);
break;
case "editsmiley":
editsmiley($option, $cid[0]);
break;
case "savesmiley":
savesmiley($option, $id);
break;
case "deletesmiley":