aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]db/migrations/5.1.22_resize_oer_content_type_length.php0
-rw-r--r--lib/classes/SemBrowse.class.php2
-rw-r--r--lib/models/StudipNews.class.php2
-rw-r--r--lib/navigation/StartNavigation.php4
-rw-r--r--lib/plugins/db/RolePersistence.class.php2
-rw-r--r--lib/raumzeit/SeminarDB.class.php2
6 files changed, 6 insertions, 6 deletions
diff --git a/db/migrations/5.1.22_resize_oer_content_type_length.php b/db/migrations/5.1.22_resize_oer_content_type_length.php
index 0fd36b6..0fd36b6 100644..100755
--- a/db/migrations/5.1.22_resize_oer_content_type_length.php
+++ b/db/migrations/5.1.22_resize_oer_content_type_length.php
diff --git a/lib/classes/SemBrowse.class.php b/lib/classes/SemBrowse.class.php
index a60201a..a3e535e 100644
--- a/lib/classes/SemBrowse.class.php
+++ b/lib/classes/SemBrowse.class.php
@@ -243,7 +243,7 @@ class SemBrowse {
$query .= ' AND visible = 1';
}
- $sem_ids = DBManager::get()->fetchAll(PDO::FETCH_COLUMN);
+ $sem_ids = DBManager::get('studip-slave')->fetchAll(PDO::FETCH_COLUMN);
if (is_array($sem_ids)) {
$this->sem_browse_data['search_result'] = array_flip($sem_ids);
}
diff --git a/lib/models/StudipNews.class.php b/lib/models/StudipNews.class.php
index 227561a..f8ecb21 100644
--- a/lib/models/StudipNews.class.php
+++ b/lib/models/StudipNews.class.php
@@ -106,7 +106,7 @@ class StudipNews extends SimpleORMap implements PrivacyObject
} else {
$query .= "ORDER BY prio DESC, date DESC, chdate DESC, topic ASC";
}
- $statement = DBManager::get()->prepare($query);
+ $statement = DBManager::get('studip-slave')->prepare($query);
$statement->execute([$range_id]);
$ret = $statement->fetchGrouped(PDO::FETCH_ASSOC);
if (!(isset($GLOBALS['perm']) && $GLOBALS['perm']->have_perm('root'))) {
diff --git a/lib/navigation/StartNavigation.php b/lib/navigation/StartNavigation.php
index 646ba4d..c67c2a1 100644
--- a/lib/navigation/StartNavigation.php
+++ b/lib/navigation/StartNavigation.php
@@ -36,7 +36,7 @@ class StartNavigation extends Navigation
}
if (Config::get()->VOTE_ENABLE && WidgetHelper::hasWidget($GLOBALS['user']->id, 'Evaluations')) {
$threshold = object_get_visit_threshold();
- $statement = DBManager::get()->prepare("
+ $statement = DBManager::get('studip-slave')->prepare("
SELECT COUNT(*)
FROM questionnaire_assignments
INNER JOIN questionnaires ON (questionnaires.questionnaire_id = questionnaire_assignments.questionnaire_id)
@@ -59,7 +59,7 @@ class StartNavigation extends Navigation
LEFT JOIN object_user_visits b ON (b.object_id = d.eval_id AND b.user_id = :user_id AND b.plugin_id = :plugin_id)
WHERE a.range_id = 'studip'
GROUP BY a.range_id";
- $statement = DBManager::get()->prepare($query);
+ $statement = DBManager::get('studip-slave')->prepare($query);
$statement->bindValue(':user_id', $GLOBALS['user']->id);
$statement->bindValue(':threshold', $threshold);
$statement->bindValue(':plugin_id', -2);
diff --git a/lib/plugins/db/RolePersistence.class.php b/lib/plugins/db/RolePersistence.class.php
index 88abce3..594eba9 100644
--- a/lib/plugins/db/RolePersistence.class.php
+++ b/lib/plugins/db/RolePersistence.class.php
@@ -221,7 +221,7 @@ class RolePersistence
$cache = self::getUserRolesCache();
if (!isset($cache[$user_id])) {
- $query = "SELECT DISTINCT *
+ $query = "SELECT SQL_CACHE DISTINCT *
FROM (
SELECT `roleid`, `institut_id`, 1 AS explicit
FROM `roles_user`
diff --git a/lib/raumzeit/SeminarDB.class.php b/lib/raumzeit/SeminarDB.class.php
index 85a8c0d..6361929 100644
--- a/lib/raumzeit/SeminarDB.class.php
+++ b/lib/raumzeit/SeminarDB.class.php
@@ -51,7 +51,7 @@ class SeminarDB
public static function getSingleDates($seminar_id, $start = 0, $end = 0)
{
- $query = "SELECT termine.*, resource_bookings.resource_id, GROUP_CONCAT(DISTINCT trp.user_id) AS related_persons, GROUP_CONCAT(DISTINCT trg.statusgruppe_id) AS related_groups
+ $query = "SELECT SQL_CACHE termine.*, resource_bookings.resource_id, GROUP_CONCAT(DISTINCT trp.user_id) AS related_persons, GROUP_CONCAT(DISTINCT trg.statusgruppe_id) AS related_groups
FROM termine
LEFT JOIN termin_related_persons AS trp ON (termine.termin_id = trp.range_id)
LEFT JOIN termin_related_groups AS trg ON (termine.termin_id = trg.termin_id)