Skip to content

Commit

Permalink
Media extensions not populated correctly.
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Jobin committed Oct 29, 2017
1 parent 4806e0b commit b562ecb
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion rocket-nginx.ini.disabled
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
; Rocket-Nginx configuration file
; Author: Maxime Jobin
; URL: https://github.com/maximejobin/rocket-nginx
; Version: 2.1
; Version: 2.1.1

; Default configuration
[default]
Expand Down
2 changes: 1 addition & 1 deletion rocket-nginx.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Tested with WP-Rocket version: 2.10.9
# Tested with NGINX: 1.13.4 (mainline)
#
# Version 2.1
# Version 2.1.1
#
###################################################################################################

Expand Down
11 changes: 5 additions & 6 deletions rocket-parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Author: Maxime Jobin
* URL: https://github.com/maximejobin/rocket-nginx
*
* Version 2.1
* Version 2.1.1
*
**************************************************************************************************/

Expand Down Expand Up @@ -138,11 +138,11 @@ protected function generateConfigurationFiles($config) {
$output = str_replace('#!# HEADER_MEDIAS #!#', $medias_header, $output);

// Media extensions
$medias_extension = '';
if (isset($section['medias_extension']) && is_array($section['medias_extension'])) {
$medias_extension = $this->getGeneratedHeaders($section['medias_extension']);
$media_extensions = '';
if (isset($section['media_extensions']) && !empty($section['media_extensions'])) {
$media_extensions = $section['media_extensions'];
}
$output = str_replace('#!# EXTENSION_MEDIAS #!#', $medias_extension, $output);
$output = str_replace('#!# EXTENSION_MEDIAS #!#', $media_extensions, $output);


// Output the file
Expand Down Expand Up @@ -218,7 +218,6 @@ public function go() {
$this->checkConfigurationFile();

$data = $this->parseIniFile();

$this->generateConfigurationFiles($data);
}
}
Expand Down

0 comments on commit b562ecb

Please sign in to comment.