old database link

Signed-off-by: bachy <git@g-u-i.net>
This commit is contained in:
bachy 2013-02-08 16:12:04 +01:00
parent b8b7044eb3
commit 1e40a74e1a

View File

@ -30,6 +30,10 @@ function materio_user_block_info() {
'info' => t('Register block'),
'cache' => DRUPAL_NO_CACHE
);
$blocks['old_database_link'] = array(
'info' => t('Old data base link'),
'cache' => DRUPAL_NO_CACHE
);
return $blocks;
}
@ -46,6 +50,20 @@ function materio_user_block_view($delta = '') {
$block['subject'] = t('Your projects will born from here');
$block['content'] = drupal_render(drupal_get_form('user_register_form'));
}
break;
case 'old_database_link':
if( (isset($user->roles[6]) || isset($user->roles[8])) && $user->created < strtotime('01-12-2012') ){
// dsm($user, 'user');
$block['subject'] = '';
$path = 'http://base.materio.com';
if($language->language == 'fr')
$path .= '/index_fr.html';
$block['content'] = l(t('return to the old database'), $path);
}
break;
}
return $block;