Skip to content

Commit

Permalink
カラム指定調整 (#3982)
Browse files Browse the repository at this point in the history
  • Loading branch information
seto1 authored Nov 6, 2024
1 parent acc987b commit 1a533f3
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion plugins/baser-core/src/Model/Table/ContentsTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ public function getUniqueName($name, $parentId, $contentId = null)
$query = $this->find()->where(['name LIKE' => $name . '%', 'site_root' => false]);
if (isset($parentId)) $query = $query->andWhere(['parent_id' => $parentId]);
if ($contentId) {
$query = $query->andWhere(['id <>' => $contentId]);
$query = $query->andWhere(['Contents.id <>' => $contentId]);
}
$datas = $query->select('name')->orderBy('name')->all()->toArray();
$datas = Hash::extract($datas, '{n}.name');
Expand Down
4 changes: 2 additions & 2 deletions plugins/baser-core/src/Model/Table/SitesTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ public function pluginExistsByDasherize($value)
*/
public function getPublishedAll(): ResultSetInterface
{
return $this->find()->where(['status' => true])->all();
return $this->find()->where(['Sites.status' => true])->all();
}

/**
Expand All @@ -236,7 +236,7 @@ public function getList($mainSiteId = null, $options = [])

$conditions = [];
if (!is_null($options['status'])) {
$conditions = ['status' => $options['status']];
$conditions = ['Sites.status' => $options['status']];
}

if (!is_null($mainSiteId)) {
Expand Down
2 changes: 1 addition & 1 deletion plugins/bc-blog/src/Service/BlogCategoriesService.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public function getTreeIndex(int $blogContentId, array $queryParams): array
$categories = [];
foreach ($srcCategories->toArray() as $key => $value) {
/* @var BlogCategory $category */
$category = $this->BlogCategories->find()->where(['id' => $key])->first();
$category = $this->BlogCategories->find()->where(['BlogCategories.id' => $key])->first();
if (!preg_match("/^([_]+)/i", $value, $matches)) {
$category->depth = 0;
$category->layered_title = $category->title;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ public function saveSearchIndex($searchIndex)
}

if (!empty($searchIndex['content_id'])) {
$content = $this->Contents->find()->select(['lft', 'rght'])->where(['id' => $searchIndex['content_id']])->first();
$content = $this->Contents->find()->select(['lft', 'rght'])->where(['Contents.id' => $searchIndex['content_id']])->first();
$searchIndex['lft'] = $content->lft;
$searchIndex['rght'] = $content->rght;
} else {
Expand Down

0 comments on commit 1a533f3

Please sign in to comment.