Skip to content

Commit 63b3a40

Browse files
authored
Merge pull request #67 from funktechno/dev
update master
2 parents f3395df + 0aa1080 commit 63b3a40

File tree

10 files changed

+113
-7
lines changed

10 files changed

+113
-7
lines changed

ChangeLog

+15
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
Version 0.3.3
2+
Improvements:
3+
4+
* mysql character set update for emojis
5+
* synfony deprecation fix
6+
* public wiki link to board
7+
* added Ukrainian translation
8+
9+
Bug fixes:
10+
11+
* Fix https://github.com/funktechno/kanboard-plugin-wiki/issues/39
12+
* Fix https://github.com/funktechno/kanboard-plugin-wiki/issues/60
13+
* Fix https://github.com/funktechno/kanboard-plugin-wiki/issues/56
14+
* Fix `'max_size' => get_upload_max_size(),`
15+
116
Version 0.3.2
217
Improvements:
318

Controller/WikiFileController.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function create()
5050

5151
$this->response->html($this->template->render('wiki:wiki_file/create', array(
5252
'wiki' => $wiki,
53-
'max_size' => $this->helper->text->phpToBytes(get_upload_max_size()),
53+
'max_size' => get_upload_max_size(),
5454
)));
5555
}
5656

Locale/uk_UA/translations.php

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?php
2+
3+
return array(
4+
'Remove hourly rate' => 'Видалити погодинну ставку',
5+
'Do you really want to remove this hourly rate?' => 'Ви дійсно хочете видалити цю погодинну ставку?',
6+
'Hourly rate' => 'Погодинна ставка',
7+
'Effective date' => 'Дата вступу в силу',
8+
'Add new rate' => 'Додати нову ставку',
9+
'Rate removed successfully.' => 'Ставку успішно видалено.',
10+
'Unable to remove this rate.' => 'Неможливо видалити цю ставку.',
11+
'Unable to save the hourly rate.' => 'Не вдається зберегти погодинну ставку.',
12+
'Hourly rate created successfully.' => 'Погодинну ставку успішно створено.',
13+
'Amount' => 'Кількість',
14+
'Wiki' => 'Wiki',
15+
'Wiki line' => 'Wiki рядок',
16+
'Wiki line removed successfully.' => 'Wiki рядок успішно видалено.',
17+
'Wiki lines' => 'Wiki рядки',
18+
'Cost' => 'Вартість',
19+
'Cost breakdown' => 'Деталізація витрат',
20+
'Do you really want to remove this wiki page?' => 'Ви дійсно бажаєте видалити цю сторінку wiki?',
21+
'Expenses' => 'Витрати',
22+
'New Wiki page' => 'Нова wiki сторінка',
23+
'Remove a wiki line' => 'Видалити рядок у wiki',
24+
'Remove wiki line' => 'Видалити wiki строку',
25+
'The wiki line have been created successfully.' => 'Wiki рядок успішно створено.',
26+
'Unable to create the wiki line.' => 'Неможливо створити цей wiki рядок.',
27+
'Unable to remove this wiki page.' => 'Неможливо видалити цю wiki сторінку.',
28+
'Remaining' => 'Інше',
29+
'Currency rates are used to calculate project wiki.' => 'Курси валют використовуються для розрахунку wiki проекту.',
30+
'Burndown chart for "%s"' => 'Діаграма вигорання для "%s"',
31+
'Wiki overview' => 'Огляд Wiki',
32+
'Type' => 'Тип',
33+
'There is not enough data to show something.' => 'Недостатньо даних, щоб щось показати.',
34+
'Created' => 'Створено',
35+
'Last modifier' => 'Останній редактор',
36+
'Modified' => 'Змінено',
37+
'Edit page' => 'Редагувати сторінку',
38+
'View Editions' => 'Переглянути редакції',
39+
'Creator' => 'Автор',
40+
'Modifier' => 'Редактор',
41+
'Editions' => 'Версії',
42+
'Current Edition' => 'Поточна версія',
43+
'Date Creation' => 'Дата створення',
44+
'Date Modification' => 'Дата внесення змін',
45+
'Content' => 'Зміст',
46+
'Date Created' => 'Дата створення',
47+
'Date Modified' => 'Дата внесення змін',
48+
'%d Wiki pages' => '%d Wiki сторінок',
49+
'Search by content' => 'Пошук за вмістом',
50+
'Wiki page Title' => 'Заголовок Wiki сторінки',
51+
'There are no editions for this Wiki page saved to restore.' => 'Немає збережених редакцій цієї Wiki сторінки для відновлення.',
52+
'There are no Wiki pages that you have access to.' => 'Немає Wiki сторінок, до яких ви маєте доступ.',
53+
'There are no Wiki pages for this project.' => 'Для цього проекту немає Wiki сторінок.'
54+
);

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugin=Wiki
2-
version=0.3.2
2+
version=0.3.3
33
all:
44
@ echo "Build archive for plugin ${plugin} version=${version}"
55
@ git archive HEAD --prefix=${plugin}/ --format=zip -o ${plugin}-${version}.zip

