当前位置: 首页>>代码示例>>PHP>>正文


PHP CKunenaTools::reCountUserPosts方法代码示例

本文整理汇总了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;
 }
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:52,代码来源:category.php

示例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'));
}
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:25,代码来源:admin.kunena.php

示例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":
开发者ID:kaantunc,项目名称:MYK-BOR,代码行数:31,代码来源:admin.kunena.php


注:本文中的CKunenaTools::reCountUserPosts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。