aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2023-09-08 10:24:59 +0000
committerElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2023-09-08 10:24:59 +0000
commita5a3937a5345b587cfd301a156b29ff2d50dbcf1 (patch)
treed776513e10a40cb3c9face6f0beaeb5a4ada6dd6
parent748b12b78ec49f9e5860736280f6d246c4bac98f (diff)
fix quotes in SQL, fixes #1443
Closes #1443 Merge request studip/studip!2126
-rw-r--r--lib/classes/JsonApi/Routes/Blubber/ThreadsIndex.php2
-rw-r--r--lib/classes/sidebar/RoomSearchWidget.class.php2
-rw-r--r--tests/jsonapi/BlubberThreadsIndexTest.php2
3 files changed, 3 insertions, 3 deletions
diff --git a/lib/classes/JsonApi/Routes/Blubber/ThreadsIndex.php b/lib/classes/JsonApi/Routes/Blubber/ThreadsIndex.php
index 74f4069..91cfa89 100644
--- a/lib/classes/JsonApi/Routes/Blubber/ThreadsIndex.php
+++ b/lib/classes/JsonApi/Routes/Blubber/ThreadsIndex.php
@@ -77,7 +77,7 @@ class ThreadsIndex extends JsonApiController
private function getPublicThreads(\User $observer)
{
return $this->paginateThreads(
- $this->upgradeAndFilterThreads($observer, \BlubberThread::findBySQL('context_type = "public"'))
+ $this->upgradeAndFilterThreads($observer, \BlubberThread::findBySQL("context_type = 'public'"))
);
}
diff --git a/lib/classes/sidebar/RoomSearchWidget.class.php b/lib/classes/sidebar/RoomSearchWidget.class.php
index c1a3d6a..f12e73e 100644
--- a/lib/classes/sidebar/RoomSearchWidget.class.php
+++ b/lib/classes/sidebar/RoomSearchWidget.class.php
@@ -22,7 +22,7 @@ class RoomSearchWidget extends SidebarWidget
]
);
- $resource_categories = ResourceCategory::findBySQL('`class_name` ="Room" ORDER by `name`');
+ $resource_categories = ResourceCategory::findBySQL("class_name = 'Room' ORDER by name");
$categories = [
'' => _('Alle Kategorien')
];
diff --git a/tests/jsonapi/BlubberThreadsIndexTest.php b/tests/jsonapi/BlubberThreadsIndexTest.php
index ec2929c..ab6d200 100644
--- a/tests/jsonapi/BlubberThreadsIndexTest.php
+++ b/tests/jsonapi/BlubberThreadsIndexTest.php
@@ -58,7 +58,7 @@ class BlubberThreadsIndexTest extends \Codeception\Test\Unit
return count(
$this->upgradeAndFilterThreads(
$credentials,
- \BlubberThread::findBySQL('context_type = "public" AND visible_in_stream')
+ \BlubberThread::findBySQL("context_type = 'public' AND visible_in_stream")
)
);
});