diff options
author | friendica <info@friendica.com> | 2012-12-10 13:44:54 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2012-12-10 13:44:54 -0800 |
commit | b0970850d4e3facac26debe54f34edc21bca1ff7 (patch) | |
tree | 295b1ecee96d1e641c842923a39f553e2ed802c5 | |
parent | c066793554cf5a779b791df8a9fe93461f1598a4 (diff) | |
download | volse-hubzilla-b0970850d4e3facac26debe54f34edc21bca1ff7.tar.gz volse-hubzilla-b0970850d4e3facac26debe54f34edc21bca1ff7.tar.bz2 volse-hubzilla-b0970850d4e3facac26debe54f34edc21bca1ff7.zip |
Allow forum/account delegation by anybody? On any site? But of course...
-rw-r--r-- | boot.php | 3 | ||||
-rw-r--r-- | include/permissions.php | 1 | ||||
-rw-r--r-- | install/database.sql | 4 | ||||
-rw-r--r-- | install/update.php | 10 |
4 files changed, 14 insertions, 4 deletions
@@ -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 diff --git a/include/permissions.php b/include/permissions.php index f6d150b58..8e0dec6c2 100644 --- a/include/permissions.php +++ b/include/permissions.php @@ -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; } diff --git a/install/database.sql b/install/database.sql index 36b1003ae..182d02432 100644 --- a/install/database.sql +++ b/install/database.sql @@ -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` ( diff --git a/install/update.php b/install/update.php index cb3396b19..edd4701a1 100644 --- a/install/update.php +++ b/install/update.php @@ -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; +} + |