33
0
mirror of https://github.com/joomla-extensions/patchtester.git synced 2024-12-23 03:19:00 +00:00

Add a check for OpenSSL and https wrappers

This commit is contained in:
Nikolai Plath 2012-06-12 15:38:14 -05:00
parent 9b1887b38c
commit c8f48c3361

View File

@ -25,6 +25,31 @@ class PatchtesterViewPulls extends JView
*/ */
public function display($tpl = null) public function display($tpl = null)
{ {
//@TODO: move the check
$checkErrs = array();
if(true == extension_loaded ('openssl'))
$checkErrs[] = 'The OpenSSL extension must be installed and enabled in your php.ini';
if(true == in_array('https', stream_get_wrappers()))
$checkErrs[] = 'https wrappers must be enabled';
if (count($checkErrs))
{
$application = JFactory::getApplication();
$application->enqueueMessage(
'Your system does not meet the requirements to run the PullTester extension:'
, 'error');
foreach ($checkErrs as $error)
{
$application->enqueueMessage($error, 'error');
}
return $this;
}
$this->state = $this->get('State'); $this->state = $this->get('State');
$this->items = $this->get('Items'); $this->items = $this->get('Items');
$this->patches = $this->get('AppliedPatches'); $this->patches = $this->get('AppliedPatches');
@ -37,6 +62,7 @@ class PatchtesterViewPulls extends JView
} }
$this->addToolbar(); $this->addToolbar();
parent::display($tpl); parent::display($tpl);
} }