aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--actions/admin/site/update_basic.php2
-rw-r--r--actions/systemsettings/install.php1
-rw-r--r--engine/lib/elgglib.php6
-rw-r--r--languages/en.php3
-rw-r--r--views/default/settings/system.php2
5 files changed, 11 insertions, 3 deletions
diff --git a/actions/admin/site/update_basic.php b/actions/admin/site/update_basic.php
index 830df9ad1..ae48da8f8 100644
--- a/actions/admin/site/update_basic.php
+++ b/actions/admin/site/update_basic.php
@@ -31,6 +31,8 @@
set_config('language', get_input('language'), $site->getGUID());
+ set_config('view', get_input('view'), $site->getGUID());
+
$debug = get_input('debug');
if ($debug)
set_config('debug', 1, $site->getGUID());
diff --git a/actions/systemsettings/install.php b/actions/systemsettings/install.php
index 30f501f36..f18844ce1 100644
--- a/actions/systemsettings/install.php
+++ b/actions/systemsettings/install.php
@@ -33,6 +33,7 @@
datalist_set('default_site',$site->getGUID());
+ set_config('view', get_input('view'), $site->getGUID());
set_config('language', get_input('language'), $site->getGUID());
$debug = get_input('debug');
diff --git a/engine/lib/elgglib.php b/engine/lib/elgglib.php
index 4377083af..3670cd884 100644
--- a/engine/lib/elgglib.php
+++ b/engine/lib/elgglib.php
@@ -128,7 +128,11 @@
// If we haven't been asked for a specific view, assume default
if (empty($_SESSION['view'])) {
- $_SESSION['view'] = "default";
+ $_SESSION['view'] = "default";
+
+ // If we have a config default view for this site then use that instead of 'default'
+ if ((is_installed()) && (!empty($CONFIG->view)))
+ $_SESSION['view'] = $CONFIG->view;
}
if (empty($viewtype) && is_callable('get_input'))
$viewtype = get_input('view');
diff --git a/languages/en.php b/languages/en.php
index 0e359c561..1641c206d 100644
--- a/languages/en.php
+++ b/languages/en.php
@@ -351,7 +351,8 @@ Alternatively, you can enter your database settings below and we will try and do
'dataroot' => "The full path to the directory where uploaded files will be stored, followed by a trailing slash:",
'language' => "The default language code for your site, e.g. 'en' for English, 'fr' for French, 'ru' for Russian:",
'debug' => "Debug mode provides extra information which can be used to diagnose faults, however it can slow your system down so should only be used if you are having problems:",
- 'debug:label' => "Turn on debug mode",
+ 'debug:label' => "Turn on debug mode",
+ 'view' => "Enter the view which will be used as the default for your site (e.g. 'mobile') or leave this blank for the default view:",
/**
* Welcome
diff --git a/views/default/settings/system.php b/views/default/settings/system.php
index c956da0d4..7fba20947 100644
--- a/views/default/settings/system.php
+++ b/views/default/settings/system.php
@@ -27,7 +27,7 @@
<?php
- foreach(array('sitename','wwwroot','path','dataroot', 'language') as $field) {
+ foreach(array('sitename','wwwroot','path','dataroot', 'language', 'view') as $field) {
?>
<p>