@@ -4,7 +4,7 @@
* @package Kunena.Administrator
* @subpackage Controllers
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -20,7 +20,7 @@ class KunenaAdminControllerUsers extends KunenaController {

public function __construct($config = array()) {
parent::__construct($config);
$this->baseurl = 'index.php?option=com_kunena&view=users';
$this->baseurl = 'administrator/index.php?option=com_kunena&view=users';
}

function edit() {
@@ -167,7 +167,7 @@ function movemessages () {
if ($error) {
$this->app->enqueueMessage ( $error, 'notice' );
} else {
$this->app->enqueueMessage ( JText::_('COM_A_KUNENA_USERMES_MOVED_DONE') );
$this->app->enqueueMessage ( JText::_('COM_KUNENA_A_USERMES_MOVED_DONE') );
}
$this->app->redirect ( KunenaRoute::_($this->baseurl, false) );
}
@@ -190,7 +190,7 @@ function logout() {
$options['clientid'][] = 0; // site
$this->app->logout( (int) $id, $options);

$this->app->enqueueMessage ( JText::_('COM_A_KUNENA_USER_LOGOUT_DONE'));
$this->app->enqueueMessage ( JText::_('COM_KUNENA_A_USER_LOGOUT_DONE'));
$this->app->redirect ( KunenaRoute::_($this->baseurl, false) );
}

@@ -212,7 +212,7 @@ function delete() {
$user->delete();
}

$this->app->enqueueMessage (JText::_('COM_A_KUNENA_USER_DELETE_DONE'));
$this->app->enqueueMessage (JText::_('COM_KUNENA_A_USER_DELETE_DONE'));
$this->app->redirect ( KunenaRoute::_($this->baseurl, false) );
}

Deleted file not rendered
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -33,26 +33,25 @@ public function __construct() {

// Run from administrator installer
function prepare() {
JRequest::checkToken( 'get' ) or die( 'Invalid Token' );
if (!JRequest::checkToken( 'get' )) {
$this->setRedirect('index.php?option=com_kunena');
return;
}
$start = JRequest::getBool('start', false);
$this->model->setStep ( 0 );
$this->model->install ();

$this->setRedirect('index.php?option=com_kunena&view=install' . ($start ? '&task=upgrade&'.JUtility::getToken().'=1' : ''));
}

public function display()
{
// Get the document object.
$document = JFactory::getDocument();

public function display($cachable = false, $urlparams = false) {
require_once(KPATH_ADMIN.'/install/view.php');
$view = $this->getView('install', 'html');
if ($view)
{
$view->addTemplatePath(KPATH_ADMIN.'/install/tmpl');
$view->setModel($this->model, true);
$view->setLayout(JRequest::getWord('layout', 'default'));
$view->assignRef('document', $document);
$view->document = JFactory::getDocument();
$view->display();

// Display Toolbar. View must have setToolBar method
@@ -64,19 +63,19 @@ public function display()
}

public function run() {
JRequest::checkToken( 'get' ) or die( 'Invalid Token' );
if (!JRequest::checkToken( 'get' )) {
$this->setRedirect('index.php?option=com_kunena');
return;
}

set_exception_handler('kunenaInstallerExceptionHandler');
//set_error_handler('kunenaInstallerErrorHandler');

$session = JFactory::getSession();

// Check requirements
$this->model->checkTimeout ();
$reqs = $this->model->getRequirements ();
$action = $this->model->getAction();
if (! empty ( $reqs->fail ) || !$action) {
// If requirements are not met, do not install
if (!$action) {
$this->model->setAction ( null );
$this->model->setStep ( 0 );
$this->setRedirect ( 'index.php?option=com_kunena&view=install' );
@@ -99,7 +98,7 @@ public function run() {
}
do {
$this->runStep ();
$error = $this->model->getError ();
$error = $this->model->getInstallError ();
$this->step = $this->model->getStep ();
$stop = ($this->model->checkTimeout () || !isset($this->steps[$this->step+1]));
} while ( ! $stop && ! $error );
@@ -123,37 +122,58 @@ public function run() {
}

public function restart() {
JRequest::checkToken( 'get' ) or die( 'Invalid Token' );
if (!JRequest::checkToken( 'get' )) {
$this->setRedirect('index.php?option=com_kunena');
return;
}
$this->model->setStep ( 0 );
$this->run();
}
function install() {
JRequest::checkToken( 'get' ) or die( 'Invalid Token' );
if (!JRequest::checkToken( 'get' )) {
$this->setRedirect('index.php?option=com_kunena');
return;
}
$this->model->setAction ( 'install' );
$this->run();
}
function upgrade() {
JRequest::checkToken( 'get' ) or die( 'Invalid Token' );
if (!JRequest::checkToken( 'get' )) {
$this->setRedirect('index.php?option=com_kunena');
return;
}
$this->model->setAction ( 'upgrade' );
$this->run();
}
function downgrade() {
JRequest::checkToken( 'get' ) or die( 'Invalid Token' );
if (!JRequest::checkToken( 'get' )) {
$this->setRedirect('index.php?option=com_kunena');
return;
}
$this->model->setAction ( 'downgrade' );
$this->run();
}
function reinstall() {
JRequest::checkToken( 'get' ) or die( 'Invalid Token' );
if (!JRequest::checkToken( 'get' )) {
$this->setRedirect('index.php?option=com_kunena');
return;
}
$this->model->setAction ( 'reinstall' );
$this->run();
}
function migrate() {
JRequest::checkToken( 'get' ) or die( 'Invalid Token' );
if (!JRequest::checkToken( 'get' )) {
$this->setRedirect('index.php?option=com_kunena');
return;
}
$this->model->setAction ( 'migrate' );
$this->run();
}
function uninstall() {
JRequest::checkToken( 'get' ) or die( 'Invalid Token' );
if (!JRequest::checkToken( 'get' )) {
$this->setRedirect('index.php?option=com_kunena');
return;
}
$this->model->setAction ( 'uninstall' );
$this->model->deleteTables('kunena_');
$this->model->deleteMenu();
@@ -173,8 +193,11 @@ function uninstall() {
}
}
function restore() {
if (!JRequest::checkToken( 'get' )) {
$this->setRedirect('index.php?option=com_kunena');
return;
}
$this->model->setAction ( 'restore' );
JRequest::checkToken( 'get' ) or die( 'Invalid Token' );
$this->uninstall();
}

@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -176,19 +176,19 @@ function installSampleData()

$query="INSERT INTO `#__kunena_messages`
(`id`, `parent`, `thread`, `catid`, `userid`, `name`, `subject`, `time`, `ip`) VALUES
(1, 0, 1, 2, ".$db->quote($my->id).", 'Kunena', ".$db->quote(KText::_('COM_KUNENA_SAMPLEDATA_POST1_SUBJECT')).", ".$posttime->toUnix().", '127.0.0.1');";
(1, 0, 1, 2, ".$db->quote($my->id).", 'Kunena', ".$db->quote(KText::_('COM_KUNENA_SAMPLEDATA_POST_WELCOME_SUBJECT')).", ".$posttime->toUnix().", '127.0.0.1');";

$queries[] = array ('kunena_messages', $query);

$query="INSERT INTO `#__kunena_messages_text`
(`mesid`, `message`) VALUES
(1, ".$db->quote(KText::_('COM_KUNENA_SAMPLEDATA_POST1_TEXT_CONTENT')).");";
(1, ".$db->quote(KText::_('COM_KUNENA_SAMPLEDATA_POST_WELCOME_TEXT_CONTENT')).");";

$queries[] = array ('kunena_messages_text', $query);

$query="INSERT INTO `#__kunena_topics`
(`id`, `category_id`, `subject`, `posts`, `first_post_id`, `first_post_time`, `first_post_userid`, `first_post_message`, `first_post_guest_name`, `last_post_id`, `last_post_time`, `last_post_userid`, `last_post_message`, `last_post_guest_name`) VALUES
(1, 2, ".$db->quote(KText::_('COM_KUNENA_SAMPLEDATA_POST1_SUBJECT')).", 1, 1, ".$posttime->toUnix().", ".$db->quote($my->id).", ".$db->quote(KText::_('COM_KUNENA_SAMPLEDATA_POST1_TEXT_CONTENT')).", 'Kunena', 1, ".$posttime->toUnix().", ".$db->quote($my->id).", ".$db->quote(KText::_('COM_KUNENA_SAMPLEDATA_POST1_TEXT_CONTENT')).", 'Kunena');";
(1, 2, ".$db->quote(KText::_('COM_KUNENA_SAMPLEDATA_POST_WELCOME_SUBJECT')).", 1, 1, ".$posttime->toUnix().", ".$db->quote($my->id).", ".$db->quote(KText::_('COM_KUNENA_SAMPLEDATA_POST_WELCOME_TEXT_CONTENT')).", 'Kunena', 1, ".$posttime->toUnix().", ".$db->quote($my->id).", ".$db->quote(KText::_('COM_KUNENA_SAMPLEDATA_POST_WELCOME_TEXT_CONTENT')).", 'Kunena');";

$queries[] = array ('kunena_topics', $query);

@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -131,6 +131,10 @@ public static function installed() {
return false;
}

public static function setup() {
if (class_exists('KunenaFactory')) KunenaFactory::loadLanguage('com_kunena.libraries', 'admin');
}

public function display($viewName, $layout='default', $template=null, $params = array()) {}
}

@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -3,32 +3,32 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
defined ( '_JEXEC' ) or die ();

jimport( 'joomla.filesystem.file' );

// This isn't called because of redirect
$this->parent->copyManifest();
global $installer_object;
if (isset($this)) $installer_object = $this;

function com_install() {
if (version_compare ( phpversion (), '5.0.0', '<' )) {
// Installer would fail to load, so let's output an error.
echo "ERROR: PHP 5.2 REQUIRED!";
return false;
}
global $installer_object;

if (version_compare(JVERSION, '1.6','>')) {
echo "ERROR: WRONG MANIFEST FILE LOADED, PLEASE TRY AGAIN WITH THE LATEST VERSION OF JOOMLA!";
if (!isset($installer_object) || version_compare(JVERSION, '1.6','>')) {
JFactory::getApplication()->enqueueMessage('Oops, Joomla! 1.5 manifest file loaded! Aborting installation.', 'notice');
return false;
}

// Check requirements
require_once dirname(__FILE__) . '/install.script.php';
$installer = new Com_KunenaInstallerScript();
$version = $installer_object->manifest->getElementByPath('version');
if (!$installer->checkRequirements($version->data())) return false;

// Initialise Kunena installer
require_once(JPATH_ADMINISTRATOR . '/components/com_kunena/install/model.php');
$installer = new KunenaModelInstall();
$installer->install();

// Remove deprecated manifest.xml (K1.5) and kunena.j16.xml (K1.7)
@@ -37,6 +37,9 @@ function com_install() {
$manifest = JPATH_ADMINISTRATOR . '/components/com_kunena/kunena.j16.xml';
if (JFile::exists($manifest)) JFile::delete($manifest);

// This isn't called because of redirect
$installer_object->parent->copyManifest();

// Redirect to Kunena Installer
$redirect_url = JURI::base () . 'index.php?option=com_kunena&view=install';
header ( "HTTP/1.1 303 See Other" );
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -16,12 +16,16 @@ class Com_KunenaInstallerScript {
protected $versions = array(
'PHP' => array (
'5.2' => '5.2.4',
'0' => '5.3.10' // Preferred version
),
'MySQL' => array (
'5.0' => '5.0.4',
'0' => '5.1' // Preferred version
),
'Joomla' => array (
'2.5' => '2.5.3',
'Joomla!' => array (
'1.5' => '1.5.25',
'1.6' => '2.5.3',
'0' => '2.5.4' // Preferred version
)
);
protected $extensions = array ('dom', 'gd', 'json', 'pcre', 'SimpleXML');
@@ -50,14 +54,8 @@ public function uninstall($parent) {

public function preflight($type, $parent) {
// Prevent installation if requirements are not met.
if (!$this->checkRequirements()) return false;

// Do not install over Git repository.
if ((class_exists('Kunena') && method_exists('Kunena', 'isSvn') && Kunena::isSvn())
|| (class_exists('KunenaForum') && method_exists('KunenaForum', 'isDev') && KunenaForum::isDev())) {
JFactory::getApplication()->enqueueMessage('Oops! You should not install Kunena over your Git reporitory!', 'notice');
return false;
}
$version = $parent->getParent()->getManifest()->version;
if (!$this->checkRequirements($version)) return false;

// Remove deprecated manifest.xml (K1.5) and kunena.j16.xml (K1.7)
$manifest = JPATH_ADMINISTRATOR . '/components/com_kunena/manifest.xml';
@@ -96,36 +94,90 @@ public function postflight($type, $parent) {
return true;
}

public function checkRequirements($version) {
$db = JFactory::getDbo();
$pass = $this->checkVersion('PHP', phpversion());
$pass &= $this->checkVersion('Joomla!', JVERSION);
$pass &= $this->checkVersion('MySQL', $db->getVersion ());
$pass &= $this->checkDbo($db->name, array('mysql', 'mysqli'));
$pass &= $this->checkExtensions($this->extensions);
$pass &= $this->checkKunena($version);
return $pass;
}

// Internal functions

protected function checkRequirements() {
$pass = $this->checkVersion('Joomla', JVERSION);
$pass &= $this->checkDbo(JFactory::getDbo()->name, array('mysql', 'mysqli'));
$pass &= $this->checkVersion('MySQL', JFactory::getDbo()->getVersion ());
$pass &= $this->checkVersion('PHP', phpversion());
foreach ($this->extensions as $name) {
if (!extension_loaded($name)) {
JFactory::getApplication()->enqueueMessage(sprintf('Missing PHP extension: %s.', $name), 'notice');
$pass = false;
}
protected function checkVersion($name, $version) {
$app = JFactory::getApplication();

foreach ($this->versions[$name] as $major=>$minor) {
if (!$major || version_compare ( $version, $major, "<" )) continue;
if (version_compare ( $version, $minor, ">=" )) return true;
break;
}
return $pass;
$recommended = end($this->versions[$name]);
$app->enqueueMessage(sprintf("%s %s is not supported. Minimum required version is %s %s, but it is higly recommended to use %s %s or later.", $name, $version, $name, $minor, $name, $recommended), 'notice');
return false;
}

protected function checkDbo($name, $types) {
$app = JFactory::getApplication();

if (in_array($name, $types)) {
return true;
}
JFactory::getApplication()->enqueueMessage(sprintf('MySQL database driver required (you have %s).', $name), 'notice');
$app->enqueueMessage(sprintf("Database driver '%s' is not supported. Please use MySQL instead.", $name), 'notice');
return false;
}
protected function checkVersion($name, $version) {
foreach ($this->versions[$name] as $major=>$minor) {
if (version_compare ( $version, $major, "<" )) continue;
if (version_compare ( $version, $minor, ">=" )) return true;
break;

protected function checkExtensions($extensions) {
$app = JFactory::getApplication();

$pass = 1;
foreach ($extensions as $name) {
if (!extension_loaded($name)) {
$pass = 0;
$app->enqueueMessage(sprintf("Required PHP extension '%s' is missing. Please install it into your system.", $name), 'notice');
}
}
return $pass;
}

protected function checkKunena($version) {
$app = JFactory::getApplication();

// Always load Kunena API if it exists.
$api = JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
if (file_exists ( $api )) require_once $api;

// Do not install over Git repository (K1.6+).
if ((class_exists('Kunena') && method_exists('Kunena', 'isSvn') && Kunena::isSvn())
|| (class_exists('KunenaForum') && method_exists('KunenaForum', 'isDev') && KunenaForum::isDev())) {
$app->enqueueMessage('Oops! You should not install Kunena over your Git reporitory!', 'notice');
return false;
}

$db = JFactory::getDBO();

// Check if Kunena can be found from the database
$table = $db->getPrefix().'kunena_version';
$db->setQuery ( "SHOW TABLES LIKE {$db->quote($table)}" );
if ($db->loadResult () != $table) return true;

// Get installed Kunena version
$db->setQuery("SELECT version FROM {$table} ORDER BY `id` DESC", 0, 1);
$installed = $db->loadResult();
if (!$installed) return true;

// Always allow upgrade to the newer version
if (version_compare($version, $installed, '>=')) return true;

// Check if we can downgrade to the current version
if (class_exists('KunenaInstaller') && KunenaInstaller::canDowngrade($version)) {
return true;
}
JFactory::getApplication()->enqueueMessage(sprintf('%s %s required (you have %s %s).', $name, $minor, $name, $version), 'notice');

$app->enqueueMessage(sprintf('Sorry, it is not possible to downgrade Kunena %s to version %s.', $installed, $version), 'notice');
return false;
}
}
@@ -142,7 +142,6 @@
<query mode="silenterror">DROP TABLE IF EXISTS `#__kunena_banned_users`</query>
<query mode="silenterror">ALTER TABLE `#__kunena_users`
ADD `banned` DATETIME NULL DEFAULT NULL AFTER `moderator`</query>
<phpfile name="upgrade-1.6.0_old_mt12"></phpfile>
</version>
<version version="1.6.0-RC1" versiondate="2010-08-09" versionname="Kujadili">
<query mode="silenterror">ALTER TABLE `#__kunena_users` ADD KEY `banned` ( `banned` )</query>
@@ -161,7 +160,6 @@
<version version="1.6.0" versiondate="2010-10-03" versionname="Spika">
</version>
<version version="1.6.1" versiondate="2010-11-06" versionname="Timu">
<phpfile name="upgrade-1.6.1_delfiles"></phpfile>
</version>
<version version="1.6.2" versiondate="2010-12-29" versionname="Team">
</version>
@@ -285,7 +283,6 @@
<query mode="silenterror">ALTER TABLE `#__kunena_topics` ADD INDEX `posts` ( `posts` );</query>
<query mode="silenterror">ALTER TABLE `#__kunena_user_read` MODIFY `time` datetime NOT NULL;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_thankyou` MODIFY `time` datetime NOT NULL;</query>
<phpfile name="upgrade-2.0.0_configuration"></phpfile>
<query mode="silenterror">ALTER TABLE `#__kunena_messages` MODIFY `ip` varchar(128) NULL AFTER `time`;</query>
<query mode="silenterror">ALTER TABLE `#__kunena_categories` ADD `topic_ordering` VARCHAR(16) NOT NULL default 'lastpost' AFTER `allow_polls`;</query>
</version>
@@ -343,6 +340,9 @@
</version>
<version version="2.0.0-BETA1" versiondate="2012-04-24" versionname="Newspeak">
</version>
<version version="2.0.0-BETA2-DEV2" versiondate="2012-05-06" versionname="Internal">
<phpfile name="upgrade-2.0.0_configuration"></phpfile>
</version>
<version version="@kunenaversion@" versiondate="@kunenaversiondate@" versionname="@kunenaversionname@">
</version>
</upgrade>

This file was deleted.

This file was deleted.

@@ -2,7 +2,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -3,17 +3,12 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
defined ( '_JEXEC' ) or die ();

// Minimum version requirements for Joomla 1.5
DEFINE('KUNENA_MIN_PHP', '5.2.4');
DEFINE('KUNENA_MIN_MYSQL', '5.0.4');
DEFINE('KUNENA_MIN_JOOMLA', '1.5.25');

jimport ( 'joomla.application.component.model' );
jimport ( 'joomla.filesystem.folder' );
jimport ( 'joomla.filesystem.file' );
@@ -37,7 +32,6 @@ class KunenaModelInstall extends JModel {
*/
protected $__state_set = false;

protected $_req = false;
protected $_versionprefix = false;
protected $_installed = array();
protected $_versions = array();
@@ -85,22 +79,12 @@ public function __construct() {
array ('step' => '', 'menu' => JText::_('COM_KUNENA_INSTALL_STEP_INSTALL') ),
array ('step' => 'Prepare', 'menu' => JText::_('COM_KUNENA_INSTALL_STEP_PREPARE') ),
array ('step' => 'Extract', 'menu' => JText::_('COM_KUNENA_INSTALL_STEP_EXTRACT') ),
//array ('step' => 'Language', 'menu' => JText::_('COM_KUNENA_INSTALL_STEP_LANGUAGES') ),
array ('step' => 'Plugins', 'menu' => JText::_('COM_KUNENA_INSTALL_STEP_PLUGINS') ),
array ('step' => 'Database', 'menu' => JText::_('COM_KUNENA_INSTALL_STEP_DATABASE') ),
array ('step' => 'Finish', 'menu' => JText::_('COM_KUNENA_INSTALL_STEP_FINISH') ),
array ('step' => '', 'menu' => JText::_('COM_KUNENA_INSTALL_STEP_COMPLETE') ) );
}

/**
* Installer object destructor
*
* @access public
* @since 1.6
*/
public function __destruct() {
}

/**
* Initialise Kunena, run from Joomla installer.
*/
@@ -138,15 +122,6 @@ public function uninstall() {
return true;
}

/**
* Installer cleanup after installation
*
* @access public
* @since 1.6
*/
public function cleanup() {
}

public function getModel() {
return $this;
}
@@ -237,7 +212,7 @@ public function addStatus($task, $result = false, $msg = '', $id = null) {
$app->setUserState ( 'com_kunena.install.status', $status );
}

function getError() {
function getInstallError() {
$status = $this->getState ( 'status', array () );
$error = 0;
foreach ( $status as $cur ) {
@@ -296,25 +271,13 @@ function installLanguage($tag, $name = '') {
// Install language from dest/language/xx-XX
if (is_dir($installdir)) {
$exists = $success;
if (version_compare(JVERSION, '1.6', '>')) {
// Joomla 1.6+
// Older versions installed language files into main folders
// Those files need to be removed to bring language up to date!
jimport('joomla.filesystem.folder');
$files = JFolder::files($installdir, '\.ini$');
foreach ($files as $filename) {
if (file_exists(JPATH_SITE."/language/{$tag}/{$filename}")) JFile::delete(JPATH_SITE."/language/{$tag}/{$filename}");
if (file_exists(JPATH_ADMINISTRATOR."/language/{$tag}/{$filename}")) JFile::delete(JPATH_ADMINISTRATOR."/language/{$tag}/{$filename}");
}
} elseif ($success == true && file_exists("{$installdir}/{$tag}.com_kunena.xml")) {
// Joomla 1.5
// Use installer to get files into the right place
$installer = new JInstaller ( );
if ($installer->install ( $installdir )) {
$success = true;
} else {
$success = -1;
}
// Older versions installed language files into main folders
// Those files need to be removed to bring language up to date!
jimport('joomla.filesystem.folder');
$files = JFolder::files($installdir, '\.ini$');
foreach ($files as $filename) {
if (file_exists(JPATH_SITE."/language/{$tag}/{$filename}")) JFile::delete(JPATH_SITE."/language/{$tag}/{$filename}");
if (file_exists(JPATH_ADMINISTRATOR."/language/{$tag}/{$filename}")) JFile::delete(JPATH_ADMINISTRATOR."/language/{$tag}/{$filename}");
}
}
}
@@ -553,21 +516,11 @@ public function stepPrepare() {
if ($r)
$this->addStatus ( ucfirst($r ['action']) . ' ' . $r ['name'], true );
$this->insertVersion ( 'migrateDatabase' );
if (! $this->getError ())
if (! $this->getInstallError ())
$this->setStep ( $this->getStep()+1 );
$this->checkTimeout(true);
}

public function stepLanguage() {
$lang = JFactory::getLanguage();
$languages = $lang->getKnownLanguages();
foreach ($languages as $language) {
$this->installLanguage($language['tag'], $language['name']);
}
if (! $this->getError ())
$this->setStep($this->getStep()+1);
}

public function stepExtract() {
$path = JPATH_ADMINISTRATOR . '/components/com_kunena/archive';
if (KunenaForum::isDev() || !is_file("{$path}/fileformat")) {
@@ -608,7 +561,7 @@ public function stepExtract() {
} else {
// Force page reload to avoid MySQL timeouts after extracting
$this->checkTimeout(true);
if (! $this->getError ())
if (! $this->getInstallError ())
$this->setStep($this->getStep()+1);
}
}
@@ -631,11 +584,13 @@ public function stepPlugins() {
$this->uninstallModule('mod_kunenamenu');
//$this->installModule('install/modules/mod_kunenamenu', 'kunenamenu');

if (! $this->getError ())
if (! $this->getInstallError ())
$this->setStep ( $this->getStep()+1 );
}

public function stepDatabase() {
KunenaForum::setup();

$task = $this->getTask();
switch ($task) {
case 0:
@@ -679,12 +634,14 @@ public function stepDatabase() {
$this->setTask($task+1);
break;
default:
if (! $this->getError ())
if (! $this->getInstallError ())
$this->setStep ( $this->getStep()+1 );
}
}

public function stepFinish() {
KunenaForum::setup();

$entryfiles = array(
array(KPATH_ADMIN, 'api', 'php'),
array(KPATH_ADMIN, 'admin.kunena', 'php'),
@@ -714,7 +671,7 @@ public function stepFinish() {
KunenaMenuHelper::cleanCache();
JFactory::getCache('com_kunena')->clean();

if (! $this->getError ()) {
if (! $this->getInstallError ()) {
$this->updateVersionState ( '' );
$this->addStatus ( JText::_('COM_KUNENA_INSTALL_SUCCESS'), true, '' );

@@ -1280,33 +1237,6 @@ function recountCategories() {
return false;
}

// Needed for Joomla 1.5 only
public function getRequirements() {
if ($this->_req !== false) {
return $this->_req;
}

$req = new StdClass ();
$req->mysql = $this->db->getVersion ();
$req->php = phpversion ();
$req->joomla = JVERSION;
$req->domdocument = 'DOMDocument';

$req->fail = array ();
if (version_compare ( $req->mysql, KUNENA_MIN_MYSQL, "<" ))
$req->fail ['mysql'] = true;
if (version_compare ( $req->php, KUNENA_MIN_PHP, "<" ))
$req->fail ['php'] = true;
if (version_compare ( $req->joomla, KUNENA_MIN_JOOMLA, "<" ))
$req->fail ['joomla'] = true;
if(!class_exists('DOMDocument')){
$req->fail ['domdocument'] = true;
}

$this->_req = $req;
return $this->_req;
}

public function getVersionPrefix() {
if ($this->_versionprefix !== false) {
return $this->_versionprefix;
@@ -1465,14 +1395,15 @@ function getActionText($version, $type='', $action=null) {
Installation hints: COM_KUNENA_INSTALL_UPGRADE_HINT, COM_KUNENA_INSTALL_DOWNGRADE_HINT, COM_KUNENA_INSTALL_REINSTALL_HINT,
COM_KUNENA_INSTALL_MIGRATE_HINT, COM_KUNENA_INSTALL_INSTALL_HINT, COM_KUNENA_INSTALL_UNINSTALL_HINT, COM_KUNENA_INSTALL_RESTORE_HINT
Installation warnings: COM_KUNENA_INSTALL_UPGRADE_WARN, COM_KUNENA_INSTALL_DOWNGRADE_WARN, COM_KUNENA_INSTALL_REINSTALL_WARN,
COM_KUNENA_INSTALL_MIGRATE_WARN, COM_KUNENA_INSTALL_INSTALL_WARN, COM_KUNENA_INSTALL_UNINSTALL_WARN, COM_KUNENA_INSTALL_RESTORE_WARN
Installation warnings: COM_KUNENA_INSTALL_UPGRADE_WARN, COM_KUNENA_INSTALL_DOWNGRADE_WARN,
COM_KUNENA_INSTALL_MIGRATE_WARN, COM_KUNENA_INSTALL_UNINSTALL_WARN, COM_KUNENA_INSTALL_RESTORE_WARN
*/

static $search = array ('#COMPONENT_OLD#','#VERSION_OLD#','#VERSION#');
$replace = array ($version->component, $version->version, KunenaForum::version());
if (!$action) $action = $version->action;
if ($type == 'warn' && ($action == 'INSTALL' || $action == 'REINSTALL')) return '';
$str = '';
if ($type == 'hint' || $type == 'warn') {
$str .= '<strong class="k'.$type.'">'.JText::_('COM_KUNENA_INSTALL_'.$type).'</strong> ';
@@ -1674,23 +1605,12 @@ function createMenu() {
'link'=>'index.php?option=com_kunena&view=topics&layout=user&mode=default', 'access'=>1, 'default'=>'my' , 'params'=>array('topics_catselection'=>1, 'topics_categories'=>0, 'topics_time'=>-1)),
'profile'=>array('name'=>JText::_ ( 'COM_KUNENA_MENU_ITEM_PROFILE' ), 'alias'=>JString::strtolower(JText::_ ( 'COM_KUNENA_MENU_PROFILE_ALIAS' )),
'link'=>'index.php?option=com_kunena&view=user', 'access'=>1, 'params'=>array('integration'=>1)),
'rules'=>array('name'=>JText::_ ( 'COM_KUNENA_MENU_ITEM_RULES' ), 'alias'=>JString::strtolower(JText::_ ( 'COM_KUNENA_MENU_RULES_ALIAS' )),
'link'=>'index.php?option=com_kunena&view=misc', 'access'=>0, 'params'=>array('body'=>JText::_ ( 'COM_KUNENA_MENU_MISC_DEFAULT_BODY' ), 'body_format'=>'text')),
'help'=>array('name'=>JText::_ ( 'COM_KUNENA_MENU_ITEM_HELP' ), 'alias'=>JString::strtolower(JText::_ ( 'COM_KUNENA_MENU_HELP_ALIAS' )),
'link'=>'index.php?option=com_kunena&view=misc', 'access'=>0, 'params'=>array('body'=>JText::_ ( 'COM_KUNENA_MENU_MISC_DEFAULT_BODY' ), 'body_format'=>'text')),
'link'=>'index.php?option=com_kunena&view=misc', 'access'=>2, 'params'=>array('body'=>JText::_ ( 'COM_KUNENA_MENU_HELP_BODY' ), 'body_format'=>'bbcode')),
'search'=>array('name'=>JText::_ ( 'COM_KUNENA_MENU_ITEM_SEARCH' ), 'alias'=>JString::strtolower(JText::_ ( 'COM_KUNENA_MENU_SEARCH_ALIAS' )),
'link'=>'index.php?option=com_kunena&view=search', 'access'=>0, 'params'=>array()),
);
$config = KunenaFactory::getConfig();
if (!empty($config->rules_cid)) {
$submenu['rules']['params']['body'] = "[article=full]{$config->rules_cid}[/article]";
$submenu['rules']['params']['body_format'] = 'bbcode';
}
if (!empty($config->help_cid)) {
$submenu['help']['params']['body'] = "[article=full]{$config->help_cid}[/article]";
$submenu['help']['params']['body_format'] = 'bbcode';
}
$lang = JFactory::getLanguage();
$debug = $lang->setDebug(false);
if (version_compare(JVERSION, '1.6','>')) {
@@ -1788,7 +1708,7 @@ function createMenuJ15($menu, $submenu) {
if ($this->db->getErrorNum ())
throw new KunenaInstallerException ( $this->db->getErrorMsg (), $this->db->getErrorNum () );
$id = ( int ) $this->_db->insertId ();
if (!$defaultmenu || (isset($menuitem['default']) && $config->fbdefaultpage == $menuitem['default'])) {
if (!$defaultmenu || (isset($menuitem['default']) && $config->defaultpage == $menuitem['default'])) {
$defaultmenu = $id;
}
}
@@ -1886,7 +1806,21 @@ function createMenuJ25($menu, $submenu) {
$table = JTable::getInstance ( 'menu' );
$table->load(array('menutype'=>'kunenamenu', 'link'=>$menu ['link']));
$params = '{"menu-anchor_title":"","menu-anchor_css":"","menu_image":"","menu_text":1,"page_title":"","show_page_heading":0,"page_heading":"","pageclass_sfx":"","menu-meta_description":"","menu-meta_keywords":"","robots":"","secure":0}';
$paramdata = array ('menu-anchor_title'=>'',
'menu-anchor_css'=>'',
'menu_image'=>'',
'menu_text'=>1,
'page_title'=>'',
'show_page_heading'=>0,
'page_heading'=>'',
'pageclass_sfx'=>'',
'menu-meta_description'=>'',
'menu-meta_keywords'=>'',
'robots'=>'',
'secure'=>0);
$gparams = new JRegistry($paramdata);
// FIXME: Joomla 1.6: add menu params for current item, too
$data = array (
'menutype' => 'kunenamenu',
@@ -1898,7 +1832,7 @@ function createMenuJ25($menu, $submenu) {
'parent_id' => 1,
'component_id' => $component_id,
'access' => $menu ['access'] + 1,
'params' => $params,
'params' => (string) $gparams,
'home' => 0,
'language' => '*',
'client_id' => 0
@@ -1909,6 +1843,8 @@ function createMenuJ25($menu, $submenu) {
$parent = $table;
$defaultmenu = 0;
foreach ( $submenu as $menuitem ) {
$params = clone $gparams;
$params->loadArray($menuitem['params']);
$table = JTable::getInstance ( 'menu' );
$table->load(array('menutype'=>'kunenamenu', 'link'=>$menuitem ['link']));
$data = array (
@@ -1921,7 +1857,7 @@ function createMenuJ25($menu, $submenu) {
'parent_id' => $parent->id,
'component_id' => $component_id,
'access' => $menuitem ['access'] + 1,
'params' => $params,
'params' => (string) $params,
'home' => 0,
'language' => '*',
'client_id' => 0
@@ -1930,7 +1866,7 @@ function createMenuJ25($menu, $submenu) {
if (! $table->setLocation ( $parent->id, 'last-child' ) || ! $table->bind ( $data ) || ! $table->check () || ! $table->store ()) {
throw new KunenaInstallerException ( $table->getError () );
}
if (! $defaultmenu || (isset ( $menuitem ['default'] ) && $config->fbdefaultpage == $menuitem ['default'])) {
if (! $defaultmenu || (isset ( $menuitem ['default'] ) && $config->defaultpage == $menuitem ['default'])) {
$defaultmenu = $table->id;
}
}
@@ -2071,7 +2007,7 @@ function checkTimeout($stop = false) {
public function recountThankyou() {
//Only perform this action if upgrading form previous version
$version = $this->getVersion();
if (version_compare ( $version->version, '2.0.0-DEV', ">" )) {
if (version_compare ( $version->version, '2.0.0-BETA2', ">" )) {
return true;
}

@@ -2095,20 +2031,20 @@ protected function _getJoomlaArchiveError($archive) {
switch ($ext)
{
case 'zip':
$adapter =& JArchive::getAdapter('zip');
$adapter = JArchive::getAdapter('zip');
break;
case 'tar':
$adapter =& JArchive::getAdapter('tar');
$adapter = JArchive::getAdapter('tar');
break;
case 'tgz' :
case 'gz' : // This may just be an individual file (e.g. sql script)
case 'gzip' :
$adapter =& JArchive::getAdapter('gzip');
$adapter = JArchive::getAdapter('gzip');
break;
case 'tbz2' :
case 'bz2' : // This may just be an individual file (e.g. sql script)
case 'bzip2':
$adapter =& JArchive::getAdapter('bzip2');
$adapter = JArchive::getAdapter('bzip2');
break;
default:
$adapter = null;
@@ -235,7 +235,7 @@ protected function setup() {
protected function getListQuery($sql = null)
{
// Check if we can use the supplied SQL query.
$sql = is_a($sql, 'JDatabaseQuery') ? $sql : $this->db->getQuery(true);
$sql = ($sql instanceof JDatabaseQuery) ? $sql : $this->db->getQuery(true);
$sql->select('m.id, m.parent, m.thread, m.catid, m.subject AS title');
$sql->select('FROM_UNIXTIME(m.time, \'%Y-%m-%d %H:%i:%s\') AS start_date');
$sql->select('m.name AS author, t.message AS summary, t.message AS body');
@@ -15,6 +15,10 @@
<filename>index.html</filename>
<folder>alphauserpoints</folder>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_kunena_alphauserpoints.sys.ini</language>
</languages>

<params>
<param name="activity" type="radio" default="1" label="PLG_KUNENA_ALPHAUSERPOINTS_ACTIVITY" description="PLG_KUNENA_ALPHAUSERPOINTS_ACTIVITY_DESC">
<option value="0">NO</option>
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage AlphaUserPoints
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @Copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage AlphaUserPoints
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage AlphaUserPoints
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage AlphaUserPoints
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -15,6 +15,10 @@
<filename>index.html</filename>
<folder>community</folder>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_kunena_community.sys.ini</language>
</languages>

<params>
<param name="access" type="radio" default="1" label="PLG_KUNENA_COMMUNITY_ACCESS" description="PLG_KUNENA_COMMUNITY_ACCESS_DESC">
<option value="0">NO</option>
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Community
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @Copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Community
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Community
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Community
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -33,7 +33,7 @@ protected function _getURL($user, $sizex, $sizey)
{
$user = KunenaFactory::getUser($user);
// Get CUser object
$user =& CFactory::getUser($user->userid);
$user = CFactory::getUser($user->userid);
if ($sizex<=90) $avatar = $user->getThumbAvatar();
else $avatar = $user->getAvatar();
return $avatar;
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Community
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Community
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Community
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -15,6 +15,10 @@
<filename>index.html</filename>
<folder>comprofiler</folder>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_kunena_comprofiler.sys.ini</language>
</languages>

<params>
<param name="access" type="radio" default="1" label="PLG_KUNENA_COMPROFILER_ACCESS" description="PLG_KUNENA_COMPROFILER_ACCESS_DESC">
<option value="0">NO</option>
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Comprofiler
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @Copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -19,6 +19,8 @@ public function __construct(&$subject, $config) {

$app = JFactory::getApplication ();

$this->loadLanguage ( 'plg_kunena_comprofiler.sys', JPATH_ADMINISTRATOR );

// Do not load if CommunityBuilder is not installed
$path = JPATH_ADMINISTRATOR . '/components/com_comprofiler/plugin.foundation.php';
if (!is_file ( $path )) {
@@ -40,8 +42,6 @@ public function __construct(&$subject, $config) {
}
parent::__construct ( $subject, $config );

$this->loadLanguage ( 'plg_kunena_comprofiler.sys', JPATH_ADMINISTRATOR );

$this->path = dirname ( __FILE__ ) . '/comprofiler';
require_once "{$this->path}/integration.php";
}
@@ -130,6 +130,7 @@ public function authoriseUsers(KunenaDatabaseObject $topic, array &$userids) {
if (empty($userids)) {
return;
}
// FIXME:
$allow = $deny = array();
return array($allow, $deny);
}
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Comprofiler
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Comprofiler
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Comprofiler
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -35,7 +35,7 @@ public function close() {
public function trigger($event, &$params) {
global $_PLUGINS;
$config = KunenaFactory::getConfig ();
$params ['config'] = & $config;
$params ['config'] = $config;
$_PLUGINS->loadPluginGroup ( 'user' );
$_PLUGINS->trigger ( 'kunenaIntegration', array ($event, &$config, &$params ) );
}
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Comprofiler
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Comprofiler
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -52,7 +52,7 @@ public function getInboxLink ($text) {

$userid = $_CB_framework->myId();

$cbUser =& CBuser::getInstance( (int) $userid );
$cbUser = CBuser::getInstance( (int) $userid );
if($cbUser === null) return;

$itemid = getCBprofileItemid();
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Comprofiler
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -15,6 +15,10 @@
<filename>index.html</filename>
<folder>gravatar</folder>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_kunena_gravatar.sys.ini</language>
</languages>

<params>
<param name="avatar" type="radio" default="1" label="PLG_KUNENA_GRAVATAR_AVATAR" description="PLG_KUNENA_GRAVATAR_AVATAR_DESC">
<option value="0">NO</option>
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Gravatar
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @Copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Gravatar
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -15,6 +15,10 @@
<filename>index.html</filename>
<folder>joomla</folder>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_kunena_joomla.sys.ini</language>
</languages>

<params>
<param name="access" type="radio" default="1" label="PLG_KUNENA_JOOMLA_ACCESS" description="PLG_KUNENA_JOOMLA_ACCESS_DESC">
<option value="0">NO</option>
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Joomla15
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @Copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Joomla15
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @Copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Joomla15
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Joomla16
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @Copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Joomla16
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @Copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Joomla16
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -15,6 +15,10 @@
<filename>index.html</filename>
<folder>kunena</folder>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_kunena_kunena.sys.ini</language>
</languages>

<params>
<param name="avatar" type="radio" default="1" label="PLG_KUNENA_KUNENA_AVATAR" description="PLG_KUNENA_KUNENA_AVATAR_DESC">
<option value="0">NO</option>
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Kunena
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @Copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Kunena
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage Kunena
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -15,6 +15,10 @@
<filename>index.html</filename>
<folder>uddeim</folder>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_kunena_uddeim.sys.ini</language>
</languages>

<params>
<param name="private" type="radio" default="1" label="PLG_KUNENA_UDDEIM_PRIVATE" description="PLG_KUNENA_UDDEIM_PRIVATE_DESC">
<option value="0">NO</option>
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage UddeIM
*
* @Copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @Copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage UddeIM
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -13,6 +13,10 @@
<files>
<filename plugin="kunena">kunena.php</filename>
</files>
<languages folder="language">
<language tag="en-GB">en-GB/en-GB.plg_system_kunena.sys.ini</language>
</languages>

<params>
<param name="jcontentevents" type="radio" default="0" label="PLG_SYSTEM_KUNENA_JCONTENTPLUGINS" description="PLG_SYSTEM_KUNENA_JCONTENTPLUGINS_DESC">
<option value="0">NO</option>
@@ -4,7 +4,7 @@
* @package Kunena.Plugins
* @subpackage System
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -27,8 +27,8 @@ function __construct(& $subject, $config) {
// Load Kunena API
require_once $api;

// Do not load if Kunena version is not supported or Kunena is offline
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('2.0') && KunenaForum::enabled())) return false;
// Do not load if Kunena version is not supported or Kunena is not installed
if (!(class_exists('KunenaForum') && KunenaForum::isCompatible('2.0') && KunenaForum::installed())) return false;

$this->loadLanguage('plg_system_kunena.sys', JPATH_ADMINISTRATOR);

@@ -207,4 +207,58 @@ public function onUserAfterSave($user, $isnew, $success, $msg) {
}
*/
}

/**
* Prevent downgrades to Kunena 1.7 and older releases
*/
public function onExtensionBeforeInstall($method, $type, $manifest, $eid) {
// We don't want to handle discover install (where there's no manifest provided)
if (!$manifest) return;
return $this->onExtensionBeforeUpdate($type, $manifest);
}
/**
* Prevent downgrades to Kunena 1.7 and older releases
*/
public function onExtensionBeforeUpdate($type, $manifest) {
if ($type != 'component') return true;

// Generate component name
$name = strtolower(JFilterInput::getInstance()->clean((string) $manifest->name, 'cmd'));
$element = (substr($name, 0, 4) == "com_") ? $name : "com_{$name}";
if ($element != 'com_kunena') return true;

// Kunena 2.0.0-BETA2 and later support this feature in their installer
if (version_compare($manifest->version, '2.0.0', '>=')) return true;

// Check if we can downgrade to the current version
if (class_exists('KunenaInstaller') && KunenaInstaller::canDowngrade($manifest->version)) {
return true;
}

// Old version detected: emulate failed installation
$app = JFactory::getApplication();
$app->enqueueMessage(sprintf('Sorry, it is not possible to downgrade Kunena %s to version %s.', KunenaForum::version(), $manifest->version), 'warning');
$app->enqueueMessage(JText::_('JLIB_INSTALLER_ABORT_COMP_INSTALL_CUSTOM_INSTALL_FAILURE'), 'error');
$app->enqueueMessage(JText::sprintf('COM_INSTALLER_MSG_UPDATE_ERROR', JText::_('COM_INSTALLER_TYPE_TYPE_'.strtoupper($type))));
$app->redirect('index.php?option=com_installer');
}

/**
* Display Kunena backend icon in Joomla 2.5+
*
* @param string $context
*/
public function onGetIcons($context) {
if ($context != 'mod_quickicon') {
return;
}
KunenaFactory::loadLanguage('com_kunena.sys', 'admin');

return array( array(
'link' => JRoute::_('index.php?option=com_kunena'),
'image' => 'kunena/icons/kunena-logo-48.png',
'text' => JText::_('COM_KUNENA'),
'access' => array('core.manage', 'com_kunena'),
'id' => 'com_kunena_icon' ) );
}
}
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -44,15 +44,6 @@ public function __construct()
$this->db = JFactory::getDBO();
}

/**
* Installer object destructor
*
* @access public
* @since 1.6
*/
public function __destruct() {
}

/**
* Overridden method to get model state variables.
*
@@ -303,8 +294,8 @@ protected function listAllNodes($nodeLists)
$list = array();
foreach ($nodeLists as $k=>$nl) foreach ($nl as $n)
{
if (is_a($n, 'DOMAttr')) $list[$n->name][$k] = $n;
else if (is_a($n, 'DOMElement')) $list[$n->tagName][$n->getAttribute('name')][$k] = $n;
if ($n instanceof DOMAttr) $list[$n->name][$k] = $n;
else if ($n instanceof DOMElement) $list[$n->tagName][$n->getAttribute('name')][$k] = $n;
}
return $list;
}
@@ -320,7 +311,7 @@ public function getSchemaNodeDiff($schema, $tag, $name, $loc)
if (!$action) $node->setAttribute('action', 'create');

$prev = $loc['new']->previousSibling;
while ($prev && !is_a($prev, 'DOMElement')) {
while ($prev && !($prev instanceof DOMElement)) {
$prev = $prev->previousSibling;
}
if ($prev && $tag == 'field' && $prev->tagName == 'field') $node->setAttribute('after', $prev->getAttribute('name'));
@@ -382,7 +373,7 @@ public function getSchemaNodeDiff($schema, $tag, $name, $loc)
$node->setAttribute('action', $action);

$prev = $loc['new']->previousSibling;
while ($prev && !is_a($prev, 'DOMElement')) {
while ($prev && !($prev instanceof DOMElement)) {
$prev = $prev->previousSibling;
}
if ($prev && $tag == 'field' && $prev->tagName == 'field') $node->setAttribute('after', $prev->getAttribute('name'));
@@ -396,7 +387,7 @@ public function getSchemaNodeDiff($schema, $tag, $name, $loc)

protected function getDOMDocument($input)
{
if (is_a($input, 'DOMNode')) $schema = $input;
if (($input instanceof DOMNode)) $schema = $input;
else if ($input === KUNENA_INPUT_DATABASE) $schema = $this->getSchemaFromDatabase();
else if (is_string($input) && file_exists($input)) $schema = $this->getSchemaFromFile($input);
else if (is_string($input)) { $schema = new DOMDocument('1.0', 'utf-8'); $schema->loadXML($input); }
@@ -501,7 +492,7 @@ public function getSchemaSQL($schema, $drop=false)

protected function getSchemaSQLField($field, $after='')
{
if (!is_a($field, 'DOMElement')) return '';
if (!($field instanceof DOMElement)) return '';

$str = '';
if ($field->tagName == 'field')
@@ -546,7 +537,7 @@ protected function upgradeNewAction($dbschema, $node, $table='')
{
foreach ($node->childNodes as $action)
{
if (!is_a($action, 'DOMElement')) continue;
if (!($action instanceof DOMElement)) continue;
switch ($action->tagName) {
case 'table':
$this->upgradeNewAction($dbschema, $action, $action->getAttribute('name'));
@@ -576,13 +567,13 @@ protected function findNode($schema, $type, $table, $field='')
$rootNode = $schema->documentElement;
foreach ($rootNode->childNodes as $tableNode)
{
if (!is_a($tableNode, 'DOMElement')) continue;
if (!($tableNode instanceof DOMElement)) continue;
if ($tableNode->tagName == 'table' && $table == $tableNode->getAttribute('name'))
{
if ($type == 'table') return $tableNode;
foreach ($tableNode->childNodes as $fieldNode)
{
if (!is_a($fieldNode, 'DOMElement')) continue;
if (!($fieldNode instanceof DOMElement)) continue;
if ($fieldNode->tagName == $type && $field == $fieldNode->getAttribute('name'))
{
return $fieldNode;
@@ -4,7 +4,7 @@
* @package Kunena.Installer
* @subpackage Template
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -76,9 +76,7 @@
</div>
<div class="n">
<?php
if (!empty($this->requirements->fail)):
echo $this->loadTemplate('reqfail');
elseif (!$this->step):
if (!$this->step):
echo $this->loadTemplate('start');
else:
echo $this->loadTemplate('install');
@@ -4,7 +4,7 @@
* @package Kunena.Installer
* @subpackage Template
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/

This file was deleted.

@@ -4,7 +4,7 @@
* @package Kunena.Installer
* @subpackage Template
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -4,7 +4,7 @@
* @package Kunena.Installer
* @subpackage Template
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -61,4 +61,4 @@ function kunena_upgrade_108_favorites($parent) {
throw new KunenaInstallerException ( $db->getErrorMsg (), $db->getErrorNum () );
}
return array('action'=>'', 'name'=>JText::_ ( 'COM_KUNENA_INSTALL_108_FAVORITES' ), 'success'=>true);
}
}
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -78,4 +78,4 @@ function kunena_upgrade_160_attachments($parent) {
// created and executed outside of the upgrade itself.

return array('action'=>'', 'name'=>JText::_ ( 'COM_KUNENA_INSTALL_160_ATTACHMENTS' ), 'success'=>true);
}
}
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -14,52 +14,53 @@ function kunena_upgrade_160_configuration($parent) {
$config = KunenaFactory::getConfig ();

// Switch to default template
$config->template = 'default';
$config->set('template', 'blue_eagle');

// Keep integration settings
$integration = array ('jomsocial' => 'jomsocial', 'cb' => 'communitybuilder', 'uddeim' => 'uddeim', 'aup' => 'alphauserpoints', 'none' => 'none' );
if (! $config->allowavatar) {
$config->allowavatar = 1;
$config->integration_avatar = 'none';
} else if ($config->avatar_src) {
if (isset ( $integration [$config->avatar_src] )) {
$config->integration_avatar = $integration [$config->avatar_src];
if (! $config->get('allowavatar')) {
$config->set('allowavatar', 1);
$config->set('integration_avatar', 'none');
} else if ($config->get('avatar_src')) {
if (isset ( $integration [$config->get('avatar_src')] )) {
$config->set('integration_avatar', $integration [$config->get('avatar_src')]);
} else {
$config->integration_avatar = 'kunena';
$config->set('integration_avatar', 'kunena');
}
$config->avatar_src = '';
unset($config->avatar_src);
}
if ($config->fb_profile) {
if (isset ( $integration [$config->fb_profile] )) {
$config->integration_access = $integration [$config->fb_profile];
$config->integration_login = $integration [$config->fb_profile];
$config->integration_profile = $integration [$config->fb_profile];
$config->integration_activity = $integration [$config->fb_profile];
if ($config->get('fb_profile')) {
if (isset ( $integration [$config->get('fb_profile')] )) {
$profile = $integration [$config->get('fb_profile')];
$config->set('integration_access', $profile);
$config->set('integration_login', $profile);
$config->iset('ntegration_profile', $profile);
$config->set('integration_activity', $profile);
} else {
$config->integration_access = 'joomla';
$config->integration_login = 'joomla';
$config->integration_profile = 'kunena';
$config->integration_activity = 'none';
$config->set('integration_access', 'joomla');
$config->set('integration_login', 'joomla');
$config->set('integration_profile', 'kunena');
$config->set('integration_activity', 'none');
}
$config->fb_profile = '';
unset($config->fb_profile);
}
if ($config->js_actstr_integration) {
$config->integration_activity = 'jomsocial';
$config->js_actstr_integration = 0;
} else if ($config->integration_activity == 'jomsocial') {
$config->integration_activity = 'none';
if ($config->get('js_actstr_integration')) {
$config->set('integration_activity', 'jomsocial');
unset($config->js_actstr_integration);
} else if ($config->get('integration_activity') == 'jomsocial') {
$config->set('integration_activity', 'none');
}
if ($config->pm_component) {
if (isset ( $integration [$config->pm_component] )) {
$config->integration_private = $integration [$config->pm_component];
if ($config->get('pm_component')) {
if (isset ( $integration [$config->get('pm_component')] )) {
$config->set('integration_private', $integration [$config->get('pm_component')]);
} else {
$config->integration_private = 'none';
$config->set('integration_private', 'none');
}
$config->pm_component = '';
unset($config->pm_component);
}

// Save configuration
$config->save ();

return array ('action' => '', 'name' => JText::_ ( 'COM_KUNENA_INSTALL_160_CONFIGURATION' ), 'success' => true );
}
}

This file was deleted.

@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -101,4 +101,4 @@ function kunena_upgrade_160_polls($parent) {
}
if ($upgraded)
return array ('action' => '', 'name' => JText::_ ( 'COM_KUNENA_INSTALL_160_POLLS' ), 'success' => true );
}
}
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -16,8 +16,8 @@ function kunena_upgrade_160_timezone($parent) {
$db = JFactory::getDbo();

// We need to fix all timestamps to UTC (if not already done)
if ($config->board_ofset != '0.00') {
$timeshift = ( float ) date ( 'Z' ) + (( float ) $config->board_ofset * 3600);
if ($config->get('board_ofset', '0.00') != '0.00') {
$timeshift = ( float ) date ( 'Z' ) + (( float ) $config->get('board_ofset') * 3600);

$db->setQuery ( "UPDATE #__kunena_categories SET time_last_msg = time_last_msg - {$timeshift}" );
$db->query ();
@@ -39,11 +39,11 @@ function kunena_upgrade_160_timezone($parent) {
if ($db->getErrorNum ())
throw new KunenaInstallerException ( $db->getErrorMsg (), $db->getErrorNum () );

$config->board_ofset = '0.00';
unset($config->board_ofset);
$result = array('action'=>'', 'name'=>JText::sprintf ( 'COM_KUNENA_INSTALL_160_TIMEZONE', sprintf('%+d:%02d', $timeshift/3600, ($timeshift/60)%60)), 'success'=>true);
}

// Save configuration
$config->save ();
return $result;
}
}

This file was deleted.

@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -43,18 +43,18 @@ function kunena_upgrade_200_aliases($parent) {
// Create SEF: id-name and id-Name (UTF8)
foreach ($categories as $id=>$category) {
$created = false;
if ($config->sefutf8) {
if ($config->get('sefutf8')) {
$name = $aliasUtf[$category->id];
if (!empty($name)) $created = kCreateCategoryAlias($category, "{$id}-{$name}", 1);
}
$name = $aliasLit[$category->id];
if (!empty($name)) kCreateCategoryAlias($category, "{$id}-{$name}", !$created);
}
// Create SEF: name and Name (UTF8)
if ($config->sefcats) {
if ($config->get('sefcats')) {
foreach ($categories as $id=>$category) {
$created = false;
if ($config->sefutf8) {
if ($config->get('sefutf8')) {
$name = $aliasUtf[$category->id];
$keys = array_keys($aliasUtf, $name);
if (!empty($name)) $created = kCreateCategoryAlias($category, $name, count($keys) == 1);
@@ -64,6 +64,7 @@ function kunena_upgrade_200_aliases($parent) {
if (!empty($name)) kCreateCategoryAlias($category, $name, !$created && count($keys) == 1);
}
}

return array ('action' => '', 'name' => JText::_ ( 'COM_KUNENA_INSTALL_200_ALIASES' ), 'success' => true );
}

@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -13,30 +13,50 @@
function kunena_upgrade_200_configuration($parent) {
$config = KunenaFactory::getConfig ();

if ($config->allowimageupload >= 0) {
$config->image_upload = 'nobody';
if ($config->allowimageregupload == 1) {
$config->image_upload = 'registered';
// Unset deprecated configuration options which have been migrated earlier
unset($config->board_ofset);
unset($config->allowavatar);
unset($config->avatar_src);
unset($config->fb_profile);
unset($config->pm_component);
unset($config->js_actstr_integration);
unset($config->sefcats);
unset($config->rules_cid);
unset($config->help_cid);

if (isset($config->allowimageupload)) {
$config->set('image_upload', 'nobody');
if ($config->get('allowimageregupload') == 1) {
$config->set('image_upload', 'registered');
}
if ($config->allowimageupload == 1) {
$config->image_upload = 'everybody';
if ($config->get('allowimageupload') == 1) {
$config->set('image_upload', 'everybody');
}
$config->allowimageupload = $config->allowimageregupload = -1;
unset($config->allowimageupload, $config->allowimageregupload);
}

if ($config->allowfileupload >= 0) {
$config->file_upload = 'nobody';
if ($config->allowfileregupload == 1) {
$config->file_upload = 'registered';
if (isset($config->allowfileupload)) {
$config->set('file_upload', 'nobody');
if ($config->get('allowfileregupload') == 1) {
$config->set('file_upload', 'registered');
}
if ($config->allowfileupload == 1) {
$config->file_upload = 'everybody';
if ($config->get('allowfileupload') == 1) {
$config->set('file_upload', 'everybody');
}
$config->allowfileupload = $config->allowfileregupload = -1;
unset($config->allowfileupload, $config->allowfileregupload);
}

if (isset($config->fbsessiontimeout)) {
$config->set('sessiontimeout', $config->get('fbsessiontimeout', 1800));
unset($config->fbsessiontimeout);
}
if (isset($config->fbdefaultpage)) {
$config->set('defaultpage', $config->get('fbdefaultpage', 'recent'));
unset($config->fbdefaultpage);
}

// Save configuration
$config->save ();

return array ('action' => '', 'name' => JText::_ ( 'COM_KUNENA_INSTALL_200_CONFIGURATION' ), 'success' => true );
}
}
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/

This file was deleted.

@@ -3,23 +3,14 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
defined ( '_JEXEC' ) or die ();

class KunenaVersion
{
/**
* Contructor
*
* @since 1.6
*/
public function __construct()
{
}

/**
* Get warning for unstable releases
*
@@ -32,6 +23,9 @@ public function getVersionWarning($msg='COM_KUNENA_VERSION_WARNING')
if (strpos(KunenaForum::version(), 'GIT') !== false) {
$kn_version_type = JText::_('COM_KUNENA_VERSION_GIT');
$kn_version_warning = JText::_('COM_KUNENA_VERSION_GIT_WARNING');
} else if (strpos(KunenaForum::version(), 'DEV') !== false) {
$kn_version_type = JText::_('COM_KUNENA_VERSION_DEV');
$kn_version_warning = JText::_('COM_KUNENA_VERSION_DEV_WARNING');
} else if (strpos(KunenaForum::version(), 'RC') !== false) {
$kn_version_type = JText::_('COM_KUNENA_VERSION_RC');
$kn_version_warning = JText::_('COM_KUNENA_VERSION_RC_WARNING');
@@ -41,9 +35,6 @@ public function getVersionWarning($msg='COM_KUNENA_VERSION_WARNING')
} else if (strpos(KunenaForum::version(), 'ALPHA') !== false) {
$kn_version_type = JText::_('COM_KUNENA_VERSION_ALPHA');
$kn_version_warning = JText::_('COM_KUNENA_VERSION_ALPHA_WARNING');
} else if (strpos(KunenaForum::version(), 'DEV') !== false) {
$kn_version_type = JText::_('COM_KUNENA_VERSION_DEV');
$kn_version_warning = JText::_('COM_KUNENA_VERSION_DEV_WARNING');
}
if (!empty($kn_version_warning))
{
@@ -98,11 +89,11 @@ static function getVersionHTML()
/**
* Retrieve copyright information as string.
*
* @return string "© 2008-2011 Copyright: Kunena Team. All rights reserved. | License: GNU General Public License"
* @return string "© 2008 - 2012 Copyright: Kunena Team. All rights reserved. | License: GNU General Public License"
*/
static function getCopyrightHTML()
{
return ': &copy; 2008-2012 '.JText::_('COM_KUNENA_VERSION_COPYRIGHT').': <a href = "http://www.kunena.org" target = "_blank">'
return ': &copy; 2008 - 2012 '.JText::_('COM_KUNENA_VERSION_COPYRIGHT').': <a href = "http://www.kunena.org" target = "_blank">'
.JText::_('COM_KUNENA_VERSION_TEAM').'</a> | '.JText::_('COM_KUNENA_VERSION_LICENSE')
.': <a href = "http://www.gnu.org/copyleft/gpl.html" target = "_blank">'
.JText::_('COM_KUNENA_VERSION_GPL').'</a>';
@@ -111,7 +102,7 @@ static function getCopyrightHTML()
/**
* Retrieve installed Kunena version, copyright and license as string.
*
* @return string "Kunena X.Y.Z | YYYY-MM-DD | © 2008-2011 Copyright: Kunena Team. All rights reserved. | License: GNU General Public License"
* @return string "Kunena X.Y.Z | YYYY-MM-DD | © 2008 - 2012 Copyright: Kunena Team. All rights reserved. | License: GNU General Public License"
*/
static function getLongVersionHTML()
{
@@ -3,7 +3,7 @@
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2011 Kunena Team. All rights reserved.
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
@@ -36,19 +36,19 @@ public function display($tpl = null)
$user = JFactory::getUser();

// Load the view data.
$this->assign('model', $this->get('Model'));
$this->assignRef('state', $this->get('State'));
$this->assign('step', $this->get('Step'));
$this->assignRef('steps', $this->get('Steps'));
$this->assignRef('status', $this->get('Status'));
$this->model = $this->get('Model');
$this->state = $this->get('State');
$this->step = $this->get('Step');
$this->steps = $this->get('Steps');
$this->status = $this->get('Status');

$this->assign('error', $this->get('Error'));
$this->assignRef('requirements', $this->get('Requirements'));
$this->assign('versions', $this->get('DetectVersions'));
$this->error = $this->get('Error');
$this->requirements = $this->get('Requirements');
$this->versions = $this->get('DetectVersions');

require_once(KPATH_ADMIN.'/install/version.php');
$version = new KunenaVersion();
$this->assignRef('versionWarning', $version->getVersionWarning('COM_KUNENA_INSTALL_WARNING'));
$this->versionWarning = $version->getVersionWarning('COM_KUNENA_INSTALL_WARNING');

// Render the layout.
$app = JFactory::getApplication();
@@ -58,7 +58,7 @@ public function display($tpl = null)
else if (!empty($this->versionWarning)) $app->enqueueMessage($this->versionWarning, 'notice');
JRequest::setVar('hidemainmenu', 1);

$this->assign('go', JRequest::getCmd('go', ''));
$this->go = JRequest::getCmd('go', '');

$session = JFactory::getSession();
$this->cnt = $session->get('kunena.reload', 1);
@@ -2,7 +2,7 @@
<!DOCTYPE install>
<install type="component" version="1.5.0" method="upgrade">
<name>Kunena</name>
<version>2.0.0-BETA2-DEV</version>
<version>2.0.0-BETA2-DEV2</version>
<versionname>Internal</versionname>
<creationDate>@kunenaversiondate@</creationDate>
<author>Kunena Team</author>
@@ -6,37 +6,35 @@ This file contains all the languages which are currently available for Kunena Fo
We recommend that you install the most recent language package every time you have upgraded Kunena.

Kunena distribution package itself includes translations for installation, which will be used during installation process.

You can find the most recent language list from here:
http://www.kunena.org/download

Installing languages in Joomla! 2.5
===================================

Just install this package by using Joomla installer. All the available languages will be updated during the installation process.
Just install this package by using Joomla installer.

Installer will detect which languages have been installed into your system. It will install or update only existing languages,
so If you add new languages after installing this package, you will need to install this language pack again.

Recommended way for Joomla! 2.5 is to have all language files inside the extension folders. This installer does just that,
but it also removes all the old Kunena language files from /language and /administrator/language folders.
Every language will be installed separately to allow you to uninstall them one by one if needed. You can find the language
packages by going to "Extension Manager: Manage", selecting type File and filtering results by "Kunena Language".

WARNING: Do not attempt to install the language archive files by hand! They are Joomla! 1.5 installer files.
Installing those files in Joomla! 2.5 has some side effects, which may cause you to accidentally uninstall the whole language.
If you have already installed Kunena language files by hand, you can fix the issue by installing your Joomla! core language again.
Additionally extension manager will have a package called "Kunena Language Pack". Uninstalling this package will also uninstall
all the languages that were added during installation.

Installing languages in Joomla! 1.5
===================================

In Joomla! 1.5 you have to extract the files from the archive and install them one by one.

For each language, there are two files that you need to install. For example, the files for the English language packs are:

language/com_kunena.en_GB.admin_v@kunenaversion@.zip
language/com_kunena.en_GB.site_v@kunenaversion@.zip

Using the standard Joomla installation procedure:
For each language, there is a file that you need to install. Language packs are named by the language tag. For example Finnish language
file can be found by looking for:

Install the "admin" (backend) file
Install the "site" (frontend) file
language/com_kunena.fi-FI.v@kunenaversion@.zip

The first file contains the language strings for the administrator (backend) and the second file contains the language strings for the frontend.
Just install the file by using the standard Joomla installation procedure.

Translating languages
=====================
File renamed without changes.
@@ -0,0 +1,76 @@
<?php
/**
* Kunena Component
* @package Kunena.Installer
*
* @copyright (C) 2008 - 2012 Kunena Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
* @link http://www.kunena.org
**/
defined( '_JEXEC' ) or die();

class pkg_kunena_languagesInstallerScript {

public function uninstall($parent) {
// Remove languages.
$languages = JFactory::getLanguage()->getKnownLanguages();
foreach ($languages as $language) {
echo $this->uninstallLanguage($language['tag'], $language['name']);
}
}

public function preflight($type, $parent) {
if (!in_array($type, array('install', 'update'))) return true;

$app = JFactory::getApplication();

// Do not install if Kunena doesn't exist.
if (!class_exists('KunenaForum') || !KunenaForum::isCompatible('2.0')) {
$app->enqueueMessage(sprintf ( 'Kunena %s has not been installed, aborting!', '2.0' ), 'notice');
return false;
}
if (KunenaForum::isDev()) {
$app->enqueueMessage(sprintf ( 'You have installed Kunena from GitHub, aborting!' ), 'notice');
return false;
}

// Get list of languages to be installed.
$source = $parent->getParent()->getPath('source').'/language';
$languages = JFactory::getLanguage()->getKnownLanguages();
$files = $parent->manifest->files;
foreach ($languages as $language) {
$name = "com_kunena_{$language['tag']}";
$search = JFolder::files($source, $name);
if (empty($search)) continue;
// Generate <file type="file" client="site" id="fi-FI">com_kunena_fi-FI_v2.0.0-BETA2-DEV2.zip</file>
$file = $files->addChild('file', array_pop($search));
$file->addAttribute('type', 'file');
$file->addAttribute('client', 'site');
$file->addAttribute('id', $name);
echo sprintf('Installing language %s - %s ...', $language['tag'], $language['name']) . '<br />';
}
if (empty($files)) {
$app->enqueueMessage(sprintf ( 'Your site is English only. There\'s no need to install Kunena language pack.' ), 'notice');
return false;
}

// Remove old K1.7 style language pack.
$table = JTable::getInstance('extension');
$id = $table->find(array('type'=>'file', 'element'=>"kunena_language_pack"));
if ($id) {
$installer = new JInstaller();
$installer->uninstall ( 'file', $id );
}

return true;
}

public function uninstallLanguage($tag, $name) {
$table = JTable::getInstance('extension');
$id = $table->find(array('type'=>'file', 'element'=>"com_kunena_{$tag}"));
if (!$id) return;

$installer = new JInstaller();
$installer->uninstall ( 'file', $id );
}
}
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
<extension type="file" version="2.5" method="upgrade">
<name>Kunena Language - Arabic</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
<build>@kunenaversionbuild@</build>
<author>Kunena Team</author>
<authorEmail>translations@kunena.org</authorEmail>
<authorUrl>https://www.transifex.net/projects/p/Kunena/team/ar/</authorUrl>
<copyright>(C) 2008 - 2012 Kunena Team. All rights reserved.</copyright>
<license>GNU/GPL</license>
<description>Arabic language file for Kunena Forum Component</description>

<fileset>
<files folder="admin" target="administrator/language/ar-AA">
<filename>ar-AA.com_kunena.controllers.ini</filename>
<filename>ar-AA.com_kunena.ini</filename>
<filename>ar-AA.com_kunena.libraries.ini</filename>
<filename>ar-AA.com_kunena.menu.ini</filename>
<filename>ar-AA.com_kunena.models.ini</filename>
<filename>ar-AA.com_kunena.sys.ini</filename>
<filename>ar-AA.com_kunena.views.ini</filename>
<filename>ar-AA.plg_kunena_alphauserpoints.sys.ini</filename>
<filename>ar-AA.plg_kunena_community.sys.ini</filename>
<filename>ar-AA.plg_kunena_comprofiler.sys.ini</filename>
<filename>ar-AA.plg_kunena_gravatar.sys.ini</filename>
<filename>ar-AA.plg_kunena_joomla.sys.ini</filename>
<filename>ar-AA.plg_kunena_kunena.sys.ini</filename>
<filename>ar-AA.plg_kunena_uddeim.sys.ini</filename>
<filename>ar-AA.plg_system_kunena.sys.ini</filename>
</files>
<files folder="site" target="language/ar-AA">
<filename>ar-AA.com_kunena.controllers.ini</filename>
<filename>ar-AA.com_kunena.ini</filename>
<filename>ar-AA.com_kunena.models.ini</filename>
<filename>ar-AA.com_kunena.templates.ini</filename>
<filename>ar-AA.com_kunena.tpl_blue_eagle.ini</filename>
<filename>ar-AA.com_kunena.tpl_mirage.ini</filename>
<filename>ar-AA.com_kunena.views.ini</filename>
</files>
</fileset>
</extension>
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
<extension type="file" version="2.5" method="upgrade">
<name>Kunena Language - Azerbaijani (Azerbaijan)</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
<build>@kunenaversionbuild@</build>
<author>Kunena Team</author>
<authorEmail>translations@kunena.org</authorEmail>
<authorUrl>https://www.transifex.net/projects/p/Kunena/team/az_AZ/</authorUrl>
<copyright>(C) 2008 - 2012 Kunena Team. All rights reserved.</copyright>
<license>GNU/GPL</license>
<description>Azerbaijani (Azerbaijan) language file for Kunena Forum Component</description>

<fileset>
<files folder="admin" target="administrator/language/az-AZ">
<filename>az-AZ.com_kunena.controllers.ini</filename>
<filename>az-AZ.com_kunena.ini</filename>
<filename>az-AZ.com_kunena.libraries.ini</filename>
<filename>az-AZ.com_kunena.menu.ini</filename>
<filename>az-AZ.com_kunena.models.ini</filename>
<filename>az-AZ.com_kunena.sys.ini</filename>
<filename>az-AZ.com_kunena.views.ini</filename>
<filename>az-AZ.plg_kunena_alphauserpoints.sys.ini</filename>
<filename>az-AZ.plg_kunena_community.sys.ini</filename>
<filename>az-AZ.plg_kunena_comprofiler.sys.ini</filename>
<filename>az-AZ.plg_kunena_gravatar.sys.ini</filename>
<filename>az-AZ.plg_kunena_joomla.sys.ini</filename>
<filename>az-AZ.plg_kunena_kunena.sys.ini</filename>
<filename>az-AZ.plg_kunena_uddeim.sys.ini</filename>
<filename>az-AZ.plg_system_kunena.sys.ini</filename>
</files>
<files folder="site" target="language/az-AZ">
<filename>az-AZ.com_kunena.controllers.ini</filename>
<filename>az-AZ.com_kunena.ini</filename>
<filename>az-AZ.com_kunena.models.ini</filename>
<filename>az-AZ.com_kunena.templates.ini</filename>
<filename>az-AZ.com_kunena.tpl_blue_eagle.ini</filename>
<filename>az-AZ.com_kunena.tpl_mirage.ini</filename>
<filename>az-AZ.com_kunena.views.ini</filename>
</files>
</fileset>
</extension>
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
<extension type="file" version="2.5" method="upgrade">
<name>Kunena Language - Bulgarian (Bulgaria)</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
<build>@kunenaversionbuild@</build>
<author>Kunena Team</author>
<authorEmail>translations@kunena.org</authorEmail>
<authorUrl>https://www.transifex.net/projects/p/Kunena/team/bg_BG/</authorUrl>
<copyright>(C) 2008 - 2012 Kunena Team. All rights reserved.</copyright>
<license>GNU/GPL</license>
<description>Bulgarian (Bulgaria) language file for Kunena Forum Component</description>

<fileset>
<files folder="admin" target="administrator/language/bg-BG">
<filename>bg-BG.com_kunena.controllers.ini</filename>
<filename>bg-BG.com_kunena.ini</filename>
<filename>bg-BG.com_kunena.libraries.ini</filename>
<filename>bg-BG.com_kunena.menu.ini</filename>
<filename>bg-BG.com_kunena.models.ini</filename>
<filename>bg-BG.com_kunena.sys.ini</filename>
<filename>bg-BG.com_kunena.views.ini</filename>
<filename>bg-BG.plg_kunena_alphauserpoints.sys.ini</filename>
<filename>bg-BG.plg_kunena_community.sys.ini</filename>
<filename>bg-BG.plg_kunena_comprofiler.sys.ini</filename>
<filename>bg-BG.plg_kunena_gravatar.sys.ini</filename>
<filename>bg-BG.plg_kunena_joomla.sys.ini</filename>
<filename>bg-BG.plg_kunena_kunena.sys.ini</filename>
<filename>bg-BG.plg_kunena_uddeim.sys.ini</filename>
<filename>bg-BG.plg_system_kunena.sys.ini</filename>
</files>
<files folder="site" target="language/bg-BG">
<filename>bg-BG.com_kunena.controllers.ini</filename>
<filename>bg-BG.com_kunena.ini</filename>
<filename>bg-BG.com_kunena.models.ini</filename>
<filename>bg-BG.com_kunena.templates.ini</filename>
<filename>bg-BG.com_kunena.tpl_blue_eagle.ini</filename>
<filename>bg-BG.com_kunena.tpl_mirage.ini</filename>
<filename>bg-BG.com_kunena.views.ini</filename>
</files>
</fileset>
</extension>
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
<extension type="file" version="2.5" method="upgrade">
<name>Kunena Language - Bosnian (Bosnia and Herzegovina)</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
<build>@kunenaversionbuild@</build>
<author>Kunena Team</author>
<authorEmail>translations@kunena.org</authorEmail>
<authorUrl>https://www.transifex.net/projects/p/Kunena/team/bs_BA/</authorUrl>
<copyright>(C) 2008 - 2012 Kunena Team. All rights reserved.</copyright>
<license>GNU/GPL</license>
<description>Bosnian (Bosnia and Herzegovina) language file for Kunena Forum Component</description>

<fileset>
<files folder="admin" target="administrator/language/bs-BA">
<filename>bs-BA.com_kunena.controllers.ini</filename>
<filename>bs-BA.com_kunena.ini</filename>
<filename>bs-BA.com_kunena.extension.ini</filename>
<filename>bs-BA.com_kunena.menu.ini</filename>
<filename>bs-BA.com_kunena.models.ini</filename>
<filename>bs-BA.com_kunena.sys.ini</filename>
<filename>bs-BA.com_kunena.views.ini</filename>
<filename>bs-BA.plg_kunena_alphauserpoints.sys.ini</filename>
<filename>bs-BA.plg_kunena_community.sys.ini</filename>
<filename>bs-BA.plg_kunena_comprofiler.sys.ini</filename>
<filename>bs-BA.plg_kunena_gravatar.sys.ini</filename>
<filename>bs-BA.plg_kunena_joomla.sys.ini</filename>
<filename>bs-BA.plg_kunena_kunena.sys.ini</filename>
<filename>bs-BA.plg_kunena_uddeim.sys.ini</filename>
<filename>bs-BA.plg_system_kunena.sys.ini</filename>
</files>
<files folder="site" target="language/bs-BA">
<filename>bs-BA.com_kunena.controllers.ini</filename>
<filename>bs-BA.com_kunena.ini</filename>
<filename>bs-BA.com_kunena.models.ini</filename>
<filename>bs-BA.com_kunena.templates.ini</filename>
<filename>bs-BA.com_kunena.tpl_blue_eagle.ini</filename>
<filename>bs-BA.com_kunena.tpl_mirage.ini</filename>
<filename>bs-BA.com_kunena.views.ini</filename>
</files>
</fileset>
</extension>
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
<extension type="file" version="2.5" method="upgrade">
<name>Kunena Language - Catalan (Spain)</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
<build>@kunenaversionbuild@</build>
<author>Kunena Team</author>
<authorEmail>translations@kunena.org</authorEmail>
<authorUrl>https://www.transifex.net/projects/p/Kunena/team/ca_ES/</authorUrl>
<copyright>(C) 2008 - 2012 Kunena Team. All rights reserved.</copyright>
<license>GNU/GPL</license>
<description>Catalan (Spain) language file for Kunena Forum Component</description>

<fileset>
<files folder="admin" target="administrator/language/ca-ES">
<filename>ca-ES.com_kunena.controllers.ini</filename>
<filename>ca-ES.com_kunena.ini</filename>
<filename>ca-ES.com_kunena.libraries.ini</filename>
<filename>ca-ES.com_kunena.menu.ini</filename>
<filename>ca-ES.com_kunena.models.ini</filename>
<filename>ca-ES.com_kunena.sys.ini</filename>
<filename>ca-ES.com_kunena.views.ini</filename>
<filename>ca-ES.plg_kunena_alphauserpoints.sys.ini</filename>
<filename>ca-ES.plg_kunena_community.sys.ini</filename>
<filename>ca-ES.plg_kunena_comprofiler.sys.ini</filename>
<filename>ca-ES.plg_kunena_gravatar.sys.ini</filename>
<filename>ca-ES.plg_kunena_joomla.sys.ini</filename>
<filename>ca-ES.plg_kunena_kunena.sys.ini</filename>
<filename>ca-ES.plg_kunena_uddeim.sys.ini</filename>
<filename>ca-ES.plg_system_kunena.sys.ini</filename>
</files>
<files folder="site" target="language/ca-ES">
<filename>ca-ES.com_kunena.controllers.ini</filename>
<filename>ca-ES.com_kunena.ini</filename>
<filename>ca-ES.com_kunena.models.ini</filename>
<filename>ca-ES.com_kunena.templates.ini</filename>
<filename>ca-ES.com_kunena.tpl_blue_eagle.ini</filename>
<filename>ca-ES.com_kunena.tpl_mirage.ini</filename>
<filename>ca-ES.com_kunena.views.ini</filename>
</files>
</fileset>
</extension>
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
<extension type="file" version="2.5" method="upgrade">
<name>Kunena Language - Czech (Czech Republic)</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
<build>@kunenaversionbuild@</build>
<author>Kunena Team</author>
<authorEmail>translations@kunena.org</authorEmail>
<authorUrl>https://www.transifex.net/projects/p/Kunena/team/cs_CZ/</authorUrl>
<copyright>(C) 2008 - 2012 Kunena Team. All rights reserved.</copyright>
<license>GNU/GPL</license>
<description>Czech (Czech Republic) language file for Kunena Forum Component</description>

<fileset>
<files folder="admin" target="administrator/language/cs-CZ">
<filename>cs-CZ.com_kunena.controllers.ini</filename>
<filename>cs-CZ.com_kunena.ini</filename>
<filename>cs-CZ.com_kunena.libraries.ini</filename>
<filename>cs-CZ.com_kunena.menu.ini</filename>
<filename>cs-CZ.com_kunena.models.ini</filename>
<filename>cs-CZ.com_kunena.sys.ini</filename>
<filename>cs-CZ.com_kunena.views.ini</filename>
<filename>cs-CZ.plg_kunena_alphauserpoints.sys.ini</filename>
<filename>cs-CZ.plg_kunena_community.sys.ini</filename>
<filename>cs-CZ.plg_kunena_comprofiler.sys.ini</filename>
<filename>cs-CZ.plg_kunena_gravatar.sys.ini</filename>
<filename>cs-CZ.plg_kunena_joomla.sys.ini</filename>
<filename>cs-CZ.plg_kunena_kunena.sys.ini</filename>
<filename>cs-CZ.plg_kunena_uddeim.sys.ini</filename>
<filename>cs-CZ.plg_system_kunena.sys.ini</filename>
</files>
<files folder="site" target="language/cs-CZ">
<filename>cs-CZ.com_kunena.controllers.ini</filename>
<filename>cs-CZ.com_kunena.ini</filename>
<filename>cs-CZ.com_kunena.models.ini</filename>
<filename>cs-CZ.com_kunena.templates.ini</filename>
<filename>cs-CZ.com_kunena.tpl_blue_eagle.ini</filename>
<filename>cs-CZ.com_kunena.tpl_mirage.ini</filename>
<filename>cs-CZ.com_kunena.views.ini</filename>
</files>
</fileset>
</extension>