aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2013-01-14 16:17:57 -0800
committerfriendica <info@friendica.com>2013-01-14 16:17:57 -0800
commit610dc2823aa12ace2d9d18dda48b93dc4aa63dce (patch)
treeeeac01f0229fc630a09c89c8bf543473b1d6914b
parentc450049a0ad0e0c38c34c15da1b105fadbba113e (diff)
downloadvolse-hubzilla-610dc2823aa12ace2d9d18dda48b93dc4aa63dce.tar.gz
volse-hubzilla-610dc2823aa12ace2d9d18dda48b93dc4aa63dce.tar.bz2
volse-hubzilla-610dc2823aa12ace2d9d18dda48b93dc4aa63dce.zip
read/write "pages" permissions and fiddly bits - per Thomas
-rw-r--r--boot.php4
-rw-r--r--include/permissions.php2
-rw-r--r--install/database.sql14
-rw-r--r--install/update.php12
-rw-r--r--version.inc2
5 files changed, 26 insertions, 8 deletions
diff --git a/boot.php b/boot.php
index f0787e851..af07cf888 100644
--- a/boot.php
+++ b/boot.php
@@ -16,7 +16,7 @@ require_once('include/features.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica Red');
define ( 'FRIENDICA_VERSION', trim(file_get_contents('version.inc')) . 'R');
define ( 'ZOT_REVISION', 1 );
-define ( 'DB_UPDATE_VERSION', 1015 );
+define ( 'DB_UPDATE_VERSION', 1016 );
define ( 'EOL', '<br />' . "\r\n" );
define ( 'ATOM_TIME', 'Y-m-d\TH:i:s\Z' );
@@ -193,6 +193,8 @@ define ( 'PERMS_A_DELEGATE', 0x0800);
define ( 'PERMS_R_STORAGE', 0x1000);
define ( 'PERMS_W_STORAGE', 0x2000);
+define ( 'PERMS_R_PAGES', 0x4000);
+define ( 'PERMS_W_PAGES', 0x8000);
// General channel permissions
diff --git a/include/permissions.php b/include/permissions.php
index 8e8cf5ac2..69f5d75af 100644
--- a/include/permissions.php
+++ b/include/permissions.php
@@ -15,6 +15,7 @@ function get_perms() {
'view_photos' => array('channel_r_photos', intval(PERMS_R_PHOTOS), true, t('Can view my "public" photo albums'), ''),
'view_contacts' => array('channel_r_abook', intval(PERMS_R_ABOOK), true, t('Can view my "public" address book'), ''),
'view_storage' => array('channel_r_storage', intval(PERMS_R_STORAGE), true, t('Can view my "public" file storage'), ''),
+ 'view_pages' => array('channel_r_pages', intval(PERMS_R_PAGES), true, t('Can view my "public" pages'), ''),
// Write permissions
'send_stream' => array('channel_w_stream', intval(PERMS_W_STREAM), false, t('Can send me their channel stream and posts'), ''),
@@ -25,6 +26,7 @@ function get_perms() {
'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')),
'write_storage' => array('channel_w_storage', intval(PERMS_W_STORAGE), false, t('Can write to my "public" file storage'), ''),
+ 'write_pages' => array('channel_w_pages', intval(PERMS_W_PAGES), false, t('Can edit my "public" pages'), ''),
'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')),
);
diff --git a/install/database.sql b/install/database.sql
index a4d885541..da377fd5a 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -163,6 +163,8 @@ CREATE TABLE IF NOT EXISTS `channel` (
`channel_a_delegate` tinyint(3) unsigned NOT NULL DEFAULT '0',
`channel_r_storage` int(10) unsigned NOT NULL DEFAULT '128',
`channel_w_storage` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_r_pages` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_w_pages` int(10) unsigned NOT NULL DEFAULT '128',
PRIMARY KEY (`channel_id`),
KEY `channel_account_id` (`channel_account_id`),
KEY `channel_primary` (`channel_primary`),
@@ -192,7 +194,9 @@ CREATE TABLE IF NOT EXISTS `channel` (
KEY `channel_expire_days` (`channel_expire_days`),
KEY `channel_a_delegate` (`channel_a_delegate`),
KEY `channel_r_storage` (`channel_r_storage`),
- KEY `channel_w_storage` (`channel_w_storage`)
+ KEY `channel_w_storage` (`channel_w_storage`),
+ KEY `channel_r_pages` (`channel_r_pages`),
+ KEY `channel_w_pages` (`channel_w_pages`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `clients` (
@@ -563,7 +567,7 @@ CREATE TABLE IF NOT EXISTS `notify` (
KEY `parent` (`parent`),
KEY `link` (`link`),
KEY `otype` (`otype`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `outq` (
`outq_hash` char(255) NOT NULL,
@@ -852,9 +856,9 @@ CREATE TABLE IF NOT EXISTS `xlink` (
`xlink_link` char(255) NOT NULL DEFAULT '',
`xlink_updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`xlink_id`),
- KEY `xlink_xchan` ( `xlink_xchan` ),
- KEY `xlink_link` ( `xlink_link` ),
- KEY `xlink_updated` ( `xlink_updated` )
+ KEY `xlink_xchan` (`xlink_xchan`),
+ KEY `xlink_link` (`xlink_link`),
+ KEY `xlink_updated` (`xlink_updated`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `xprof` (
diff --git a/install/update.php b/install/update.php
index cff3115a2..a43867ea6 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1015 );
+define( 'UPDATE_VERSION' , 1016 );
/**
*
@@ -219,3 +219,13 @@ function update_r1014() {
return UPDATE_FAILED;
}
+function update_r1015() {
+ $r = q("ALTER TABLE `channel` ADD `channel_r_pages` INT UNSIGNED NOT NULL DEFAULT '128',
+ADD `channel_w_pages` INT UNSIGNED NOT NULL DEFAULT '128'");
+
+ $r2 = q("ALTER TABLE `channel` ADD INDEX ( `channel_r_pages` ) , ADD INDEX ( `channel_w_pages` ) ");
+
+ if($r && $r2)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
diff --git a/version.inc b/version.inc
index 5995ba7a6..7c4eb7825 100644
--- a/version.inc
+++ b/version.inc
@@ -1 +1 @@
-2013-01-13.199
+2013-01-14.200