Skip to content
Code-Schnipsel Gruppen Projekte
Commit 072c89de erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix: #116 - brick with same title check

Übergeordneter 66e0038f
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
...@@ -334,7 +334,7 @@ public function getAreasByProject(Project $Project, $layoutType = false) ...@@ -334,7 +334,7 @@ public function getAreasByProject(Project $Project, $layoutType = false)
// get bricks // get bricks
foreach ($templates as $template) { foreach ($templates as $template) {
$brickXML = \realpath(OPT_DIR . $template . '/bricks.xml'); $brickXML = \realpath(OPT_DIR.$template.'/bricks.xml');
if (!$brickXML) { if (!$brickXML) {
continue; continue;
...@@ -550,7 +550,7 @@ public function getBrickByUID($uid) ...@@ -550,7 +550,7 @@ public function getBrickByUID($uid)
*/ */
public function getAvailableBrickSettingsByBrickType($brickType) public function getAvailableBrickSettingsByBrickType($brickType)
{ {
$cache = 'quiqqer/bricks/brickType/' . \md5($brickType); $cache = 'quiqqer/bricks/brickType/'.\md5($brickType);
try { try {
return QUI\Cache\Manager::get($cache); return QUI\Cache\Manager::get($cache);
...@@ -873,7 +873,7 @@ public function saveBrick($brickId, array $brickData) ...@@ -873,7 +873,7 @@ public function saveBrick($brickId, array $brickData)
} }
if (!empty($areas)) { if (!empty($areas)) {
$areaString = ',' . \implode(',', $areas) . ','; $areaString = ','.\implode(',', $areas).',';
} }
$Brick->setAttributes($brickData); $Brick->setAttributes($brickData);
...@@ -951,8 +951,10 @@ public function saveBrick($brickId, array $brickData) ...@@ -951,8 +951,10 @@ public function saveBrick($brickId, array $brickData)
$result = QUI::getDataBase()->fetch([ $result = QUI::getDataBase()->fetch([
'from' => $this->getTable(), 'from' => $this->getTable(),
'where' => [ 'where' => [
'title' => $Brick->getAttribute('title'), 'title' => $Brick->getAttribute('title'),
'id' => [ 'project' => $Brick->getAttribute('project'),
'lang' => $Brick->getAttribute('lang'),
'id' => [
'type' => 'NOT', 'type' => 'NOT',
'value' => (int)$brickId 'value' => (int)$brickId
] ]
......
0% Lade oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren