mirror of
https://github.com/YunoHost-Apps/movim_ynh.git
synced 2024-09-03 19:46:19 +02:00
Update to movim 20150818
This commit is contained in:
parent
cb9c93f893
commit
1bef41b550
563 changed files with 1012 additions and 582 deletions
|
@ -5,12 +5,13 @@ Movim is a decentralized social network, written in PHP and HTML5 and based on t
|
|||
|
||||
Warning: BETA.
|
||||
|
||||
Current Movim version : 20150810.
|
||||
Current Movim version : 20150818.
|
||||
|
||||
**Changelog**
|
||||
|
||||
0.6b 2015-08-19
|
||||
- Replace 'www-data' system user with 'movim'
|
||||
- Update to upstream Movim 20150818.
|
||||
|
||||
0.5b 2015-08-17
|
||||
- Add default port (9537)
|
||||
|
|
0
sources/CHANGELOG.md
Executable file → Normal file
0
sources/CHANGELOG.md
Executable file → Normal file
0
sources/COPYING
Executable file → Normal file
0
sources/COPYING
Executable file → Normal file
0
sources/INSTALL.md
Executable file → Normal file
0
sources/INSTALL.md
Executable file → Normal file
|
@ -3,7 +3,7 @@ Movim - Kickass Social Network
|
|||
|
||||
Movim is a decentralized social network, written in PHP and HTML5 and based on the XMPP standard protocol.
|
||||
|
||||

|
||||

