diff --git a/.gitignore b/.gitignore
index 52695ce89a..8028c843fc 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,5 +2,8 @@
/composer.lock
/vendor/
+# Node
+/node_modules/
+
# PhpUnit
/phpunit.xml
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ebb85b5cf8..d17cf4e063 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,12 @@
# Contao core bundle change log
+### 4.4.7 (2017-10-12)
+
+ * Show broken images in the file manager (see #1116).
+ * Copy the existing referers if a new referer ID is initialized (see #1117).
+ * Stop using the TinyMCE gzip compressor (deprecated since 2014).
+ * Prevent the User::authenticate() method from running twice (see #1067).
+
### 4.4.6 (2017-09-28)
* Bind the lock file path to the installation root directory (see #1107).
diff --git a/composer.json b/composer.json
index 413ff49921..946aca451f 100644
--- a/composer.json
+++ b/composer.json
@@ -67,7 +67,7 @@
"contao-components/swipe": "^2.0.3",
"contao-components/tablesort": "^3.4.5",
"contao-components/tablesorter": "^2.0.5.3",
- "contao-components/tinymce4": "^4.6.3"
+ "contao-components/tinymce4": "4.6.*"
},
"require-dev": {
"ext-fileinfo": "*",
diff --git a/src/Cache/ContaoCacheWarmer.php b/src/Cache/ContaoCacheWarmer.php
index b9e41e7826..c862f44790 100644
--- a/src/Cache/ContaoCacheWarmer.php
+++ b/src/Cache/ContaoCacheWarmer.php
@@ -270,14 +270,25 @@ private function generateTemplateMapper($cacheDir)
private function getLanguagesInUse()
{
// Get all languages in use (see #6013)
- $query = "
- SELECT language FROM tl_member
- UNION SELECT language FROM tl_user
- UNION SELECT REPLACE(language, '-', '_') FROM tl_page
- WHERE type='root'
- ";
-
- $statement = $this->connection->prepare($query);
+ $statement = $this->connection->prepare("
+ SELECT
+ language
+ FROM
+ tl_member
+ UNION
+ SELECT
+ language
+ FROM
+ tl_user
+ UNION
+ SELECT
+ REPLACE(language, '-', '_')
+ FROM
+ tl_page
+ WHERE
+ type = 'root'
+ ");
+
$statement->execute();
$languages = [];
diff --git a/src/Cors/WebsiteRootsConfigProvider.php b/src/Cors/WebsiteRootsConfigProvider.php
index d56c4a52fe..4615918f5e 100644
--- a/src/Cors/WebsiteRootsConfigProvider.php
+++ b/src/Cors/WebsiteRootsConfigProvider.php
@@ -46,11 +46,21 @@ public function getOptions(Request $request)
return [];
}
- $stmt = $this->connection->prepare("SELECT id FROM tl_page WHERE type='root' AND dns=:dns");
+ $stmt = $this->connection->prepare("
+ SELECT EXISTS (
+ SELECT
+ id
+ FROM
+ tl_page
+ WHERE
+ type = 'root' AND dns = :dns
+ )
+ ");
+
$stmt->bindValue('dns', preg_replace('@^https?://@', '', $request->headers->get('origin')));
$stmt->execute();
- if (0 === $stmt->rowCount()) {
+ if (!$stmt->fetchColumn()) {
return [];
}
diff --git a/src/Doctrine/Schema/DcaSchemaProvider.php b/src/Doctrine/Schema/DcaSchemaProvider.php
index 97d45cbc48..ad617c1be6 100644
--- a/src/Doctrine/Schema/DcaSchemaProvider.php
+++ b/src/Doctrine/Schema/DcaSchemaProvider.php
@@ -82,7 +82,7 @@ public function appendToSchema(Schema $schema)
if (isset($definitions['TABLE_FIELDS'])) {
foreach ($definitions['TABLE_FIELDS'] as $fieldName => $sql) {
- $this->parseColumnSql($table, $fieldName, strtolower(substr($sql, strlen($fieldName) + 3)));
+ $this->parseColumnSql($table, $fieldName, substr($sql, strlen($fieldName) + 3));
}
}
@@ -161,19 +161,19 @@ private function parseColumnSql(Table $table, $columnName, $sql)
$type = $this->doctrine->getConnection()->getDatabasePlatform()->getDoctrineTypeMapping($type);
$length = (0 === (int) $length) ? null : (int) $length;
- if (preg_match('/default (\'[^\']*\'|\d+)/', $def, $match)) {
+ if (preg_match('/default (\'[^\']*\'|\d+)/i', $def, $match)) {
$default = trim($match[1], "'");
}
$options = [
'length' => $length,
- 'unsigned' => false !== strpos($def, 'unsigned'),
+ 'unsigned' => false !== stripos($def, 'unsigned'),
'fixed' => $fixed,
'default' => $default,
- 'notnull' => false !== strpos($def, 'not null'),
+ 'notnull' => false !== stripos($def, 'not null'),
'scale' => null,
'precision' => null,
- 'autoincrement' => false !== strpos($def, 'auto_increment'),
+ 'autoincrement' => false !== stripos($def, 'auto_increment'),
'comment' => null,
];
@@ -188,12 +188,12 @@ private function parseColumnSql(Table $table, $columnName, $sql)
/**
* Sets the length, scale, precision and fixed values by field type.
*
- * @param string $type
- * @param string $dbType
- * @param int $length
- * @param int $scale
- * @param int $precision
- * @param bool $fixed
+ * @param string $type
+ * @param string $dbType
+ * @param int|null $length
+ * @param int $scale
+ * @param int $precision
+ * @param bool $fixed
*/
private function setLengthAndPrecisionByType($type, $dbType, &$length, &$scale, &$precision, &$fixed)
{
diff --git a/src/EventListener/StoreRefererListener.php b/src/EventListener/StoreRefererListener.php
index 290d5ca193..b37af1898d 100644
--- a/src/EventListener/StoreRefererListener.php
+++ b/src/EventListener/StoreRefererListener.php
@@ -148,7 +148,7 @@ private function prepareBackendReferer($refererId, array $referers = null)
}
if (!isset($referers[$refererId]) || !is_array($referers[$refererId])) {
- $referers[$refererId] = ['last' => ''];
+ $referers[$refererId] = end($referers) ?: ['last' => ''];
}
// Make sure we never have more than 25 different referer URLs
diff --git a/src/Monolog/ContaoTableHandler.php b/src/Monolog/ContaoTableHandler.php
index 44a67b5d42..2167550099 100644
--- a/src/Monolog/ContaoTableHandler.php
+++ b/src/Monolog/ContaoTableHandler.php
@@ -134,8 +134,11 @@ private function createStatement()
}
$this->statement = $this->container->get($this->dbalServiceName)->prepare('
- INSERT INTO tl_log (tstamp, source, action, username, text, func, ip, browser)
- VALUES (:tstamp, :source, :action, :username, :text, :func, :ip, :browser)
+ INSERT INTO
+ tl_log
+ (tstamp, source, action, username, text, func, ip, browser)
+ VALUES
+ (:tstamp, :source, :action, :username, :text, :func, :ip, :browser)
');
}
diff --git a/src/Resources/contao/config/constants.php b/src/Resources/contao/config/constants.php
index 551062da7e..4e64169687 100644
--- a/src/Resources/contao/config/constants.php
+++ b/src/Resources/contao/config/constants.php
@@ -10,7 +10,7 @@
// Core version
define('VERSION', '4.4');
-define('BUILD', '6');
+define('BUILD', '7');
define('LONG_TERM_SUPPORT', true);
// Link constants
diff --git a/src/Resources/contao/controllers/BackendAlerts.php b/src/Resources/contao/controllers/BackendAlerts.php
index 1255a7d488..50a0d26b13 100644
--- a/src/Resources/contao/controllers/BackendAlerts.php
+++ b/src/Resources/contao/controllers/BackendAlerts.php
@@ -10,6 +10,7 @@
namespace Contao;
+use Contao\CoreBundle\Exception\AccessDeniedException;
use Symfony\Component\HttpFoundation\Response;
@@ -35,7 +36,10 @@ public function __construct()
$this->import('BackendUser', 'User');
parent::__construct();
- $this->User->authenticate();
+ if (!\System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_USER'))
+ {
+ throw new AccessDeniedException('Access denied');
+ }
\System::loadLanguageFile('default');
}
diff --git a/src/Resources/contao/controllers/BackendConfirm.php b/src/Resources/contao/controllers/BackendConfirm.php
index a37b49f9ef..d647e25b98 100644
--- a/src/Resources/contao/controllers/BackendConfirm.php
+++ b/src/Resources/contao/controllers/BackendConfirm.php
@@ -10,6 +10,7 @@
namespace Contao;
+use Contao\CoreBundle\Exception\AccessDeniedException;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
@@ -36,7 +37,10 @@ public function __construct()
$this->import('BackendUser', 'User');
parent::__construct();
- $this->User->authenticate();
+ if (!\System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_USER'))
+ {
+ throw new AccessDeniedException('Access denied');
+ }
\System::loadLanguageFile('default');
\System::loadLanguageFile('modules');
diff --git a/src/Resources/contao/controllers/BackendFile.php b/src/Resources/contao/controllers/BackendFile.php
index a48807158a..dd2270b336 100644
--- a/src/Resources/contao/controllers/BackendFile.php
+++ b/src/Resources/contao/controllers/BackendFile.php
@@ -10,6 +10,7 @@
namespace Contao;
+use Contao\CoreBundle\Exception\AccessDeniedException;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
@@ -44,7 +45,11 @@ public function __construct()
$this->import('BackendUser', 'User');
parent::__construct();
- $this->User->authenticate();
+ if (!\System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_USER'))
+ {
+ throw new AccessDeniedException('Access denied');
+ }
+
\System::loadLanguageFile('default');
}
diff --git a/src/Resources/contao/controllers/BackendHelp.php b/src/Resources/contao/controllers/BackendHelp.php
index 08964715ee..e195e65485 100644
--- a/src/Resources/contao/controllers/BackendHelp.php
+++ b/src/Resources/contao/controllers/BackendHelp.php
@@ -10,6 +10,7 @@
namespace Contao;
+use Contao\CoreBundle\Exception\AccessDeniedException;
use Symfony\Component\HttpFoundation\Response;
@@ -35,7 +36,10 @@ public function __construct()
$this->import('BackendUser', 'User');
parent::__construct();
- $this->User->authenticate();
+ if (!\System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_USER'))
+ {
+ throw new AccessDeniedException('Access denied');
+ }
\System::loadLanguageFile('default');
\System::loadLanguageFile('modules');
diff --git a/src/Resources/contao/controllers/BackendMain.php b/src/Resources/contao/controllers/BackendMain.php
index 042df72638..a4a534a91c 100644
--- a/src/Resources/contao/controllers/BackendMain.php
+++ b/src/Resources/contao/controllers/BackendMain.php
@@ -12,6 +12,7 @@
use Contao\CoreBundle\Event\ContaoCoreEvents;
use Contao\CoreBundle\Event\PreviewUrlCreateEvent;
+use Contao\CoreBundle\Exception\AccessDeniedException;
use Knp\Bundle\TimeBundle\DateTimeFormatter;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
@@ -51,7 +52,10 @@ public function __construct()
$this->import('BackendUser', 'User');
parent::__construct();
- $this->User->authenticate();
+ if (!\System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_USER'))
+ {
+ throw new AccessDeniedException('Access denied');
+ }
// Password change required
if ($this->User->pwChange)
diff --git a/src/Resources/contao/controllers/BackendPage.php b/src/Resources/contao/controllers/BackendPage.php
index 76386c7a9a..3ba190ad87 100644
--- a/src/Resources/contao/controllers/BackendPage.php
+++ b/src/Resources/contao/controllers/BackendPage.php
@@ -10,6 +10,7 @@
namespace Contao;
+use Contao\CoreBundle\Exception\AccessDeniedException;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
@@ -44,7 +45,11 @@ public function __construct()
$this->import('BackendUser', 'User');
parent::__construct();
- $this->User->authenticate();
+ if (!\System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_USER'))
+ {
+ throw new AccessDeniedException('Access denied');
+ }
+
\System::loadLanguageFile('default');
}
diff --git a/src/Resources/contao/controllers/BackendPassword.php b/src/Resources/contao/controllers/BackendPassword.php
index 4ed2e63d8a..55218f6f38 100644
--- a/src/Resources/contao/controllers/BackendPassword.php
+++ b/src/Resources/contao/controllers/BackendPassword.php
@@ -10,6 +10,7 @@
namespace Contao;
+use Contao\CoreBundle\Exception\AccessDeniedException;
use Patchwork\Utf8;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
@@ -37,7 +38,10 @@ public function __construct()
$this->import('BackendUser', 'User');
parent::__construct();
- $this->User->authenticate();
+ if (!\System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_USER'))
+ {
+ throw new AccessDeniedException('Access denied');
+ }
\System::loadLanguageFile('default');
\System::loadLanguageFile('modules');
diff --git a/src/Resources/contao/controllers/BackendPopup.php b/src/Resources/contao/controllers/BackendPopup.php
index 0434502cc1..d3b17f0d80 100644
--- a/src/Resources/contao/controllers/BackendPopup.php
+++ b/src/Resources/contao/controllers/BackendPopup.php
@@ -10,6 +10,7 @@
namespace Contao;
+use Contao\CoreBundle\Exception\AccessDeniedException;
use Symfony\Component\HttpFoundation\Response;
@@ -42,7 +43,11 @@ public function __construct()
$this->import('BackendUser', 'User');
parent::__construct();
- $this->User->authenticate();
+ if (!\System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_USER'))
+ {
+ throw new AccessDeniedException('Access denied');
+ }
+
\System::loadLanguageFile('default');
$strFile = \Input::get('src', true);
diff --git a/src/Resources/contao/controllers/BackendPreview.php b/src/Resources/contao/controllers/BackendPreview.php
index 357d7d25c5..bb52576d5d 100644
--- a/src/Resources/contao/controllers/BackendPreview.php
+++ b/src/Resources/contao/controllers/BackendPreview.php
@@ -12,6 +12,7 @@
use Contao\CoreBundle\Event\ContaoCoreEvents;
use Contao\CoreBundle\Event\PreviewUrlConvertEvent;
+use Contao\CoreBundle\Exception\AccessDeniedException;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;
@@ -38,7 +39,11 @@ public function __construct()
$this->import('BackendUser', 'User');
parent::__construct();
- $this->User->authenticate();
+ if (!\System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_USER'))
+ {
+ throw new AccessDeniedException('Access denied');
+ }
+
\System::loadLanguageFile('default');
}
diff --git a/src/Resources/contao/controllers/BackendSwitch.php b/src/Resources/contao/controllers/BackendSwitch.php
index 745602d27b..20d4179365 100644
--- a/src/Resources/contao/controllers/BackendSwitch.php
+++ b/src/Resources/contao/controllers/BackendSwitch.php
@@ -10,6 +10,7 @@
namespace Contao;
+use Contao\CoreBundle\Exception\AccessDeniedException;
use Symfony\Component\HttpFoundation\Response;
@@ -35,7 +36,11 @@ public function __construct()
$this->import('BackendUser', 'User');
parent::__construct();
- $this->User->authenticate();
+ if (!\System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_USER'))
+ {
+ throw new AccessDeniedException('Access denied');
+ }
+
\System::loadLanguageFile('default');
}
diff --git a/src/Resources/contao/controllers/FrontendIndex.php b/src/Resources/contao/controllers/FrontendIndex.php
index 8a92a730eb..4e7fd38924 100644
--- a/src/Resources/contao/controllers/FrontendIndex.php
+++ b/src/Resources/contao/controllers/FrontendIndex.php
@@ -63,7 +63,6 @@ public function run()
// Throw a 404 error if the request is not a Contao request (see #2864)
elseif ($pageId === false)
{
- $this->User->authenticate();
throw new PageNotFoundException('Page not found: ' . \Environment::get('uri'));
}
@@ -182,7 +181,6 @@ public function renderPage($pageModel)
if (preg_match($regex, \Environment::get('relativeRequest')))
{
- $this->User->authenticate();
throw new PageNotFoundException('Page not found: ' . \Environment::get('uri'));
}
}
@@ -230,15 +228,13 @@ public function renderPage($pageModel)
// Load an error 404 page object
if ($objPage->domain != \Environment::get('host'))
{
- $this->User->authenticate();
$this->log('Page ID "' . $objPage->id . '" was requested via "' . \Environment::get('host') . '" but can only be accessed via "' . $objPage->domain . '" (' . \Environment::get('base') . \Environment::get('request') . ')', __METHOD__, TL_ERROR);
-
throw new PageNotFoundException('Page not found: ' . \Environment::get('uri'));
}
}
// Authenticate the user
- if (!$this->User->authenticate() && $objPage->protected)
+ if ($objPage->protected && !\System::getContainer()->get('security.authorization_checker')->isGranted('ROLE_MEMBER'))
{
throw new AccessDeniedException('Access denied: ' . \Environment::get('uri'));
}
diff --git a/src/Resources/contao/dca/tl_member.php b/src/Resources/contao/dca/tl_member.php
index ed2d8f4a55..f635dbc144 100644
--- a/src/Resources/contao/dca/tl_member.php
+++ b/src/Resources/contao/dca/tl_member.php
@@ -340,7 +340,7 @@
(
array('tl_member', 'setNewPassword')
),
- 'sql' => "varchar(128) NOT NULL default ''"
+ 'sql' => "varchar(255) NOT NULL default ''"
),
'assignDir' => array
(
diff --git a/src/Resources/contao/dca/tl_user.php b/src/Resources/contao/dca/tl_user.php
index b7f8a3d18f..18820b105e 100644
--- a/src/Resources/contao/dca/tl_user.php
+++ b/src/Resources/contao/dca/tl_user.php
@@ -258,7 +258,7 @@
'exclude' => true,
'inputType' => 'password',
'eval' => array('mandatory'=>true, 'preserveTags'=>true, 'minlength'=>Config::get('minPasswordLength')),
- 'sql' => "varchar(128) NOT NULL default ''"
+ 'sql' => "varchar(255) NOT NULL default ''"
),
'pwChange' => array
(
diff --git a/src/Resources/contao/drivers/DC_Folder.php b/src/Resources/contao/drivers/DC_Folder.php
index 81bbaddcfb..b2d584e968 100644
--- a/src/Resources/contao/drivers/DC_Folder.php
+++ b/src/Resources/contao/drivers/DC_Folder.php
@@ -16,6 +16,7 @@
use Contao\CoreBundle\Picker\PickerInterface;
use Contao\CoreBundle\Util\SymlinkUtil;
use Contao\Image\ResizeConfiguration;
+use Imagine\Exception\RuntimeException;
use Imagine\Gd\Imagine;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpFoundation\Session\Attribute\AttributeBagInterface;
@@ -326,12 +327,12 @@ public function showAll()
{
list($t, $f) = explode('.', $GLOBALS['TL_DCA'][$this->strTable]['fields']['name']['foreignKey']);
- $objRoot = $this->Database->prepare("SELECT path, type, extension FROM {$this->strTable} WHERE (" . $strPattern . " OR " . sprintf($strPattern, "(SELECT $f FROM $t WHERE $t.id={$this->strTable}.name)") . ") GROUP BY path")
+ $objRoot = $this->Database->prepare("SELECT path, type, extension FROM {$this->strTable} WHERE (" . $strPattern . " OR " . sprintf($strPattern, "(SELECT $f FROM $t WHERE $t.id={$this->strTable}.name)") . ")")
->execute($for, $for);
}
else
{
- $objRoot = $this->Database->prepare("SELECT path, type, extension FROM {$this->strTable} WHERE " . $strPattern . " GROUP BY path")
+ $objRoot = $this->Database->prepare("SELECT path, type, extension FROM {$this->strTable} WHERE " . $strPattern)
->execute($for);
}
@@ -2699,7 +2700,7 @@ protected function generateTree($path, $intMargin, $mount=false, $blnProtected=t
$thumbnail .= ')';
// Generate the thumbnail
- if ($objFile->isImage && $objFile->viewHeight > 0 && \Config::get('thumbnails'))
+ if (\Config::get('thumbnails') && $objFile->isImage && (!$objFile->isSvgImage || $objFile->viewHeight > 0))
{
$blnCanResize = true;
@@ -2711,21 +2712,28 @@ protected function generateTree($path, $intMargin, $mount=false, $blnProtected=t
if ($blnCanResize)
{
- // 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)
+ try
{
- $thumbnail .= '
';
- }
- else
- {
- $thumbnail .= '
' . \Image::getHtml(\System::getContainer()->get('contao.image.image_factory')->create(TL_ROOT . '/' . rawurldecode($currentEncoded), array(400, 50, ResizeConfiguration::MODE_BOX))->getUrl(TL_ROOT), '', 'style="margin:0 0 2px -18px"');
- }
+ // 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)
+ {
+ $thumbnail .= '
';
+ }
+ else
+ {
+ $thumbnail .= '
' . \Image::getHtml(\System::getContainer()->get('contao.image.image_factory')->create(TL_ROOT . '/' . rawurldecode($currentEncoded), array(400, 50, ResizeConfiguration::MODE_BOX))->getUrl(TL_ROOT), '', 'style="margin:0 0 2px -18px"');
+ }
- $importantPart = \System::getContainer()->get('contao.image.image_factory')->create(TL_ROOT . '/' . rawurldecode($currentEncoded))->getImportantPart();
+ $importantPart = \System::getContainer()->get('contao.image.image_factory')->create(TL_ROOT . '/' . rawurldecode($currentEncoded))->getImportantPart();
- if ($importantPart->getPosition()->getX() > 0 || $importantPart->getPosition()->getY() > 0 || $importantPart->getSize()->getWidth() < $objFile->width || $importantPart->getSize()->getHeight() < $objFile->height)
+ if ($importantPart->getPosition()->getX() > 0 || $importantPart->getPosition()->getY() > 0 || $importantPart->getSize()->getWidth() < $objFile->width || $importantPart->getSize()->getHeight() < $objFile->height)
+ {
+ $thumbnail .= ' ' . \Image::getHtml(\System::getContainer()->get('contao.image.image_factory')->create(TL_ROOT . '/' . rawurldecode($currentEncoded), (new ResizeConfiguration())->setWidth(320)->setHeight(40)->setMode(ResizeConfiguration::MODE_BOX)->setZoomLevel(100))->getUrl(TL_ROOT), '', 'style="margin:0 0 2px 0;vertical-align:bottom"');
+ }
+ }
+ catch (RuntimeException $e)
{
- $thumbnail .= ' ' . \Image::getHtml(\System::getContainer()->get('contao.image.image_factory')->create(TL_ROOT . '/' . rawurldecode($currentEncoded), (new ResizeConfiguration())->setWidth(320)->setHeight(40)->setMode(ResizeConfiguration::MODE_BOX)->setZoomLevel(100))->getUrl(TL_ROOT), '', 'style="margin:0 0 2px 0;vertical-align:bottom"');
+ $thumbnail .= '
Broken image!
'; } } } diff --git a/src/Resources/contao/drivers/DC_Table.php b/src/Resources/contao/drivers/DC_Table.php index cde8cdbb64..737fc37199 100644 --- a/src/Resources/contao/drivers/DC_Table.php +++ b/src/Resources/contao/drivers/DC_Table.php @@ -45,12 +45,6 @@ class DC_Table extends \DataContainer implements \listable, \editable */ protected $ctable; - /** - * ID of the button container - * @var string - */ - protected $bid; - /** * Limit (database query) * @var string @@ -293,7 +287,6 @@ public function showAll() { $return = ''; $this->limit = ''; - $this->bid = 'tl_buttons'; /** @var SessionInterface $objSession */ $objSession = \System::getContainer()->get('session'); @@ -4588,7 +4581,6 @@ protected function parentView() */ protected function listView() { - $return = ''; $table = ($GLOBALS['TL_DCA'][$this->strTable]['list']['sorting']['mode'] == 6) ? $this->ptable : $this->strTable; $orderBy = $GLOBALS['TL_DCA'][$this->strTable]['list']['sorting']['fields']; $firstOrderBy = preg_replace('/\s+.*$/', '', $orderBy[0]); @@ -4686,18 +4678,14 @@ protected function listView() } $objRow = $objRowStmt->execute($this->values); - $this->bid = ($return != '') ? $this->bid : 'tl_buttons'; // Display buttos - if (!$GLOBALS['TL_DCA'][$this->strTable]['config']['closed'] || !empty($GLOBALS['TL_DCA'][$this->strTable]['list']['global_operations'])) - { - $return .= \Message::generate() . ' -