Issue #1757836 by tim.plunkett | aspilicious: Fixed Core updated some variables/config thingies again.

8.0.x
tim.plunkett 2012-08-27 11:39:34 +02:00 committed by Tim Plunkett
parent 26277d209d
commit fdd81de3de
4 changed files with 4 additions and 4 deletions

View File

@ -45,7 +45,7 @@ class HandlerFieldUserNameTest extends ViewsSqlTest {
$this->assertIdentical($render, $username, 'If the user is not linked the username should be printed out for a normal user.'); $this->assertIdentical($render, $username, 'If the user is not linked the username should be printed out for a normal user.');
$view->result[0]->uid = 0; $view->result[0]->uid = 0;
$anon_name = variable_get('anonymous', t('Anonymous')); $anon_name = config('user.settings')->get('anonymous');
$view->result[0]->users_name = ''; $view->result[0]->users_name = '';
$render = $view->field['name']->advanced_render($view->result[0]); $render = $view->field['name']->advanced_render($view->result[0]);
$this->assertIdentical($render, $anon_name , 'For user0 it should use the default anonymous name by default.'); $this->assertIdentical($render, $anon_name , 'For user0 it should use the default anonymous name by default.');

View File

@ -25,7 +25,7 @@ class UserUid extends ArgumentPluginBase {
function title() { function title() {
if (!$this->argument) { if (!$this->argument) {
$title = variable_get('anonymous', t('Anonymous')); $title = config('user.settings')->get('anonymous');
} }
else { else {
$title = db_query('SELECT u.name FROM {users} u WHERE u.uid = :uid', array(':uid' => $this->argument))->fetchField(); $title = db_query('SELECT u.name FROM {users} u WHERE u.uid = :uid', array(':uid' => $this->argument))->fetchField();

View File

@ -30,7 +30,7 @@ class Uid extends Numeric {
*/ */
function title_query() { function title_query() {
if (!$this->argument) { if (!$this->argument) {
return array(variable_get('anonymous', t('Anonymous'))); return array(config('user.settings')->get('anonymous'));
} }
$titles = array(); $titles = array();

View File

@ -90,7 +90,7 @@ class User extends ArgumentValidatorPluginBase {
} }
else { else {
if ($type == 'name' || $type == 'either') { if ($type == 'name' || $type == 'either') {
$name = !empty($GLOBALS['user']->name) ? $GLOBALS['user']->name : variable_get('anonymous', t('Anonymous')); $name = !empty($GLOBALS['user']->name) ? $GLOBALS['user']->name : config('user.settings')->get('anonymous');
if ($argument == $name) { if ($argument == $name) {
$account = clone $GLOBALS['user']; $account = clone $GLOBALS['user'];
} }