mirror of
https://github.com/joomla-extensions/patchtester.git
synced 2024-12-22 19:09:00 +00:00
Add a check for OpenSSL and https wrappers
This commit is contained in:
parent
9b1887b38c
commit
c8f48c3361
@ -25,6 +25,31 @@ class PatchtesterViewPulls extends JView
|
||||
*/
|
||||
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->items = $this->get('Items');
|
||||
$this->patches = $this->get('AppliedPatches');
|
||||
@ -37,6 +62,7 @@ class PatchtesterViewPulls extends JView
|
||||
}
|
||||
|
||||
$this->addToolbar();
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user