aboutsummaryrefslogtreecommitdiffstats
path: root/install
diff options
context:
space:
mode:
authorPaolo T <tuscanhobbit@users.noreply.github.com>2014-02-25 16:33:40 +0100
committerPaolo T <tuscanhobbit@users.noreply.github.com>2014-02-25 16:33:40 +0100
commit0a98f6b878ec89be7282621192d9daf80f125e6c (patch)
tree718a4771ce1fb86931531226898b0b5d00e4a337 /install
parent34d30e4d7eb48bd801482531a0d775328bd43ab4 (diff)
parentb1021df485fb6129acda5bba616bac10aea75a45 (diff)
downloadvolse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.gz
volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.tar.bz2
volse-hubzilla-0a98f6b878ec89be7282621192d9daf80f125e6c.zip
Merge pull request #1 from friendica/master
Update this fork
Diffstat (limited to 'install')
-rw-r--r--install/INSTALL.txt6
-rw-r--r--install/database.sql94
-rwxr-xr-xinstall/htconfig.sample.php2
-rw-r--r--install/update.php183
4 files changed, 270 insertions, 15 deletions
diff --git a/install/INSTALL.txt b/install/INSTALL.txt
index ee029f0ee..65efa9cfe 100644
--- a/install/INSTALL.txt
+++ b/install/INSTALL.txt
@@ -37,7 +37,7 @@ Decide if you will use SSL and obtain an SSL cert before software installation.
1. Requirements
- - Apache with mod-rewrite enabled and "Options All" so you can use a
+ - Apache with mod-rewrite enabled and "AllowOverride All" so you can use a
local .htaccess file
- PHP 5.3+. The later the better.
@@ -74,11 +74,13 @@ directory/path component in the URL) is REQUIRED.
git pull
- - make sure folder *view/tpl/smarty3* exists and is writable by webserver
+ - make sure folders *view/tpl/smarty3* and *store* exist and are writable by webserver
mkdir view/tpl/smarty3
+ mkdir store
chmod 777 view/tpl/smarty3
+ chmod 777 store
[This permission (777) is very dangerous and if you have sufficient
privilege and knowledge you should make this directory writeable only
diff --git a/install/database.sql b/install/database.sql
index ef79862c3..cd31a0285 100644
--- a/install/database.sql
+++ b/install/database.sql
@@ -54,6 +54,7 @@ CREATE TABLE IF NOT EXISTS `account` (
`account_expires` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`account_expire_notified` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`account_service_class` char(32) NOT NULL DEFAULT '',
+ `account_level` int(10) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`account_id`),
KEY `account_email` (`account_email`),
KEY `account_service_class` (`account_service_class`),
@@ -63,7 +64,8 @@ CREATE TABLE IF NOT EXISTS `account` (
KEY `account_lastlog` (`account_lastlog`),
KEY `account_expires` (`account_expires`),
KEY `account_default_channel` (`account_default_channel`),
- KEY `account_external` (`account_external`)
+ KEY `account_external` (`account_external`),
+ KEY `account_level` (`account_level`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `addon` (
@@ -85,6 +87,7 @@ CREATE TABLE IF NOT EXISTS `attach` (
`aid` int(10) unsigned NOT NULL DEFAULT '0',
`uid` int(10) unsigned NOT NULL DEFAULT '0',
`hash` char(64) NOT NULL DEFAULT '',
+ `creator` char(128) NOT NULL DEFAULT '',
`filename` char(255) NOT NULL DEFAULT '',
`filetype` char(64) NOT NULL DEFAULT '',
`filesize` int(10) unsigned NOT NULL DEFAULT '0',
@@ -109,7 +112,8 @@ CREATE TABLE IF NOT EXISTS `attach` (
KEY `edited` (`edited`),
KEY `revision` (`revision`),
KEY `folder` (`folder`),
- KEY `flags` (`flags`)
+ KEY `flags` (`flags`),
+ KEY `creator` (`creator`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `auth_codes` (
@@ -173,6 +177,7 @@ CREATE TABLE IF NOT EXISTS `channel` (
`channel_r_pages` int(10) unsigned NOT NULL DEFAULT '128',
`channel_w_pages` int(10) unsigned NOT NULL DEFAULT '128',
`channel_a_republish` int(10) unsigned NOT NULL DEFAULT '128',
+ `channel_a_bookmark` int(10) unsigned NOT NULL DEFAULT '128',
PRIMARY KEY (`channel_id`),
UNIQUE KEY `channel_address_unique` (`channel_address`),
KEY `channel_account_id` (`channel_account_id`),
@@ -207,9 +212,57 @@ CREATE TABLE IF NOT EXISTS `channel` (
KEY `channel_w_pages` (`channel_w_pages`),
KEY `channel_deleted` (`channel_deleted`),
KEY `channel_a_republish` (`channel_a_republish`),
+ KEY `channel_a_bookmark` (`channel_a_bookmark`),
KEY `channel_dirdate` (`channel_dirdate`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE IF NOT EXISTS `chat` (
+ `chat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `chat_room` int(10) unsigned NOT NULL DEFAULT '0',
+ `chat_xchan` char(255) NOT NULL DEFAULT '',
+ `chat_text` mediumtext NOT NULL,
+ `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`chat_id`),
+ KEY `chat_room` (`chat_room`),
+ KEY `chat_xchan` (`chat_xchan`),
+ KEY `created` (`created`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `chatpresence` (
+ `cp_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `cp_room` int(10) unsigned NOT NULL DEFAULT '0',
+ `cp_xchan` char(255) NOT NULL DEFAULT '',
+ `cp_last` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `cp_status` char(255) NOT NULL,
+ `cp_client` char(128) NOT NULL DEFAULT '',
+ PRIMARY KEY (`cp_id`),
+ KEY `cp_room` (`cp_room`),
+ KEY `cp_xchan` (`cp_xchan`),
+ KEY `cp_last` (`cp_last`),
+ KEY `cp_status` (`cp_status`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+CREATE TABLE IF NOT EXISTS `chatroom` (
+ `cr_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `cr_aid` int(10) unsigned NOT NULL DEFAULT '0',
+ `cr_uid` int(10) unsigned NOT NULL DEFAULT '0',
+ `cr_name` char(255) NOT NULL DEFAULT '',
+ `cr_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `cr_edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `cr_expire` int(10) unsigned NOT NULL DEFAULT '0',
+ `allow_cid` mediumtext NOT NULL,
+ `allow_gid` mediumtext NOT NULL,
+ `deny_cid` mediumtext NOT NULL,
+ `deny_gid` mediumtext NOT NULL,
+ PRIMARY KEY (`cr_id`),
+ KEY `cr_aid` (`cr_aid`),
+ KEY `cr_uid` (`cr_uid`),
+ KEY `cr_name` (`cr_name`),
+ KEY `cr_created` (`cr_created`),
+ KEY `cr_edited` (`cr_edited`),
+ KEY `cr_expire` (`cr_expire`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
CREATE TABLE IF NOT EXISTS `clients` (
`client_id` varchar(20) NOT NULL,
`pw` varchar(20) NOT NULL,
@@ -240,7 +293,7 @@ CREATE TABLE IF NOT EXISTS `event` (
`start` datetime NOT NULL,
`finish` datetime NOT NULL,
`summary` text NOT NULL,
- `desc` text NOT NULL,
+ `description` text NOT NULL,
`location` text NOT NULL,
`type` char(255) NOT NULL,
`nofinish` tinyint(1) NOT NULL DEFAULT '0',
@@ -319,7 +372,7 @@ CREATE TABLE IF NOT EXISTS `fsuggest` (
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-CREATE TABLE IF NOT EXISTS `group` (
+CREATE TABLE IF NOT EXISTS `groups` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`hash` char(255) NOT NULL DEFAULT '',
`uid` int(10) unsigned NOT NULL,
@@ -532,9 +585,11 @@ CREATE TABLE IF NOT EXISTS `menu` (
`menu_channel_id` int(10) unsigned NOT NULL DEFAULT '0',
`menu_name` char(255) NOT NULL DEFAULT '',
`menu_desc` char(255) NOT NULL DEFAULT '',
+ `menu_flags` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`menu_id`),
KEY `menu_channel_id` (`menu_channel_id`),
- KEY `menu_name` (`menu_name`)
+ KEY `menu_name` (`menu_name`),
+ KEY `menu_flags` (`menu_flags`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `menu_item` (
@@ -590,13 +645,17 @@ CREATE TABLE IF NOT EXISTS `obj` (
`obj_type` int(10) unsigned NOT NULL DEFAULT '0',
`obj_obj` char(255) NOT NULL DEFAULT '',
`obj_channel` int(10) unsigned NOT NULL DEFAULT '0',
+ `allow_cid` mediumtext NOT NULL,
+ `allow_gid` mediumtext NOT NULL,
+ `deny_cid` mediumtext NOT NULL,
+ `deny_gid` mediumtext NOT NULL,
PRIMARY KEY (`obj_id`),
KEY `obj_verb` (`obj_verb`),
KEY `obj_page` (`obj_page`),
KEY `obj_type` (`obj_type`),
KEY `obj_channel` (`obj_channel`),
KEY `obj_obj` (`obj_obj`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `outq` (
`outq_hash` char(255) NOT NULL,
@@ -639,7 +698,7 @@ CREATE TABLE IF NOT EXISTS `photo` (
`created` datetime NOT NULL,
`edited` datetime NOT NULL,
`title` char(255) NOT NULL,
- `desc` text NOT NULL,
+ `description` text NOT NULL,
`album` char(255) NOT NULL,
`filename` char(255) NOT NULL,
`type` char(128) NOT NULL DEFAULT 'image/jpeg',
@@ -846,6 +905,15 @@ CREATE TABLE IF NOT EXISTS `spam` (
KEY `term` (`term`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+CREATE TABLE IF NOT EXISTS `sys_perms` (
+ `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `cat` char(255) NOT NULL,
+ `k` char(255) NOT NULL,
+ `v` mediumtext NOT NULL,
+ `public_perm` tinyint(1) unsigned NOT NULL,
+ PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
CREATE TABLE IF NOT EXISTS `term` (
`tid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`aid` int(10) unsigned NOT NULL DEFAULT '0',
@@ -913,7 +981,7 @@ CREATE TABLE IF NOT EXISTS `verify` (
KEY `token` (`token`),
KEY `meta` (`meta`),
KEY `created` (`created`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `vote` (
`vote_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -969,7 +1037,7 @@ CREATE TABLE IF NOT EXISTS `xconfig` (
KEY `xchan` (`xchan`),
KEY `cat` (`cat`),
KEY `k` (`k`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `xign` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -1006,6 +1074,9 @@ CREATE TABLE IF NOT EXISTS `xprof` (
`xprof_postcode` char(32) NOT NULL DEFAULT '',
`xprof_country` char(255) NOT NULL DEFAULT '',
`xprof_keywords` text NOT NULL,
+ `xprof_about` text NOT NULL,
+ `xprof_homepage` char(255) NOT NULL DEFAULT '',
+ `xprof_hometown` char(255) NOT NULL DEFAULT '',
PRIMARY KEY (`xprof_hash`),
KEY `xprof_desc` (`xprof_desc`),
KEY `xprof_dob` (`xprof_dob`),
@@ -1016,7 +1087,8 @@ CREATE TABLE IF NOT EXISTS `xprof` (
KEY `xprof_region` (`xprof_region`),
KEY `xprof_postcode` (`xprof_postcode`),
KEY `xprof_country` (`xprof_country`),
- KEY `xprof_age` (`xprof_age`)
+ KEY `xprof_age` (`xprof_age`),
+ KEY `xprof_hometown` (`xprof_hometown`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE IF NOT EXISTS `xtag` (
@@ -1028,4 +1100,4 @@ CREATE TABLE IF NOT EXISTS `xtag` (
KEY `xtag_term` (`xtag_term`),
KEY `xtag_hash` (`xtag_hash`),
KEY `xtag_flags` (`xtag_flags`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
diff --git a/install/htconfig.sample.php b/install/htconfig.sample.php
index 33258cf41..b23dfe3b6 100755
--- a/install/htconfig.sample.php
+++ b/install/htconfig.sample.php
@@ -3,7 +3,7 @@
// If automatic system installation fails:
// Copy or rename this file to .htconfig.php in the top level
-// Friendica directory
+// Red Matrix directory
// Why .htconfig.php? Because it contains sensitive information which could
// give somebody complete control of your database. Apache's default
diff --git a/install/update.php b/install/update.php
index f498ec042..7d1305863 100644
--- a/install/update.php
+++ b/install/update.php
@@ -1,6 +1,6 @@
<?php
-define( 'UPDATE_VERSION' , 1084 );
+define( 'UPDATE_VERSION' , 1098 );
/**
*
@@ -919,3 +919,184 @@ ADD INDEX ( `aid` )");
return UPDATE_FAILED;
}
+function update_r1084() {
+
+
+ $r = q("CREATE TABLE if not exists `sys_perms` (
+ `id` INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY ,
+ `cat` CHAR( 255 ) NOT NULL ,
+ `k` CHAR( 255 ) NOT NULL ,
+ `v` MEDIUMTEXT NOT NULL,
+ `public_perm` TINYINT( 1 ) UNSIGNED NOT NULL
+) ENGINE = MYISAM DEFAULT CHARSET = utf8");
+
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+
+}
+
+function update_r1085() {
+ $r1 = q("ALTER TABLE `photo` CHANGE `desc` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ");
+
+ $r2 = q("RENAME TABLE `group` TO `groups`");
+
+ $r3 = q("ALTER TABLE `event` CHANGE `desc` `description` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ");
+
+ if($r1 && $r2 && $r3)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+
+}
+
+function update_r1086() {
+ $r = q("ALTER TABLE `account` ADD `account_level` INT UNSIGNED NOT NULL DEFAULT '0',
+ADD INDEX ( `account_level` )");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1087() {
+ $r = q("ALTER TABLE `xprof` ADD `xprof_about` TEXT NOT NULL DEFAULT '',
+ADD `xprof_homepage` CHAR( 255 ) NOT NULL DEFAULT '',
+ADD `xprof_hometown` CHAR( 255 ) NOT NULL DEFAULT '',
+ADD INDEX ( `xprof_hometown` )");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1088() {
+ $r = q("ALTER TABLE `obj` ADD `allow_cid` MEDIUMTEXT NOT NULL DEFAULT '',
+ADD `allow_gid` MEDIUMTEXT NOT NULL DEFAULT '',
+ADD `deny_cid` MEDIUMTEXT NOT NULL DEFAULT '',
+ADD `deny_gid` MEDIUMTEXT NOT NULL DEFAULT ''");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1089() {
+ $r = q("ALTER TABLE `attach` ADD `creator` CHAR( 128 ) NOT NULL DEFAULT '' AFTER `hash` ,
+ADD INDEX ( `creator` ) ");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+
+function update_r1090() {
+ $r = q("ALTER TABLE `menu` ADD `menu_flags` INT NOT NULL DEFAULT '0',
+ADD INDEX ( `menu_flags` )");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1091() {
+ @mkdir('store/[data]/smarty',STORAGE_DEFAULT_PERMISSIONS,true);
+ @file_put_contents('store/[data]/locks','');
+ return UPDATE_SUCCESS;
+}
+
+function update_r1092() {
+ $r1 = q("CREATE TABLE IF NOT EXISTS `chat` (
+ `chat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `chat_room` int(10) unsigned NOT NULL DEFAULT '0',
+ `chat_xchan` char(255) NOT NULL DEFAULT '',
+ `chat_text` mediumtext NOT NULL,
+ `created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`chat_id`),
+ KEY `chat_room` (`chat_room`),
+ KEY `chat_xchan` (`chat_xchan`),
+ KEY `created` (`created`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8");
+
+ $r2 = q("CREATE TABLE IF NOT EXISTS `chatpresence` (
+ `cp_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `cp_room` int(10) unsigned NOT NULL DEFAULT '0',
+ `cp_xchan` char(255) NOT NULL DEFAULT '',
+ `cp_last` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `cp_status` char(255) NOT NULL,
+ PRIMARY KEY (`cp_id`),
+ KEY `cp_room` (`cp_room`),
+ KEY `cp_xchan` (`cp_xchan`),
+ KEY `cp_last` (`cp_last`),
+ KEY `cp_status` (`cp_status`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8");
+
+ $r3 = q("CREATE TABLE IF NOT EXISTS `chatroom` (
+ `cr_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+ `cr_aid` int(10) unsigned NOT NULL DEFAULT '0',
+ `cr_uid` int(10) unsigned NOT NULL DEFAULT '0',
+ `cr_name` char(255) NOT NULL DEFAULT '',
+ `cr_created` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `cr_edited` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `allow_cid` mediumtext NOT NULL,
+ `allow_gid` mediumtext NOT NULL,
+ `deny_cid` mediumtext NOT NULL,
+ `deny_gid` mediumtext NOT NULL,
+ PRIMARY KEY (`cr_id`),
+ KEY `cr_aid` (`cr_aid`),
+ KEY `cr_uid` (`cr_uid`),
+ KEY `cr_name` (`cr_name`),
+ KEY `cr_created` (`cr_created`),
+ KEY `cr_edited` (`cr_edited`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8");
+
+
+ if($r1 && $r2 && $r3)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+
+
+
+function update_r1093() {
+ $r = q("ALTER TABLE `chatpresence` ADD `cp_client` CHAR( 128 ) NOT NULL DEFAULT ''");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1094() {
+ $r = q("ALTER TABLE `chatroom` ADD `cr_expire` INT UNSIGNED NOT NULL DEFAULT '0' AFTER `cr_edited` ,
+ADD INDEX ( `cr_expire` )");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1095() {
+ $r = q("ALTER TABLE `channel` ADD `channel_a_bookmark` INT UNSIGNED NOT NULL DEFAULT '128',
+ADD INDEX ( `channel_a_bookmark` )");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1096() {
+ $r = q("ALTER TABLE `account` CHANGE `account_level` `account_level` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'");
+ if($r)
+ return UPDATE_SUCCESS;
+ return UPDATE_FAILED;
+}
+
+function update_r1097() {
+
+ // fix some mangled hublocs from a bug long ago
+
+ $r = q("select hubloc_id, hubloc_addr from hubloc where hubloc_addr like '%%/%%'");
+ if($r) {
+ foreach($r as $rr) {
+ q("update hubloc set hubloc_addr = '%s' where hubloc_id = %d limit 1",
+ dbesc(substr($rr['hubloc_addr'],0,strpos($rr['hubloc_addr'],'/'))),
+ intval($rr['hubloc_id'])
+ );
+ }
+ }
+ return UPDATE_SUCCESS;
+
+} \ No newline at end of file