From f28979f687a771f8aab147061f027265567bee44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaussoin=20Timoth=C3=A9e?= Date: Sat, 16 May 2015 21:31:20 +0200 Subject: [PATCH] - Fix the Contact and Chat widget for escaped JID - Get the affiliations on the groups "normally" (using a JS request) --- app/widgets/Chat/Chat.php | 6 ++---- app/widgets/Chat/_chat.tpl | 5 +++-- app/widgets/Chats/Chats.php | 2 +- app/widgets/Contact/Contact.php | 2 +- app/widgets/Group/Group.php | 1 - app/widgets/Groups/groups.js | 2 +- linker.php | 10 ++++++---- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/app/widgets/Chat/Chat.php b/app/widgets/Chat/Chat.php index 40335945d..7122cbf8b 100644 --- a/app/widgets/Chat/Chat.php +++ b/app/widgets/Chat/Chat.php @@ -505,17 +505,15 @@ class Chat extends WidgetBase */ private function validateJid($jid) { - $validate_jid = Validator::email()->noWhitespace()->length(6, 60); + $validate_jid = Validator::string()->noWhitespace()->length(6, 60); if(!$validate_jid->validate($jid)) return false; else return true; } function display() { - $validate_jid = Validator::email()->length(6, 40); - $this->view->assign('jid', false); - if($validate_jid->validate($this->get('f'))) { + if($this->validateJid($this->get('f'))) { $this->view->assign('jid', $this->get('f')); } } diff --git a/app/widgets/Chat/_chat.tpl b/app/widgets/Chat/_chat.tpl index d434e81b8..fd9fe97d7 100644 --- a/app/widgets/Chat/_chat.tpl +++ b/app/widgets/Chat/_chat.tpl @@ -10,7 +10,7 @@ {$c->ajaxSmileyGet('😃')} -
+
@@ -18,10 +18,11 @@