Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
...
  • 15 commits
  • 43 files changed
  • 0 commit comments
  • 1 contributor
Showing with 240 additions and 184 deletions.
  1. +3 −4 README.md
  2. +5 −0 administrator/components/com_kunena/install/data/sampledata.php
  3. +3 −1 administrator/components/com_kunena/install/install.kunena.php
  4. +11 −6 administrator/components/com_kunena/install/install.script.php
  5. +73 −80 administrator/components/com_kunena/install/{j16upgrade.php → j25upgrade.php}
  6. +1 −1 administrator/components/com_kunena/install/{j16upgrade.xml → j25upgrade.xml}
  7. +6 −6 administrator/components/com_kunena/install/kunena.install.upgrade.xml
  8. +35 −22 administrator/components/com_kunena/install/model.php
  9. +1 −1 ...strator/components/com_kunena/install/plugins/plg_finder_kunena/{kunena.j16.xml → kunena.j25.xml}
  10. +1 −1 ...na/install/plugins/plg_kunena_alphauserpoints/{alphauserpoints.j16.xml → alphauserpoints.j25.xml}
  11. +1 −1 ...omponents/com_kunena/install/plugins/plg_kunena_community/{community.j16.xml → community.j25.xml}
  12. +1 −1 ...nts/com_kunena/install/plugins/plg_kunena_comprofiler/{comprofiler.j16.xml → comprofiler.j25.xml}
  13. +1 −1 ...r/components/com_kunena/install/plugins/plg_kunena_gravatar/{gravatar.j16.xml → gravatar.j25.xml}
  14. +3 −3 ...ator/components/com_kunena/install/plugins/{plg_kunena_joomla16 → plg_kunena_joomla25}/access.php
  15. 0 ...onents/com_kunena/install/plugins/{plg_kunena_joomla16/language → plg_kunena_joomla25}/index.html
  16. +1 −1 ..._kunena/install/plugins/{plg_kunena_joomla16/joomla.j16.xml → plg_kunena_joomla25/joomla.j25.xml}
  17. 0 ...ator/components/com_kunena/install/plugins/{plg_kunena_joomla16 → plg_kunena_joomla25}/joomla.php
  18. 0 ...onents/com_kunena/install/plugins/{plg_kunena_joomla16 → plg_kunena_joomla25/language}/index.html
  19. 0 ...rator/components/com_kunena/install/plugins/{plg_kunena_joomla16 → plg_kunena_joomla25}/login.php
  20. +1 −1 ...strator/components/com_kunena/install/plugins/plg_kunena_kunena/{kunena.j16.xml → kunena.j25.xml}
  21. +1 −1 ...strator/components/com_kunena/install/plugins/plg_kunena_uddeim/{uddeim.j16.xml → uddeim.j25.xml}
  22. +1 −1 ...strator/components/com_kunena/install/plugins/plg_system_kunena/{kunena.j16.xml → kunena.j25.xml}
  23. +1 −1 administrator/components/com_kunena/install/upgrade/upgrade-2.0.0_menu.php
  24. +1 −1 administrator/components/com_kunena/{kunena.j16.xml → kunena.j25.xml}
  25. +2 −2 administrator/components/com_kunena/kunena.xml
  26. +3 −3 administrator/components/com_kunena/language/en-GB/en-GB.com_kunena.ini
  27. +3 −3 administrator/components/com_kunena/language/en-GB/en-GB.plg_kunena_joomla.sys.ini
  28. +5 −1 administrator/components/com_kunena/libraries/access.php
  29. +5 −5 administrator/components/com_kunena/libraries/forum/category/category.php
  30. +2 −1 administrator/components/com_kunena/libraries/forum/category/helper.php
  31. +2 −1 administrator/components/com_kunena/libraries/menu/fix.php
  32. +8 −4 administrator/components/com_kunena/libraries/menu/helper.php
  33. +8 −4 administrator/components/com_kunena/libraries/route/route.php
  34. +1 −1 administrator/components/com_kunena/views/categories/tmpl/edit.php
  35. +3 −0 administrator/components/com_kunena/views/categories/view.html.php
  36. +1 −1 administrator/components/com_kunena/views/common/tmpl/menu.php
  37. +4 −2 administrator/components/com_kunena/views/cpanel/tmpl/default.php
  38. +1 −1 build/build.xml
  39. +1 −1 components/com_kunena/template/blue_eagle/html/category/default_row.php
  40. +8 −4 components/com_kunena/views/category/view.html.php
  41. +17 −8 components/com_kunena/views/common/view.html.php
  42. +7 −4 components/com_kunena/views/topic/view.html.php
  43. +8 −4 components/com_kunena/views/topics/view.html.php
