Commit 2ad077bf authored by Reinhold Kainhofer's avatar Reinhold Kainhofer
Browse files

V0.9: Fix installation issues with VMconfig loading (error message: calling load on null)

parent 3e7b61a4
BASE=eurecap BASE=eurecap
PLUGINTYPE=vmextended PLUGINTYPE=vmextended
VERSION=0.8 VERSION=0.9
PLUGINFILES=$(BASE).php $(BASE).script.php $(BASE).xml index.html PLUGINFILES=$(BASE).php $(BASE).script.php $(BASE).xml index.html
# $(BASE)/ # $(BASE)/
......
...@@ -15,6 +15,10 @@ if( !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not ...@@ -15,6 +15,10 @@ if( !defined( '_JEXEC' ) ) die( 'Direct Access to '.basename(__FILE__).' is not
* http://www.open-tools.net * http://www.open-tools.net
*/ */
if (!class_exists( 'VmConfig' )) {
require(JPATH_ADMINISTRATOR .'/components/com_virtuemart/helpers/config.php');
VmConfig::loadConfig();
}
defined ('VMPATH_ADMIN') or define ('VMPATH_ADMIN', JPATH_VM_ADMINISTRATOR); defined ('VMPATH_ADMIN') or define ('VMPATH_ADMIN', JPATH_VM_ADMINISTRATOR);
defined ('VMPATH_PLUGINLIBS') or define ('VMPATH_PLUGINLIBS', JPATH_VM_PLUGINS); defined ('VMPATH_PLUGINLIBS') or define ('VMPATH_PLUGINLIBS', JPATH_VM_PLUGINS);
if (!class_exists('vmExtendedPlugin')) require(VMPATH_PLUGINLIBS . DS . 'vmextendedplugin.php'); if (!class_exists('vmExtendedPlugin')) require(VMPATH_PLUGINLIBS . DS . 'vmextendedplugin.php');
......
...@@ -7,8 +7,6 @@ defined('_JEXEC') or die('Restricted access'); ...@@ -7,8 +7,6 @@ defined('_JEXEC') or die('Restricted access');
* @license GPL v3+, http://www.gnu.org/copyleft/gpl.html * @license GPL v3+, http://www.gnu.org/copyleft/gpl.html
*/ */
defined('DS') or define('DS', DIRECTORY_SEPARATOR); defined('DS') or define('DS', DIRECTORY_SEPARATOR);
if (!class_exists( 'VmConfig' ))
require(JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php');
class plgVmExtendedEuRecapInstallerScript class plgVmExtendedEuRecapInstallerScript
{ {
...@@ -38,10 +36,18 @@ class plgVmExtendedEuRecapInstallerScript ...@@ -38,10 +36,18 @@ class plgVmExtendedEuRecapInstallerScript
* @return boolean True on success * @return boolean True on success
*/ */
public function postflight ($type, $parent = null) { public function postflight ($type, $parent = null) {
if(!class_exists( 'plgVmExtendedEuRecap' )) if(!class_exists( 'plgVmExtendedEuRecap' )) {
// JPluginHelper::importPlugin('vmextended', 'eurecap');
require JPATH_ROOT.DS.'plugins'.DS.'vmextended'.DS.'eurecap'.DS.'eurecap.php'; require JPATH_ROOT.DS.'plugins'.DS.'vmextended'.DS.'eurecap'.DS.'eurecap.php';
}
if (!class_exists( 'VmConfig' )) {
require(JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_virtuemart'.DS.'helpers'.DS.'config.php');
VmConfig::loadConfig();
}
$dispatcher = new JDispatcher(); $dispatcher = new JDispatcher();
$config = array('name' => 'eurecap', 'type' => 'vmextended'); $config = array('name' => 'eurecap', 'type' => 'vmextended');
// $plugin = JPluginHelper::importPlugin('vmextended', 'eurecap');
$plugin = new plgVmExtendedEuRecap($dispatcher, $config); $plugin = new plgVmExtendedEuRecap($dispatcher, $config);
$plugin->onInstallCheckAdminMenuEntries(); $plugin->onInstallCheckAdminMenuEntries();
// $plugin->plgVmOnStoreInstallPluginTable('extended'); // $plugin->plgVmOnStoreInstallPluginTable('extended');
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
<authorUrl>http://www.open-tools.net/</authorUrl> <authorUrl>http://www.open-tools.net/</authorUrl>
<copyright>Copyright (C) 2015 Reinhold Kainhofer. All rights reserved.</copyright> <copyright>Copyright (C) 2015 Reinhold Kainhofer. All rights reserved.</copyright>
<license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3</license> <license>http://www.gnu.org/licenses/gpl-3.0.html GNU/GPLv3</license>
<version>0.8</version> <version>0.9</version>
<releaseDate>2016-01-01</releaseDate> <releaseDate>2016-01-01</releaseDate>
<releaseType>Update</releaseType> <releaseType>Update</releaseType>
<downloadUrl>http://www.open-tools.net</downloadUrl> <downloadUrl>http://www.open-tools.net</downloadUrl>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment