Browse Source
Save the Pubsub affiliations in the database, allow Communities owners to edit the articles
Save the Pubsub affiliations in the database, allow Communities owners to edit the articles
Code refactoring and cleanuppull/1185/merge
21 changed files with 307 additions and 161 deletions
-
1CHANGELOG.md
-
11app/Affiliation.php
-
3app/Info.php
-
15app/Post.php
-
1app/Presence.php
-
5app/User.php
-
86app/widgets/CommunityAffiliations/CommunityAffiliations.php
-
14app/widgets/CommunityAffiliations/_communityaffiliations.tpl
-
46app/widgets/CommunityAffiliations/_communityaffiliations_config_content.tpl
-
2app/widgets/CommunityPosts/CommunityPosts.php
-
8app/widgets/CommunityPosts/_communityposts.tpl
-
19app/widgets/Post/Post.php
-
13app/widgets/Post/_post.tpl
-
27app/widgets/Post/_post_card.tpl
-
6app/widgets/Post/_post_ticket.tpl
-
3composer.json
-
132composer.lock
-
26database/migrations/20231014161444_create_affiliations_table.php
-
2src/Movim/Model.php
-
29src/Moxl/Xec/Action/Disco/Request.php
-
19src/Moxl/Xec/Action/Pubsub/GetAffiliations.php
@ -0,0 +1,11 @@ |
|||
<?php |
|||
|
|||
namespace App; |
|||
|
|||
use Movim\Model; |
|||
|
|||
class Affiliation extends Model |
|||
{ |
|||
public $primaryKey = ['server', 'node', 'jid']; |
|||
public $incrementing = false; |
|||
} |
@ -0,0 +1,26 @@ |
|||
<?php |
|||
|
|||
use Movim\Migration; |
|||
use Illuminate\Database\Schema\Blueprint; |
|||
|
|||
class CreateAffiliationsTable extends Migration |
|||
{ |
|||
public function up() |
|||
{ |
|||
$this->schema->create('affiliations', function (Blueprint $table) { |
|||
$table->string('server', 256); |
|||
$table->string('node', 256); |
|||
$table->enum('affiliation', ['member', 'none', 'outcast', 'owner', 'publisher', 'publish-only']); |
|||
$table->string('jid', 256)->index(); |
|||
|
|||
$table->unique(['server', 'node', 'jid']); |
|||
$table->index(['server', 'node']); |
|||
$table->timestamps(); |
|||
}); |
|||
} |
|||
|
|||
public function down() |
|||
{ |
|||
$this->schema->drop('affiliations'); |
|||
} |
|||
} |
Write
Preview
Loading…
Cancel
Save
Reference in new issue