]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Refs #2428 removed more CONFIG uses
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 30 Dec 2010 04:32:04 +0000 (04:32 +0000)
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>
Thu, 30 Dec 2010 04:32:04 +0000 (04:32 +0000)
git-svn-id: http://code.elgg.org/elgg/trunk@7769 36083f99-b078-4883-b0ff-0f9b5a30f544

actions/admin/user/resetpassword.php
actions/register.php
actions/user/default_access.php
actions/useradd.php
pages/account/register.php
pages/avatar/view.php
views/default/admin/overview/statistics.php
views/default/profile/hover.php
views/installation/input/button.php

index e3f737974a23dceeddf8173188981a8b169fe124..d019a7f553f935ef34c837d895413b555a51e53b 100644 (file)
@@ -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,
index 1a0954e3b5164b0381ddb353e5e61205e287dec4..33ee19aee89737c454cd7843f9d2f0485ac5d6e5 100644 (file)
@@ -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
index 0c2390842f5fc0bec04c627013a98d12bdb6dff4..0b7d0bfbd50489015b526278ede5a8e5ed8c934b 100644 (file)
@@ -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');
 
index dd6edfe3194ca4a951ab362f12047221845fb3a6..0219361fbfffd5bf5cc4f8217b2eca9f621362cd 100644 (file)
@@ -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"));
        }
index b368cfdd4d1831fb7f4d2c6e59743d06eda18328..680a9f2402d95db5860a5736b7f0e3aff4429dee 100644 (file)
@@ -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);
index ed8a47d597b4e281f4dffc6707c3a2779895de5b..8b420c61a865a7ff1878fda9ef7edf302c35b8fc 100644 (file)
@@ -31,7 +31,6 @@ if ($filehandler->open("read")) {
 }
 
 if (!$success) {
-       global $CONFIG;
        $path = elgg_view('icon/user/default/'.$size);
        header("Location: {$path}");
        exit;
index 1785864e78e796a5293b6b338a229840a4ca223b..05b96d1663783e795555e5219c5e3c7b251b5b17 100644 (file)
@@ -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);
index e31a993596fca49bc54e4e2fa317de621bbf4220..756a5838c3cb9dea083d5756fbe013902f4f6b8a 100644 (file)
@@ -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']);
index 76cf5afa1ecf32d82f2a794ec15d5d02a10934b8..6704fa8c574c9d0dae6a8d964545ee0b74e6cb81 100644 (file)
@@ -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 = "";
 }
 ?>