[svn r18893] logic changes - allow view shared profile - (partial FS#3751)

skala
Julio Montoya 17 years ago
parent 592ff4f03c
commit 4c4a40c617
  1. 12
      main/auth/profile.php

@ -1,4 +1,4 @@
<?php // $Id: profile.php 18884 2009-03-09 18:15:49Z iflorespaz $ <?php // $Id: profile.php 18893 2009-03-09 20:41:05Z juliomontoya $
/* For licensing terms, see /dokeos_license.txt */ /* For licensing terms, see /dokeos_license.txt */
/** /**
============================================================================== ==============================================================================
@ -14,7 +14,7 @@
* Init section * Init section
*/ */
// name of the language file that needs to be included // name of the language file that needs to be included
$language_file = array('registration','messages'); $language_file = array('registration','messages','userInfo');
$cidReset = true; $cidReset = true;
require ('../inc/global.inc.php'); require ('../inc/global.inc.php');
if (!isset($_GET['show'])) { if (!isset($_GET['show'])) {
@ -247,9 +247,7 @@ if (api_get_setting('profile', 'language') !== 'true')
if (api_get_setting('extended_profile') == 'true') { if (api_get_setting('extended_profile') == 'true') {
if ($_GET['type']=='extended') { if ($_GET['type']=='extended') {
//$form->addElement('html', '<a href="#" onclick="javascript:show_extend();"> show_extend_profile</a>'); //$form->addElement('html', '<a href="#" onclick="javascript:show_extend();"> show_extend_profile</a>');
$form->addElement('static', null, '<em>'.get_lang('OptionalTextFields').'</em>'); $form->addElement('static', null, '<em>'.get_lang('OptionalTextFields').'</em>');
// MY COMPETENCES // MY COMPETENCES
$form->add_html_editor('competences', get_lang('MyCompetences'), false); $form->add_html_editor('competences', get_lang('MyCompetences'), false);
// MY DIPLOMAS // MY DIPLOMAS
@ -696,7 +694,8 @@ if (!empty($_SESSION['production_uploaded']))
} }
if (isset($_GET['show'])) { if (isset($_GET['show'])) {
if ((api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') ||(api_get_setting('allow_social_tool')=='true') && api_get_user_id()<>2 && api_get_user_id()<>0) {
if ((api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') ||(api_get_setting('allow_social_tool')=='true')) {
$interbreadcrumb[]= array ( $interbreadcrumb[]= array (
'url' => '../social/'.$_SESSION['social_dest'].'?#remote-tab-1', 'url' => '../social/'.$_SESSION['social_dest'].'?#remote-tab-1',
'name' => get_lang('SocialNetwork') 'name' => get_lang('SocialNetwork')
@ -728,6 +727,9 @@ if (api_get_setting('extended_profile') == 'true') {
} else { } else {
echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.gif').'&nbsp;'.get_lang('EditExtendProfile').'</a>'; echo '<a href="profile.php?type=extended'.$show.'">'.Display::return_icon('edit.gif').'&nbsp;'.get_lang('EditExtendProfile').'</a>';
} }
if (api_get_setting('allow_social_tool')=='true' && api_get_setting('allow_message_tool')=='true') {
echo '<a href="../social/profile.php">'.Display::return_icon('edit.gif').'&nbsp;'.mb_convert_encoding(get_lang('ViewSharedProfile'),'UTF-8',$charset).'</a>';
}
echo '</div>'; echo '</div>';
} }

Loading…
Cancel
Save