update to D 7.17

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy
2012-12-08 11:35:42 +01:00
parent 975d758599
commit 5396b3e2b5
284 changed files with 3674 additions and 1854 deletions

View File

@@ -187,7 +187,7 @@ function user_entity_info() {
}
/**
* Entity uri callback.
* Entity URI callback.
*/
function user_uri($user) {
return array(
@@ -1307,7 +1307,6 @@ function user_login_block($form) {
);
$form['pass'] = array('#type' => 'password',
'#title' => t('Password'),
'#maxlength' => 60,
'#size' => 15,
'#required' => TRUE,
);
@@ -1873,7 +1872,7 @@ function user_menu_link_alter(&$link) {
*/
function user_translated_menu_link_alter(&$link) {
// Hide the "User account" link for anonymous users.
if ($link['link_path'] == 'user' && $link['module'] == 'system' && user_is_anonymous()) {
if ($link['link_path'] == 'user' && $link['module'] == 'system' && !$GLOBALS['user']->uid) {
$link['hidden'] = 1;
}
}
@@ -2574,6 +2573,14 @@ function user_build_content($account, $view_mode = 'full', $langcode = NULL) {
// Remove previously built content, if exists.
$account->content = array();
// Allow modules to change the view mode.
$context = array(
'entity_type' => 'user',
'entity' => $account,
'langcode' => $langcode,
);
drupal_alter('entity_view_mode', $view_mode, $context);
// Build fields content.
field_attach_prepare_view('user', array($account->uid => $account), $view_mode, $langcode);
entity_prepare_view('user', array($account->uid => $account), $langcode);
@@ -2582,6 +2589,10 @@ function user_build_content($account, $view_mode = 'full', $langcode = NULL) {
// Populate $account->content with a render() array.
module_invoke_all('user_view', $account, $view_mode, $langcode);
module_invoke_all('entity_view', $account, 'user', $view_mode, $langcode);
// Make sure the current view mode is stored if no module has already
// populated the related key.
$account->content += array('#view_mode' => $view_mode);
}
/**