Skip to content

Commit

Permalink
V2.1.58-Beta (#926)
Browse files Browse the repository at this point in the history
* Version Anpassung + BBCode-Modul

* Benachrichtigungen wurden nicht angezeigt
  • Loading branch information
hhunderter authored Feb 18, 2024
1 parent da46e81 commit 741a339
Show file tree
Hide file tree
Showing 12 changed files with 39 additions and 17 deletions.
2 changes: 1 addition & 1 deletion application/modules/admin/controllers/admin/Index.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public function indexAction()
$this->getView()->set('ilchNewsList', $this->getConfig()->get('updateserver') . 'ilchNews.php');
$this->getView()->set('version', $this->getConfig()->get('version'));
$this->getView()->set('notifications', $notificationsMapper->getNotifications());
$this->getLayout()->set('accesses', $this->getAccesses());
$this->getView()->set('accesses', $this->getAccesses());
}

public function deleteAction()
Expand Down
2 changes: 1 addition & 1 deletion application/modules/admin/views/admin/index/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
</thead>
<tbody>
<?php foreach ($notifications as $notification) : ?>
<?php if (($accesses && $accesses->hasAccess('Admin_' . $notification->getModule(), $notification->getModule()))) : ?>
<?php if (($accesses && $accesses->hasAccess('Admin_' . $notification->getModule(), 'Admin_' . $notification->getModule()))) : ?>
<?php $date = new \Ilch\Date($notification->getTimestamp()); ?>
<tr>
<td><?=$this->getDeleteCheckbox('check_notifications', $notification->getId()) ?></td>
Expand Down
1 change: 1 addition & 0 deletions application/modules/bbcodeconvert/config/config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @copyright Ilch 2
* @package ilch
Expand Down
23 changes: 12 additions & 11 deletions application/modules/bbcodeconvert/controllers/admin/Index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @copyright Ilch 2
* @package ilch
Expand Down Expand Up @@ -99,7 +100,7 @@ public function indexAction()
}
}