|
||||
|
||||
Installation
|
||||
------------
|
||||
|
|
0
sources/VERSION
Executable file → Normal file
0
sources/VERSION
Executable file → Normal file
0
sources/app/assets/js/images/marker-icon.png
Executable file → Normal file
0
sources/app/assets/js/images/marker-icon.png
Executable file → Normal file
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 1.7 KiB |
0
sources/app/assets/js/images/marker-shadow.png
Executable file → Normal file
0
sources/app/assets/js/images/marker-shadow.png
Executable file → Normal file
Before Width: | Height: | Size: 535 B After Width: | Height: | Size: 535 B |
0
sources/app/assets/js/leaflet.css
Executable file → Normal file
0
sources/app/assets/js/leaflet.css
Executable file → Normal file
0
sources/app/assets/js/leaflet.js
Executable file → Normal file
0
sources/app/assets/js/leaflet.js
Executable file → Normal file
0
sources/app/assets/js/movim_base.js
Executable file → Normal file
0
sources/app/assets/js/movim_base.js
Executable file → Normal file
0
sources/app/assets/js/movim_hash.js
Executable file → Normal file
0
sources/app/assets/js/movim_hash.js
Executable file → Normal file
0
sources/app/assets/js/movim_tpl.js
Executable file → Normal file
0
sources/app/assets/js/movim_tpl.js
Executable file → Normal file
0
sources/app/assets/js/movim_utils.js
Executable file → Normal file
0
sources/app/assets/js/movim_utils.js
Executable file → Normal file
9
sources/app/assets/js/movim_websocket.js
Executable file → Normal file
9
sources/app/assets/js/movim_websocket.js
Executable file → Normal file
|
@ -54,7 +54,9 @@ var MovimWebsocket = {
|
|||
};
|
||||
|
||||
this.connection.onmessage = function(e) {
|
||||
//console.log(e.data);
|
||||
data = pako.ungzip(base64_decode(e.data), { to: 'string' });
|
||||
//data = e.data;
|
||||
|
||||
var obj = JSON.parse(data);
|
||||
|
||||
|
@ -66,9 +68,10 @@ var MovimWebsocket = {
|
|||
if(obj.func == 'disconnected') {
|
||||
movim_disconnect();
|
||||
}
|
||||
|
||||
MovimWebsocket.handle(obj);
|
||||
}
|
||||
|
||||
MovimWebsocket.handle(data);
|
||||
};
|
||||
|
||||
this.connection.onclose = function(e) {
|
||||
|
@ -122,8 +125,8 @@ var MovimWebsocket = {
|
|||
this.attached = new Array();
|
||||
},
|
||||
|
||||
handle : function(json) {
|
||||
var funcalls = JSON.parse(json);
|
||||
handle : function(funcalls) {
|
||||
//var funcalls = JSON.parse(json);
|
||||
if(funcalls != null) {
|
||||
for(h = 0; h < funcalls.length; h++) {
|
||||
var funcall = funcalls[h];
|
||||
|
|
0
sources/app/controllers/AboutController.php
Executable file → Normal file
0
sources/app/controllers/AboutController.php
Executable file → Normal file
0
sources/app/controllers/AccountController.php
Executable file → Normal file
0
sources/app/controllers/AccountController.php
Executable file → Normal file
0
sources/app/controllers/AccountnextController.php
Executable file → Normal file
0
sources/app/controllers/AccountnextController.php
Executable file → Normal file
2
sources/app/controllers/AdminController.php
Executable file → Normal file
2
sources/app/controllers/AdminController.php
Executable file → Normal file
|
@ -13,7 +13,5 @@ class AdminController extends BaseController {
|
|||
} else {
|
||||
$this->name = 'adminlogin';
|
||||
}
|
||||
|
||||
//session_write_close();
|
||||
}
|
||||
}
|
||||
|
|
0
sources/app/controllers/AdminloginController.php
Executable file → Normal file
0
sources/app/controllers/AdminloginController.php
Executable file → Normal file
0
sources/app/controllers/BlogController.php
Executable file → Normal file
0
sources/app/controllers/BlogController.php
Executable file → Normal file
0
sources/app/controllers/ConfController.php
Executable file → Normal file
0
sources/app/controllers/ConfController.php
Executable file → Normal file
0
sources/app/controllers/DisconnectController.php
Executable file → Normal file
0
sources/app/controllers/DisconnectController.php
Executable file → Normal file
|
@ -2,10 +2,15 @@
|
|||
|
||||
class GroupController extends BaseController {
|
||||
function load() {
|
||||
$this->session_only = true;
|
||||
$this->session_only = false;
|
||||
}
|
||||
|
||||
function dispatch() {
|
||||
$user = new User();
|
||||
if(!$user->isLogged()) {
|
||||
$this->name = 'grouppublic';
|
||||
}
|
||||
|
||||
$this->page->setTitle(__('page.groups'));
|
||||
}
|
||||
}
|
||||
|
|
11
sources/app/controllers/GrouppublicController.php
Normal file
11
sources/app/controllers/GrouppublicController.php
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?php
|
||||
|
||||
class GrouppublicController extends BaseController {
|
||||
function load() {
|
||||
$this->session_only = false;
|
||||
}
|
||||
|
||||
function dispatch() {
|
||||
$this->page->setTitle(__('page.groups'));
|
||||
}
|
||||
}
|
0
sources/app/controllers/HelpController.php
Executable file → Normal file
0
sources/app/controllers/HelpController.php
Executable file → Normal file
0
sources/app/controllers/InfosController.php
Executable file → Normal file
0
sources/app/controllers/InfosController.php
Executable file → Normal file
0
sources/app/controllers/LoginController.php
Executable file → Normal file
0
sources/app/controllers/LoginController.php
Executable file → Normal file
0
sources/app/controllers/MainController.php
Executable file → Normal file
0
sources/app/controllers/MainController.php
Executable file → Normal file
0
sources/app/controllers/MediaController.php
Executable file → Normal file
0
sources/app/controllers/MediaController.php
Executable file → Normal file
0
sources/app/controllers/NewsController.php
Executable file → Normal file
0
sources/app/controllers/NewsController.php
Executable file → Normal file
0
sources/app/controllers/NotfoundController.php
Executable file → Normal file
0
sources/app/controllers/NotfoundController.php
Executable file → Normal file
0
sources/app/controllers/PodsController.php
Executable file → Normal file
0
sources/app/controllers/PodsController.php
Executable file → Normal file
0
sources/app/controllers/VisioController.php
Executable file → Normal file
0
sources/app/controllers/VisioController.php
Executable file → Normal file
0
sources/app/helpers/DateHelper.php
Executable file → Normal file
0
sources/app/helpers/DateHelper.php
Executable file → Normal file
0
sources/app/helpers/StringHelper.php
Executable file → Normal file
0
sources/app/helpers/StringHelper.php
Executable file → Normal file
0
sources/app/helpers/TimezoneHelper.php
Executable file → Normal file
0
sources/app/helpers/TimezoneHelper.php
Executable file → Normal file
0
sources/app/helpers/TimezoneList.php
Executable file → Normal file
0
sources/app/helpers/TimezoneList.php
Executable file → Normal file
0
sources/app/models/cache/Cache.php
vendored
Executable file → Normal file
0
sources/app/models/cache/Cache.php
vendored
Executable file → Normal file
0
sources/app/models/cache/CacheDAO.php
vendored
Executable file → Normal file
0
sources/app/models/cache/CacheDAO.php
vendored
Executable file → Normal file
0
sources/app/models/caps/Caps.php
Executable file → Normal file
0
sources/app/models/caps/Caps.php
Executable file → Normal file
0
sources/app/models/caps/CapsDAO.php
Executable file → Normal file
0
sources/app/models/caps/CapsDAO.php
Executable file → Normal file
0
sources/app/models/conference/Conference.php
Executable file → Normal file
0
sources/app/models/conference/Conference.php
Executable file → Normal file
0
sources/app/models/conference/ConferenceDAO.php
Executable file → Normal file
0
sources/app/models/conference/ConferenceDAO.php
Executable file → Normal file
0
sources/app/models/config/Config.php
Executable file → Normal file
0
sources/app/models/config/Config.php
Executable file → Normal file
0
sources/app/models/config/ConfigDAO.php
Executable file → Normal file
0
sources/app/models/config/ConfigDAO.php
Executable file → Normal file
30
sources/app/models/contact/Contact.php
Executable file → Normal file
30
sources/app/models/contact/Contact.php
Executable file → Normal file
|
@ -259,23 +259,23 @@ class Contact extends Model {
|
|||
}
|
||||
|
||||
public function setVcard4($vcard) {
|
||||
if(isset($vcard->bday->date))
|
||||
$this->date = $vcard->bday->date;
|
||||
if(isset($vcard->bday->date) && !empty((string)$vcard->bday->date))
|
||||
$this->date = (string)$vcard->bday->date;
|
||||
else
|
||||
$this->date = null;
|
||||
|
||||
$this->name = $vcard->nickname->text;
|
||||
$this->fn = $vcard->fn->text;
|
||||
$this->url = $vcard->url->uri;
|
||||
$this->name = (string)$vcard->nickname->text;
|
||||
$this->fn = (string)$vcard->fn->text;
|
||||
$this->url = (string)$vcard->url->uri;
|
||||
|
||||
if(isset($vcard->gender))
|
||||
$this->gender = $vcard->gender->sex->text;
|
||||
$this->gender = (string)$vcard->gender->sex->text;
|
||||
if(isset($vcard->marital))
|
||||
$this->marital = $vcard->marital->status->text;
|
||||
$this->marital = (string)$vcard->marital->status->text;
|
||||
|
||||
$this->adrlocality = $vcard->adr->locality;
|
||||
$this->adrcountry = $vcard->adr->country;
|
||||
$this->adrpostalcode = $vcard->adr->code;
|
||||
$this->adrlocality = (string)$vcard->adr->locality;
|
||||
$this->adrcountry = (string)$vcard->adr->country;
|
||||
$this->adrpostalcode = (string)$vcard->adr->code;
|
||||
|
||||
if(isset($vcard->impp)) {
|
||||
foreach($vcard->impp->children() as $c) {
|
||||
|
@ -286,18 +286,18 @@ class Contact extends Model {
|
|||
$this->twitter = str_replace('@', '', $value);
|
||||
break;
|
||||
case 'skype' :
|
||||
$this->skype = $value;
|
||||
$this->skype = (string)$value;
|
||||
break;
|
||||
case 'ymsgr' :
|
||||
$this->yahoo = $value;
|
||||
$this->yahoo = (string)$value;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->email = $vcard->email->text;
|
||||
$this->email = (string)$vcard->email->text;
|
||||
|
||||
$this->description = trim($vcard->note->text);
|
||||
$this->description = trim((string)$vcard->note->text);
|
||||
}
|
||||
|
||||
public function getPlace() {
|
||||
|
@ -407,8 +407,6 @@ class Contact extends Model {
|
|||
&& $this->date == null
|
||||
&& $this->url == null
|
||||
&& $this->email == null
|
||||
&& $this->created == null
|
||||
&& $this->updated == null
|
||||
&& $this->description == null) {
|
||||
return true;
|
||||
} else {
|
||||
|
|
0
sources/app/models/contact/ContactDAO.php
Executable file → Normal file
0
sources/app/models/contact/ContactDAO.php
Executable file → Normal file
1
sources/app/models/item/Item.php
Executable file → Normal file
1
sources/app/models/item/Item.php
Executable file → Normal file
|
@ -89,4 +89,5 @@ class Item extends Model {
|
|||
class Server extends Model {
|
||||
public $server;
|
||||
public $number;
|
||||
public $name;
|
||||
}
|
||||
|
|
45
sources/app/models/item/ItemDAO.php
Executable file → Normal file
45
sources/app/models/item/ItemDAO.php
Executable file → Normal file
|
@ -115,11 +115,12 @@ class ItemDAO extends SQL {
|
|||
|
||||
function getGroupServers() {
|
||||
$this->_sql = '
|
||||
select server, count(node) as number
|
||||
select server, count(item.node) as number, caps.name
|
||||
from item
|
||||
where node not like :node
|
||||
and node != :name
|
||||
group by server
|
||||
left outer join caps on caps.node = item.server
|
||||
where item.node not like :node
|
||||
and item.node != :name
|
||||
group by server, caps.name
|
||||
order by number desc';
|
||||
|
||||
$this->prepare(
|
||||
|
@ -135,7 +136,6 @@ class ItemDAO extends SQL {
|
|||
}
|
||||
|
||||
function getItems($server) {
|
||||
|
||||
$this->_sql = '
|
||||
select * from item
|
||||
left outer join (
|
||||
|
@ -168,6 +168,41 @@ class ItemDAO extends SQL {
|
|||
return $this->run('Item');
|
||||
}
|
||||
|
||||
function getGateways($server) {
|
||||
$this->_sql = '
|
||||
select * from item
|
||||
left outer join caps on caps.node = item.jid
|
||||
where server = :server
|
||||
and category = \'gateway\'';
|
||||
|
||||
$this->prepare(
|
||||
'Item',
|
||||
array(
|
||||
'server' => $server
|
||||
)
|
||||
);
|
||||
|
||||
return $this->run('Item');
|
||||
}
|
||||
|
||||
function getUpload($server) {
|
||||
$this->_sql = '
|
||||
select * from item
|
||||
left outer join caps on caps.node = item.jid
|
||||
where server = :server
|
||||
and category = \'store\'
|
||||
and type = \'file\'';
|
||||
|
||||
$this->prepare(
|
||||
'Item',
|
||||
array(
|
||||
'server' => $server
|
||||
)
|
||||
);
|
||||
|
||||
return $this->run('Item', 'item');
|
||||
}
|
||||
|
||||
function getUpdatedItems($limitf = false, $limitr = false) {
|
||||
$this->_sql = '
|
||||
select * from item natural join (
|
||||
|
|
0
sources/app/models/message/Message.php
Executable file → Normal file
0
sources/app/models/message/Message.php
Executable file → Normal file
0
sources/app/models/message/MessageDAO.php
Executable file → Normal file
0
sources/app/models/message/MessageDAO.php
Executable file → Normal file
6
sources/app/models/postn/Postn.php
Executable file → Normal file
6
sources/app/models/postn/Postn.php
Executable file → Normal file
|
@ -90,7 +90,8 @@ class Postn extends Model {
|
|||
switch($c->attributes()->type) {
|
||||
case 'html':
|
||||
case 'xhtml':
|
||||
return (string)$c->asXML();
|
||||
if($c->getName() == 'content') return $c->children()->asXML();
|
||||
else return (string)$c->asXML();
|
||||
break;
|
||||
case 'text':
|
||||
default :
|
||||
|
@ -284,7 +285,8 @@ class Postn extends Model {
|
|||
public function isMine() {
|
||||
$user = new \User();
|
||||
|
||||
if($this->origin == $user->getLogin())
|
||||
if($this->aid == $user->getLogin()
|
||||
|| $this->origin == $user->getLogin())
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
|
1
sources/app/models/postn/PostnDAO.php
Executable file → Normal file
1
sources/app/models/postn/PostnDAO.php
Executable file → Normal file
|
@ -535,6 +535,7 @@ class PostnDAO extends SQL {
|
|||
node != \'urn:xmpp:microblog:0\'
|
||||
and postn.node not like \'urn:xmpp:microblog:0:comments/%\'
|
||||
and postn.node not like \'urn:xmpp:inbox\'
|
||||
and postn.origin not like \'nsfw%\'
|
||||
and ((postn.origin, node) not in (select server, node from subscription where jid = :origin))
|
||||
order by published desc
|
||||
';
|
||||
|
|
0
sources/app/models/presence/Presence.php
Executable file → Normal file
0
sources/app/models/presence/Presence.php
Executable file → Normal file
0
sources/app/models/presence/PresenceDAO.php
Executable file → Normal file
0
sources/app/models/presence/PresenceDAO.php
Executable file → Normal file
0
sources/app/models/privacy/Privacy.php
Executable file → Normal file
0
sources/app/models/privacy/Privacy.php
Executable file → Normal file
0
sources/app/models/privacy/PrivacyDAO.php
Executable file → Normal file
0
sources/app/models/privacy/PrivacyDAO.php
Executable file → Normal file
0
sources/app/models/rosterlink/RosterLink.php
Executable file → Normal file
0
sources/app/models/rosterlink/RosterLink.php
Executable file → Normal file
0
sources/app/models/rosterlink/RosterLinkDAO.php
Executable file → Normal file
0
sources/app/models/rosterlink/RosterLinkDAO.php
Executable file → Normal file
0
sources/app/models/sessionx/Sessionx.php
Executable file → Normal file
0
sources/app/models/sessionx/Sessionx.php
Executable file → Normal file
0
sources/app/models/sessionx/SessionxDAO.php
Executable file → Normal file
0
sources/app/models/sessionx/SessionxDAO.php
Executable file → Normal file
1
sources/app/models/subscription/Subscription.php
Executable file → Normal file
1
sources/app/models/subscription/Subscription.php
Executable file → Normal file
|
@ -13,6 +13,7 @@ class Subscription extends Model {
|
|||
public $tags;
|
||||
public $timestamp;
|
||||
public $name;
|
||||
public $servicename;
|
||||
|
||||
public function __construct() {
|
||||
$this->_struct = '
|
||||
|
|
6
sources/app/models/subscription/SubscriptionDAO.php
Executable file → Normal file
6
sources/app/models/subscription/SubscriptionDAO.php
Executable file → Normal file
|
@ -79,17 +79,21 @@ class SubscriptionDAO extends SQL {
|
|||
subscription.node,
|
||||
subscription,
|
||||
item.name,
|
||||
item.description
|
||||
item.description,
|
||||
caps.name as servicename
|
||||
from subscription
|
||||
left outer join item
|
||||
on item.server = subscription.server
|
||||
and item.node = subscription.node
|
||||
left outer join caps
|
||||
on caps.node = subscription.server
|
||||
where subscription.jid = :jid
|
||||
group by
|
||||
subscription.server,
|
||||
subscription.node,
|
||||
subscription.jid,
|
||||
subscription,
|
||||
caps.name,
|
||||
item.name,
|
||||
item.description
|
||||
order by
|
||||
|
|
0
sources/app/views/about.tpl
Executable file → Normal file
0
sources/app/views/about.tpl
Executable file → Normal file
0
sources/app/views/account.tpl
Executable file → Normal file
0
sources/app/views/account.tpl
Executable file → Normal file
0
sources/app/views/accountnext.tpl
Executable file → Normal file
0
sources/app/views/accountnext.tpl
Executable file → Normal file
0
sources/app/views/admin.tpl
Executable file → Normal file
0
sources/app/views/admin.tpl
Executable file → Normal file
0
sources/app/views/adminlogin.tpl
Executable file → Normal file
0
sources/app/views/adminlogin.tpl
Executable file → Normal file
6
sources/app/views/blog.tpl
Executable file → Normal file
6
sources/app/views/blog.tpl
Executable file → Normal file
|
@ -1,11 +1,7 @@
|
|||
<main>
|
||||
<section>
|
||||
<div>
|
||||
<?php //$this->widget('Tabs');?>
|
||||
|
||||
<div style="background-color: #EEE;">
|
||||
<?php $this->widget('Blog');?>
|
||||
<?php //$this->widget('ContactSummary');?>
|
||||
<?php //$this->widget('ContactCard');?>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
<?php $this->widget('Chats');?>
|
||||
<?php $this->widget('Rooms');?>
|
||||
</div>
|
||||
<?php $this->widget('Upload');?>
|
||||
<?php $this->widget('Chat');?>
|
||||
</section>
|
||||
</main>
|
||||
|
|
0
sources/app/views/conf.tpl
Executable file → Normal file
0
sources/app/views/conf.tpl
Executable file → Normal file
0
sources/app/views/disconnect.tpl
Executable file → Normal file
0
sources/app/views/disconnect.tpl
Executable file → Normal file
0
sources/app/views/feed.tpl
Executable file → Normal file
0
sources/app/views/feed.tpl
Executable file → Normal file
0
sources/app/views/friend.tpl
Executable file → Normal file
0
sources/app/views/friend.tpl
Executable file → Normal file
|
@ -1,3 +1,5 @@
|
|||
<?php $this->widget('Upload'); ?>
|
||||
|
||||
<nav class="color dark">
|
||||
<?php $this->widget('Navigation');?>
|
||||
<?php $this->widget('Presence');?>
|
||||
|
|
7
sources/app/views/grouppublic.tpl
Normal file
7
sources/app/views/grouppublic.tpl
Normal file
|
@ -0,0 +1,7 @@
|
|||
<main>
|
||||
<section>
|
||||
<div style="background-color: #EEE;">
|
||||
<?php $this->widget('Blog');?>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
0
sources/app/views/help.tpl
Executable file → Normal file
0
sources/app/views/help.tpl
Executable file → Normal file
0
sources/app/views/infos.tpl
Executable file → Normal file
0
sources/app/views/infos.tpl
Executable file → Normal file
0
sources/app/views/login.tpl
Executable file → Normal file
0
sources/app/views/login.tpl
Executable file → Normal file
0
sources/app/views/main.tpl
Executable file → Normal file
0
sources/app/views/main.tpl
Executable file → Normal file
0
sources/app/views/media.tpl
Executable file → Normal file
0
sources/app/views/media.tpl
Executable file → Normal file
1
sources/app/views/news.tpl
Executable file → Normal file
1
sources/app/views/news.tpl
Executable file → Normal file
|
@ -1,4 +1,5 @@
|
|||
<?php $this->widget('Init');?>
|
||||
<?php $this->widget('Upload');?>
|
||||
|
||||
<nav class="color dark">
|
||||
<?php $this->widget('Navigation');?>
|
||||
|
|
0
sources/app/views/notfound.tpl
Executable file → Normal file
0
sources/app/views/notfound.tpl
Executable file → Normal file
0
sources/app/views/page.tpl
Executable file → Normal file
0
sources/app/views/page.tpl
Executable file → Normal file
0
sources/app/views/pods.tpl
Executable file → Normal file
0
sources/app/views/pods.tpl
Executable file → Normal file
0
sources/app/views/room.tpl
Executable file → Normal file
0
sources/app/views/room.tpl
Executable file → Normal file
0
sources/app/views/share.tpl
Executable file → Normal file
0
sources/app/views/share.tpl
Executable file → Normal file
0
sources/app/views/visio.tpl
Executable file → Normal file
0
sources/app/views/visio.tpl
Executable file → Normal file
0
sources/app/widgets/.dir-locals.el
Executable file → Normal file
0
sources/app/widgets/.dir-locals.el
Executable file → Normal file
0
sources/app/widgets/About/About.php
Executable file → Normal file
0
sources/app/widgets/About/About.php
Executable file → Normal file
0
sources/app/widgets/About/about.tpl
Executable file → Normal file
0
sources/app/widgets/About/about.tpl
Executable file → Normal file
0
sources/app/widgets/About/locales.ini
Executable file → Normal file
0
sources/app/widgets/About/locales.ini
Executable file → Normal file
|
@ -3,6 +3,7 @@
|
|||
use Moxl\Xec\Action\Register\ChangePassword;
|
||||
use Moxl\Xec\Action\Register\Remove;
|
||||
use Moxl\Xec\Action\Register\Get;
|
||||
use Moxl\Xec\Action\Register\Set;
|
||||
use Respect\Validation\Validator;
|
||||
|
||||
class Account extends WidgetBase
|
||||
|
@ -12,7 +13,7 @@ class Account extends WidgetBase
|
|||
$this->addjs('account.js');
|
||||
$this->registerEvent('register_changepassword_handle', 'onPasswordChanged');
|
||||
$this->registerEvent('register_remove_handle', 'onRemoved');
|
||||
//$this->registerEvent('register_get_handle', 'onRegister');
|
||||
$this->registerEvent('register_get_handle', 'onRegister');
|
||||
}
|
||||
|
||||
function onPasswordChanged()
|
||||
|
@ -41,6 +42,7 @@ class Account extends WidgetBase
|
|||
$form = $xml->getHTML($content->x->asXML());
|
||||
|
||||
$view->assign('form', $form);
|
||||
$view->assign('from', $package->from);
|
||||
$view->assign('attributes', $content->attributes());
|
||||
$view->assign('actions', null);
|
||||
if(isset($content->actions)) {
|
||||
|
@ -91,7 +93,7 @@ class Account extends WidgetBase
|
|||
$da->request();
|
||||
}
|
||||
|
||||
function ajaxRegister($server)
|
||||
function ajaxGetRegistration($server)
|
||||
{
|
||||
if(!$this->validateServer($server)) return;
|
||||
|
||||
|
@ -100,6 +102,15 @@ class Account extends WidgetBase
|
|||
->request();
|
||||
}
|
||||
|
||||
function ajaxRegister($server, $form)
|
||||
{
|
||||
if(!$this->validateServer($server)) return;
|
||||
$s = new Set;
|
||||
$s->setTo($server)
|
||||
->setData($form)
|
||||
->request();
|
||||
}
|
||||
|
||||
private function validateServer($server)
|
||||
{
|
||||
$validate_server = Validator::string()->noWhitespace()->length(6, 80);
|
||||
|
@ -109,5 +120,7 @@ class Account extends WidgetBase
|
|||
|
||||
function display()
|
||||
{
|
||||
$id = new \Modl\ItemDAO;
|
||||
$this->view->assign('gateway', $id->getGateways($this->user->getServer()));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<section class="scroll">
|
||||
<form name="command" data-sessionid="{$attributes->sessionid}" data-node="{$attributes->node}">
|
||||
<form name="register" data-sessionid="{$attributes->sessionid}" data-node="{$attributes->node}">
|
||||
{$form}
|
||||
</form>
|
||||
</section>
|
||||
|
@ -7,6 +7,9 @@
|
|||
<a onclick="Dialog.clear()" class="button flat">
|
||||
{$c->__('button.close')}
|
||||
</a>
|
||||
<a onclick="Account_ajaxRegister('{$from}', movim_form_to_json('register')); Dialog.clear();" class="button flat">
|
||||
{$c->__('button.submit')}
|
||||
</a>
|
||||
{if="$actions != null"}
|
||||
{if="isset($actions->next)"}
|
||||
<a onclick="AdHoc.submit()" class="button flat">
|
||||
|
|
|
@ -1,4 +1,21 @@
|
|||
<div class="tabelem" title="{$c->__('account.title')}" id="account_widget" >
|
||||
<div class="tabelem" title="{$c->__('account.title')}" id="account_widget">
|
||||
{if="isset($gateway)"}
|
||||
<ul class="active middle divided">
|
||||
<li class="subheader">{$c->__('account.gateway_title')}</li>
|
||||
{loop="$gateway"}
|
||||
<li class="condensed action" onclick="Account_ajaxGetRegistration('{$value->node}')">
|
||||
<div class="action">
|
||||
<i class="zmdi zmdi-chevron-right"></i>
|
||||
</div>
|
||||
<span class="icon">
|
||||
<i class="zmdi zmdi-swap"></i>
|
||||
</span>
|
||||
<span>{$value->name}</span>
|
||||
<p>{$value->node}</p>
|
||||
</li>
|
||||
{/loop}
|
||||
</ul>
|
||||
{/if}
|
||||
<ul class="middle active divided ">
|
||||
<li class="subheader">{$c->__('account.password_change_title')}</li>
|
||||
<li>
|
||||
|
|
|
@ -10,3 +10,4 @@ delete_title = Delete my account
|
|||
delete = Delete your account
|
||||
delete_text = You will delete your XMPP account and all the relative information linked to it (profile, contacts and publications).
|
||||
delete_text_confirm = "Are you sure that you want to delete it ?"
|
||||
gateway_title = Gateway
|
||||
|
|
0
sources/app/widgets/AccountNext/AccountNext.php
Executable file → Normal file
0
sources/app/widgets/AccountNext/AccountNext.php
Executable file → Normal file
0
sources/app/widgets/AccountNext/_accountnext_form.tpl
Executable file → Normal file
0
sources/app/widgets/AccountNext/_accountnext_form.tpl
Executable file → Normal file
0
sources/app/widgets/AccountNext/accountnext.css
Executable file → Normal file
0
sources/app/widgets/AccountNext/accountnext.css
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue