Skip to content
This repository was archived by the owner on Nov 21, 2025. It is now read-only.

Commit 0dd1260

Browse files
committed
Merge remote-tracking branch 'origin/main' into main
2 parents 6667985 + fb8306e commit 0dd1260

File tree

3 files changed

+36
-6
lines changed

3 files changed

+36
-6
lines changed

lib/classes/content_class.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,17 @@ function __construct()
3232

3333
/**
3434
* Template-Variablen der Template-Engine Smarty zuweisen
35+
* @param bool $decode
3536
*/
36-
function assign()
37+
public function assign(bool $decode=true): void
3738
{
3839
global $smarty;
3940
global $template;
4041

4142
// 1. Inhalte Codieren
42-
$this->template = self::decode($this->template);
43+
if ($decode) {
44+
$this->template = self::decode($this->template);
45+
}
4346

4447
// 2. Template (HTML-Datei) Übergeben
4548
$this->template['_template_'] = $template;

plugins/content_manipulator/scripts/single_artikel/include.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ function create_single_artikelintegration($inhalt = "")
7575
$i++;
7676
}
7777

78+
$this->content->assign(false);
79+
7880
IfNotSetNull($this->fourcss);
7981
$inhalt = str_ireplace('</head>', $this->fourcss.'</head>', $inhalt);
8082

@@ -194,14 +196,13 @@ function get_single_artikel($reporeid=0,$template_var=0)
194196
if ($templatePathname = $this->findTemplate((int)$template_var)) {
195197
$smartyIdentifier = '{*##SMARTY##*}';
196198
if (strpos(file_get_contents($templatePathname, false, null, 0, strlen($smartyIdentifier)), $smartyIdentifier) === 0) {
197-
$content->assign();
199+
$content->assign(false);
198200
$smarty->assign([
199201
'article' => is_array($artikel_daten) ? reset($artikel_daten) ?: [] : [],
200202
'modFree' => $cms->mod_free,
201203
]);
202204

203205
$result = $smarty->fetch($templatePathname);
204-
$content->assign();
205206
return $result;
206207
}
207208
}

plugins/mv/lib/mv.php

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4475,14 +4475,19 @@ function get_get_vars()
44754475
*/
44764476

44774477

4478-
$parameters = [
4478+
$parameters = array_filter([
44794479
"menuid" => (int)$this->checked->menuid,
44804480
"template" => (string)$this->checked->template,
44814481
"mv_id" => (int)$this->checked->mv_id,
4482+
'mv_submit' => (string)$this->checked->mv_submit,
44824483
"onemv" => (string)$this->checked->onemv,
44834484
"search_mv" => (string)$this->checked->search_mv,
44844485
"sort_feld" => (string)$this->checked->sort_feld
4485-
];
4486+
], function ($value, $name) {
4487+
return strlen($value) > 0 || !in_array($name, [
4488+
'mv_submit',
4489+
]);
4490+
}, ARRAY_FILTER_USE_BOTH);
44864491

44874492
// $this->cms->template_lang wird nach einem Seitenwechsel ueber die Pagination ploetzlich nicht mehr definiert...
44884493
$menuId = (int)$this->checked->menuid;
@@ -4498,6 +4503,27 @@ function get_get_vars()
44984503
}, $parameters);
44994504
}
45004505

4506+
$flexId = $parameters['mv_id'] = (int)$parameters['mv_id'];
4507+
4508+
// Append the user input of a flex search to the parameters
4509+
if ($flexId) {
4510+
$searchColumn = defined('admin') ? 'mvcform_search_back' : 'mvcform_search';
4511+
$searchableFlexFields = array_map(function (array $row) {
4512+
return "{$row['mvcform_name']}_{$row['mvcform_id']}";
4513+
}, $this->db->get_results(
4514+
"SELECT mvcform_id, mvcform_name ".
4515+
"FROM {$this->cms->tbname['papoo_mvcform']} ".
4516+
"WHERE mvcform_form_id = {$flexId} AND mvcform_aktiv = 1 ".
4517+
"AND {$searchColumn} = 1", ARRAY_A)
4518+
);
4519+
4520+
foreach ($searchableFlexFields as $fieldName) {
4521+
if (strlen($value = $this->checked->$fieldName ?? '') > 0) {
4522+
$parameters[$fieldName] = $value;
4523+
}
4524+
}
4525+
}
4526+
45014527
return urldecode(http_build_query($parameters, null, "&"));
45024528
}
45034529

0 commit comments

Comments
 (0)