Model/WikiEventJob.php

+10-3
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,11 @@ public function execute($title, $projectId, $wikiPage, $eventName)
3939
->buildEventWiki($wikiPage);
4040

4141
if ($event !== null) {
42-
$this->dispatcher->dispatch($eventName, $event);
42+
if (APP_VERSION < '1.2.31') {
43+
$this->dispatcher->dispatch($eventName, $event);
44+
} else {
45+
$this->dispatcher->dispatch($event, $eventName);
46+
}
4347

4448
// if ($eventName === Wiki::EVENT_CREATE) {
4549
// $userMentionJob = $this->userMentionJob->withParams($event['comment']['comment'], Wiki::EVENT_USER_MENTION, $event);
@@ -55,8 +59,11 @@ public function executeWithId($wikiPageId, $eventName)
5559
->buildEvent();
5660

5761
if ($event !== null) {
58-
$this->dispatcher->dispatch($eventName, $event);
59-
62+
if (APP_VERSION < '1.2.31') {
63+
$this->dispatcher->dispatch($eventName, $event);
64+
} else {
65+
$this->dispatcher->dispatch($event, $eventName);
66+
}
6067
// if ($eventName === Wiki::EVENT_CREATE) {
6168
// $userMentionJob = $this->userMentionJob->withParams($event['comment']['comment'], Wiki::EVENT_USER_MENTION, $event);
6269
// $this->queueManager->push($userMentionJob);

Plugin.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ public function initialize()
4242

4343
$this->template->hook->attach('template:header:dropdown', 'wiki:header/dropdown');
4444

45+
$this->template->setTemplateOverride('board/view_public', 'wiki:board/view_public');
46+
4547
$this->template->setTemplateOverride('file_viewer/show', 'wiki:file_viewer/show');
4648

4749
$this->hook->on('template:layout:css', array('template' => 'plugins/Wiki/Asset/css/wiki.css'));
@@ -90,7 +92,7 @@ public function getPluginAuthor()
9092

9193
public function getPluginVersion()
9294
{
93-
return '0.3.2';
95+
return '0.3.3';
9496
}
9597

9698
public function getPluginHomepage()

Schema/Mysql.php

+12-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,18 @@
44

55
use PDO;
66

7-
const VERSION = 8;
7+
const VERSION = 9;
8+
9+
/**
10+
* Allow unicode emojis in wikipages
11+
* @param PDO $pdo
12+
*/
13+
function version_9(PDO $pdo)
14+
{
15+
$pdo->exec('ALTER TABLE wikipage CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci');
16+
$pdo->exec('ALTER TABLE wikipage_editions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci');
17+
$pdo->exec('ALTER TABLE wikipage_has_files CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci');
18+
}
819

920
function version_8(PDO $pdo)
1021
{

Template/board/view_public.php

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<section id="main" class="public-board">
2+
<?= $this->url->link(t('wiki'), 'WikiController', 'readonly', array('plugin' => 'wiki', 'token' => $project['token']), false, '', '', true) ?>
3+
<?= $this->render('board/table_container', array(
4+
'project' => $project,
5+
'swimlanes' => $swimlanes,
6+
'board_private_refresh_interval' => $board_private_refresh_interval,
7+
'board_highlight_period' => $board_highlight_period,
8+
'not_editable' => true,
9+
)) ?>
10+
11+
</section>

Template/wiki/detail.php

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<?php (isset($not_editable)) ?: $not_editable = false;
2+
?>
13
<?php if (!$not_editable): ?>
24
<?= $this->projectHeader->render($project, 'TaskListController', 'show') ?>
35
<?php endif ?>

Template/wiki/show.php

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<?php (isset($not_editable)) ?: $not_editable = false;
2+
?>
13
<?php if (!$not_editable): ?>
24
<?= $this->projectHeader->render($project, 'TaskListController', 'show') ?>
35
<?php endif ?>
@@ -9,6 +11,8 @@
911
<br>
1012
<?= $this->url->icon('share-alt', t('Public link'), 'WikiController', 'readonly', array('plugin' => 'wiki', 'token' => $project['token']), false, '', '', true) ?>
1113
<?php endif ?>
14+
<?php else: ?>
15+
<?= $this->url->link(t('Board'), 'BoardViewController', 'readonly', array('token' => $project['token']), false, '', '', true) ?>
1216
<?php endif ?>
1317
</div>
1418

0 commit comments

Comments
 (0)