-
+ {if="$mode == 'blog'"}
+
+ {else}
+
+ {/if}
+
- + + {$c->__('post.older')} + + +
diff --git a/README.md b/README.md
index 147c224..75f2f92 100644
--- a/README.md
+++ b/README.md
@@ -5,10 +5,14 @@ Movim is a decentralized social network, written in PHP and HTML5 and based on t
You need a "valid" (example: StartSSL) certificate to use Movim, auto-signed is not allowed.
-Current Movim version : 0.9 git2015-09-22
+Current Movim version : 0.9 git2015-11-13
**Changelog**
+1.1 ?
+- Update to Movim 0.9 git2015-11-13 to fix a bug (impossible to login)
+- conf/nginx.conf : proxy_read_timeout and proxy_send_timeout set to 14400s (4h) to avoid disconnect
+
1.0 2015-10-21
- Stable release
diff --git a/sources/app/assets/js/movim_tpl.js b/sources/app/assets/js/movim_tpl.js
index 8566332..52fd3db 100644
--- a/sources/app/assets/js/movim_tpl.js
+++ b/sources/app/assets/js/movim_tpl.js
@@ -87,10 +87,10 @@ var MovimTpl = {
}
},
isPanelScrolled : function() {
- var selector = document.querySelector('main section > div:first-child:nth-last-child(2) ~ div div');
+ var selector = document.querySelector('main section > div:first-child:nth-last-child(2) ~ div div');
if(selector != null) {
- return (selector.scrollHeight - selector.scrollTop === selector.clientHeight);
+ return (selector.scrollHeight - Math.floor(selector.scrollTop) === selector.clientHeight);
}
},
scrollPanel : function() {
diff --git a/sources/app/assets/js/movim_utils.js b/sources/app/assets/js/movim_utils.js
index 6e92b56..c94e06f 100644
--- a/sources/app/assets/js/movim_utils.js
+++ b/sources/app/assets/js/movim_utils.js
@@ -116,9 +116,20 @@ function movim_form_to_json(formname) {
* @param DOMElement textbox
*/
function movim_textarea_autoheight(textbox) {
- if(textbox != null ) {
- textbox.style.height = 0;
- textbox.style.height = textbox.scrollHeight +"px";
+ if(textbox != null) {
+ var val = textbox.value;
+ val = val.replace(/\n/g, '
');
+ var hidden = document.querySelector('#hiddendiv');
+ hidden.innerHTML = val + '
';
+
+ textboxStyle = window.getComputedStyle(textbox);
+
+ hidden.style.paddingTop = textboxStyle.paddingTop;
+ hidden.style.paddingBottom = textboxStyle.paddingBottom;
+ hidden.style.width = textboxStyle.width;
+ hidden.style.fontSize = textboxStyle.fontSize;
+
+ textbox.style.height = hidden.scrollHeight+"px";
}
}
diff --git a/sources/app/helpers/StringHelper.php b/sources/app/helpers/StringHelper.php
index 2ff9590..bca47df 100644
--- a/sources/app/helpers/StringHelper.php
+++ b/sources/app/helpers/StringHelper.php
@@ -50,9 +50,9 @@ class MovimEmoji
function addUrls($string, $preview = false) {
// Add missing links
return preg_replace_callback(
- "/([\w\"'>]+\:\/\/[\w-?&;#+%:~=\.\/\@]+[\w\/])/", function ($match) use($preview) {
+ "/([\w\"'>]+\:\/\/[\w-?'&;#+,%:~=\.\/\@]+)/u", function ($match) use($preview) {
if(!in_array(substr($match[0], 0, 1), array('>', '"', '\''))) {
- $content = $match[0];
+ $content = $match[0];
if($preview) {
try {
@@ -258,7 +258,7 @@ function sizeToCleanSize($size)
{
$units = array( 'B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
$power = $size > 0 ? floor(log($size, 1024)) : 0;
- return number_format($size / pow(1024, $power), 2, '.', ',') . ' ' . $units[$power];
+ return number_format($size / pow(1024, $power), 7, '.', ',') . ' ' . $units[$power];
}
/**
@@ -308,6 +308,50 @@ function stringToColor($string) {
}
}
+/**
+ * Strip tags and add a whitespace
+ * @param string
+ * @return string
+ */
+function stripTags($string)
+{
+ return strip_tags(preg_replace('/(<\/[^>]+?>)(<[^>\/][^>]*?>)/', '$1 $2', $string));
+}
+
+/**
+ * Purify a string
+ * @param string
+ * @return string
+ */
+function purifyHTML($string)
+{
+ $config = \HTMLPurifier_Config::createDefault();
+ $config->set('HTML.Doctype', 'HTML 4.01 Transitional');
+ $config->set('Cache.SerializerPath', '/tmp');
+ $config->set('HTML.DefinitionID', 'html5-definitions');
+ $config->set('HTML.DefinitionRev', 1);
+ if ($def = $config->maybeGetRawHTMLDefinition()) {
+ $def->addElement('video', 'Block', 'Optional: (source, Flow) | (Flow, source) | Flow', 'Common', array(
+ 'src' => 'URI',
+ 'type' => 'Text',
+ 'width' => 'Length',
+ 'height' => 'Length',
+ 'poster' => 'URI',
+ 'preload' => 'Enum#auto,metadata,none',
+ 'controls' => 'Bool',
+ ));
+ $def->addElement('audio', 'Block', 'Optional: (source, Flow) | (Flow, source) | Flow', 'Common', array(
+ 'src' => 'URI',
+ 'preload' => 'Enum#auto,metadata,none',
+ 'muted' => 'Bool',
+ 'controls' => 'Bool',
+ ));
+ }
+
+ $purifier = new \HTMLPurifier($config);
+ return $purifier->purify($string);
+}
+
/**
* Return the first two letters of a string
* @param string
diff --git a/sources/app/models/config/Config.php b/sources/app/models/config/Config.php
index e4c514a..bb829a5 100644
--- a/sources/app/models/config/Config.php
+++ b/sources/app/models/config/Config.php
@@ -14,7 +14,6 @@ class Config extends Model {
public $unregister;
public $username;
public $password;
- public $rewrite;
public $sizelimit;
public function __construct() {
@@ -42,8 +41,6 @@ class Config extends Model {
{"type":"string", "size":32, "mandatory":true },
"password" :
{"type":"string", "size":64, "mandatory":true },
- "rewrite" :
- {"type":"int", "size":1 },
"sizelimit" :
{"type":"int", "size":16 }
}';
@@ -61,7 +58,6 @@ class Config extends Model {
$this->unregister = false;
$this->username = 'admin';
$this->password = sha1('password');
- $this->rewrite = false;
$this->sizelimit = 20240001;
}
}
diff --git a/sources/app/models/config/ConfigDAO.php b/sources/app/models/config/ConfigDAO.php
index e6b1d61..ca0b0dc 100644
--- a/sources/app/models/config/ConfigDAO.php
+++ b/sources/app/models/config/ConfigDAO.php
@@ -17,7 +17,6 @@ class ConfigDAO extends SQL {
unregister = :unregister,
username = :username,
password = :password,
- rewrite = :rewrite,
sizelimit = :sizelimit';
$this->prepare(
@@ -34,7 +33,6 @@ class ConfigDAO extends SQL {
'unregister' => $c->unregister,
'username' => $c->username,
'password' => $c->password,
- 'rewrite' => $c->rewrite,
'sizelimit' => $c->sizelimit
)
);
@@ -67,7 +65,6 @@ class ConfigDAO extends SQL {
unregister,
username,
password,
- rewrite,
sizelimit
)
values
@@ -83,7 +80,6 @@ class ConfigDAO extends SQL {
:unregister,
:username,
:password,
- :rewrite,
:sizelimit
)
';
@@ -102,7 +98,6 @@ class ConfigDAO extends SQL {
'unregister' => $c->unregister,
'username' => $c->username,
'password' => $c->password,
- 'rewrite' => $c->rewrite,
'sizelimit' => $c->sizelimit
)
);
diff --git a/sources/app/models/contact/Contact.php b/sources/app/models/contact/Contact.php
index f27132c..95a5ee2 100644
--- a/sources/app/models/contact/Contact.php
+++ b/sources/app/models/contact/Contact.php
@@ -436,11 +436,11 @@ class Contact extends Model {
function isOld() {
if(strtotime($this->updated) < mktime( // We update the 1 day old vcards
- 0,
- 0,
- 0,
+ gmdate("H"),
+ gmdate("i")-10,
+ gmdate("s"),
gmdate("m"),
- gmdate("d")-1,
+ gmdate("d"),
gmdate("Y")
)
) {
diff --git a/sources/app/models/postn/Postn.php b/sources/app/models/postn/Postn.php
index 8e44040..e979fb2 100644
--- a/sources/app/models/postn/Postn.php
+++ b/sources/app/models/postn/Postn.php
@@ -2,6 +2,8 @@
namespace Modl;
+use Respect\Validation\Validator;
+
class Postn extends Model {
public $origin; // Where the post is comming from (jid or server)
public $node; // microblog or pubsub
@@ -13,6 +15,7 @@ class Postn extends Model {
public $title; //
public $content; // The content
+ public $contentraw; // The raw content
public $contentcleaned; // The cleanned content
public $commentplace;
@@ -54,6 +57,8 @@ class Postn extends Model {
{"type":"text" },
"content" :
{"type":"text" },
+ "contentraw" :
+ {"type":"text" },
"contentcleaned" :
{"type":"text" },
"commentplace" :
@@ -100,6 +105,10 @@ class Postn extends Model {
return (string)$dom->saveHTML();
break;
case 'text':
+ if(trim($c) != '') {
+ $this->__set('contentraw', trim($c));
+ }
+ break;
default :
$content = (string)$c;
break;
@@ -197,9 +206,8 @@ class Postn extends Model {
$this->__set('commentplace', $this->origin);
$this->__set('content', trim($content));
- //$this->__set('contentcleaned', prepareString(html_entity_decode($this->content)));
- $purifier = new \HTMLPurifier();
- $this->contentcleaned = $purifier->purify(html_entity_decode($this->content));
+
+ $this->contentcleaned = purifyHTML(html_entity_decode($this->content));
if($entry->entry->geoloc) {
if($entry->entry->geoloc->lat != 0)
@@ -258,6 +266,7 @@ class Postn extends Model {
array_push($attachements['files'], $l);
}
break;
+ case 'related' :
case 'alternate' :
array_push($attachements['links'], array('href' => $l['href'], 'url' => parse_url($l['href'])));
break;
@@ -272,6 +281,26 @@ class Postn extends Model {
return $attachements;
}
+ public function getAttachement()
+ {
+ $attachements = $this->getAttachements();
+ if(isset($attachements['pictures'])) {
+ return $attachements['pictures'][0];
+ }
+ if(isset($attachements['files'])) {
+ return $attachements['files'][0];
+ }
+ if(isset($attachements['links'])) {
+ foreach($attachements['links'] as $link) {
+ if(Validator::url()->validate($link['href'])) {
+ return $link;
+ }
+ }
+ return false;
+ }
+ return false;
+ }
+
public function getPicture()
{
$attachements = $this->getAttachements();
@@ -281,7 +310,8 @@ class Postn extends Model {
}
}
- public function getPlace() {
+ public function getPlace()
+ {
if(isset($this->lat, $this->lon) && $this->lat != '' && $this->lon != '') {
return true;
}
@@ -289,7 +319,8 @@ class Postn extends Model {
return false;
}
- public function isMine() {
+ public function isMine()
+ {
$user = new \User();
if($this->aid == $user->getLogin()
@@ -299,7 +330,8 @@ class Postn extends Model {
return false;
}
- public function getUUID() {
+ public function getUUID()
+ {
if(substr($this->nodeid, 10) == 'urn:uuid:') {
return $this->nodeid;
} else {
@@ -307,11 +339,39 @@ class Postn extends Model {
}
}
- public function isMicroblog() {
- if($this->node == "urn:xmpp:microblog:0")
+ public function isMicroblog()
+ {
+ if($this->node == "urn:xmpp:microblog:0") {
return true;
- else
+ } else {
return false;
+ }
+ }
+
+ public function isEditable()
+ {
+ return ($this->contentraw != null);
+ }
+
+ public function isShort()
+ {
+ return (strlen($this->contentcleaned) < 500);
+ }
+
+ public function getPublicUrl()
+ {
+ if($this->isMicroblog()) {
+ return \Route::urlize('blog', array($this->origin));
+ } else {
+ return \Route::urlize('grouppublic', array($this->origin, $this->node));
+ }
+ }
+
+ public function isPublic() {
+ if(isset($this->privacy) && $this->privacy) {
+ return true;
+ }
+ return false;
}
}
diff --git a/sources/app/models/postn/PostnDAO.php b/sources/app/models/postn/PostnDAO.php
index 3889783..44d0405 100644
--- a/sources/app/models/postn/PostnDAO.php
+++ b/sources/app/models/postn/PostnDAO.php
@@ -12,6 +12,7 @@ class PostnDAO extends SQL {
title = :title,
content = :content,
+ contentraw = :contentraw,
contentcleaned = :contentcleaned,
commentplace = :commentplace,
@@ -42,6 +43,7 @@ class PostnDAO extends SQL {
'title' => $post->title,
'content' => $post->content,
+ 'contentraw' => $post->contentraw,
'contentcleaned' => $post->contentcleaned,
'commentplace' => $post->commentplace,
@@ -81,6 +83,7 @@ class PostnDAO extends SQL {
title,
content,
+ contentraw,
contentcleaned,
commentplace,
@@ -108,6 +111,7 @@ class PostnDAO extends SQL {
:title,
:content,
+ :contentraw,
:contentcleaned,
:commentplace,
@@ -135,6 +139,7 @@ class PostnDAO extends SQL {
'title' => $post->title,
'content' => $post->content,
+ 'contentraw' => $post->contentraw,
'contentcleaned' => $post->contentcleaned,
'commentplace' => $post->commentplace,
@@ -229,8 +234,8 @@ class PostnDAO extends SQL {
and postn.node = :node
order by postn.published desc';
- if($limitr)
- $this->_sql = $this->_sql.' limit '.$limitr.' offset '.$limitf;
+ if($limitr !== false)
+ $this->_sql = $this->_sql.' limit '.(int)$limitr.' offset '.(int)$limitf;
$this->prepare(
'Postn',
@@ -391,8 +396,8 @@ class PostnDAO extends SQL {
and privacy.value = 1
order by postn.published desc';
- if($limitr)
- $this->_sql = $this->_sql.' limit '.$limitr.' offset '.$limitf;
+ if($limitr !== false)
+ $this->_sql = $this->_sql.' limit '.(int)$limitr.' offset '.(int)$limitf;
$this->prepare(
'Postn',
diff --git a/sources/app/views/page.tpl b/sources/app/views/page.tpl
index f11aaac..21281fa 100644
--- a/sources/app/views/page.tpl
+++ b/sources/app/views/page.tpl
@@ -50,6 +50,7 @@
+
{$contact->description}
+ {/if}- {if="$value->getContact()->getTrueName() != ''"} + {if="$value->getContact()->getTrueName() != '' && $value->privacy"} {$value->getContact()->getTrueName()} – {/if} {$value->published|strtotime|prepareDate} @@ -101,101 +105,128 @@
+ {$value->contentraw} +
+- {$value->content} -
-![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
+ ||||||
![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
+ ||||||
![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
+ ||||||
![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
+ ||||||
![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
+ ||||||
![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
+ ||||||
![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
+ ||||||
![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
+ ||||||
![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
- ![]() |
+
{$c->__('message.encrypted')}
{else} -{$message->body|prepareString|strip_tags}
+{$message->body|prepareString|stripTags}
{/if} {/if} {/if} diff --git a/sources/app/widgets/Chats/chats.js b/sources/app/widgets/Chats/chats.js index 36550c6..ce89d3e 100644 --- a/sources/app/widgets/Chats/chats.js +++ b/sources/app/widgets/Chats/chats.js @@ -17,8 +17,6 @@ var Chats = { Notification_ajaxClear('chat|' + this.dataset.jid); Notification.current('chat|' + this.dataset.jid); movim_add_class(this, 'active'); - - MovimTpl.scrollPanel(); } items[i].onmousedown = function(e) { diff --git a/sources/app/widgets/Chats/chats.tpl b/sources/app/widgets/Chats/chats.tpl index b693fb0..c3c8ed8 100644 --- a/sources/app/widgets/Chats/chats.tpl +++ b/sources/app/widgets/Chats/chats.tpl @@ -2,7 +2,7 @@ diff --git a/sources/app/widgets/Chats/locales.ini b/sources/app/widgets/Chats/locales.ini index 18770ee..b4b8e16 100644 --- a/sources/app/widgets/Chats/locales.ini +++ b/sources/app/widgets/Chats/locales.ini @@ -1,6 +1,6 @@ [chats] empty_title = No chats yet... -empty = Open a new conversation by clicking on the plus button bellow or visit the Contacts page. +empty = Open a new conversation by clicking on the %s button bellow or visit the %s Contacts%s page. add = Chat with a contact frequent = Frequent contacts more = Load more contacts diff --git a/sources/app/widgets/Contact/Contact.php b/sources/app/widgets/Contact/Contact.php index 35eac2c..40c155c 100644 --- a/sources/app/widgets/Contact/Contact.php +++ b/sources/app/widgets/Contact/Contact.php @@ -72,6 +72,9 @@ class Contact extends WidgetBase $a = new Moxl\Xec\Action\Avatar\Get; $a->setTo(echapJid($jid))->request(); + $v = new Moxl\Xec\Action\Vcard\Get; + $v->setTo(echapJid($jid))->request(); + $r = new Get; $r->setTo(echapJid($jid))->request(); } @@ -204,10 +207,12 @@ class Contact extends WidgetBase if($c == null || $c->created == null - || $c->isEmpty() + //|| $c->isEmpty() || $c->isOld()) { - $c = new \Modl\Contact; - $c->jid = $jid; + if($c == null) { + $c = new \Modl\Contact; + $c->jid = $jid; + } $this->ajaxRefreshVcard($jid); } @@ -217,7 +222,9 @@ class Contact extends WidgetBase $pd = new \Modl\PostnDAO; $gallery = $pd->getGallery($jid); - $blog = $pd->getPublic($jid, 'urn:xmpp:microblog:0', 1, 0); + $blog = $pd->getPublic($jid, 'urn:xmpp:microblog:0', 0, 4); + + $presencestxt = getPresencesTxt(); if(isset($c)) { $view->assign('mood', getMood()); @@ -234,6 +241,10 @@ class Contact extends WidgetBase $cad = new \Modl\CapsDAO(); $caps = $cad->get($node); + if($cr->value != null) { + $view->assign('presence', $presencestxt[$cr->value]); + } + if( isset($caps) && $caps->name != '' diff --git a/sources/app/widgets/Contact/_contact.tpl b/sources/app/widgets/Contact/_contact.tpl index ab6c7bf..09d0dc6 100644 --- a/sources/app/widgets/Contact/_contact.tpl +++ b/sources/app/widgets/Contact/_contact.tpl @@ -11,11 +11,11 @@{$value->contentcleaned|strip_tags}
+ {$value->published|strtotime|prepareDate} +{$blog[0]->contentcleaned|strip_tags:''}
ajaxTogglePrivacy($id);
+ }
+
function prepareEmpty()
{
$id = new \modl\ItemDAO();
diff --git a/sources/app/widgets/Group/_group_empty.tpl b/sources/app/widgets/Group/_group_empty.tpl
index 588b429..4d5e8a6 100644
--- a/sources/app/widgets/Group/_group_empty.tpl
+++ b/sources/app/widgets/Group/_group_empty.tpl
@@ -13,7 +13,7 @@
{$c->___('group.help_info2', '', ' ')}
{$c->___('group.help_info3', '')}
- {$c->___('group.help_info4', '','')}
+ {$c->___('group.help_info4', ' ','')}
- {$value->content} + {$value->contentraw}
{/loop} diff --git a/sources/app/widgets/Groups/_groups_server.tpl b/sources/app/widgets/Groups/_groups_server.tpl index 1bff3c0..56a664d 100644 --- a/sources/app/widgets/Groups/_groups_server.tpl +++ b/sources/app/widgets/Groups/_groups_server.tpl @@ -3,7 +3,7 @@{if="$value->sub > 0"} - {$c->__('groups.sub', $value->sub)} - + {$c->__('groups.sub', $value->sub)} + {/if} + {if="$value->sub > 0 && $value->num > 0"} + - + {/if} + {if="$value->num > 0"} + {$c->__('groups.num', $value->num)} {/if} - {$c->__('groups.num', $value->num)}
{$c->__('groups.empty_text1')} {$c->__('groups.empty_text2')}
+{$c->__('hello.enter_paragraph')}
{$c->__('hello.menu_paragraph')}
+{$value->contentcleaned|strip_tags}
+{$value->contentcleaned|stripTags}
{/loop} {if="count($items) == $paging"} diff --git a/sources/app/widgets/Notification/Notification.php b/sources/app/widgets/Notification/Notification.php index 060638d..a8185db 100644 --- a/sources/app/widgets/Notification/Notification.php +++ b/sources/app/widgets/Notification/Notification.php @@ -38,9 +38,10 @@ class Notification extends WidgetBase $explode = explode('|', $key); $first = reset($explode); - if($notifs_key != null && $first == $notifs_key) return; - - RPC::call('Notification.android', $title, $body, $picture, $action); + // What we receive is not what it's on the screen on Android + if($key != null && $key != $notifs_key) { + RPC::call('Notification.android', $title, $body, $picture, $action); + } if(array_key_exists($first, $notifs)) { $notifs[$first]++; @@ -48,6 +49,8 @@ class Notification extends WidgetBase $notifs[$first] = 1; } + if($notifs_key != null && $key == $notifs_key) return; + RPC::call('Notification.counter', $first, $notifs[$first]); if($first != $key) { diff --git a/sources/app/widgets/Notification/notification.js b/sources/app/widgets/Notification/notification.js index 6706baa..aaa8210 100644 --- a/sources/app/widgets/Notification/notification.js +++ b/sources/app/widgets/Notification/notification.js @@ -10,6 +10,7 @@ var Notification = { document_title : document.title, notifs_key : '', favicon : null, + electron : null, inhibit : function(sec) { Notification.inhibed = true; @@ -64,10 +65,20 @@ var Notification = { displayTab : function() { if(Notification.tab_counter1 == 0 && Notification.tab_counter2 == 0) { document.title = Notification.document_title; - Notification.favicon.badge(0); + + if(Notification.favicon != null) + Notification.favicon.badge(0); + + if(Notification.electron != null) + Notification.electron.notification(false); } else { - Notification.favicon.badge(Notification.tab_counter1 + Notification.tab_counter2); document.title = '(' + Notification.tab_counter1 + '/' + Notification.tab_counter2 + ') ' + Notification.document_title; + + if(Notification.favicon != null) + Notification.favicon.badge(Notification.tab_counter1 + Notification.tab_counter2); + + if(Notification.electron != null) + Notification.electron.notification(Notification.tab_counter1 + Notification.tab_counter2); } }, current : function(key) { @@ -114,8 +125,6 @@ var Notification = { || Notification.focused || typeof DesktopNotification === 'undefined') return; - console.log(Notification.focused); - var notification = new DesktopNotification(title, { icon: picture, body: body }); if(action !== null) { @@ -133,11 +142,19 @@ var Notification = { } MovimWebsocket.attach(function() { - Notification.favicon = new Favico({ - animation: 'none', - fontStyle: 'normal', - bgColor: '#FF5722' - }); + if(typeof Favico != 'undefined') { + Notification.favicon = new Favico({ + animation: 'none', + fontStyle: 'normal', + bgColor: '#FF5722' + }); + } + + if(typeof require !== 'undefined') { + var remote = require('remote'); + Notification.electron = remote.getCurrentWindow(); + } + Notification.document_title = document.title; Notification_ajaxGet(); Notification.current(Notification.notifs_key); diff --git a/sources/app/widgets/Post/Post.php b/sources/app/widgets/Post/Post.php index 25baa46..606a6e0 100644 --- a/sources/app/widgets/Post/Post.php +++ b/sources/app/widgets/Post/Post.php @@ -222,11 +222,11 @@ class Post extends WidgetBase if($po->isMine()) { if($po->privacy == 1) { - Notification::append(false, $this->__('post.blog_remove')); + Notification::append(false, $this->__('post.public_no')); \Modl\Privacy::set($id, 0); } if($po->privacy == 0) { - Notification::append(false, $this->__('post.blog_add')); + Notification::append(false, $this->__('post.public_yes')); \Modl\Privacy::set($id, 1); } } diff --git a/sources/app/widgets/Post/_post.tpl b/sources/app/widgets/Post/_post.tpl index 666d6ae..a8cf6e1 100644 --- a/sources/app/widgets/Post/_post.tpl +++ b/sources/app/widgets/Post/_post.tpl @@ -60,6 +60,13 @@- {$value->content} + {$value->contentraw}