aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2025-06-26 09:23:27 +0200
committerDavid Siegfried <david.siegfried@uni-vechta.de>2025-06-26 07:23:27 +0000
commit04fe9db8f01eead49c3475c819088deec7809540 (patch)
tree44734f4459298ad095907e581b8aa27515369bc9 /lib
parent628020487e74638801c14e1b53df1734925eaa9f (diff)
use SORM to support localized content, fixes #5662
Merge request studip/studip!4283
Diffstat (limited to 'lib')
-rw-r--r--lib/extern/modules/ExternModuleTemplatePersondetails.class.php16
1 files changed, 4 insertions, 12 deletions
diff --git a/lib/extern/modules/ExternModuleTemplatePersondetails.class.php b/lib/extern/modules/ExternModuleTemplatePersondetails.class.php
index ca9043e..de6e275 100644
--- a/lib/extern/modules/ExternModuleTemplatePersondetails.class.php
+++ b/lib/extern/modules/ExternModuleTemplatePersondetails.class.php
@@ -567,19 +567,11 @@ class ExternModuleTemplatePersondetails extends ExternModule {
}
private function getContentOwnCategories () {
- $stm = DBManager::get()->prepare(
- "SELECT kategorie_id, name, content "
- . "FROM kategorien "
- . "WHERE range_id = ? "
- . "ORDER BY priority");
- $stm->execute([$this->user_id]);
- $i = 0;
- while ($row = $stm->fetch(PDO::FETCH_ASSOC)) {
- if (Visibility::verify('kat_'.$row['kategorie_id'], $this->user_id)) {
- $content['OWNCATEGORIES']['OWNCATEGORY'][$i]['OWNCATEGORY_TITLE'] = ExternModule::ExtHtmlReady($row['name']);
- $content['OWNCATEGORIES']['OWNCATEGORY'][$i]['OWNCATEGORY_CONTENT'] = ExternModule::ExtFormatReady($row['content']);
+ foreach (Kategorie::findByUserId($this->user_id) as $i => $row) {
+ if (Visibility::verify('kat_' . $row->id, $this->user_id)) {
+ $content['OWNCATEGORIES']['OWNCATEGORY'][$i]['OWNCATEGORY_TITLE'] = ExternModule::ExtHtmlReady($row->name);
+ $content['OWNCATEGORIES']['OWNCATEGORY'][$i]['OWNCATEGORY_CONTENT'] = ExternModule::ExtFormatReady($row->content);
$content['OWNCATEGORIES']['OWNCATEGORY'][$i]['OWNCATEGORY_NO'] = $i + 1;
- $i++;
}
}
return $content;