Skip to content
This repository has been archived by the owner on Jul 13, 2018. It is now read-only.

Commit

Permalink
No JError
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Apr 6, 2016
1 parent 649212f commit 4b62777
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Tweet Display Back [![Analytics](https://ga-beacon.appspot.com/UA-42602973-2/twe

Compatibility
===============
The current release of *Tweet Display Back* is compatible with Joomla! 3.4.0 and newer. Older versions of the module are available for download at https://www.babdev.com/extensions/releases/tweet-display-back
The current release of *Tweet Display Back* is compatible with Joomla! 3.5.0 and newer. Older versions of the module are available for download at https://www.babdev.com/extensions/releases/tweet-display-back

Requirements
===============
Expand Down
15 changes: 4 additions & 11 deletions script.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,23 @@ class Mod_TweetDisplayBackInstallerScript
* @param string $type The action being performed
* @param JInstallerAdapterModule $parent The function calling this method
*
* @return boolean True on success, false on failure
* @return boolean
*
* @since 3.0
* @throws RuntimeException
*/
public function preflight($type, $parent)
{
// PHP Version Check
if (version_compare(PHP_VERSION, $this->minimumPHPVersion, 'lt'))
{
JError::raiseNotice(
null, JText::sprintf('MOD_TWEETDISPLAYBACK_ERROR_INSTALL_PHPVERSION', $this->minimumPHPVersion)
);

return false;
throw new RuntimeException(JText::sprintf('MOD_TWEETDISPLAYBACK_ERROR_INSTALL_PHPVERSION', $this->minimumPHPVersion));
}

// Joomla! Version Check
if (version_compare(JVERSION, $this->minimumJoomlaVersion, 'lt'))
{
JError::raiseNotice(
null, JText::sprintf('MOD_TWEETDISPLAYBACK_ERROR_INSTALL_VERSION', $this->minimumJoomlaVersion)
);

return false;
throw new RuntimeException(JText::sprintf('MOD_TWEETDISPLAYBACK_ERROR_INSTALL_VERSION', $this->minimumJoomlaVersion));
}

return true;
Expand Down

0 comments on commit 4b62777

Please sign in to comment.