本文整理汇总了PHP中CKunenaConfig::create方法的典型用法代码示例。如果您正苦于以下问题:PHP CKunenaConfig::create方法的具体用法?PHP CKunenaConfig::create怎么用?PHP CKunenaConfig::create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CKunenaConfig
的用法示例。
在下文中一共展示了CKunenaConfig::create方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: setdefault
function setdefault() {
$db = JFactory::getDBO ();
$app = JFactory::getApplication ();
$config = KunenaFactory::getConfig ();
if (! JRequest::checkToken ()) {
$app->enqueueMessage ( JText::_ ( 'COM_KUNENA_ERROR_TOKEN' ), 'error' );
$app->redirect ( KunenaRoute::_($this->baseurl, false) );
}
$config->backup ();
$config->remove ();
$config = new CKunenaConfig();
$config->create();
$app->enqueueMessage ( JText::_('COM_KUNENA_CONFIG_DEFAULT'));
$app->redirect ( KunenaRoute::_($this->baseurl, false) );
}
示例2: defaultConfig
function defaultConfig($option)
{
$kunena_app = JFactory::getApplication();
$kunena_config = KunenaFactory::getConfig();
$kunena_config->backup();
$kunena_config->remove();
$kunena_config = new CKunenaConfig();
$kunena_config->create();
$kunena_db =& JFactory::getDBO();
$kunena_db->setQuery("UPDATE #__kunena_sessions SET allowed='na'");
$kunena_db->query();
KunenaError::checkDatabaseError();
while (@ob_end_clean()) {
}
$kunena_app->redirect(JURI::base() . "index.php?option={$option}&task=showconfig", JText::_('COM_KUNENA_CONFIG_DEFAULT'));
}