diff --git a/CHANGELOG b/CHANGELOG
index cecd7da..339f727 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,7 +1,7 @@
**Changelog**
1.7 2016-?
-- Update to movim 0.9 git2016-02-25
+- Update to movim 0.9 git2016-03-06
- conf/nginx.conf : disable the Yunohost logo
1.6.1 2016-02-12
diff --git a/README.md b/README.md
index 4277bf6..50f1ad3 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@ Movim is a decentralized social network, written in PHP and HTML5 and based on t
It is recommended to use a "valid" certificate to use Movim, auto-signed is sometimes problematic. You might want to take a look a StartSSL or Let's Encrypt.
-Provided Movim version : 0.9 git2016-02-25
+Provided Movim version : 0.9 git2016-03-06
Please read CHANGELOG.
diff --git a/sources/app/assets/js/movim_tpl.js b/sources/app/assets/js/movim_tpl.js
index ef5f46f..38c85e7 100644
--- a/sources/app/assets/js/movim_tpl.js
+++ b/sources/app/assets/js/movim_tpl.js
@@ -112,11 +112,15 @@ var MovimTpl = {
return (selector.scrollHeight - Math.floor(selector.scrollTop) === selector.clientHeight);
}
},
- scrollPanel : function() {
+ scrollPanel : function(time) {
var selector = document.querySelector('main section > div:first-child:nth-last-child(2) ~ div div');
+ if(typeof time == 'undefined') time = 0;
+
if(selector != null) {
- selector.scrollTop = selector.scrollHeight;
+ setTimeout(function() {
+ selector.scrollTop = selector.scrollHeight;
+ }, time);
}
},
scrollPanelTop : function() {
diff --git a/sources/app/helpers/StringHelper.php b/sources/app/helpers/StringHelper.php
index cf3ff4c..1ea7f95 100644
--- a/sources/app/helpers/StringHelper.php
+++ b/sources/app/helpers/StringHelper.php
@@ -99,7 +99,7 @@ function prepareString($string, $large = false, $preview = false) {
$string = addUrls($string, $preview);
// We remove all the style attributes
- $string = preg_replace_callback(
+ /*$string = preg_replace_callback(
'/(<[^>]+) style=".*?"/i', function($match) {
return $match[1];
}, $string
@@ -136,7 +136,7 @@ function prepareString($string, $large = false, $preview = false) {
'#<[/]?ss[^>]*>#is', function ($match) {
return '';
}, ' ' . $string
- );
+ );*/
// We add some smileys...
$emoji = MovimEmoji::getInstance();
diff --git a/sources/app/models/message/Message.php b/sources/app/models/message/Message.php
index 451493f..881947f 100644
--- a/sources/app/models/message/Message.php
+++ b/sources/app/models/message/Message.php
@@ -127,7 +127,6 @@ class Message extends Model {
$this->published = gmdate('Y-m-d H:i:s', strtotime($parent->delay->attributes()->stamp));
else
$this->published = gmdate('Y-m-d H:i:s');
- $this->delivered = gmdate('Y-m-d H:i:s');
}
}
diff --git a/sources/app/models/message/MessageDAO.php b/sources/app/models/message/MessageDAO.php
index 276cdd7..f8cc3de 100644
--- a/sources/app/models/message/MessageDAO.php
+++ b/sources/app/models/message/MessageDAO.php
@@ -11,7 +11,7 @@ class MessageDAO extends SQL {
html = :html,
published = :published,
delivered = :delivered,
- edited = 1
+ edited = :edited
where session = :session
and id = :id
@@ -25,6 +25,7 @@ class MessageDAO extends SQL {
'id' => $message->id,
'session' => $message->session,
'jidto' => $message->jidto,
+ 'edited' => $message->edited,
'jidfrom' => $message->jidfrom,
'body' => $message->body,
'html' => $message->html,
@@ -91,6 +92,25 @@ class MessageDAO extends SQL {
return $this->run('Message');
}
+ function getId($id)
+ {
+ $this->_sql = '
+ select * from message
+ where session = :session
+ and id = :id
+ limit 1';
+
+ $this->prepare(
+ 'Message',
+ array(
+ 'session' => $this->_user,
+ 'id' => $id
+ )
+ );
+
+ return $this->run('Message', 'item');
+ }
+
function getLastItem($to)
{
$this->_sql = '
diff --git a/sources/app/views/page.tpl b/sources/app/views/page.tpl
index d8a0527..c52c776 100644
--- a/sources/app/views/page.tpl
+++ b/sources/app/views/page.tpl
@@ -49,6 +49,6 @@
widget('Dialog');?>
widget('Notification');?>
content();?>
-
+