mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 21:15:14 +00:00
Allow forum/account delegation by anybody? On any site? But of course...
This commit is contained in:
parent
c066793554
commit
b0970850d4
4 changed files with 14 additions and 4 deletions
3
boot.php
3
boot.php
|
@ -17,7 +17,7 @@ define ( 'FRIENDICA_PLATFORM', 'Friendica Red');
|
|||
define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R');
|
||||
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
|
||||
define ( 'ZOT_REVISION', 1 );
|
||||
define ( 'DB_UPDATE_VERSION', 1000 );
|
||||
define ( 'DB_UPDATE_VERSION', 1001 );
|
||||
|
||||
define ( 'EOL', "<br />\r\n" );
|
||||
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
|
||||
|
@ -173,6 +173,7 @@ define ( 'PERMS_W_COMMENT', 0x0080);
|
|||
define ( 'PERMS_W_MAIL', 0x0100);
|
||||
define ( 'PERMS_W_PHOTOS', 0x0200);
|
||||
define ( 'PERMS_W_CHAT', 0x0400);
|
||||
define ( 'PERMS_A_DELEGATE', 0x0800);
|
||||
|
||||
|
||||
// General channel permissions
|
||||
|
|
|
@ -23,6 +23,7 @@ function get_perms() {
|
|||
'post_photos' => array('channel_w_photos', intval(PERMS_W_PHOTOS), false, t('Can post photos to my photo albums'), ''),
|
||||
'tag_deliver' => array('channel_w_tagwall', intval(PERMS_W_TAGWALL), false, t('Can forward to all my channel contacts via post tags'), t('Advanced - useful for creating group forum channels')),
|
||||
'chat' => array('channel_w_chat', intval(PERMS_W_CHAT), false, t('Can chat with me (when available)'), t('Requires compatible chat plugin')),
|
||||
'delegate' => array('channel_a_delegate', intval(PERMS_A_DELEGATE), false, t('Can administer my channel resources'), t('Extremely advanced. Leave this alone unless you know what you are doing')),
|
||||
);
|
||||
return $global_perms;
|
||||
}
|
||||
|
|
|
@ -158,6 +158,7 @@ CREATE TABLE IF NOT EXISTS `channel` (
|
|||
`channel_w_mail` tinyint(3) unsigned NOT NULL DEFAULT '128',
|
||||
`channel_w_photos` tinyint(3) unsigned NOT NULL DEFAULT '128',
|
||||
`channel_w_chat` tinyint(3) unsigned NOT NULL DEFAULT '128',
|
||||
`channel_a_delegate` tinyint(3) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`channel_id`),
|
||||
KEY `channel_account_id` (`channel_account_id`),
|
||||
KEY `channel_primary` (`channel_primary`),
|
||||
|
@ -184,7 +185,8 @@ CREATE TABLE IF NOT EXISTS `channel` (
|
|||
KEY `channel_w_chat` (`channel_w_chat`),
|
||||
KEY `channel_guid` (`channel_guid`),
|
||||
KEY `channel_hash` (`channel_hash`),
|
||||
KEY `channel_expire_days` (`channel_expire_days`)
|
||||
KEY `channel_expire_days` (`channel_expire_days`),
|
||||
KEY `channel_a_delegate` (`channel_a_delegate`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `clients` (
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
define( 'UPDATE_VERSION' , 1000 );
|
||||
define( 'UPDATE_VERSION' , 1001 );
|
||||
|
||||
/**
|
||||
*
|
||||
|
@ -35,5 +35,11 @@ define( 'UPDATE_VERSION' , 1000 );
|
|||
*
|
||||
*/
|
||||
|
||||
// function update_r1000()
|
||||
function update_r1000() {
|
||||
$r = q("ALTER TABLE `channel` ADD `channel_a_delegate` TINYINT( 3 ) UNSIGNED NOT NULL DEFAULT '0', ADD INDEX ( `channel_a_delegate` )");
|
||||
if($r)
|
||||
return UPDATE_SUCCESS;
|
||||
return UPDATE_FAILED;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue