-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Joomla version detection on install
- Loading branch information
Showing
3 changed files
with
48 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
<?php | ||
/** | ||
* @package JJ_Custom_Assets | ||
* @copyright Copyright (C) 2011 - 2015 JoomJunk. All rights reserved. | ||
* @license GPL v3.0 or later http://www.gnu.org/licenses/gpl-3.0.html | ||
*/ | ||
|
||
// No direct access | ||
defined('_JEXEC') or die('Restricted access'); | ||
|
||
/** | ||
* Custom Assets installation script class. | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
class plgSystemCustom_assetsInstallerScript | ||
{ | ||
/** | ||
* Function called before plugin installation/update/removal procedure commences | ||
* | ||
* @param string $type The type of change (install, update or discover_install, | ||
* not uninstall) | ||
* @param JInstallerAdapterModule $parent The class calling this method | ||
* | ||
* @return boolean true on success and false on failure | ||
* | ||
* @since 1.0.0 | ||
*/ | ||
public function preflight($type, $parent) | ||
{ | ||
$version = new JVersion; | ||
|
||
if(!$version->isCompatible('3.4.0')) | ||
{ | ||
JFactory::getApplication()->enqueueMessage(JText::_('JJ_CUSTOM_ASSETS_JOOMLA_VERSION_OUTDATED'), 'error'); | ||
|
||
return false; | ||
} | ||
} | ||
|
||
} | ||
|
||
?> |