aboutsummaryrefslogtreecommitdiffstats
path: root/mod
diff options
context:
space:
mode:
authorHaakon Meland Eriksen <haakon.eriksen@far.no>2016-02-06 12:57:25 +0100
committerHaakon Meland Eriksen <haakon.eriksen@far.no>2016-02-06 12:57:25 +0100
commit2935c5fe1ad7999d6abf527bfc8e8d353ceb9d32 (patch)
tree6935173702da59826d6c7577a927d96a57bc4478 /mod
parent2afdba48f06bb99922c19bf964d8f601c1545166 (diff)
parent021584d782c5bfafaa5ffe26d0c5850c8fffdd8f (diff)
downloadvolse-hubzilla-2935c5fe1ad7999d6abf527bfc8e8d353ceb9d32.tar.gz
volse-hubzilla-2935c5fe1ad7999d6abf527bfc8e8d353ceb9d32.tar.bz2
volse-hubzilla-2935c5fe1ad7999d6abf527bfc8e8d353ceb9d32.zip
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'mod')
-rw-r--r--mod/import.php9
-rw-r--r--mod/register.php4
-rw-r--r--mod/settings.php2
-rwxr-xr-xmod/setup.php27
4 files changed, 27 insertions, 15 deletions
diff --git a/mod/import.php b/mod/import.php
index b6091d944..1a2c87a63 100644
--- a/mod/import.php
+++ b/mod/import.php
@@ -109,6 +109,9 @@ function import_account(&$a, $account_id) {
return;
}
+ if(UNO)
+ return;
+
if(array_key_exists('compatibility',$data) && array_key_exists('database',$data['compatibility'])) {
$v1 = substr($data['compatibility']['database'],-4);
$v2 = substr(DB_UPDATE_VERSION,-4);
@@ -116,6 +119,12 @@ function import_account(&$a, $account_id) {
$t = sprintf( t('Warning: Database versions differ by %1$d updates.'), $v2 - $v1 );
notice($t);
}
+ if(array_key_exists('server_role',$data['compatibility'])
+ && $data['compatibility']['server_role'] != UNO) {
+ notice( t('Server platform is not compatible. Operation not permitted.') . EOL);
+ return;
+ }
+
}
// import channel
diff --git a/mod/register.php b/mod/register.php
index 853728e10..63f09a9b8 100644
--- a/mod/register.php
+++ b/mod/register.php
@@ -227,8 +227,8 @@ function register_content(&$a) {
$nickname = ((x($_REQUEST,'nickname')) ? strip_tags(trim($_REQUEST['nickname'])) : "" );
$privacy_role = ((x($_REQUEST,'permissions_role')) ? $_REQUEST['permissions_role'] : "" );
- $auto_create = get_config('system','auto_channel_create');
- $default_role = get_config('system','default_permissions_role');
+ $auto_create = ((UNO) || (get_config('system','auto_channel_create')) ? true : false);
+ $default_role = ((UNO) ? 'social' : get_config('system','default_permissions_role'));
require_once('include/bbcode.php');
diff --git a/mod/settings.php b/mod/settings.php
index c1a4b019d..eea3d9995 100644
--- a/mod/settings.php
+++ b/mod/settings.php
@@ -600,7 +600,7 @@ function settings_content(&$a) {
local_channel());
if (!count($r)){
- notice(t("You can't edit this application."));
+ notice(t('Application not found.'));
return;
}
$app = $r[0];
diff --git a/mod/setup.php b/mod/setup.php
index 5c9e988d9..9bcbabbc5 100755
--- a/mod/setup.php
+++ b/mod/setup.php
@@ -67,7 +67,8 @@ function setup_post(&$a) {
$phpath = trim($_POST['phpath']);
$adminmail = trim($_POST['adminmail']);
$siteurl = trim($_POST['siteurl']);
-
+ $advanced = ((intval($_POST['advanced'])) ? 1 : 0);
+
// $siteurl should not have a trailing slash
$siteurl = rtrim($siteurl,'/');
@@ -118,6 +119,7 @@ function setup_post(&$a) {
$timezone = notags(trim($_POST['timezone']));
$adminmail = notags(trim($_POST['adminmail']));
$siteurl = notags(trim($_POST['siteurl']));
+ $advanced = ((intval($_POST['advanced'])) ? 1 : 0);
if($siteurl != z_root()) {
$test = z_fetch_url($siteurl."/setup/testrewrite");
@@ -138,16 +140,17 @@ function setup_post(&$a) {
$tpl = get_intltext_template('htconfig.tpl');
$txt = replace_macros($tpl,array(
- '$dbhost' => $dbhost,
- '$dbport' => $dbport,
- '$dbuser' => $dbuser,
- '$dbpass' => $dbpass,
- '$dbdata' => $dbdata,
- '$dbtype' => $dbtype,
- '$timezone' => $timezone,
- '$siteurl' => $siteurl,
- '$site_id' => random_string(),
- '$phpath' => $phpath,
+ '$dbhost' => $dbhost,
+ '$dbport' => $dbport,
+ '$dbuser' => $dbuser,
+ '$dbpass' => $dbpass,
+ '$dbdata' => $dbdata,
+ '$dbtype' => $dbtype,
+ '$uno' => 1 - $advanced,
+ '$timezone' => $timezone,
+ '$siteurl' => $siteurl,
+ '$site_id' => random_string(),
+ '$phpath' => $phpath,
'$adminmail' => $adminmail
));
@@ -321,7 +324,6 @@ function setup_content(&$a) {
'$adminmail' => array('adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.')),
'$siteurl' => array('siteurl', t('Website URL'), z_root(), t('Please use SSL (https) URL if available.')),
-
'$lbl_10' => t('Please select a default timezone for your website'),
'$baseurl' => $a->get_baseurl(),
@@ -363,6 +365,7 @@ function setup_content(&$a) {
'$adminmail' => array('adminmail', t('Site administrator email address'), $adminmail, t('Your account email address must match this in order to use the web admin panel.')),
'$siteurl' => array('siteurl', t('Website URL'), z_root(), t('Please use SSL (https) URL if available.')),
+ '$advanced' => array('advanced', t('Enable $Projectname <strong>advanced</strong> features?'), 0, t('Some advanced features, while useful - may be best suited for technically proficient audiences')),
'$timezone' => array('timezone', t('Please select a default timezone for your website'), $timezone, '', get_timezones()),