Skip to content

Commit

Permalink
Merge branch 'hotfix/4.3.10'
Browse files Browse the repository at this point in the history
  • Loading branch information
leofeyer committed May 16, 2017
2 parents 1448b9d + 8347adb commit fbbb493
Show file tree
Hide file tree
Showing 57 changed files with 492 additions and 457 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,12 @@
# Contao core bundle change log

### 4.3.10 (2017-05-16)

* Correctly save and duplicate in the parent view (see #797).
* Correctly skip hidden items in the sitemap module (see #818).
* Correctly cache the unique keys in the SQL cache (see contao/core#8712).
* Correctly generate the Contao language cache (see #784).

### 4.3.9 (2017-04-25)

* Revert the Punycode library changes (see contao/core#8693).
Expand Down
10 changes: 6 additions & 4 deletions src/Cache/ContaoCacheWarmer.php
Expand Up @@ -117,8 +117,8 @@ private function generateConfigCache($cacheDir)
{
$dumper = new CombinedFileDumper($this->filesystem, new PhpFileLoader(), $cacheDir.'/contao', true);

$dumper->dump($this->findConfigFiles('autoload.php'), 'config/autoload.php');
$dumper->dump($this->findConfigFiles('config.php'), 'config/config.php');
$dumper->dump($this->findConfigFiles('autoload.php'), 'config/autoload.php', ['type' => 'namespaced']);
$dumper->dump($this->findConfigFiles('config.php'), 'config/config.php', ['type' => 'namespaced']);
}

/**
Expand All @@ -141,7 +141,8 @@ private function generateDcaCache($cacheDir)

$dumper->dump(
$this->locator->locate('dca/'.$file->getBasename(), null, false),
'dca/'.$file->getBasename()
'dca/'.$file->getBasename(),
['type' => 'namespaced']
);
}
}
Expand Down Expand Up @@ -216,10 +217,11 @@ private function generateDcaExtracts($cacheDir)
$this->filesystem->dumpFile(
sprintf('%s/contao/sql/%s.php', $cacheDir, $table),
sprintf(
"<?php\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n\$this->blnIsDbTable = true;\n",
"<?php\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n%s\n\n\$this->blnIsDbTable = true;\n",
sprintf('$this->arrMeta = %s;', var_export($extract->getMeta(), true)),
sprintf('$this->arrFields = %s;', var_export($extract->getFields(), true)),
sprintf('$this->arrOrderFields = %s;', var_export($extract->getOrderFields(), true)),
sprintf('$this->arrUniqueFields = %s;', var_export($extract->getUniqueFields(), true)),
sprintf('$this->arrKeys = %s;', var_export($extract->getKeys(), true)),
sprintf('$this->arrRelations = %s;', var_export($extract->getRelations(), true))
)
Expand Down
2 changes: 1 addition & 1 deletion src/Config/Dumper/CombinedFileDumper.php
Expand Up @@ -85,7 +85,7 @@ public function setHeader($header)
public function dump($files, $cacheFile, array $options = [])
{
$buffer = $this->header;
$type = $this->addNamespace ? PhpFileLoader::NAMESPACED : null;
$type = isset($options['type']) ? $options['type'] : null;

foreach ((array) $files as $file) {
$buffer .= $this->loader->load($file, $type);
Expand Down
4 changes: 1 addition & 3 deletions src/Config/Loader/PhpFileLoader.php
Expand Up @@ -21,8 +21,6 @@
*/
class PhpFileLoader extends Loader
{
const NAMESPACED = 'namespaced';

/**
* Reads the contents of a PHP file stripping the opening and closing PHP tags.
*
Expand All @@ -37,7 +35,7 @@ public function load($file, $type = null)

$code = $this->stripLegacyCheck($code);

if (false !== $namespace && self::NAMESPACED === $type) {
if (false !== $namespace && 'namespaced' === $type) {
$code = sprintf("\nnamespace %s {%s}\n", $namespace, $code);
}

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/config/constants.php
Expand Up @@ -10,7 +10,7 @@

// Core version
define('VERSION', '4.3');
define('BUILD', '9');
define('BUILD', '10');
define('LONG_TERM_SUPPORT', false);

// Link constants
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/contao/drivers/DC_Folder.php
Expand Up @@ -585,7 +585,7 @@ public function create()
$objSession->set('CLIPBOARD', $arrClipboard);

$this->Files->mkdir($strFolder . '/__new__');
$this->redirect(html_entity_decode($this->switchToEdit($this->urlEncode($strFolder) . '/__new__')));
$this->redirect(html_entity_decode($this->switchToEdit($strFolder . '/__new__')));
}


Expand Down Expand Up @@ -2754,7 +2754,7 @@ protected function generateTree($path, $intMargin, $mount=false, $blnProtected=t
if (\Config::get('thumbnails') && ($objFile->isSvgImage || $objFile->height <= \Config::get('gdMaxImgHeight') && $objFile->width <= \Config::get('gdMaxImgWidth')))
{
// Inline the image if no preview image will be generated (see #636)
if ($objFile->height !== null && $objFile->height <= 50 || $objFile->width !== null && $objFile->width <= 400)
if ($objFile->height !== null && $objFile->height <= 50 && $objFile->width !== null && $objFile->width <= 400)
{
$thumbnail .= '<br><img src="' . $objFile->dataUri . '" width="' . $objFile->width . '" height="' . $objFile->height . '" alt="" style="margin:0 0 2px -19px">';
}
Expand Down
56 changes: 27 additions & 29 deletions src/Resources/contao/drivers/DC_Table.php
Expand Up @@ -970,35 +970,29 @@ public function copy($blnDoNotRedirect=false)
$this->set['tstamp'] = ($blnDoNotRedirect ? time() : 0);

// Mark the new record with "copy of" (see #2938)
if (isset($GLOBALS['TL_DCA'][$this->strTable]['fields']['headline']))
foreach (array_keys($GLOBALS['TL_DCA'][$this->strTable]['fields']) as $strKey)
{
$headline = \StringUtil::deserialize($this->set['headline']);

if (!empty($headline) && is_array($headline) && $headline['value'] != '')
{
$headline['value'] = sprintf($GLOBALS['TL_LANG']['MSC']['copyOf'], $headline['value']);
$this->set['headline'] = serialize($headline);
}
}
elseif (isset($GLOBALS['TL_DCA'][$this->strTable]['fields']['name']))
{
if ($this->set['name'] != '')
{
$this->set['name'] = sprintf($GLOBALS['TL_LANG']['MSC']['copyOf'], $this->set['name']);
}
}
elseif (isset($GLOBALS['TL_DCA'][$this->strTable]['fields']['subject']))
{
if ($this->set['subject'] != '')
if (in_array($strKey, array('headline', 'name', 'subject', 'title')))
{
$this->set['subject'] = sprintf($GLOBALS['TL_LANG']['MSC']['copyOf'], $this->set['subject']);
}
}
elseif (isset($GLOBALS['TL_DCA'][$this->strTable]['fields']['title']))
{
if ($this->set['title'] != '')
{
$this->set['title'] = sprintf($GLOBALS['TL_LANG']['MSC']['copyOf'], $this->set['title']);
if ($strKey == 'headline')
{
$headline = \StringUtil::deserialize($this->set['headline']);

if (!empty($headline) && is_array($headline) && $headline['value'] != '')
{
$headline['value'] = sprintf($GLOBALS['TL_LANG']['MSC']['copyOf'], $headline['value']);
$this->set['headline'] = serialize($headline);
}
}
else
{
if ($this->set[$strKey] != '')
{
$this->set[$strKey] = sprintf($GLOBALS['TL_LANG']['MSC']['copyOf'], $this->set[$strKey]);
}
}

break;
}
}

Expand Down Expand Up @@ -2033,7 +2027,11 @@ public function edit($intId=null, $ajaxId=null)
if (!$GLOBALS['TL_DCA'][$this->strTable]['config']['closed'] && !$GLOBALS['TL_DCA'][$this->strTable]['config']['notCreatable'])
{
$arrButtons['saveNcreate'] = '<button type="submit" name="saveNcreate" id="saveNcreate" class="tl_submit" accesskey="n">'.$GLOBALS['TL_LANG']['MSC']['saveNcreate'].'</button>';
$arrButtons['saveNduplicate'] = '<button type="submit" name="saveNduplicate" id="saveNduplicate" class="tl_submit" accesskey="d">'.$GLOBALS['TL_LANG']['MSC']['saveNduplicate'].'</button>';

if (!$GLOBALS['TL_DCA'][$this->strTable]['config']['notCopyable'])
{
$arrButtons['saveNduplicate'] = '<button type="submit" name="saveNduplicate" id="saveNduplicate" class="tl_submit" accesskey="d">'.$GLOBALS['TL_LANG']['MSC']['saveNduplicate'].'</button>';
}
}

if ($GLOBALS['TL_DCA'][$this->strTable]['config']['switchToEdit'])
Expand Down Expand Up @@ -2257,7 +2255,7 @@ public function edit($intId=null, $ajaxId=null)
// Parent view
elseif ($GLOBALS['TL_DCA'][$this->strTable]['list']['sorting']['mode'] == 4)
{
$strUrl .= $this->Database->fieldExists('sorting', $this->strTable) ? '&amp;act=copy&amp;mode=1&amp;pid=' . $this->intId . '&amp;id=' . $this->intId : '&amp;act=copy&amp;mode=2&amp;pid=' . $this->intId . '&amp;id=' . $this->intId;
$strUrl .= $this->Database->fieldExists('sorting', $this->strTable) ? '&amp;act=copy&amp;mode=1&amp;pid=' . $this->intId . '&amp;id=' . $this->intId : '&amp;act=copy&amp;mode=2&amp;pid=' . CURRENT_ID . '&amp;id=' . $this->intId;
}

// List view
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/languages/cs/exception.xlf
Expand Up @@ -61,8 +61,7 @@
<target>Instalace nebyla dokončena, proto nebude moct Contao fungovat správně.</target>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<target>Prosím spuťte instalační nástroj Contaa tím, že do adresního pole Vašeho prohlížeče zadáte &lt;code&gt;/contao/install&lt;/code&gt;.</target>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href=&quot;https://contao.org/manual/installation.html&quot; target=&quot;_blank&quot;&gt;Contao manual&lt;/a&gt;.</source>
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/languages/da/exception.xlf
Expand Up @@ -59,7 +59,7 @@
<target>Installationen er ikke færdiggjort, derfor fungerer Contao ikke korrekt.</target>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href=&quot;https://contao.org/manual/installation.html&quot; target=&quot;_blank&quot;&gt;Contao manual&lt;/a&gt;.</source>
Expand Down
4 changes: 2 additions & 2 deletions src/Resources/contao/languages/de/exception.xlf
Expand Up @@ -62,8 +62,8 @@
<target>Die Installation wurde nicht abgeschlossen, daher kann Contao nicht korrekt funktionieren.</target>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<target>Bitte öffnen Sie das Contao-Installtool (&lt;code&gt;/install.php&lt;/code&gt;) in Ihrem Browser.</target>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
<target>Bitte öffnen Sie das Contao-Installtool (&lt;code&gt;/contao/install&lt;/code&gt;) in Ihrem Browser.</target>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href=&quot;https://contao.org/manual/installation.html&quot; target=&quot;_blank&quot;&gt;Contao manual&lt;/a&gt;.</source>
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/languages/en/exception.xlf
Expand Up @@ -48,7 +48,7 @@
<source>The installation has not been completed, therefore Contao cannot work properly.</source>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href="https://contao.org/manual/installation.html" target="_blank"&gt;Contao manual&lt;/a&gt;.</source>
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/languages/es/exception.xlf
Expand Up @@ -62,8 +62,7 @@
<target>La instalación no se pudo finalizar, por lo tanto Contao no funcionará debidamente.</target>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<target>Por favor abra el instalador de Contao añadiendo en su navegador (&lt;code&gt;/install.php&lt;/code&gt;).</target>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href=&quot;https://contao.org/manual/installation.html&quot; target=&quot;_blank&quot;&gt;Contao manual&lt;/a&gt;.</source>
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/languages/fa/exception.xlf
Expand Up @@ -61,8 +61,7 @@
<target>نصب تکمیل نشده است، بنابراین کانتائو به درستی کار نخواهد کرد.</target>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<target>لطفا ابزار نصب کانتائو &lt;code&gt;/install.php&lt;/code&gt; را در مرورگرتان باز کنید.</target>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href=&quot;https://contao.org/manual/installation.html&quot; target=&quot;_blank&quot;&gt;Contao manual&lt;/a&gt;.</source>
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/languages/fr/exception.xlf
Expand Up @@ -62,8 +62,7 @@
<target>L'installation n'a pas été terminée, par conséquent Contao ne peut pas fonctionner correctement.</target>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<target>Veuillez, s'il vous plaît, ouvrir l'outil d'installation de Contao (&lt;code&gt;/install.php&lt;/code&gt;) dans votre navigateur.</target>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href=&quot;https://contao.org/manual/installation.html&quot; target=&quot;_blank&quot;&gt;Contao manual&lt;/a&gt;.</source>
Expand Down
6 changes: 6 additions & 0 deletions src/Resources/contao/languages/fr/tl_page.xlf
Expand Up @@ -203,21 +203,27 @@
</trans-unit>
<trans-unit id="tl_page.includeCache.0">
<source>Set cache timeouts</source>
<target>Définir les délais d'attente du cache</target>
</trans-unit>
<trans-unit id="tl_page.includeCache.1">
<source>Set cache timeout values for the page and its subpages.</source>
<target>Définissez les valeurs de délai d'attente du cache pour la page et ses sous-pages.</target>
</trans-unit>
<trans-unit id="tl_page.cache.0">
<source>Server cache timeout</source>
<target>Délai d'attente du cache du serveur</target>
</trans-unit>
<trans-unit id="tl_page.cache.1">
<source>The number of seconds after which the page should no longer be considered fresh by shared caches.</source>
<target>Le nombre de secondes après lesquelles la page ne devrait plus être considérée comme nouvelle par des caches partagés.</target>
</trans-unit>
<trans-unit id="tl_page.clientCache.0">
<source>Client cache timeout</source>
<target>Délai d'attente du cache du client</target>
</trans-unit>
<trans-unit id="tl_page.clientCache.1">
<source>The number of seconds after which the page should no longer be considered fresh by the browser.</source>
<target>Le nombre de secondes après lequel la page ne devrait plus être considérée comme nouvelle par le navigateur.</target>
</trans-unit>
<trans-unit id="tl_page.includeChmod.0">
<source>Assign access rights</source>
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/languages/hu/exception.xlf
Expand Up @@ -61,8 +61,7 @@
<target>A telepítés nem fejeződött be, ezért a Contao nem működik megfelelően.</target>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<target>Nyissa meg a Contao telepítő eszközt (&lt;code&gt;/install.php&lt;/code&gt;) a böngészőjében.</target>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href=&quot;https://contao.org/manual/installation.html&quot; target=&quot;_blank&quot;&gt;Contao manual&lt;/a&gt;.</source>
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/languages/it/exception.xlf
Expand Up @@ -61,8 +61,7 @@
<target>Installazione non completata. Contao non è in grado di funzionare in modo corretto.</target>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<target>Apri lo strumento di installazione Contao (&lt;code&gt;/install.php&lt;/code&gt;) sul tuo browser.</target>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href=&quot;https://contao.org/manual/installation.html&quot; target=&quot;_blank&quot;&gt;Contao manual&lt;/a&gt;.</source>
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/languages/ja/default.xlf
Expand Up @@ -843,7 +843,7 @@
</trans-unit>
<trans-unit id="MSC.source.1">
<source>Please upload the CSV files to be imported.</source>
<target>インポートsuするCSVファイルをアップロードしてください。</target>
<target>インポートするCSVファイルをアップロードしてください。</target>
</trans-unit>
<trans-unit id="MSC.comma">
<source>Comma</source>
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/languages/ja/exception.xlf
Expand Up @@ -62,8 +62,7 @@
<target>インストールは完了していません、このためContaoは適切に動作しません。</target>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<target>Contaoのインストールツール(&lt;code&gt;/install.php&lt;/code&gt;ブラウザーで開いてください。</target>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href=&quot;https://contao.org/manual/installation.html&quot; target=&quot;_blank&quot;&gt;Contao manual&lt;/a&gt;.</source>
Expand Down
3 changes: 1 addition & 2 deletions src/Resources/contao/languages/nl/exception.xlf
Expand Up @@ -62,8 +62,7 @@
<target>De installatie is niet voltooid, hierdoor zal Contao niet naar behoren werken.</target>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<target>Open het Contao installatie tool (&lt;code&gt;/install.php&lt;/code&gt;) in uw browser.</target>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href=&quot;https://contao.org/manual/installation.html&quot; target=&quot;_blank&quot;&gt;Contao manual&lt;/a&gt;.</source>
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/contao/languages/rm/exception.xlf
Expand Up @@ -60,7 +60,7 @@
<target>L'installaziun n'è betg vegnida cumplettada, perquai na funcziunescha Contao betg correctamain.</target>
</trans-unit>
<trans-unit id="XPT.incompleteFix">
<source>Please open the Contao install tool (&lt;code&gt;/install.php&lt;/code&gt;) in your browser.</source>
<source>Please open the Contao install tool (&lt;code&gt;/contao/install&lt;/code&gt;) in your browser.</source>
</trans-unit>
<trans-unit id="XPT.incompleteExplain">
<source>For more information, please refer to the &lt;a href=&quot;https://contao.org/manual/installation.html&quot; target=&quot;_blank&quot;&gt;Contao manual&lt;/a&gt;.</source>
Expand Down

0 comments on commit fbbb493

Please sign in to comment.