foreach (glob(APPLICATION_PATH.'/layouts/*') as $layoutPath) {
foreach (glob(APPLICATION_PATH . '/layouts/*') as $layoutPath) {
if (is_dir($layoutPath)) {
$configClass = '\\Layouts\\' . ucfirst(basename($layoutPath)) . '\\Config\\Config';
$config = new $configClass($this->getTranslator());
Expand Down Expand Up @@ -165,7 +166,7 @@ public function convertAction()
}

$converted = [];
foreach($_SESSION['bbcodeconvert_toConvert'] as $value) {
foreach ($_SESSION['bbcodeconvert_toConvert'] as $value) {
$converted[$value['key']] = $value['completed'];
}

Expand Down Expand Up @@ -270,7 +271,7 @@ public function convert(string $key, int $index, int $progress, string $currentT
$textsMapper->table = 'events';
$texts = $textsMapper->getTexts($index, self::batch);

foreach($texts as $text) {
foreach ($texts as $text) {
$convertedText = $this->getView()->getHtmlFromBBCode($text['text']);

if (strlen($convertedText) <= self::limitLongText) {
Expand All @@ -289,7 +290,7 @@ public function convert(string $key, int $index, int $progress, string $currentT
$textsMapper->table = 'forum_posts';
$texts = $textsMapper->getTexts($index, self::batch);

foreach($texts as $text) {
foreach ($texts as $text) {
$convertedText = $this->getView()->getHtmlFromBBCode($text['text']);

if (strlen($convertedText) <= self::limitText) {
Expand All @@ -308,7 +309,7 @@ public function convert(string $key, int $index, int $progress, string $currentT
$textsMapper->table = 'gbook';
$texts = $textsMapper->getTexts($index, self::batch);

foreach($texts as $text) {
foreach ($texts as $text) {
$convertedText = $this->getView()->getHtmlFromBBCode($text['text']);

if (strlen($convertedText) <= self::limitMediumText) {
Expand All @@ -327,7 +328,7 @@ public function convert(string $key, int $index, int $progress, string $currentT
$textsMapper->table = 'jobs';
$texts = $textsMapper->getTexts($index, self::batch);

foreach($texts as $text) {
foreach ($texts as $text) {
$convertedText = $this->getView()->getHtmlFromBBCode($text['text']);

if (strlen($convertedText) <= self::limitMediumText) {
Expand All @@ -346,7 +347,7 @@ public function convert(string $key, int $index, int $progress, string $currentT
$textsMapper->table = 'kvticket';
$texts = $textsMapper->getTexts($index, self::batch);

foreach($texts as $text) {
foreach ($texts as $text) {
$convertedText = $this->getView()->getHtmlFromBBCode($text['text']);

if (strlen($convertedText) <= self::limitMediumText) {
Expand All @@ -361,7 +362,7 @@ public function convert(string $key, int $index, int $progress, string $currentT
return ['completed' => false, 'index' => $index + count($texts), 'progress' => $index + count($texts)];
case 'radiohoerercharts':
// table: config, column: value, datatype: TEXT
foreach(['radio_hoerercharts_votetext_de', 'radio_hoerercharts_votetext_en'] as $voteTextKey) {
foreach (['radio_hoerercharts_votetext_de', 'radio_hoerercharts_votetext_en'] as $voteTextKey) {
$convertedText = $this->getView()->getHtmlFromBBCode($this->getConfig()->get($voteTextKey));

if (strlen($convertedText) <= self::limitText) {
Expand All @@ -376,7 +377,7 @@ public function convert(string $key, int $index, int $progress, string $currentT
$textsMapper->table = 'teams_joins';
$texts = $textsMapper->getTexts($index, self::batch);

foreach($texts as $text) {
foreach ($texts as $text) {
$convertedText = $this->getView()->getHtmlFromBBCode($text['text']);

if (strlen($convertedText) <= self::limitLongText) {
Expand All @@ -396,7 +397,7 @@ public function convert(string $key, int $index, int $progress, string $currentT
// table: users, column: signature, datatype: VARCHAR(255)
$signatures = $userMapper->getSignatures($index, self::batch);

foreach($signatures as $signature) {
foreach ($signatures as $signature) {
$convertedSignature = $this->getView()->getHtmlFromBBCode($signature['signature']);

if (strlen($convertedSignature) <= 255) {
Expand All @@ -417,7 +418,7 @@ public function convert(string $key, int $index, int $progress, string $currentT
// table: users_dialog_reply, column: reply, datatype: TEXT
$replies = $userMapper->getReplies($index, self::batch);

foreach($replies as $reply) {
foreach ($replies as $reply) {
$convertedReply = $this->getView()->getHtmlFromBBCode($reply['reply']);

if (strlen($convertedReply) <= self::limitText) {
Expand Down
1 change: 1 addition & 0 deletions application/modules/bbcodeconvert/mappers/Texts.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @copyright Ilch 2
* @package ilch
Expand Down
1 change: 1 addition & 0 deletions application/modules/bbcodeconvert/mappers/User.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @copyright Ilch 2
* @package ilch
Expand Down
1 change: 1 addition & 0 deletions application/modules/bbcodeconvert/translations/de.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @copyright Ilch 2
* @package ilch
Expand Down
1 change: 1 addition & 0 deletions application/modules/bbcodeconvert/translations/en.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* @copyright Ilch 2
* @package ilch
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php

/** @var \Ilch\View $this */
?>
<h1><?=$this->getTrans('menuConvert') ?></h1>

<div class="table-responsive">
Expand All @@ -18,7 +22,7 @@
<td><?=$this->getTrans($moduleOrLayout['key']) ?></td>
<td>
<div class="progress">
<div class="progress-bar" role="progressbar" style="width: <?=(!$moduleOrLayout['completed'] && $moduleOrLayout['count']) ? ($moduleOrLayout['progress']/$moduleOrLayout['count']) * 100 : 100 ?>%" aria-valuenow="<?=$moduleOrLayout['progress'] ?>" aria-valuemin="0" aria-valuemax="<?=$moduleOrLayout['count'] ?>"></div>
<div class="progress-bar" role="progressbar" style="width: <?=(!$moduleOrLayout['completed'] && $moduleOrLayout['count']) ? ($moduleOrLayout['progress'] / $moduleOrLayout['count']) * 100 : 100 ?>%" aria-valuenow="<?=$moduleOrLayout['progress'] ?>" aria-valuemin="0" aria-valuemax="<?=$moduleOrLayout['count'] ?>"></div>
</div>
</td>
</tr>
Expand Down
12 changes: 10 additions & 2 deletions application/modules/bbcodeconvert/views/admin/index/index.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php

/** @var \Ilch\View $this */
?>
<link href="<?=$this->getModuleUrl('static/css/bbcodeconvert_styles.css') ?>" rel="stylesheet">

<h1><?=$this->getTrans('menuOverview') ?>
Expand Down Expand Up @@ -50,7 +54,9 @@
</tr>
</thead>
<tbody>
<?php foreach ($this->get('installedSupportedModules') as $module) : ?>
<?php
/** @var \Modules\Admin\Models\Module $module */
foreach ($this->get('installedSupportedModules') as $module) : ?>
<tr class="filter">
<td><?=$this->getDeleteCheckbox('check_modules', $module->getKey()) ?></td>
<td><?=$this->getTrans($module->getKey()) ?></td>
Expand Down Expand Up @@ -83,7 +89,9 @@
</tr>
</thead>
<tbody>
<?php foreach ($this->get('installedSupportedLayouts') as $layout) : ?>
<?php
/** @var \Modules\Admin\Models\Layout $layout */
foreach ($this->get('installedSupportedLayouts') as $layout) : ?>
<tr class="filter">
<td><?=$this->getDeleteCheckbox('check_layouts', $layout->getKey()) ?></td>
<td><?=$this->getTrans($layout->getKey()) ?></td>
Expand Down
4 changes: 4 additions & 0 deletions application/modules/bbcodeconvert/views/admin/index/note.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<?php

/** @var \Ilch\View $this */
?>
<link href="<?=$this->getModuleUrl('static/css/bbcodeconvert_styles.css') ?>" rel="stylesheet">

<h1><?=$this->getTrans('menuNote') ?>
Expand Down
2 changes: 1 addition & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
$serverTimeZone = @date_default_timezone_get();
date_default_timezone_set('UTC');

define('VERSION', '2.1.57');
define('VERSION', '2.1.58');
define('SERVER_TIMEZONE', $serverTimeZone);
define('DEFAULT_MODULE', 'page');
define('DEFAULT_LAYOUT', 'index');
Expand Down

0 comments on commit 741a339

Please sign in to comment.