本文整理匯總了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'));
}