Skip to content

Commit

Permalink
Merge tag '5.7.5.12'
Browse files Browse the repository at this point in the history
Tagging 5.7.5.12


Former-commit-id: a2bf40c
Former-commit-id: 275fad14a623d804ce19b9e63a34b049614fb24e
  • Loading branch information
KorvinSzanto committed Dec 12, 2016
2 parents 73069e6 + c97b69f commit 7e55775
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 24 deletions.
2 changes: 1 addition & 1 deletion build/tasks/build-release/download.js
@@ -1,5 +1,5 @@
module.exports = function(grunt, config, parameters, done) {
var zipUrl = parameters.releaseSourceZip || 'https://github.com/concrete5/concrete5/archive/release/5.7.5.11.zip';
var zipUrl = parameters.releaseSourceZip || 'https://github.com/concrete5/concrete5/archive/5.7.x.zip';
var workFolder = parameters.releaseWorkFolder || './release';
function endForError(e) {
process.stderr.write(e.message || e);
Expand Down
27 changes: 27 additions & 0 deletions tests/tests/Core/FilesParseTest.php
@@ -0,0 +1,27 @@
<?php

class FilesParseTest extends \PHPUnit_Framework_TestCase
{

public function testFilesParse()
{
foreach ($this->getPhpFiles(DIR_BASE_CORE . "/src") as $file) {
$this->loadFile(array_shift($file));
}
}

private function getPhpFiles($path)
{
$directory = new RecursiveDirectoryIterator($path);
$iterator = new RecursiveIteratorIterator($directory);
return new RegexIterator($iterator, '/^.+\.php$/i', RecursiveRegexIterator::GET_MATCH);
}

private function loadFile($path)
{
ob_start();
require_once $path;
ob_end_clean();
}

}
4 changes: 2 additions & 2 deletions web/concrete/config/concrete.php
Expand Up @@ -7,8 +7,8 @@
*
* @var string
*/
'version' => '5.7.5.11',
'version_installed' => '5.7.5.11',
'version' => '5.7.5.12',
'version_installed' => '5.7.5.12',
'version_db' => '20160615000000', // the key of the latest database migration

/**
Expand Down
38 changes: 17 additions & 21 deletions web/concrete/src/System/Info.php
Expand Up @@ -60,10 +60,8 @@ class Info

public function __construct()
{
$currentLocale = Localization::activeLocale();
if ($currentLocale != 'en_US') {
Localization::changeLocale('en_US');
}
$loc = Localization::getInstance();
$loc->pushActiveContext('system');
try {
$app = Facade::getFacadeApplication();
$config = $app->make('config');
Expand All @@ -76,14 +74,14 @@ public function __construct()

$this->coreRootDirectory = DIR_BASE_CORE;

$versions = ['Core Version - '.$config->get('concrete.version')];
$versions = array('Core Version - '.$config->get('concrete.version'));
if ($this->installed) {
$versions[] = 'Version Installed - '.$config->get('concrete.version_installed');
}
$versions[] = 'Database Version - '.$config->get('concrete.version_db');
$this->coreVersions = implode("\n", $versions);

$packages = [];
$packages = array();
if ($this->installed) {
foreach (PackageList::get()->getPackages() as $p) {
if ($p->isPackageInstalled()) {
Expand All @@ -101,7 +99,7 @@ public function __construct()
$this->overrides = implode(', ', $overrides);
}

$cache = [
$cache = array(
sprintf('Block Cache - %s', $config->get('concrete.cache.blocks') ? 'On' : 'Off'),
sprintf('Overrides Cache - %s', $config->get('concrete.cache.overrides') ? 'On' : 'Off'),
sprintf('Full Page Caching - %s',
Expand All @@ -115,7 +113,7 @@ public function __construct()
'Off'
)
),
];
);
if ($config->get('concrete.cache.full_page_lifetime')) {
$cache[] = sprintf("Full Page Cache Lifetime - %s",
$config->get('concrete.cache.full_page_lifetime') == 'default' ?
Expand Down Expand Up @@ -152,7 +150,7 @@ public function __construct()
ob_start();
phpinfo();
$buffer = ob_get_clean();
$phpinfo = [];
$phpinfo = array();
if ($app->isRunThroughCommandLineInterface()) {
$section = null;
foreach (preg_split('/[\r\n]+/', $buffer) as $line) {
Expand All @@ -171,30 +169,30 @@ public function __construct()
break;
default:
if ($section !== null) {
$phpinfo[$section][$chunks[0]] = [$chunks[1], $chunks[2]];
$phpinfo[$section][$chunks[0]] = array($chunks[1], $chunks[2]);
}
break;
}
}
} else {
$section = 'phpinfo';
$phpinfo[$section] = [];
$phpinfo[$section] = array();
if (preg_match_all('#(?:<h2>(?:<a name=".*?">)?(.*?)(?:</a>)?</h2>)|(?:<tr(?: class=".*?")?><t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>(?:<t[hd](?: class=".*?")?>(.*?)\s*</t[hd]>)?)?</tr>)#s', $buffer, $matches, PREG_SET_ORDER)) {
foreach ($matches as $match) {
if ($match[1] !== null && $match[1] !== '') {
$section = $match[1];
$phpinfo[$section] = [];
$phpinfo[$section] = array();
} elseif (isset($match[3])) {
$phpinfo[$section][$match[2]] = isset($match[4]) ? [$match[3], $match[4]] : $match[3];
$phpinfo[$section][$match[2]] = isset($match[4]) ? array($match[3], $match[4]) : $match[3];
} else {
$phpinfo[$section][] = $match[2];
}
}
}
}
$phpSettings = [
$phpSettings = array(
"max_execution_time - $maxExecutionTime",
];
);
foreach ($phpinfo as $name => $section) {
foreach ($section as $key => $val) {
if (preg_match('/.*max_execution_time*/', $key)) {
Expand All @@ -213,13 +211,10 @@ public function __construct()
}
}
$this->phpSettings = implode("\n", $phpSettings);
if ($currentLocale != 'en_US') {
Localization::changeLocale($currentLocale);
}

$loc->popActiveContext();
} catch (\Exception $x) {
if ($currentLocale != 'en_US') {
Localization::changeLocale($currentLocale);
}
$loc->popActiveContext();
throw $x;
}
}
Expand Down Expand Up @@ -344,4 +339,5 @@ public function getJSONOBject()
$o->coreVersions = $this->coreVersions;
return $o;
}

}

0 comments on commit 7e55775

Please sign in to comment.