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


PHP KunenaVersion::checkVersion方法代码示例

本文整理汇总了PHP中KunenaVersion::checkVersion方法的典型用法代码示例。如果您正苦于以下问题:PHP KunenaVersion::checkVersion方法的具体用法?PHP KunenaVersion::checkVersion怎么用?PHP KunenaVersion::checkVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在KunenaVersion的用法示例。


在下文中一共展示了KunenaVersion::checkVersion方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: KunenaVersion

$task = JRequest::getCmd('task');
require_once JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
require_once KUNENA_PATH_LIB . '/kunena.version.php';
kimport('error');
KunenaError::initialize();
$kunena_app =& JFactory::getApplication();
require_once KPATH_ADMIN . '/install/version.php';
$kn_version = new KunenaVersion();
if ($view == 'install') {
    require_once KPATH_ADMIN . '/install/controller.php';
    $controller = new KunenaControllerInstall();
    $controller->execute($task);
    $controller->redirect();
    return;
}
if (!$kn_version->checkVersion() && $task != 'schema' && $task != 'schemadiff') {
    require_once dirname(__FILE__) . '/install.script.php';
    Com_KunenaInstallerScript::preflight(null, null);
    Com_KunenaInstallerScript::install(null);
    while (@ob_end_clean()) {
    }
    $kunena_app->redirect(JURI::root() . 'administrator/index.php?option=com_kunena&view=install');
}
require_once KPATH_SITE . '/lib/kunena.defines.php';
$lang = JFactory::getLanguage();
$lang->load('com_kunena', JPATH_SITE);
jimport('joomla.utilities.arrayhelper');
// Now that we have the global defines we can use shortcut defines
require_once KUNENA_PATH_LIB . '/kunena.config.class.php';
$kunena_config = KunenaFactory::getConfig();
$kunena_db = JFactory::getDBO();
开发者ID:vuchannguyen,项目名称:hoctap,代码行数:31,代码来源:admin.kunena.php

示例2: KunenaVersion

 * Kunena Component
 *
 * @package       Kunena.Installer
 *
 * @copyright (C) 2008 - 2015 Kunena Team. All rights reserved.
 * @license       http://www.gnu.org/copyleft/gpl.html GNU/GPL
 * @link          http://www.kunena.org
 **/
defined('_JEXEC') or die;
/*
 ************************/
/*
  KUNENA FORUM INSTALLER */
$app = JFactory::getApplication();
$view = $app->input->getCmd('view');
$task = $app->input->getCmd('task');
// Special case for developer versions.
if ($view != 'install' && class_exists('KunenaForum') && KunenaForum::isDev()) {
    // Developer version found: Check if latest version of Kunena has been installed. If not, prepare installation.
    require_once __DIR__ . '/install/version.php';
    $kversion = new KunenaVersion();
    if (!$kversion->checkVersion()) {
        JFactory::getApplication()->redirect(JUri::base(true) . '/index.php?option=com_kunena&view=install');
    }
    return;
}
// Run the installer...
require_once __DIR__ . '/install/controller.php';
$controller = new KunenaControllerInstall();
$controller->execute($task);
$controller->redirect();
开发者ID:Ruud68,项目名称:Kunena-Forum,代码行数:31,代码来源:install.php

示例3: KunenaVersion

// Initialize Kunena (if Kunena System Plugin isn't enabled)
require_once JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';

// Initialize error handlers
KunenaError::initialize ();

// Get view and task
$view = JRequest::getCmd ( 'view', 'cpanel' );
$task = JRequest::getCmd ( 'task' );
JRequest::setVar( 'view', $view );

// Start by checking if Kunena has been installed -- if not, redirect to our installer
require_once(KPATH_ADMIN.'/install/version.php');
$kversion = new KunenaVersion();
if ($view != 'install' && !$kversion->checkVersion()) {
	$app = JFactory::getApplication ();
	$app->redirect(JURI::root(true).'/administrator/index.php?option=com_kunena&view=install&task=prepare&'.JUtility::getToken().'=1');

} elseif ($view == 'install') {
	// Load our installer (special case)
	require_once (KPATH_ADMIN . '/install/controller.php');
	$controller = new KunenaControllerInstall();

} else {
	// Kunena has been successfully installed: Load our main controller
	$controller = KunenaController::getInstance();
}
$controller->execute( $task );
$controller->redirect();
开发者ID:GoremanX,项目名称:Kunena-2.0,代码行数:29,代码来源:admin.kunena.php


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