Skip to content

Commit

Permalink
Merge tag '0.16.6'
Browse files Browse the repository at this point in the history
Bugfix release.

- Fixes #304 - warning on fresh installation.
- Fixes #305 - fatal error under PHP 7.
- Fixes #309 - minor PHP7 compatibility issue.
- Fixes #310 - correct back link in package detail view.
- Fixes #303 - bump memory limit to 1536M.
  • Loading branch information
discordier committed Mar 13, 2017
2 parents 076b0b5 + d52f0f0 commit 3092705
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 12 deletions.
6 changes: 6 additions & 0 deletions .check-author.yml
Expand Up @@ -3,3 +3,9 @@ exclude:
- tests

mapping:
"Fritz Michael Gschwantner <fmg@inspiredminds.at>":
- "Fritz Michael Gschwantner <email@spikx.net>"
- "Fritz Michael Gschwantner <github@spikx.net>"
- "fritzmg <fmg@inspiredminds.at>"
- "fritzmg <email@spikx.net>"
- "fritzmg <github@spikx.net>"
4 changes: 1 addition & 3 deletions composer.json
Expand Up @@ -55,7 +55,5 @@
"dev-master": "0.16.x-dev",
"dev-develop": "0.17.x-dev"
}
},
"prefer-stable": true,
"minimum-stability": "dev"
}
}
5 changes: 3 additions & 2 deletions src/system/modules/!composer/src/Client.php
Expand Up @@ -8,6 +8,7 @@
* @copyright ContaoCommunityAlliance 2013
* @author Christian Schiffler <c.schiffler@cyberspectrum.de>
* @author Tristan Lins <tristan.lins@bit3.de>
* @author Fritz Michael Gschwantner <fmg@inspiredminds.at>
* @package Composer
* @license LGPLv3
* @filesource
Expand Down Expand Up @@ -55,7 +56,7 @@ public function getModules()
{
$callback = $this->inactiveModulesOptionsCallback;
$this->import($callback[0]);
$modules = $this->$callback[0]->$callback[1]();
$modules = $this->{$callback[0]}->{$callback[1]}();

if (isset($modules['repository'])) {
$modules['repository'] = sprintf(
Expand All @@ -73,7 +74,7 @@ public function disableOldClientHook()
// disable the repo client
$reset = false;
$activeModules = $this->Config->getActiveModules();
$inactiveModules = deserialize($GLOBALS['TL_CONFIG']['inactiveModules']);
$inactiveModules = deserialize($GLOBALS['TL_CONFIG']['inactiveModules'], true);

if (in_array('repository', $activeModules)) {
$inactiveModules[] = 'repository';
Expand Down
11 changes: 7 additions & 4 deletions src/system/modules/!composer/src/Runtime.php
Expand Up @@ -11,6 +11,7 @@
* @author Dominik Zogg <dominik.zogg@gmail.com>
* @author Oliver Hoff <oliver@hofff.com>
* @author Nicky Hoff <nick@hofff.com>
* @author Fritz Michael Gschwantner <fmg@inspiredminds.at>
* @package Composer
* @license LGPLv3
* @filesource
Expand Down Expand Up @@ -244,7 +245,9 @@ public static function updateComposer()
if (is_file($backup)) {
unlink($backup);
}
rename($file, $backup);
if (is_file($file)) {
rename($file, $backup);
}
rename($tmpFile, $file);

return true;
Expand Down Expand Up @@ -280,9 +283,9 @@ public static function increaseMemoryLimit()
};

$memoryLimit = trim(ini_get('memory_limit'));
// Increase memory_limit if it is lower than 512M
if ($memoryLimit != -1 && $memoryInBytes($memoryLimit) < 1024 * 1024 * 1024) {
@ini_set('memory_limit', '1024M');
// Increase memory_limit if it is lower than 1.5GB
if ($memoryLimit != -1 && $memoryInBytes($memoryLimit) < 1024 * 1024 * 1536) {
@ini_set('memory_limit', '1536M');
}
unset($memoryInBytes, $memoryLimit);
}
Expand Down
Expand Up @@ -44,7 +44,7 @@ $source = $preferedCandidate->getSourceUrl();

<div class="composer_package_type_<?php echo strtolower(str_replace('-', '_', $preferedCandidate->getType())); ?>">
<div id="tl_buttons">
<a href="contao/main.php?do=composer" title="<?php echo specialchars($GLOBALS['TL_LANG']['MSC']['backBT']); ?>" class="header_back">
<a href="contao/main.php?do=composer<?php echo ($keyword = \Input::get('keyword')) ? '&amp;keyword=' . $keyword : '' ?>" title="<?php echo specialchars($GLOBALS['TL_LANG']['MSC']['backBT']); ?>" class="header_back">
<?php echo $GLOBALS['TL_LANG']['MSC']['backBT']; ?>
</a>
</div>
Expand Down
Expand Up @@ -55,7 +55,7 @@ $installationManager = $composer->getInstallationManager();
?></td>
<td class="tl_file_list col_name">
<div class="name">
<a href="contao/main.php?do=composer&amp;install=<?php echo $package['name']; ?>"><?php echo $package['name']; ?></a>
<a href="contao/main.php?do=composer&amp;install=<?php echo $package['name']; ?>&amp;keyword=<?php echo \Input::get('keyword'); ?>"><?php echo $package['name']; ?></a>
<?php
if (!$package['contao-compatible']):
?>
Expand Down Expand Up @@ -83,7 +83,7 @@ $installationManager = $composer->getInstallationManager();
);
else:
?>
<a href="contao/main.php?do=composer&amp;install=<?php echo $package['name']; ?>">
<a href="contao/main.php?do=composer&amp;install=<?php echo $package['name']; ?>&amp;keyword=<?php echo \Input::get('keyword'); ?>">
<?php echo $this->generateImage(
'system/modules/!composer/assets/images/mark_install.png',
$GLOBALS['TL_LANG']['composer_client']['mark_to_install'],
Expand Down

0 comments on commit 3092705

Please sign in to comment.