Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions dca/tl_catalog.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
'label' => &$GLOBALS['TL_LANG']['tl_catalog']['delete'],
'href' => 'act=delete',
'icon' => 'delete.gif',
'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '') . '\'))return false;Backend.getScrollOffset()"'
'attributes' => 'onclick="if(!confirm(\'' . ($GLOBALS['TL_LANG']['MSC']['deleteConfirm']??'') . '\'))return false;Backend.getScrollOffset()"'
],
'show' => [
'label' => &$GLOBALS['TL_LANG']['tl_catalog']['show'],
Expand Down Expand Up @@ -1024,4 +1024,4 @@
'sql' => "varchar(255) NOT NULL default ''"
],
]
];
];
2 changes: 1 addition & 1 deletion dca/tl_catalog_fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -1881,4 +1881,4 @@
'sql' => "varchar(255) NOT NULL default ''"
]
]
];
];
2 changes: 1 addition & 1 deletion dca/tl_catalog_form.php
Original file line number Diff line number Diff line change
Expand Up @@ -305,4 +305,4 @@
'sql' => "varchar(16) NOT NULL default ''"
]
]
];
];
2 changes: 1 addition & 1 deletion dca/tl_catalog_form_fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -762,4 +762,4 @@
'sql' => "char(1) NOT NULL default ''"
]
]
];
];
14 changes: 7 additions & 7 deletions library/alnv/CatalogDcExtractor.php
Original file line number Diff line number Diff line change
Expand Up @@ -290,17 +290,17 @@ protected function extractDCASorting($arrSorting)
protected function convertDcConfigToCatalog($arrReturn, $arrDataContainer, $strDcConfigType)
{

if ($arrDataContainer[$strDcConfigType]['enableVersioning']) {
if ($arrDataContainer[$strDcConfigType]['enableVersioning'] ?? null) {

$arrReturn['useVC'] = $arrDataContainer['config']['enableVersioning'] ? '1' : '';
}

if ($arrDataContainer[$strDcConfigType]['ptable']) {
if ($arrDataContainer[$strDcConfigType]['ptable'] ?? null) {

$arrReturn['pTable'] = $arrDataContainer['config']['ptable'];
}

if (is_array($arrDataContainer[$strDcConfigType]['ctable']) && !empty($arrDataContainer['config']['ctable'])) {
if (is_array($arrDataContainer[$strDcConfigType]['ctable'] ?? null) && !empty($arrDataContainer['config']['ctable'])) {

if (in_array('tl_content', $arrDataContainer[$strDcConfigType]['ctable'])) {

Expand Down Expand Up @@ -335,7 +335,7 @@ protected function convertDcSortingToCatalog($arrReturn, $arrDataContainer, $str
$arrReturn['panelLayout'] = serialize($arrPanelLayout);
}

if (is_array($arrDataContainer[$strDcConfigType]['sorting']['fields']) && !empty($arrDataContainer[$strDcConfigType]['sorting']['fields'])) {
if (is_array($arrDataContainer[$strDcConfigType]['sorting']['fields'] ?? null) && !empty($arrDataContainer[$strDcConfigType]['sorting']['fields'])) {

$arrFields = [];
$arrSortingFields = $arrDataContainer[$strDcConfigType]['sorting']['fields'];
Expand All @@ -362,7 +362,7 @@ protected function convertDcSortingToCatalog($arrReturn, $arrDataContainer, $str
$arrReturn['sortingFields'] = serialize($arrFields);
}

if (is_array($arrDataContainer[$strDcConfigType]['sorting']['headerFields']) && !empty($arrDataContainer[$strDcConfigType]['sorting']['headerFields'])) {
if (is_array($arrDataContainer[$strDcConfigType]['sorting']['headerFields'] ?? null) && !empty($arrDataContainer[$strDcConfigType]['sorting']['headerFields'])) {

$arrReturn['headerFields'] = $arrDataContainer[$strDcConfigType]['sorting']['headerFields'];
}
Expand All @@ -380,7 +380,7 @@ protected function convertDcLabelToCatalog($arrReturn, $arrDataContainer, $strDc
if (isset($arrDataContainer[$strDcConfigType]['label']['format'])) {
$arrReturn['format'] = $arrDataContainer[$strDcConfigType]['label']['format'];
}
if ($arrDataContainer[$strDcConfigType]['label']['showColumns']) {
if (isset($arrDataContainer[$strDcConfigType]['label']['showColumns'])) {
$arrReturn['showColumns'] = '1';
}
if (isset($arrDataContainer[$strDcConfigType]['label']['fields']) && is_array($arrDataContainer[$strDcConfigType]['label']['fields']) && !empty($arrDataContainer[$strDcConfigType]['label']['fields'])) {
Expand Down Expand Up @@ -642,4 +642,4 @@ protected function convertCatalogToDcOperations($arrReturn, $arrCatalog, $strDcC

return $arrReturn;
}
}
}
4 changes: 2 additions & 2 deletions library/alnv/CatalogView.php
Original file line number Diff line number Diff line change
Expand Up @@ -1463,7 +1463,7 @@ protected function generateOperations( $strID, $strAlias = '', $arrCatalog = []
'href' => $this->generateUrl( $this->arrFrontendEditingPage, $strAlias ) . $strActFragment,
'title' => $GLOBALS['TL_LANG']['tl_module']['reference']['catalogItemOperations'][ $strOperation ],
'image' => \Image::getHtml( Toolkit::getIcon( $strOperation ), $GLOBALS['TL_LANG']['tl_module']['reference']['catalogItemOperations'][ $strOperation ] ),
'attributes' => $strOperation === 'delete' ? 'onclick="if(!confirm(\'' . sprintf( $GLOBALS['TL_LANG']['MSC']['deleteConfirm'], $strID ) . '\'))return false;"' : '',
'attributes' => $strOperation === 'delete' ? 'onclick="if(!confirm(\'' . sprintf( $GLOBALS['TL_LANG']['MSC']['deleteConfirm'] ?? '%s', $strID ) . '\'))return false;"' : '',
];
}
}
Expand Down Expand Up @@ -1591,4 +1591,4 @@ public function getCatalogFields() {

return $this->arrCatalogFields;
}
}
}
17 changes: 8 additions & 9 deletions library/alnv/Toolkit.php
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,13 @@ public static function customizeAbleFields()

public static function parseCatalog($arrCatalog)
{

$arrCatalog['cTables'] = self::parseStringToArray($arrCatalog['cTables']);
$arrCatalog['languages'] = self::parseStringToArray(($arrCatalog['languages'] ?? ''));
$arrCatalog['operations'] = self::parseStringToArray($arrCatalog['operations']);
$arrCatalog['panelLayout'] = self::parseStringToArray($arrCatalog['panelLayout']);
$arrCatalog['labelFields'] = self::parseStringToArray($arrCatalog['labelFields']);
$arrCatalog['headerFields'] = self::parseStringToArray($arrCatalog['headerFields']);
$arrCatalog['sortingFields'] = self::parseStringToArray($arrCatalog['sortingFields']);
$arrCatalog['cTables'] = self::parseStringToArray($arrCatalog['cTables'] ?? []);
$arrCatalog['languages'] = self::parseStringToArray($arrCatalog['languages'] ?? '');
$arrCatalog['operations'] = self::parseStringToArray($arrCatalog['operations'] ?? []);
$arrCatalog['panelLayout'] = self::parseStringToArray($arrCatalog['panelLayout'] ?? []);
$arrCatalog['labelFields'] = self::parseStringToArray($arrCatalog['labelFields'] ?? []);
$arrCatalog['headerFields'] = self::parseStringToArray($arrCatalog['headerFields'] ?? []);
$arrCatalog['sortingFields'] = self::parseStringToArray($arrCatalog['sortingFields'] ?? []);

return $arrCatalog;
}
Expand Down Expand Up @@ -1033,4 +1032,4 @@ public static function generateDynValue($strSimpleTokens, $arrValues)

return \StringUtil::parseSimpleTokens($strSimpleTokens, $arrValues);
}
}
}