Skip to content

Commit

Permalink
Test for mcrypt support in the installer
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Babker committed Mar 21, 2016
1 parent 53e4c1f commit a236e7f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
2 changes: 2 additions & 0 deletions installation/language/en-AU/en-AU.ini
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,10 @@ INSTL_MAGIC_QUOTES_GPC="Magic Quotes GPC Off"
INSTL_MAGIC_QUOTES_RUNTIME="Magic Quotes Runtime"
INSTL_MB_LANGUAGE_IS_DEFAULT="MB Language is Default"
INSTL_MB_STRING_OVERLOAD_OFF="MB String Overload Off"
INSTL_MCRYPT_SUPPORT_AVAILABLE="Mcrypt Support"
INSTL_NOTICEMBLANGNOTDEFAULT="PHP mbstring language is not set to neutral. This can be set locally by entering <strong>php_value mbstring.language neutral</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMBSTRINGOVERLOAD="PHP mbstring function overload is set. This can be turned off locally by entering <strong>php_value mbstring.func_overload 0</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMCRYPTNOTAVAILABLE="Warning! PHP mcrypt extension should be installed or enabled. Without this, some features of Joomla will not be available."
INSTL_NOTICEYOUCANSTILLINSTALL="<br />You can still continue the installation as the configuration settings will be displayed at the end. You will have to manually upload the code. Select in the text area to highlight all of the code and then paste into a new text file. Name this file 'configuration.php' and upload it to your site root folder."
INSTL_OUTPUT_BUFFERING="Output Buffering"
INSTL_PARSE_INI_FILE_AVAILABLE="INI Parser Support"
Expand Down
2 changes: 2 additions & 0 deletions installation/language/en-CA/en-CA.ini
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ INSTL_MAGIC_QUOTES_GPC="Magic Quotes GPC Off"
INSTL_MAGIC_QUOTES_RUNTIME="Magic Quotes Runtime"
INSTL_MB_LANGUAGE_IS_DEFAULT="MB Language is Default"
INSTL_MB_STRING_OVERLOAD_OFF="MB String Overload Off"
INSTL_MCRYPT_SUPPORT_AVAILABLE="Mcrypt Support"
INSTL_NOTICEMBLANGNOTDEFAULT="PHP mbstring language is not set to neutral. This can be set locally by entering <strong>php_value mbstring.language neutral</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMBSTRINGOVERLOAD="PHP mbstring function overload is set. This can be turned off locally by entering <strong>php_value mbstring.func_overload 0</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMCRYPTNOTAVAILABLE="Warning! PHP mcrypt extension should be installed or enabled. Without this, some features of Joomla will not be available."
INSTL_NOTICEYOUCANSTILLINSTALL="<br />You can still continue the installation as the configuration settings will be displayed at the end. You will have to manually upload the code. Select in the text area to highlight all of the code and then paste into a new text file. Name this file 'configuration.php' and upload it to your site root folder."
INSTL_OUTPUT_BUFFERING="Output Buffering"
INSTL_PAGE_TITLE="Joomla! Web Installer"
Expand Down
2 changes: 2 additions & 0 deletions installation/language/en-GB/en-GB.ini
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,10 @@ INSTL_MAGIC_QUOTES_GPC="Magic Quotes GPC Off"
INSTL_MAGIC_QUOTES_RUNTIME="Magic Quotes Runtime"
INSTL_MB_LANGUAGE_IS_DEFAULT="MB Language is Default"
INSTL_MB_STRING_OVERLOAD_OFF="MB String Overload Off"
INSTL_MCRYPT_SUPPORT_AVAILABLE="Mcrypt Support"
INSTL_NOTICEMBLANGNOTDEFAULT="PHP mbstring language is not set to neutral. This can be set locally by entering <strong>php_value mbstring.language neutral</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMBSTRINGOVERLOAD="PHP mbstring function overload is set. This can be turned off locally by entering <strong>php_value mbstring.func_overload 0</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMCRYPTNOTAVAILABLE="Warning! PHP mcrypt extension should be installed or enabled. Without this, some features of Joomla will not be available."
INSTL_NOTICEYOUCANSTILLINSTALL="<br />You can still continue the installation as the configuration settings will be displayed at the end. You will have to manually upload the code. Select in the text area to highlight all of the code and then paste into a new text file. Name this file 'configuration.php' and upload it to your site root folder."
INSTL_OUTPUT_BUFFERING="Output Buffering"
INSTL_PARSE_INI_FILE_AVAILABLE="INI Parser Support"
Expand Down
2 changes: 2 additions & 0 deletions installation/language/en-US/en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,10 @@ INSTL_MAGIC_QUOTES_GPC="Magic Quotes GPC Off"
INSTL_MAGIC_QUOTES_RUNTIME="Magic Quotes Runtime"
INSTL_MB_LANGUAGE_IS_DEFAULT="MB Language is Default"
INSTL_MB_STRING_OVERLOAD_OFF="MB String Overload Off"
INSTL_MCRYPT_SUPPORT_AVAILABLE="Mcrypt Support"
INSTL_NOTICEMBLANGNOTDEFAULT="PHP mbstring language is not set to neutral. This can be set locally by entering <strong>php_value mbstring.language neutral</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMBSTRINGOVERLOAD="PHP mbstring function overload is set. This can be turned off locally by entering <strong>php_value mbstring.func_overload 0</strong> in your <code>.htaccess</code> file."
INSTL_NOTICEMCRYPTNOTAVAILABLE="Warning! PHP mcrypt extension should be installed or enabled. Without this, some features of Joomla will not be available."
INSTL_NOTICEYOUCANSTILLINSTALL="<br />You can still continue the installation as the configuration settings will be displayed at the end. You will have to manually upload the code. Select in the text area to highlight all of the code and then paste into a new text file. Name this file 'configuration.php' and upload it to your site root folder."
INSTL_OUTPUT_BUFFERING="Output Buffering"
INSTL_PAGE_TITLE="Joomla! Web Installer"
Expand Down
7 changes: 7 additions & 0 deletions installation/model/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,13 @@ public function getPhpOptions()
$option->notice = null;
$options[] = $option;

// Check for mcrypt support
$option = new stdClass;
$option->label = JText::_('INSTL_MCRYPT_SUPPORT_AVAILABLE');
$option->state = is_callable('mcrypt_encrypt');
$option->notice = $option->state ? null : JText::_('INSTL_NOTICEMCRYPTNOTAVAILABLE');
$options[] = $option;

// Check for configuration file writable.
$writable = (is_writable(JPATH_CONFIGURATION . '/configuration.php')
|| (!file_exists(JPATH_CONFIGURATION . '/configuration.php') && is_writable(JPATH_ROOT)));
Expand Down

0 comments on commit a236e7f

Please sign in to comment.