View
7 README.md
@@ -13,8 +13,7 @@
*Kunena* 2.0 requires (this section is work in progress until Kunena 2.0 has been released)
Joomla! 1.5: version 1.5.25 or greater (>= 1.5.26 recommended)
- Joomla! 1.7: version 1.7.3 or greater (>= 2.5.0 recommended)
- Joomla! 2.5: version 2.5.0 or greater
+ Joomla! 2.5: version 2.5.3 or greater (>= 2.5.4 recommended)
PHP: version 5.2.4 or greater (>= 5.3.6 recommended)
MySQL: version 5.0.4 or greater (>= 5.1 recommended)
@@ -30,8 +29,8 @@ In addition we recommend the following PHP settings:
*Kunena* requires the following Joomla settings:
- * Mootools 1.2 or 1.3 compatible template
- * Upgraded to latest versions all extensions that claim to integrate with Kunena 1.6
+ * Mootools 1.2 or 1.4 compatible template
+ * Upgraded to latest versions all extensions that claim to integrate with Kunena 2.0
* No plugins or modules that were developed for previous versions of Kunena or Fireboard
View
5 administrator/components/com_kunena/install/data/sampledata.php
@@ -19,6 +19,9 @@ function _($string) {
function installSampleData()
{
+ $lang = JFactory::getLanguage();
+ $debug = $lang->setDebug(false);
+
jimport ( 'joomla.utilities.date' );
$db = JFactory::getDBO();
@@ -207,5 +210,7 @@ function installSampleData()
$counter++;
}
}
+
+ $lang->setDebug($debug);
return $counter;
}
View
4 administrator/components/com_kunena/install/install.kunena.php
@@ -31,9 +31,11 @@ function com_install() {
$installer = new KunenaModelInstall();
$installer->install();
- // Remove deprecated manifest.xml (K1.5)
+ // Remove deprecated manifest.xml (K1.5) and kunena.j16.xml (K1.7)
$manifest = JPATH_ADMINISTRATOR . '/components/com_kunena/manifest.xml';
if (JFile::exists($manifest)) JFile::delete($manifest);
+ $manifest = JPATH_ADMINISTRATOR . '/components/com_kunena/kunena.j16.xml';
+ if (JFile::exists($manifest)) JFile::delete($manifest);
// Redirect to Kunena Installer
$redirect_url = JURI::base () . 'index.php?option=com_kunena&view=install';
View
17 administrator/components/com_kunena/install/install.script.php
@@ -21,8 +21,7 @@ class Com_KunenaInstallerScript {
'5.0' => '5.0.4',
),
'Joomla' => array (
- '2.5' => '2.5',
- '1.7' => '1.7.3',
+ '2.5' => '2.5.3',
)
);
protected $extensions = array ('dom', 'gd', 'json', 'pcre', 'SimpleXML');
@@ -60,6 +59,12 @@ public function preflight($type, $parent) {
return false;
}
+ // Remove deprecated manifest.xml (K1.5) and kunena.j16.xml (K1.7)
+ $manifest = JPATH_ADMINISTRATOR . '/components/com_kunena/manifest.xml';
+ if (JFile::exists($manifest)) JFile::delete($manifest);
+ $manifest = JPATH_ADMINISTRATOR . '/components/com_kunena/kunena.j16.xml';
+ if (JFile::exists($manifest)) JFile::delete($manifest);
+
// TODO: Before install: we want so store files so that user can cancel action
$adminpath = KPATH_ADMIN;
@@ -77,12 +82,12 @@ public function preflight($type, $parent) {
public function postflight($type, $parent) {
$installer = $parent->getParent();
-
- // Rename kunena.j16.xml to kunena.xml
$adminpath = KPATH_ADMIN;
- if (JFile::exists("{$adminpath}/kunena.j16.xml")) {
+
+ // Rename kunena.j25.xml to kunena.xml
+ if (JFile::exists("{$adminpath}/kunena.j25.xml")) {
if ( JFile::exists("{$adminpath}/kunena.xml")) JFile::delete("{$adminpath}/kunena.xml");
- JFile::move("{$adminpath}/kunena.j16.xml", "{$adminpath}/kunena.xml");
+ JFile::move("{$adminpath}/kunena.j25.xml", "{$adminpath}/kunena.xml");
}
// Set redirect
View
153 ...ponents/com_kunena/install/j16upgrade.php → ...ponents/com_kunena/install/j25upgrade.php
@@ -3,31 +3,25 @@
* 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 ();
-if (file_exists(JPATH_SITE.'/includes/version.php')) require_once JPATH_SITE.'/includes/version.php';
-
/**
- * Kunena 1.6 migration class from Joomla 1.5 to Joomla 1.6
- *
- * You can also put this class into your own extension, which makes jUpgrade to use your own copy instead of this adapter class.
- * In order to do that you should have j16upgrade.xml file somewhere in your extension path containing:
- * <jupgrade>
- * <!-- Adapter class location and name -->
- * <installer>
- * <file>administrator/components/com_kunena/install/j16upgrade.php</file>
- * <class>jUpgradeComponentKunena</class>
- * </installer>
- * </jupgrade>
- * For more information, see ./j16upgrade.xml
+ * Kunena 2.0 jUpgrade migration class from Joomla! 1.5 to Joomla! 2.5
*
- * @since 1.6.4
*/
-class jUpgradeComponentKunena extends jUpgrade {
+class jUpgradeComponentKunena extends jUpgradeExtensions {
+
+ public function __construct($step = null) {
+ // Joomla 2.5 support
+ if (file_exists(JPATH_LIBRARIES.'/cms/version/version.php')) require_once JPATH_LIBRARIES.'/cms/version/version.php';
+
+ parent::__construct($step);
+ }
+
/**
* Check if Kunena migration is supported.
*
@@ -35,9 +29,8 @@ class jUpgradeComponentKunena extends jUpgrade {
* @since 1.6.4
*/
protected function detectExtension() {
- $this->api = JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
- // Support only JUpgrade 1.2.2+
- return method_exists($this, 'mapUserGroup');
+ // Install Kunena 2.0 only into Joomla 2.5
+ return version_compare(JVERSION, '2.5', '>=');
}
/**
@@ -47,7 +40,7 @@ protected function detectExtension() {
* @since 1.6.4
*/
protected function getCopyTables() {
- require_once $this->api;
+ require_once JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
require_once KPATH_ADMIN . '/install/schema.php';
$schema = new KunenaModelSchema();
$tables = $schema->getSchemaTables('');
@@ -55,6 +48,59 @@ protected function getCopyTables() {
}
/**
+ * Copy kunena_categories table from old site to new site.
+ *
+ * You can create custom copy functions for all your tables.
+ *
+ * If you want to copy your table in many smaller chunks,
+ * please store your custom state variables into $this->state and return false.
+ * Returning false will force jUpgrade to call this function again,
+ * which allows you to continue import by reading $this->state before continuing.
+ *
+ * @return boolean Ready (true/false)
+ * @since 1.6.4
+ * @throws Exception
+ */
+ protected function copyTable_kunena_categories($table) {
+ $this->source = $this->destination = "#__{$table}";
+
+ // Clone table
+ $this->cloneTable($this->source, $this->destination);
+
+ // Get data
+ $rows = parent::getSourceData('*');
+
+ // Do some custom post processing on the list.
+ foreach ($rows as &$row) {
+ if (!isset($row['accesstype']) || $row['accesstype'] == 'none' ) {
+ if ($row['admin_access'] != 0) {
+ $row['admin_access'] = $this->mapUserGroup($row['admin_access']);
+ }
+ if ($row['pub_access'] == -1) {
+ // All registered
+ $row['pub_access'] = 2;
+ $row['pub_recurse'] = 1;
+ } elseif ($row['pub_access'] == 0) {
+ // Everybody
+ $row['pub_access'] = 1;
+ $row['pub_recurse'] = 1;
+ } elseif ($row['pub_access'] == 1) {
+ // Nobody
+ $row['pub_access'] = 8;
+ } else {
+ // User groups
+ $row['pub_access'] = $this->mapUserGroup($row['pub_access']);
+ }
+ } elseif ($row['accesstype'] == 'joomla.level') {
+ // Convert Joomla access levels
+ $row['access']++;
+ }
+ }
+ $this->setDestinationData($rows);
+ return true;
+ }
+
+ /**
* Migrate custom information.
*
* This function gets called after all folders and tables have been copied.
@@ -69,7 +115,7 @@ protected function getCopyTables() {
* @throws Exception
*/
protected function migrateExtensionCustom() {
- require_once $this->api;
+ require_once JPATH_ADMINISTRATOR . '/components/com_kunena/api.php';
// Need to initialize application
jimport ('joomla.environment.uri');
@@ -142,18 +188,18 @@ protected function migrateExtensionCustom() {
if (!$success) echo "ERROR";
}
}
- // Replace Joomla! 1.5 manifest file with Joomla! 1.6+ version
+ // Replace Joomla! 1.5 manifest file with Joomla! 2.5 version
jimport('joomla.filesystem.file');
- $manifest16 = JPATH_ADMINISTRATOR.'/components/com_kunena/kunena.j16.xml';
+ $manifest25 = JPATH_ADMINISTRATOR.'/components/com_kunena/kunena.j25.xml';
$manifest15 = JPATH_ADMINISTRATOR.'/components/com_kunena/kunena.xml';
- if (file_exists($manifest16)) {
- $content = file_get_contents($manifest16);
+ if (file_exists($manifest25)) {
+ $content = file_get_contents($manifest25);
// Take care of SVN install
$content = preg_replace('/@kunenaversion@/', preg_replace('/-SVN/i', '', KunenaForum::version()), $content);
$content = preg_replace('/@kunenaversiondate@/', KunenaForum::versionDate(), $content);
$content = preg_replace('/@kunenaversionname@/', KunenaForum::versionName(), $content);
JFile::write($manifest15, $content);
- JFile::delete($manifest16);
+ JFile::delete($manifest25);
}
jimport('joomla.plugin.helper');
@@ -175,57 +221,4 @@ protected function migrateExtensionCustom() {
return true;
}
-
- /**
- * Copy kunena_categories table from old site to new site.
- *
- * You can create custom copy functions for all your tables.
- *
- * If you want to copy your table in many smaller chunks,
- * please store your custom state variables into $this->state and return false.
- * Returning false will force jUpgrade to call this function again,
- * which allows you to continue import by reading $this->state before continuing.
- *
- * @return boolean Ready (true/false)
- * @since 1.6.4
- * @throws Exception
- */
- protected function copyTable_kunena_categories($table) {
- $this->source = $this->destination = "#__{$table}";
-
- // Clone table
- $this->cloneTable($this->source, $this->destination);
-
- // Get data
- $rows = parent::getSourceData('*');
-
- // Do some custom post processing on the list.
- foreach ($rows as &$row) {
- if (isset($row['accesstype']) || $row['accesstype'] == 'none' ) {
- if ($row['admin_access'] != 0) {
- $row['admin_access'] = $this->mapUserGroup($row['admin_access']);
- }
- if ($row['pub_access'] == -1) {
- // All registered
- $row['pub_access'] = 2;
- $row['pub_recurse'] = 1;
- } elseif ($row['pub_access'] == 0) {
- // Everybody
- $row['pub_access'] = 1;
- $row['pub_recurse'] = 1;
- } elseif ($row['pub_access'] == 1) {
- // Nobody
- $row['pub_access'] = 8;
- } else {
- // User groups
- $row['pub_access'] = $this->mapUserGroup($row['pub_access']);
- }
- } elseif ($row['accesstype'] == 'joomla.level') {
- // Convert Joomla access levels
- $row['access']++;
- }
- }
- $this->setDestinationData($rows);
- return true;
- }
}
View
2 ...ponents/com_kunena/install/j16upgrade.xml → ...ponents/com_kunena/install/j25upgrade.xml
@@ -2,7 +2,7 @@
<!DOCTYPE jupgrade>
<jupgrade>
<installer>
- <file>administrator/components/com_kunena/install/j16upgrade.php</file>
+ <file>administrator/components/com_kunena/install/j25upgrade.php</file>
<class>jUpgradeComponentKunena</class>
</installer>
View
12 administrator/components/com_kunena/install/kunena.install.upgrade.xml
@@ -328,18 +328,18 @@
<version version="2.0.0-DEV8" versiondate="2011-12-18" versionname="Internal">
<query mode="silenterror">ALTER TABLE `#__kunena_announcement` ADD `created_by` int(10) NOT NULL AFTER `title`;</query>
</version>
- <version version="2.0.0-DEV9" versiondate="2011-12-18" versionname="Internal">
- <phpfile name="upgrade-2.0.0_menu"></phpfile>
- </version>
<version version="2.0.0-DEV12" versiondate="2012-02-03" versionname="Internal">
- <query>ALTER TABLE `#__kunena_polls_users` CHANGE `lasttime` `lasttime` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'</query>
+ <query mode="silenterror">ALTER TABLE `#__kunena_polls_users` CHANGE `lasttime` `lasttime` TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00'</query>
</version>
<version version="2.0.0-DEV13" versiondate="2012-03-15" versionname="Internal">
- <query>ALTER TABLE `#__kunena_categories` CHANGE `pub_access` `pub_access` int(11) NOT NULL default '1',
+ <query mode="silenterror">ALTER TABLE `#__kunena_categories` CHANGE `pub_access` `pub_access` int(11) NOT NULL default '1',
CHANGE `admin_access` `admin_access` int(11) NOT NULL default '1'</query>
</version>
<version version="2.0.0-DEV14" versiondate="2012-04-09" versionname="Internal">
- <query>ALTER TABLE `#__kunena_users_banned` ADD KEY `created_time` (created_time);</query>
+ <query mode="silenterror">ALTER TABLE `#__kunena_users_banned` ADD KEY `created_time` (created_time);</query>
+ </version>
+ <version version="2.0.0-DEV15" versiondate="2012-04-13" versionname="Internal">
+ <phpfile name="upgrade-2.0.0_menu"></phpfile>
</version>
<version version="@kunenaversion@" versiondate="@kunenaversiondate@" versionname="@kunenaversionname@">
</version>
View
57 administrator/components/com_kunena/install/model.php
@@ -119,6 +119,7 @@ public function uninstall() {
$this->uninstallPlugin('kunena', 'uddeim');
$this->uninstallPlugin('finder', 'kunena');
$this->uninstallPlugin('system', 'kunena');
+
$this->uninstallModule('mod_kunenamenu');
// Remove all Kunena related menu items, including aliases
@@ -332,15 +333,18 @@ function publishPlugin($folder, $name, $enable = 1) {
}
function installModule($path, $name) {
+ $success = false;
+
$dest = JPATH_ROOT."/tmp/kinstall_mod_{$name}";
if (file_exists($dest)) JFolder::delete($dest);
- if (is_file(KPATH_ADMIN .'/'. $path)) {
- // Extract file
- $success = $this->extract ( KPATH_ADMIN, $path, $dest );
- } else {
+ if (is_dir(KPATH_ADMIN .'/'. $path)) {
// Copy path
$success = JFolder::copy(KPATH_ADMIN .'/'. $path, $dest);
+ } elseif (is_file(KPATH_ADMIN .'/'. $path)) {
+ // Extract file
+ $success = $this->extract ( KPATH_ADMIN, $path, $dest );
}
+
// We need to have only one manifest which is named as kunena.xml
if (version_compare(JVERSION, '1.6','>')) {
// Joomla 2.5+
@@ -382,36 +386,39 @@ function installModule($path, $name) {
}
function installPlugin($path, $group, $name, $publish) {
+ $success = false;
+
$dest = JPATH_ROOT."/tmp/kinstall_plg_{$group}_{$name}";
if (file_exists($dest)) JFolder::delete($dest);
- if (is_file(KPATH_ADMIN .'/'. $path)) {
- // Extract file
- $success = $this->extract ( KPATH_ADMIN, $path, $dest );
- } else {
+ if (is_dir(KPATH_ADMIN .'/'. $path)) {
// Copy path
$success = JFolder::copy(KPATH_ADMIN .'/'. $path, $dest);
+ } elseif (is_file(KPATH_ADMIN .'/'. $path)) {
+ // Extract file
+ $success = $this->extract ( KPATH_ADMIN, $path, $dest );
}
- // We need to have only one manifest which is named as kunena.xml
+
+ // We need to have only one manifest which is named as xxx.xml
if (version_compare(JVERSION, '1.6','>')) {
// Joomla 1.6+
if ($success && is_file("{$dest}/{$name}.j15.xml")) {
$success = JFile::delete("{$dest}/{$name}.j15.xml");
}
- if ($success && is_file("{$dest}/{$name}.j16.xml")) {
- $success = JFile::move("{$dest}/{$name}.j16.xml", "{$dest}/{$name}.xml");
+ if ($success && is_file("{$dest}/{$name}.j25.xml")) {
+ $success = JFile::move("{$dest}/{$name}.j25.xml", "{$dest}/{$name}.xml");
}
} else {
// Joomla 1.5
- if ($success && is_file("{$dest}/{$name}.j16.xml")) {
- $success = JFile::delete("{$dest}/{$name}.j16.xml");
+ if ($success && is_file("{$dest}/{$name}.j25.xml")) {
+ $success = JFile::delete("{$dest}/{$name}.j25.xml");
}
if ($success && is_file("{$dest}/{$name}.j15.xml")) {
$success = JFile::move("{$dest}/{$name}.j15.xml", "{$dest}/{$name}.xml");
}
}
// TODO: copy all language files to module directory
- $success = JFolder::create($dest.'/language/en-GB');
- $success = JFile::copy(KPATH_ADMIN."/language/index.html", "{$dest}/language/en-GB/index.html");
+ if ($success) $success = JFolder::create($dest.'/language/en-GB');
+ if ($success) $success = JFile::copy(KPATH_ADMIN."/language/index.html", "{$dest}/language/en-GB/index.html");
if ($success && is_file(KPATH_ADMIN."/language/en-GB/en-GB.plg_{$group}_{$name}.ini")) {
$success = JFile::copy(KPATH_ADMIN."/language/en-GB/en-GB.plg_{$group}_{$name}.ini", "{$dest}/language/en-GB/en-GB.plg_{$group}_{$name}.ini");
}
@@ -552,7 +559,7 @@ public function stepExtract() {
array('name'=>'com_kunena-media', 'dest'=>KPATH_MEDIA)
);
static $ignore = array(
- KPATH_ADMIN => array('index.html', 'kunena.xml', 'kunena.j16.xml', 'admin.kunena.php', 'api.php', 'archive', 'install', 'language'),
+ KPATH_ADMIN => array('index.html', 'kunena.xml', 'kunena.j25.xml', 'admin.kunena.php', 'api.php', 'archive', 'install', 'language'),
KPATH_SITE => array('index.html', 'kunena.php', 'router.php', 'COPYRIGHT.php', 'template', 'language')
);
$task = $this->getTask();
@@ -586,13 +593,16 @@ public function stepPlugins() {
//$this->installPlugin('install/plugins/plg_finder_kunena', 'finder', 'kunena', false);
$this->installPlugin('install/plugins/plg_kunena_kunena', 'kunena', 'kunena', true);
$this->installPlugin('install/plugins/plg_kunena_joomla15', 'kunena', 'joomla', true);
- $this->installPlugin('install/plugins/plg_kunena_joomla16', 'kunena', 'joomla', true);
+ $this->installPlugin('install/plugins/plg_kunena_joomla25', 'kunena', 'joomla', true);
$this->installPlugin('install/plugins/plg_kunena_alphauserpoints', 'kunena', 'alphauserpoints', false);
$this->installPlugin('install/plugins/plg_kunena_comprofiler', 'kunena', 'comprofiler', false);
$this->installPlugin('install/plugins/plg_kunena_community', 'kunena', 'community', false);
$this->installPlugin('install/plugins/plg_kunena_gravatar', 'kunena', 'gravatar', false);
$this->installPlugin('install/plugins/plg_kunena_uddeim', 'kunena', 'uddeim', false);
- $this->installModule('install/modules/mod_kunenamenu', 'kunenamenu');
+
+ // TODO: install also menu module
+ $this->uninstallModule('mod_kunenamenu');
+ //$this->installModule('install/modules/mod_kunenamenu', 'kunenamenu');
if (! $this->getError ())
$this->setStep ( $this->getStep()+1 );
@@ -1630,13 +1640,16 @@ function createMenu() {
$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','>')) {
// Joomla 1.6+
- $this->createMenuJ16($menu, $submenu);
+ $this->createMenuJ25($menu, $submenu);
} else {
// Joomla 1.5
$this->createMenuJ15($menu, $submenu);
}
+ $lang->setDebug($debug);
}
function createMenuJ15($menu, $submenu) {
@@ -1792,7 +1805,7 @@ function createMenuJ15($menu, $submenu) {
MenusHelper::cleanCache ();
}
- function createMenuJ16($menu, $submenu) {
+ function createMenuJ25($menu, $submenu) {
jimport ( 'joomla.utilities.string' );
jimport ( 'joomla.application.component.helper' );
@@ -1944,14 +1957,14 @@ function createMenuJ16($menu, $submenu) {
function deleteMenu() {
if (version_compare(JVERSION, '1.6','>')) {
// Joomla 1.6+
- $this->DeleteMenuJ16();
+ $this->DeleteMenuJ25();
} else {
// Joomla 1.5
$this->DeleteMenuJ15();
}
}
- function deleteMenuJ16() {
+ function deleteMenuJ25() {
$table = JTable::getInstance ( 'menutype' );
$table->load(array('menutype'=>'kunenamenu'));
if ($table->id) {
View
2 .../plugins/plg_finder_kunena/kunena.j16.xml → .../plugins/plg_finder_kunena/kunena.j25.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
-<extension version="1.6" type="plugin" group="finder" method="upgrade">
+<extension version="2.5" type="plugin" group="finder" method="upgrade">
<name>plg_finder_kunena</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
View
2 ...a_alphauserpoints/alphauserpoints.j16.xml → ...a_alphauserpoints/alphauserpoints.j25.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
-<extension version="1.6" type="plugin" group="kunena" method="upgrade">
+<extension version="2.5" type="plugin" group="kunena" method="upgrade">
<name>plg_kunena_alphauserpoints</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
View
2 ...ns/plg_kunena_community/community.j16.xml → ...ns/plg_kunena_community/community.j25.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
-<extension version="1.6" type="plugin" group="kunena" method="upgrade">
+<extension version="2.5" type="plugin" group="kunena" method="upgrade">
<name>plg_kunena_community</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
View
2 ...lg_kunena_comprofiler/comprofiler.j16.xml → ...lg_kunena_comprofiler/comprofiler.j25.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
-<extension version="1.6" type="plugin" group="kunena" method="upgrade">
+<extension version="2.5" type="plugin" group="kunena" method="upgrade">
<name>plg_kunena_comprofiler</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
View
2 ...gins/plg_kunena_gravatar/gravatar.j16.xml → ...gins/plg_kunena_gravatar/gravatar.j25.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
-<extension version="1.6" type="plugin" group="kunena" method="upgrade">
+<extension version="2.5" type="plugin" group="kunena" method="upgrade">
<name>plg_kunena_gravatar</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
View
6 ...ll/plugins/plg_kunena_joomla16/access.php → ...ll/plugins/plg_kunena_joomla25/access.php
@@ -75,7 +75,7 @@ public function getAccessOptions($accesstype, $category) {
if (!$accesstype || $accesstype == 'joomla.level') {
$html ['joomla-level']['access'] = array(
'title' => JText::_('PLG_KUNENA_JOOMLA_ACCESS_LEVEL_TITLE'),
- 'desc' => JText::_('PLG_KUNENA_JOOMLA_ACCESS_LEVEL_DESC') .'<br /><br />'. JText::_('PLG_KUNENA_JOOMLA_ACCESS_LEVEL_DESC_J16'),
+ 'desc' => JText::_('PLG_KUNENA_JOOMLA_ACCESS_LEVEL_DESC') .'<br /><br />'. JText::_('PLG_KUNENA_JOOMLA_ACCESS_LEVEL_DESC_J25'),
'input' => JHtml::_('access.assetgrouplist', 'access', $category->accesstype == 'joomla.level' ? $category->access : 1)
);
}
@@ -88,7 +88,7 @@ public function getAccessOptions($accesstype, $category) {
'title' => JText::_('PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_TITLE'),
'desc' => JText::_('PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_DESC') .'<br /><br />'.
JText::_('PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_DESC2') .'<br /><br />'.
- JText::_('PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_DESC_J16'),
+ JText::_('PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_DESC_J25'),
'input' => JHTML::_ ( 'access.usergroup', 'pub_access', $category->pub_access, 'class="inputbox" size="10"', false)
);
$html ['none']['pub_recurse'] = array(
@@ -100,7 +100,7 @@ public function getAccessOptions($accesstype, $category) {
'title' => JText::_('PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_TITLE'),
'desc' => JText::_('PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_DESC') .'<br /><br />'.
JText::_('PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_DESC2') .'<br /><br />'.
- JText::_('PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_DESC_J16'),
+ JText::_('PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_DESC_J25'),
'input' => JHTML::_ ( 'access.usergroup', 'admin_access', $category->admin_access, 'class="inputbox" size="10"', false)
);
$html ['none']['admin_recurse'] = array(
View
0 ...s/plg_kunena_joomla16/language/index.html → ...ll/plugins/plg_kunena_joomla25/index.html
File renamed without changes.
View
2 ...lugins/plg_kunena_joomla16/joomla.j16.xml → ...lugins/plg_kunena_joomla25/joomla.j25.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
-<extension version="1.6" type="plugin" group="kunena" method="upgrade">
+<extension version="2.5" type="plugin" group="kunena" method="upgrade">
<name>plg_kunena_joomla</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
View
0 ...ll/plugins/plg_kunena_joomla16/joomla.php → ...ll/plugins/plg_kunena_joomla25/joomla.php
File renamed without changes.
View
0 ...ll/plugins/plg_kunena_joomla16/index.html → ...s/plg_kunena_joomla25/language/index.html
File renamed without changes.
View
0 ...all/plugins/plg_kunena_joomla16/login.php → ...all/plugins/plg_kunena_joomla25/login.php
File renamed without changes.
View
2 .../plugins/plg_kunena_kunena/kunena.j16.xml → .../plugins/plg_kunena_kunena/kunena.j25.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
-<extension version="1.6" type="plugin" group="kunena" method="upgrade">
+<extension version="2.5" type="plugin" group="kunena" method="upgrade">
<name>plg_kunena_kunena</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
View
2 .../plugins/plg_kunena_uddeim/uddeim.j16.xml → .../plugins/plg_kunena_uddeim/uddeim.j25.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
-<extension version="1.6" type="plugin" group="kunena" method="upgrade">
+<extension version="2.5" type="plugin" group="kunena" method="upgrade">
<name>plg_kunena_uddeim</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
View
2 .../plugins/plg_system_kunena/kunena.j16.xml → .../plugins/plg_system_kunena/kunena.j25.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
-<extension version="1.6" type="plugin" group="system" method="upgrade">
+<extension version="2.5" type="plugin" group="system" method="upgrade">
<name>plg_system_kunena</name>
<version>@kunenaversion@</version>
<creationDate>@kunenaversiondate@</creationDate>
View
2 administrator/components/com_kunena/install/upgrade/upgrade-2.0.0_menu.php
@@ -16,5 +16,5 @@ function kunena_upgrade_200_menu($parent) {
$legacy = KunenaMenuFix::getLegacy();
$errors = KunenaMenuFix::fixLegacy();
- return array ('action' => '', 'name' => JText::sprintf ( 'COM_KUNENA_INSTALL_200_MENU', count($legacy) ), 'success' => !$errors);
+ if(!empty($legacy)) return array ('action' => '', 'name' => JText::sprintf ( 'COM_KUNENA_INSTALL_200_MENU', count($legacy) ), 'success' => !$errors);
}
View
2 ...ator/components/com_kunena/kunena.j16.xml → ...ator/components/com_kunena/kunena.j25.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension>
-<extension type="component" version="1.6" method="upgrade">
+<extension type="component" version="2.5" method="upgrade">
<name>com_kunena</name>
<version>@kunenaversion@</version>
<versionname>@kunenaversionname@</versionname>
View
4 administrator/components/com_kunena/kunena.xml
@@ -2,7 +2,7 @@
<!DOCTYPE install>
<install type="component" version="1.5.0" method="upgrade">
<name>Kunena</name>
- <version>2.0.0-DEV14</version>
+ <version>2.0.0-DEV15</version>
<versionname>Internal</versionname>
<creationDate>@kunenaversiondate@</creationDate>
<author>Kunena Team</author>
@@ -30,7 +30,7 @@
<menu view="trash" img="components/com_kunena/media/icons/favicons/kunena-trash.png">COM_KUNENA_TRASH_MANAGER</menu>
</submenu>
<files>
- <filename>kunena.j16.xml</filename>
+ <filename>kunena.j25.xml</filename>
<filename>api.php</filename>
<filename>admin.kunena.php</filename>
<folder>install</folder>
View
6 administrator/components/com_kunena/language/en-GB/en-GB.com_kunena.ini
@@ -973,15 +973,15 @@ COM_KUNENA_A_ACCESSTYPE_DESC="Access control type to be used in this category."
COM_KUNENA_A_ACCESSLEVEL_TITLE="Access Level:"
COM_KUNENA_A_ACCESSLEVEL_DESC="The <em>Access Level Group</em> that is allowed to view this category."
COM_KUNENA_A_ACCESSLEVEL_DESC_J15="<strong>Hint:</strong> As access levels are fixed in Joomla 1.5. To get better access control, use <em>Access Type: User Groups</em>."
-COM_KUNENA_A_ACCESSLEVEL_DESC_J16="<strong>Hint:</strong> You can define your own access levels in <em>Joomla &gt;&gt; Users &gt;&gt; Access Levels</em>."
+COM_KUNENA_A_ACCESSLEVEL_DESC_J25="<strong>Hint:</strong> You can define your own access levels in <em>Joomla &gt;&gt; Users &gt;&gt; Access Levels</em>."
COM_KUNENA_A_ACCESSGROUP_PRIMARY_TITLE="Primary User Group:"
COM_KUNENA_A_ACCESSGROUP_PRIMARY_DESC="The user group that is allowed to view this category. <br /><br /> By default access is allowed to everyone who inherits the user group. Alternatively you can restrict access to the specified user group only by setting <em>Include Child Groups = No</em>."
COM_KUNENA_A_ACCESSGROUP_PRIMARY_DESC_J15="<strong>Hint:</strong> There are 3 special groups in addition to user groups: <em>Nobody</em>, <em>Public</em> and <em>All Registered</em>. <br /> <strong>Hint:</strong> You can create your own user groups with <em>ArtOf User</em> component."
-COM_KUNENA_A_ACCESSGROUP_PRIMARY_DESC_J16="<strong>Hint:</strong> <em>Public</em> means either everyone or only guests depending on the <em>Include Child Groups</em> setting if you haven't changed <em>Guest User Group</em> from <em>Joomla &gt;&gt; Users &gt;&gt; User Groups &gt;&gt; Options</em>."
+COM_KUNENA_A_ACCESSGROUP_PRIMARY_DESC_J25="<strong>Hint:</strong> <em>Public</em> means either everyone or only guests depending on the <em>Include Child Groups</em> setting if you haven't changed <em>Guest User Group</em> from <em>Joomla &gt;&gt; Users &gt;&gt; User Groups &gt;&gt; Options</em>."
COM_KUNENA_A_ACCESSGROUP_SECONDARY_TITLE="Secondary User Group:"
COM_KUNENA_A_ACCESSGROUP_SECONDARY_DESC="Secondary user group that is allowed to view this category. <br /><br /> Secondary group can be useful for example if both <em>Publishers</em> and <em>Managers</em> need to be able to see the category."
COM_KUNENA_A_ACCESSGROUP_SECONDARY_DESC_J15="<strong>Hint:</strong> You can disable secondary group by setting its value to <em>Nobody</em>."
-COM_KUNENA_A_ACCESSGROUP_SECONDARY_DESC_J16="<strong>Hint:</strong> You can disable secondary group by setting it to have the same value as <em>Primary User Group</em>. <br /> <strong>Hint:</strong> It might be a better idea to create an <em>Access Level Group</em> instead of using <em>Secondary User Group</em>."
+COM_KUNENA_A_ACCESSGROUP_SECONDARY_DESC_J25="<strong>Hint:</strong> You can disable secondary group by setting it to have the same value as <em>Primary User Group</em>. <br /> <strong>Hint:</strong> It might be a better idea to create an <em>Access Level Group</em> instead of using <em>Secondary User Group</em>."
COM_KUNENA_A_ACCESSGROUP_PRIMARY_CHILDS_TITLE="Primary Includes Child Groups:"
COM_KUNENA_A_ACCESSGROUP_SECONDARY_CHILDS_TITLE="Secondary Includes Child Groups:"
COM_KUNENA_A_ACCESSGROUP_CHILDS_DESC="Should child groups be allowed access as well? If set to <em>No</em>, access to this category is restricted to the selected group <strong>only</strong>."
View
6 administrator/components/com_kunena/language/en-GB/en-GB.plg_kunena_joomla.sys.ini
@@ -11,19 +11,19 @@ PLG_KUNENA_JOOMLA_ACCESSTYPE_GROUP="Joomla User Groups"
PLG_KUNENA_JOOMLA_ACCESS_LEVEL_TITLE="Access Level:"
PLG_KUNENA_JOOMLA_ACCESS_LEVEL_DESC="The <em>Access Level Group</em> that is allowed to view this category."
PLG_KUNENA_JOOMLA_ACCESS_LEVEL_DESC_J15="<strong>Hint:</strong> As access levels are fixed in Joomla 1.5. To get better access control, use <em>Access Type: Joomla User Groups</em>."
-PLG_KUNENA_JOOMLA_ACCESS_LEVEL_DESC_J16="<strong>Hint:</strong> You can define your own access levels in <em>Joomla &gt;&gt; Users &gt;&gt; Access Levels</em>."
+PLG_KUNENA_JOOMLA_ACCESS_LEVEL_DESC_J25="<strong>Hint:</strong> You can define your own access levels in <em>Joomla &gt;&gt; Users &gt;&gt; Access Levels</em>."
PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_TITLE="Primary User Group:"
PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_DESC="The user group that is allowed to view this category."
PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_DESC2="By default access is allowed to everyone who inherits the user group. Alternatively you can restrict access to the specified user group only by setting <em>Include Child Groups = No</em>."
PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_DESC_J15="<strong>Hint:</strong> There are 3 special groups in addition to user groups: <em>Nobody</em>, <em>Public</em> and <em>All Registered</em>. <br /> <strong>Hint:</strong> You can create your own user groups with <em>ArtOf User</em> component."
-PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_DESC_J16="<strong>Hint:</strong> <em>Public</em> means either everyone or only guests depending on the <em>Include Child Groups</em> setting if you haven't changed <em>Guest User Group</em> from <em>Joomla &gt;&gt; Users &gt;&gt; User Groups &gt;&gt; Options</em>."
+PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_DESC_J25="<strong>Hint:</strong> <em>Public</em> means either everyone or only guests depending on the <em>Include Child Groups</em> setting if you haven't changed <em>Guest User Group</em> from <em>Joomla &gt;&gt; Users &gt;&gt; User Groups &gt;&gt; Options</em>."
PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_CHILDS_TITLE="Primary Includes Child Groups:"
PLG_KUNENA_JOOMLA_ACCESS_GROUP_PRIMARY_CHILDS_DESC="Should primary child groups be allowed access as well? If set to <em>No</em>, access to this category is restricted to the selected group <strong>only</strong>."
PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_TITLE="Secondary User Group:"
PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_DESC="Secondary user group that is allowed to view this category."
PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_DESC2="Secondary group can be useful for example if both <em>Publishers</em> and <em>Managers</em> need to be able to see the category."
PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_DESC_J15="<strong>Hint:</strong> You can disable secondary group by setting its value to <em>Nobody</em>."
-PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_DESC_J16="<strong>Hint:</strong> You can disable secondary group by setting it to have the same value as <em>Primary User Group</em>. <br /> <strong>Hint:</strong> It might be a better idea to create an <em>Access Level Group</em> instead of using <em>Secondary User Group</em>."
+PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_DESC_J25="<strong>Hint:</strong> You can disable secondary group by setting it to have the same value as <em>Primary User Group</em>. <br /> <strong>Hint:</strong> It might be a better idea to create an <em>Access Level Group</em> instead of using <em>Secondary User Group</em>."
PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_CHILDS_TITLE="Secondary Includes Child Groups:"
PLG_KUNENA_JOOMLA_ACCESS_GROUP_SECONDARY_CHILDS_DESC="Should secondary child groups be allowed access as well? If set to <em>No</em>, access to this category is restricted to the selected group <strong>only</strong>."
View
6 administrator/components/com_kunena/libraries/access.php
@@ -37,7 +37,8 @@ public function __construct() {
// Load administrators and moderators from cache
$cache = JFactory::getCache('com_kunena', 'output');
- $data = $cache->get(self::$cacheKey, 'com_kunena');
+ // FIXME: enable caching after fixing the issues
+ $data = false; //$cache->get(self::$cacheKey, 'com_kunena');
if ($data) {
$data = unserialize($data);
if (isset($data['v']) && $data['v'] == 1) {
@@ -84,6 +85,8 @@ public function clearCache() {
// Store new data into cache
$cache = JFactory::getCache('com_kunena', 'output');
+ // FIXME: enable caching after fixing the issues
+ /*
$cache->store(serialize(array(
'v'=>1, // version identifier
'ac'=>$this->adminsByCatid,
@@ -91,6 +94,7 @@ public function clearCache() {
'mc'=>$this->moderatorsByCatid,
'mu'=>$this->moderatorsByUserid,
)), self::$cacheKey, 'com_kunena');
+ */
}
/**
View
10 administrator/components/com_kunena/libraries/forum/category/category.php
@@ -474,8 +474,10 @@ protected function saveInternal() {
// Clear cache
$access = KunenaAccess::getInstance();
$access->clearCache();
+
$cache = JFactory::getCache('com_kunena', 'output');
- $cache->clean('categories');
+ // FIXME: enable caching after fixing the issues
+ //$cache->clean('categories');
return true;
}
@@ -614,9 +616,6 @@ public function checkout($who) {
// Assuming all is well at this point lets bind the data
$this->setProperties ( $table->getProperties () );
- $cache = JFactory::getCache('com_kunena', 'output');
- $cache->clean('categories');
-
return $result;
}
@@ -641,7 +640,8 @@ public function checkin() {
$this->setProperties ( $table->getProperties () );
$cache = JFactory::getCache('com_kunena', 'output');
- $cache->clean('categories');
+ // FIXME: enable caching after fixing the issues
+ //$cache->clean('categories');
return $result;
}
View
3 administrator/components/com_kunena/libraries/forum/category/helper.php
@@ -342,7 +342,8 @@ static public function recount($categories = '') {
if ($rows) {
// If something changed, clean our cache
$cache = JFactory::getCache('com_kunena', 'output');
- $cache->clean('categories');
+ // FIXME: enable caching after fixing the issues
+ //$cache->clean('categories');
}
return $rows;
}
View
3 administrator/components/com_kunena/libraries/menu/fix.php
@@ -163,7 +163,8 @@ public static function getInvalid() {
public static function getConflicts() {
$items = array();
foreach (self::$same as $alias=>$list) {
- if (count($list)>1) {
+ // There are no conflicts in J1.6+ (only multi-lang support)
+ if (count($list)>1 && version_compare(JVERSION, '1.6', '<')) {
$items += $list;
}
}
View
12 administrator/components/com_kunena/libraries/menu/helper.php
@@ -38,7 +38,8 @@ protected static function getList16(&$params) {
asort($levels);
$key = 'menu_items'.$params.implode(',', $levels).'.'.$active->id;
$cache = JFactory::getCache('com_kunena.menu', '');
- if (!($items = $cache->get($key))) {
+ // FIXME: enable caching after fixing the issues
+ if (true) { // !($items = $cache->get($key))) {
// Initialise variables.
$list = array();
@@ -122,7 +123,8 @@ protected static function getList16(&$params) {
}
}
- $cache->store($items, $key);
+ // FIXME: enable caching after fixing the issues
+ //$cache->store($items, $key);
}
return $items;
}
@@ -137,7 +139,8 @@ protected static function getList15(JRegistry &$params) {
$level = JFactory::getUser()->get('aid');
$key = 'menu_items'.$params->toString().$level.'.'.$active->id;
$cache = JFactory::getCache('com_kunena.menu', '');
- if (!($items = $cache->get($key))) {
+ // FIXME: enable caching after fixing the issues
+ if (true) { // !($items = $cache->get($key))) {
// Initialise variables.
$list = array();
@@ -255,7 +258,8 @@ protected static function getList15(JRegistry &$params) {
}
}
- $cache->store($items, $key);
+ // FIXME: enable caching after fixing the issues
+ //$cache->store($items, $key);
}
return $items;
}
View
12 administrator/components/com_kunena/libraries/route/route.php
@@ -156,7 +156,8 @@ public static function cacheLoad() {
$user = KunenaUserHelper::getMyself();
$cache = self::getCache();
// TODO: can use viewlevels instead of userid
- $data = $cache->get($user->userid, 'com_kunena.route');
+ // FIXME: enable caching after fixing the issues
+ $data = false; // $cache->get($user->userid, 'com_kunena.route');
if ($data !== false) {
list(self::$subtree, self::$uris) = unserialize($data);
}
@@ -170,7 +171,8 @@ public static function cacheStore() {
$data = array(self::$subtree, self::$uris);
$cache = self::getCache();
// TODO: can use viewlevels instead of userid
- $cache->store(serialize($data), $user->userid, 'com_kunena.route');
+ // FIXME: enable caching after fixing the issues
+ //$cache->store(serialize($data), $user->userid, 'com_kunena.route');
KUNENA_PROFILER ? KunenaProfiler::instance()->stop('function '.__CLASS__.'::'.__FUNCTION__.'()') : null;
}
@@ -392,7 +394,8 @@ protected static function build() {
$language = JFactory::getDocument()->getLanguage();
$cache = self::getCache();
- self::$search = unserialize($cache->get('search', "com_kunena.route.{$language}.{$user->userid}"));
+ // FIXME: enable caching after fixing the issues
+ self::$search = false; //unserialize($cache->get('search', "com_kunena.route.{$language}.{$user->userid}"));
if (self::$search === false) {
self::$search['home'] = array();
foreach ( self::$menu as $item ) {
@@ -412,7 +415,8 @@ protected static function build() {
self::$search[$item->query['view']][$home ? $home->id : 0][$item->id] = $item->id;
}
}
- $cache->store(serialize(self::$search), 'search', "com_kunena.route.{$language}.{$user->userid}");
+ // FIXME: enable caching after fixing the issues
+ //$cache->store(serialize(self::$search), 'search', "com_kunena.route.{$language}.{$user->userid}");
}
}
KUNENA_PROFILER ? KunenaProfiler::instance()->stop('function '.__CLASS__.'::'.__FUNCTION__.'()') : null;
View
2 administrator/components/com_kunena/views/categories/tmpl/edit.php
@@ -145,6 +145,7 @@ function submitbutton(pressbutton)
<td valign="top"><?php echo $this->options ['allow_polls']; ?></td>
<td valign="top"><?php echo JText::_('COM_KUNENA_A_POLL_CATEGORIES_ALLOWED_DESC'); ?></td>
</tr>
+ <?php /* TODO: enable features
<tr>
<td class="nowrap" valign="top"><?php echo JText::_('COM_KUNENA_CATEGORY_CHANNELS'); ?>:</td>
<td valign="top"><?php echo $this->options ['channels']; ?></td>
@@ -155,7 +156,6 @@ function submitbutton(pressbutton)
<td valign="top"><?php echo $this->options ['topic_ordering']; ?></td>
<td valign="top"><?php echo JText::_('COM_KUNENA_CATEGORY_TOPIC_ORDERING_DESC'); ?></td>
</tr>
- <?php /*
<tr>
<td class="nowrap" valign="top"><?php echo JText::_('COM_KUNENA_A_CATEGORY_TOPICICONSET'); ?>:</td>
<td valign="top"><?php echo $this->options ['category_iconset']; ?></td>
View
3 administrator/components/com_kunena/views/categories/view.html.php
@@ -20,6 +20,9 @@ function displayCreate() {
function displayEdit() {
$this->assignRef ( 'category', $this->get ( 'AdminCategory' ) );
+ // FIXME: better access control and gracefully handle no rights
+ // Prevent fatal error if no rights:
+ if (!$this->category) return;
$this->assignRef ( 'options', $this->get ( 'AdminOptions' ) );
$this->assignRef ( 'moderators', $this->get ( 'AdminModerators' ) );
$this->setToolBarEdit();
View
2 administrator/components/com_kunena/views/common/tmpl/menu.php
@@ -36,6 +36,6 @@
<a class="kadmin-mainmenu icon-prune-sm" href="<?php echo KunenaRoute::_('index.php?option=com_kunena&view=tools') ?>"><?php echo JText::_('COM_KUNENA_A_VIEW_TOOLS'); ?></a>
<a class="kadmin-mainmenu icon-stats-sm" href="<?php echo KunenaRoute::_('index.php?option=com_kunena&view=stats') ?>"><?php echo JText::_('COM_KUNENA_STATS_GEN_STATS'); ?></a>
<a class="kadmin-mainmenu icon-systemreport-sm" href="<?php echo KunenaRoute::_('index.php?option=com_kunena&view=report') ?>"><?php echo JText::_('COM_KUNENA_REPORT_SYSTEM'); ?></a>
- <a class="kadmin-mainmenu icon-pluginsmanager-sm" href="<?php echo KunenaRoute::_('index.php?option=com_plugins&view=plugins&filter_folder=kunena') ?>"><?php echo JText::_('COM_KUNENA_PLUGINS_MANAGER'); ?></a>
+ <a class="kadmin-mainmenu icon-pluginsmanager-sm" href="<?php echo JRoute::_('index.php?option=com_plugins&view=plugins&filter_'.(version_compare(JVERSION, '1.6', '>') ? 'folder' : 'type').'=kunena') ?>"><?php echo JText::_('COM_KUNENA_PLUGINS_MANAGER'); ?></a>
<a class="kadmin-mainmenu icon-support-sm" href="http://www.kunena.org" target="_blank"><?php echo JText::_('COM_KUNENA_C_SUPPORT'); ?></a>
</div>
View
6 administrator/components/com_kunena/views/cpanel/tmpl/default.php
@@ -64,7 +64,7 @@
<div class="icon"> <a href="<?php echo KunenaRoute::_('index.php?option=com_kunena&view=report') ?>" title="<?php echo JText::_('COM_KUNENA_REPORT_SYSTEM');?>"> <img src="<?php echo JURI::base(true); ?>/components/com_kunena/media/icons/large/report.png" align="middle" border="0" alt="" /> <span> <?php echo JText::_('COM_KUNENA_REPORT_SYSTEM'); ?> </span></a> </div>
</div>
<div class="icon-container">
- <div class="icon"> <a href="<?php echo KunenaRoute::_('index.php?option=com_plugins&view=plugins&filter_folder=kunena') ?>" title="<?php echo JText::_('COM_KUNENA_PLUGINS_MANAGER');?>"> <img src="<?php echo JURI::base(true); ?>/components/com_kunena/media/icons/large/pluginsmanager.png" align="middle" border="0" alt="" /> <span> <?php echo JText::_('COM_KUNENA_PLUGINS_MANAGER'); ?> </span></a> </div>
+ <div class="icon"> <a href="<?php echo JRoute::_('index.php?option=com_plugins&view=plugins&filter_'.(version_compare(JVERSION, '1.6', '>') ? 'folder' : 'type').'=kunena') ?>" title="<?php echo JText::_('COM_KUNENA_PLUGINS_MANAGER');?>"> <img src="<?php echo JURI::base(true); ?>/components/com_kunena/media/icons/large/pluginsmanager.png" align="middle" border="0" alt="" /> <span> <?php echo JText::_('COM_KUNENA_PLUGINS_MANAGER'); ?> </span></a> </div>
</div>
<div class="icon-container">
<div class="icon"> <a href="http://www.kunena.org" target="_blank" title="<?php echo JText::_('COM_KUNENA_C_SUPPORTDESC');?>"> <img src="<?php echo JURI::base(true); ?>/components/com_kunena/media/icons/large/support.png" align="middle" border="0" alt="" /> <span> <?php echo JText::_('COM_KUNENA_C_SUPPORT'); ?> </span></a> </div>
@@ -74,7 +74,9 @@
</tr>
</table>
</div>
- <?php if ( $this->config->version_check ) : ?>
+ <?php
+ // FIXME: enable Live Update
+ if (0 && $this->config->version_check ) : ?>
<div class="kadmin-welcome">
<?php
require_once KPATH_ADMIN.'/liveupdate/liveupdate.php';
View
2 build/build.xml
@@ -143,7 +143,7 @@
<!-- Move files needed by the installer -->
<move file="${tmp_dir}/admin/${cfg.name}.xml" todir="${build_dir}" overwrite="true" filtering="true" />
- <move file="${tmp_dir}/admin/${cfg.name}.j16.xml" todir="${build_dir}" overwrite="true" filtering="true" />
+ <move file="${tmp_dir}/admin/${cfg.name}.j25.xml" todir="${build_dir}" overwrite="true" filtering="true" />
<move file="${tmp_dir}/site/COPYRIGHT.php" todir="${build_dir}" overwrite="true" filtering="true" />
<copy file="${project_dir}/README.md" tofile="${build_dir}/README.txt" overwrite="true" filtering="true" />
<!-- Copy installer entry files to keep forum offline during installation process. -->
View
2 components/com_kunena/template/blue_eagle/html/category/default_row.php
@@ -57,7 +57,7 @@
<span class="ktopic-posted-time" title="<?php echo KunenaDate::getInstance($this->topic->first_post_time)->toKunena('config_post_dateformat_hover'); ?>">
<?php echo JText::_('COM_KUNENA_TOPIC_STARTED_ON') . ' ' . KunenaDate::getInstance($this->topic->first_post_time)->toKunena('config_post_dateformat');?>
</span>
- <span class="ktopic-by ks"><?php echo JText::_('COM_KUNENA_GEN_BY') . ' ' . $this->topic->getFirstPostAuthor()->getLink() ?></span>
+ <span class="ktopic-by ks">&nbsp;<?php echo JText::_('COM_KUNENA_GEN_BY') . ' ' . $this->topic->getFirstPostAuthor()->getLink() ?></span>
</div>
<?php if ($this->topic->posts > $this->config->messages_per_page) : ?>
View
12 components/com_kunena/views/category/view.html.php
@@ -231,7 +231,8 @@ function displayCategory($category) {
$cachekey = "list.item.{$this->getTemplateMD5()}.{$usertype}.{$catid}.{$lastPost->last_post_id}";
$cachegroup = 'com_kunena.category';
- $contents = $cache->get($cachekey, $cachegroup);
+ // FIXME: enable caching after fixing the issues
+ $contents = false; //$cache->get($cachekey, $cachegroup);
if (!$contents) {
$this->categoryURL = KunenaRoute::_("index.php?option=com_kunena&view=category&catid={$catid}");
$this->categoryRssURL = $this->config->enablerss ? KunenaRoute::_("index.php?option=com_kunena&view=category&catid={$catid}&format=feed") : '';
@@ -246,7 +247,8 @@ function displayCategory($category) {
}
$contents = $this->loadTemplateFile('category');
if ($usertype == 'guest') $contents = preg_replace_callback('|\[K=(\w+)(?:\:(\w+))?\]|', array($this, 'fillCategoryInfo'), $contents);
- if ($this->cache) $cache->store($contents, $cachekey, $cachegroup);
+ // FIXME: enable caching after fixing the issues
+ //if ($this->cache) $cache->store($contents, $cachekey, $cachegroup);
} elseif ($usertype == 'guest') {
echo $contents;
return;
@@ -356,7 +358,8 @@ function displayRows() {
$cachekey = "{$this->getTemplateMD5()}.{$usertype}.c{$this->category->id}.t{$this->topic->id}.p{$this->topic->last_post_id}";
$cachegroup = 'com_kunena.topics';
- $contents = $cache->get($cachekey, $cachegroup);
+ // FIXME: enable caching after fixing the issues
+ $contents = false; //$cache->get($cachekey, $cachegroup);
if (!$contents) {
if ($this->category->id != $this->topic->category_id) {
$this->categoryLink = $this->getCategoryLink($this->topic->getCategory()->getParent()) . ' / ' . $this->getCategoryLink($this->topic->getCategory());
@@ -384,7 +387,8 @@ function displayRows() {
}
$contents = $this->loadTemplateFile('row');
if ($usertype == 'guest') $contents = preg_replace_callback('|\[K=(\w+)(?:\:([\w-_]+))?\]|', array($this, 'fillTopicInfo'), $contents);
- if ($this->cache) $cache->store($contents, $cachekey, $cachegroup);
+ // FIXME: enable caching after fixing the issues
+ //if ($this->cache) $cache->store($contents, $cachekey, $cachegroup);
}
if ($usertype != 'guest') {
$contents = preg_replace_callback('|\[K=(\w+)(?:\:([\w-_]+))?\]|', array($this, 'fillTopicInfo'), $contents);
View
25 components/com_kunena/views/common/view.html.php
@@ -53,7 +53,8 @@ function displayAnnouncement($tpl = null) {
}
$cache = JFactory::getCache('com_kunena', 'output');
- if ($cache->start("{$this->ktemplate->name}.common.announcement", 'com_kunena.template')) return;
+ // FIXME: enable caching after fixing the issues
+ //if ($cache->start("{$this->ktemplate->name}.common.announcement", 'com_kunena.template')) return;
if ($this->announcement && $this->announcement->authorise('read')) {
$this->annListUrl = KunenaForumAnnouncementHelper::getUri('list');
@@ -66,7 +67,8 @@ function displayAnnouncement($tpl = null) {
} else {</