diff options
-rw-r--r-- | actions/admin/user/resetpassword.php | 2 | ||||
-rw-r--r-- | actions/register.php | 6 | ||||
-rw-r--r-- | actions/user/default_access.php | 4 | ||||
-rw-r--r-- | actions/useradd.php | 14 | ||||
-rw-r--r-- | pages/account/register.php | 2 | ||||
-rw-r--r-- | pages/avatar/view.php | 1 | ||||
-rw-r--r-- | views/default/admin/overview/statistics.php | 2 | ||||
-rw-r--r-- | views/default/profile/hover.php | 7 | ||||
-rw-r--r-- | views/installation/input/button.php | 4 |
9 files changed, 18 insertions, 24 deletions
diff --git a/actions/admin/user/resetpassword.php b/actions/admin/user/resetpassword.php index e3f737974..d019a7f55 100644 --- a/actions/admin/user/resetpassword.php +++ b/actions/admin/user/resetpassword.php @@ -28,7 +28,7 @@ if (($user instanceof ElggUser) && ($user->canEdit())) { system_message(elgg_echo('admin:user:resetpassword:yes')); notify_user($user->guid, - $CONFIG->site->guid, + elgg_get_site_entity()->guid, elgg_echo('email:resetpassword:subject'), elgg_echo('email:resetpassword:body', array($user->username, $password)), NULL, diff --git a/actions/register.php b/actions/register.php index 1a0954e3b..33ee19aee 100644 --- a/actions/register.php +++ b/actions/register.php @@ -6,8 +6,6 @@ * @subpackage User.Account */ -global $CONFIG; - // Get variables $username = get_input('username'); $password = get_input('password'); @@ -17,7 +15,7 @@ $name = get_input('name'); $friend_guid = (int) get_input('friend_guid', 0); $invitecode = get_input('invitecode'); -if ($CONFIG->allow_registration) { +if (elgg_get_config('allow_registration')) { try { if (trim($password) == "" || trim($password2) == "") { throw new RegistrationException(elgg_echo('RegistrationException:EmptyPassword')); @@ -52,7 +50,7 @@ if ($CONFIG->allow_registration) { throw new RegistrationException(elgg_echo('registerbad')); } - system_message(elgg_echo("registerok", array($CONFIG->sitename))); + system_message(elgg_echo("registerok", array(elgg_get_site_entity()->name))); // if exception thrown, this probably means there is a validation // plugin that has disabled the user diff --git a/actions/user/default_access.php b/actions/user/default_access.php index 0c2390842..0b7d0bfbd 100644 --- a/actions/user/default_access.php +++ b/actions/user/default_access.php @@ -6,9 +6,7 @@ * @subpackage Core */ -global $CONFIG; - -if ($CONFIG->allow_user_default_access) { +if (elgg_get_config('allow_user_default_access')) { $default_access = get_input('default_access'); $user_id = get_input('guid'); diff --git a/actions/useradd.php b/actions/useradd.php index dd6edfe31..0219361fb 100644 --- a/actions/useradd.php +++ b/actions/useradd.php @@ -7,7 +7,6 @@ */ // Get variables -global $CONFIG; $username = get_input('username'); $password = get_input('password'); $password2 = get_input('password2'); @@ -33,12 +32,17 @@ try { $new_user->created_by_guid = get_loggedin_userid(); $subject = elgg_echo('useradd:subject'); - $body = elgg_echo('useradd:body', array($name, - $CONFIG->site->name, $CONFIG->site->url, $username, $password)); + $body = elgg_echo('useradd:body', array( + $name, + elgg_get_site_entity()->name, + elgg_get_site_entity()->url, + $username, + $password, + )); - notify_user($new_user->guid, $CONFIG->site->guid, $subject, $body); + notify_user($new_user->guid, elgg_get_site_entity()->guid, $subject, $body); - system_message(elgg_echo("adduser:ok", array($CONFIG->sitename))); + system_message(elgg_echo("adduser:ok", array(elgg_get_site_entity()->name))); } else { register_error(elgg_echo("adduser:bad")); } diff --git a/pages/account/register.php b/pages/account/register.php index b368cfdd4..680a9f240 100644 --- a/pages/account/register.php +++ b/pages/account/register.php @@ -32,7 +32,7 @@ $content = elgg_view_title($title); // create the registration url - including switching to https if configured $register_url = elgg_get_site_url() . 'action/register'; -if ((isset($CONFIG->https_login)) && ($CONFIG->https_login)) { +if (elgg_get_config('https_login')) { $register_url = str_replace("http:", "https:", $register_url); } $form_params = array('action' => $register_url); diff --git a/pages/avatar/view.php b/pages/avatar/view.php index ed8a47d59..8b420c61a 100644 --- a/pages/avatar/view.php +++ b/pages/avatar/view.php @@ -31,7 +31,6 @@ if ($filehandler->open("read")) { } if (!$success) { - global $CONFIG; $path = elgg_view('icon/user/default/'.$size); header("Location: {$path}"); exit; diff --git a/views/default/admin/overview/statistics.php b/views/default/admin/overview/statistics.php index 1785864e7..05b96d166 100644 --- a/views/default/admin/overview/statistics.php +++ b/views/default/admin/overview/statistics.php @@ -10,8 +10,6 @@ $users_stats = get_number_users(); $total_users = get_number_users(true); -global $CONFIG; - // Get version information $version = get_version(); $release = get_version(true); diff --git a/views/default/profile/hover.php b/views/default/profile/hover.php index e31a99359..756a5838c 100644 --- a/views/default/profile/hover.php +++ b/views/default/profile/hover.php @@ -1,5 +1,7 @@ <?php - +/** + * User hover wrapper + */ ?> @@ -11,6 +13,3 @@ echo elgg_view_menu('user_hover', $vars); -// @todo change how to add on demand registration of menu items -global $CONFIG; -unset($CONFIG->menus['user_hover']); diff --git a/views/installation/input/button.php b/views/installation/input/button.php index 76cf5afa1..6704fa8c5 100644 --- a/views/installation/input/button.php +++ b/views/installation/input/button.php @@ -15,8 +15,6 @@ * */ -global $CONFIG; - $class = $vars['class']; if (!$class) { $class = "elgg-submit-button"; @@ -44,7 +42,7 @@ $value = htmlentities($vars['value'], ENT_QUOTES, 'UTF-8'); $name = $vars['internalname']; $src = $vars['src']; // blank src if trying to access an offsite image. -if (strpos($src,elgg_get_site_url())===false) { +if (strpos($src, elgg_get_site_url()) === false) { $src = ""; } ?> |