From e77fbaca4fceffc701fbb13d3d91b4f8933ce80a Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Mon, 12 Jun 2023 02:30:50 +0300 Subject: [PATCH 01/28] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D1=86=D0=B5=D1=81?= =?UTF-8?q?=D1=81=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20=D0=BD=D0=B0?= =?UTF-8?q?=D0=B4=20#49.=20=D0=92=D1=81=D0=B5=20=D0=B7=D0=B0=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B5=D0=B5=20=D0=BE=D0=B3=D0=BE=D0=B2=D0=BE=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=BC=D0=BE=D0=B4=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D1=81=D0=BA=D0=B8=D0=B5=20=D1=84=D1=83=D0=BD?= =?UTF-8?q?=D0=BA=D1=86=D0=B8=D0=B8=20=D0=B2=20=D0=BE=D0=B4=D0=BD=D0=BE?= =?UTF-8?q?=D0=BC=20=D1=84=D0=BB=D0=B0=D0=BA=D0=BE=D0=BD=D0=B5.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _incl_data/class/Moderation/Moderation.php | 119 +++++++++++++++++++++ 1 file changed, 119 insertions(+) create mode 100644 _incl_data/class/Moderation/Moderation.php diff --git a/_incl_data/class/Moderation/Moderation.php b/_incl_data/class/Moderation/Moderation.php new file mode 100644 index 00000000..78f66114 --- /dev/null +++ b/_incl_data/class/Moderation/Moderation.php @@ -0,0 +1,119 @@ +target = $userid; + } + + /** + * + * @param DateTime $expiration . + * @param string|null $reason . + */public function silence(DateTime $expiration, ?string $reason = null) + { + Db::sql('update users set molch1 = ? where id = ?', [$expiration->getTimestamp(), $this->target]); + } + + /** + * + */ + public function unsilence() + { + Db::sql('update users set molch1 = default where id = ?', [$this->target]); + } + + /** + * + * @param DateTime $expiration . + * @param string|null $reason . + */ + public function depersonalize(DateTime $expiration, ?string $reason = null) + { + Db::sql('update users set info_delete = ? where id = ?', [$expiration->getTimestamp(), $this->target]); + } + + /** + * + */ + public function undepersonalize() + { + Db::sql('update users set info_delete = default where id = ?', [$this->target]); + } + + /** + * + * @param DateTime $expiration . + * @param string|null $reason . + */ + public function prison(DateTime $expiration, ?string $reason = null) + { + Db::sql('update users set jail = ?, room = ? where id = ?', [ + $expiration->getTimestamp(), + self::JAIL_ROOM, + $this->target, + ]); + Db::sql('update items_users set `delete` = ? where `delete` = 0 and uid = ?', [ + self::JAIL_STORAGE, + $this->target, + ]); + } + + /** + * + */ + public function unprison() + { + Db::sql('update users set jail = default, room = ? where id = ?', [ + self::CENTRAL_SQUARE_ROOM, + $this->target, + ]); + Db::sql('update items_users set `delete` = default where `delete` = ? and uid = ?', [ + 1357908642, + $this->target, + ]); + } + + /** + * + * @param string|null $reason . + */ + public function ban(?string $reason = null) + { + Db::sql('update users set banned = unix_timestamp() where id = ?', [$this->target]); + } + + /** + * + */ + public function unban() + { + Db::sql('update users set banned = default where id = ?', [$this->target]); + } + + /** + * + * @param Target $uid . + * @param DateTime|null $date , - . + */ + public function showItemTransferLogs(Target $uid, ?DateTime $date) + { + // TODO: Implement showItemTransferLogs() method. + } +} \ No newline at end of file -- 2.45.2 From 80fb8fe8355f8f060d2106e6f9d63fe8e6ea0cb8 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Mon, 12 Jun 2023 02:32:14 +0300 Subject: [PATCH 02/28] =?UTF-8?q?=D0=9F=D1=80=D0=BE=D1=86=D0=B5=D1=81?= =?UTF-8?q?=D1=81=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D1=8B=20=D0=BD=D0=B0?= =?UTF-8?q?=D0=B4=20#49.=20=D0=92=D1=81=D0=B5=20=D0=B7=D0=B0=D1=80=D0=B0?= =?UTF-8?q?=D0=BD=D0=B5=D0=B5=20=D0=BE=D0=B3=D0=BE=D0=B2=D0=BE=D1=80=D0=B5?= =?UTF-8?q?=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=BC=D0=BE=D0=B4=D0=B5=D1=80=D0=B0?= =?UTF-8?q?=D1=82=D0=BE=D1=80=D1=81=D0=BA=D0=B8=D0=B5=20=D1=84=D1=83=D0=BD?= =?UTF-8?q?=D0=BA=D1=86=D0=B8=D0=B8=20=D0=B2=20=D0=BE=D0=B4=D0=BD=D0=BE?= =?UTF-8?q?=D0=BC=20=D1=84=D0=BB=D0=B0=D0=BA=D0=BE=D0=BD=D0=B5.=20(=D1=84?= =?UTF-8?q?=D0=B8=D0=BA=D1=81=20=D0=BA=D0=BE=D0=B4=D0=B8=D1=80=D0=BE=D0=B2?= =?UTF-8?q?=D0=BE=D0=BA)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _incl_data/class/Moderation/Moderation.php | 44 +++++++++++----------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/_incl_data/class/Moderation/Moderation.php b/_incl_data/class/Moderation/Moderation.php index 78f66114..c5ab6b47 100644 --- a/_incl_data/class/Moderation/Moderation.php +++ b/_incl_data/class/Moderation/Moderation.php @@ -5,15 +5,15 @@ namespace Moderation; use Core\Db; use DateTime; -// todo . -// todo . ! -// todo . +// todo Запись в личное дело или добавить или убрать остатки. +// todo Заменить уродский костыль с тюремным сундуком. Возможен конфликт с автоудалением предметов! +// todo Понять как мониторить переводы. class Moderation { private const JAIL_ROOM = 274; private const CENTRAL_SQUARE_ROOM = 9; - private const JAIL_STORAGE = 1357908642; /* , ! */ + private const JAIL_STORAGE = 1357908642; /* Ух, костыль! */ private int $target; @@ -23,16 +23,16 @@ class Moderation } /** - * - * @param DateTime $expiration . - * @param string|null $reason . + * Молчание + * @param DateTime $expiration срок истечения. + * @param string|null $reason причина применения. */public function silence(DateTime $expiration, ?string $reason = null) { Db::sql('update users set molch1 = ? where id = ?', [$expiration->getTimestamp(), $this->target]); } /** - * + * Снятие молчания */ public function unsilence() { @@ -40,9 +40,9 @@ class Moderation } /** - * - * @param DateTime $expiration . - * @param string|null $reason . + * Обезличивание + * @param DateTime $expiration срок истечения. + * @param string|null $reason причина применения. */ public function depersonalize(DateTime $expiration, ?string $reason = null) { @@ -50,7 +50,7 @@ class Moderation } /** - * + * Снятие обезличивания */ public function undepersonalize() { @@ -58,9 +58,9 @@ class Moderation } /** - * - * @param DateTime $expiration . - * @param string|null $reason . + * Тюрьма + * @param DateTime $expiration срок истечения. + * @param string|null $reason причина применения. */ public function prison(DateTime $expiration, ?string $reason = null) { @@ -76,7 +76,7 @@ class Moderation } /** - * + * Снятие тюрьмы */ public function unprison() { @@ -91,8 +91,8 @@ class Moderation } /** - * - * @param string|null $reason . + * Блокировка + * @param string|null $reason причина применения. */ public function ban(?string $reason = null) { @@ -100,7 +100,7 @@ class Moderation } /** - * + * Снятие блокировки */ public function unban() { @@ -108,9 +108,9 @@ class Moderation } /** - * - * @param Target $uid . - * @param DateTime|null $date , - . + * Проверка переводов + * @param Target $uid кто проверяется. + * @param DateTime|null $date дата переводов, если не указано - показать все переводы. */ public function showItemTransferLogs(Target $uid, ?DateTime $date) { -- 2.45.2 From eb279a8eff5d54e2811aa179ff27907998a34791 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 00:28:59 +0200 Subject: [PATCH 03/28] =?UTF-8?q?=D0=9F=D0=B8=D1=88=D0=B5=D0=BC=20=D0=B4?= =?UTF-8?q?=D0=B5=D0=B9=D1=81=D1=82=D0=B2=D0=B8=D1=8F=20=D0=B2=20=D0=B4?= =?UTF-8?q?=D0=B5=D0=BB=D0=BE.=20=D0=A2=D0=B8=D0=BF=20`10`=20=D0=B2=D0=B7?= =?UTF-8?q?=D1=8F=D1=82=20=D0=BD=D0=B0=D1=83=D0=B3=D0=B0=D0=B4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _incl_data/class/Moderation/Moderation.php | 107 +++++++++++++++------ 1 file changed, 75 insertions(+), 32 deletions(-) diff --git a/_incl_data/class/Moderation/Moderation.php b/_incl_data/class/Moderation/Moderation.php index c5ab6b47..350e107d 100644 --- a/_incl_data/class/Moderation/Moderation.php +++ b/_incl_data/class/Moderation/Moderation.php @@ -4,8 +4,8 @@ namespace Moderation; use Core\Db; use DateTime; +use Delo; -// todo Запись в личное дело или добавить или убрать остатки. // todo Заменить уродский костыль с тюремным сундуком. Возможен конфликт с автоудалением предметов! // todo Понять как мониторить переводы. @@ -14,7 +14,8 @@ class Moderation private const JAIL_ROOM = 274; private const CENTRAL_SQUARE_ROOM = 9; private const JAIL_STORAGE = 1357908642; /* Ух, костыль! */ - + private const NOT_SET = 'Не указано.'; + private const EXPIRATION_DATETIME_FORMAT = 'd M Y H:i'; private int $target; public function __construct(int $userid) @@ -24,87 +25,129 @@ class Moderation /** * Молчание - * @param DateTime $expiration срок истечения. - * @param string|null $reason причина применения. - */public function silence(DateTime $expiration, ?string $reason = null) + * @param DateTime $expiration срок истечения. + * @param string $reason причина применения. + */ + public function silence(DateTime $expiration, string $reason = self::NOT_SET): void { Db::sql('update users set molch1 = ? where id = ?', [$expiration->getTimestamp(), $this->target]); + Delo::add( + 10, + 'moderation.silence', + $this->target, + 'Молчанка в чате до ' . $expiration->format(self::EXPIRATION_DATETIME_FORMAT) . '. ' . $reason, + ); } /** * Снятие молчания */ - public function unsilence() + public function unsilence(): void { + if (Db::getValue('select count(molch1) from users where id = ? and molch1 != 0', [$this->target]) === 0) { + return; + } Db::sql('update users set molch1 = default where id = ?', [$this->target]); + Delo::add( + 10, + 'moderation.unsilence', + $this->target, + 'Отмена молчанки.', + ); } /** * Обезличивание - * @param DateTime $expiration срок истечения. - * @param string|null $reason причина применения. + * @param DateTime $expiration срок истечения. + * @param string $reason причина применения. */ - public function depersonalize(DateTime $expiration, ?string $reason = null) + public function depersonalize(DateTime $expiration, string $reason = self::NOT_SET): void { Db::sql('update users set info_delete = ? where id = ?', [$expiration->getTimestamp(), $this->target]); + Delo::add( + 10, + 'moderation.depersonalize', + $this->target, + 'Скрытие анкеты до ' . $expiration->format(self::EXPIRATION_DATETIME_FORMAT) . '. ' . $reason, + ); } /** * Снятие обезличивания */ - public function undepersonalize() + public function undepersonalize(): void { + if (Db::getValue('select count(info_delete) from users where id = ? and info_delete != 0', [$this->target]) === 0) { + return; + } Db::sql('update users set info_delete = default where id = ?', [$this->target]); + Delo::add( + 10, + 'moderation.undepersonalize', + $this->target, + 'Раскрытие анкеты.', + ); } /** * Тюрьма - * @param DateTime $expiration срок истечения. - * @param string|null $reason причина применения. + * @param DateTime $expiration срок истечения. + * @param string $reason причина применения. */ - public function prison(DateTime $expiration, ?string $reason = null) + public function prison(DateTime $expiration, string $reason = self::NOT_SET): void { - Db::sql('update users set jail = ?, room = ? where id = ?', [ - $expiration->getTimestamp(), - self::JAIL_ROOM, + Db::sql('update users set jail = ?, room = ? where id = ?', [$expiration->getTimestamp(), self::JAIL_ROOM, $this->target,]); + Db::sql('update items_users set `delete` = ? where `delete` = 0 and uid = ?', [self::JAIL_STORAGE, $this->target,]); + Delo::add( + 10, + 'moderation.prison', $this->target, - ]); - Db::sql('update items_users set `delete` = ? where `delete` = 0 and uid = ?', [ - self::JAIL_STORAGE, - $this->target, - ]); + 'Тюрьма до ' . $expiration->format(self::EXPIRATION_DATETIME_FORMAT) . '. ' . $reason, + ); } /** * Снятие тюрьмы */ - public function unprison() + public function unprison(): void { - Db::sql('update users set jail = default, room = ? where id = ?', [ - self::CENTRAL_SQUARE_ROOM, + Db::sql('update users set jail = default, room = ? where id = ?', [self::CENTRAL_SQUARE_ROOM, $this->target,]); + Db::sql('update items_users set `delete` = default where `delete` = ? and uid = ?', [self::JAIL_STORAGE, $this->target,]); + Delo::add( + 10, + 'moderation.unprison', $this->target, - ]); - Db::sql('update items_users set `delete` = default where `delete` = ? and uid = ?', [ - 1357908642, - $this->target, - ]); + 'Выпуск из тюрьмы.', + ); } /** * Блокировка - * @param string|null $reason причина применения. + * @param string $reason причина применения. */ - public function ban(?string $reason = null) + public function ban(string $reason = self::NOT_SET): void { Db::sql('update users set banned = unix_timestamp() where id = ?', [$this->target]); + Delo::add( + 10, + 'moderation.ban', + $this->target, + 'Блокировка. ' . $reason, + ); } /** * Снятие блокировки */ - public function unban() + public function unban(): void { Db::sql('update users set banned = default where id = ?', [$this->target]); + Delo::add( + 10, + 'moderation.unban', + $this->target, + 'Снятие блокировки.', + ); } /** -- 2.45.2 From 4e7890511c566138c981031710e189a7f08d5237 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 00:47:20 +0200 Subject: [PATCH 04/28] =?UTF-8?q?=D0=A1=D0=BD=D1=8F=D1=82=D0=B8=D0=B5=20?= =?UTF-8?q?=D0=BE=D0=B1=D0=B5=D0=B7=D0=BB=D0=B8=D1=87=D0=B8=D0=B2=D0=B0?= =?UTF-8?q?=D0=BD=D0=B8=D1=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/moder/unusedeletinfo.php | 61 +++++++++++---------------- 1 file changed, 24 insertions(+), 37 deletions(-) diff --git a/modules_data/moder/unusedeletinfo.php b/modules_data/moder/unusedeletinfo.php index 783eca15..84f65c63 100644 --- a/modules_data/moder/unusedeletinfo.php +++ b/modules_data/moder/unusedeletinfo.php @@ -1,45 +1,32 @@ time()) - { - $upd = mysql_query('UPDATE `users` SET `info_delete` = 0 WHERE `id` = "'.$uu['id'].'" LIMIT 1'); - if($upd) - { - $sx = ''; - if($u->info['sex']==1) - { - $sx = 'а'; - } - $rtxt = '[img[items/uncui.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' заклятие обезличивание с персонажа "'.$uu['login'].'"'; + +if ($p['deletInfo'] != 1) { + $uer = 'У Вас нет прав на использование данного заклятия'; + return; +} + +$uu = \Core\Db::getRow('select id, login, info_delete from users where login = ? order by id limit 1', [$_POST['logingo']]); + +if (!isset($uu['id'])) { + $uer = 'Персонаж не найден.'; + return; +} + +if ($uu['info_delete'] <= time()) { + $uer = 'Персонаж не обезличен'; + return; +} + +(new \Moderation\Moderation($uu['id']))->undepersonalize(); $cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); $cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); +$cmsg->setText("[img[items/uncui.gif]] Персонаж {$uu['login']} больше не под подозрением."); $cmsg->setType(6); $cmsg->setTypeTime(1); (new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие "обезличивание".'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); - $uer = 'Вы успешно сняли заклятие обезличивания с персонажа "'.$uu['login'].'".
'; - }else{ - $uer = 'Не удалось использовать данное заклятие'; - } - }else{ - $uer = 'Персонаж не обезличен'; - } - }else{ - $uer = 'Персонаж не найден в этом городе'; - } -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file + +$uer = 'Вы успешно сняли заклятие обезличивания с персонажа "' . $uu['login'] . '".
'; -- 2.45.2 From 916f985c60307e5297727cdbc2e6ff394bdcf5cb Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 01:13:29 +0200 Subject: [PATCH 05/28] =?UTF-8?q?=D0=A2=D1=8E=D1=80=D1=8C=D0=BC=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _incl_data/class/Moderation/Moderation.php | 1 + modules_data/moder/use_carcer.php | 86 ++++++---------------- 2 files changed, 24 insertions(+), 63 deletions(-) diff --git a/_incl_data/class/Moderation/Moderation.php b/_incl_data/class/Moderation/Moderation.php index 350e107d..368d8bc3 100644 --- a/_incl_data/class/Moderation/Moderation.php +++ b/_incl_data/class/Moderation/Moderation.php @@ -93,6 +93,7 @@ class Moderation * Тюрьма * @param DateTime $expiration срок истечения. * @param string $reason причина применения. + * @todo Корректно выбрасывать игрока из подземелья. */ public function prison(DateTime $expiration, string $reason = self::NOT_SET): void { diff --git a/modules_data/moder/use_carcer.php b/modules_data/moder/use_carcer.php index 88809b0e..cdf96578 100644 --- a/modules_data/moder/use_carcer.php +++ b/modules_data/moder/use_carcer.php @@ -1,71 +1,31 @@ 0 && $u->info['admin']==0) - { - $uer = 'Вы не можете посадить Ангела.'; - } - if($uu['city']!=$u->info['city'] && $p['citym1']==0){ - $uer = 'Персонаж находится в другом городе'; - }elseif($uuss['dnow'] > 0){ - $uer = 'Персонаж находится в подземелье'; - }elseif(floor($uu['align'])==$a && $uu['align']>$u->info['align'] && $u->info['admin']==0) - { - $uer = 'Вы не можете посадить старших по званию'; - }elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){ - $uer = 'Вы не можете посадить самого себя'; - }else{ - $upd = mysql_query('UPDATE `users` SET `jail` = "'.mysql_real_escape_string($time).'", `room`="274", `city`="capitalcity" WHERE `id` = "'.$uu['id'].'" LIMIT 1'); - if($upd) - { - $sx = ''; - if($u->info['sex']==1) - { - $sx = 'а'; - } - mysql_query('UPDATE `items_users` SET `delete` = "1357908642" WHERE `uid` = '.$uu['id'].' AND `delete` = 0'); - $rtxt = '[img[items/jail.gif]] '.$rang.' "'.$u->info['cast_login'].'" отправил'.$sx.' в заточение "'.$uu['login'].'", сроком '.$srokt[$tm].''; +if ($p['zatoch'] != 1 && $p['citym1'] != 1) { + $uer = 'У Вас нет прав на использование данного заклятия'; + return; +} + +$uu = \Core\Db::getRow('select id, login from users where login = ? order by id limit 1', [$_POST['logingo']]); + +if (!isset($uu['id'])) { + $uer = 'Персонаж не найден.'; + return; +} + +$time = new DateTime(); +$time->modify("+ {$_POST['time']} day"); +(new \Moderation\Moderation($uu['id']))->prison($time); +\Core\Db::sql('delete from dungeon_zv where uid = ?', [$uu['id']]); // Удаляем заявки в пещеры. + +$rtxt = "Персонаж {$uu['login']} был отправлен в тюрьму до {$time->format('d M Y H:i')}."; $cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); $cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); +$cmsg->setText("[img[items/jail.gif]] $rtxt"); $cmsg->setType(6); $cmsg->setTypeTime(1); (new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" отправил'.$sx.' в "заточение" сроком '.$srokt[$tm].'.'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',6)"); - $uer = 'Вы успешно посадили в тюрьму персонажа "'.$uu['login'].'", сроком '.$srok[$tm].'.'; - }else{ - $uer = 'Не удалось использовать данное заклятие'; - } - } - }else{ - $uer = 'Персонаж не найден в этом городе'; - } - } -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file + +$uer = $rtxt; -- 2.45.2 From 6c6a0b10381db0a45bf82eab26d3b1c343d9a828 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 01:34:49 +0200 Subject: [PATCH 06/28] =?UTF-8?q?=D0=91=D0=BB=D0=BE=D0=BA=D0=B8=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=D0=BA=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/moder/useban.php | 117 ++++++++++------------------------ 1 file changed, 34 insertions(+), 83 deletions(-) diff --git a/modules_data/moder/useban.php b/modules_data/moder/useban.php index 763646f2..52f810b2 100644 --- a/modules_data/moder/useban.php +++ b/modules_data/moder/useban.php @@ -1,91 +1,42 @@ 1 && $uu['align']<2 && $u->info['admin']==0) - { - $uer = 'Вы не можете использовать данное заклятие на Паладинов.
'; - }elseif($uu['align']>3 && $uu['align']<4 && $u->info['admin']==0) - { - $uer = 'Вы не можете использовать данное заклятие на Тарманов.
'; - }elseif($uu['banned']>0) - { - $uer = 'Персонаж был заблокирован ранее'; - }elseif($p['banned']==0 && $uu['level']>0) - { - $uer = 'Вы не можете накладывать заклятие смерти на персонажей старше 0-го уровня'; - }elseif($uu['admin']>0 && $u->info['admin']==0) - {$uer = 'Вы не можете накладывать заклятие смерти на Ангелов'; - //}elseif($uu['city']!=$u->info['city'] && $p['citym1']==0){ - // $uer = 'Персонаж находится в другом городе'; - }elseif(floor($uu['align'])==$a && $uu['align']>$u->info['align'] && $u->info['admin']==0) - { - $uer = 'Вы не можете накладывать заклятие смерти на старших по званию'; - }elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){ - $uer = 'Вы не можете накладывать заклятие смерти на самого себя'; - }else{ - $upd = mysql_query('UPDATE `users` SET `banned` = "'.time().'" WHERE `id` = "'.$uu['id'].'" LIMIT 1'); - if($upd) - { - $sx = ''; - if($u->info['sex']==1) - { - $sx = 'а'; - } - $rtxt = '[img[items/pal_button6.gif]] '.$rang.' "'.$u->info['cast_login'].'" наложил'.$sx.' заклятие смерти на "'.$uu['login'].'"'; - mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '".$uu['login']."' LIMIT 1000"); + +if ($p['banned'] != 1 && $p['ban0'] != 1) { + $uer = 'У Вас нет прав на использование данного заклятия'; + return; +} + +$uu = \Core\Db::getRow('select id, login, banned, battle, mail from users where login = ? order by id limit 1', [$_POST['logingo']]); + +if (!isset($uu['id'])) { + $uer = 'Персонаж не найден в этом городе'; + return; +} + +if ($uu['banned'] > 0) { + $uer = 'Персонаж уже заблокирован.'; + return; +} + +(new \Moderation\Moderation($uu['id']))->ban(); +\Core\Db::sql('delete from chat where login = ?', [$uu['login']]); +\Core\Db::sql('insert into ban_email (email, uid, nick_name) values (?,?,?)', [$uu['mail'], $uu['id'], $uu['login']]); +\Core\Db::sql('delete from zayvki where creator = ?', [$uu['id']]); // Удаляем заявки на бой. +\Core\Db::sql('delete from dungeon_zv where uid = ?', [$uu['id']]); // Удаляем заявки в пещеры. + +if (!empty($uu['battle'])) { + \Core\Db::sql('update users left join stats on users.id = stats.id set battle = default, regHP = unix_timestamp(), team = 0, battle_yron = 0, battle_exp = 0 where users.id = ?', [$uu['id']]); +} + +$rtxt = "Персонаж {$uu['login']} заблокирован."; $cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); $cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); +$cmsg->setText("[img[items/pal_button6.gif]] $rtxt"); $cmsg->setType(6); $cmsg->setTypeTime(1); (new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" наложил'.$sx.' заклятие "смерти".'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); - $uer = 'Вы успешно наложили заклятие смерти на персонажа "'.$uu['login'].'".'; - mysql_query("INSERT INTO `ban_email`(`email`, `uid`, `nick_name`) VALUES ('".$uu['mail']."','".$uu['id']."','".$uu['login']."')"); - - //‚ытаскиваем из боЯ если в бою - if($uu['battle']!=0) - { - $uu['battle'] = 0; - $upd = mysql_query('UPDATE `users` SET `battle` = "'.$uu['battle'].'" WHERE `id` = "'.$uu['id'].'" LIMIT 1'); - if($upd) - { - mysql_query('UPDATE `stats` SET - `regHP` = "'.time().'" - ,`team` = 0 - ,`battle_yron` = 0 - ,`battle_exp` = 0 - WHERE `id` = "'.$uu['id'].'" LIMIT 1'); - } - } - //========================== - //“далЯем завки в Ѓой - // - mysql_query("DELETE FROM `zayvki` WHERE `creator` = '".$uu['id']."'"); - //========================== - //“далЯем завки Џещеры - // - mysql_query("UPDATE `dungeon_zv` SET `delete` = '".time()."' WHERE `uid` = '".$uu['id']."'"); - //========================== - - }else{ - $uer = 'Не удалось использовать данное заклятие'; - } - } - }else{ - $uer = 'Персонаж не найден в этом городе'; - } -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file + +$uer = $rtxt; -- 2.45.2 From 6bc3b5bc2971b0544ee73002acb5d9b51571c85b Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 01:47:21 +0200 Subject: [PATCH 07/28] =?UTF-8?q?=D0=9E=D0=B1=D0=B5=D0=B7=D0=BB=D0=B8?= =?UTF-8?q?=D0=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/moder/usedeletinfo.php | 93 ++++++++++------------------- 1 file changed, 30 insertions(+), 63 deletions(-) diff --git a/modules_data/moder/usedeletinfo.php b/modules_data/moder/usedeletinfo.php index e9ac22f0..10b58d32 100644 --- a/modules_data/moder/usedeletinfo.php +++ b/modules_data/moder/usedeletinfo.php @@ -2,69 +2,36 @@ if (!defined('GAME')) { die(); } -if ($p['deletInfo'] == 1) { - $tm = (int)$_POST['time']; - if ($tm != 1 && $tm != 7 && $tm != 14 && $tm != 30 && $tm != 60) { - $uer = 'Неверно указаны данные'; - } else { - $uu = mysql_fetch_array( - mysql_query( - 'SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['logingo']) . '" LIMIT 1' - ) - ); - if (isset($uu['id'])) { - if ($uu['info_delete'] != 1 && $uu['info_delete'] < time()) { - $srok = [ - 1 => 'бессрочно', - 7 => 'неделя', - 14 => 'две недели', - 30 => 'месяц', - 60 => 'два месяца', - ]; - $srok = $srok[$tm]; - if ($tm == 1) { - $tm = '`info_delete` = "1"'; - } elseif ($tm == 7) { - $tm = '`info_delete` = "' . (time() + 7 * 86400) . '"'; - } elseif ($tm == 14) { - $tm = '`info_delete` = "' . (time() + 14 * 86400) . '"'; - } elseif ($tm == 30) { - $tm = '`info_delete` = "' . (time() + 30 * 86400) . '"'; - } elseif ($tm == 60) { - $tm = '`info_delete` = "' . (time() + 60 * 86400) . '"'; - } - $upd = mysql_query('UPDATE `users` SET ' . $tm . ' WHERE `id` = "' . $uu['id'] . '" LIMIT 1'); - if ($upd) { - $sx = ''; - if ($u->info['sex'] == 1) { - $sx = 'а'; - } - $rtxt = '[img[items/cui.gif]] ' . $rang . ' "' . $u->info['cast_login'] . '" использовал' . $sx . ' заклятие обезличивание на "' . $uu['login'] . '" сроком ' . $srok; - $cmsg = new ChatMessage(); - $cmsg->setCity($u->info['city']); - $cmsg->setRoom($u->info['room']); - $cmsg->setText($rtxt); - $cmsg->setType(6); - $cmsg->setTypeTime(1); - (new Chat())->sendMsg($cmsg); - - $rtxt = $rang . ' "' . $u->info['login'] . '" использовал' . $sx . ' заклятие "обезличивание", сроком ' . $srok . '.'; - mysql_query( - "INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('" . $uu['id'] . "','" . $_SERVER['REMOTE_ADDR'] . "','" . $u->info['city'] . "','" . time( - ) . "','" . $rtxt . "','" . $u->info['login'] . "',0)" - ); - $uer = 'Вы успешно использовали заклятие обезличивания на персонажа "' . $uu['login'] . '".
'; - } else { - $uer = 'Не удалось использовать данное заклятие'; - } - } else { - $uer = 'Персонаж уже обезличен'; - } - } else { - $uer = 'Персонаж не найден в этом городе'; - } - } -} else { +if ($p['deletInfo'] != 1) { $uer = 'У Вас нет прав на использование данного заклятия'; + return; } + +$uu = \Core\Db::getRow('select * from users where login = ? order by id limit 1', [$_POST['logingo']]); + +if (!isset($uu['id'])) { + $uer = 'Персонаж не найден.'; + return; +} + +if ($uu['info_delete'] == 1 || $uu['info_delete'] >= time()) { + $uer = 'Персонаж уже обезличен'; + return; +} + +$time = new DateTime(); +$time->modify("+ {$_POST['time']} day"); +(new \Moderation\Moderation($uu['id']))->depersonalize($time); + +$rtxt = "Персонаж {$uu['login']} под подозрением до {$time->format('d M Y H:i')}."; +unset($time); + +$cmsg = new ChatMessage(); +$cmsg->setRoom($u->info['room']); +$cmsg->setText("[img[items/cui.gif]] $rtxt"); +$cmsg->setType(6); +$cmsg->setTypeTime(1); +(new Chat())->sendMsg($cmsg); + +$uer = $rtxt; -- 2.45.2 From cc6b7e6c985288a7d26d37566f8a8f8b60cbcdf9 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 01:50:52 +0200 Subject: [PATCH 08/28] =?UTF-8?q?=D0=9D=D0=B5=D0=BD=D1=83=D0=B6=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F=20=D0=BF=D0=B5=D1=80=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD?= =?UTF-8?q?=D0=B0=D1=8F.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/moder/unusedeletinfo.php | 6 +++--- modules_data/moder/use_carcer.php | 8 ++++---- modules_data/moder/useban.php | 6 ++---- modules_data/moder/usedeletinfo.php | 6 ++---- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/modules_data/moder/unusedeletinfo.php b/modules_data/moder/unusedeletinfo.php index 84f65c63..24e1de75 100644 --- a/modules_data/moder/unusedeletinfo.php +++ b/modules_data/moder/unusedeletinfo.php @@ -22,11 +22,11 @@ if ($uu['info_delete'] <= time()) { (new \Moderation\Moderation($uu['id']))->undepersonalize(); +$uer = "Персонаж {$uu['login']} больше не под подозрением."; + $cmsg = new ChatMessage(); $cmsg->setRoom($u->info['room']); -$cmsg->setText("[img[items/uncui.gif]] Персонаж {$uu['login']} больше не под подозрением."); +$cmsg->setText("[img[items/uncui.gif]] $uer"); $cmsg->setType(6); $cmsg->setTypeTime(1); (new Chat())->sendMsg($cmsg); - -$uer = 'Вы успешно сняли заклятие обезличивания с персонажа "' . $uu['login'] . '".
'; diff --git a/modules_data/moder/use_carcer.php b/modules_data/moder/use_carcer.php index cdf96578..9cd5504c 100644 --- a/modules_data/moder/use_carcer.php +++ b/modules_data/moder/use_carcer.php @@ -20,12 +20,12 @@ $time->modify("+ {$_POST['time']} day"); (new \Moderation\Moderation($uu['id']))->prison($time); \Core\Db::sql('delete from dungeon_zv where uid = ?', [$uu['id']]); // Удаляем заявки в пещеры. -$rtxt = "Персонаж {$uu['login']} был отправлен в тюрьму до {$time->format('d M Y H:i')}."; +$uer = "Персонаж {$uu['login']} был отправлен в тюрьму до {$time->format('d M Y H:i')}."; +unset($time); + $cmsg = new ChatMessage(); $cmsg->setRoom($u->info['room']); -$cmsg->setText("[img[items/jail.gif]] $rtxt"); +$cmsg->setText("[img[items/jail.gif]] $uer"); $cmsg->setType(6); $cmsg->setTypeTime(1); (new Chat())->sendMsg($cmsg); - -$uer = $rtxt; diff --git a/modules_data/moder/useban.php b/modules_data/moder/useban.php index 52f810b2..22312fba 100644 --- a/modules_data/moder/useban.php +++ b/modules_data/moder/useban.php @@ -30,13 +30,11 @@ if (!empty($uu['battle'])) { \Core\Db::sql('update users left join stats on users.id = stats.id set battle = default, regHP = unix_timestamp(), team = 0, battle_yron = 0, battle_exp = 0 where users.id = ?', [$uu['id']]); } -$rtxt = "Персонаж {$uu['login']} заблокирован."; +$uer = "Персонаж {$uu['login']} заблокирован."; $cmsg = new ChatMessage(); $cmsg->setRoom($u->info['room']); -$cmsg->setText("[img[items/pal_button6.gif]] $rtxt"); +$cmsg->setText("[img[items/pal_button6.gif]] $uer"); $cmsg->setType(6); $cmsg->setTypeTime(1); (new Chat())->sendMsg($cmsg); - -$uer = $rtxt; diff --git a/modules_data/moder/usedeletinfo.php b/modules_data/moder/usedeletinfo.php index 10b58d32..8be98f15 100644 --- a/modules_data/moder/usedeletinfo.php +++ b/modules_data/moder/usedeletinfo.php @@ -24,14 +24,12 @@ $time = new DateTime(); $time->modify("+ {$_POST['time']} day"); (new \Moderation\Moderation($uu['id']))->depersonalize($time); -$rtxt = "Персонаж {$uu['login']} под подозрением до {$time->format('d M Y H:i')}."; +$uer = "Персонаж {$uu['login']} под подозрением до {$time->format('d M Y H:i')}."; unset($time); $cmsg = new ChatMessage(); $cmsg->setRoom($u->info['room']); -$cmsg->setText("[img[items/cui.gif]] $rtxt"); +$cmsg->setText("[img[items/cui.gif]] $uer"); $cmsg->setType(6); $cmsg->setTypeTime(1); (new Chat())->sendMsg($cmsg); - -$uer = $rtxt; -- 2.45.2 From 00c06415912418886d992f8940e4e822f4585726 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 01:55:59 +0200 Subject: [PATCH 09/28] =?UTF-8?q?=D0=A5=D0=B0=D0=BE=D1=81=20=D0=BF=D0=BE?= =?UTF-8?q?=D0=B2=D0=B5=D1=80=D0=B6=D0=B5=D0=BD!=20:D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/_light.php | 7 +-- modules_data/_mod.php | 13 ------ modules_data/moder/usehaos.php | 75 --------------------------------- modules_data/moder/useshaos.php | 54 ------------------------ 4 files changed, 2 insertions(+), 147 deletions(-) delete mode 100644 modules_data/moder/usehaos.php delete mode 100644 modules_data/moder/useshaos.php diff --git a/modules_data/_light.php b/modules_data/_light.php index 649ef184..6e8b143e 100644 --- a/modules_data/_light.php +++ b/modules_data/_light.php @@ -160,9 +160,6 @@ $uer = ''; elseif(isset($_POST['usesm'])){require_once('moder/usesm.php');} elseif(isset($_POST['useban'])){require_once('moder/useban.php');} elseif(isset($_POST['useunban'])){require_once('moder/useunban.php');} - elseif(isset($_POST['usehaos'])){require_once('moder/usehaos.php');} - elseif(isset($_POST['useshaos'])){require_once('moder/useshaos.php');} - } /*подключаем скрипты к абилкам ;)*/ if($go==0) { @@ -178,8 +175,8 @@ $uer = ''; info['admin']>0){ ?> - - info['admin']>0){ ?> + + diff --git a/modules_data/_mod.php b/modules_data/_mod.php index 433c1c6a..6aaa026a 100644 --- a/modules_data/_mod.php +++ b/modules_data/_mod.php @@ -928,10 +928,6 @@ if (isset($p['id']) || $u->info['align'] == 1 || $u->info['align'] == 3) { require_once('moder/useban.php'); } elseif (isset($_POST['useunban'])) { require_once('moder/useunban.php'); - } elseif (isset($_POST['usehaos'])) { - require_once('moder/usehaos.php'); - } elseif (isset($_POST['useshaos'])) { - require_once('moder/useshaos.php'); } elseif (isset($_POST['teleport'])) { require_once('moder/teleport.php'); } elseif (isset($_POST['teleport-cometome'])) { @@ -1166,15 +1162,6 @@ if (isset($p['id']) || $u->info['align'] == 1 || $u->info['align'] == 3) { src="//img.new-combats.tech/i/items/pal_button7.gif" title="Снять заклятье смерти"/>     - - -     'одна неделя',14=>'две недели',30=>'один месяц',60=>'два месяца',1=>'бессрочно'); - if($tm!=7 && $tm!=14 && $tm!=30 && $tm!=60 && ($tm!=1 || ($p['haosInf']==0 && $tm==1))) - { - $uer = 'Неверно указано время наказания'; - }else{ - $uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "'.mysql_real_escape_string($_POST['logingo']).'" LIMIT 1')); - if(isset($uu['id'])) - { - if($uu['align']>1 && $uu['align']<2 && $u->info['admin']==0) - { - $uer = 'Вы не можете отправлять Паладина в хаос'; - }elseif($uu['align']>3 && $uu['align']<4 && $u->info['admin']==0) - { - $uer = 'Вы не можете отправлять Тармана в хаос'; - }elseif($uu['align']==2) - { - $uer = 'Персонаж был ранее отправлен в хаос'; - }elseif($uu['admin']>0 && $u->info['admin']==0) - { - $uer = 'Вы не можете отправлять Ангелов в хаос'; - }elseif($uu['city']!=$u->info['city'] && $p['citym1']==0){ - $uer = 'Персонаж находится в другом городе'; - }elseif(floor($uu['align'])==$a && $uu['align']>$u->info['align'] && $u->info['admin']==0) - { - $uer = 'Вы не можете накладывать заклятие на старших по званию'; - }elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){ - $uer = 'Вы не можете накладывать заклятие на самого себя'; - }else{ - $th = time()+($tm*24*60*60); - if($tm==1) - { - $th = 1; - } - $upd = mysql_query('UPDATE `users` SET `align` = "2",`clan` = "0",`haos` = "'.mysql_real_escape_string($th).'" WHERE `id` = "'.$uu['id'].'" LIMIT 1'); - if($upd) - { - $u->updateAlign( $uu['align'] , $uu['id'] ); - $sx = ''; - if($u->info['sex']==1) - { - $sx = 'а'; - } - mysql_query('UPDATE `users_delo` SET `hb` = "0" WHERE `uid` = "'.$uu['id'].'" AND `hb`!="0"'); - $rtxt = '[img[items/pal_button4.gif]] '.$rang.' "'.$u->info['cast_login'].'" отправил'.$sx.' персонажа "'.$uu['login'].'" в хаос на срок: '.$tmban[$tm].''; - -$cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); -$cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); -$cmsg->setType(6); -$cmsg->setTypeTime(1); -(new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" отправил'.$sx.' в "хаос" на срок: '.$tmban[$tm].'.'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); - $uer = 'Вы успешно отправили персонажа "'.$uu['login'].'" в хаос на срок: '.$tmban[$tm].'.'; - }else{ - $uer = 'Не удалось использовать данное заклятие'; - } - } - }else{ - $uer = 'Персонаж не найден в этом городе'; - } - } -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file diff --git a/modules_data/moder/useshaos.php b/modules_data/moder/useshaos.php deleted file mode 100644 index afa42aec..00000000 --- a/modules_data/moder/useshaos.php +++ /dev/null @@ -1,54 +0,0 @@ -info['sex']==1) - { - $sx = 'а'; - } - if($uu['admin']>0 && $u->info['admin']==0) - { - $uer = 'Вы не можете использовать данное заклятие на Ангелов.
'; - }elseif($uu['align']>1 && $uu['align']<2 && $u->info['align']>3 && $u->info['align']<4 && $u->info['admin']==0) - { - $uer = 'Вы не можете использовать данное заклятие на Паладинов.
'; - }elseif($uu['align']>3 && $uu['align']<4 && $u->info['align']>1 && $u->info['align']<2 && $u->info['admin']==0) - { - $uer = 'Вы не можете использовать данное заклятие на Тарманов.
'; - }elseif($uu['align']==2 || $uu['haos']>0) - { - $rtxt = '[img[items/pal_button5.gif]] '.$rang.' "'.$u->info['cast_login'].'" выпустил'.$sx.' персонажа "'.$uu['login'].'" из хаоса'; - -$cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); -$cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); -$cmsg->setType(6); -$cmsg->setTypeTime(1); -(new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" выпустил'.$sx.' из "хаоса".'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); - $uer = 'Вы успешно выпустили персонажа "'.$uu['login'].'" из хаоса.
'; - }else{ - $uer = 'Персонаж не в хаосе'; - } - }else{ - $uer = 'Не удалось использовать данное заклятие'; - } - }else{ - $uer = 'Персонаж не найден в этом городе'; - } -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file -- 2.45.2 From 26c3d2abddb95dad97aab3ce9220b64941cc6bd3 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 02:09:46 +0200 Subject: [PATCH 10/28] =?UTF-8?q?=D0=A7=D0=B0=D1=82=D0=BE=D0=BC=D0=BE?= =?UTF-8?q?=D0=BB=D1=87=D0=B0=D0=BD=D0=BA=D0=B0.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/moder/usem1.php | 79 ++++++++++-------------------------- 1 file changed, 21 insertions(+), 58 deletions(-) diff --git a/modules_data/moder/usem1.php b/modules_data/moder/usem1.php index 6b8f366b..d2a119d0 100644 --- a/modules_data/moder/usem1.php +++ b/modules_data/moder/usem1.php @@ -1,66 +1,29 @@ 0 && $u->info['admin']==0) - { - $uer = 'Вы не можете накладывать заклятие молчания на Ангелов'; - }elseif($uu['city']!=$u->info['city'] && $p['citym1']==0){ - $uer = 'Персонаж находится в другом городе'; - }elseif(floor($uu['align'])==$a && $uu['align']>$u->info['align'] && $u->info['admin']==0) - { - $uer = 'Вы не можете накладывать заклятие молчания на старших по званию'; - }elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){ - $uer = 'Вы не можете накладывать заклятие молчания на самого себя'; - }else{ - //Проверка на Активную молчанку, если молчанка больше чем на 5 минут, она не обновится. - $lastTime = mysql_fetch_array(mysql_query('SELECT `molch1` FROM `users` WHERE `id` = "'.$uu['id'].'" LIMIT 1')); - if(isset($lastTime[0]) && $lastTime[0]>(time()+300)){ - $ltm = round(($lastTime[0]-time())/60); - $uer = 'Не удалось использовать данное заклятие.
Персонаж будет молчать еще '.$ltm.' минут..
'; - } else { - // Наложение молчания - $upd = mysql_query('UPDATE `users` SET `molch1` = "'.mysql_real_escape_string(time()+round($tm)*60).'" WHERE `id` = "'.$uu['id'].'" LIMIT 1'); - if($upd) - { - $sx = ''; - if($u->info['sex']==1) - { - $sx = 'а'; - } - $rtxt = '[img[items/silence'.round($tm).'.gif]] '.$rang.' "'.$u->info['cast_login'].'" наложил'.$sx.' заклятие молчания на "'.$uu['login'].'", сроком '.$srok[$tm].''; + +if ($p['m1'] != 1 && $p['citym1'] != 1) { + $uer = 'У Вас нет прав на использование данного заклятия'; + return; +} + +$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['logingo']) . '" LIMIT 1')); +if (!isset($uu['id'])) { + $uer = 'Персонаж не найден в этом городе'; + return; +} + +$time = new DateTime(); +$time->modify("+ {$_POST['time']} minute"); +(new \Moderation\Moderation($uu['id']))->silence($time); + +$uer = "Персонажу {$uu['login']} запрещено общаться в чате до {$time->format('d M Y H:i')}."; +unset($time); $cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); $cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); +$cmsg->setText("[img[items/silence.gif]] $uer"); $cmsg->setType(6); $cmsg->setTypeTime(1); (new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" наложил'.$sx.' заклятие "молчания" сроком '.$srok[$tm].'.'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); - $uer = 'Вы успешно наложили заклятие молчания на персонажа '.$uu['login'].'", сроком '.$srok[$tm].'.'; - }else{ - $uer = 'Не удалось использовать данное заклятие'; - } - } - } - }else{ - $uer = 'Персонаж не найден в этом городе'; - } - } -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file -- 2.45.2 From 93eb62ca15ddb73f5a67ca1e4a70a62e3b237327 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 02:12:34 +0200 Subject: [PATCH 11/28] =?UTF-8?q?=D0=9D=D0=B5=D0=B2=D0=B8=D0=B4=D0=B8?= =?UTF-8?q?=D0=BC=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/moder/usenevid.php | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/modules_data/moder/usenevid.php b/modules_data/moder/usenevid.php index e5bd1bb7..6b81cc9c 100644 --- a/modules_data/moder/usenevid.php +++ b/modules_data/moder/usenevid.php @@ -1,20 +1,18 @@ info['invis']!=1 && $u->info['invis']info['invis'] = 1; - }else{ - $uer = 'Вы успешно выключили невидимку'; - $u->info['invis'] = 0; - } - mysql_query('UPDATE `users` SET `invis` = "'.$u->info['invis'].'" WHERE `id` = "'.$u->info['id'].'" LIMIT 1'); -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file +if ($p['invis'] != 1) { + $uer = 'У Вас нет прав на использование данного заклятия'; + return; +} + +if ($u->info['invis'] != 1 && $u->info['invis'] < time()) { + $uer = 'Вы успешно включили невидимку'; + $u->info['invis'] = 1; +} else { + $uer = 'Вы успешно выключили невидимку'; + $u->info['invis'] = 0; +} +\Core\Db::sql('update users set invis = ? where id = ?', [$u->info['invis'], $u->info['id']]); -- 2.45.2 From b69f57a73a0845265d2f67a4c4ad1fef15f9718d Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 02:18:44 +0200 Subject: [PATCH 12/28] =?UTF-8?q?=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D1=87=D0=B8=D1=81=D1=82=D0=BE=D1=82=D1=83.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/_mod.php | 13 -------- modules_data/moder/usepro.php | 60 ---------------------------------- modules_data/moder/usepro2.php | 60 ---------------------------------- 3 files changed, 133 deletions(-) delete mode 100644 modules_data/moder/usepro.php delete mode 100644 modules_data/moder/usepro2.php diff --git a/modules_data/_mod.php b/modules_data/_mod.php index 6aaa026a..b2d2c579 100644 --- a/modules_data/_mod.php +++ b/modules_data/_mod.php @@ -944,8 +944,6 @@ if (isset($p['id']) || $u->info['align'] == 1 || $u->info['align'] == 3) { require_once('moder/use_carcer.php'); } elseif (isset($_POST['v_carcer'])) { require_once('moder/v_carcer.php'); - } elseif (isset($_POST['usepro'])) { - require_once('moder/usepro.php'); } elseif (isset($_POST['usemarry'])) { require_once('moder/usemarry.php'); } elseif (isset($_POST['useunmarry'])) { @@ -966,8 +964,6 @@ if (isset($p['id']) || $u->info['align'] == 1 || $u->info['align'] == 3) { require_once('moder/usempa.php'); } elseif (isset($_POST['usenevid'])) { require_once('moder/usenevid.php'); - } elseif (isset($_POST['usepro2'])) { - require_once('moder/usepro2.php'); } elseif (isset($_POST['useunfight'])) { require_once('moder/useunfight.php'); } elseif (isset($_POST['usesex'])) { @@ -1190,15 +1186,6 @@ if (isset($p['id']) || $u->info['align'] == 1 || $u->info['align'] == 3) { src="//img.new-combats.tech/i/items/unpalt.gif" title="Изгнать из ОС"/>
    - - -     1 && $uu['align']<2 && $u->info['admin']==0) - { - $uer = 'Вы не можете использовать данное заклятие на Паладинов.
'; - }elseif($uu['align']>3 && $uu['align']<4 && $u->info['admin']==0) - { - $uer = 'Вы не можете использовать данное заклятие на Тарманов.
'; - }elseif($uu['palpro']>time()) - { - $uer = 'Персонаж уже имеет проверку на чистоту до '.date('d.m.Y H:i',$uu['palpro']); - }elseif($uu['admin']>0 && $u->info['admin']==0) - { - $uer = 'Вы не можете накладывать заклятие на Ангелов'; - }elseif($uu['city']!=$u->info['city'] && $p['citym1']==0){ - $uer = 'Персонаж находится в другом городе'; - }elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){ - $uer = 'Вы не можете ставить проверку самому себе'; - }else{ - $uu['palpro'] = time()+60*60*24*14; - $upd = mysql_query('UPDATE `users` SET `palpro` = "'.$uu['palpro'].'" WHERE `id` = "'.$uu['id'].'" LIMIT 1'); - if($upd) - { - $sx = ''; - if($u->info['sex']==1) - { - $sx = 'а'; - } - $rtxt = '[img[items/check.gif]] '.$rang.' "'.$u->info['cast_login'].'" подтвердил'.$sx.' что персонаж "'.$uu['login'].'" чист перед законом. (До '.date('d.m.Y H:i',$uu['palpro']).').'; - //mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '".$uu['login']."' LIMIT 1000"); - -$cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); -$cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); -$cmsg->setType(6); -$cmsg->setTypeTime(1); -(new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" подтвердил'.$sx.' проверку на чистоту до '.date('d.m.Y H:i',$uu['palpro']).'.'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); - $uer = 'Вы успешно поставили пометку о чистоте персонажа "'.$uu['login'].'".'; - }else{ - $uer = 'Не удалось использовать данное заклятие'; - } - } - }else{ - $uer = 'Персонаж не найден в этом городе'; - } -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file diff --git a/modules_data/moder/usepro2.php b/modules_data/moder/usepro2.php deleted file mode 100644 index fe885b8d..00000000 --- a/modules_data/moder/usepro2.php +++ /dev/null @@ -1,60 +0,0 @@ -1 && $uu['align']<2 && $u->info['admin']==0) - { - $uer = 'Вы не можете использовать данное заклятие на Паладинов.
'; - }elseif($uu['align']>3 && $uu['align']<4 && $u->info['admin']==0) - { - $uer = 'Вы не можете использовать данное заклятие на Тарманов.
'; - }elseif($uu['palpro']0 && $u->info['admin']==0) - { - $uer = 'Вы не можете накладывать заклятие на Ангелов'; - }elseif($uu['city']!=$u->info['city'] && $p['citym1']==0){ - $uer = 'Персонаж находится в другом городе'; - }elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){ - $uer = 'Вы не можете снимать проверку самому себе'; - }else{ - $uu['palpro'] = time()-1; - $upd = mysql_query('UPDATE `users` SET `palpro` = "'.$uu['palpro'].'" WHERE `id` = "'.$uu['id'].'" LIMIT 1'); - if($upd) - { - $sx = ''; - if($u->info['sex']==1) - { - $sx = 'а'; - } - $rtxt = '[img[items/pal_buttont.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' проверку на чистоту персонажу "'.$uu['login'].'"'; - //mysql_query("UPDATE `chat` SET `delete` = 1 WHERE `login` = '".$uu['login']."' LIMIT 1000"); - -$cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); -$cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); -$cmsg->setType(6); -$cmsg->setTypeTime(1); -(new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' проверку на чистоту'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); - $uer = 'Вы успешно сняли пометку о чистоте персонажа "'.$uu['login'].'".'; - }else{ - $uer = 'Не удалось использовать данное заклятие'; - } - } - }else{ - $uer = 'Персонаж не найден в этом городе'; - } -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file -- 2.45.2 From 9985d2f20c21b6d4d338a6a47af5cdb616ee2345 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 02:23:36 +0200 Subject: [PATCH 13/28] =?UTF-8?q?=D0=A3=D0=B1=D1=80=D0=B0=D0=BD=D1=8B=20my?= =?UTF-8?q?sql=5Fquery.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/moder/usedeletinfo.php | 2 +- modules_data/moder/usem1.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules_data/moder/usedeletinfo.php b/modules_data/moder/usedeletinfo.php index 8be98f15..a8de8266 100644 --- a/modules_data/moder/usedeletinfo.php +++ b/modules_data/moder/usedeletinfo.php @@ -8,7 +8,7 @@ if ($p['deletInfo'] != 1) { return; } -$uu = \Core\Db::getRow('select * from users where login = ? order by id limit 1', [$_POST['logingo']]); +$uu = \Core\Db::getRow('select id, login, info_delete from users where login = ? order by id limit 1', [$_POST['logingo']]); if (!isset($uu['id'])) { $uer = 'Персонаж не найден.'; diff --git a/modules_data/moder/usem1.php b/modules_data/moder/usem1.php index d2a119d0..4fc73dcc 100644 --- a/modules_data/moder/usem1.php +++ b/modules_data/moder/usem1.php @@ -8,7 +8,7 @@ if ($p['m1'] != 1 && $p['citym1'] != 1) { return; } -$uu = mysql_fetch_array(mysql_query('SELECT * FROM `users` WHERE `login` = "' . mysql_real_escape_string($_POST['logingo']) . '" LIMIT 1')); +$uu = \Core\Db::getRow('select id, login from users where login = ? order by id limit 1', [$_POST['logingo']]); if (!isset($uu['id'])) { $uer = 'Персонаж не найден в этом городе'; return; -- 2.45.2 From 009d3487b9d0aef83977dff577c93b64b8b3980f Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 02:31:27 +0200 Subject: [PATCH 14/28] =?UTF-8?q?=D0=A0=D0=B0=D0=B7=D0=B1=D0=BB=D0=BE?= =?UTF-8?q?=D0=BA=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/moder/useunban.php | 64 +++++++++++++-------------------- 1 file changed, 25 insertions(+), 39 deletions(-) diff --git a/modules_data/moder/useunban.php b/modules_data/moder/useunban.php index 07d33195..7940cf86 100644 --- a/modules_data/moder/useunban.php +++ b/modules_data/moder/useunban.php @@ -1,47 +1,33 @@ info['sex']==1) - { - $sx = 'а'; - } - if($uu['banned']>0) - { - mysql_query('UPDATE `users_delo` SET `hb` = "0" WHERE `uid` = "'.$uu['id'].'" AND `hb`!="0"'); - $rtxt = '[img[items/pal_button7.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' заклятие смерти с "'.$uu['login'].'"'; + +if ($p['unbanned'] != 1) { + $uer = 'У Вас нет прав на использование данного заклятия'; + return; +} + +$uu = \Core\Db::getRow('select id, login, banned, mail from users where login = ? order by id limit 1', [$_POST['logingo']]); + +if (!isset($uu['id'])) { + $uer = 'Персонаж не найден.'; + return; +} + +if (empty($uu['banned'])) { + $uer = 'Персонаж не заблокирован'; + return; +} + +(new \Moderation\Moderation($uu['id']))->unban(); +\Core\Db::sql('delete from ban_email where email = ?', [$uu['mail']]); + +$uer = "Персонаж {$uu['login']} разблокирован."; $cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); $cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); +$cmsg->setText("[img[items/pal_button7.gif]] $uer"); $cmsg->setType(6); $cmsg->setTypeTime(1); (new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие "смерти".'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); - $uer = 'Вы успешно сняли заклятие смерти с персонажа "'.$uu['login'].'".
'; - mysql_query("DELETE FROM `ban_email` WHERE `email`='".$uu['mail']."'"); - }else{ - $uer = 'Персонаж не заблокирован'; - } - }else{ - $uer = 'Не удалось использовать данное заклятие'; - } - }else{ - $uer = 'Персонаж не найден в этом городе'; - } -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file -- 2.45.2 From ded29490678cabc83c624b4722c47b1fe458edd9 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 02:37:58 +0200 Subject: [PATCH 15/28] =?UTF-8?q?=D0=92=D1=8B=D0=BF=D1=83=D1=81=D0=BA=20?= =?UTF-8?q?=D0=B8=D0=B7=20=D1=82=D1=8E=D1=80=D1=8C=D0=BC=D1=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/moder/v_carcer.php | 65 +++++++++------------------------ 1 file changed, 17 insertions(+), 48 deletions(-) diff --git a/modules_data/moder/v_carcer.php b/modules_data/moder/v_carcer.php index 30597d2a..f2ceb71e 100644 --- a/modules_data/moder/v_carcer.php +++ b/modules_data/moder/v_carcer.php @@ -1,58 +1,27 @@ 0 && $u->info['admin']==0) - { - $uer = 'Вы не можете посадить Ангела.'; - } - if($uu['city']!=$u->info['city'] && $p['citym1']==0){ - $uer = 'Персонаж находится в другом городе'; - }elseif(floor($uu['align'])==$a && $uu['align']>$u->info['align'] && $u->info['admin']==0) - { - $uer = 'Вы не можете посадить старших по званию'; - }elseif($uu['id']==$u->info['id'] && $u->info['admin']==0){ - $uer = 'Вы не можете посадить самого себя'; - }else{ - $upd = mysql_query('UPDATE `users` SET `jail` = "0", `room`="9", `city`="capitalcity" WHERE `id` = "'.$uu['id'].'" LIMIT 1'); - if($upd) - { - $sx = ''; - if($u->info['sex']==1) - { - $sx = 'а'; - } - mysql_query('UPDATE `items_users` SET `delete` = "0" WHERE `uid` = '.$uu['id'].' AND `delete` = "1357908642"'); - $rtxt = '[img[items/jail_off.gif]] '.$rang.' "'.$u->info['cast_login'].'" выпустил'.$sx.' из заточение "'.$uu['login'].'".'; +$uu = \Core\Db::getRow('select id, login from users where login = ? order by id limit 1', [$_POST['logingo']]); + +if (!isset($uu['id'])) { + $uer = 'Персонаж не найден в этом городе'; + return; +} + +(new \Moderation\Moderation($uu['id']))->unprison(); + +$uer = "Персонаж {$uu['login']} был выпущен из тюрьмы."; $cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); $cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); +$cmsg->setText("[img[items/jail_off.gif]] $uer"); $cmsg->setType(6); $cmsg->setTypeTime(1); (new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" выпустил'.$sx.' из "заточение" .'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',6)"); - $uer = 'Вы успешно выпустили из тюрьмы персонажа "'.$uu['login'].'" .'; - }else{ - $uer = 'Не удалось использовать данное заклятие'; - } - } - }else{ - $uer = 'Персонаж не найден в этом городе'; - } - -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file -- 2.45.2 From 7faf7132a55a73b47890d6d3f64ba8e3f9f6bead Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 03:00:05 +0200 Subject: [PATCH 16/28] =?UTF-8?q?=D0=92=D1=80=D0=B5=D0=BC=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D0=B0=D1=8F=20=D1=80=D0=B5=D0=B0=D0=BB=D0=B8=D0=B7=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D1=8F=20=D1=81=D0=BD=D1=8F=D1=82=D0=B8=D1=8F=20?= =?UTF-8?q?=D0=BC=D0=BE=D0=BB=D1=87=D0=B0=D0=BD=D0=BE=D0=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules_data/moder/usesm.php | 101 ++++++++++++----------------------- 1 file changed, 34 insertions(+), 67 deletions(-) diff --git a/modules_data/moder/usesm.php b/modules_data/moder/usesm.php index f9a871b9..9c349e21 100644 --- a/modules_data/moder/usesm.php +++ b/modules_data/moder/usesm.php @@ -1,75 +1,42 @@ info['sex']==1) - { - $sx = 'а'; - } - if($x!=2 && $uu['molch1']>=time()) - { - $rtxt = '[img[items/pal_button3.gif]] '.$rang.' "'.$u->info['cast_login'].'" снял'.$sx.' заклятие молчания с "'.$uu['login'].'"'; $cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); $cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); $cmsg->setType(6); $cmsg->setTypeTime(1); -(new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие "молчания".'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); - $uer = 'Вы успешно сняли заклятие молчания с персонажа "'.$uu['login'].'".
'; - } - if($x!=1 && $uu['molch2']>=time()) - { - $rtxt = '[img[items/fsleep_off.gif]] '.$rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие форумного молчания с "'.$uu['login'].'"'; -$cmsg = new ChatMessage(); -$cmsg->setCity($u->info['city']); -$cmsg->setRoom($u->info['room']); -$cmsg->setText($rtxt); -$cmsg->setType(6); -$cmsg->setTypeTime(1); -(new Chat())->sendMsg($cmsg); - $rtxt = $rang.' "'.$u->info['login'].'" снял'.$sx.' заклятие "форумного молчания".'; - mysql_query("INSERT INTO `users_delo` (`uid`,`ip`,`city`,`time`,`text`,`login`,`type`) VALUES ('".$uu['id']."','".$_SERVER['REMOTE_ADDR']."','".$u->info['city']."','".time()."','".$rtxt."','".$u->info['login']."',0)"); - $uer .= 'Вы успешно сняли заклятие форумного молчания с персонажа "'.$uu['login'].'".'; - } - }else{ - $uer = 'Не удалось использовать данное заклятие'; - } - }else{ - $uer = 'Персонаж не найден в этом городе'; - } - } -}else{ - $uer = 'У Вас нет прав на использование данного заклятия'; -} -?> \ No newline at end of file +if ($tm != 2 && $uu['molch1'] >= time()) { + (new \Moderation\Moderation($uu['id']))->unsilence(); + $uer = "С персонажа {$uu['login']} снят запрет на общение в чате."; + $cmsg->setText("[img[items/pal_button3.gif]] $uer"); + (new Chat())->sendMsg($cmsg); +} + +if ($tm != 1 && $uu['molch2'] >= time()) { + \Core\Db::sql('update users set molch2 = default where id = ?', [$uu['id']]); + $uer = "С персонажа {$uu['login']} снят запрет на общение на форуме."; + $cmsg->setText("[img[items/fsleep_off.gif]] $uer"); + (new Chat())->sendMsg($cmsg); +} -- 2.45.2 From 98f4cbcef3e93e1dbc4c18dc88c22c38e85491a4 Mon Sep 17 00:00:00 2001 From: Ivor Barhansky Date: Sat, 2 Dec 2023 03:06:29 +0200 Subject: [PATCH 17/28] =?UTF-8?q?=D0=91=D1=83=D0=B4=D1=83=D1=89=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BA=D0=B8=20?= =?UTF-8?q?=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=D0=BE=D0=B2=20=D0=BE?= =?UTF-8?q?=D1=82=D0=B4=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=BC=20=D1=84=D0=B0?= =?UTF-8?q?=D0=B9=D0=BB=D0=BE=D0=BC.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../class/Moderation/ItemTransferLog.php | 19 +++++++++++++++++++ _incl_data/class/Moderation/Moderation.php | 10 ---------- 2 files changed, 19 insertions(+), 10 deletions(-) create mode 100644 _incl_data/class/Moderation/ItemTransferLog.php diff --git a/_incl_data/class/Moderation/ItemTransferLog.php b/_incl_data/class/Moderation/ItemTransferLog.php new file mode 100644 index 00000000..67fc7d1f --- /dev/null +++ b/_incl_data/class/Moderation/ItemTransferLog.php @@ -0,0 +1,19 @@ + Date: Tue, 5 Dec 2023 03:01:04 +0200 Subject: [PATCH 18/28] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=BE?= =?UTF-8?q?=D1=81=20=D1=80=D0=B0=D0=B7=D1=80=D0=BE=D0=B7=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2=20?= =?UTF-8?q?=D0=B2=20=D1=84=D0=B0=D0=B1=D1=80=D0=B8=D0=BA=D1=83.=20=D0=A3?= =?UTF-8?q?=D1=82=D0=B8=D0=BB=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8F=20=D0=BD?= =?UTF-8?q?=D0=B5=D0=B8=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D1=83=D0=B5?= =?UTF-8?q?=D0=BC=D1=8B=D1=85=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D0=B9?= =?UTF-8?q?.=20#49?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _incl_data/Views/Locations/Shop.php | 2 +- _incl_data/class/Battle.php | 2 +- _incl_data/class/Core/Db.php | 30 +- _incl_data/class/Core/View.php | 2 +- _incl_data/class/Dungeon.php | 2 +- _incl_data/class/FightRequest.php | 10 +- _incl_data/class/Magic.php | 2 +- _incl_data/class/Magic/aniname.php | 13 +- _incl_data/class/Magic/noose.php | 8 +- _incl_data/class/Model/Constant/Stat.php | 3 - _incl_data/class/Moderation/Announcement.php | 49 + _incl_data/class/Moderation/ModFactory.php | 148 + _incl_data/class/Moderation/Moderation.php | 14 +- _incl_data/class/Moderation/Moderator.php | 48 + .../class/Moderation/UserRegistrationList.php | 36 + _incl_data/class/User.php | 61 +- _incl_data/class/User/InfoBox.php | 9 +- _incl_data/class/User/ItemsModel.php | 2 +- _incl_data/class/User/Stats.php | 525 +- _incl_data/class/User/WearedScrolls.php | 63 + _incl_data/class/dnaction/101/i9.php | 76 +- adminion/mult.php | 2 +- adminion/mults.php | 2 +- breakchaos.php | 4 +- ekr.php | 2 +- forum_script/index.php | 6 +- hmonitor.php | 10 +- inf.php | 8 +- inx/ckeditor/CHANGES.md | 3963 +++-- inx/ckeditor/LICENSE.md | 21 +- inx/ckeditor/plugins/scayt/dialogs/options.js | 2 +- inx/ckeditor/plugins/wsc/dialogs/wsc.js | 2 +- js/jquery.js | 13218 ++++++++-------- modules_data/_alhp.php | 8 +- modules_data/_animal.php | 12 +- modules_data/_clan.php | 15 +- modules_data/_clan_new.php | 19 +- modules_data/_friends.php | 8 +- modules_data/_inv_moder.php | 343 - modules_data/_light.php | 195 - modules_data/_mod.php | 3356 ++-- modules_data/_mod2.php | 245 +- modules_data/_obraz.php | 2 +- modules_data/_ref.php | 11 +- modules_data/_transfers.php | 579 +- modules_data/_umenie.php | 2 +- modules_data/alignPanel.php | 2 +- modules_data/location/a_fontan.php | 348 +- modules_data/location/hram.php | 4 +- modules_data/location/izlom2.php | 2 +- modules_data/location/remont.php | 6 +- modules_data/location/room_hostel.php | 2 +- modules_data/moder/100kexp.php | 27 - modules_data/moder/new/editalign.php | 224 - modules_data/moder/new/editor.php | 285 - modules_data/moder/unusedeletinfo.php | 32 - modules_data/moder/use_carcer.php | 31 - modules_data/moder/usealign1.php | 51 - modules_data/moder/usealign3.php | 51 - modules_data/moder/usealign7.php | 51 - modules_data/moder/useban.php | 40 - modules_data/moder/usedeletinfo.php | 35 - modules_data/moder/usehpa.php | 45 - modules_data/moder/usem1.php | 29 - modules_data/moder/usemarry.php | 139 +- modules_data/moder/usempa.php | 45 - modules_data/moder/usenoper.php | 58 - modules_data/moder/usenoper2.php | 58 - modules_data/moder/usesm.php | 42 - modules_data/moder/useunalign.php | 57 - modules_data/moder/useunban.php | 33 - modules_data/moder/useunmarry.php | 139 +- modules_data/moder/useunnoper.php | 58 - modules_data/moder/useunnoper2.php | 58 - modules_data/moder/v_carcer.php | 27 - modules_data/usemarry.php | 7 +- repass.php | 2 +- settings.php | 4 +- sms.php | 2 +- 79 files changed, 12178 insertions(+), 12956 deletions(-) create mode 100644 _incl_data/class/Moderation/Announcement.php create mode 100644 _incl_data/class/Moderation/ModFactory.php create mode 100644 _incl_data/class/Moderation/Moderator.php create mode 100644 _incl_data/class/Moderation/UserRegistrationList.php create mode 100644 _incl_data/class/User/WearedScrolls.php delete mode 100644 modules_data/_inv_moder.php delete mode 100644 modules_data/_light.php delete mode 100644 modules_data/moder/100kexp.php delete mode 100644 modules_data/moder/new/editalign.php delete mode 100644 modules_data/moder/new/editor.php delete mode 100644 modules_data/moder/unusedeletinfo.php delete mode 100644 modules_data/moder/use_carcer.php delete mode 100644 modules_data/moder/usealign1.php delete mode 100644 modules_data/moder/usealign3.php delete mode 100644 modules_data/moder/usealign7.php delete mode 100644 modules_data/moder/useban.php delete mode 100644 modules_data/moder/usedeletinfo.php delete mode 100644 modules_data/moder/usehpa.php delete mode 100644 modules_data/moder/usem1.php delete mode 100644 modules_data/moder/usempa.php delete mode 100644 modules_data/moder/usenoper.php delete mode 100644 modules_data/moder/usenoper2.php delete mode 100644 modules_data/moder/usesm.php delete mode 100644 modules_data/moder/useunalign.php delete mode 100644 modules_data/moder/useunban.php delete mode 100644 modules_data/moder/useunnoper.php delete mode 100644 modules_data/moder/useunnoper2.php delete mode 100644 modules_data/moder/v_carcer.php diff --git a/_incl_data/Views/Locations/Shop.php b/_incl_data/Views/Locations/Shop.php index 2c62c7af..e47683a2 100644 --- a/_incl_data/Views/Locations/Shop.php +++ b/_incl_data/Views/Locations/Shop.php @@ -132,7 +132,7 @@ use Enum\ShopId;
- + value): ?> diff --git a/_incl_data/class/Battle.php b/_incl_data/class/Battle.php index e97faaa0..e7191db3 100644 --- a/_incl_data/class/Battle.php +++ b/_incl_data/class/Battle.php @@ -8844,7 +8844,7 @@ class Battle mysql_query( 'UPDATE `stats` SET `last_hp` = "0",`tactic1`="0",`tactic2`="0",`tactic3`="0",`tactic4`="0",`tactic5`="0",`tactic6`="0",`tactic7` = "' . ($this->users[$i]['tactic7']) . '" WHERE `id` = "' . $this->users[$i]['id'] . '" LIMIT 1' ); - $rs[$this->users[$i]['team']] = $rs[$this->users[$i]['team']] . $u->getLogin($this->users[$i]['id']) . ', '; + $rs[$this->users[$i]['team']] = $rs[$this->users[$i]['team']] . User::getLogin($this->users[$i]['id']) . ', '; } $up .= '`uid` = "' . $pl['id'] . '" OR'; //battle-user (статистика, начальная) diff --git a/_incl_data/class/Core/Db.php b/_incl_data/class/Core/Db.php index 222e1b93..813a20bc 100644 --- a/_incl_data/class/Core/Db.php +++ b/_incl_data/class/Core/Db.php @@ -27,9 +27,9 @@ class Db /** * @param string $query - * @return int + * @return false|int */ - public static function exec(string $query): int + public static function exec(string $query): false|int { self::init(); return self::$db->exec($query); @@ -42,9 +42,9 @@ class Db /** * @param ?string $name [optional] Name of the sequence object from which the ID should be returned. - * @return string + * @return false|string */ - public static function lastInsertId(?string $name = null): string + public static function lastInsertId(?string $name = null): false|string { self::init(); return self::$db->lastInsertId($name); @@ -53,9 +53,9 @@ class Db /** * @param string $query * @param array $args - * @return array + * @return false|array */ - public static function getRows(string $query, array $args = []): array + public static function getRows(string $query, array $args = []): false|array { return self::run($query, $args)->fetchAll(); } @@ -63,9 +63,9 @@ class Db /** * @param string $query * @param array $args - * @return PDOStatement + * @return false|PDOStatement */ - public static function run(string $query, array $args = []): PDOStatement + public static function run(string $query, array $args = []): false|PDOStatement { try { if (!$args) { @@ -81,9 +81,9 @@ class Db /** * @param string $stmt - * @return PDOStatement + * @return false|PDOStatement */ - private static function query(string $stmt): PDOStatement + private static function query(string $stmt): false|PDOStatement { self::init(); return self::$db->query($stmt); @@ -91,9 +91,9 @@ class Db /** * @param string $stmt - * @return PDOStatement + * @return false|PDOStatement */ - public static function prepare(string $stmt): PDOStatement + public static function prepare(string $stmt): false|PDOStatement { self::init(); return self::$db->prepare($stmt); @@ -104,7 +104,7 @@ class Db * @param array $args * @return mixed */ - public static function getValue(string $query, array $args = []) + public static function getValue(string $query, array $args = []): mixed { $result = self::getRow($query, $args); if (!empty($result)) { @@ -118,7 +118,7 @@ class Db * @param array $args * @return mixed */ - public static function getRow(string $query, array $args = []) + public static function getRow(string $query, array $args = []): mixed { return self::run($query, $args)->fetch(); } @@ -137,7 +137,7 @@ class Db * @param string $query * @param array $args */ - public static function sql(string $query, array $args = []) + public static function sql(string $query, array $args = []): void { self::run($query, $args); } diff --git a/_incl_data/class/Core/View.php b/_incl_data/class/Core/View.php index e7828c4a..7af22f10 100644 --- a/_incl_data/class/Core/View.php +++ b/_incl_data/class/Core/View.php @@ -4,7 +4,7 @@ namespace Core; class View { - public static function render(string $view, array $arguments = []) + public static function render(string $view, array $arguments = []): void { extract($arguments, EXTR_SKIP); $file = $_SERVER['DOCUMENT_ROOT'] . "/_incl_data/Views/$view"; diff --git a/_incl_data/class/Dungeon.php b/_incl_data/class/Dungeon.php index 8c3c8204..4601ca67 100644 --- a/_incl_data/class/Dungeon.php +++ b/_incl_data/class/Dungeon.php @@ -1756,7 +1756,7 @@ class Dungeon } $ph = $stt['hpNow'] / $stt['hpAll'] * 100; $r .= ' - +
  ' . User::start()->getLogin($pl['id']) . '  
  ' . User::getLogin($pl['id']) . '   $team) { foreach ($team as $key => $player) { - $players .= $this->u->getLogin($player['id']); + $players .= User::getLogin($player['id']); if ($key !== array_key_last($team)) { $players .= ', '; } else { @@ -1038,7 +1038,7 @@ class FightRequest $uids = Db::getColumn('select id from stats where zv = ?', [$pl['id']]); $cols = count($uids); foreach ($uids as $uid) { - $tm .= $this->u->getLogin($uid) . ', '; + $tm .= User::getLogin($uid) . ', '; } $tm = rtrim($tm, ', '); @@ -1049,7 +1049,7 @@ class FightRequest $unvs = ''; if ($pl['invise'] == 1) { $userslist = $this->u->isModerator() ? $tm : ''; - $tm = '' . $this->u->getLogin($pl['creator']) . '' . + $tm = '' . User::getLogin($pl['creator']) . '' . $userslist . ' - невидимый'; $unvs = ' Участников: ' . $cols . ' чел. '; $n1tv .= ' '; @@ -1143,9 +1143,9 @@ class FightRequest $tmc = []; $users = Db::getRows('select team, id from stats where zv = ?', [$pl['id']]); foreach ($users as $user) { - ${'tm' . $user['team']} .= $this->u->getLogin($user['id']) . ', '; + ${'tm' . $user['team']} .= User::getLogin($user['id']) . ', '; $tmc[$user['team']]++; - $teams[$user['team']][] = $this->u->getLogin($user['id']); + $teams[$user['team']][] = User::getLogin($user['id']); } foreach ($teams as $id => $members) { diff --git a/_incl_data/class/Magic.php b/_incl_data/class/Magic.php index 51c57914..b4c6955a 100644 --- a/_incl_data/class/Magic.php +++ b/_incl_data/class/Magic.php @@ -1321,7 +1321,7 @@ class Magic } elseif ($u->info['dnow'] != $usr['dnow']) { $u->error = 'Персонаж находится в другой комнате [пещера]'; } elseif ($usr['room'] == 217 || $usr['room'] == 218 || $usr['room'] == 219) { - $u->error = 'Персонаж ' . $u->getLogin($usr['id']) . ' находится в Общежитии!'; + $u->error = 'Персонаж ' . User::getLogin($usr['id']) . ' находится в Общежитии!'; } elseif ($usr['inTurnir'] != 0 && ($u->info['inTurnir'] != $usr['inTurnir'])) { $u->error = 'Участвует в турнире Башни смерти...'; } elseif ($usr['id'] == $u->info['id'] && isset($st['useOnlyUser'])) { diff --git a/_incl_data/class/Magic/aniname.php b/_incl_data/class/Magic/aniname.php index 830f02d6..7e85d232 100644 --- a/_incl_data/class/Magic/aniname.php +++ b/_incl_data/class/Magic/aniname.php @@ -1,12 +1,11 @@ error = 'Теперь вы можете переименовать своего зверя'; - mysql_query('UPDATE `users_animal` SET `rename` = 0 WHERE `uid` = '.$u->info['id'].' AND `delete` = 0 AND `pet_in_cage` = 0 LIMIT 1'); - mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = '.$itm['id'].' LIMIT 1'); +if ($itm['magic_inci'] == 'aniname') { + $u->error = 'Теперь вы можете переименовать своего зверя'; + mysql_query('UPDATE `users_animal` SET `renameArrayKeys` = 0 WHERE `uid` = ' . $u->info['id'] . ' AND `delete` = 0 AND `pet_in_cage` = 0 LIMIT 1'); + mysql_query('UPDATE `items_users` SET `iznosNOW` = `iznosNOW` + 1 WHERE `id` = ' . $itm['id'] . ' LIMIT 1'); } ?> \ No newline at end of file diff --git a/_incl_data/class/Magic/noose.php b/_incl_data/class/Magic/noose.php index a143fd13..331c30b3 100644 --- a/_incl_data/class/Magic/noose.php +++ b/_incl_data/class/Magic/noose.php @@ -5,17 +5,17 @@ if (!defined('GAME')) { if ($u->info['login'] == $usr['login']) { $u->error = 'Нельзя использовать на себя!'; } elseif ($usr['room'] == 217 || $usr['room'] == 218 || $usr['room'] == 219) { - $u->error = 'Персонаж ' . $u->getLogin($usr['id']) . ' находится в Общежитии!'; + $u->error = 'Персонаж ' . User::getLogin($usr['id']) . ' находится в Общежитии!'; } elseif ($usr['dnow'] > 0) { - $u->error = 'Персонаж ' . $u->getLogin($usr['id']) . ' находится в Подземелье'; + $u->error = 'Персонаж ' . User::getLogin($usr['id']) . ' находится в Подземелье'; } elseif ($usr['real'] == 1) { $u->error = 'Перемещать можно только реальных игроков!'; } elseif ($usr['bot'] > 0) { $u->error = 'Вы не можете поймать бота ;)'; } elseif ($usr['battle'] > 0) { - $u->error = 'Персонаж ' . $u->getLogin($usr['id']) . ' находится в поединке'; + $u->error = 'Персонаж ' . User::getLogin($usr['id']) . ' находится в поединке'; } elseif ($usr['room'] == 274) { - $u->error = 'Персонаж ' . $u->getLogin($usr['id']) . ' находится в Заточении!'; + $u->error = 'Персонаж ' . User::getLogin($usr['id']) . ' находится в Заточении!'; } elseif ($usr['online'] < time() - 520) { $u->error = 'Персонаж не в сети'; } else { diff --git a/_incl_data/class/Model/Constant/Stat.php b/_incl_data/class/Model/Constant/Stat.php index 59aca32f..232717af 100644 --- a/_incl_data/class/Model/Constant/Stat.php +++ b/_incl_data/class/Model/Constant/Stat.php @@ -25,9 +25,6 @@ class Stat extends Constant if (!$row[$cellName->value]) { continue; } - if ($row['sys_name'] === 'level') { - $row['sys_name'] = 'lvl'; - } $result[$row['sys_name']] = $row['name']; } return $result; diff --git a/_incl_data/class/Moderation/Announcement.php b/_incl_data/class/Moderation/Announcement.php new file mode 100644 index 00000000..33c2882a --- /dev/null +++ b/_incl_data/class/Moderation/Announcement.php @@ -0,0 +1,49 @@ + +

+
+ + +
+ + + + +HTML; + } + + public static function send(): void + { + if (empty($_POST['announcementModeration'] || empty($_POST['announcementText']))) { + return; + } + + $strippedMessage = strip_tags($_POST['announcementText']); + + if (empty($strippedMessage)) { + return; + } + + $sender = empty($_POST['announcementIsSigned']) ? '' : User::getLogin(User::start()->info['id']); + + (new Chat())->sendsys("$sender: $strippedMessage"); + echo ' '; + } +} \ No newline at end of file diff --git a/_incl_data/class/Moderation/ModFactory.php b/_incl_data/class/Moderation/ModFactory.php new file mode 100644 index 00000000..d71a7cd5 --- /dev/null +++ b/_incl_data/class/Moderation/ModFactory.php @@ -0,0 +1,148 @@ +targetUser = User::getInfo($this->targetLogin); + if (empty($this->targetUser)) { + $this->status = ' !'; + return; + } + $this->chat = new Chat(); + $this->msg = new ChatMessage(); + $this->msg->setType(6); + $this->msg->setTypeTime(1); + $this->msg->setRoom($moderatorsRoom); + $this->time = new DateTime(); + $this->moderation = new Moderation($this->targetUser['id']); + + } + + public function silence(int $minutes): void + { + if ($minutes < 1) { + $this->status = self::ERROR_WRONG_DURATION; + return; + } + $this->time->modify("+ $minutes minute"); + $this->moderation->silence($this->time, $this->reason); + $this->status = " $this->targetLogin {$this->time->format(Moderation::EXPIRATION_DATETIME_FORMAT)}."; + $this->msg->setText("[img[items/silence.gif]] $this->status"); + $this->chat->sendMsg($this->msg); + } + + public function unsilence(): void + { + if ($this->targetUser['molch1'] < $this->time->getTimestamp()) { + $this->status = ' !'; + return; + } + $this->moderation->unsilence(); + $this->status = " $this->targetLogin ."; + $this->msg->setText("[img[items/pal_button3.gif]] $this->status"); + $this->chat->sendMsg($this->msg); + } + + public function prison(int $days): void + { + if ($days < 1) { + $this->status = self::ERROR_WRONG_DURATION; + return; + } + $this->time->modify("+ $days day"); + $this->moderation->prison($this->time, $this->reason); + Db::sql('delete from dungeon_zv where uid = ?', [$this->targetUser['id']]); // . + $this->status = " $this->targetLogin {$this->time->format(Moderation::EXPIRATION_DATETIME_FORMAT)}."; + $this->msg->setText("[img[items/jail.gif]] $this->status"); + $this->chat->sendMsg($this->msg); + } + + public function unprison(): void + { + $this->moderation->unprison(); + $this->status = " $this->targetLogin ."; + $this->msg->setText("[img[items/jail_off.gif]] $this->status"); + $this->chat->sendMsg($this->msg); + } + + public function depersonalize(int $days): void + { + if ($days < 1) { + $this->status = self::ERROR_WRONG_DURATION; + return; + } + if ($this->targetUser['info_delete'] === 1 || $this->targetUser['info_delete'] >= $this->time->getTimestamp()) { + $this->status = ' .'; + return; + } + $this->time->modify("+ $days day"); + $this->moderation->depersonalize($this->time, $this->reason); + $this->status = " $this->targetLogin {$this->time->format(Moderation::EXPIRATION_DATETIME_FORMAT)}"; + $this->msg->setText("[img[items/cui.gif]] $this->status"); + $this->chat->sendMsg($this->msg); + } + + public function undepersonalize(): void + { + if ($this->targetUser['info_delete'] <= $this->time->getTimestamp()) { + $this->status = ' .'; + return; + } + $this->moderation->undepersonalize(); + $this->status = " $this->targetLogin "; + $this->msg->setText("[img[items/uncui.gif]] $this->status"); + $this->chat->sendMsg($this->msg); + } + + public function ban(): void + { + $this->moderation->ban($this->reason); + Db::sql('delete from chat where login = ?', [$this->targetLogin]); + Db::sql('insert into ban_email (email, uid, nick_name) values (?,?,?)', [$this->targetUser['mail'], $this->targetUser['id'], $this->targetLogin]); + Db::sql('delete from zayvki where creator = ?', [$this->targetUser['id']]); // . + Db::sql('delete from dungeon_zv where uid = ?', [$this->targetUser['id']]); // . + if (!empty($this->targetUser['battle'])) { + Db::sql( + 'update users left join stats on users.id = stats.id set battle = default, regHP = unix_timestamp(), team = 0, battle_yron = 0, battle_exp = 0 where users.id = ?', + [$this->targetUser['id']] + ); + } + $this->status = " $this->targetLogin "; + $this->msg->setText("[img[items/pal_button6.gif]] $this->status"); + $this->chat->sendMsg($this->msg); + } + + public function unban(): void + { + if (empty($this->targetUser['banned'])) { + $this->status = ' .'; + return; + } + $this->moderation->unban(); + Db::sql('delete from ban_email where email = ?', [$this->targetUser['mail']]); + $this->status = " $this->targetLogin "; + $this->msg->setText("[img[items/pal_button7.gif]] $this->status"); + $this->chat->sendMsg($this->msg); + } +} diff --git a/_incl_data/class/Moderation/Moderation.php b/_incl_data/class/Moderation/Moderation.php index d1766038..fa623bba 100644 --- a/_incl_data/class/Moderation/Moderation.php +++ b/_incl_data/class/Moderation/Moderation.php @@ -15,7 +15,7 @@ class Moderation private const CENTRAL_SQUARE_ROOM = 9; private const JAIL_STORAGE = 1357908642; /* Ух, костыль! */ private const NOT_SET = 'Не указано.'; - private const EXPIRATION_DATETIME_FORMAT = 'd M Y H:i'; + public const EXPIRATION_DATETIME_FORMAT = 'd M Y H:i'; private int $target; public function __construct(int $userid) @@ -26,7 +26,7 @@ class Moderation /** * Молчание * @param DateTime $expiration срок истечения. - * @param string $reason причина применения. + * @param string $reason причина применения. */ public function silence(DateTime $expiration, string $reason = self::NOT_SET): void { @@ -59,7 +59,7 @@ class Moderation /** * Обезличивание * @param DateTime $expiration срок истечения. - * @param string $reason причина применения. + * @param string $reason причина применения. */ public function depersonalize(DateTime $expiration, string $reason = self::NOT_SET): void { @@ -77,7 +77,7 @@ class Moderation */ public function undepersonalize(): void { - if (Db::getValue('select count(info_delete) from users where id = ? and info_delete != 0', [$this->target]) === 0) { + if (Db::getValue('select count(info_delete) from users where id = ? and info_delete <= unix_timestamp()', [$this->target]) === 0) { return; } Db::sql('update users set info_delete = default where id = ?', [$this->target]); @@ -92,13 +92,13 @@ class Moderation /** * Тюрьма * @param DateTime $expiration срок истечения. - * @param string $reason причина применения. + * @param string $reason причина применения. * @todo Корректно выбрасывать игрока из подземелья. */ public function prison(DateTime $expiration, string $reason = self::NOT_SET): void { Db::sql('update users set jail = ?, room = ? where id = ?', [$expiration->getTimestamp(), self::JAIL_ROOM, $this->target,]); - Db::sql('update items_users set `delete` = ? where `delete` = 0 and uid = ?', [self::JAIL_STORAGE, $this->target,]); + Db::sql('update items_users set is_arrested = 1 where uid = ?', [$this->target,]); Delo::add( 10, 'moderation.prison', @@ -113,7 +113,7 @@ class Moderation public function unprison(): void { Db::sql('update users set jail = default, room = ? where id = ?', [self::CENTRAL_SQUARE_ROOM, $this->target,]); - Db::sql('update items_users set `delete` = default where `delete` = ? and uid = ?', [self::JAIL_STORAGE, $this->target,]); + Db::sql('update items_users set is_arrested = default where uid = ?', [$this->target,]); Delo::add( 10, 'moderation.unprison', diff --git a/_incl_data/class/Moderation/Moderator.php b/_incl_data/class/Moderation/Moderator.php new file mode 100644 index 00000000..57ff1127 --- /dev/null +++ b/_incl_data/class/Moderation/Moderator.php @@ -0,0 +1,48 @@ + $isModerator, + 'can_block_users' => $canBlockUsers, + 'is_admin' => $isAdmin, + ] = Db::getRow('select uid, can_block_users, is_admin from moderators where uid = ?', [$uid]); + + $this->isModerator = !empty($isModerator); + $this->canBlockUsers = !empty($isModerator) && !empty($canBlockUsers); + $this->isAdmin = !empty($isModerator) && !empty($isAdmin); + } + + public static function add(int $uid): void + { + $user = new Moderator($uid); + if ($user->isModerator) { + return; + } + Db::sql('insert into moderators (uid) value (?)', [$uid]); + } + + public static function modify(int $uid, bool $allowBlock, bool $adminRights): void + { + $user = new Moderator($uid); + if (!$user->isModerator) { + return; + } + Db::sql('update moderators set can_block_users = ?, is_admin = ? where uid = ?', [(int)$allowBlock, (int)$adminRights, $uid]); + } + + public static function delete(int $uid): void + { + Db::sql('delete from moderators where uid = ?', [$uid]); + } +} \ No newline at end of file diff --git a/_incl_data/class/Moderation/UserRegistrationList.php b/_incl_data/class/Moderation/UserRegistrationList.php new file mode 100644 index 00000000..06db0bff --- /dev/null +++ b/_incl_data/class/Moderation/UserRegistrationList.php @@ -0,0 +1,36 @@ +getTimestamp(); + $to = $date->modify('+ 1 day')->getTimestamp(); + $list = Db::getRows("select id, banned, molch1, battle, host_reg, online from users where timereg between ? and ? and bot_id = 0 and bithday != '01.01.1800' order by id", [$from, $to]); + + $str = ''; + + foreach ($list as $user) { + $time = new DateTime(); + $loginColor = 'black'; + if ($user['banned']) { + $loginColor = 'red'; + } + if ($user['online'] > $time->modify('- 10 minutes')->getTimestamp()) { + $loginColor = 'green'; + } + if ($user['molch1'] > 0) { + $molch1Duration = new DateTimeImmutable($user['molch1']); + + } + $str .= "
  • " . User::getLogin($user['id'] . ""); + } + } +} \ No newline at end of file diff --git a/_incl_data/class/User.php b/_incl_data/class/User.php index 0dc4f61e..bc0385cf 100644 --- a/_incl_data/class/User.php +++ b/_incl_data/class/User.php @@ -1378,6 +1378,36 @@ class User Db::sql('update users set online = unix_timestamp() where id = ?', [$uid]); } + /** Возврат имени персонажа со всеми регалиями + * @param int $uid id персонажа. + * @return string + */ + public static function getLogin(int $uid): string + { + [ + 'align' => $align, + 'login' => $login, + 'level' => $level, + 'name_mini' => $clanName, + ] = Db::getRow( + 'select + users.align, + login, + users.level, + c.name_mini + from users left join clan as c on c.id = users.clan + where users.id = ?', + [$uid] + ); + $imgBase = Config::img() . DIRECTORY_SEPARATOR . 'i'; + + $alignStr = empty($align) ? '' : ""; + $clanStr = empty($clanName) ? '' : "$clanName"; + $spacedLogin = str_replace(' ', '%20', $login); + $loginLink = "Инф. о $login"; + return "$alignStr$clanStr$login [$level]$loginLink"; + } + public function dayquest(int $id): string { $test = Db::getRow('select id, vals from actions where uid = ? and vars = ?', [$id, 'day_quest']); @@ -1859,6 +1889,8 @@ class User return $tp; } + //Удаление определенного типа предметов + public function rep_zv(int $id, int $e): string { $r = '0 / 0'; @@ -1925,8 +1957,6 @@ class User return $r; } - //Удаление определенного типа предметов - public function getNum($v) { $plid = $v; @@ -1941,33 +1971,6 @@ class User return $plid; } - /** Возврат имени персонажа со всеми регалиями - * @param int|null $uid id персонажа. Если пусто, возвращается имя персонажа активного игрока. - * @return string - */ - public function getLogin(?int $uid = null):string { - if (is_null($uid)) { - $uid = $this->info['id']; - } - [$align, $login, $level, $clanName] = Db::getRow( - 'select - users.align, - login, - users.level, - c.name_mini - from users left join clan as c on c.id = users.clan - where users.id = ?', - [$uid] - ); - $imgBase = Config::img() . DIRECTORY_SEPARATOR . 'i'; - - $alignStr = empty($align) ? '' : ""; - $clanStr = empty($clanName) ? '' : "$clanName"; - $spacedLogin = str_replace(' ', '%20', $login); - $loginLink = "Инф. о $login"; - return "$alignStr$clanStr$login [$level]$loginLink"; - } - public function addNewbot($id, $botDate, $clon, $logins_bot = null, $luser = null, $round = null) { if ($clon != null) { diff --git a/_incl_data/class/User/InfoBox.php b/_incl_data/class/User/InfoBox.php index 04788bc3..5fb9d90d 100644 --- a/_incl_data/class/User/InfoBox.php +++ b/_incl_data/class/User/InfoBox.php @@ -427,7 +427,12 @@ class InfoBox $hptop = 0; $lh = [0 => 'hp_none', 1 => 1]; - $lh[1] = floor((0 + $sn['hpNow']) / (0 + $sn['hpAll']) * 120); + + if ($sn['hpNow'] == 0 || $sn['hpAll'] == 0) { + $lh[1] = 0; + } else { + $lh[1] = floor((0 + $sn['hpNow']) / (0 + $sn['hpAll']) * 120); + } if ($lh[1] > 0) { $lh[0] = 'hp_1'; } @@ -544,7 +549,7 @@ class InfoBox if ($pb != '') { $pb = '
    ' . $pb . '
    '; } - $rt[0] .= '
    ' . $this->user->getLogin($u['id']) . '
    ' . $pb . ' + $rt[0] .= '
    ' . User::getLogin($u['id']) . '
    ' . $pb . '
    diff --git a/_incl_data/class/User/ItemsModel.php b/_incl_data/class/User/ItemsModel.php index f98a9a06..9950922f 100644 --- a/_incl_data/class/User/ItemsModel.php +++ b/_incl_data/class/User/ItemsModel.php @@ -86,7 +86,7 @@ class ItemsModel public static function getOwnedItemById(int $itemId, int $ownerId): array { return Db::getRow('select * from items_users left join items_main on item_id = items_main.id - where uid = ? and items_users.id = ? and `delete` = 0 and inOdet = 0 and inShop = 0', [$ownerId, $itemId]); + where uid = ? and items_users.id = ? and `delete` = 0 and inOdet = 0 and inShop = 0 and is_arrested = 0', [$ownerId, $itemId]); } public static function delete(int $id): void diff --git a/_incl_data/class/User/Stats.php b/_incl_data/class/User/Stats.php index e0a588e3..ad85d654 100644 --- a/_incl_data/class/User/Stats.php +++ b/_incl_data/class/User/Stats.php @@ -6,6 +6,7 @@ use Core\Config; use Core\Db; use Helper\Comparsion; use Helper\Conversion; +use Model\Constant\Stat; use User; class Stats @@ -17,13 +18,13 @@ class Stats */ private array $sysNames; + private array $statsKeys = []; + public function __construct(User $user) { $this->u = $user; - $this->sysNames = Db::getColumn('select sys_name from const_stats where is_bonus = true'); - $this->sysNames['hpAll'] = $this->sysNames['hpall']; - $this->sysNames['mpAll'] = $this->sysNames['mpall']; - unset($this->sysNames['hpall'], $this->sysNames['mpall']); + $this->sysNames = (new Stat())->getBonusNames(); + } /** @@ -112,7 +113,7 @@ class Stats return (object)[ 'uid' => $u->info['id'], - 'login' => $u->getLogin(), + 'login' => User::getLogin($u->info['id']), 'hpbarwidth' => $ph, 'mpbarwidth' => $pm, 'hpbartext' => ' ' . $hpNow . '/' . $hpAll, @@ -146,8 +147,8 @@ class Stats $u['clanpos'] = 0; if ($u['clan'] > 0) { $r1 = Db::getValue('select pos from aaa_clan_reting_list where clan = ? and date = ? limit 1', [$u['clan'], date('dmY')]); - if (!empty($r1)) { - $st['clanpos'] = $r1; + if ($r1) { + $this->addKeyIfNotExist('clanpos', $r1, $st); } } $lvl = Db::getRow('select * from levels where upLevel = ?', [$u['upLevel']]); @@ -160,27 +161,21 @@ class Stats $st['id'] = $u['id']; $st['login'] = $u['login']; - $st['lvl'] = $u['level']; + $st['level'] = $u['level']; $st['hpNow'] = $u['hpNow']; - $st['hpAll'] = 0; + $st['mpNow'] = $u['mpNow']; - $st['mpAll'] = 0; + $st['zona'] = 1; $st['zonb'] = 2; $st['items'] = []; $st['effects'] = []; - $st['reting'] = 0; + $st['vip'] = $u['vip']; - $stats = Conversion::dataStringToArray($u['stats']); - foreach ($stats as $stat => $value) { - if (isset($st[$stat]) && is_numeric($value)) { - $st[$stat] += $value; - } else { - $st[$stat] = $value; - } + foreach (Conversion::dataStringToArray($u['stats']) as $stat => $value) { + $this->addKeyIfNotExist($stat, (int)$value, $st); } - unset($stats); $baseStats = $st; @@ -245,10 +240,10 @@ class Stats $nbs[$sts['itempl']] += 1; } if (isset($sts['puti'])) { - $st['puti'] = $sts['puti']; + $this->addKeyIfNotExist('puti', $sts['puti'], $st); } if (isset($sts['add_silver'])) { - $st['slvtm'] = $e['timeUse'] + $e['actionTime']; + $this->addKeyIfNotExist('slvtm', $e['timeUse'] + $e['actionTime'], $st); } $this->addValuesToAllArrays($sts, $st, $sti, $s_v, $s_vi); @@ -276,8 +271,8 @@ class Stats $this->addInBattlePriemsBonuses($u, $st, $prsu, $sti, $s_v, $s_vi); //Характеристики от статов - $st['hpAll'] += $st['s4'] * 5; - $st['mpAll'] += $st['s6'] * 10; + $st['hpall'] += $st['s4'] * 5; + $st['mpall'] += $st['s6'] * 10; //Турнир $st['m1'] += $st['s3'] * 5; @@ -291,7 +286,6 @@ class Stats // мф.анти-уворот = 2.5 $st['m5'] += $st['s2'] * 5; $st['za'] += $st['s4'] * 1.0; - $st['zm'] += $st['s4'] * 0.0; $st['m19'] += round($st['s3'] * 0.03); @@ -322,49 +316,8 @@ class Stats } } - //Замена свитков - if ($u['autospell'] != 0 && $u['battle'] == 0) { - //проверяем свитки - $sparr = []; - foreach (Db::getRows('select item_id, inOdet from items_users where inOdet between 40 and 50 and uid = ? order by item_id desc', [$u['id']]) as $scroll) { - $sparr[] = "{$scroll['item_id']} - {$scroll['inOdet']}"; - } - $splink = implode(',', $sparr); - - //Запоминаем новый комплект свитков - if ($u['autospell'] == 1) { - $u['autospell'] = $splink; - Db::sql('update users set autospell = ? where id = ?', [$splink, $u['id']]); - } - - //Выдаем нужный свиток, если он есть в инвентаре - if ($u['autospell'] != $splink) { - $spe1 = explode(',', $splink); - $spe2 = explode(',', $u['autospell']); - $spe1g = []; - $spe2g = []; - - for ($i = 0; $i <= 20; $i++) { - $spe1a = explode('-', $spe1[$i]); - $spe2a = explode('-', $spe2[$i]); - - if (isset($spe1a[0])) { - $spe1g[$spe1a[1]] = $spe1a[0]; - } - if (isset($spe2a[0])) { - $spe2g[$spe2a[1]] = $spe2a[0]; - } - } - - for ($i = 40; $i <= 50; $i++) { - if ($spe1g[$i] == $spe2g[$i] || $spe1g[$i] != 0) { - continue; - } - Db::sql('update items_users set inOdet = ? where inOdet = 0 and `delete` = 0 and inTransfer = 0 and inShop = 0 and inGroup = 0 and item_id = ? and uid = ?', - [$i, $spe2g[$i], $u['id']]); - } - } - } + //Что за нахер? + WearedScrolls::ScrollsChange($u); //Бонусы статов $this->addStatBonuses($st); @@ -384,8 +337,6 @@ class Stats $st['pm2'] += $st['s5'] * 0.5; $st['pm3'] += $st['s5'] * 0.5; $st['pm4'] += $st['s5'] * 0.5; - $st['pm5'] += $st['s5'] * 0.5; - $st['pm6'] += $st['s5'] * 0.5; $st['pm7'] += $st['s5'] * 0.5; } @@ -394,8 +345,6 @@ class Stats $st['pm2'] += $st['m11a'] * 0.5; $st['pm3'] += $st['m11a'] * 0.5; $st['pm4'] += $st['m11a'] * 0.5; - $st['pm5'] += $st['m11a'] * 0.5; - $st['pm6'] += $st['m11a'] * 0.5; $st['pm7'] += $st['m11a'] * 0.5; } @@ -405,8 +354,6 @@ class Stats $st['a3'] += $st['aall']; $st['a4'] += $st['aall']; $st['a5'] += $st['aall']; - $st['a6'] += $st['aall']; - $st['a7'] += $st['aall']; } if (isset($st['m2all'])) { @@ -414,8 +361,6 @@ class Stats $st['mg2'] += $st['m2all']; $st['mg3'] += $st['m2all']; $st['mg4'] += $st['m2all']; - $st['mg5'] += $st['m2all']; - $st['mg6'] += $st['m2all']; $st['mg7'] += $st['m2all']; } @@ -445,18 +390,21 @@ class Stats $st['mg3'] += $st['mall']; $st['mg4'] += $st['mall']; } + if (isset($st['m11'])) { $st['pm1'] += $st['m11']; $st['pm2'] += $st['m11']; $st['pm3'] += $st['m11']; $st['pm4'] += $st['m11']; } + if (isset($st['m10'])) { $st['pa1'] += $st['m10']; $st['pa2'] += $st['m10']; $st['pa3'] += $st['m10']; $st['pa4'] += $st['m10']; } + if (isset($st['za'])) { $st['za1'] += $st['za']; $st['za2'] += $st['za']; @@ -464,72 +412,23 @@ class Stats $st['za4'] += $st['za']; } - $st['yzm1'] += $st['yzma']; - $st['yzm2'] += $st['yzma']; - $st['yzm3'] += $st['yzma']; - $st['yzm4'] += $st['yzma']; - $st['yzm5'] += $st['yzma']; - $st['yzm6'] += $st['yzma']; - $st['yzm7'] += $st['yzma']; - - $st['yzm1'] += $st['yzm'];//стихийный урон только - $st['yzm2'] += $st['yzm']; - $st['yzm3'] += $st['yzm']; - $st['yzm4'] += $st['yzm']; - - $st['yza1'] += $st['yza'];//урон оружия - $st['yza2'] += $st['yza']; - $st['yza3'] += $st['yza']; - $st['yza4'] += $st['yza']; - - //Отнимает от защиты от урона - if ($st['yza1'] > 0) { - $st['za1'] = max($st['za1'] / 100 * (100 + $st['yza1']), 0); - } - if ($st['yza2'] > 0) { - $st['za2'] = max($st['za2'] / 100 * (100 + $st['yza2']), 0); - } - if ($st['yza3'] > 0) { - $st['za3'] = max($st['za3'] / 100 * (100 + $st['yza3']), 0); - } - if ($st['yza4'] > 0) { - $st['za4'] = max($st['za4'] / 100 * (100 + $st['yza4']), 0); - } - - //Отнимает от защиты от магии - if ($st['yzm1'] > 0) { - $st['zm1'] = max($st['zm1'] / 100 * (100 + $st['yzm1']), 0); - } - if ($st['yzm2'] > 0) { - $st['zm2'] = max($st['zm2'] / 100 * (100 + $st['yzm2']), 0); - } - if ($st['yzm3'] > 0) { - $st['zm3'] = max($st['zm3'] / 100 * (100 + $st['yzm3']), 0); - } - if ($st['yzm4'] > 0) { - $st['zm4'] = max($st['zm4'] / 100 * (100 + $st['yzm4']), 0); - } - if ($st['yzm7'] > 0) { - $st['zm7'] = max($st['zm7'] / 100 * (100 + $st['yzm7']), 0); - } - if (!empty($st['hpVinos'])) { - $st['hpAll'] += round($st['hpVinos'] * $st['s4']); + $st['hpall'] += round($st['hpVinos'] * $st['s4']); } if (!empty($st['mpVinos'])) { - $st['mpAll'] += round($st['mpVinos'] * $st['s6']); + $st['mpall'] += round($st['mpVinos'] * $st['s6']); } if (!empty($st['hpProc'])) { - $st['hpAll'] += round($st['hpAll'] / 100 * $st['hpProc']); + $st['hpall'] += round($st['hpall'] / 100 * $st['hpProc']); } if (!empty($st['mpProc'])) { - $st['mpAll'] += round($st['mpAll'] / 100 * $st['mpProc']); + $st['mpall'] += round($st['mpall'] / 100 * $st['mpProc']); } //Реген. - 250 ед. //конец бонусов - $st['hpNow'] = Comparsion::minimax($st['hpNow'], 0, $st['hpAll']); - $st['mpNow'] = Comparsion::minimax($st['mpNow'], 0, $st['mpAll']); + $st['hpNow'] = Comparsion::minimax($st['hpNow'], 0, $st['hpall']); + $st['mpNow'] = Comparsion::minimax($st['mpNow'], 0, $st['mpall']); //зоны блока и удара if ($st['zona'] < 1) { @@ -562,27 +461,24 @@ class Stats $this->addDungeonsBonuses($u['id'], $st); //Добавочный подьем для игроков - $st['maxves'] += 100; + $this->addKeyIfNotExist('maxves', 100, $st); $this->addAdminBonuses($u, $st); - if (date('H') >= 22 && date('H') <= 10) { - $st['exp'] += 25; + $this->addKeyIfNotExist('exp', 25, $st); } - //Сохраняем рейтинг игрока - $st['reting'] = floor($st['reting']); if (isset($st['btl_cof'], $st['prckr']) && $st['btl_cof'] != $st['prckr']) { $st['btl_cof'] = $st['prckr']; Db::sql('update stats set btl_cof = ? where id = ?', [$st['prckr'], $st['id']]); } - if ($st['hpAll'] < 1) { - $st['hpAll'] = 1; + if ($st['hpall'] < 1) { + $st['hpall'] = 1; } - if ($st['mpAll'] < 0) { - $st['mpAll'] = 0; + if ($st['mpall'] < 0) { + $st['mpall'] = 0; } if (stristr($u['login'], '(зверь ') || (stristr($u['login'], 'Каменный страж') && $u['ip'] == '0')) { @@ -591,6 +487,8 @@ class Stats $st['this_animal'] = 0; } + $this->renameArrayKeys($st); + $rt = []; if ($i1 == 1) { $rt[0] = $st; @@ -598,8 +496,8 @@ class Stats } else { $rt = $st; } - if ($u['hpAll'] != $st['hpAll'] || $u['mpAll'] != $st['mpAll']) { - Db::sql('update stats set hpAll = ?, mpAll = ? where id = ?', [$st['hpAll'], $st['mpAll'], $u['id']]); + if ($u['hpAll'] != $st['hpall'] || $u['mpAll'] != $st['mpall']) { + Db::sql('update stats set hpAll = ?, mpAll = ? where id = ?', [$st['hpall'], $st['mpall'], $u['id']]); } if ($btl_cache) { $dataca = [ @@ -610,10 +508,24 @@ class Stats Db::sql('insert into battle_cache (battle, uid, time, data) values (?,?,unix_timestamp(),?)', [$u['battle'], $u['id'], $dataca]); } - return $rt; } + /** Собираем динамически создаваемые параметры. Если ключа нет - создаём. + * @param string $key + * @param int $value + * @param array $st + * @return void + */ + private function addKeyIfNotExist(string $key, int $value, array &$st): void + { + if (!isset($st[$key])) { + $st[$key] = 0; + $this->statsKeys[] = $key; + } + $st[$key] += $value; + } + private function addWearedItemsBonuses(int $uid, array &$st, array &$s_v, array $baseStats): array { //Характеристики от предметов //ТУТ tr_lvl @@ -643,10 +555,16 @@ class Stats 4 => [0, 0], ]; //особенности магии - $st['reting'] = 0; + $ozaozmtypes = [ + 1 => [1, 9,],//Слабая + 2 => [20, 39,],//Нормальная + 3 => [40, 69,],//Хорошая + 4 => [10, 19,],//Посредственная + 5 => [70, 89,],//Великолепная + ]; foreach ($wearedItems as $wearedItem) { - $st['wp' . $wearedItem['inOdet'] . 'id'] = $h; + $this->addKeyIfNotExist('wp' . $wearedItem['inOdet'] . 'id', $h, $st); $st['items'][$h] = $wearedItem; $h++; @@ -667,211 +585,149 @@ class Stats $sht1 = 1; } - $sti = Conversion::dataStringToArray($wearedItem['data']); + $data = Conversion::dataStringToArray($wearedItem['data']); if ($wearedItem['inOdet'] <= 18 && $wearedItem['inOdet'] > 0) { - $st['reting'] += 1; + $this->addKeyIfNotExist('reting', 1, $st); } - $ko = 1; - while ($ko <= 4) { - if (isset($sti['add_oza' . $ko])) { - if (isset($sti['add_oza'])) { - if ($sti['add_oza'] == 1) { - //Слабая - $oza[$ko][0] += 1; - $oza[$ko][1] += 9; - } elseif ($sti['add_oza'] == 2) { - //Нормальная - $oza[$ko][0] += 20; - $oza[$ko][1] += 39; - } elseif ($sti['add_oza'] == 3) { - //Хорошая - $oza[$ko][0] += 40; - $oza[$ko][1] += 69; - } elseif ($sti['add_oza'] == 4) { - //Посредственная - $oza[$ko][0] += 10; - $oza[$ko][1] += 19; - } elseif ($sti['add_oza'] == 5) { - //Великолепная - $oza[$ko][0] += 70; - $oza[$ko][1] += 89; - } - } - if (isset($sti['add_ozm'])) { - if ($sti['add_ozm'] == 1) { - //Слабая - $ozm[$ko][0] += 1; - $ozm[$ko][1] += 9; - } elseif ($sti['add_ozm'] == 2) { - //Нормальная - $ozm[$ko][0] += 20; - $ozm[$ko][1] += 39; - } elseif ($sti['add_ozm'] == 3) { - //Хорошая - $ozm[$ko][0] += 40; - $ozm[$ko][1] += 69; - } elseif ($sti['add_ozm'] == 4) { - //Посредственная - $ozm[$ko][0] += 10; - $ozm[$ko][1] += 19; - } elseif ($sti['add_ozm'] == 5) { - //Великолепная - $ozm[$ko][0] += 70; - $ozm[$ko][1] += 89; - } - } else { - $ozm[$ko][0] += 1; - $ozm[$ko][1] += 9; - } - if ($sti['add_oza' . $ko] == 1) { - //Слабая - $oza[$ko][0] += 1; - $oza[$ko][1] += 9; - } elseif ($sti['add_oza' . $ko] == 2) { - //Нормальная - $oza[$ko][0] += 20; - $oza[$ko][1] += 39; - } elseif ($sti['add_oza' . $ko] == 3) { - //Хорошая - $oza[$ko][0] += 40; - $oza[$ko][1] += 69; - } elseif ($sti['add_oza' . $ko] == 4) { - //Посредственная - $oza[$ko][0] += 10; - $oza[$ko][1] += 19; - } elseif ($sti['add_oza' . $ko] == 5) { - //Великолепная - $oza[$ko][0] += 70; - $oza[$ko][1] += 89; - } - if (isset($sti['add_ozm' . $ko])) { - if ($sti['add_ozm' . $ko] == 1) { - //Слабая - $ozm[$ko][0] += 1; - $ozm[$ko][1] += 9; - } elseif ($sti['add_ozm' . $ko] == 2) { - //Нормальная - $ozm[$ko][0] += 20; - $ozm[$ko][1] += 39; - } elseif ($sti['add_ozm' . $ko] == 3) { - //Хорошая - $ozm[$ko][0] += 40; - $ozm[$ko][1] += 69; - } elseif ($sti['add_ozm' . $ko] == 4) { - //Посредственная - $ozm[$ko][0] += 10; - $ozm[$ko][1] += 19; - } elseif ($sti['add_ozm' . $ko] == 5) { - //Великолепная - $ozm[$ko][0] += 70; - $ozm[$ko][1] += 89; - } - } else { - $ozm[$ko][0] += 1; - $ozm[$ko][1] += 9; - } - } - $ko++; + if (isset($data['add_oza'])) { + $oza = array_fill_keys($oza, $ozaozmtypes[$data['add_oza']]); } - if (isset($sti['art'])) { - if (!isset($st['art'])) { - $st['art'] = 0; - } - $st['art'] += $sti['art']; + if (isset($data['add_ozm'])) { + $ozm = array_fill_keys($ozm, $ozaozmtypes[$data['add_ozm']]); + } else { + $ozm = array_fill_keys($ozm, $ozaozmtypes[1]); } - if (isset($sti['maks_itm'])) { - if (!isset($st['maks_itm'])) { - $st['maks_itm'] = 0; - } - $st['maks_itm'] += $sti['maks_itm']; + + if (in_array($data['add_oza1'], range(1, 5))) { + $oza[1] = $ozaozmtypes[$data['add_oza1']]; } - if (isset($sti['complect'])) { - $coms[count($coms)]['id'] = $sti['complect']; - if (!isset($coms['com'][$sti['complect']])) { - $coms['com'][$sti['complect']] = 0; + if (in_array($data['add_oza2'], range(1, 5))) { + $oza[2] = $ozaozmtypes[$data['add_oza2']]; + } + if (in_array($data['add_oza3'], range(1, 5))) { + $oza[3] = $ozaozmtypes[$data['add_oza3']]; + } + if (in_array($data['add_oza4'], range(1, 5))) { + $oza[4] = $ozaozmtypes[$data['add_oza4']]; + } + + if (in_array($data['add_ozm1'], range(1, 5))) { + $ozm[1] = $ozaozmtypes[$data['add_ozm1']]; + } else { + $ozm[1] = $ozaozmtypes[1]; + } + if (in_array($data['add_ozm2'], range(1, 5))) { + $ozm[2] = $ozaozmtypes[$data['add_ozm2']]; + } else { + $ozm[2] = $ozaozmtypes[1]; + } + if (in_array($data['add_ozm3'], range(1, 5))) { + $ozm[3] = $ozaozmtypes[$data['add_ozm3']]; + } else { + $ozm[3] = $ozaozmtypes[1]; + } + if (in_array($data['add_ozm4'], range(1, 5))) { + $ozm[4] = $ozaozmtypes[$data['add_ozm4']]; + } else { + $ozm[4] = $ozaozmtypes[1]; + } + + if (isset($data['art'])) { + $this->addKeyIfNotExist('art', $data['art'], $st); + } + if (isset($data['maks_itm'])) { + $this->addKeyIfNotExist('maks_itm', $data['maks_itm'], $st); + } + + if (isset($data['complect'])) { + $coms[count($coms)]['id'] = $data['complect']; + if (!isset($coms['com'][$data['complect']])) { + $coms['com'][$data['complect']] = 0; if (!isset($coms['new'])) { $coms['new'] = []; } - $coms['new'][count($coms['new'])] = $sti['complect']; + $coms['new'][count($coms['new'])] = $data['complect']; } - $coms['com'][$sti['complect']]++; + $coms['com'][$data['complect']]++; } - if (isset($sti['complect2'])) { - $coms[count($coms)]['id'] = $sti['complect2']; - if (!isset($coms['com'][$sti['complect2']])) { - $coms['com'][$sti['complect2']] = 0; + if (isset($data['complect2'])) { + $coms[count($coms)]['id'] = $data['complect2']; + if (!isset($coms['com'][$data['complect2']])) { + $coms['com'][$data['complect2']] = 0; if (!isset($coms['new'])) { $coms['new'] = []; } - $coms['new'][count($coms['new'])] = $sti['complect2']; + $coms['new'][count($coms['new'])] = $data['complect2']; } - $coms['com'][$sti['complect2']]++; + $coms['com'][$data['complect2']]++; } - if (isset($sti['zonb']) && $sti['zonb'] != 0) { - if (!isset($st['zonb'])) { - $st['zonb'] = 0; - } - $st['zonb'] += $sti['zonb']; + if (!empty($data['zonb'])) { + $this->addKeyIfNotExist('zonb', $data['zonb'], $st); } - if (isset($sti['zona']) && $sti['zona'] != 0) { - if (!isset($st['zona'])) { - $st['zona'] = 0; - } - $st['zona'] += $sti['zona']; + if (!empty($data['zona'])) { + $this->addKeyIfNotExist('zona', $data['zona'], $st); } //Добавляем статы от данного предмета - if (!isset($sti['restart_stats'])) { + if (!isset($data['restart_stats'])) { foreach ($this->sysNames as $stat) { - if (!isset($sti['add_' . $stat])) { + if (!isset($data['add_' . $stat])) { continue; } - $st[$stat] += (int)$sti['add_' . $stat]; + $st[$stat] += (int)$data['add_' . $stat]; } } else { - $reitm[] = $sti; + $reitm[] = $data; } foreach ($this->sysNames as $stat) { - if (!isset($sti['sv_' . $stat])) { + if (!isset($data['sv_' . $stat])) { continue; } - $s_v[$stat] += (int)$sti['sv_' . $stat]; + $s_v[$stat] += (int)$data['sv_' . $stat]; } } //Сохраненные хар-ки и умения - if (!empty($reitm)) { - $i39 = [0 => 0, 1 => 0, 2 => 0]; - $i = 0; - while ($i < count($reitm)) { - if (isset($reitm[$i]['sm_skill']) && $i39[0] == 0) { + if (!empty($reitm) && is_iterable($reitm)) { + $i39 = []; + + foreach ($reitm as $item) { + if (isset($item['sm_skill']) && $i39[0] == 0) { //умения - $i9 = 1; $i39[0] = 1; - while ($i9 <= 7) { - $st['a' . $i9] = $st['a' . $i9] - $baseStats['a' . $i9] + $reitm[$i]['add_a' . $i9]; - $st['mg' . $i9] = $st['mg' . $i9] - $baseStats['mg' . $i9] + $reitm[$i]['add_mg' . $i9]; - $i9++; - } - } elseif (isset($reitm[$i]['sm_abil']) && $i39[1] == 0) { + $st['a1'] -= $baseStats['a1'] + $item['add_a1']; + $st['a2'] -= $baseStats['a2'] + $item['add_a2']; + $st['a3'] -= $baseStats['a3'] + $item['add_a3']; + $st['a4'] -= $baseStats['a4'] + $item['add_a4']; + $st['a5'] -= $baseStats['a5'] + $item['add_a5']; + + $st['mg1'] -= $baseStats['mg1'] + $item['add_mg1']; + $st['mg2'] -= $baseStats['mg2'] + $item['add_mg2']; + $st['mg3'] -= $baseStats['mg3'] + $item['add_mg3']; + $st['mg4'] -= $baseStats['mg4'] + $item['add_mg4']; + $st['mg7'] -= $baseStats['mg7'] + $item['add_mg7']; + + } elseif (isset($item['sm_abil']) && $i39[1] == 0) { //статы - $i9 = 1; $i39[1] = 1; - while ($i9 <= 12) { - $st['s' . $i9] = $st['s' . $i9] - $baseStats['s' . $i9] + $reitm[$i]['add_s' . $i9]; - $i9++; - } - } elseif (isset($reitm[$i]['sm_skill2']) && $i39[2] == 0) { + $st['s1'] -= $baseStats['s1'] + $item['add_s1']; + $st['s2'] -= $baseStats['s2'] + $item['add_s2']; + $st['s3'] -= $baseStats['s3'] + $item['add_s3']; + $st['s4'] -= $baseStats['s4'] + $item['add_s4']; + $st['s5'] -= $baseStats['s5'] + $item['add_s5']; + $st['s6'] -= $baseStats['s6'] + $item['add_s6']; + $st['s7'] -= $baseStats['s7'] + $item['add_s7']; + + } elseif (isset($item['sm_skill2']) && $i39[2] == 0) { //навыки $i39[2] = 1; } - $i++; } } return [$hnd1, $hnd2, $sht1, $oza, $ozm, $dom, $coms]; @@ -885,14 +741,10 @@ class Stats foreach ($efs as $data) { $sts = Conversion::dataStringToArray($data); foreach ($sts as $paramName => $value) { - //todo убедиться, что не могут прилететь параметры, которых нет в словарей бонусов предметов - if (!str_contains(implode(',', $this->sysNames), 'add_' . $paramName)) { // есть ли параметр в разрешенных? + if (!in_array($paramName, $this->sysNames, true)) { // есть ли параметр в разрешенных? continue; } - if (empty($st['add_' . $paramName])) { - $st['add_' . $paramName] = 0; - } - $st['add_' . $paramName] += (int)$value; + $st[$paramName] += $value; } } } @@ -1188,39 +1040,39 @@ class Stats { //выносливость if ($st['s4'] > 0) { - $st['hpAll'] += 30; + $st['hpall'] += 30; } if ($st['s4'] > 24 && $st['s4'] < 50) { - $st['hpAll'] += 50; + $st['hpall'] += 50; } if ($st['s4'] > 49 && $st['s4'] < 75) { - $st['hpAll'] += 100; + $st['hpall'] += 100; } if ($st['s4'] > 74 && $st['s4'] < 100) { - $st['hpAll'] += 175; + $st['hpall'] += 175; $st['m19'] += 2; } if ($st['s4'] > 99 && $st['s4'] < 125) { - $st['hpAll'] += 250; + $st['hpall'] += 250; $st['m19'] += 4; } if ($st['s4'] > 124 && $st['s4'] < 150) { - $st['hpAll'] += 400; + $st['hpall'] += 400; $st['za'] += 25; $st['zm'] += 25; } if ($st['s4'] > 149 && $st['s4'] < 175) { - $st['hpAll'] += 450; + $st['hpall'] += 450; $st['za'] += 50; $st['zm'] += 50; } if ($st['s4'] > 174 && $st['s4'] < 200) { - $st['hpAll'] += 600; + $st['hpall'] += 600; $st['za'] += 100; $st['zm'] += 100; } if ($st['s4'] > 199) { - $st['hpAll'] += 850; + $st['hpall'] += 850; $st['za'] += 125; $st['zm'] += 125; } @@ -1260,38 +1112,38 @@ class Stats { //мудрость if ($st['s6'] > 24 && $st['s6'] < 50) { - $st['mpAll'] += 150; + $st['mpall'] += 150; $st['speedmp'] += 100; } if ($st['s6'] > 49 && $st['s6'] < 75) { - $st['mpAll'] += 200; + $st['mpall'] += 200; $st['speedmp'] += 200; } if ($st['s6'] > 74 && $st['s6'] < 100) { - $st['mpAll'] += 250; + $st['mpall'] += 250; $st['speedmp'] += 350; } if ($st['s6'] > 99 && $st['s6'] < 125) { - $st['mpAll'] += 350; + $st['mpall'] += 350; $st['speedmp'] += 500; } if ($st['s6'] > 124 && $st['s6'] < 150) { - $st['mpAll'] += 500; + $st['mpall'] += 500; $st['speedmp'] += 500; $st['pzm'] += 2; } if ($st['s6'] > 149 && $st['s6'] < 175) { - $st['mpAll'] += 700; + $st['mpall'] += 700; $st['speedmp'] += 600; $st['pzm'] += 3; } if ($st['s6'] > 174 && $st['s6'] < 200) { - $st['mpAll'] += 900; + $st['mpall'] += 900; $st['speedmp'] += 700; $st['pzm'] += 5; } if ($st['s6'] > 199) { - $st['mpAll'] += 900; + $st['mpall'] += 900; $st['speedmp'] += 700; $st['pzm'] += 7; } @@ -1313,7 +1165,6 @@ class Stats //Бонус за количество полностью вырытых пещер. $st['m10'] += 10 * $finishedDungeons; - $st['pzm'] += $finishedDungeons; } private function addAdminBonuses(array $u, array &$st): void @@ -1322,8 +1173,8 @@ class Stats return; } - $st['speed_dungeon'] = 500; - $st['speedhp'] = 500; + $this->addKeyIfNotExist('speed_dungeon', 500, $st); + $this->addKeyIfNotExist('speedhp', 500, $st); if (!$u['battle']) { return; @@ -1334,4 +1185,18 @@ class Stats priems_z = '0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|0|' where id = ?", [$u['id']]); } + + /** Переименовывает элементы массива с несовпадающими с остальным скриптом именами полей. + * @param array $st + * @return void + */ + private function renameArrayKeys(array &$st): void + { + $st['lvl'] = $st['level']; + $st['hpNow'] = $st['hpnow']; + $st['mpNow'] = $st['mpnow']; + + unset($st['level'], $st['hpnow'], $st['mpnow']); + } + } diff --git a/_incl_data/class/User/WearedScrolls.php b/_incl_data/class/User/WearedScrolls.php new file mode 100644 index 00000000..bf1974af --- /dev/null +++ b/_incl_data/class/User/WearedScrolls.php @@ -0,0 +1,63 @@ + false - ); - - $vad['test'] = mysql_fetch_array(mysql_query('SELECT `id`,`uid` FROM `dungeon_actions` WHERE `dn` = "'.$u->info['dnow'].'" AND `vars` = "obj_act'.$obj['id'].'" LIMIT 1')); - if( !isset($vad['test']['id']) ) { - $vad['go'] = true; - }else{ - $r = 'В сундуке была ловушка, её активировал персонаж '.$u->getLogin($vad['test']['uid']); - } - - if( $vad['go'] == true ) { - mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES ( - "'.$u->info['dnow'].'","'.time().'","'.$obj['x'].'","'.$obj['y'].'","'.$u->info['id'].'","obj_act'.$obj['id'].'","" +if (isset($s[1]) && $s[1] == '101/i9') { + /* + Сундук: ловушка + * Снимает до 1000 НР один раз + */ + //Все переменные сохранять в массиве $vad ! + $vad = [ + 'go' => false, + ]; + + $vad['test'] = mysql_fetch_array(mysql_query('SELECT `id`,`uid` FROM `dungeon_actions` WHERE `dn` = "' . $u->info['dnow'] . '" AND `vars` = "obj_act' . $obj['id'] . '" LIMIT 1')); + if (!isset($vad['test']['id'])) { + $vad['go'] = true; + } else { + $r = 'В сундуке была ловушка, её активировал персонаж ' . User::getLogin($vad['test']['uid']); + } + + if ($vad['go'] == true) { + mysql_query('INSERT INTO `dungeon_actions` (`dn`,`time`,`x`,`y`,`uid`,`vars`,`vals`) VALUES ( + "' . $u->info['dnow'] . '","' . time() . '","' . $obj['x'] . '","' . $obj['y'] . '","' . $u->info['id'] . '","obj_act' . $obj['id'] . '","" )'); - $r = 'В сундуке была ловушка установленная одним из обитателей подземелья!'; - $vad['min_hp'] = rand(100,1000); - $u->stats['hpNow'] -= $vad['min_hp']; - if( $u->stats['hpNow'] < 0 ) { - $u->stats['hpNow'] = 0; - } - if($u->info['sex'] == 0) { - $vad['text'] = '[img[items/trap.gif]] '.$u->info['login'].' угодил в ловушку оставленную в "'.$obj['name'].'". -'.$vad['min_hp'].' ['.floor($u->stats['hpNow']).'/'.round($u->stats['hpAll']).']'; - }else{ - $vad['text'] = '[img[items/trap.gif]] '.$u->info['login'].' угодила в ловушку оставленную в "'.$obj['name'].'". -'.$vad['min_hp'].' ['.floor($u->stats['hpNow']).'/'.round($u->stats['hpAll']).']'; - } - $this->sys_chat($vad['text']); - $u->info['hpNow'] = $u->stats['hpNow']; - mysql_query('UPDATE `stats` SET `regHP` = "'.time().'",`hpNow` = "'.$u->stats['hpNow'].'" WHERE `id` = "'.$u->stats['id'].'" LIMIT 1'); - // - $this->testDie(); - } - unset($vad); + $r = 'В сундуке была ловушка установленная одним из обитателей подземелья!'; + $vad['min_hp'] = rand(100, 1000); + $u->stats['hpNow'] -= $vad['min_hp']; + if ($u->stats['hpNow'] < 0) { + $u->stats['hpNow'] = 0; + } + if ($u->info['sex'] == 0) { + $vad['text'] = '[img[items/trap.gif]] ' . $u->info['login'] . ' угодил в ловушку оставленную в "' . $obj['name'] . '". -' . $vad['min_hp'] . ' [' . floor($u->stats['hpNow']) . '/' . round($u->stats['hpAll']) . ']'; + } else { + $vad['text'] = '[img[items/trap.gif]] ' . $u->info['login'] . ' угодила в ловушку оставленную в "' . $obj['name'] . '". -' . $vad['min_hp'] . ' [' . floor($u->stats['hpNow']) . '/' . round($u->stats['hpAll']) . ']'; + } + $this->sys_chat($vad['text']); + $u->info['hpNow'] = $u->stats['hpNow']; + mysql_query('UPDATE `stats` SET `regHP` = "' . time() . '",`hpNow` = "' . $u->stats['hpNow'] . '" WHERE `id` = "' . $u->stats['id'] . '" LIMIT 1'); + // + $this->testDie(); + } + unset($vad); } ?> \ No newline at end of file diff --git a/adminion/mult.php b/adminion/mult.php index 8dc5a962..46136426 100644 --- a/adminion/mult.php +++ b/adminion/mult.php @@ -26,7 +26,7 @@ while ($pl = mysql_fetch_array($sp)) { $b2 = $pl['money2'] + $b0['b']; if ($b1 < 1000) { $html .= ''; - $html .= $i . '. ' . $u->getLogin($pl['id']) . ' ( ' . $b1 . ' кр. / ' . $b2 . ' екр. )
    '; + $html .= $i . '. ' . User::getLogin($pl['id']) . ' ( ' . $b1 . ' кр. / ' . $b2 . ' екр. )
    '; $html .= '
    '; $i++; } diff --git a/adminion/mults.php b/adminion/mults.php index a491cd7e..3837b519 100644 --- a/adminion/mults.php +++ b/adminion/mults.php @@ -12,5 +12,5 @@ if (!$u->info['admin']) { } $sp = mysql_query('SELECT * FROM `mults`'); while ($pl = mysql_fetch_array($sp)) { - echo $u->getLogin($pl['uid']) . ' пересечение с ' . $u->getLogin($pl['uid2']) . '
    '; + echo User::getLogin($pl['uid']) . ' пересечение с ' . User::getLogin($pl['uid2']) . '
    '; } diff --git a/breakchaos.php b/breakchaos.php index ca62a065..39a14ec3 100644 --- a/breakchaos.php +++ b/breakchaos.php @@ -42,7 +42,7 @@ while ($pl = mysql_fetch_array($sp)) { // $r1 .= ' - + @@ -51,7 +51,7 @@ while ($pl = mysql_fetch_array($sp)) { if (date('d.m.Y') == date('d.m.Y', $pl2['time'])) { $r2 .= ' - + diff --git a/ekr.php b/ekr.php index 4b98e369..7bb9e066 100644 --- a/ekr.php +++ b/ekr.php @@ -733,7 +733,7 @@ if (isset($_POST['do']) && $_POST['do'] == 'newShadow') { freekassainfo['id'])): ?>
    - Персонаж: getLogin() ?> + Персонаж: info['id']) ?>
    error)): ?> diff --git a/forum_script/index.php b/forum_script/index.php index 180f3cd7..065b8c65 100644 --- a/forum_script/index.php +++ b/forum_script/index.php @@ -494,7 +494,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0
    + height="135">
    ' . $i . '' . $u->getLogin($pl['uid']) . '' . User::getLogin($pl['uid']) . ' ' . $pl2['voln'] . ' ' . $ret . ' »»
    ' . $j . '' . $u->getLogin($pl['uid']) . '' . User::getLogin($pl['uid']) . ' ' . $pl2['voln'] . ' ' . $ret . ' »»
    @@ -561,7 +561,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0 if (!$f->user) { echo 'Вы не авторизованы
    Войти на персонажа'; } else { - echo 'Вы вошли как:
    ' . $u->getLogin() . '

    '; + echo 'Вы вошли как:
    ' . User::getLogin($u->info['id']) . '

    '; } ?> user['align'] > 1 && $f->user['align'] < 2) || ($f->user['align'] > 3 && $f->user['align'] < 4) || $f->user['admin'] > 0) { @@ -675,7 +675,7 @@ function MM_jumpMenu(targ, selObj, restore) { //v3.0 if ($f->user == false) { echo 'Вы не авторизованы
    Войти на персонажа'; } else { - echo 'Вы вошли как:
    ' . $u->getLogin() . '

    '; + echo 'Вы вошли как:
    ' . User::getLogin($u->info['id']) . '

    '; } ?> user['align'] > 1 && $f->user['align'] < 2) || ($f->user['align'] > 3 && $f->user['align'] < 4) || $f->user['admin'] > 0) { diff --git a/hmonitor.php b/hmonitor.php index b467a406..049a50e1 100644 --- a/hmonitor.php +++ b/hmonitor.php @@ -17,7 +17,7 @@ $u = User::start(); - + @@ -26,7 +26,7 @@ $u = User::start(); -
    Просматривает персонаж: getLogin() ?>
    +
    Просматривает персонаж: info['id']) ?>

    @@ -43,7 +43,7 @@ while ($pl = mysql_fetch_array($sp)) { // $spu = mysql_query('SELECT `id` FROM `stats` WHERE `zv` = "' . $pl['id'] . '"'); while ($plu = mysql_fetch_array($spu)) { - $users .= $u->getLogin($plu['id']) . ','; + $users .= User::getLogin($plu['id']) . ','; } // if ($users == '') { @@ -95,7 +95,7 @@ while ($pl = mysql_fetch_array($sp)) { if (!isset($usersa[$plu['team']])) { $userst[] = $plu['team']; } - $usersa[$plu['team']] .= $u->getLogin($plu['id']) . ','; + $usersa[$plu['team']] .= User::getLogin($plu['id']) . ','; } // if (count($usersa) > 0) { @@ -163,7 +163,7 @@ while ($pl = mysql_fetch_array($sp)) { $users = ''; $spu = mysql_query('SELECT `id` FROM `users` WHERE `inTurnir` = "' . $pl['id'] . '"'); while ($plu = mysql_fetch_array($spu)) { - $users .= $u->getLogin($plu['id']) . ','; + $users .= User::getLogin($plu['id']) . ','; } $users = rtrim($users, ','); $html .= ' Турнир Башни Смерти уже идет.'; diff --git a/inf.php b/inf.php index 968704bc..9a2170e4 100644 --- a/inf.php +++ b/inf.php @@ -392,7 +392,7 @@ if (isset($uer)) { Db::sql('update users set login = ? where id = ?', ['DELETE', $pl['id']]); } } else { - $nolog .= '
    ' . $u->getLogin($pl['id']); + $nolog .= '
    ' . User::getLogin($pl['id']); if ($nodell['inUser'] != $pl['id'] && $pl['id'] != $nodell['id']) { $nolog .= ' (персонажа можно удалить)'; } @@ -1004,7 +1004,7 @@ if (isset($uer)) { continue; } - $m[] = $u->getLogin($usr); + $m[] = User::getLogin($usr); } echo '
    За игроком замечены следующие темные делишки:
    '; @@ -1022,7 +1022,7 @@ if (isset($uer)) { //Информация для паладинов\тарманов\ангелов if ((int)$inf['host_reg'] >= 1) { - $inf['ref'] = $u->getLogin((int)$inf['host_reg']); + $inf['ref'] = User::getLogin((int)$inf['host_reg']); } else { $inf['ref'] = '--'; } @@ -1054,7 +1054,7 @@ if (isset($uer)) { $refusers[] = date('Дата регистрации: d.m.Y H:i', $refuser['timereg']) . DIRECTORY_SEPARATOR . date('Был тут: d.m.Y H:i ', $refuser['online']) . - $u->getLogin($inf['id']) . + User::getLogin($inf['id']) . "({$refuser['ip']}, {$refuser['ipreg']})"; } diff --git a/inx/ckeditor/CHANGES.md b/inx/ckeditor/CHANGES.md index 96a98044..a6508929 100644 --- a/inx/ckeditor/CHANGES.md +++ b/inx/ckeditor/CHANGES.md @@ -5,272 +5,552 @@ CKEditor 4 Changelog Fixed Issues: -* [#2607](https://github.com/ckeditor/ckeditor4/issues/2607): Fixed: The [Emoji](https://ckeditor.com/cke4/addon/emoji) plugin SVG icons file is not loaded in CORS context. -* [#3866](https://github.com/ckeditor/ckeditor4/issues/3866): Fixed: The [`config.readOnly`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-readOnly) configuration option not considered for startup read-only mode of inline editor. -* [#3931](https://github.com/ckeditor/ckeditor4/issues/3931): [IE] Fixed: An error is thrown when pasting using the Paste button after accepting the browser Clipboard Access Prompt dialog. -* [#3938](https://github.com/ckeditor/ckeditor4/issues/3938): Fixed: Cannot navigate the [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) panel with the keyboard after switching to source mode. -* [#2823](https://github.com/ckeditor/ckeditor4/issues/2823): [IE] Fixed: Cannot resize the last table column using the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin. -* [#909](https://github.com/ckeditor/ckeditor4/issues/909): Fixed: The [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin does not work when the editor is placed in an absolutely positioned container. Thanks to [Roland Petto](https://github.com/arpi68)! -* [#1959](https://github.com/ckeditor/ckeditor4/issues/1959): Fixed: The [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin does not work in a [maximized](https://ckeditor.com/cke4/addon/maximize) editor when the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) feature is enabled. Thanks to [Roland Petto](https://github.com/arpi68)! -* [#3156](https://github.com/ckeditor/ckeditor4/issues/3156): Fixed: [Autolink](https://ckeditor.com/cke4/addon/autolink) [`config.autolink_urlRegex`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-autolink_urlRegex) and [`config.autolink_emailRegex`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-autolink_emailRegex) options are not customizable. Thanks to [Sergiy Dobrovolsky](https://github.com/serggoodwill)! -* [#624](https://github.com/ckeditor/ckeditor4/issues/624): Fixed: [Notification](https://ckeditor.com/cke4/addon/notification) does not work with the [bottom toolbar location](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-toolbarLocation). -* [#3000](https://github.com/ckeditor/ckeditor4/issues/3000): Fixed: [Auto Embed](https://ckeditor.com/cke4/addon/autoembed) does not work with the [bottom toolbar location](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-toolbarLocation). -* [#1883](https://github.com/ckeditor/ckeditor4/issues/1883): Fixed: The [`editor.resize()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-resize) method does not work with CSS units. -* [#3926](https://github.com/ckeditor/ckeditor4/issues/3926): Fixed: Dragging and dropping a [widget](https://ckeditor.com/cke4/addon/widget) sometimes produces an error. -* [#4008](https://github.com/ckeditor/ckeditor4/issues/4008): Fixed: [Remove Format](https://ckeditor.com/cke4/addon/removeformat) does not work with a collapsed selection. -* [#3998](https://github.com/ckeditor/ckeditor4/issues/3998): Fixed: An error is thrown when switching to the [source mode](https://ckeditor.com/cke4/addon/sourcearea) using a custom Ctrl + Enter [keystroke](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setKeystroke) with the [Widget](https://ckeditor.com/cke4/addon/widget) plugin present. +* [#2607](https://github.com/ckeditor/ckeditor4/issues/2607): Fixed: The [Emoji](https://ckeditor.com/cke4/addon/emoji) + plugin SVG icons file is not loaded in CORS context. +* [#3866](https://github.com/ckeditor/ckeditor4/issues/3866): Fixed: + The [`config.readOnly`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-readOnly) + configuration option not considered for startup read-only mode of inline editor. +* [#3931](https://github.com/ckeditor/ckeditor4/issues/3931): [IE] Fixed: An error is thrown when pasting using the + Paste button after accepting the browser Clipboard Access Prompt dialog. +* [#3938](https://github.com/ckeditor/ckeditor4/issues/3938): Fixed: Cannot navigate + the [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) panel with the keyboard after switching to source + mode. +* [#2823](https://github.com/ckeditor/ckeditor4/issues/2823): [IE] Fixed: Cannot resize the last table column using + the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin. +* [#909](https://github.com/ckeditor/ckeditor4/issues/909): Fixed: + The [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin does not work when the editor is placed in an + absolutely positioned container. Thanks to [Roland Petto](https://github.com/arpi68)! +* [#1959](https://github.com/ckeditor/ckeditor4/issues/1959): Fixed: + The [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin does not work in + a [maximized](https://ckeditor.com/cke4/addon/maximize) editor when + the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) feature is enabled. Thanks + to [Roland Petto](https://github.com/arpi68)! +* [#3156](https://github.com/ckeditor/ckeditor4/issues/3156): + Fixed: [Autolink](https://ckeditor.com/cke4/addon/autolink) [`config.autolink_urlRegex`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-autolink_urlRegex) + and [`config.autolink_emailRegex`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-autolink_emailRegex) + options are not customizable. Thanks to [Sergiy Dobrovolsky](https://github.com/serggoodwill)! +* [#624](https://github.com/ckeditor/ckeditor4/issues/624): + Fixed: [Notification](https://ckeditor.com/cke4/addon/notification) does not work with + the [bottom toolbar location](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-toolbarLocation). +* [#3000](https://github.com/ckeditor/ckeditor4/issues/3000): + Fixed: [Auto Embed](https://ckeditor.com/cke4/addon/autoembed) does not work with + the [bottom toolbar location](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-toolbarLocation). +* [#1883](https://github.com/ckeditor/ckeditor4/issues/1883): Fixed: + The [`editor.resize()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-resize) method does + not work with CSS units. +* [#3926](https://github.com/ckeditor/ckeditor4/issues/3926): Fixed: Dragging and dropping + a [widget](https://ckeditor.com/cke4/addon/widget) sometimes produces an error. +* [#4008](https://github.com/ckeditor/ckeditor4/issues/4008): + Fixed: [Remove Format](https://ckeditor.com/cke4/addon/removeformat) does not work with a collapsed selection. +* [#3998](https://github.com/ckeditor/ckeditor4/issues/3998): Fixed: An error is thrown when switching to + the [source mode](https://ckeditor.com/cke4/addon/sourcearea) using a custom Ctrl + + Enter [keystroke](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-setKeystroke) with + the [Widget](https://ckeditor.com/cke4/addon/widget) plugin present. Other Changes: -* Updated [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) and [SpellCheckAsYouType](https://ckeditor.com/cke4/addon/scayt) (SCAYT) plugins: - * Fixed: Active [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) panel causes active suggestions to be unnecessarily checked by the SCAYT spell checking mechanism. +* Updated [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) + and [SpellCheckAsYouType](https://ckeditor.com/cke4/addon/scayt) (SCAYT) plugins: + * Fixed: Active [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) panel causes active suggestions to be + unnecessarily checked by the SCAYT spell checking mechanism. ## CKEditor 4.14 **Security Updates:** -* Fixed XSS vulnerability in the HTML data processor reported by [MichaЕ‚ Bentkowski](https://twitter.com/securitymb) of Securitum. +* Fixed XSS vulnerability in the HTML data processor reported by [MichaЕ‚ Bentkowski](https://twitter.com/securitymb) of + Securitum. - Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source area, and (iii) switch back to WYSIWYG mode or (i) copy the specially crafted HTML code, prepared by the attacker and (ii) paste it into CKEditor in WYSIWYG mode. + Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to + source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source + area, and (iii) switch back to WYSIWYG mode or (i) copy the specially crafted HTML code, prepared by the attacker + and (ii) paste it into CKEditor in WYSIWYG mode. -* Fixed XSS vulnerability in the WebSpellChecker plugin reported by [Pham Van Khanh](https://twitter.com/rskvp93) from Viettel Cyber Security. +* Fixed XSS vulnerability in the WebSpellChecker plugin reported by [Pham Van Khanh](https://twitter.com/rskvp93) from + Viettel Cyber Security. - Issue summary: It was possible to execute XSS using CKEditor after persuading the victim to: (i) switch CKEditor to source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source area, then (iii) switch back to WYSIWYG mode, and (iv) preview CKEditor content outside CKEditor editable area. + Issue summary: It was possible to execute XSS using CKEditor after persuading the victim to: (i) switch CKEditor to + source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source + area, then (iii) switch back to WYSIWYG mode, and (iv) preview CKEditor content outside CKEditor editable area. **An upgrade is highly recommended!** New features: -* [#2374](https://github.com/ckeditor/ckeditor4/issues/2374): Added support for pasting rich content from LibreOffice Writer with the [Paste from LibreOffice](https://ckeditor.com/cke4/addon/pastefromlibreoffice) plugin. -* [#2583](https://github.com/ckeditor/ckeditor4/issues/2583): Changed [emoji](https://ckeditor.com/cke4/addon/emoji) suggestion box to show the matched emoji name instead of an ID. -* [#3748](https://github.com/ckeditor/ckeditor4/issues/3748): Improved the [color button](https://ckeditor.com/cke4/addon/colorbutton) state to reflect the selected editor content colors. -* [#3661](https://github.com/ckeditor/ckeditor4/issues/3661): Improved the [Print](https://ckeditor.com/cke4/addon/print) plugin to respect styling rendered by the [Preview](https://ckeditor.com/cke4/addon/preview) plugin. -* [#3547](https://github.com/ckeditor/ckeditor4/issues/3547): Active [dialog](https://ckeditor.com/cke4/addon/dialog) tab now has the `aria-selected="true"` attribute. -* [#3441](https://github.com/ckeditor/ckeditor4/issues/3441): Improved [`widget.getClipboardHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-getClipboardHtml) support for dragging and dropping multiple [widgets](https://ckeditor.com/cke4/addon/widget). +* [#2374](https://github.com/ckeditor/ckeditor4/issues/2374): Added support for pasting rich content from LibreOffice + Writer with the [Paste from LibreOffice](https://ckeditor.com/cke4/addon/pastefromlibreoffice) plugin. +* [#2583](https://github.com/ckeditor/ckeditor4/issues/2583): Changed [emoji](https://ckeditor.com/cke4/addon/emoji) + suggestion box to show the matched emoji name instead of an ID. +* [#3748](https://github.com/ckeditor/ckeditor4/issues/3748): Improved + the [color button](https://ckeditor.com/cke4/addon/colorbutton) state to reflect the selected editor content colors. +* [#3661](https://github.com/ckeditor/ckeditor4/issues/3661): Improved + the [Print](https://ckeditor.com/cke4/addon/print) plugin to respect styling rendered by + the [Preview](https://ckeditor.com/cke4/addon/preview) plugin. +* [#3547](https://github.com/ckeditor/ckeditor4/issues/3547): Active [dialog](https://ckeditor.com/cke4/addon/dialog) + tab now has the `aria-selected="true"` attribute. +* [#3441](https://github.com/ckeditor/ckeditor4/issues/3441): + Improved [`widget.getClipboardHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-getClipboardHtml) + support for dragging and dropping multiple [widgets](https://ckeditor.com/cke4/addon/widget). Fixed Issues: -* [#3587](https://github.com/ckeditor/ckeditor4/issues/3587): [Edge, IE] Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) with form input elements loses focus during typing. -* [#3705](https://github.com/ckeditor/ckeditor4/issues/3705): [Safari] Fixed: Safari incorrectly removes blocks with the [`editor.extractSelectedHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-extractSelectedHtml) method after selecting all content. -* [#1306](https://github.com/ckeditor/ckeditor4/issues/1306): Fixed: The [Font](https://ckeditor.com/cke4/addon/colorbutton) plugin creates nested HTML `` tags when reapplying the same font multiple times. -* [#3498](https://github.com/ckeditor/ckeditor4/issues/3498): Fixed: The editor throws an error during the copy operation when a [widget](https://ckeditor.com/cke4/addon/widget) is partially selected. -* [#2517](https://github.com/ckeditor/ckeditor4/issues/2517): [Chrome, Firefox, Safari] Fixed: Inserting a new image when the selection partially covers an existing [enhanced image](https://ckeditor.com/cke4/addon/image2) widget throws an error. -* [#3007](https://github.com/ckeditor/ckeditor4/issues/3007): [Chrome, Firefox, Safari] Fixed: Cannot modify the editor content once the selection is released over a [widget](https://ckeditor.com/cke4/addon/widget). -* [#3698](https://github.com/ckeditor/ckeditor4/issues/3698): Fixed: Cutting the selected text when a [widget](https://ckeditor.com/cke4/addon/widget) is partially selected merges paragraphs. +* [#3587](https://github.com/ckeditor/ckeditor4/issues/3587): [Edge, IE] + Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) with form input elements loses focus during typing. +* [#3705](https://github.com/ckeditor/ckeditor4/issues/3705): [Safari] Fixed: Safari incorrectly removes blocks with + the [`editor.extractSelectedHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-extractSelectedHtml) + method after selecting all content. +* [#1306](https://github.com/ckeditor/ckeditor4/issues/1306): Fixed: + The [Font](https://ckeditor.com/cke4/addon/colorbutton) plugin creates nested HTML `` tags when reapplying the + same font multiple times. +* [#3498](https://github.com/ckeditor/ckeditor4/issues/3498): Fixed: The editor throws an error during the copy + operation when a [widget](https://ckeditor.com/cke4/addon/widget) is partially selected. +* [#2517](https://github.com/ckeditor/ckeditor4/issues/2517): [Chrome, Firefox, Safari] Fixed: Inserting a new image + when the selection partially covers an existing [enhanced image](https://ckeditor.com/cke4/addon/image2) widget throws + an error. +* [#3007](https://github.com/ckeditor/ckeditor4/issues/3007): [Chrome, Firefox, Safari] Fixed: Cannot modify the editor + content once the selection is released over a [widget](https://ckeditor.com/cke4/addon/widget). +* [#3698](https://github.com/ckeditor/ckeditor4/issues/3698): Fixed: Cutting the selected text when + a [widget](https://ckeditor.com/cke4/addon/widget) is partially selected merges paragraphs. API Changes: -* [#3387](https://github.com/ckeditor/ckeditor4/issues/3387): Added the [CKEDITOR.ui.richCombo.select()](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_richCombo.html#method-select) method. -* [#3727](https://github.com/ckeditor/ckeditor4/issues/3727): Added new `textColor` and `bgColor` commands that apply the selected color chosen by the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin. -* [#3728](https://github.com/ckeditor/ckeditor4/issues/3728): Added new `font` and `fontSize` commands that apply the selected font style chosen by the [Font](https://ckeditor.com/cke4/addon/colorbutton) plugin. -* [#3842](https://github.com/ckeditor/ckeditor4/issues/3842): Added the [`editor.getSelectedRanges()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSelectedRanges) alias. -* [#3775](https://github.com/ckeditor/ckeditor4/issues/3775): Widget [mask](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#property-mask) and [parts](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#property-parts) can now be refreshed dynamically via API calls. +* [#3387](https://github.com/ckeditor/ckeditor4/issues/3387): Added + the [CKEDITOR.ui.richCombo.select()](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_richCombo.html#method-select) + method. +* [#3727](https://github.com/ckeditor/ckeditor4/issues/3727): Added new `textColor` and `bgColor` commands that apply + the selected color chosen by the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin. +* [#3728](https://github.com/ckeditor/ckeditor4/issues/3728): Added new `font` and `fontSize` commands that apply the + selected font style chosen by the [Font](https://ckeditor.com/cke4/addon/colorbutton) plugin. +* [#3842](https://github.com/ckeditor/ckeditor4/issues/3842): Added + the [`editor.getSelectedRanges()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getSelectedRanges) + alias. +* [#3775](https://github.com/ckeditor/ckeditor4/issues/3775): + Widget [mask](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#property-mask) + and [parts](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#property-parts) can now be + refreshed dynamically via API calls. ## CKEditor 4.13.1 Fixed Issues: -* [#875](https://github.com/ckeditor/ckeditor4/issues/875): Fixed: Pasting inside the editor that contains a table with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin after selecting all content replaces only the table element instead of the entire content. -* [#3415](https://github.com/ckeditor/ckeditor4/issues/3415): [Firefox] Fixed: Pasting individual list elements fails. Thanks to [Jack Wickham](https://github.com/jackwickham)! -* [#3413](https://github.com/ckeditor/ckeditor4/issues/3413): Fixed: Menu items with labels containing double quotes are rendered incorrectly. -* [#3475](https://github.com/ckeditor/ckeditor4/issues/3475): [Firefox] Fixed: Pasting plain text over existing content fails and throws an error. -* [#2027](https://github.com/ckeditor/ckeditor4/issues/2027): Fixed: Incorrect email display text after reopening the [Link](https://ckeditor.com/cke4/addon/link) dialog for display names starting with `@`. -* [#3544](https://github.com/ckeditor/ckeditor4/issues/3544): Fixed: The [Special Characters](https://ckeditor.com/cke4/addon/specialchar) dialog read incorrectly by screen readers due to empty table cells at the end. -* [#1653](https://github.com/ckeditor/ckeditor4/issues/1653): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) is not repositioned when the editor is scrolled with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) feature enabled. -* [#3559](https://github.com/ckeditor/ckeditor4/issues/3559): Fixed: [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) is incorrectly positioned when used with another dialog. -* [#3593](https://github.com/ckeditor/ckeditor4/issues/3593): Fixed: Cannot access a text or comment node when replacing an element node with them via [`CKEDITOR.htmlParser.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_htmlParser_filter.html). -* [#3524](https://github.com/ckeditor/ckeditor4/issues/3524): Fixed: The [Easy Image](https://ckeditor.com/cke4/addon/easyimage) plugin throws an error when any image with an unsupported data type is pasted into the editor. -* [#3552](https://github.com/ckeditor/ckeditor4/issues/3352): Fixed: Incorrect value of [`CKEDITOR.plugins.widget.repository#selected`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#property-selected) after selecting the whole editor content. -* [#3586](https://github.com/ckeditor/ckeditor4/issues/3586): Fixed: Content pasted from Microsoft Excel is not correctly recognised by the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#3585](https://github.com/ckeditor/ckeditor4/issues/3585): [Firefox] Fixed: Microsoft Excel content is pasted as an image. -* [#3625](https://github.com/ckeditor/ckeditor4/issues/3625): [Firefox] Fixed: Microsoft PowerPoint content is pasted as an image. -* [#3474](https://github.com/ckeditor/ckeditor4/issues/3474): Fixed: Incorrect focus order after any tab in a [dialog](https://ckeditor.com/cke4/addon/dialog) was clicked. -* [#3689](https://github.com/ckeditor/ckeditor4/issues/3689): Fixed: Cannot change [dialog](https://ckeditor.com/cke4/addon/dialog) tabs with keyboard arrow keys after focusing any tab with a mouse click. +* [#875](https://github.com/ckeditor/ckeditor4/issues/875): Fixed: Pasting inside the editor that contains a table with + the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin after selecting all content replaces only + the table element instead of the entire content. +* [#3415](https://github.com/ckeditor/ckeditor4/issues/3415): [Firefox] Fixed: Pasting individual list elements fails. + Thanks to [Jack Wickham](https://github.com/jackwickham)! +* [#3413](https://github.com/ckeditor/ckeditor4/issues/3413): Fixed: Menu items with labels containing double quotes are + rendered incorrectly. +* [#3475](https://github.com/ckeditor/ckeditor4/issues/3475): [Firefox] Fixed: Pasting plain text over existing content + fails and throws an error. +* [#2027](https://github.com/ckeditor/ckeditor4/issues/2027): Fixed: Incorrect email display text after reopening + the [Link](https://ckeditor.com/cke4/addon/link) dialog for display names starting with `@`. +* [#3544](https://github.com/ckeditor/ckeditor4/issues/3544): Fixed: + The [Special Characters](https://ckeditor.com/cke4/addon/specialchar) dialog read incorrectly by screen readers due to + empty table cells at the end. +* [#1653](https://github.com/ckeditor/ckeditor4/issues/1653): + Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) is not repositioned when the editor is + scrolled with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) feature enabled. +* [#3559](https://github.com/ckeditor/ckeditor4/issues/3559): + Fixed: [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) is incorrectly positioned when used with another + dialog. +* [#3593](https://github.com/ckeditor/ckeditor4/issues/3593): Fixed: Cannot access a text or comment node when replacing + an element node with them + via [`CKEDITOR.htmlParser.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_htmlParser_filter.html). +* [#3524](https://github.com/ckeditor/ckeditor4/issues/3524): Fixed: + The [Easy Image](https://ckeditor.com/cke4/addon/easyimage) plugin throws an error when any image with an unsupported + data type is pasted into the editor. +* [#3552](https://github.com/ckeditor/ckeditor4/issues/3352): Fixed: Incorrect value + of [`CKEDITOR.plugins.widget.repository#selected`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_repository.html#property-selected) + after selecting the whole editor content. +* [#3586](https://github.com/ckeditor/ckeditor4/issues/3586): Fixed: Content pasted from Microsoft Excel is not + correctly recognised by the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#3585](https://github.com/ckeditor/ckeditor4/issues/3585): [Firefox] Fixed: Microsoft Excel content is pasted as an + image. +* [#3625](https://github.com/ckeditor/ckeditor4/issues/3625): [Firefox] Fixed: Microsoft PowerPoint content is pasted as + an image. +* [#3474](https://github.com/ckeditor/ckeditor4/issues/3474): Fixed: Incorrect focus order after any tab in + a [dialog](https://ckeditor.com/cke4/addon/dialog) was clicked. +* [#3689](https://github.com/ckeditor/ckeditor4/issues/3689): Fixed: Cannot + change [dialog](https://ckeditor.com/cke4/addon/dialog) tabs with keyboard arrow keys after focusing any tab with a + mouse click. API Changes: -* [#3634](https://github.com/ckeditor/ckeditor4/issues/3634): Added the [`CKEDITOR.plugins.clipboard.dataTransfer#getTypes()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_clipboard_dataTransfer.html#method-getTypes) method. +* [#3634](https://github.com/ckeditor/ckeditor4/issues/3634): Added + the [`CKEDITOR.plugins.clipboard.dataTransfer#getTypes()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_clipboard_dataTransfer.html#method-getTypes) + method. ## CKEditor 4.13 New Features: * [#835](https://github.com/ckeditor/ckeditor4/issues/835): Extended support for pasting from external applications: - * Added support for pasting rich content from Google Docs with the [Paste from Google Docs](https://ckeditor.com/cke4/addon/pastefromgdocs) plugin. - * Added a new [Paste Tools](https://ckeditor.com/cke4/addon/pastetools) plugin for unified paste handling. -* [#3315](https://github.com/ckeditor/ckeditor4/issues/3315): Added support for strikethrough in the [BBCode](https://ckeditor.com/cke4/addon/bbcode) plugin. Thanks to [Alexander Kahl](https://github.com/akahl-owl)! -* [#3175](https://github.com/ckeditor/ckeditor4/issues/3175): Introduced selection optimization mechanism for handling incorrect selection behaviors in various browsers: - * [#3256](https://github.com/ckeditor/ckeditor4/issues/3256): Triple-clicking in the last table cell and deleting content no longer pulls the content below into the table. - * [#3118](https://github.com/ckeditor/ckeditor4/issues/3118): Selecting a paragraph with a triple-click and applying a heading applies the heading only to the selected paragraph. - * [#3161](https://github.com/ckeditor/ckeditor4/issues/3161): Double-clicking a `` element containing just one word creates a correct selection including the clicked `` only. -* [#3359](https://github.com/ckeditor/ckeditor4/issues/3359): Improved [dialog](https://ckeditor.com/cke4/addon/dialog) positioning and behavior when the dialog is resized or moved, or the browser window is resized. -* [#2227](https://github.com/ckeditor/ckeditor4/issues/2227): Added the [`config.linkDefaultProtocol`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-linkDefaultProtocol) configuration option that allows setting the default URL protocol for the [Link](https://ckeditor.com/cke4/addon/link) plugin dialog. -* [#3240](https://github.com/ckeditor/ckeditor4/issues/3240): Extended the [`CKEDITOR.plugins.widget#mask`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#property-mask) property to allow masking only the specified part of a [widget](https://ckeditor.com/cke4/addon/widget). -* [#3138](https://github.com/ckeditor/ckeditor4/issues/3138): Added the possibility to use the [`widgetDefinition.getClipboardHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-getClipboardHtml) method to customize the [widget](https://ckeditor.com/cke4/addon/widget) HTML during copy, cut and drag operations. + * Added support for pasting rich content from Google Docs with + the [Paste from Google Docs](https://ckeditor.com/cke4/addon/pastefromgdocs) plugin. + * Added a new [Paste Tools](https://ckeditor.com/cke4/addon/pastetools) plugin for unified paste handling. +* [#3315](https://github.com/ckeditor/ckeditor4/issues/3315): Added support for strikethrough in + the [BBCode](https://ckeditor.com/cke4/addon/bbcode) plugin. Thanks to [Alexander Kahl](https://github.com/akahl-owl)! +* [#3175](https://github.com/ckeditor/ckeditor4/issues/3175): Introduced selection optimization mechanism for handling + incorrect selection behaviors in various browsers: + * [#3256](https://github.com/ckeditor/ckeditor4/issues/3256): Triple-clicking in the last table cell and deleting + content no longer pulls the content below into the table. + * [#3118](https://github.com/ckeditor/ckeditor4/issues/3118): Selecting a paragraph with a triple-click and applying + a heading applies the heading only to the selected paragraph. + * [#3161](https://github.com/ckeditor/ckeditor4/issues/3161): Double-clicking a `` element containing just one + word creates a correct selection including the clicked `` only. +* [#3359](https://github.com/ckeditor/ckeditor4/issues/3359): Improved [dialog](https://ckeditor.com/cke4/addon/dialog) + positioning and behavior when the dialog is resized or moved, or the browser window is resized. +* [#2227](https://github.com/ckeditor/ckeditor4/issues/2227): Added + the [`config.linkDefaultProtocol`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-linkDefaultProtocol) + configuration option that allows setting the default URL protocol for the [Link](https://ckeditor.com/cke4/addon/link) + plugin dialog. +* [#3240](https://github.com/ckeditor/ckeditor4/issues/3240): Extended + the [`CKEDITOR.plugins.widget#mask`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#property-mask) + property to allow masking only the specified part of a [widget](https://ckeditor.com/cke4/addon/widget). +* [#3138](https://github.com/ckeditor/ckeditor4/issues/3138): Added the possibility to use + the [`widgetDefinition.getClipboardHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#method-getClipboardHtml) + method to customize the [widget](https://ckeditor.com/cke4/addon/widget) HTML during copy, cut and drag operations. Fixed Issues: -* [#808](https://github.com/ckeditor/ckeditor4/issues/808): Fixed: [Widgets](https://ckeditor.com/cke4/addon/widget) and other content disappear on drag and drop in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). -* [#3260](https://github.com/ckeditor/ckeditor4/issues/3260): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) drag handler is visible in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). -* [#3261](https://github.com/ckeditor/ckeditor4/issues/3261): Fixed: A [widget](https://ckeditor.com/cke4/addon/widget) initialized using the dialog has an incorrect owner document. -* [#3198](https://github.com/ckeditor/ckeditor4/issues/3198): Fixed: Blurring and focusing the editor when a [widget](https://ckeditor.com/cke4/addon/widget) is focused creates an additional undo step. -* [#2859](https://github.com/ckeditor/ckeditor4/pull/2859): [IE, Edge] Fixed: Various editor UI elements react to right mouse button click: - * [#2845](https://github.com/ckeditor/ckeditor4/issues/2845): [Rich Combo](https://ckeditor.com/cke4/addon/richcombo). - * [#2857](https://github.com/ckeditor/ckeditor4/issues/2857): [List Block](https://ckeditor.com/cke4/addon/listblock). - * [#2858](https://github.com/ckeditor/ckeditor4/issues/2858): [Menu](https://ckeditor.com/cke4/addon/menu). -* [#3158](https://github.com/ckeditor/ckeditor4/issues/3158): [Chrome, Safari] Fixed: [Undo](https://ckeditor.com/cke4/addon/undo) plugin breaks with the filling character. -* [#504](https://github.com/ckeditor/ckeditor4/issues/504): [Edge] Fixed: The editor's selection is collapsed to the beginning of the content when focusing the editor for the first time. -* [#3101](https://github.com/ckeditor/ckeditor4/issues/3101): Fixed: [`CKEDITOR.dom.range#_getTableElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-_getTableElement) returns `null` instead of a table element for edge cases. -* [#3287](https://github.com/ckeditor/ckeditor4/issues/3287): Fixed: [`CKEDITOR.tools.promise`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_promise.html) initializes incorrectly if an AMD loader is present. -* [#3379](https://github.com/ckeditor/ckeditor4/issues/3379): Fixed: Incorrect [`CKEDITOR.editor#getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getData) call when inserting content into the editor. -* [#941](https://github.com/ckeditor/ckeditor4/issues/941): Fixed: An error is thrown after styling a table cell text selected using the native selection when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is enabled. -* [#3136](https://github.com/ckeditor/ckeditor4/issues/3136): [Firefox] Fixed: Clicking [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) items removes the native table selection. -* [#3381](https://github.com/ckeditor/ckeditor4/issues/3381): [IE8] Fixed: The [`CKEDITOR.tools.object.keys()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-keys) method does not accept non-objects. -* [#2395](https://github.com/ckeditor/ckeditor4/issues/2395): [Android] Fixed: Focused input in a [dialog](https://ckeditor.com/cke4/addon/dialog) is scrolled out of the viewport when the soft keyboard appears. -* [#453](https://github.com/ckeditor/ckeditor4/issues/453): Fixed: [Link](https://ckeditor.com/cke4/addon/link) dialog has an invalid width when the editor is maximized and the browser window is resized. -* [#2138](https://github.com/ckeditor/ckeditor4/issues/2138): Fixed: An email address containing a question mark is mishandled by the [Link](https://ckeditor.com/cke4/addon/link) plugin. -* [#14613](https://dev.ckeditor.com/ticket/14613): Fixed: Race condition when loading plugins for an already destroyed editor instance throws an error. -* [#2257](https://github.com/ckeditor/ckeditor4/issues/2257): Fixed: The editor throws an exception when destroyed shortly after it was created. -* [#3115](https://github.com/ckeditor/ckeditor4/issues/3115): Fixed: Destroying the editor during the initialization throws an error. +* [#808](https://github.com/ckeditor/ckeditor4/issues/808): Fixed: [Widgets](https://ckeditor.com/cke4/addon/widget) and + other content disappear on drag and drop + in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). +* [#3260](https://github.com/ckeditor/ckeditor4/issues/3260): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) + drag handler is visible in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). +* [#3261](https://github.com/ckeditor/ckeditor4/issues/3261): Fixed: A [widget](https://ckeditor.com/cke4/addon/widget) + initialized using the dialog has an incorrect owner document. +* [#3198](https://github.com/ckeditor/ckeditor4/issues/3198): Fixed: Blurring and focusing the editor when + a [widget](https://ckeditor.com/cke4/addon/widget) is focused creates an additional undo step. +* [#2859](https://github.com/ckeditor/ckeditor4/pull/2859): [IE, Edge] Fixed: Various editor UI elements react to right + mouse button click: + * [#2845](https://github.com/ckeditor/ckeditor4/issues/2845): [Rich Combo](https://ckeditor.com/cke4/addon/richcombo). + * [#2857](https://github.com/ckeditor/ckeditor4/issues/2857): [List Block](https://ckeditor.com/cke4/addon/listblock). + * [#2858](https://github.com/ckeditor/ckeditor4/issues/2858): [Menu](https://ckeditor.com/cke4/addon/menu). +* [#3158](https://github.com/ckeditor/ckeditor4/issues/3158): [Chrome, Safari] + Fixed: [Undo](https://ckeditor.com/cke4/addon/undo) plugin breaks with the filling character. +* [#504](https://github.com/ckeditor/ckeditor4/issues/504): [Edge] Fixed: The editor's selection is collapsed to the + beginning of the content when focusing the editor for the first time. +* [#3101](https://github.com/ckeditor/ckeditor4/issues/3101): + Fixed: [`CKEDITOR.dom.range#_getTableElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-_getTableElement) + returns `null` instead of a table element for edge cases. +* [#3287](https://github.com/ckeditor/ckeditor4/issues/3287): + Fixed: [`CKEDITOR.tools.promise`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_promise.html) + initializes incorrectly if an AMD loader is present. +* [#3379](https://github.com/ckeditor/ckeditor4/issues/3379): Fixed: + Incorrect [`CKEDITOR.editor#getData()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getData) + call when inserting content into the editor. +* [#941](https://github.com/ckeditor/ckeditor4/issues/941): Fixed: An error is thrown after styling a table cell text + selected using the native selection when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin + is enabled. +* [#3136](https://github.com/ckeditor/ckeditor4/issues/3136): [Firefox] Fixed: + Clicking [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) items removes the native table selection. +* [#3381](https://github.com/ckeditor/ckeditor4/issues/3381): [IE8] Fixed: + The [`CKEDITOR.tools.object.keys()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-keys) + method does not accept non-objects. +* [#2395](https://github.com/ckeditor/ckeditor4/issues/2395): [Android] Fixed: Focused input in + a [dialog](https://ckeditor.com/cke4/addon/dialog) is scrolled out of the viewport when the soft keyboard appears. +* [#453](https://github.com/ckeditor/ckeditor4/issues/453): Fixed: [Link](https://ckeditor.com/cke4/addon/link) dialog + has an invalid width when the editor is maximized and the browser window is resized. +* [#2138](https://github.com/ckeditor/ckeditor4/issues/2138): Fixed: An email address containing a question mark is + mishandled by the [Link](https://ckeditor.com/cke4/addon/link) plugin. +* [#14613](https://dev.ckeditor.com/ticket/14613): Fixed: Race condition when loading plugins for an already destroyed + editor instance throws an error. +* [#2257](https://github.com/ckeditor/ckeditor4/issues/2257): Fixed: The editor throws an exception when destroyed + shortly after it was created. +* [#3115](https://github.com/ckeditor/ckeditor4/issues/3115): Fixed: Destroying the editor during the initialization + throws an error. * [#3354](https://github.com/ckeditor/ckeditor4/issues/3354): [iOS] Fixed: Pasting no longer works on iOS version 13. -* [#3423](https://github.com/ckeditor/ckeditor4/issues/3423) Fixed: [Bookmarks](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-createBookmark) can be created inside temporary elements. +* [#3423](https://github.com/ckeditor/ckeditor4/issues/3423) + Fixed: [Bookmarks](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-createBookmark) can + be created inside temporary elements. API Changes: -* [#3154](https://github.com/ckeditor/ckeditor4/issues/3154): Added the [`CKEDITOR.tools.array.some()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_array.html#method-some) method. -* [#3245](https://github.com/ckeditor/ckeditor4/issues/3245): Added the [`CKEDITOR.plugins.undo.UndoManager.addFilterRule()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_undo_UndoManager.html#method-addFilterRule) method that allows filtering undo snapshot contents. -* [#2845](https://github.com/ckeditor/ckeditor4/issues/2845): Added the [`CKEDITOR.tools.normalizeMouseButton()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-normalizeMouseButton) method. -* [#2975](https://github.com/ckeditor/ckeditor4/issues/2975): Added the [`CKEDITOR.dom.element#fireEventHandler()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-fireEventHandler) method. -* [#3247](https://github.com/ckeditor/ckeditor4/issues/3247): Extended the [`CKEDITOR.tools.bind()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-bind) method to accept arguments for bound functions. -* [#3326](https://github.com/ckeditor/ckeditor4/issues/3326): Added the [`CKEDITOR.dom.text#isEmpty()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_text.html#method-isEmpty) method. -* [#2423](https://github.com/ckeditor/ckeditor4/issues/2423): Added the [`CKEDITOR.plugins.dialog.getModel()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog.html#method-getModel) and [`CKEDITOR.plugins.dialog.getMode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog.html#method-getMode) methods with their [`CKEDITOR.plugin.definition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog_definition.html) counterparts, allowing to get the dialog subject of a change. -* [#3124](https://github.com/ckeditor/ckeditor4/issues/3124): Added the [`CKEDITOR.dom.element#isDetached()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-isDetached) method. +* [#3154](https://github.com/ckeditor/ckeditor4/issues/3154): Added + the [`CKEDITOR.tools.array.some()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_array.html#method-some) + method. +* [#3245](https://github.com/ckeditor/ckeditor4/issues/3245): Added + the [`CKEDITOR.plugins.undo.UndoManager.addFilterRule()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_undo_UndoManager.html#method-addFilterRule) + method that allows filtering undo snapshot contents. +* [#2845](https://github.com/ckeditor/ckeditor4/issues/2845): Added + the [`CKEDITOR.tools.normalizeMouseButton()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-normalizeMouseButton) + method. +* [#2975](https://github.com/ckeditor/ckeditor4/issues/2975): Added + the [`CKEDITOR.dom.element#fireEventHandler()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-fireEventHandler) + method. +* [#3247](https://github.com/ckeditor/ckeditor4/issues/3247): Extended + the [`CKEDITOR.tools.bind()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-bind) method + to accept arguments for bound functions. +* [#3326](https://github.com/ckeditor/ckeditor4/issues/3326): Added + the [`CKEDITOR.dom.text#isEmpty()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_text.html#method-isEmpty) + method. +* [#2423](https://github.com/ckeditor/ckeditor4/issues/2423): Added + the [`CKEDITOR.plugins.dialog.getModel()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog.html#method-getModel) + and [`CKEDITOR.plugins.dialog.getMode()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog.html#method-getMode) + methods with + their [`CKEDITOR.plugin.definition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog_definition.html) + counterparts, allowing to get the dialog subject of a change. +* [#3124](https://github.com/ckeditor/ckeditor4/issues/3124): Added + the [`CKEDITOR.dom.element#isDetached()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-isDetached) + method. ## CKEditor 4.12.1 Fixed Issues: -* [#3220](https://github.com/ckeditor/ckeditor4/issues/3220): Fixed: Prevent [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) filter from deleting [Page Break](https://ckeditor.com/cke4/addon/pagebreak) elements on paste. +* [#3220](https://github.com/ckeditor/ckeditor4/issues/3220): Fixed: + Prevent [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) filter from + deleting [Page Break](https://ckeditor.com/cke4/addon/pagebreak) elements on paste. ## CKEditor 4.12 New Features: -* [#2598](https://github.com/ckeditor/ckeditor4/issues/2598): Added the [Page Break](https://ckeditor.com/cke4/addon/pagebreak) feature support for the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#1490](https://github.com/ckeditor/ckeditor4/issues/1490): Improved the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin to retain table cell borders. -* [#2870](https://github.com/ckeditor/ckeditor4/issues/2870): Improved support for preserving the indentation of list items for nested lists pasted with the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#2048](https://github.com/ckeditor/ckeditor4/issues/2048): New [`CKEDITOR.config.image2_maxSize`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_maxSize) configuration option for the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin that allows setting a maximum size that an image can be resized to with the resizer. -* [#2639](https://github.com/ckeditor/ckeditor4/issues/2639): The [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) plugin now shows the current selection's color when opened. -* [#2084](https://github.com/ckeditor/ckeditor4/issues/2084): The [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin now allows to change the cell height unit type to either pixels or percent. -* [#3164](https://github.com/ckeditor/ckeditor4/issues/3164): The [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin now accepts floating point values as the table cell width and height. +* [#2598](https://github.com/ckeditor/ckeditor4/issues/2598): Added + the [Page Break](https://ckeditor.com/cke4/addon/pagebreak) feature support for + the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#1490](https://github.com/ckeditor/ckeditor4/issues/1490): Improved + the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin to retain table cell borders. +* [#2870](https://github.com/ckeditor/ckeditor4/issues/2870): Improved support for preserving the indentation of list + items for nested lists pasted with the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#2048](https://github.com/ckeditor/ckeditor4/issues/2048): + New [`CKEDITOR.config.image2_maxSize`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-image2_maxSize) + configuration option for the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin that allows setting a + maximum size that an image can be resized to with the resizer. +* [#2639](https://github.com/ckeditor/ckeditor4/issues/2639): + The [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) plugin now shows the current selection's color when + opened. +* [#2084](https://github.com/ckeditor/ckeditor4/issues/2084): + The [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin now allows to change the cell height unit type to + either pixels or percent. +* [#3164](https://github.com/ckeditor/ckeditor4/issues/3164): + The [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin now accepts floating point values as the table + cell width and height. Fixed Issues: -* [#2672](https://github.com/ckeditor/ckeditor4/issues/2672): Fixed: When resizing an [Enhanced Image](https://ckeditor.com/cke4/addon/image2) to a minimum size with the resizer, the image dialog does not show actual values. -* [#1478](https://github.com/ckeditor/ckeditor4/issues/1478): Fixed: Custom colors added to [Color Button](https://ckeditor.com/cke4/addon/colorbutton) with the [`config.colorButton_colors`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-colorButton_colors) configuration option in the form of a label or code do not work correctly. -* [#1469](https://github.com/ckeditor/ckeditor4/issues/1469): Fixed: Trying to get data from a nested editable inside a freshly pasted widget throws an error. -* [#2235](https://github.com/ckeditor/ckeditor4/issues/2235): Fixed: An [Image](https://ckeditor.com/cke4/addon/image) in a table cell has an empty URL field when edited from the context menu opened by right-click when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is in use. -* [#3098](https://github.com/ckeditor/ckeditor4/issues/3098): Fixed: Unit pickers for table cell width and height in the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin have a different width. -* [#2923](https://github.com/ckeditor/ckeditor4/issues/2923): Fixed: The CSS `windowtext` color is not correctly recognized by the [`CKEDITOR.tools.style.parse`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_parse.html) methods. -* [#3120](https://github.com/ckeditor/ckeditor4/issues/3120): [IE8] Fixed: The [`CKEDITOR.tools.extend()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tool.html#method-extend) method does not work with the [`DontEnum`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Properties) object property attribute. -* [#2813](https://github.com/ckeditor/ckeditor4/issues/2813): Fixed: Editor HTML insertion methods ([`editor.insertHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertHtml), [`editor.insertHtmlIntoRange()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertHtmlIntoRange), [`editor.insertElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertElement) and [`editor.insertElementIntoRange()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertElementIntoRange)) pollute the editable with empty `` elements. -* [#2751](https://github.com/ckeditor/ckeditor4/issues/2751): Fixed: An editor with [`config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) set to [`ENTER_DIV`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#property-ENTER_DIV) alters pasted content. +* [#2672](https://github.com/ckeditor/ckeditor4/issues/2672): Fixed: When resizing + an [Enhanced Image](https://ckeditor.com/cke4/addon/image2) to a minimum size with the resizer, the image dialog does + not show actual values. +* [#1478](https://github.com/ckeditor/ckeditor4/issues/1478): Fixed: Custom colors added + to [Color Button](https://ckeditor.com/cke4/addon/colorbutton) with + the [`config.colorButton_colors`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-colorButton_colors) + configuration option in the form of a label or code do not work correctly. +* [#1469](https://github.com/ckeditor/ckeditor4/issues/1469): Fixed: Trying to get data from a nested editable inside a + freshly pasted widget throws an error. +* [#2235](https://github.com/ckeditor/ckeditor4/issues/2235): Fixed: An [Image](https://ckeditor.com/cke4/addon/image) + in a table cell has an empty URL field when edited from the context menu opened by right-click when + the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is in use. +* [#3098](https://github.com/ckeditor/ckeditor4/issues/3098): Fixed: Unit pickers for table cell width and height in + the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin have a different width. +* [#2923](https://github.com/ckeditor/ckeditor4/issues/2923): Fixed: The CSS `windowtext` color is not correctly + recognized by + the [`CKEDITOR.tools.style.parse`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_parse.html) + methods. +* [#3120](https://github.com/ckeditor/ckeditor4/issues/3120): [IE8] Fixed: + The [`CKEDITOR.tools.extend()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tool.html#method-extend) + method does not work with + the [`DontEnum`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Data_structures#Properties) object property + attribute. +* [#2813](https://github.com/ckeditor/ckeditor4/issues/2813): Fixed: Editor HTML insertion + methods ([`editor.insertHtml()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertHtml), [`editor.insertHtmlIntoRange()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertHtmlIntoRange), [`editor.insertElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertElement) + and [`editor.insertElementIntoRange()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-insertElementIntoRange)) + pollute the editable with empty `` elements. +* [#2751](https://github.com/ckeditor/ckeditor4/issues/2751): Fixed: An editor + with [`config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) set + to [`ENTER_DIV`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#property-ENTER_DIV) alters pasted + content. API Changes: -* [#1496](https://github.com/ckeditor/ckeditor4/issues/1496): The [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) plugin exposes the [`CKEDITOR.ui.balloonToolbar.reposition()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_balloonToolbar.html#reposition) and [`CKEDITOR.ui.balloonToolbarView.reposition()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_balloonToolbarView.html#reposition) methods. -* [#2021](https://github.com/ckeditor/ckeditor4/issues/2021): Added new [`CKEDITOR.dom.documentFragment.find()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_documentFragment.html#method-find) and [`CKEDITOR.dom.documentFragment.findOne()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_documentFragment.html#method-findOne) methods. -* [#2700](https://github.com/ckeditor/ckeditor4/issues/2700): Added the [`CKEDITOR.tools.array.find()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_array.html#method-find) method. -* [#3123](https://github.com/ckeditor/ckeditor4/issues/3123): Added the [`CKEDITOR.tools.object.keys()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-keys) method. -* [#3123](https://github.com/ckeditor/ckeditor4/issues/3123): Added the [`CKEDITOR.tools.object.entries()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-entries) method. -* [#3123](https://github.com/ckeditor/ckeditor4/issues/3123): Added the [`CKEDITOR.tools.object.values()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-values) method. -* [#2821](https://github.com/ckeditor/ckeditor4/issues/2821): The [`CKEDITOR.template#source`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_template.html#property-source) property can now be a function, so it can return the changed template values during the runtime. Thanks to [Jacek Pulit](https://github.com/jacek-pulit)! -* [#2598](https://github.com/ckeditor/ckeditor4/issues/2598): Added the [`CKEDITOR.plugins.pagebreak.createElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_pagebreak.html#method-createElement) method allowing to create a [Page Break](https://ckeditor.com/cke4/addon/pagebreak) plugin [`CKEDITOR.dom.element`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html) instance. -* [#2748](https://github.com/ckeditor/ckeditor4/issues/2748): Enhanced error messages thrown when creating an editor on a non-existent element or when trying to instantiate the second editor on the same element. Thanks to [Byran Zaugg](https://github.com/blzaugg)! -* [#2698](https://github.com/ckeditor/ckeditor4/issues/2698): Added the [`CKEDITOR.htmlParser.element.findOne()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_htmlParser_element.html#method-findOne) method. -* [#2935](https://github.com/ckeditor/ckeditor4/issues/2935): Introduced the [`CKEDITOR.config.pasteFromWord_keepZeroMargins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWord_keepZeroMargins) configuration option that allows for keeping any `margin-*: 0` style that would be otherwise removed when pasting content with the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#2962](https://github.com/ckeditor/ckeditor4/issues/2962): Added the [`CKEDITOR.tools.promise`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_promise.html) class. -* [#2924](https://github.com/ckeditor/ckeditor4/issues/2924): Added the [`CKEDITOR.tools.style.border`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html) object wrapping CSS border style helpers under a single type. -* [#2495](https://github.com/ckeditor/ckeditor4/issues/2495): The [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin can now be disabled for the given table with the `data-cke-tableselection-ignored` attribute. -* [#2692](https://github.com/ckeditor/ckeditor4/issues/2692): Plugins can now expose information about the supported environment by implementing the [`pluginDefinition.isSupportedEnvironment()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#method-isSupportedEnvironment) method. +* [#1496](https://github.com/ckeditor/ckeditor4/issues/1496): + The [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) plugin exposes + the [`CKEDITOR.ui.balloonToolbar.reposition()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_balloonToolbar.html#reposition) + and [`CKEDITOR.ui.balloonToolbarView.reposition()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_balloonToolbarView.html#reposition) + methods. +* [#2021](https://github.com/ckeditor/ckeditor4/issues/2021): Added + new [`CKEDITOR.dom.documentFragment.find()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_documentFragment.html#method-find) + and [`CKEDITOR.dom.documentFragment.findOne()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_documentFragment.html#method-findOne) + methods. +* [#2700](https://github.com/ckeditor/ckeditor4/issues/2700): Added + the [`CKEDITOR.tools.array.find()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_array.html#method-find) + method. +* [#3123](https://github.com/ckeditor/ckeditor4/issues/3123): Added + the [`CKEDITOR.tools.object.keys()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-keys) + method. +* [#3123](https://github.com/ckeditor/ckeditor4/issues/3123): Added + the [`CKEDITOR.tools.object.entries()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-entries) + method. +* [#3123](https://github.com/ckeditor/ckeditor4/issues/3123): Added + the [`CKEDITOR.tools.object.values()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-values) + method. +* [#2821](https://github.com/ckeditor/ckeditor4/issues/2821): + The [`CKEDITOR.template#source`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_template.html#property-source) + property can now be a function, so it can return the changed template values during the runtime. Thanks + to [Jacek Pulit](https://github.com/jacek-pulit)! +* [#2598](https://github.com/ckeditor/ckeditor4/issues/2598): Added + the [`CKEDITOR.plugins.pagebreak.createElement()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_pagebreak.html#method-createElement) + method allowing to create a [Page Break](https://ckeditor.com/cke4/addon/pagebreak) + plugin [`CKEDITOR.dom.element`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html) instance. +* [#2748](https://github.com/ckeditor/ckeditor4/issues/2748): Enhanced error messages thrown when creating an editor on + a non-existent element or when trying to instantiate the second editor on the same element. Thanks + to [Byran Zaugg](https://github.com/blzaugg)! +* [#2698](https://github.com/ckeditor/ckeditor4/issues/2698): Added + the [`CKEDITOR.htmlParser.element.findOne()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_htmlParser_element.html#method-findOne) + method. +* [#2935](https://github.com/ckeditor/ckeditor4/issues/2935): Introduced + the [`CKEDITOR.config.pasteFromWord_keepZeroMargins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-pasteFromWord_keepZeroMargins) + configuration option that allows for keeping any `margin-*: 0` style that would be otherwise removed when pasting + content with the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#2962](https://github.com/ckeditor/ckeditor4/issues/2962): Added + the [`CKEDITOR.tools.promise`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_promise.html) class. +* [#2924](https://github.com/ckeditor/ckeditor4/issues/2924): Added + the [`CKEDITOR.tools.style.border`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html) + object wrapping CSS border style helpers under a single type. +* [#2495](https://github.com/ckeditor/ckeditor4/issues/2495): + The [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin can now be disabled for the given table + with the `data-cke-tableselection-ignored` attribute. +* [#2692](https://github.com/ckeditor/ckeditor4/issues/2692): Plugins can now expose information about the supported + environment by implementing + the [`pluginDefinition.isSupportedEnvironment()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#method-isSupportedEnvironment) + method. Other Changes: -* [#2741](https://github.com/ckeditor/ckeditor4/issues/2741): Replaced deprecated `arguments.callee` calls with named function expressions to allow the editor to work in strict mode. -* [#2924](https://github.com/ckeditor/ckeditor4/issues/2924): Marked [`CKEDITOR.tools.style.parse.border()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_parse.html#method-border) as deprecated in favor of the [`CKEDITOR.tools.style.border.fromCssRule()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html#static-method-fromCssRule) method. -* [#3132](https://github.com/ckeditor/ckeditor4/issues/2924): Marked [`CKEDITOR.tools.objectKeys()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-objectKeys) as deprecated in favor of the [`CKEDITOR.tools.object.keys()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-keys) method. +* [#2741](https://github.com/ckeditor/ckeditor4/issues/2741): Replaced deprecated `arguments.callee` calls with named + function expressions to allow the editor to work in strict mode. +* [#2924](https://github.com/ckeditor/ckeditor4/issues/2924): + Marked [`CKEDITOR.tools.style.parse.border()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_parse.html#method-border) + as deprecated in favor of + the [`CKEDITOR.tools.style.border.fromCssRule()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_border.html#static-method-fromCssRule) + method. +* [#3132](https://github.com/ckeditor/ckeditor4/issues/2924): + Marked [`CKEDITOR.tools.objectKeys()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-objectKeys) + as deprecated in favor of + the [`CKEDITOR.tools.object.keys()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-keys) + method. ## CKEditor 4.11.4 Fixed Issues: -* [#589](https://github.com/ckeditor/ckeditor4/issues/589): Fixed: The editor causes memory leaks in create and destroy cycles. -* [#1397](https://github.com/ckeditor/ckeditor4/issues/1397): Fixed: Using the dialog to remove headers from a [table](https://ckeditor.com/cke4/addon/table) with one header row only throws an error. -* [#1479](https://github.com/ckeditor/ckeditor4/issues/1479): Fixed: [Justification](https://ckeditor.com/cke4/addon/justify) for styled content in BR mode is disabled. -* [#2816](https://github.com/ckeditor/ckeditor4/issues/2816): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) resize handler is visible in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). -* [#2874](https://github.com/ckeditor/ckeditor4/issues/2874): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) resize handler is not created when the editor is initialized in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). -* [#2775](https://github.com/ckeditor/ckeditor4/issues/2775): Fixed: [Clipboard](https://ckeditor.com/cke4/addon/clipboard) paste buttons have wrong state when [read-only](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html) mode is set by the mouse event listener with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin. -* [#1901](https://github.com/ckeditor/ckeditor4/issues/1901): Fixed: Cannot open the context menu over a [Widget](https://ckeditor.com/cke4/addon/widget) with the Shift+F10 keyboard shortcut. +* [#589](https://github.com/ckeditor/ckeditor4/issues/589): Fixed: The editor causes memory leaks in create and destroy + cycles. +* [#1397](https://github.com/ckeditor/ckeditor4/issues/1397): Fixed: Using the dialog to remove headers from + a [table](https://ckeditor.com/cke4/addon/table) with one header row only throws an error. +* [#1479](https://github.com/ckeditor/ckeditor4/issues/1479): + Fixed: [Justification](https://ckeditor.com/cke4/addon/justify) for styled content in BR mode is disabled. +* [#2816](https://github.com/ckeditor/ckeditor4/issues/2816): + Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) resize handler is visible + in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). +* [#2874](https://github.com/ckeditor/ckeditor4/issues/2874): + Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) resize handler is not created when the editor is + initialized in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). +* [#2775](https://github.com/ckeditor/ckeditor4/issues/2775): + Fixed: [Clipboard](https://ckeditor.com/cke4/addon/clipboard) paste buttons have wrong state + when [read-only](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html) mode is set by the mouse event + listener with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin. +* [#1901](https://github.com/ckeditor/ckeditor4/issues/1901): Fixed: Cannot open the context menu over + a [Widget](https://ckeditor.com/cke4/addon/widget) with the Shift+F10 keyboard shortcut. Other Changes: -* Updated [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) and [SpellCheckAsYouType](https://ckeditor.com/cke4/addon/scayt) (SCAYT) plugins: - * Language dictionary update: German language was extended with over 600k new words. - * Language dictionary update: Swedish language was extended with over 300k new words. - * Grammar support added for Australian and New Zealand English, Polish, Slovak, Slovenian and Austrian languages. - * Changed wavy red and green lines that underline spelling and grammar errors to straight ones. - * [#55](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/55): Fixed: WSC does not use [`CKEDITOR.getUrl()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getUrl) when referencing style sheets. - * [#166](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/166): Fixed: SCAYT does not use [`CKEDITOR.getUrl()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getUrl) when referencing style sheets. - * [#56](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/56): [Chrome] Fixed: SCAYT/WSC throws errors when running inside a Chrome extension. - * Fixed: After removing a dictionary, the words are not underlined and considered as incorrect. - * Fixed: The Slovenian (`sl_SL`) language does not work. - * Fixed: Quotes with code `U+2019` (Right single quotation mark) are considered separators. - * Fixed: Wrong error message formatting when the service ID is invalid. - * Fixed: Absent languages in the Languages tab when using SCAYT with the [Shared Spaces](https://ckeditor.com/cke4/addon/sharedspace) plugin. +* Updated [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) + and [SpellCheckAsYouType](https://ckeditor.com/cke4/addon/scayt) (SCAYT) plugins: + * Language dictionary update: German language was extended with over 600k new words. + * Language dictionary update: Swedish language was extended with over 300k new words. + * Grammar support added for Australian and New Zealand English, Polish, Slovak, Slovenian and Austrian languages. + * Changed wavy red and green lines that underline spelling and grammar errors to straight ones. + * [#55](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/55): Fixed: WSC does not + use [`CKEDITOR.getUrl()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getUrl) when + referencing style sheets. + * [#166](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/166): Fixed: SCAYT does not + use [`CKEDITOR.getUrl()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getUrl) when + referencing style sheets. + * [#56](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/56): [Chrome] Fixed: SCAYT/WSC throws errors + when running inside a Chrome extension. + * Fixed: After removing a dictionary, the words are not underlined and considered as incorrect. + * Fixed: The Slovenian (`sl_SL`) language does not work. + * Fixed: Quotes with code `U+2019` (Right single quotation mark) are considered separators. + * Fixed: Wrong error message formatting when the service ID is invalid. + * Fixed: Absent languages in the Languages tab when using SCAYT with + the [Shared Spaces](https://ckeditor.com/cke4/addon/sharedspace) plugin. ## CKEditor 4.11.3 Fixed Issues: -* [#2721](https://github.com/ckeditor/ckeditor4/issues/2721), [#487](https://github.com/ckeditor/ckeditor4/issues/487): Fixed: The order of sublist items is reversed when a higher level list item is removed. -* [#2527](https://github.com/ckeditor/ckeditor4/issues/2527): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) autocomplete order does not prioritize emojis with the name starting from the used string. -* [#2572](https://github.com/ckeditor/ckeditor4/issues/2572): Fixed: Icons in the [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown navigation groups are not centered. -* [#1191](https://github.com/ckeditor/ckeditor4/issues/1191): Fixed: Items in the [elements path](https://ckeditor.com/cke4/addon/elementspath) are draggable. -* [#2292](https://github.com/ckeditor/ckeditor4/issues/2292): Fixed: Dropping a list with a link on the editor's margin causes a console error and removes the dragged text from editor. -* [#2756](https://github.com/ckeditor/ckeditor4/issues/2756): Fixed: The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin causes an error when typing in the [source editing mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_sourcearea.html). -* [#1986](https://github.com/ckeditor/ckeditor4/issues/1986): Fixed: The Cell Properties dialog from the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin shows styles that are not allowed through [`config.allowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-allowedContent). -* [#2565](https://github.com/ckeditor/ckeditor4/issues/2565): [IE, Edge] Fixed: Buttons in the [editor toolbar](https://ckeditor.com/cke4/addon/toolbar) are activated by clicking them with the right mouse button. -* [#2792](https://github.com/ckeditor/ckeditor4/pull/2792): Fixed: A bug in the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin that caused the following issues: - * [#2780](https://github.com/ckeditor/ckeditor4/issues/2780): Fixed: Undo steps disappear after multiple changes of selection. - * [#2470](https://github.com/ckeditor/ckeditor4/issues/2470): [Firefox] Fixed: Widget's nested editable gets blurred upon focus. - * [#2655](https://github.com/ckeditor/ckeditor4/issues/2655): [Chrome, Safari] Fixed: Widget's nested editable cannot be focused under certain circumstances. +* [#2721](https://github.com/ckeditor/ckeditor4/issues/2721), [#487](https://github.com/ckeditor/ckeditor4/issues/487): + Fixed: The order of sublist items is reversed when a higher level list item is removed. +* [#2527](https://github.com/ckeditor/ckeditor4/issues/2527): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) + autocomplete order does not prioritize emojis with the name starting from the used string. +* [#2572](https://github.com/ckeditor/ckeditor4/issues/2572): Fixed: Icons in + the [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown navigation groups are not centered. +* [#1191](https://github.com/ckeditor/ckeditor4/issues/1191): Fixed: Items in + the [elements path](https://ckeditor.com/cke4/addon/elementspath) are draggable. +* [#2292](https://github.com/ckeditor/ckeditor4/issues/2292): Fixed: Dropping a list with a link on the editor's margin + causes a console error and removes the dragged text from editor. +* [#2756](https://github.com/ckeditor/ckeditor4/issues/2756): Fixed: + The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin causes an error when typing in + the [source editing mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_sourcearea.html). +* [#1986](https://github.com/ckeditor/ckeditor4/issues/1986): Fixed: The Cell Properties dialog from + the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin shows styles that are not allowed + through [`config.allowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-allowedContent). +* [#2565](https://github.com/ckeditor/ckeditor4/issues/2565): [IE, Edge] Fixed: Buttons in + the [editor toolbar](https://ckeditor.com/cke4/addon/toolbar) are activated by clicking them with the right mouse + button. +* [#2792](https://github.com/ckeditor/ckeditor4/pull/2792): Fixed: A bug in + the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin that caused the following issues: + * [#2780](https://github.com/ckeditor/ckeditor4/issues/2780): Fixed: Undo steps disappear after multiple changes of + selection. + * [#2470](https://github.com/ckeditor/ckeditor4/issues/2470): [Firefox] Fixed: Widget's nested editable gets blurred + upon focus. + * [#2655](https://github.com/ckeditor/ckeditor4/issues/2655): [Chrome, Safari] Fixed: Widget's nested editable + cannot be focused under certain circumstances. ## CKEditor 4.11.2 Fixed Issues: -* [#2403](https://github.com/ckeditor/ckeditor4/issues/2403): Fixed: Styling inline editor initialized inside a table with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is causing style leaks. -* [#2514](https://github.com/ckeditor/ckeditor4/issues/2403): Fixed: Pasting table data into inline editor initialized inside a table with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin inserts pasted content into the wrapping table. -* [#2451](https://github.com/ckeditor/ckeditor4/issues/2451): Fixed: The [Remove Format](https://ckeditor.com/cke4/addon/removeformat) plugin changes selection. -* [#2546](https://github.com/ckeditor/ckeditor4/issues/2546): Fixed: The separator in the toolbar moves when buttons are focused. -* [#2506](https://github.com/ckeditor/ckeditor4/issues/2506): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) throws a type error when an empty `
    ` tag with an `image` class is upcasted. -* [#2650](https://github.com/ckeditor/ckeditor4/issues/2650): Fixed: [Table](https://ckeditor.com/cke4/addon/table) dialog validator fails when the `getValue()` function is defined in the global scope. -* [#2690](https://github.com/ckeditor/ckeditor4/issues/2690): Fixed: Decimal characters are removed from the inside of numbered lists when pasting content using the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#2205](https://github.com/ckeditor/ckeditor4/issues/2205): Fixed: It is not possible to add new list items under an item containing a block element. -* [#2411](https://github.com/ckeditor/ckeditor4/issues/2411), [#2438](https://github.com/ckeditor/ckeditor4/issues/2438) Fixed: Apply numbered list option throws a console error for a specific markup. -* [#2430](https://github.com/ckeditor/ckeditor4/issues/2430) Fixed: [Color Button](https://ckeditor.com/cke4/addon/colorbutton) and [List Block](https://ckeditor.com/cke4/addon/listblock) items are draggable. +* [#2403](https://github.com/ckeditor/ckeditor4/issues/2403): Fixed: Styling inline editor initialized inside a table + with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is causing style leaks. +* [#2514](https://github.com/ckeditor/ckeditor4/issues/2403): Fixed: Pasting table data into inline editor initialized + inside a table with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin inserts pasted + content into the wrapping table. +* [#2451](https://github.com/ckeditor/ckeditor4/issues/2451): Fixed: + The [Remove Format](https://ckeditor.com/cke4/addon/removeformat) plugin changes selection. +* [#2546](https://github.com/ckeditor/ckeditor4/issues/2546): Fixed: The separator in the toolbar moves when buttons are + focused. +* [#2506](https://github.com/ckeditor/ckeditor4/issues/2506): + Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) throws a type error when an empty `
    ` tag with + an `image` class is upcasted. +* [#2650](https://github.com/ckeditor/ckeditor4/issues/2650): Fixed: [Table](https://ckeditor.com/cke4/addon/table) + dialog validator fails when the `getValue()` function is defined in the global scope. +* [#2690](https://github.com/ckeditor/ckeditor4/issues/2690): Fixed: Decimal characters are removed from the inside of + numbered lists when pasting content using the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#2205](https://github.com/ckeditor/ckeditor4/issues/2205): Fixed: It is not possible to add new list items under an + item containing a block element. +* [#2411](https://github.com/ckeditor/ckeditor4/issues/2411), [#2438](https://github.com/ckeditor/ckeditor4/issues/2438) + Fixed: Apply numbered list option throws a console error for a specific markup. +* [#2430](https://github.com/ckeditor/ckeditor4/issues/2430) + Fixed: [Color Button](https://ckeditor.com/cke4/addon/colorbutton) + and [List Block](https://ckeditor.com/cke4/addon/listblock) items are draggable. Other Changes: * Updated the [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugin: - * [#52](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/52) Fixed: Clicking "Finish Checking" without a prior action would hang the Spell Checking dialog. -* [#2603](https://github.com/ckeditor/ckeditor4/issues/2603): Corrected the GPL license entry in the `package.json` file. + * [#52](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/52) Fixed: Clicking "Finish Checking" without + a prior action would hang the Spell Checking dialog. +* [#2603](https://github.com/ckeditor/ckeditor4/issues/2603): Corrected the GPL license entry in the `package.json` + file. ## CKEditor 4.11.1 Fixed Issues: -* [#2571](https://github.com/ckeditor/ckeditor4/issues/2571): Fixed: Clicking the categories in the [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown panel scrolls the entire page. +* [#2571](https://github.com/ckeditor/ckeditor4/issues/2571): Fixed: Clicking the categories in + the [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown panel scrolls the entire page. ## CKEditor 4.11 @@ -278,514 +558,1006 @@ Fixed Issues: * Fixed XSS vulnerability in the HTML parser reported by [maxarr](https://hackerone.com/maxarr). - Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source area, and (iii) switch back to WYSIWYG mode. + Issue summary: It was possible to execute XSS inside CKEditor after persuading the victim to: (i) switch CKEditor to + source mode, then (ii) paste a specially crafted HTML code, prepared by the attacker, into the opened CKEditor source + area, and (iii) switch back to WYSIWYG mode. **An upgrade is highly recommended!** New Features: -* [#2062](https://github.com/ckeditor/ckeditor4/pull/2062): Added the emoji dropdown that allows the user to choose the emoji from the toolbar and search for them using keywords. -* [#2154](https://github.com/ckeditor/ckeditor4/issues/2154): The [Link](https://ckeditor.com/cke4/addon/link) plugin now supports phone number links. -* [#1815](https://github.com/ckeditor/ckeditor4/issues/1815): The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin supports typing link completion. -* [#2478](https://github.com/ckeditor/ckeditor4/issues/2478): [Link](https://ckeditor.com/cke4/addon/link) can be inserted using the Ctrl/Cmd + K keystroke. -* [#651](https://github.com/ckeditor/ckeditor4/issues/651): Text pasted using the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin preserves indentation in paragraphs. -* [#2248](https://github.com/ckeditor/ckeditor4/issues/2248): Added support for justification in the [BBCode](https://ckeditor.com/cke4/addon/bbcode) plugin. Thanks to [MatД›j KmГ­nek](https://github.com/KminekMatej)! -* [#706](https://github.com/ckeditor/ckeditor4/issues/706): Added a different cursor style when selecting cells for the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. -* [#2072](https://github.com/ckeditor/ckeditor4/issues/2072): The [UI Button](https://ckeditor.com/cke4/addon/button) plugin supports custom `aria-haspopup` property values. The [Menu Button](https://ckeditor.com/cke4/addon/menubutton) `aria-haspopup` value is now `menu`, the [Panel Button](https://ckeditor.com/cke4/addon/panelbutton) and [Rich Combo](https://ckeditor.com/cke4/addon/richcombo) `aria-haspopup` value is now `listbox`. -* [#1176](https://github.com/ckeditor/ckeditor4/pull/1176): The [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) can now be attached to a selection instead of an element. -* [#2202](https://github.com/ckeditor/ckeditor4/issues/2202): Added the `contextmenu_contentsCss` configuration option to allow adding custom CSS to the [Context Menu](https://ckeditor.com/cke4/addon/contextmenu). +* [#2062](https://github.com/ckeditor/ckeditor4/pull/2062): Added the emoji dropdown that allows the user to choose the + emoji from the toolbar and search for them using keywords. +* [#2154](https://github.com/ckeditor/ckeditor4/issues/2154): The [Link](https://ckeditor.com/cke4/addon/link) plugin + now supports phone number links. +* [#1815](https://github.com/ckeditor/ckeditor4/issues/1815): The [Auto Link](https://ckeditor.com/cke4/addon/autolink) + plugin supports typing link completion. +* [#2478](https://github.com/ckeditor/ckeditor4/issues/2478): [Link](https://ckeditor.com/cke4/addon/link) can be + inserted using the Ctrl/Cmd + K keystroke. +* [#651](https://github.com/ckeditor/ckeditor4/issues/651): Text pasted using + the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin preserves indentation in paragraphs. +* [#2248](https://github.com/ckeditor/ckeditor4/issues/2248): Added support for justification in + the [BBCode](https://ckeditor.com/cke4/addon/bbcode) plugin. Thanks + to [MatД›j KmГ­nek](https://github.com/KminekMatej)! +* [#706](https://github.com/ckeditor/ckeditor4/issues/706): Added a different cursor style when selecting cells for + the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. +* [#2072](https://github.com/ckeditor/ckeditor4/issues/2072): The [UI Button](https://ckeditor.com/cke4/addon/button) + plugin supports custom `aria-haspopup` property values. + The [Menu Button](https://ckeditor.com/cke4/addon/menubutton) `aria-haspopup` value is now `menu`, + the [Panel Button](https://ckeditor.com/cke4/addon/panelbutton) + and [Rich Combo](https://ckeditor.com/cke4/addon/richcombo) `aria-haspopup` value is now `listbox`. +* [#1176](https://github.com/ckeditor/ckeditor4/pull/1176): + The [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) can now be attached to a selection instead of an + element. +* [#2202](https://github.com/ckeditor/ckeditor4/issues/2202): Added the `contextmenu_contentsCss` configuration option + to allow adding custom CSS to the [Context Menu](https://ckeditor.com/cke4/addon/contextmenu). Fixed Issues: -* [#1477](https://github.com/ckeditor/ckeditor4/issues/1477): Fixed: On destroy, [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not destroy its content. -* [#2394](https://github.com/ckeditor/ckeditor4/issues/2394): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) dropdown does not show up with repeated symbols in a single line. -* [#1181](https://github.com/ckeditor/ckeditor4/issues/1181): [Chrome] Fixed: Opening the context menu in a read-only editor results in an error. -* [#2276](https://github.com/ckeditor/ckeditor4/issues/2276): [iOS] Fixed: [Button](https://ckeditor.com/cke4/addon/button) state does not refresh properly. -* [#1489](https://github.com/ckeditor/ckeditor4/issues/1489): Fixed: Table contents can be removed in read-only mode when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is used. -* [#1264](https://github.com/ckeditor/ckeditor4/issues/1264) Fixed: Right-click does not clear the selection created with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. -* [#586](https://github.com/ckeditor/ckeditor4/issues/586) Fixed: The `required` attribute is not correctly recognized by the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin dialog. Thanks to [Roli ZГјger](https://github.com/rzueger)! -* [#2380](https://github.com/ckeditor/ckeditor4/issues/2380) Fixed: Styling HTML comments in a top-level element results in extra paragraphs. -* [#2294](https://github.com/ckeditor/ckeditor4/issues/2294) Fixed: Pasting content from Microsoft Outlook and then bolding it results in an error. -* [#2035](https://github.com/ckeditor/ckeditor4/issues/2035) [Edge] Fixed: `Permission denied` is thrown when opening a [Panel](https://ckeditor.com/cke4/addon/panel) instance. -* [#965](https://github.com/ckeditor/ckeditor4/issues/965) Fixed: The [`config.forceSimpleAmpersand`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forceSimpleAmpersand) option does not work. Thanks to [Alex Maris](https://github.com/alexmaris)! -* [#2448](https://github.com/ckeditor/ckeditor4/issues/2448): Fixed: The [`Escape HTML Entities`] plugin with custom [additional entities](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-entities_additional) configuration breaks HTML escaping. -* [#898](https://github.com/ckeditor/ckeditor4/issues/898): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) long alternative text protrudes into the editor when the image is selected. -* [#1113](https://github.com/ckeditor/ckeditor4/issues/1113): [Firefox] Fixed: Nested contenteditable elements path is not updated on focus with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin. -* [#1682](https://github.com/ckeditor/ckeditor4/issues/1682) Fixed: Hovering the [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) panel changes its size, causing flickering. -* [#421](https://github.com/ckeditor/ckeditor4/issues/421) Fixed: Expandable [Button](https://ckeditor.com/cke4/addon/button) puts the `(Selected)` text at the end of the label when clicked. -* [#1454](https://github.com/ckeditor/ckeditor4/issues/1454): Fixed: The [`onAbort`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-onAbort) method of the [Upload Widget](https://ckeditor.com/cke4/addon/uploadwidget) is not called when the loader is aborted. -* [#1451](https://github.com/ckeditor/ckeditor4/issues/1451): Fixed: The context menu is incorrectly positioned when opened with Shift+F10. -* [#1722](https://github.com/ckeditor/ckeditor4/issues/1722): [`CKEDITOR.filter.instances`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#static-property-instances) is causing memory leaks. -* [#2491](https://github.com/ckeditor/ckeditor4/issues/2491): Fixed: The [Mentions](https://ckeditor.com/cke4/addon/mentions) plugin is not matching diacritic characters. -* [#2519](https://github.com/ckeditor/ckeditor4/issues/2519): Fixed: The [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) dialog should display all available keystrokes for a single command. +* [#1477](https://github.com/ckeditor/ckeditor4/issues/1477): Fixed: On + destroy, [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not destroy its content. +* [#2394](https://github.com/ckeditor/ckeditor4/issues/2394): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) + dropdown does not show up with repeated symbols in a single line. +* [#1181](https://github.com/ckeditor/ckeditor4/issues/1181): [Chrome] Fixed: Opening the context menu in a read-only + editor results in an error. +* [#2276](https://github.com/ckeditor/ckeditor4/issues/2276): [iOS] + Fixed: [Button](https://ckeditor.com/cke4/addon/button) state does not refresh properly. +* [#1489](https://github.com/ckeditor/ckeditor4/issues/1489): Fixed: Table contents can be removed in read-only mode + when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is used. +* [#1264](https://github.com/ckeditor/ckeditor4/issues/1264) Fixed: Right-click does not clear the selection created + with the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. +* [#586](https://github.com/ckeditor/ckeditor4/issues/586) Fixed: The `required` attribute is not correctly recognized + by the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin dialog. Thanks + to [Roli ZГјger](https://github.com/rzueger)! +* [#2380](https://github.com/ckeditor/ckeditor4/issues/2380) Fixed: Styling HTML comments in a top-level element results + in extra paragraphs. +* [#2294](https://github.com/ckeditor/ckeditor4/issues/2294) Fixed: Pasting content from Microsoft Outlook and then + bolding it results in an error. +* [#2035](https://github.com/ckeditor/ckeditor4/issues/2035) [Edge] Fixed: `Permission denied` is thrown when opening + a [Panel](https://ckeditor.com/cke4/addon/panel) instance. +* [#965](https://github.com/ckeditor/ckeditor4/issues/965) Fixed: + The [`config.forceSimpleAmpersand`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forceSimpleAmpersand) + option does not work. Thanks to [Alex Maris](https://github.com/alexmaris)! +* [#2448](https://github.com/ckeditor/ckeditor4/issues/2448): Fixed: The [`Escape HTML Entities`] plugin with + custom [additional entities](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-entities_additional) + configuration breaks HTML escaping. +* [#898](https://github.com/ckeditor/ckeditor4/issues/898): + Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) long alternative text protrudes into the editor when + the image is selected. +* [#1113](https://github.com/ckeditor/ckeditor4/issues/1113): [Firefox] Fixed: Nested contenteditable elements path is + not updated on focus with the [Div Editing Area](https://ckeditor.com/cke4/addon/divarea) plugin. +* [#1682](https://github.com/ckeditor/ckeditor4/issues/1682) Fixed: Hovering + the [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) panel changes its size, causing flickering. +* [#421](https://github.com/ckeditor/ckeditor4/issues/421) Fixed: + Expandable [Button](https://ckeditor.com/cke4/addon/button) puts the `(Selected)` text at the end of the label when + clicked. +* [#1454](https://github.com/ckeditor/ckeditor4/issues/1454): Fixed: + The [`onAbort`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-onAbort) + method of the [Upload Widget](https://ckeditor.com/cke4/addon/uploadwidget) is not called when the loader is aborted. +* [#1451](https://github.com/ckeditor/ckeditor4/issues/1451): Fixed: The context menu is incorrectly positioned when + opened with Shift+F10. +* [#1722](https://github.com/ckeditor/ckeditor4/issues/1722): [`CKEDITOR.filter.instances`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#static-property-instances) + is causing memory leaks. +* [#2491](https://github.com/ckeditor/ckeditor4/issues/2491): Fixed: + The [Mentions](https://ckeditor.com/cke4/addon/mentions) plugin is not matching diacritic characters. +* [#2519](https://github.com/ckeditor/ckeditor4/issues/2519): Fixed: + The [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) dialog should display all available keystrokes for + a single command. API Changes: -* [#2453](https://github.com/ckeditor/ckeditor4/issues/2453): The [`CKEDITOR.ui.panel.block.getItems`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_panel_block.html#method-getItems) method now also returns `input` elements in addition to links. -* [#2224](https://github.com/ckeditor/ckeditor4/issues/2224): The [`CKEDITOR.tools.convertToPx`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-convertToPx) function now converts negative values. -* [#2253](https://github.com/ckeditor/ckeditor4/issues/2253): The widget definition [`insert`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-insert) method now passes `editor` and `commandData`. Thanks to [marcparmet](https://github.com/marcparmet)! -* [#2045](https://github.com/ckeditor/ckeditor4/issues/2045): Extracted [`tools.eventsBuffer`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-eventsBuffer) and [`tools.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) functions logic into a separate namespace. - * [`tools.eventsBuffer`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-eventsBuffer) was extracted into [`tools.buffers.event`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_buffers_event.html), - * [`tools.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) was extracted into [`tools.buffers.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_buffers_throttle.html). -* [#2466](https://github.com/ckeditor/ckeditor4/issues/2466): The [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-constructor) constructor accepts an additional `rules` parameter allowing to bind the editor and filter together. -* [#2493](https://github.com/ckeditor/ckeditor4/issues/2493): The [`editor.getCommandKeystroke`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) method accepts an additional `all` parameter allowing to retrieve an array of all command keystrokes. -* [#2483](https://github.com/ckeditor/ckeditor4/issues/2483): Button's DOM element created with the [`hasArrow`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui.html#method-addButton) definition option can by identified by the `.cke_button_expandable` CSS class. +* [#2453](https://github.com/ckeditor/ckeditor4/issues/2453): + The [`CKEDITOR.ui.panel.block.getItems`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_panel_block.html#method-getItems) + method now also returns `input` elements in addition to links. +* [#2224](https://github.com/ckeditor/ckeditor4/issues/2224): + The [`CKEDITOR.tools.convertToPx`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-convertToPx) + function now converts negative values. +* [#2253](https://github.com/ckeditor/ckeditor4/issues/2253): The widget + definition [`insert`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-insert) + method now passes `editor` and `commandData`. Thanks to [marcparmet](https://github.com/marcparmet)! +* [#2045](https://github.com/ckeditor/ckeditor4/issues/2045): + Extracted [`tools.eventsBuffer`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-eventsBuffer) + and [`tools.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) functions + logic into a separate namespace. + * [`tools.eventsBuffer`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-eventsBuffer) was + extracted + into [`tools.buffers.event`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_buffers_event.html), + * [`tools.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) was + extracted + into [`tools.buffers.throttle`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_buffers_throttle.html). +* [#2466](https://github.com/ckeditor/ckeditor4/issues/2466): + The [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-constructor) + constructor accepts an additional `rules` parameter allowing to bind the editor and filter together. +* [#2493](https://github.com/ckeditor/ckeditor4/issues/2493): + The [`editor.getCommandKeystroke`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) + method accepts an additional `all` parameter allowing to retrieve an array of all command keystrokes. +* [#2483](https://github.com/ckeditor/ckeditor4/issues/2483): Button's DOM element created with + the [`hasArrow`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui.html#method-addButton) definition option + can by identified by the `.cke_button_expandable` CSS class. Other Changes: -* [#1713](https://github.com/ckeditor/ckeditor4/issues/1713): Removed the redundant `lang.title` entry from the [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin. +* [#1713](https://github.com/ckeditor/ckeditor4/issues/1713): Removed the redundant `lang.title` entry from + the [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin. ## CKEditor 4.10.1 Fixed Issues: -* [#2114](https://github.com/ckeditor/ckeditor4/issues/2114): Fixed: [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) cannot be initialized before [`instanceReady`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-instanceReady). -* [#2107](https://github.com/ckeditor/ckeditor4/issues/2107): Fixed: Holding and releasing the mouse button is not inserting an [autocomplete](https://ckeditor.com/cke4/addon/autocomplete) suggestion. -* [#2167](https://github.com/ckeditor/ckeditor4/issues/2167): Fixed: Matching in [Emoji](https://ckeditor.com/cke4/addon/emoji) plugin is not case insensitive. -* [#2195](https://github.com/ckeditor/ckeditor4/issues/2195): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) shows the suggestion box when the colon is preceded with other characters than white space. +* [#2114](https://github.com/ckeditor/ckeditor4/issues/2114): + Fixed: [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) cannot be initialized + before [`instanceReady`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-instanceReady). +* [#2107](https://github.com/ckeditor/ckeditor4/issues/2107): Fixed: Holding and releasing the mouse button is not + inserting an [autocomplete](https://ckeditor.com/cke4/addon/autocomplete) suggestion. +* [#2167](https://github.com/ckeditor/ckeditor4/issues/2167): Fixed: Matching + in [Emoji](https://ckeditor.com/cke4/addon/emoji) plugin is not case insensitive. +* [#2195](https://github.com/ckeditor/ckeditor4/issues/2195): Fixed: [Emoji](https://ckeditor.com/cke4/addon/emoji) + shows the suggestion box when the colon is preceded with other characters than white space. * [#2169](https://github.com/ckeditor/ckeditor4/issues/2169): [Edge] Fixed: Error thrown when pasting into the editor. -* [#1084](https://github.com/ckeditor/ckeditor4/issues/1084) Fixed: Using the "Automatic" option with [Color Button](https://ckeditor.com/cke4/addon/colorbutton) on a text with the color already defined sets an invalid color value. -* [#2271](https://github.com/ckeditor/ckeditor4/issues/2271): Fixed: Custom color name not used as a label in the [Color Button](https://ckeditor.com/cke4/addon/image2) plugin. Thanks to [Eric Geloen](https://github.com/egeloen)! -* [#2296](https://github.com/ckeditor/ckeditor4/issues/2296): Fixed: The [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin throws an error when activated on content containing HTML comments. -* [#966](https://github.com/ckeditor/ckeditor4/issues/966): Fixed: Executing [`editor.destroy()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-destroy) during the [file upload](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-onUploading) throws an error. Thanks to [Maksim Makarevich](https://github.com/MaksimMakarevich)! -* [#1719](https://github.com/ckeditor/ckeditor4/issues/1719): Fixed: Ctrl/Cmd + A inadvertently focuses inline editor if it is starting and ending with a list. Thanks to [theNailz](https://github.com/theNailz)! -* [#1046](https://github.com/ckeditor/ckeditor4/issues/1046): Fixed: Subsequent new links do not include the `id` attribute. Thanks to [Nathan Samson](https://github.com/nathansamson)! -* [#1348](https://github.com/ckeditor/ckeditor4/issues/1348): Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin aspect ratio locking uses an old width and height on image URL change. -* [#1791](https://github.com/ckeditor/ckeditor4/issues/1791): Fixed: [Image](https://ckeditor.com/cke4/addon/image) and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugins can be enabled when [Easy Image](https://ckeditor.com/cke4/addon/easyimage) is present. -* [#2254](https://github.com/ckeditor/ckeditor4/issues/2254): Fixed: [Image](https://ckeditor.com/cke4/addon/image) ratio locking is too precise for resized images. Thanks to [Jonathan Gilbert](https://github.com/logiclrd)! -* [#1184](https://github.com/ckeditor/ckeditor4/issues/1184): [IE8-11] Fixed: Copying and pasting data in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) throws an error. -* [#1916](https://github.com/ckeditor/ckeditor4/issues/1916): [IE9-11] Fixed: Pressing the Delete key in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) throws an error. -* [#2003](https://github.com/ckeditor/ckeditor4/issues/2003): [Firefox] Fixed: Right-clicking multiple selected table cells containing empty paragraphs removes the selection. -* [#1816](https://github.com/ckeditor/ckeditor4/issues/1816): Fixed: Table breaks when Enter is pressed over the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. -* [#1115](https://github.com/ckeditor/ckeditor4/issues/1115): Fixed: The `` tag is not preserved when proper configuration is provided and a style is applied by the [Font](https://ckeditor.com/cke4/addon/font) plugin. -* [#727](https://github.com/ckeditor/ckeditor4/issues/727): Fixed: Custom styles may be invisible in the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin. -* [#988](https://github.com/ckeditor/ckeditor4/issues/988): Fixed: ACF-enabled custom elements prefixed with `object`, `embed`, `param` are removed from the editor content. +* [#1084](https://github.com/ckeditor/ckeditor4/issues/1084) Fixed: Using the "Automatic" option + with [Color Button](https://ckeditor.com/cke4/addon/colorbutton) on a text with the color already defined sets an + invalid color value. +* [#2271](https://github.com/ckeditor/ckeditor4/issues/2271): Fixed: Custom color name not used as a label in + the [Color Button](https://ckeditor.com/cke4/addon/image2) plugin. Thanks + to [Eric Geloen](https://github.com/egeloen)! +* [#2296](https://github.com/ckeditor/ckeditor4/issues/2296): Fixed: + The [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin throws an error when activated on content + containing HTML comments. +* [#966](https://github.com/ckeditor/ckeditor4/issues/966): Fixed: + Executing [`editor.destroy()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-destroy) + during + the [file upload](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-onUploading) + throws an error. Thanks to [Maksim Makarevich](https://github.com/MaksimMakarevich)! +* [#1719](https://github.com/ckeditor/ckeditor4/issues/1719): Fixed: Ctrl/Cmd + A + inadvertently focuses inline editor if it is starting and ending with a list. Thanks + to [theNailz](https://github.com/theNailz)! +* [#1046](https://github.com/ckeditor/ckeditor4/issues/1046): Fixed: Subsequent new links do not include the `id` + attribute. Thanks to [Nathan Samson](https://github.com/nathansamson)! +* [#1348](https://github.com/ckeditor/ckeditor4/issues/1348): + Fixed: [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin aspect ratio locking uses an old width and + height on image URL change. +* [#1791](https://github.com/ckeditor/ckeditor4/issues/1791): Fixed: [Image](https://ckeditor.com/cke4/addon/image) + and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugins can be enabled + when [Easy Image](https://ckeditor.com/cke4/addon/easyimage) is present. +* [#2254](https://github.com/ckeditor/ckeditor4/issues/2254): Fixed: [Image](https://ckeditor.com/cke4/addon/image) + ratio locking is too precise for resized images. Thanks to [Jonathan Gilbert](https://github.com/logiclrd)! +* [#1184](https://github.com/ckeditor/ckeditor4/issues/1184): [IE8-11] Fixed: Copying and pasting data + in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) throws an + error. +* [#1916](https://github.com/ckeditor/ckeditor4/issues/1916): [IE9-11] Fixed: Pressing the Delete key + in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) throws an + error. +* [#2003](https://github.com/ckeditor/ckeditor4/issues/2003): [Firefox] Fixed: Right-clicking multiple selected table + cells containing empty paragraphs removes the selection. +* [#1816](https://github.com/ckeditor/ckeditor4/issues/1816): Fixed: Table breaks when Enter is pressed over + the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. +* [#1115](https://github.com/ckeditor/ckeditor4/issues/1115): Fixed: The `` tag is not preserved when proper + configuration is provided and a style is applied by the [Font](https://ckeditor.com/cke4/addon/font) plugin. +* [#727](https://github.com/ckeditor/ckeditor4/issues/727): Fixed: Custom styles may be invisible in + the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin. +* [#988](https://github.com/ckeditor/ckeditor4/issues/988): Fixed: ACF-enabled custom elements prefixed + with `object`, `embed`, `param` are removed from the editor content. API Changes: -* [#2249](https://github.com/ckeditor/ckeditor4/issues/1791): Added the [`editor.plugins.detectConflict()`](https://ckeditor.com/docs/ckeditor4/latest/CKEDITOR_editor_plugins.html#method-detectConflict) method finding conflicts between provided plugins. +* [#2249](https://github.com/ckeditor/ckeditor4/issues/1791): Added + the [`editor.plugins.detectConflict()`](https://ckeditor.com/docs/ckeditor4/latest/CKEDITOR_editor_plugins.html#method-detectConflict) + method finding conflicts between provided plugins. ## CKEditor 4.10 New Features: -* [#1751](https://github.com/ckeditor/ckeditor4/issues/1751): Introduced the **Autocomplete** feature that consists of the following plugins: - * [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) – Provides contextual completion feature for custom text matches based on user input. - * [Text Watcher](https://ckeditor.com/cke4/addon/textWatcher) – Checks whether an editor's text change matches the chosen criteria. - * [Text Match](https://ckeditor.com/cke4/addon/textMatch) – Allows to search [`CKEDITOR.dom.range`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html) for matching text. -* [#1703](https://github.com/ckeditor/ckeditor4/issues/1703): Introduced the [Mentions](https://ckeditor.com/cke4/addon/mentions) plugin providing smart completion feature for custom text matches based on user input starting with a chosen marker character. -* [#1746](https://github.com/ckeditor/ckeditor4/issues/1703): Introduced the [Emoji](https://ckeditor.com/cke4/addon/emoji) plugin providing completion feature for emoji ideograms. -* [#1761](https://github.com/ckeditor/ckeditor4/issues/1761): The [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin now supports email links. +* [#1751](https://github.com/ckeditor/ckeditor4/issues/1751): Introduced the **Autocomplete** feature that consists of + the following plugins: + * [Autocomplete](https://ckeditor.com/cke4/addon/autocomplete) – Provides contextual completion feature for + custom text matches based on user input. + * [Text Watcher](https://ckeditor.com/cke4/addon/textWatcher) – Checks whether an editor's text change matches + the chosen criteria. + * [Text Match](https://ckeditor.com/cke4/addon/textMatch) – Allows to + search [`CKEDITOR.dom.range`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html) for matching + text. +* [#1703](https://github.com/ckeditor/ckeditor4/issues/1703): Introduced + the [Mentions](https://ckeditor.com/cke4/addon/mentions) plugin providing smart completion feature for custom text + matches based on user input starting with a chosen marker character. +* [#1746](https://github.com/ckeditor/ckeditor4/issues/1703): Introduced + the [Emoji](https://ckeditor.com/cke4/addon/emoji) plugin providing completion feature for emoji ideograms. +* [#1761](https://github.com/ckeditor/ckeditor4/issues/1761): The [Auto Link](https://ckeditor.com/cke4/addon/autolink) + plugin now supports email links. Fixed Issues: -* [#1458](https://github.com/ckeditor/ckeditor4/issues/1458): [Edge] Fixed: After blurring the editor it takes 2 clicks to focus a widget. -* [#1034](https://github.com/ckeditor/ckeditor4/issues/1034): Fixed: JAWS leaves forms mode after pressing the Enter key in an inline editor instance. -* [#1748](https://github.com/ckeditor/ckeditor4/pull/1748): Fixed: Missing [`CKEDITOR.dialog.definition.onHide`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog_definition.html#property-onHide) API documentation. Thanks to [sunnyone](https://github.com/sunnyone)! -* [#1321](https://github.com/ckeditor/ckeditor4/issues/1321): Fixed: Ideographic space character (`\u3000`) is lost when pasting text. -* [#1776](https://github.com/ckeditor/ckeditor4/issues/1776): Fixed: Empty caption placeholder of the [Image Base](https://ckeditor.com/cke4/addon/imagebase) plugin is not hidden when blurred. -* [#1592](https://github.com/ckeditor/ckeditor4/issues/1592): Fixed: The [Image Base](https://ckeditor.com/cke4/addon/imagebase) plugin caption is not visible after paste. -* [#620](https://github.com/ckeditor/ckeditor4/issues/620): Fixed: The [`config.forcePasteAsPlainText`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forcePasteAsPlainText) option is not respected in internal and cross-editor pasting. -* [#1467](https://github.com/ckeditor/ckeditor4/issues/1467): Fixed: The resizing cursor of the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin appearing in the middle of a merged cell. +* [#1458](https://github.com/ckeditor/ckeditor4/issues/1458): [Edge] Fixed: After blurring the editor it takes 2 clicks + to focus a widget. +* [#1034](https://github.com/ckeditor/ckeditor4/issues/1034): Fixed: JAWS leaves forms mode after pressing the + Enter key in an inline editor instance. +* [#1748](https://github.com/ckeditor/ckeditor4/pull/1748): Fixed: + Missing [`CKEDITOR.dialog.definition.onHide`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dialog_definition.html#property-onHide) + API documentation. Thanks to [sunnyone](https://github.com/sunnyone)! +* [#1321](https://github.com/ckeditor/ckeditor4/issues/1321): Fixed: Ideographic space character (`\u3000`) is lost when + pasting text. +* [#1776](https://github.com/ckeditor/ckeditor4/issues/1776): Fixed: Empty caption placeholder of + the [Image Base](https://ckeditor.com/cke4/addon/imagebase) plugin is not hidden when blurred. +* [#1592](https://github.com/ckeditor/ckeditor4/issues/1592): Fixed: + The [Image Base](https://ckeditor.com/cke4/addon/imagebase) plugin caption is not visible after paste. +* [#620](https://github.com/ckeditor/ckeditor4/issues/620): Fixed: + The [`config.forcePasteAsPlainText`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forcePasteAsPlainText) + option is not respected in internal and cross-editor pasting. +* [#1467](https://github.com/ckeditor/ckeditor4/issues/1467): Fixed: The resizing cursor of + the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin appearing in the middle of a merged cell. API Changes: -* [#850](https://github.com/ckeditor/ckeditor4/issues/850): Backward incompatibility: Replaced the `replace` dialog from the [Find / Replace](https://ckeditor.com/cke4/addon/find) plugin with a `tabId` option in the `find` command. -* [#1582](https://github.com/ckeditor/ckeditor4/issues/1582): The [`CKEDITOR.editor.addCommand()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-addCommand) method can now accept a [`CKEDITOR.command`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_command.html) instance as a parameter. -* [#1712](https://github.com/ckeditor/ckeditor4/issues/1712): The [`extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins), [`removePlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removePlugins) and [`plugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-plugins) configuration options allow whitespace. -* [#1802](https://github.com/ckeditor/ckeditor4/issues/1802): The [`extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins), [`removePlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removePlugins) and [`plugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-plugins) configuration options allow passing plugin names as an array. -* [#1724](https://github.com/ckeditor/ckeditor4/issues/1724): Added an option to the [`getClientRect()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-getClientRect) function allowing to retrieve an absolute bounding rectangle of the element, i.e. a position relative to the upper-left corner of the topmost viewport. -* [#1498](https://github.com/ckeditor/ckeditor4/issues/1498) : Added a new [`getClientRects()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-getClientRects) method to `CKEDITOR.dom.range`. It returns a list of rectangles for each selected element. -* [#1993](https://github.com/ckeditor/ckeditor4/issues/1993): Added the [`CKEDITOR.tools.throttle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) function. +* [#850](https://github.com/ckeditor/ckeditor4/issues/850): Backward incompatibility: Replaced the `replace` dialog from + the [Find / Replace](https://ckeditor.com/cke4/addon/find) plugin with a `tabId` option in the `find` command. +* [#1582](https://github.com/ckeditor/ckeditor4/issues/1582): + The [`CKEDITOR.editor.addCommand()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-addCommand) + method can now accept a [`CKEDITOR.command`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_command.html) + instance as a parameter. +* [#1712](https://github.com/ckeditor/ckeditor4/issues/1712): + The [`extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins), [`removePlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removePlugins) + and [`plugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-plugins) configuration options + allow whitespace. +* [#1802](https://github.com/ckeditor/ckeditor4/issues/1802): + The [`extraPlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-extraPlugins), [`removePlugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-removePlugins) + and [`plugins`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-plugins) configuration options + allow passing plugin names as an array. +* [#1724](https://github.com/ckeditor/ckeditor4/issues/1724): Added an option to + the [`getClientRect()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_element.html#method-getClientRect) + function allowing to retrieve an absolute bounding rectangle of the element, i.e. a position relative to the + upper-left corner of the topmost viewport. +* [#1498](https://github.com/ckeditor/ckeditor4/issues/1498) : Added a + new [`getClientRects()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-getClientRects) + method to `CKEDITOR.dom.range`. It returns a list of rectangles for each selected element. +* [#1993](https://github.com/ckeditor/ckeditor4/issues/1993): Added + the [`CKEDITOR.tools.throttle()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-throttle) + function. Other Changes: -* Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugins: - * Language dictionary update: Added support for the Uzbek Latin language. - * Languages no longer supported as additional languages: Manx - Isle of Man (`gv_GB`) and Interlingua (`ia_XR`). - * Extended and improved language dictionaries: Georgian and Swedish. Also added the missing word _"Ensure"_ to the American, British and Canada English language. - * [#141](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/141) Fixed: SCAYT throws "Uncaught Error: Error in RangyWrappedRange module: createRange(): Parameter must be a Window object or DOM node". - * [#153](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/153) [Chrome] Fixed: Correcting a word in the widget in SCAYT moves focus to another editable. - * [#155](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/155) [IE8] Fixed: SCAYT throws an error and does not work. - * [#156](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/156) [IE10] Fixed: SCAYT does not seem to work. - * Fixed: After some text is dragged and dropped, the markup is not refreshed for grammar problems in SCAYT. - * Fixed: Request to FastCGI fails when the user tries to replace a word with non-English characters with a proper suggestion in WSC. - * [Firefox] Fixed: Ctrl+Z removes focus in SCAYT. - * Grammar support for default languages was improved. - * New application source URL was added in SCAYT. - * Removed green marks and legend related to grammar-supported languages in the Languages tab of SCAYT. Grammar is now supported for almost all the anguages in the list for an additional fee. - * Fixed: JavaScript error in the console: "Cannot read property 'split' of undefined" in SCAYT and WSC. - * [IE10] Fixed: Markup is not set for a specific case in SCAYT. - * Fixed: Accessibility issue: No `alt` attribute for the logo image in the About tab of SCAYT. +* Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) + and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugins: + * Language dictionary update: Added support for the Uzbek Latin language. + * Languages no longer supported as additional languages: Manx - Isle of Man (`gv_GB`) and Interlingua (`ia_XR`). + * Extended and improved language dictionaries: Georgian and Swedish. Also added the missing word _"Ensure"_ to the + American, British and Canada English language. + * [#141](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/141) Fixed: SCAYT throws "Uncaught Error: + Error in RangyWrappedRange module: createRange(): Parameter must be a Window object or DOM node". + * [#153](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/153) [Chrome] Fixed: Correcting a word in + the widget in SCAYT moves focus to another editable. + * [#155](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/155) [IE8] Fixed: SCAYT throws an error and + does not work. + * [#156](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/156) [IE10] Fixed: SCAYT does not seem to + work. + * Fixed: After some text is dragged and dropped, the markup is not refreshed for grammar problems in SCAYT. + * Fixed: Request to FastCGI fails when the user tries to replace a word with non-English characters with a proper + suggestion in WSC. + * [Firefox] Fixed: Ctrl+Z removes focus in SCAYT. + * Grammar support for default languages was improved. + * New application source URL was added in SCAYT. + * Removed green marks and legend related to grammar-supported languages in the Languages tab of SCAYT. Grammar is + now supported for almost all the anguages in the list for an additional fee. + * Fixed: JavaScript error in the console: "Cannot read property 'split' of undefined" in SCAYT and WSC. + * [IE10] Fixed: Markup is not set for a specific case in SCAYT. + * Fixed: Accessibility issue: No `alt` attribute for the logo image in the About tab of SCAYT. ## CKEditor 4.9.2 **Security Updates:** -* Fixed XSS vulnerability in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) (`image2`) plugin reported by [Kyaw Min Thein](https://twitter.com/kyawminthein99). +* Fixed XSS vulnerability in the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) (`image2`) plugin reported + by [Kyaw Min Thein](https://twitter.com/kyawminthein99). - Issue summary: It was possible to execute XSS inside CKEditor using the `` tag and specially crafted HTML. Please note that the default presets (Basic/Standard/Full) do not include this plugin, so you are only at risk if you made a custom build and enabled this plugin. + Issue summary: It was possible to execute XSS inside CKEditor using the `` tag and specially crafted HTML. Please + note that the default presets (Basic/Standard/Full) do not include this plugin, so you are only at risk if you made a + custom build and enabled this plugin. -We would like to thank the [Drupal security team](https://www.drupal.org/drupal-security-team) for bringing this matter to our attention and coordinating the fix and release process! +We would like to thank the [Drupal security team](https://www.drupal.org/drupal-security-team) for bringing this matter +to our attention and coordinating the fix and release process! ## CKEditor 4.9.1 Fixed Issues: -* [#1835](https://github.com/ckeditor/ckeditor4/issues/1835): Fixed: Integration between [CKFinder](https://ckeditor.com/ckeditor-4/ckfinder/) and the [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin does not work. +* [#1835](https://github.com/ckeditor/ckeditor4/issues/1835): Fixed: Integration + between [CKFinder](https://ckeditor.com/ckeditor-4/ckfinder/) and + the [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin does not work. ## CKEditor 4.9 New Features: -* [#932](https://github.com/ckeditor/ckeditor4/issues/932): Introduced Easy Image feature for inserting images that are automatically rescaled, optimized, responsive and delivered through a blazing-fast CDN. Three new plugins were added to support it: +* [#932](https://github.com/ckeditor/ckeditor4/issues/932): Introduced Easy Image feature for inserting images that are + automatically rescaled, optimized, responsive and delivered through a blazing-fast CDN. Three new plugins were added + to support it: * [Easy Image](https://ckeditor.com/cke4/addon/easyimage), * [Cloud Services](https://ckeditor.com/cke4/addon/cloudservices) * [Image Base](https://ckeditor.com/cke4/addon/imagebase) -* [#1338](https://github.com/ckeditor/ckeditor4/issues/1338): Keystroke labels are displayed for function keys (like F7, F8). -* [#643](https://github.com/ckeditor/ckeditor4/issues/643): The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin can now upload files using XHR requests. This allows for setting custom HTTP headers using the [`config.fileTools_requestHeaders`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fileTools_requestHeaders) configuration option. -* [#1365](https://github.com/ckeditor/ckeditor4/issues/1365): The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin uses XHR requests by default. -* [#1399](https://github.com/ckeditor/ckeditor4/issues/1399): Added the possibility to set [`CKEDITOR.config.startupFocus`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-startupFocus) as `start` or `end` to specify where the editor focus should be after the initialization. -* [#1441](https://github.com/ckeditor/ckeditor4/issues/1441): The [Magic Line](https://ckeditor.com/cke4/addon/magicline) plugin line element can now be identified by the `data-cke-magic-line="1"` attribute. +* [#1338](https://github.com/ckeditor/ckeditor4/issues/1338): Keystroke labels are displayed for function keys (like F7, + F8). +* [#643](https://github.com/ckeditor/ckeditor4/issues/643): + The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin can now upload files using XHR requests. This + allows for setting custom HTTP headers using + the [`config.fileTools_requestHeaders`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-fileTools_requestHeaders) + configuration option. +* [#1365](https://github.com/ckeditor/ckeditor4/issues/1365): + The [File Browser](https://ckeditor.com/cke4/addon/filebrowser) plugin uses XHR requests by default. +* [#1399](https://github.com/ckeditor/ckeditor4/issues/1399): Added the possibility to + set [`CKEDITOR.config.startupFocus`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-startupFocus) + as `start` or `end` to specify where the editor focus should be after the initialization. +* [#1441](https://github.com/ckeditor/ckeditor4/issues/1441): + The [Magic Line](https://ckeditor.com/cke4/addon/magicline) plugin line element can now be identified by + the `data-cke-magic-line="1"` attribute. Fixed Issues: * [#595](https://github.com/ckeditor/ckeditor4/issues/595): Fixed: Pasting does not work on mobile devices. -* [#869](https://github.com/ckeditor/ckeditor4/issues/869): Fixed: Empty selection clears cached clipboard data in the editor. -* [#1419](https://github.com/ckeditor/ckeditor4/issues/1419): Fixed: The [Widget Selection](https://ckeditor.com/cke4/addon/widgetselection) plugin selects the editor content with the Alt+A key combination on Windows. -* [#1274](https://github.com/ckeditor/ckeditor4/issues/1274): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not match a single selected image using the [`contextDefinition.cssSelector`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_balloontoolbar_contextDefinition.html#property-cssSelector) matcher. -* [#1232](https://github.com/ckeditor/ckeditor4/issues/1232): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) buttons should be registered as focusable elements. -* [#1342](https://github.com/ckeditor/ckeditor4/issues/1342): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) should be re-positioned after the [`change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event. -* [#1426](https://github.com/ckeditor/ckeditor4/issues/1426): [IE8-9] Fixed: Missing [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) background in the [Kama](https://ckeditor.com/cke4/addon/kama) skin. Thanks to [Christian Elmer](https://github.com/keinkurt)! -* [#1470](https://github.com/ckeditor/ckeditor4/issues/1470): Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) is not visible after drag and drop of a widget it is attached to. -* [#1048](https://github.com/ckeditor/ckeditor4/issues/1048): Fixed: [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) is not positioned properly when a margin is added to its non-static parent. -* [#889](https://github.com/ckeditor/ckeditor4/issues/889): Fixed: Unclear error message for width and height fields in the [Image](https://ckeditor.com/cke4/addon/image) and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugins. -* [#859](https://github.com/ckeditor/ckeditor4/issues/859): Fixed: Cannot edit a link after a double-click on the text in the link. -* [#1013](https://github.com/ckeditor/ckeditor4/issues/1013): Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work correctly with the [`config.forcePasteAsPlainText`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forcePasteAsPlainText) option. -* [#1356](https://github.com/ckeditor/ckeditor4/issues/1356): Fixed: [Border parse function](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_parse.html#method-border) does not allow spaces in the color value. -* [#1010](https://github.com/ckeditor/ckeditor4/issues/1010): Fixed: The CSS `border` shorthand property was incorrectly expanded ignoring the `border-color` style. -* [#1535](https://github.com/ckeditor/ckeditor4/issues/1535): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) mouseover border contrast is insufficient. -* [#1516](https://github.com/ckeditor/ckeditor4/issues/1516): Fixed: Fake selection allows removing content in read-only mode using the Backspace and Delete keys. -* [#1570](https://github.com/ckeditor/ckeditor4/issues/1570): Fixed: Fake selection allows cutting content in read-only mode using the Ctrl/Cmd + X keys. -* [#1363](https://github.com/ckeditor/ckeditor4/issues/1363): Fixed: Paste notification is unclear and it might confuse users. - +* [#869](https://github.com/ckeditor/ckeditor4/issues/869): Fixed: Empty selection clears cached clipboard data in the + editor. +* [#1419](https://github.com/ckeditor/ckeditor4/issues/1419): Fixed: + The [Widget Selection](https://ckeditor.com/cke4/addon/widgetselection) plugin selects the editor content with + the Alt+A key combination on Windows. +* [#1274](https://github.com/ckeditor/ckeditor4/issues/1274): + Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) does not match a single selected image using + the [`contextDefinition.cssSelector`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_balloontoolbar_contextDefinition.html#property-cssSelector) + matcher. +* [#1232](https://github.com/ckeditor/ckeditor4/issues/1232): + Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) buttons should be registered as focusable + elements. +* [#1342](https://github.com/ckeditor/ckeditor4/issues/1342): + Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) should be re-positioned after + the [`change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event. +* [#1426](https://github.com/ckeditor/ckeditor4/issues/1426): [IE8-9] Fixed: + Missing [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) background in + the [Kama](https://ckeditor.com/cke4/addon/kama) skin. Thanks to [Christian Elmer](https://github.com/keinkurt)! +* [#1470](https://github.com/ckeditor/ckeditor4/issues/1470): + Fixed: [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) is not visible after drag and drop of a + widget it is attached to. +* [#1048](https://github.com/ckeditor/ckeditor4/issues/1048): + Fixed: [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) is not positioned properly when a margin is added + to its non-static parent. +* [#889](https://github.com/ckeditor/ckeditor4/issues/889): Fixed: Unclear error message for width and height fields in + the [Image](https://ckeditor.com/cke4/addon/image) and [Enhanced Image](https://ckeditor.com/cke4/addon/image2) + plugins. +* [#859](https://github.com/ckeditor/ckeditor4/issues/859): Fixed: Cannot edit a link after a double-click on the text + in the link. +* [#1013](https://github.com/ckeditor/ckeditor4/issues/1013): + Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work correctly with + the [`config.forcePasteAsPlainText`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-forcePasteAsPlainText) + option. +* [#1356](https://github.com/ckeditor/ckeditor4/issues/1356): + Fixed: [Border parse function](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_style_parse.html#method-border) + does not allow spaces in the color value. +* [#1010](https://github.com/ckeditor/ckeditor4/issues/1010): Fixed: The CSS `border` shorthand property was incorrectly + expanded ignoring the `border-color` style. +* [#1535](https://github.com/ckeditor/ckeditor4/issues/1535): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) + mouseover border contrast is insufficient. +* [#1516](https://github.com/ckeditor/ckeditor4/issues/1516): Fixed: Fake selection allows removing content in read-only + mode using the Backspace and Delete keys. +* [#1570](https://github.com/ckeditor/ckeditor4/issues/1570): Fixed: Fake selection allows cutting content in read-only + mode using the Ctrl/Cmd + X keys. +* [#1363](https://github.com/ckeditor/ckeditor4/issues/1363): Fixed: Paste notification is unclear and it might confuse + users. API Changes: -* [#1346](https://github.com/ckeditor/ckeditor4/issues/1346): [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) [context manager API](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.balloontoolbar.contextManager.html) is now available in the [`pluginDefinition.init()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#method-init) method of the [requiring](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#property-requires) plugin. -* [#1530](https://github.com/ckeditor/ckeditor4/issues/1530): Added the possibility to use custom icons for [buttons](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_button.html.html). +* [#1346](https://github.com/ckeditor/ckeditor4/issues/1346): [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) [context manager API](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.plugins.balloontoolbar.contextManager.html) + is now available in + the [`pluginDefinition.init()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#method-init) + method of + the [requiring](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_pluginDefinition.html#property-requires) + plugin. +* [#1530](https://github.com/ckeditor/ckeditor4/issues/1530): Added the possibility to use custom icons + for [buttons](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_button.html.html). Other Changes: -* Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugins: - * SCAYT [`scayt_minWordLength`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#scayt_minWordLength) configuration option now defaults to 3 instead of 4. - * SCAYT default number of suggested words in the context menu changed to 3. - * [#90](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/90): Fixed: Selection is lost on link creation if SCAYT highlights the word. - * Fixed: SCAYT crashes when the browser `localStorage` is disabled. - * [IE11] Fixed: `Unable to get property type of undefined or null reference` error in the browser console when SCAYT is disabled/enabled. - * [#46](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/46): Fixed: Editing is blocked when remote spell checker server is offline. - * Fixed: User Dictionary cannot be created in WSC due to `You already have the dictionary` error. - * Fixed: Words with apostrophe `'` on the replacement make the WSC dialog inaccessible. - * Fixed: SCAYT/WSC causes the `Uncaught TypeError` error in the browser console. -* [#1337](https://github.com/ckeditor/ckeditor4/issues/1337): Updated the samples layout with the new CKEditor 4 logo and color scheme. -* [#1591](https://github.com/ckeditor/ckeditor4/issues/1591): CKBuilder and language tools are now downloaded over HTTPS. Thanks to [August Detlefsen](https://github.com/augustd)! +* Updated [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) + and [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) (WSC) plugins: + * + SCAYT [`scayt_minWordLength`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#scayt_minWordLength) + configuration option now defaults to 3 instead of 4. + * SCAYT default number of suggested words in the context menu changed to 3. + * [#90](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/90): Fixed: Selection is lost on link + creation if SCAYT highlights the word. + * Fixed: SCAYT crashes when the browser `localStorage` is disabled. + * [IE11] Fixed: `Unable to get property type of undefined or null reference` error in the browser console when SCAYT + is disabled/enabled. + * [#46](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/46): Fixed: Editing is blocked when remote + spell checker server is offline. + * Fixed: User Dictionary cannot be created in WSC due to `You already have the dictionary` error. + * Fixed: Words with apostrophe `'` on the replacement make the WSC dialog inaccessible. + * Fixed: SCAYT/WSC causes the `Uncaught TypeError` error in the browser console. +* [#1337](https://github.com/ckeditor/ckeditor4/issues/1337): Updated the samples layout with the new CKEditor 4 logo + and color scheme. +* [#1591](https://github.com/ckeditor/ckeditor4/issues/1591): CKBuilder and language tools are now downloaded over + HTTPS. Thanks to [August Detlefsen](https://github.com/augustd)! ## CKEditor 4.8 **Important Notes:** -* [#1249](https://github.com/ckeditor/ckeditor4/issues/1249): Enabled the [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin by default in standard and full presets. Also, it will no longer log an error in case of missing [`config.imageUploadUrl`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-imageUploadUrl) property. +* [#1249](https://github.com/ckeditor/ckeditor4/issues/1249): Enabled + the [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin by default in standard and full presets. Also, + it will no longer log an error in case of + missing [`config.imageUploadUrl`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-imageUploadUrl) + property. New Features: -* [#933](https://github.com/ckeditor/ckeditor4/issues/933): Introduced [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) plugin. -* [#662](https://github.com/ckeditor/ckeditor4/issues/662): Introduced image inlining for the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#933](https://github.com/ckeditor/ckeditor4/issues/933): + Introduced [Balloon Toolbar](https://ckeditor.com/cke4/addon/balloontoolbar) plugin. +* [#662](https://github.com/ckeditor/ckeditor4/issues/662): Introduced image inlining for + the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. * [#468](https://github.com/ckeditor/ckeditor4/issues/468): [Edge] Introduced support for the Clipboard API. -* [#607](https://github.com/ckeditor/ckeditor4/issues/607): Manually inserted Hex color is prefixed with a hash character (`#`) if needed. It ensures a valid Hex color value is used when setting the table cell border or background color with the [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) window. -* [#584](https://github.com/ckeditor/ckeditor4/issues/584): [Font size and Family](https://ckeditor.com/cke4/addon/font) and [Format](https://ckeditor.com/cke4/addon/format) drop-downs are not toggleable anymore. Default option to reset styles added. -* [#856](https://github.com/ckeditor/ckeditor4/issues/856): Introduced the [`CKEDITOR.tools.keystrokeToArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-keystrokeToArray) method. It converts a keystroke into its string representation, returning every key name as a separate array element. -* [#1053](https://github.com/ckeditor/ckeditor4/issues/1053): Introduced the [`CKEDITOR.tools.object.merge()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-merge) method. It allows to merge two objects, returning the new object with all properties from both objects deeply cloned. -* [#1073](https://github.com/ckeditor/ckeditor4/issues/1073): Introduced the [`CKEDITOR.tools.array.every()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_array.html#method-every) method. It invokes a given test function on every array element and returns `true` if all elements pass the test. +* [#607](https://github.com/ckeditor/ckeditor4/issues/607): Manually inserted Hex color is prefixed with a hash + character (`#`) if needed. It ensures a valid Hex color value is used when setting the table cell border or background + color with the [Color Dialog](https://ckeditor.com/cke4/addon/colordialog) window. +* [#584](https://github.com/ckeditor/ckeditor4/issues/584): [Font size and Family](https://ckeditor.com/cke4/addon/font) + and [Format](https://ckeditor.com/cke4/addon/format) drop-downs are not toggleable anymore. Default option to reset + styles added. +* [#856](https://github.com/ckeditor/ckeditor4/issues/856): Introduced + the [`CKEDITOR.tools.keystrokeToArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools.html#method-keystrokeToArray) + method. It converts a keystroke into its string representation, returning every key name as a separate array element. +* [#1053](https://github.com/ckeditor/ckeditor4/issues/1053): Introduced + the [`CKEDITOR.tools.object.merge()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_object.html#method-merge) + method. It allows to merge two objects, returning the new object with all properties from both objects deeply cloned. +* [#1073](https://github.com/ckeditor/ckeditor4/issues/1073): Introduced + the [`CKEDITOR.tools.array.every()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_tools_array.html#method-every) + method. It invokes a given test function on every array element and returns `true` if all elements pass the test. Fixed Issues: * [#796](https://github.com/ckeditor/ckeditor4/issues/796): Fixed: A list is pasted from OneNote in the reversed order. -* [#834](https://github.com/ckeditor/ckeditor4/issues/834): [IE9-11] Fixed: The editor does not save the selected state of radio buttons inserted by the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin. -* [#704](https://github.com/ckeditor/ckeditor4/issues/704): [Edge] Fixed: Using Ctrl/Cmd + Z breaks widget structure. -* [#591](https://github.com/ckeditor/ckeditor4/issues/591): Fixed: A column is inserted in a wrong order inside the table if any cell has a vertical split. -* [#787](https://github.com/ckeditor/ckeditor4/issues/787): Fixed: Using Cut inside a nested table does not cut the selected content. -* [#842](https://github.com/ckeditor/ckeditor4/issues/842): Fixed: List style not restored when toggling list indent level in the [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugin. -* [#711](https://github.com/ckeditor/ckeditor4/issues/711): Fixed: Dragging widgets should only work with the left mouse button. -* [#862](https://github.com/ckeditor/ckeditor4/issues/862): Fixed: The "Object Styles" group in the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin is visible only if the whole element is selected. -* [#994](https://github.com/ckeditor/ckeditor4/pull/994): Fixed: Typo in the [`CKEDITOR.focusManager.focus()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_focusManager.html#method-focus) API documentation. Thanks to [benjy](https://github.com/benjy)! -* [#1014](https://github.com/ckeditor/ckeditor4/issues/1014): Fixed: The [Table Tools](https://ckeditor.com/cke4/addon/tabletools) Cell Properties dialog is now [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) aware — it is not possible to change the cell width or height if corresponding styles are disabled. -* [#877](https://github.com/ckeditor/ckeditor4/issues/877): Fixed: A list with custom bullets with exotic characters crashes the editor when [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#834](https://github.com/ckeditor/ckeditor4/issues/834): [IE9-11] Fixed: The editor does not save the selected state + of radio buttons inserted by the [Form Elements](https://ckeditor.com/cke4/addon/forms) plugin. +* [#704](https://github.com/ckeditor/ckeditor4/issues/704): [Edge] Fixed: Using Ctrl/Cmd + + Z breaks widget structure. +* [#591](https://github.com/ckeditor/ckeditor4/issues/591): Fixed: A column is inserted in a wrong order inside the + table if any cell has a vertical split. +* [#787](https://github.com/ckeditor/ckeditor4/issues/787): Fixed: Using Cut inside a nested table does not cut the + selected content. +* [#842](https://github.com/ckeditor/ckeditor4/issues/842): Fixed: List style not restored when toggling list indent + level in the [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugin. +* [#711](https://github.com/ckeditor/ckeditor4/issues/711): Fixed: Dragging widgets should only work with the left mouse + button. +* [#862](https://github.com/ckeditor/ckeditor4/issues/862): Fixed: The "Object Styles" group in + the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin is visible only if the whole element is + selected. +* [#994](https://github.com/ckeditor/ckeditor4/pull/994): Fixed: Typo in + the [`CKEDITOR.focusManager.focus()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_focusManager.html#method-focus) + API documentation. Thanks to [benjy](https://github.com/benjy)! +* [#1014](https://github.com/ckeditor/ckeditor4/issues/1014): Fixed: + The [Table Tools](https://ckeditor.com/cke4/addon/tabletools) Cell Properties dialog is + now [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) aware — it is not + possible to change the cell width or height if corresponding styles are disabled. +* [#877](https://github.com/ckeditor/ckeditor4/issues/877): Fixed: A list with custom bullets with exotic characters + crashes the editor when [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword). * [#605](https://github.com/ckeditor/ckeditor4/issues/605): Fixed: Inline widgets do not preserve trailing spaces. -* [#1008](https://github.com/ckeditor/ckeditor4/issues/1008): Fixed: Shorthand Hex colors from the [`config.colorButton_colors`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-colorButton_colors) option are not correctly highlighted in the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) Text Color or Background Color panel. -* [#1094](https://github.com/ckeditor/ckeditor4/issues/1094): Fixed: Widget definition [`upcast`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcasts) methods are called for every element. -* [#1057](https://github.com/ckeditor/ckeditor4/issues/1057): Fixed: The [Notification](https://ckeditor.com/addon/notification) plugin overwrites Web Notifications API due to leakage to the global scope. -* [#1068](https://github.com/ckeditor/ckeditor4/issues/1068): Fixed: Upload widget paste listener ignores changes to the [`uploadWidgetDefinition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html). -* [#921](https://github.com/ckeditor/ckeditor4/issues/921): Fixed: [Edge] CKEditor erroneously perceives internal copy and paste as type "external". -* [#1213](https://github.com/ckeditor/ckeditor4/issues/1213): Fixed: Multiple images uploaded using [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin are randomly duplicated or mangled. -* [#532](https://github.com/ckeditor/ckeditor4/issues/532): Fixed: Removed an outdated user guide link from the [About](https://ckeditor.com/cke4/addon/about) dialog. -* [#1221](https://github.com/ckeditor/ckeditor4/issues/1221): Fixed: Invalid CSS loaded by [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) plugin when [`config.skin`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-skin) is loaded using a custom path. -* [#522](https://github.com/ckeditor/ckeditor4/issues/522): Fixed: Widget selection is not removed when widget is inside table cell with [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin enabled. -* [#1027](https://github.com/ckeditor/ckeditor4/issues/1027): Fixed: Cannot add multiple images to the table with [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin in certain situations. -* [#1069](https://github.com/ckeditor/ckeditor4/issues/1069): Fixed: Wrong shape processing by [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#995](https://github.com/ckeditor/ckeditor4/issues/995): Fixed: Hyperlinked image gets inserted twice by [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#1287](https://github.com/ckeditor/ckeditor4/issues/1287): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) plugin throws exception if included in editor build but not loaded into editor's instance. +* [#1008](https://github.com/ckeditor/ckeditor4/issues/1008): Fixed: Shorthand Hex colors from + the [`config.colorButton_colors`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-colorButton_colors) + option are not correctly highlighted in the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) Text Color or + Background Color panel. +* [#1094](https://github.com/ckeditor/ckeditor4/issues/1094): Fixed: Widget + definition [`upcast`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcasts) + methods are called for every element. +* [#1057](https://github.com/ckeditor/ckeditor4/issues/1057): Fixed: + The [Notification](https://ckeditor.com/addon/notification) plugin overwrites Web Notifications API due to leakage to + the global scope. +* [#1068](https://github.com/ckeditor/ckeditor4/issues/1068): Fixed: Upload widget paste listener ignores changes to + the [`uploadWidgetDefinition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html). +* [#921](https://github.com/ckeditor/ckeditor4/issues/921): Fixed: [Edge] CKEditor erroneously perceives internal copy + and paste as type "external". +* [#1213](https://github.com/ckeditor/ckeditor4/issues/1213): Fixed: Multiple images uploaded + using [Upload Image](https://ckeditor.com/cke4/addon/uploadimage) plugin are randomly duplicated or mangled. +* [#532](https://github.com/ckeditor/ckeditor4/issues/532): Fixed: Removed an outdated user guide link from + the [About](https://ckeditor.com/cke4/addon/about) dialog. +* [#1221](https://github.com/ckeditor/ckeditor4/issues/1221): Fixed: Invalid CSS loaded + by [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) plugin + when [`config.skin`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-skin) is loaded using a + custom path. +* [#522](https://github.com/ckeditor/ckeditor4/issues/522): Fixed: Widget selection is not removed when widget is inside + table cell with [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin enabled. +* [#1027](https://github.com/ckeditor/ckeditor4/issues/1027): Fixed: Cannot add multiple images to the table + with [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin in certain situations. +* [#1069](https://github.com/ckeditor/ckeditor4/issues/1069): Fixed: Wrong shape processing + by [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#995](https://github.com/ckeditor/ckeditor4/issues/995): Fixed: Hyperlinked image gets inserted twice + by [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#1287](https://github.com/ckeditor/ckeditor4/issues/1287): Fixed: [Widget](https://ckeditor.com/cke4/addon/widget) + plugin throws exception if included in editor build but not loaded into editor's instance. API Changes: -* [#1097](https://github.com/ckeditor/ckeditor4/issues/1097): Widget [`upcast`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcast) methods are now called in the [widget definition's](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#property-definition) context. -* [#1118](https://github.com/ckeditor/ckeditor4/issues/1118): Added the `show` option in the [`balloonPanel.attach()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_balloonPanel.html#method-attach) method, allowing to attach a hidden [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) instance. -* [#1145](https://github.com/ckeditor/ckeditor4/issues/1145): Added the [`skipNotifications`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-skipNotifications) option to the [`CKEDITOR.fileTools.uploadWidgetDefinition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html), allowing to switch off default notifications displayed by upload widgets. +* [#1097](https://github.com/ckeditor/ckeditor4/issues/1097): + Widget [`upcast`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget_definition.html#property-upcast) + methods are now called in + the [widget definition's](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_plugins_widget.html#property-definition) + context. +* [#1118](https://github.com/ckeditor/ckeditor4/issues/1118): Added the `show` option in + the [`balloonPanel.attach()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_ui_balloonPanel.html#method-attach) + method, allowing to attach a hidden [Balloon Panel](https://ckeditor.com/cke4/addon/balloonpanel) instance. +* [#1145](https://github.com/ckeditor/ckeditor4/issues/1145): Added + the [`skipNotifications`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_fileTools_uploadWidgetDefinition.html#property-skipNotifications) + option to + the [`CKEDITOR.fileTools.uploadWidgetDefinition`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.fileTools.uploadWidgetDefinition.html), + allowing to switch off default notifications displayed by upload widgets. Other Changes: * [#815](https://github.com/ckeditor/ckeditor4/issues/815): Removed Node.js dependency from the CKEditor build script. -* [#1041](https://github.com/ckeditor/ckeditor4/pull/1041), [#1131](https://github.com/ckeditor/ckeditor4/issues/1131): Updated URLs pointing to [CKSource](https://cksource.com/) and [CKEditor](https://ckeditor.com/) resources after the launch of new websites. +* [#1041](https://github.com/ckeditor/ckeditor4/pull/1041), [#1131](https://github.com/ckeditor/ckeditor4/issues/1131): + Updated URLs pointing to [CKSource](https://cksource.com/) and [CKEditor](https://ckeditor.com/) resources after the + launch of new websites. ## CKEditor 4.7.3 New Features: -* [#568](https://github.com/ckeditor/ckeditor4/issues/568): Added possibility to adjust nested editables' filters using the [`CKEDITOR.filter.disallowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#property-disallowedContent) property. +* [#568](https://github.com/ckeditor/ckeditor4/issues/568): Added possibility to adjust nested editables' filters using + the [`CKEDITOR.filter.disallowedContent`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_filter.html#property-disallowedContent) + property. Fixed Issues: -* [#554](https://github.com/ckeditor/ckeditor4/issues/554): Fixed: [`change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event not fired when typing the first character after pasting into the editor. Thanks to [Daniel Miller](https://github.com/millerdev)! -* [#566](https://github.com/ckeditor/ckeditor4/issues/566): Fixed: The CSS `border` shorthand property with zero width (`border: 0px solid #000;`) causes the table to have the border attribute set to 1. -* [#779](https://github.com/ckeditor/ckeditor4/issues/779): Fixed: The [Remove Format](https://ckeditor.com/cke4/addon/removeformat) plugin removes elements with language definition inserted by the [Language](https://ckeditor.com/cke4/addon/language) plugin. -* [#423](https://github.com/ckeditor/ckeditor4/issues/423): Fixed: The [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin pastes paragraphs into the editor even if [`CKEDITOR.config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) is set to `CKEDITOR.ENTER_BR`. -* [#719](https://github.com/ckeditor/ckeditor4/issues/719): Fixed: Image inserted using the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin can be resized when the editor is in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). -* [#577](https://github.com/ckeditor/ckeditor4/issues/577): Fixed: The "Delete Columns" command provided by the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin throws an error when trying to delete columns. +* [#554](https://github.com/ckeditor/ckeditor4/issues/554): + Fixed: [`change`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#event-change) event not fired + when typing the first character after pasting into the editor. Thanks + to [Daniel Miller](https://github.com/millerdev)! +* [#566](https://github.com/ckeditor/ckeditor4/issues/566): Fixed: The CSS `border` shorthand property with zero + width (`border: 0px solid #000;`) causes the table to have the border attribute set to 1. +* [#779](https://github.com/ckeditor/ckeditor4/issues/779): Fixed: + The [Remove Format](https://ckeditor.com/cke4/addon/removeformat) plugin removes elements with language definition + inserted by the [Language](https://ckeditor.com/cke4/addon/language) plugin. +* [#423](https://github.com/ckeditor/ckeditor4/issues/423): Fixed: + The [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin pastes paragraphs into the editor even + if [`CKEDITOR.config.enterMode`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enterMode) is + set to `CKEDITOR.ENTER_BR`. +* [#719](https://github.com/ckeditor/ckeditor4/issues/719): Fixed: Image inserted using + the [Enhanced Image](https://ckeditor.com/cke4/addon/image2) plugin can be resized when the editor is + in [read-only mode](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_readonly.html). +* [#577](https://github.com/ckeditor/ckeditor4/issues/577): Fixed: The "Delete Columns" command provided by + the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin throws an error when trying to delete columns. * [#867](https://github.com/ckeditor/ckeditor4/issues/867): Fixed: Typing into a selected table throws an error. -* [#817](https://github.com/ckeditor/ckeditor4/issues/817): Fixed: The [Save](https://ckeditor.com/cke4/addon/save) plugin does not work in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea). +* [#817](https://github.com/ckeditor/ckeditor4/issues/817): Fixed: The [Save](https://ckeditor.com/cke4/addon/save) + plugin does not work in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea). Other Changes: * Updated the [WebSpellChecker](https://ckeditor.com/cke4/addon/wsc) plugin: - * [#40](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/40): Fixed: IE10 throws an error when spell checking is started. -* [#800](https://github.com/ckeditor/ckeditor4/issues/800): Added the [`CKEDITOR.dom.selection.isCollapsed()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#method-isCollapsed) method which is a simpler way to check if the selection is collapsed. -* [#830](https://github.com/ckeditor/ckeditor4/issues/830): Added an option to define which dialog tab should be shown by default when creating [`CKEDITOR.dialogCommand`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dialogCommand.html). + * [#40](https://github.com/WebSpellChecker/ckeditor-plugin-wsc/issues/40): Fixed: IE10 throws an error when spell + checking is started. +* [#800](https://github.com/ckeditor/ckeditor4/issues/800): Added + the [`CKEDITOR.dom.selection.isCollapsed()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_selection.html#method-isCollapsed) + method which is a simpler way to check if the selection is collapsed. +* [#830](https://github.com/ckeditor/ckeditor4/issues/830): Added an option to define which dialog tab should be shown + by default when + creating [`CKEDITOR.dialogCommand`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dialogCommand.html). ## CKEditor 4.7.2 New Features: -* [#455](https://github.com/ckeditor/ckeditor4/issues/455): Added [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) integration with the [Justify](https://ckeditor.com/cke4/addon/justify) plugin. +* [#455](https://github.com/ckeditor/ckeditor4/issues/455): + Added [Advanced Content Filter](https://ckeditor.com/docs/ckeditor4/latest/guide/dev_acf.html) integration with + the [Justify](https://ckeditor.com/cke4/addon/justify) plugin. Fixed Issues: -* [#663](https://github.com/ckeditor/ckeditor4/issues/663): [Chrome] Fixed: Clicking the scrollbar throws an `Uncaught TypeError: element.is is not a function` error. -* [#694](https://github.com/ckeditor/ckeditor4/pull/694): Refactoring in the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin: - * [#520](https://github.com/ckeditor/ckeditor4/issues/520): Fixed: Widgets cannot be properly pasted into a table cell. - * [#460](https://github.com/ckeditor/ckeditor4/issues/460): Fixed: Editor gone after pasting into an editor within a table. -* [#579](https://github.com/ckeditor/ckeditor4/issues/579): Fixed: Internal `cke_table-faked-selection-table` class is visible in the Stylesheet Classes field of the [Table Properties](https://ckeditor.com/cke4/addon/table) dialog. -* [#545](https://github.com/ckeditor/ckeditor4/issues/545): [Edge] Fixed: Error thrown when pressing the [Select All](https://ckeditor.com/cke4/addon/selectall) button in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea). -* [#582](https://github.com/ckeditor/ckeditor4/issues/582): Fixed: Double slash in the path to stylesheet needed by the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. Thanks to [Marius Dumitru Florea](https://github.com/mflorea)! -* [#491](https://github.com/ckeditor/ckeditor4/issues/491): Fixed: Unnecessary dependency on the [Editor Toolbar](https://ckeditor.com/cke4/addon/toolbar) plugin inside the [Notification](https://ckeditor.com/cke4/addon/notification) plugin. -* [#646](https://github.com/ckeditor/ckeditor4/issues/646): Fixed: Error thrown into the browser console after opening the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin menu in the editor without any selection. -* [#501](https://github.com/ckeditor/ckeditor4/issues/501): Fixed: Double click does not open the dialog for modifying anchors inserted via the [Link](https://ckeditor.com/cke4/addon/link) plugin. -* [#9780](https://dev.ckeditor.com/ticket/9780): [IE8-9] Fixed: Clicking inside an empty [read-only](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) editor throws an error. -* [#16820](https://dev.ckeditor.com/ticket/16820): [IE10] Fixed: Clicking below a single horizontal rule throws an error. -* [#426](https://github.com/ckeditor/ckeditor4/issues/426): Fixed: The [`range.cloneContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-cloneContents) method selects the whole element when the selection starts at the beginning of that element. -* [#644](https://github.com/ckeditor/ckeditor4/issues/644): Fixed: The [`range.extractContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-extractContents) method returns an incorrect result when multiple nodes are selected. -* [#684](https://github.com/ckeditor/ckeditor4/issues/684): Fixed: The [`elementPath.contains()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_elementPath.html#method-contains) method incorrectly excludes the last element instead of root when the `fromTop` parameter is set to `true`. +* [#663](https://github.com/ckeditor/ckeditor4/issues/663): [Chrome] Fixed: Clicking the scrollbar throws + an `Uncaught TypeError: element.is is not a function` error. +* [#694](https://github.com/ckeditor/ckeditor4/pull/694): Refactoring in + the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin: + * [#520](https://github.com/ckeditor/ckeditor4/issues/520): Fixed: Widgets cannot be properly pasted into a table + cell. + * [#460](https://github.com/ckeditor/ckeditor4/issues/460): Fixed: Editor gone after pasting into an editor within a + table. +* [#579](https://github.com/ckeditor/ckeditor4/issues/579): Fixed: Internal `cke_table-faked-selection-table` class is + visible in the Stylesheet Classes field of the [Table Properties](https://ckeditor.com/cke4/addon/table) dialog. +* [#545](https://github.com/ckeditor/ckeditor4/issues/545): [Edge] Fixed: Error thrown when pressing + the [Select All](https://ckeditor.com/cke4/addon/selectall) button + in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea). +* [#582](https://github.com/ckeditor/ckeditor4/issues/582): Fixed: Double slash in the path to stylesheet needed by + the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin. Thanks + to [Marius Dumitru Florea](https://github.com/mflorea)! +* [#491](https://github.com/ckeditor/ckeditor4/issues/491): Fixed: Unnecessary dependency on + the [Editor Toolbar](https://ckeditor.com/cke4/addon/toolbar) plugin inside + the [Notification](https://ckeditor.com/cke4/addon/notification) plugin. +* [#646](https://github.com/ckeditor/ckeditor4/issues/646): Fixed: Error thrown into the browser console after opening + the [Styles Combo](https://ckeditor.com/cke4/addon/stylescombo) plugin menu in the editor without any selection. +* [#501](https://github.com/ckeditor/ckeditor4/issues/501): Fixed: Double click does not open the dialog for modifying + anchors inserted via the [Link](https://ckeditor.com/cke4/addon/link) plugin. +* [#9780](https://dev.ckeditor.com/ticket/9780): [IE8-9] Fixed: Clicking inside an + empty [read-only](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#property-readOnly) editor throws + an error. +* [#16820](https://dev.ckeditor.com/ticket/16820): [IE10] Fixed: Clicking below a single horizontal rule throws an + error. +* [#426](https://github.com/ckeditor/ckeditor4/issues/426): Fixed: + The [`range.cloneContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-cloneContents) + method selects the whole element when the selection starts at the beginning of that element. +* [#644](https://github.com/ckeditor/ckeditor4/issues/644): Fixed: + The [`range.extractContents()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-extractContents) + method returns an incorrect result when multiple nodes are selected. +* [#684](https://github.com/ckeditor/ckeditor4/issues/684): Fixed: + The [`elementPath.contains()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_elementPath.html#method-contains) + method incorrectly excludes the last element instead of root when the `fromTop` parameter is set to `true`. Other Changes: * Updated the [SCAYT](https://ckeditor.com/cke4/addon/scayt) (Spell Check As You Type) plugin: - * [#148](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/148): Fixed: SCAYT leaves underlined word after the CKEditor Replace dialog corrects it. -* [#751](https://github.com/ckeditor/ckeditor4/issues/751): Added the [`CKEDITOR.dom.nodeList.toArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_nodeList.html#method-toArray) method which returns an array representation of a [node list](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dom.nodeList.html). + * [#148](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/148): Fixed: SCAYT leaves underlined word + after the CKEditor Replace dialog corrects it. +* [#751](https://github.com/ckeditor/ckeditor4/issues/751): Added + the [`CKEDITOR.dom.nodeList.toArray()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_nodeList.html#method-toArray) + method which returns an array representation of + a [node list](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.dom.nodeList.html). ## CKEditor 4.7.1 New Features: -* Added a new Mexican Spanish localization. Thanks to [David Alexandro Rodriguez](https://www.transifex.com/user/profile/darsco16/)! -* [#413](https://github.com/ckeditor/ckeditor4/issues/413): Added Paste as Plain Text keyboard shortcut to the [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) instructions. +* Added a new Mexican Spanish localization. Thanks + to [David Alexandro Rodriguez](https://www.transifex.com/user/profile/darsco16/)! +* [#413](https://github.com/ckeditor/ckeditor4/issues/413): Added Paste as Plain Text keyboard shortcut to + the [Accessibility Help](https://ckeditor.com/cke4/addon/a11yhelp) instructions. Fixed Issues: -* [#515](https://github.com/ckeditor/ckeditor4/issues/515): [Chrome] Fixed: Mouse actions on CKEditor scrollbar throw an exception when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is loaded. -* [#493](https://github.com/ckeditor/ckeditor4/issues/493): Fixed: Selection started from a nested table causes an error in the browser while scrolling down. -* [#415](https://github.com/ckeditor/ckeditor4/issues/415): [Firefox] Fixed: Enter key breaks the table structure when pressed in a table selection. -* [#457](https://github.com/ckeditor/ckeditor4/issues/457): Fixed: Error thrown when deleting content from the editor with no selection. -* [#478](https://github.com/ckeditor/ckeditor4/issues/478): [Chrome] Fixed: Error thrown by the [Enter Key](https://ckeditor.com/cke4/addon/enterkey) plugin when pressing Enter with no selection. -* [#424](https://github.com/ckeditor/ckeditor4/issues/424): Fixed: Error thrown by [Tab Key Handling](https://ckeditor.com/cke4/addon/tab) and [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugins when pressing Tab with no selection in inline editor. -* [#476](https://github.com/ckeditor/ckeditor4/issues/476): Fixed: Anchors inserted with the [Link](https://ckeditor.com/cke4/addon/link) plugin on collapsed selection cannot be edited. -* [#417](https://github.com/ckeditor/ckeditor4/issues/417): Fixed: The [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin throws an error when used with a table with only header or footer rows. -* [#523](https://github.com/ckeditor/ckeditor4/issues/523): Fixed: The [`editor.getCommandKeystroke()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) method does not obtain the correct keystroke. -* [#534](https://github.com/ckeditor/ckeditor4/issues/534): [IE] Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work in Quirks Mode. -* [#450](https://github.com/ckeditor/ckeditor4/issues/450): Fixed: [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.html) incorrectly transforms the `margin` CSS property. +* [#515](https://github.com/ckeditor/ckeditor4/issues/515): [Chrome] Fixed: Mouse actions on CKEditor scrollbar throw an + exception when the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin is loaded. +* [#493](https://github.com/ckeditor/ckeditor4/issues/493): Fixed: Selection started from a nested table causes an error + in the browser while scrolling down. +* [#415](https://github.com/ckeditor/ckeditor4/issues/415): [Firefox] Fixed: Enter key breaks the table + structure when pressed in a table selection. +* [#457](https://github.com/ckeditor/ckeditor4/issues/457): Fixed: Error thrown when deleting content from the editor + with no selection. +* [#478](https://github.com/ckeditor/ckeditor4/issues/478): [Chrome] Fixed: Error thrown by + the [Enter Key](https://ckeditor.com/cke4/addon/enterkey) plugin when pressing Enter with no selection. +* [#424](https://github.com/ckeditor/ckeditor4/issues/424): Fixed: Error thrown + by [Tab Key Handling](https://ckeditor.com/cke4/addon/tab) + and [Indent List](https://ckeditor.com/cke4/addon/indentlist) plugins when pressing Tab with no selection + in inline editor. +* [#476](https://github.com/ckeditor/ckeditor4/issues/476): Fixed: Anchors inserted with + the [Link](https://ckeditor.com/cke4/addon/link) plugin on collapsed selection cannot be edited. +* [#417](https://github.com/ckeditor/ckeditor4/issues/417): Fixed: + The [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin throws an error when used with a table with + only header or footer rows. +* [#523](https://github.com/ckeditor/ckeditor4/issues/523): Fixed: + The [`editor.getCommandKeystroke()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) + method does not obtain the correct keystroke. +* [#534](https://github.com/ckeditor/ckeditor4/issues/534): [IE] + Fixed: [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) does not work in Quirks Mode. +* [#450](https://github.com/ckeditor/ckeditor4/issues/450): + Fixed: [`CKEDITOR.filter`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.filter.html) incorrectly transforms + the `margin` CSS property. ## CKEditor 4.7 **Important Notes:** -* [#13793](https://dev.ckeditor.com/ticket/13793): The [`embed_provider`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-embed_provider) configuration option for the [Media Embed](https://ckeditor.com/cke4/addon/embed) and [Semantic Media Embed](https://ckeditor.com/cke4/addon/embedsemantic) plugins is no longer preset by default. -* The [UI Color](https://ckeditor.com/cke4/addon/uicolor) plugin now uses a custom color picker instead of the `YUI 2.7.0` library which has some known vulnerabilities (it's a security precaution, there was no security issue in CKEditor due to the way it was used). +* [#13793](https://dev.ckeditor.com/ticket/13793): + The [`embed_provider`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-embed_provider) + configuration option for the [Media Embed](https://ckeditor.com/cke4/addon/embed) + and [Semantic Media Embed](https://ckeditor.com/cke4/addon/embedsemantic) plugins is no longer preset by default. +* The [UI Color](https://ckeditor.com/cke4/addon/uicolor) plugin now uses a custom color picker instead of + the `YUI 2.7.0` library which has some known vulnerabilities (it's a security precaution, there was no security issue + in CKEditor due to the way it was used). New Features: -* [#16755](https://dev.ckeditor.com/ticket/16755): Added the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin that lets you select and manipulate an arbitrary rectangular table fragment (a few cells, a row or a column). +* [#16755](https://dev.ckeditor.com/ticket/16755): Added + the [Table Selection](https://ckeditor.com/cke4/addon/tableselection) plugin that lets you select and manipulate an + arbitrary rectangular table fragment (a few cells, a row or a column). * [#16961](https://dev.ckeditor.com/ticket/16961): Added support for pasting from Microsoft Excel. -* [#13381](https://dev.ckeditor.com/ticket/13381): Dynamic code evaluation call in [`CKEDITOR.template`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.template.html) removed. CKEditor can now be used without the `unsafe-eval` Content Security Policy. Thanks to [Caridy PatiГ±o](http://caridy.name)! -* [#16971](https://dev.ckeditor.com/ticket/16971): Added support for color in the `background` property containing also other styles for table cells in the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin. -* [#16847](https://dev.ckeditor.com/ticket/16847): Added support for parsing and inlining any formatting created using the Microsoft Word style system to the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#16818](https://dev.ckeditor.com/ticket/16818): Added table cell height parsing in the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#16850](https://dev.ckeditor.com/ticket/16850): Added a new [`config.enableContextMenu`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enableContextMenu) configuration option for enabling and disabling the [context menu](https://ckeditor.com/cke4/addon/contextmenu). -* [#16937](https://dev.ckeditor.com/ticket/16937): The `command` parameter in [`CKEDITOR.editor.getCommandKeystroke()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) now also accepts a command name as an argument. -* [#17010](https://dev.ckeditor.com/ticket/17010): The [`CKEDITOR.dom.range.shrink()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-shrink) method now allows for skipping bogus `
    ` elements. +* [#13381](https://dev.ckeditor.com/ticket/13381): Dynamic code evaluation call + in [`CKEDITOR.template`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.template.html) removed. CKEditor can + now be used without the `unsafe-eval` Content Security Policy. Thanks to [Caridy PatiГ±o](http://caridy.name)! +* [#16971](https://dev.ckeditor.com/ticket/16971): Added support for color in the `background` property containing also + other styles for table cells in the [Table Tools](https://ckeditor.com/cke4/addon/tabletools) plugin. +* [#16847](https://dev.ckeditor.com/ticket/16847): Added support for parsing and inlining any formatting created using + the Microsoft Word style system to the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#16818](https://dev.ckeditor.com/ticket/16818): Added table cell height parsing in + the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#16850](https://dev.ckeditor.com/ticket/16850): Added a + new [`config.enableContextMenu`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_config.html#cfg-enableContextMenu) + configuration option for enabling and disabling the [context menu](https://ckeditor.com/cke4/addon/contextmenu). +* [#16937](https://dev.ckeditor.com/ticket/16937): The `command` parameter + in [`CKEDITOR.editor.getCommandKeystroke()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_editor.html#method-getCommandKeystroke) + now also accepts a command name as an argument. +* [#17010](https://dev.ckeditor.com/ticket/17010): + The [`CKEDITOR.dom.range.shrink()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR_dom_range.html#method-shrink) + method now allows for skipping bogus `
    ` elements. Fixed Issues: -* [#16935](https://dev.ckeditor.com/ticket/16935): [Chrome] Fixed: Blurring the editor in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea) throws an error. +* [#16935](https://dev.ckeditor.com/ticket/16935): [Chrome] Fixed: Blurring the editor + in [Source Mode](https://ckeditor.com/cke4/addon/sourcearea) throws an error. * [#16825](https://dev.ckeditor.com/ticket/16825): [Chrome] Fixed: Error thrown when destroying a focused inline editor. -* [#16857](https://dev.ckeditor.com/ticket/16857): Fixed: Ctrl+Shift+V blocked by [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting). -* [#16845](https://dev.ckeditor.com/ticket/16845): [IE] Fixed: Cursor jumps to the top of the scrolled editor after focusing it when the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin is enabled. -* [#16786](https://dev.ckeditor.com/ticket/16786): Fixed: Added missing translations for the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin. -* [#14714](https://dev.ckeditor.com/ticket/14714): [WebKit/Blink] Fixed: Exception thrown on refocusing a blurred inline editor. -* [#16913](https://dev.ckeditor.com/ticket/16913): [Firefox, IE] Fixed: [Paste as Plain Text](https://ckeditor.com/cke4/addon/pastetext) keystroke does not work. -* [#16968](https://dev.ckeditor.com/ticket/16968): Fixed: [Safari] [Paste as Plain Text](https://ckeditor.com/cke4/addon/pastetext) is not handled by the editor. -* [#16912](https://dev.ckeditor.com/ticket/16912): Fixed: Exception thrown when a single image is pasted using [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword). -* [#16821](https://dev.ckeditor.com/ticket/16821): Fixed: Extraneous `` elements with `height` style stacked when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword). -* [#16866](https://dev.ckeditor.com/ticket/16866): [IE, Edge] Fixed: Whitespaces not preserved when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword). -* [#16860](https://dev.ckeditor.com/ticket/16860): Fixed: Paragraphs which only look like lists incorrectly transformed into them when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword). -* [#16817](https://dev.ckeditor.com/ticket/16817): Fixed: When [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword), paragraphs are transformed into lists with some corrupted data. -* [#16833](https://dev.ckeditor.com/ticket/16833): [IE11] Fixed: Malformed list with headers [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword). -* [#16826](https://dev.ckeditor.com/ticket/16826): [IE] Fixed: Superfluous paragraphs within lists [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword). -* [#12465](https://dev.ckeditor.com/ticket/12465): Fixed: Cannot change the state of checkboxes or radio buttons if the properties dialog was invoked with a double-click. -* [#13062](https://dev.ckeditor.com/ticket/13062): Fixed: Impossible to unlink when the caret is at the edge of the link. -* [#13585](https://dev.ckeditor.com/ticket/13585): Fixed: Error when wrapping two adjacent `
    ` elements with a `
    `. -* [#16811](https://dev.ckeditor.com/ticket/16811): Fixed: Table alignment is not preserved by the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#16810](https://dev.ckeditor.com/ticket/16810): Fixed: Vertical align in tables is not supported by the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. -* [#11956](https://dev.ckeditor.com/ticket/11956): [Blink, IE] Fixed: [Link](https://ckeditor.com/cke4/addon/link) dialog does not open on a double click on the second word of the link with a background color or other styles. -* [#10472](https://dev.ckeditor.com/ticket/10472): Fixed: Unable to use [Table Resize](https://ckeditor.com/cke4/addon/tableresize) on table header and footer. -* [#14762](https://dev.ckeditor.com/ticket/14762): Fixed: Hovering over an empty table (without rows or cells) throws an error when the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin is active. -* [#16777](https://dev.ckeditor.com/ticket/16777): [Edge] Fixed: The [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin does not allow to drop widgets into the editor. -* [#14894](https://dev.ckeditor.com/ticket/14894): [Chrome] Fixed: The editor scrolls to the top after focusing or when a dialog is opened. -* [#14769](https://dev.ckeditor.com/ticket/14769): Fixed: URLs with '-' in host are not detected by the [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin. -* [#16804](https://dev.ckeditor.com/ticket/16804): Fixed: Focus is not on the first menu item when the user opens a context menu or a drop-down list from the editor toolbar. +* [#16857](https://dev.ckeditor.com/ticket/16857): Fixed: Ctrl+Shift+V blocked + by [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting). +* [#16845](https://dev.ckeditor.com/ticket/16845): [IE] Fixed: Cursor jumps to the top of the scrolled editor after + focusing it when the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin is enabled. +* [#16786](https://dev.ckeditor.com/ticket/16786): Fixed: Added missing translations for + the [Copy Formatting](https://ckeditor.com/cke4/addon/copyformatting) plugin. +* [#14714](https://dev.ckeditor.com/ticket/14714): [WebKit/Blink] Fixed: Exception thrown on refocusing a blurred inline + editor. +* [#16913](https://dev.ckeditor.com/ticket/16913): [Firefox, IE] + Fixed: [Paste as Plain Text](https://ckeditor.com/cke4/addon/pastetext) keystroke does not work. +* [#16968](https://dev.ckeditor.com/ticket/16968): + Fixed: [Safari] [Paste as Plain Text](https://ckeditor.com/cke4/addon/pastetext) is not handled by the editor. +* [#16912](https://dev.ckeditor.com/ticket/16912): Fixed: Exception thrown when a single image is pasted + using [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#16821](https://dev.ckeditor.com/ticket/16821): Fixed: Extraneous `` elements with `height` style stacked + when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#16866](https://dev.ckeditor.com/ticket/16866): [IE, Edge] Fixed: Whitespaces not preserved + when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#16860](https://dev.ckeditor.com/ticket/16860): Fixed: Paragraphs which only look like lists incorrectly transformed + into them when [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#16817](https://dev.ckeditor.com/ticket/16817): Fixed: + When [pasting from Word](https://ckeditor.com/cke4/addon/pastefromword), paragraphs are transformed into lists with + some corrupted data. +* [#16833](https://dev.ckeditor.com/ticket/16833): [IE11] Fixed: Malformed list with + headers [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#16826](https://dev.ckeditor.com/ticket/16826): [IE] Fixed: Superfluous paragraphs within + lists [pasted from Word](https://ckeditor.com/cke4/addon/pastefromword). +* [#12465](https://dev.ckeditor.com/ticket/12465): Fixed: Cannot change the state of checkboxes or radio buttons if the + properties dialog was invoked with a double-click. +* [#13062](https://dev.ckeditor.com/ticket/13062): Fixed: Impossible to unlink when the caret is at the edge of the + link. +* [#13585](https://dev.ckeditor.com/ticket/13585): Fixed: Error when wrapping two adjacent `
    ` elements with + a `
    `. +* [#16811](https://dev.ckeditor.com/ticket/16811): Fixed: Table alignment is not preserved by + the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#16810](https://dev.ckeditor.com/ticket/16810): Fixed: Vertical align in tables is not supported by + the [Paste from Word](https://ckeditor.com/cke4/addon/pastefromword) plugin. +* [#11956](https://dev.ckeditor.com/ticket/11956): [Blink, IE] Fixed: [Link](https://ckeditor.com/cke4/addon/link) + dialog does not open on a double click on the second word of the link with a background color or other styles. +* [#10472](https://dev.ckeditor.com/ticket/10472): Fixed: Unable to + use [Table Resize](https://ckeditor.com/cke4/addon/tableresize) on table header and footer. +* [#14762](https://dev.ckeditor.com/ticket/14762): Fixed: Hovering over an empty table (without rows or cells) throws an + error when the [Table Resize](https://ckeditor.com/cke4/addon/tableresize) plugin is active. +* [#16777](https://dev.ckeditor.com/ticket/16777): [Edge] Fixed: + The [Clipboard](https://ckeditor.com/cke4/addon/clipboard) plugin does not allow to drop widgets into the editor. +* [#14894](https://dev.ckeditor.com/ticket/14894): [Chrome] Fixed: The editor scrolls to the top after focusing or when + a dialog is opened. +* [#14769](https://dev.ckeditor.com/ticket/14769): Fixed: URLs with '-' in host are not detected by + the [Auto Link](https://ckeditor.com/cke4/addon/autolink) plugin. +* [#16804](https://dev.ckeditor.com/ticket/16804): Fixed: Focus is not on the first menu item when the user opens a + context menu or a drop-down list from the editor toolbar. * [#14407](https://dev.ckeditor.com/ticket/14407): [IE] Fixed: Non-editable widgets can be edited. -* [#16927](https://dev.ckeditor.com/ticket/16927): Fixed: An error thrown if a bundle containing the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin is run in ES5 strict mode. Thanks to [Igor Rubinovich](https://github.com/IgorRubinovich)! -* [#16920](https://dev.ckeditor.com/ticket/16920): Fixed: Several plugins not using the [Dialog](https://ckeditor.com/cke4/addon/dialog) plugin as a direct dependency. -* [PR#336](https://github.com/ckeditor/ckeditor4/pull/336): Fixed: Typo in [`CKEDITOR.getCss()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getCss) API documentation. Thanks to [knusperpixel](https://github.com/knusperpixel)! +* [#16927](https://dev.ckeditor.com/ticket/16927): Fixed: An error thrown if a bundle containing + the [Color Button](https://ckeditor.com/cke4/addon/colorbutton) plugin is run in ES5 strict mode. Thanks + to [Igor Rubinovich](https://github.com/IgorRubinovich)! +* [#16920](https://dev.ckeditor.com/ticket/16920): Fixed: Several plugins not using + the [Dialog](https://ckeditor.com/cke4/addon/dialog) plugin as a direct dependency. +* [PR#336](https://github.com/ckeditor/ckeditor4/pull/336): Fixed: Typo + in [`CKEDITOR.getCss()`](https://ckeditor.com/docs/ckeditor4/latest/api/CKEDITOR.html#method-getCss) API + documentation. Thanks to [knusperpixel](https://github.com/knusperpixel)! * [#17027](https://dev.ckeditor.com/ticket/17027): Fixed: Command event data should be initialized as an empty object. -* Fixed the behavior of HTML parser when parsing `src`/`srcdoc` attributes of the `