aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
Diffstat (limited to 'views/default')
-rw-r--r--views/default/admin/site/advanced.php67
-rw-r--r--views/default/admin/site/basic.php18
-rw-r--r--views/default/core/account/login_box.php2
-rw-r--r--views/default/core/account/login_dropdown.php2
-rw-r--r--views/default/core/account/login_walled_garden.php22
-rw-r--r--views/default/core/settings/account/default_access.php6
-rw-r--r--views/default/core/settings/account/language.php1
-rw-r--r--views/default/forms/login.php2
-rw-r--r--views/default/input/button.php4
-rw-r--r--views/default/js/initialize_elgg.php2
-rw-r--r--views/default/page/elements/html_begin.php7
-rw-r--r--views/default/page/elements/html_end.php3
12 files changed, 77 insertions, 59 deletions
diff --git a/views/default/admin/site/advanced.php b/views/default/admin/site/advanced.php
index 65c796fbd..49c5de6ac 100644
--- a/views/default/admin/site/advanced.php
+++ b/views/default/admin/site/advanced.php
@@ -10,57 +10,94 @@ $action = elgg_get_site_url() . "action/admin/site/update_advanced";
$form_body = "";
-foreach(array('wwwroot', 'path', 'dataroot', 'view') as $field) {
+foreach (array('wwwroot', 'path', 'dataroot', 'view') as $field) {
$form_body .= "<p>";
$form_body .= elgg_echo('installation:' . $field) . "<br />";
$warning = elgg_echo('installation:warning:' . $field);
- if ($warning != 'installation:warning:' . $field) echo "<b>" . $warning . "</b><br />";
- $value = $vars['config']->$field;
+ if ($warning != 'installation:warning:' . $field) {
+ echo "<b>" . $warning . "</b><br />";
+ }
+ $value = elgg_get_config($field);
$form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value));
$form_body .= "</p>";
}
$form_body .= "<p>" . elgg_echo('admin:site:access:warning') . "<br />";
-$form_body .= elgg_echo('installation:sitepermissions') . elgg_view('input/access', array('internalname' => 'default_access','value' => $vars['config']->default_access)) . "</p>";
-$form_body .= "<p>" . elgg_echo('installation:allow_user_default_access:description') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:allow_user_default_access:label')), 'internalname' => 'allow_user_default_access', 'value' => ($vars['config']->allow_user_default_access ? elgg_echo('installation:allow_user_default_access:label') : "") )) . "</p>";
-$form_body .= "<p>" . elgg_echo('installation:simplecache:description') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:simplecache:label')), 'internalname' => 'simplecache_enabled', 'value' => ($vars['config']->simplecache_enabled ? elgg_echo('installation:simplecache:label') : "") )) . "</p>";
-$form_body .= "<p>" . elgg_echo('installation:viewpathcache:description') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:viewpathcache:label')), 'internalname' => 'viewpath_cache_enabled', 'value' => (($vars['config']->viewpath_cache_enabled) ? elgg_echo('installation:viewpathcache:label') : "") )) . "</p>";
+$form_body .= elgg_echo('installation:sitepermissions');
+$form_body .= elgg_view('input/access', array(
+ 'internalname' => 'default_access',
+ 'value' => elgg_get_config('default_access'),
+)) . "</p>";
+$form_body .= "<p>" . elgg_echo('installation:allow_user_default_access:description') . "<br />";
+$form_body .= elgg_view("input/checkboxes", array(
+ 'options' => array(elgg_echo('installation:allow_user_default_access:label')),
+ 'internalname' => 'allow_user_default_access',
+ 'value' => (elgg_get_config('allow_user_default_access') ? elgg_echo('installation:allow_user_default_access:label') : ""),
+)) . "</p>";
+$form_body .= "<p>" . elgg_echo('installation:simplecache:description') . "<br />";
+$form_body .= elgg_view("input/checkboxes", array(
+ 'options' => array(elgg_echo('installation:simplecache:label')),
+ 'internalname' => 'simplecache_enabled',
+ 'value' => (elgg_get_config('simplecache_enabled') ? elgg_echo('installation:simplecache:label') : ""),
+)) . "</p>";
+$form_body .= "<p>" . elgg_echo('installation:viewpathcache:description') . "<br />";
+$form_body .= elgg_view("input/checkboxes", array(
+ 'options' => array(elgg_echo('installation:viewpathcache:label')),
+ 'internalname' => 'viewpath_cache_enabled',
+ 'value' => (elgg_get_config('viewpath_cache_enabled') ? elgg_echo('installation:viewpathcache:label') : ""),
+)) . "</p>";
$debug_options = array('0' => elgg_echo('installation:debug:none'), 'ERROR' => elgg_echo('installation:debug:error'), 'WARNING' => elgg_echo('installation:debug:warning'), 'NOTICE' => elgg_echo('installation:debug:notice'));
$form_body .= "<p>" . elgg_echo('installation:debug');
-$form_body .= elgg_view('input/pulldown', array('options_values' => $debug_options, 'internalname' => 'debug', 'value' => $vars['config']->debug));
+$form_body .= elgg_view('input/pulldown', array(
+ 'options_values' => $debug_options,
+ 'internalname' => 'debug',
+ 'value' => elgg_get_config('debug'),
+));
$form_body .= '</p>';
// control new user registration
$options = array(
'options' => array(elgg_echo('installation:registration:label')),
'internalname' => 'allow_registration',
- 'value' => $vars['config']->allow_registration ? elgg_echo('installation:registration:label') : '',
+ 'value' => elgg_get_config('allow_registration') ? elgg_echo('installation:registration:label') : '',
);
$form_body .= '<p>' . elgg_echo('installation:registration:description');
$form_body .= '<br />' .elgg_view('input/checkboxes', $options) . '</p>';
// control walled garden
+$walled_garden = elgg_get_config(walled_garden);
$options = array(
'options' => array(elgg_echo('installation:walled_garden:label')),
'internalname' => 'walled_garden',
- 'value' => $vars['config']->walled_garden ? elgg_echo('installation:walled_garden:label') : '',
+ 'value' => $walled_garden ? elgg_echo('installation:walled_garden:label') : '',
);
$form_body .= '<p>' . elgg_echo('installation:walled_garden:description');
$form_body .= '<br />' . elgg_view('input/checkboxes', $options) . '</p>';
-$form_body .= "<p>" . elgg_echo('installation:httpslogin') . "<br />" .elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:httpslogin:label')), 'internalname' => 'https_login', 'value' => ($vars['config']->https_login ? elgg_echo('installation:httpslogin:label') : "") )) . "</p>";
+$form_body .= "<p>" . elgg_echo('installation:httpslogin') . "<br />";
+$form_body .= elgg_view("input/checkboxes", array(
+ 'options' => array(elgg_echo('installation:httpslogin:label')),
+ 'internalname' => 'https_login',
+ 'value' => (elgg_get_config('https_login') ? elgg_echo('installation:httpslogin:label') : "")
+)) . "</p>";
$form_body .= "<p>" . elgg_echo('installation:disableapi') . "<br />";
$on = elgg_echo('installation:disableapi:label');
-if ((isset($CONFIG->disable_api)) && ($CONFIG->disable_api == true)) {
- $on = ($vars['config']->disable_api ? "" : elgg_echo('installation:disableapi:label'));
+$disable_api = elgg_get_config('disable_api');
+if ($disable_api) {
+ $on = (disable_api ? "" : elgg_echo('installation:disableapi:label'));
}
-$form_body .= elgg_view("input/checkboxes", array('options' => array(elgg_echo('installation:disableapi:label')), 'internalname' => 'api', 'value' => $on ));
+$form_body .= elgg_view("input/checkboxes", array(
+ 'options' => array(elgg_echo('installation:disableapi:label')),
+ 'internalname' => 'api',
+ 'value' => $on,
+));
$form_body .= "</p>";
$form_body .= elgg_view('input/hidden', array('internalname' => 'settings', 'value' => 'go'));
$form_body .= "<div class='divider'></div>".elgg_view('input/submit', array('value' => elgg_echo("save")));
-$form_body = "<div class='admin_settings site_admin margin-top'>".$form_body."</div>";
+$form_body = "<div class='admin_settings site_admin'>" . $form_body . "</div>";
+
echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));
diff --git a/views/default/admin/site/basic.php b/views/default/admin/site/basic.php
index d7d36f25b..2c50cf89f 100644
--- a/views/default/admin/site/basic.php
+++ b/views/default/admin/site/basic.php
@@ -10,19 +10,27 @@ $action = elgg_get_site_url() . "action/admin/site/update_basic";
$form_body = "";
-foreach(array('sitename','sitedescription', 'siteemail') as $field) {
+foreach (array('sitename','sitedescription', 'siteemail') as $field) {
$form_body .= "<p>";
$form_body .= elgg_echo('installation:' . $field) . "<br />";
$warning = elgg_echo('installation:warning:' . $field);
- if ($warning != 'installation:warning:' . $field) echo "<b>" . $warning . "</b><br />";
- $value = $vars['config']->$field;
+ if ($warning != 'installation:warning:' . $field) {
+ echo "<b>" . $warning . "</b><br />";
+ }
+ $value = elgg_get_config($field);
$form_body .= elgg_view("input/text",array('internalname' => $field, 'value' => $value));
$form_body .= "</p>";
}
$languages = get_installed_translations();
-$form_body .= "<p>" . elgg_echo('installation:language') . elgg_view("input/pulldown", array('internalname' => 'language', 'value' => $vars['config']->language, 'options_values' => $languages)) . "</p>";
+$form_body .= "<p>" . elgg_echo('installation:language');
+$form_body .= elgg_view("input/pulldown", array(
+ 'internalname' => 'language',
+ 'value' => elgg_get_config('language'),
+ 'options_values' => $languages,
+)) . "</p>";
$form_body .= "<div class='divider'></div>".elgg_view('input/submit', array('value' => elgg_echo("save")));
-$form_body = "<div class='admin_settings site_admin margin-top'>".$form_body."</div>";
+$form_body = "<div class='admin_settings site_admin'>".$form_body."</div>";
+
echo elgg_view('input/form', array('action' => $action, 'body' => $form_body));
diff --git a/views/default/core/account/login_box.php b/views/default/core/account/login_box.php
index 0dee72328..a371ab0c8 100644
--- a/views/default/core/account/login_box.php
+++ b/views/default/core/account/login_box.php
@@ -9,7 +9,7 @@
$form_body = elgg_view('forms/login');
$login_url = elgg_get_site_url();
-if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
+if (elgg_get_config('https_login')) {
$login_url = str_replace("http:", "https:", $login_url);
}
?>
diff --git a/views/default/core/account/login_dropdown.php b/views/default/core/account/login_dropdown.php
index 386a52a6c..356aa48de 100644
--- a/views/default/core/account/login_dropdown.php
+++ b/views/default/core/account/login_dropdown.php
@@ -12,7 +12,7 @@ $form_body = elgg_view('forms/login');
$form_body .= "<input type='hidden' name='returntoreferer' value='true' />";
$login_url = elgg_get_site_url();
-if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
+if (elgg_get_config('https_login')) {
$login_url = str_replace("http", "https", elgg_get_site_url());
}
diff --git a/views/default/core/account/login_walled_garden.php b/views/default/core/account/login_walled_garden.php
index 8b801ed1d..9335c0dfd 100644
--- a/views/default/core/account/login_walled_garden.php
+++ b/views/default/core/account/login_walled_garden.php
@@ -2,30 +2,12 @@
/**
* Walled Garden Login Form
*/
-
-global $CONFIG;
-
-/*
-$form_body = "<label>" . elgg_echo('username') . "<br />" . elgg_view('input/text', array('internalname' => 'username', 'class' => 'login-textarea username')) . "</label>";
-$form_body .= "<br />";
-$form_body .= "<label>" . elgg_echo('password') . "<br />" . elgg_view('input/password', array('internalname' => 'password', 'class' => 'login-textarea')) . "</label><br />";
-
-$form_body .= elgg_view('input/submit', array('value' => elgg_echo('login')));
-$form_body .= "<div class='remember_me'><label><input type='checkbox' name='persistent' checked value='true' />".elgg_echo('user:persistent')."</label></div>";
-
-$register = elgg_echo('register');
-$lost_password = elgg_echo('user:password:lost');
-$form_body .= '<p class="lost_password">';
-$form_body .= $CONFIG->allow_registration ? "<a class=\"registration_link\" href=\"".elgg_get_site_url()."pg/register/\">$register</a> | " : '';
-$form_body .= "<a class='forgotten_password_link' href=\"{$login_url}pages/account/forgotten_password.php\">$lost_password</a>";
-$form_body .= '</p>';
-*/
$form_body = elgg_view('forms/login');
$form_body .= elgg_view('input/hidden', array('internalname' => 'returntoreferer', 'value' => 'true'));
$login_url = elgg_get_site_url();
-if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
+if (elgg_get_config('https_login')) {
$login_url = str_replace("http", "https", elgg_get_site_url());
}
?>
@@ -36,7 +18,7 @@ if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) {
?>
<?php
-if ($CONFIG->allow_registration) {
+if (elgg_get_config('allow_registration')) {
$title = elgg_echo('register');
$body = elgg_view("account/forms/register", array(
'friend_guid' => (int) get_input('friend_guid', 0),
diff --git a/views/default/core/settings/account/default_access.php b/views/default/core/settings/account/default_access.php
index 678a68ba1..4c4e44757 100644
--- a/views/default/core/settings/account/default_access.php
+++ b/views/default/core/settings/account/default_access.php
@@ -5,12 +5,12 @@
* @package Elgg
* @subpackage Core
*/
-if ($vars['config']->allow_user_default_access) {
+if (elgg_get_config('allow_user_default_access')) {
$user = elgg_get_page_owner_entity();
if ($user) {
if (false === ($default_access = $user->getPrivateSetting('elgg_default_access'))) {
- $default_access = $vars['config']->default_access;
+ $default_access = elgg_get_config('default_access');
}
?>
<div class="elgg-module elgg-info-module">
@@ -22,7 +22,7 @@ if ($vars['config']->allow_user_default_access) {
<?php echo elgg_echo('default_access:label'); ?>:
<?php
- echo elgg_view('input/access',array('internalname' => 'default_access', 'value' => $default_access));
+ echo elgg_view('input/access', array('internalname' => 'default_access', 'value' => $default_access));
?>
</p>
diff --git a/views/default/core/settings/account/language.php b/views/default/core/settings/account/language.php
index bac22fe34..3391a3733 100644
--- a/views/default/core/settings/account/language.php
+++ b/views/default/core/settings/account/language.php
@@ -6,7 +6,6 @@
* @subpackage Core
*/
-global $CONFIG;
$user = elgg_get_page_owner_entity();
if ($user) {
diff --git a/views/default/forms/login.php b/views/default/forms/login.php
index d5da8d796..99d9cdd22 100644
--- a/views/default/forms/login.php
+++ b/views/default/forms/login.php
@@ -25,7 +25,7 @@
<?php echo elgg_view('login/extend'); ?>
<?php
- if ($CONFIG->allow_registration) {
+ if (elgg_get_config('allow_registration')) {
echo '<a class="registration_link" href="' . elgg_get_site_url() . 'pg/register/">' . elgg_echo('register') . '</a> | ';
}
?>
diff --git a/views/default/input/button.php b/views/default/input/button.php
index 8e58b7618..db520b6ac 100644
--- a/views/default/input/button.php
+++ b/views/default/input/button.php
@@ -8,8 +8,6 @@
* @uses $vars['src'] Src of an image
*/
-global $CONFIG;
-
$defaults = array(
'type' => 'button',
'class' => 'elgg-submit-button',
@@ -29,7 +27,7 @@ switch ($vars['type']) {
}
// blank src if trying to access an offsite image. @todo why?
-if (strpos($vars['src'], $CONFIG->wwwroot) === false) {
+if (strpos($vars['src'], elgg_get_site_url()) === false) {
$vars['src'] = "";
}
?>
diff --git a/views/default/js/initialize_elgg.php b/views/default/js/initialize_elgg.php
index 7634851f5..6a82b879e 100644
--- a/views/default/js/initialize_elgg.php
+++ b/views/default/js/initialize_elgg.php
@@ -8,7 +8,7 @@
/**
* Don't want to cache these -- they could change for every request
*/
-elgg.config.lastcache = <?php echo (int)($vars['config']->lastcache); ?>;
+elgg.config.lastcache = <?php echo (int)elgg_get_config('lastcache'); ?>;
elgg.security.token.__elgg_ts = <?php echo $ts = time(); ?>;
elgg.security.token.__elgg_token = '<?php echo generate_action_token($ts); ?>';
diff --git a/views/default/page/elements/html_begin.php b/views/default/page/elements/html_begin.php
index c4918205f..6a461d767 100644
--- a/views/default/page/elements/html_begin.php
+++ b/views/default/page/elements/html_begin.php
@@ -3,18 +3,15 @@
* Start html output.
* The standard HTML header that displays across the site
*
- * @uses $vars['config'] The site configuration settings, imported
* @uses $vars['title'] The page title
* @uses $vars['body'] The main content of the page
*/
// Set title
if (empty($vars['title'])) {
- $title = $vars['config']->sitename;
-} else if (empty($vars['config']->sitename)) {
- $title = $vars['title'];
+ $title = elgg_get_config('sitename');
} else {
- $title = $vars['config']->sitename . ": " . $vars['title'];
+ $title = elgg_get_config('sitename') . ": " . $vars['title'];
}
global $autofeed;
diff --git a/views/default/page/elements/html_end.php b/views/default/page/elements/html_end.php
index 0862934cf..26b0ee451 100644
--- a/views/default/page/elements/html_end.php
+++ b/views/default/page/elements/html_end.php
@@ -2,9 +2,6 @@
/**
* Start html output.
* The standard HTML header that displays across the site
- * @uses $vars['config'] The site configuration settings, imported
- * @uses $vars['title'] The page title
- * @uses $vars['body'] The main content of the page
*/
?>
</body>