Commit 1c54e6e3 authored by Dominik George's avatar Dominik George

New upstream version 0.14.2~rc4

parent ae1c1666

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

<?php
$finder = PhpCsFixer\Finder::create()
->exclude([
'assets',
'cache',
'etc',
'locales',
'theme',
'users',
'vendor'
])
->in(__DIR__);
;
return PhpCsFixer\Config::create()
->setRules([
'psr0' => false,
'@PSR2' => true,
])
->setFinder($finder)
;
\ No newline at end of file
Movim Changelog
================
v0.15 (trunk)
v0.14.2 (trunk)
---------------------------
* Redesign the Communities page
* Center verticaly the content of cards when they are displayed as flexbox
* Give feedback when a new Communities Server is explored (#804)
* Fix Undefined variable: url in _communitysubscriptions.tpl (#802)
* Fix short columns length in SQL database (#801)
* Fix XMPP whitelist also filter XMPP servers on registration page (#773)
* Allow users to set a local nickname and handle blog urls with this nickname
* Fix "Forever composing" (#130) + ids for composing/paused states
* Add support of XEP-0367: Message Attaching, add Reactions feature in Movim
* Add zlib compression in the websocket (using pako.js for the decompression)
v0.14.1
---------------------------
......@@ -29,7 +39,7 @@ v0.14.1
* Allow setting Avatars on Communities by combining XEP-0084 (metadata + url) and XEP-0060
* UI fixes for mobile (tabs)
v0.14
v0.14 – Scotty
---------------------------
* Add a picture picker when sharing a URL in a post
* Merge Publish in PublishBrief
......@@ -81,7 +91,7 @@ v0.14
* Improve video call and terminate flows
* Allow the usage of Markdown for the Login page information
v0.13
v0.13 – Coggia
---------------------------
* Update ReactPHP
* Use PHP ZeroMQ to manage the communications between the processes
......
......@@ -9,6 +9,8 @@ Installation
------------
Please refer to the installation instructions that are available on the GitHub Wiki: https://github.com/movim/movim/wiki
Movim is also available as a [Docker image](https://github.com/movim/movim_docker) or as a [Debian package](https://packages.debian.org/sid/movim).
Support Us
----------
You can help Movim by:
......@@ -16,7 +18,6 @@ You can help Movim by:
* Helping us covering our monthly costs on our official Patreon page: [![Donate](https://img.shields.io/badge/Patreon-Become%20a%20Patron-orange.svg)](https://www.patreon.com/movim)
* …or on Liberapay [![Donate](https://img.shields.io/liberapay/receives/movim.svg)](https://liberapay.com/movim/donate)
You can also support us on:
* Flattr: https://flattr.com/thing/568092/Movim
* Bountysource: https://www.bountysource.com/teams/movim
......@@ -30,9 +31,9 @@ Links
### Pods
You can also use Movim on our official Pods:
* https://fr.movim.eu/ server hosted in France
* https://nl.movim.eu/ server hosted in The Netherlands
* https://de.movim.eu/ server hosted in Germany
* https://fi.movim.eu/ server hosted in Finland
* https://jp.mov.im/ server hosted in Japan
Translations
------------
......
0.14.1
\ No newline at end of file
0.14.2rc4
......@@ -19,4 +19,3 @@ class Attachment extends Model
return parse_url($this->href);
}
}
......@@ -76,7 +76,8 @@ class Cache extends Model
private function _writeCache($key, $object)
{
$data = str_replace(
"'", "\\'",
"'",
"\\'",
base64_encode(gzcompress(serialize($object)))
);
......
......@@ -77,9 +77,15 @@ class Capability extends Model
public function getDeviceIcon()
{
if (in_array($this->type, ['handheld', 'phone'])) return 'smartphone';
if ($this->type == 'bot') return 'memory';
if ($this->type == 'console') return 'video_label';
if (in_array($this->type, ['handheld', 'phone'])) {
return 'smartphone';
}
if ($this->type == 'bot') {
return 'memory';
}
if ($this->type == 'console') {
return 'video_label';
}
if ($this->type == 'web') {
if ($this->name == 'Movim') {
return 'cloud_queue';
......
......@@ -15,7 +15,6 @@ class Configuration extends Model
'info',
'unregister',
'restrictsuggestions',
'theme',
'locale',
'loglevel',
'username',
......@@ -29,7 +28,6 @@ class Configuration extends Model
protected $attributes = [
'id' => 1,
'unregister' => false,
'theme' => 'material',
'restrictsuggestions' => false,
'loglevel' => 0,
'locale' => 'en',
......
......@@ -58,7 +58,8 @@ class Contact extends Model
if (filter_var((string)$vcard->vCard->PHOTO, FILTER_VALIDATE_URL)) {
$this->photobin = base64_encode(
requestUrl((string)$vcard->vCard->PHOTO, 1));
requestUrl((string)$vcard->vCard->PHOTO, 1)
);
} elseif ($vcard->vCard->PHOTO) {
$this->photobin = (string)$vcard->vCard->PHOTO->BINVAL;
$this->avatarhash = sha1(base64_decode($this->photobin));
......@@ -71,7 +72,9 @@ class Contact extends Model
public function createThumbnails()
{
if (!$this->photobin) return;
if (!$this->photobin) {
return;
}
$p = new Picture;
$p->fromBase($this->photobin);
......@@ -100,8 +103,9 @@ class Contact extends Model
$this->loctext = (string)$stanza->items->item->geoloc->text;
$this->locuri = (string)$stanza->items->item->geoloc->uri;
$this->loctimestamp = date(
'Y-m-d H:i:s',
strtotime((string)$stanza->items->item->geoloc->timestamp));
'Y-m-d H:i:s',
strtotime((string)$stanza->items->item->geoloc->timestamp)
);
}
public function setTune($stanza)
......@@ -148,18 +152,24 @@ class Contact extends Model
if ($this->loctext != '') {
$place .= $this->loctext.' ';
} else {
if ($this->locbuilding != '')
if ($this->locbuilding != '') {
$place .= $this->locbuilding.' ';
if ($this->locstreet != '')
}
if ($this->locstreet != '') {
$place .= $this->locstreet.'<br />';
if ($this->locpostalcode != '')
}
if ($this->locpostalcode != '') {
$place .= $this->locpostalcode.' ';
if ($this->loclocality != '')
}
if ($this->loclocality != '') {
$place .= $this->loclocality.'<br />';
if ($this->locregion != '')
}
if ($this->locregion != '') {
$place .= $this->locregion.' - ';
if ($this->loccountry != '')
}
if ($this->loccountry != '') {
$place .= $this->loccountry;
}
}
return $place;
......@@ -167,9 +177,15 @@ class Contact extends Model
public function getTruenameAttribute(): string
{
if ($this->fn) return $this->fn;
if ($this->nickname) return $this->nickname;
if ($this->name) return $this->name;
if ($this->fn) {
return $this->fn;
}
if ($this->nickname) {
return $this->nickname;
}
if ($this->name) {
return $this->name;
}
return explodeJid($this->id)['username'];
}
......@@ -183,17 +199,20 @@ class Contact extends Model
{
if ($this->isValidDate()) {
$age = intval(substr(date('Ymd') - date('Ymd', strtotime($this->date)), 0, -4));
if ($age != 0)
if ($age != 0) {
return $age;
}
}
}
public function getDate()
{
if ($this->date == null) return null;
if ($this->date == null) {
return null;
}
$dt = new \DateTime($this->date);
return $dt->format('d-m-Y');
return $dt->format('Y-m-d');
}
public function getSearchTerms()
......@@ -203,6 +222,16 @@ class Contact extends Model
cleanupId($this->groupname);
}
public function getBlogUrl()
{
return \Movim\Route::urlize(
'blog',
($this->user && isset($this->user->nickname))
? $this->user->nickname
: $this->id
);
}
public function isEmpty(): bool
{
$this->isValidDate();
......@@ -237,11 +266,11 @@ class Contact extends Model
{
return (strtotime($this->updated) < mktime( // We update the 1 day old vcards
gmdate("H"),
gmdate("i")-10,
gmdate("s"),
gmdate("m"),
gmdate("d"),
gmdate("Y")
gmdate("i")-10,
gmdate("s"),
gmdate("m"),
gmdate("d"<