Skip to content

Commit 59b83a4

Browse files
committed
Convert AllowSharedBookmarks to $configuse
Signed-off-by: Kamil Tekiela <tekiela246@gmail.com>
1 parent 6905d91 commit 59b83a4

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Bookmarks/BookmarkRepository.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public function createBookmark(
4949
return false;
5050
}
5151

52-
if (! $this->config->settings['AllowSharedBookmarks']) {
52+
if (! $this->config->config->AllowSharedBookmarks) {
5353
$shared = false;
5454
}
5555

@@ -78,7 +78,7 @@ public function getList(
7878
return [];
7979
}
8080

81-
$exactUserMatch = ! $this->config->settings['AllowSharedBookmarks'];
81+
$exactUserMatch = ! $this->config->config->AllowSharedBookmarks;
8282

8383
$query = 'SELECT * FROM ' . Util::backquote($this->bookmarkFeature->database)
8484
. '.' . Util::backquote($this->bookmarkFeature->bookmark)
@@ -123,7 +123,7 @@ public function get(
123123
if ($user !== null) {
124124
$query .= ' AND (user = ' . $this->dbi->quoteString($user);
125125

126-
$exactUserMatch = ! $this->config->settings['AllowSharedBookmarks'];
126+
$exactUserMatch = ! $this->config->config->AllowSharedBookmarks;
127127
if (! $exactUserMatch) {
128128
$query .= " OR user = ''";
129129
}

src/Sql.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1007,7 +1007,7 @@ private function getQueryResponseForNoResultsReturned(
10071007
]),
10081008
'user' => $this->config->selectedServer['user'],
10091009
'sql_query' => $completeQuery,
1010-
'allow_shared_bookmarks' => $this->config->settings['AllowSharedBookmarks'],
1010+
'allow_shared_bookmarks' => $this->config->config->AllowSharedBookmarks,
10111011
]);
10121012
}
10131013

src/SqlQueryForm.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ public function getHtml(
124124
'bookmarks' => $bookmarks,
125125
'can_convert_kanji' => Encoding::canConvertKanji(),
126126
'is_foreign_key_check' => ForeignKey::isCheckEnabled(),
127-
'allow_shared_bookmarks' => $this->config->settings['AllowSharedBookmarks'],
127+
'allow_shared_bookmarks' => $this->config->config->AllowSharedBookmarks,
128128
]);
129129
}
130130

0 commit comments

Comments
 (0)