diff --git a/main/messages/new_message.php b/main/messages/new_message.php
index 7438f50d0e..182f308f30 100755
--- a/main/messages/new_message.php
+++ b/main/messages/new_message.php
@@ -198,7 +198,7 @@ if (isset($_GET['rs'])) {
'name' => get_lang('SocialNetwork')
);
} else {
- $interbreadcrumb[] = array ('url' => '#', 'name' => get_lang('Messages'));
+ $interbreadcrumb[] = array ('url' => 'javascript: void(0);', 'name' => get_lang('Messages'));
$interbreadcrumb[]= array (
'url' => 'outbox.php',
'name' => get_lang('Outbox')
@@ -209,7 +209,7 @@ if (isset($_GET['rs'])) {
);
}
$interbreadcrumb[]= array (
- 'url' => '#',
+ 'url' => 'javascript: void(0);',
'name' => get_lang('ComposeMessage')
);
diff --git a/main/messages/send_message.php b/main/messages/send_message.php
index e892909b19..be4784cda1 100755
--- a/main/messages/send_message.php
+++ b/main/messages/send_message.php
@@ -51,7 +51,7 @@ if ($panel_id==2) {
}
if ($panel_id==1) {
?>
-
: |
+ : |
:
|
:
|
|
diff --git a/main/messages/send_message_to_userfriend.inc.php b/main/messages/send_message_to_userfriend.inc.php
index e9d7d31ff7..e65c29bfb7 100755
--- a/main/messages/send_message_to_userfriend.inc.php
+++ b/main/messages/send_message_to_userfriend.inc.php
@@ -34,7 +34,7 @@ if ( isset($_REQUEST['user_friend']) ) {
'.api_xml_http_response_encode($info_user_friend['firstName'].' '.$info_user_friend['lastName']).'';
+ echo '
'.api_xml_http_response_encode(api_get_person_name($info_user_friend['firstName'], $info_user_friend['lastName'])).'';
}
?>
@@ -46,7 +46,7 @@ if ( isset($_REQUEST['user_friend']) ) {
if ($panel == 1) {
//normal message
$user_info=api_get_user_info($userfriend_id);
- echo api_xml_http_response_encode(get_lang('To')); ?> :
+ echo api_xml_http_response_encode(get_lang('To')); ?> :
:
:
diff --git a/main/metadata/md_document.php b/main/metadata/md_document.php
index d856fea4d4..eed581410b 100644
--- a/main/metadata/md_document.php
+++ b/main/metadata/md_document.php
@@ -90,7 +90,7 @@ function mdo_generate_default_xml_metadata()
if (isset($_user))
{
$xhtDoc->xht_param['author'] = "BEGIN:VCARD\\nFN:" .
- $_user['firstName']." ".$_user['lastName'] .
+ api_get_person_name($_user['firstName'], $_user['lastName'], null, PERSON_NAME_EMAIL_ADDRESS) .
"\\nEMAIL:".$_user['mail'] . "\\nEND:VCARD\\n";
}
diff --git a/main/metadata/md_link.php b/main/metadata/md_link.php
index b6f31821f3..6ea176450c 100644
--- a/main/metadata/md_link.php
+++ b/main/metadata/md_link.php
@@ -90,7 +90,7 @@ function mdo_generate_default_xml_metadata()
if (isset($_user))
{
$xhtDoc->xht_param['author'] = "BEGIN:VCARD\\nFN:" .
- $_user['firstName']." ".$_user['lastName'] .
+ api_get_person_name($_user['firstName'], $_user['lastName'], null, PERSON_NAME_EMAIL_ADDRESS) .
"\\nEMAIL:".$_user['mail'] . "\\nEND:VCARD\\n";
}
diff --git a/main/mySpace/access_details.php b/main/mySpace/access_details.php
index 84cd7f9c5f..8fcbd20ddb 100644
--- a/main/mySpace/access_details.php
+++ b/main/mySpace/access_details.php
@@ -112,7 +112,7 @@ if (api_is_xml_http_request()) {
$DataSet->AddAllSeries();
$DataSet->RemoveSerie('Date');
$DataSet->SetAbsciseLabelSerie('Date');
- $DataSet->SetYAxisName(api_ucfirst(get_lang('MinMinutes')));
+ $DataSet->SetYAxisName(get_lang('Minutes'));
$graph_id = api_get_user_id().'AccessDetails'.api_get_course_id();
$DataSet->AddAllSeries();
@@ -216,7 +216,7 @@ foreach ($connections as $key=>$data) {
}
api_display_tool_title(get_lang('DetailsStudentInCourse'));
echo '';
-echo ''.get_lang('User').': '.$mainUserInfo['firstName'].' '.$mainUserInfo['lastName'].' '.get_lang('Course').': '.$course_code.'
';
+echo ''.get_lang('User').': '.api_get_person_name($mainUserInfo['firstName'], $mainUserInfo['lastName']).' '.get_lang('Course').': '.$course_code.'';
?>
diff --git a/main/mySpace/admin.php b/main/mySpace/admin.php
index 201a934fab..f192a1e72c 100644
--- a/main/mySpace/admin.php
+++ b/main/mySpace/admin.php
@@ -34,12 +34,12 @@ $tbl_admin = Database :: get_main_table(TABLE_MAIN_ADMIN);
===============================================================================
*/
- function exportCsv($a_header,$a_data)
- {
+function exportCsv($a_header,$a_data)
+{
global $archiveDirName;
$fileName = 'administrators.csv';
- $archivePath = api_get_path(SYS_PATH).$archiveDirName.'/';
+ $archivePath = api_get_path(SYS_ARCHIVE_PATH);
$archiveURL = api_get_path(WEB_CODE_PATH).'course_info/download.php?archive=';
if(!$open = fopen($archivePath.$fileName,'w+'))
@@ -56,7 +56,6 @@ $tbl_admin = Database :: get_main_table(TABLE_MAIN_ADMIN);
}
$info .= "\r\n";
-
foreach($a_data as $data)
{
foreach($data as $infos)
@@ -76,7 +75,7 @@ $tbl_admin = Database :: get_main_table(TABLE_MAIN_ADMIN);
}
return $message;
- }
+}
/**
@@ -89,15 +88,33 @@ les stagiaires dont il est le
responsable.
*/
+if (isset($_POST['export'])) {
+ $order_clause = ' ORDER BY lastname ASC';
+} else {
+ $order_clause = api_sort_by_first_name() ? ' ORDER BY firstname, lastname' : ' ORDER BY lastname, firstname';
+}
$sqlAdmins = " SELECT user.user_id,lastname,firstname,email
FROM $tbl_user as user, $tbl_admin as admin
- WHERE admin.user_id=user.user_id
- ORDER BY lastname ASC
- ";
-
-$resultAdmins = api_sql_query($sqlAdmins);
-
-echo '
+ WHERE admin.user_id=user.user_id".$order_clause;
+
+$resultAdmins = api_sql_query($sqlAdmins, __FILE__, __LINE__);
+
+if (api_is_western_name_order()) {
+ echo '
+
+
+ '.get_lang('FirstName').'
+ |
+
+ '.get_lang('LastName').'
+ |
+
+ '.get_lang('Email').'
+ |
+
+ ';
+} else {
+ echo '
'.get_lang('LastName').'
@@ -110,6 +127,7 @@ echo '
';
+}
$a_header[]=get_lang('LastName');
$a_header[]=get_lang('FirstName');
@@ -124,58 +142,45 @@ if(mysql_num_rows($resultAdmins)>0){
$s_firstname=$a_admins["firstname"];
$s_email=$a_admins["email"];
- if($i%2==0){
+ if ($i%2==0) {
$s_css_class="row_odd";
-
- if($i%20==0 && $i!=0){
- echo '
-
- '.get_lang('LastName').'
- |
-
- '.get_lang('FirstName').'
- |
-
- '.get_lang('Email').'
- |
- ';
+ if ($i%20==0 && $i!=0) {
+ if (api_is_western_name_order()) {
+ echo ''.get_lang('FirstName').' | '.get_lang('LastName').' | '.get_lang('Email').' | ';
+ } else {
+ echo ''.get_lang('LastName').' | '.get_lang('FirstName').' | '.get_lang('Email').' | ';
+ }
}
-
- }
- else{
+ } else {
$s_css_class="row_even";
}
$i++;
- echo "$s_lastname | $s_firstname | $s_email | ";
+ if (api_is_western_name_order()) {
+ echo "$s_firstname | $s_lastname | $s_email | ";
+ } else {
+ echo "$s_lastname | $s_firstname | $s_email | ";
+ }
$a_data[$i_user_id]["lastname"]=$s_lastname;
$a_data[$i_user_id]["firstname"]=$s_firstname;
$a_data[$i_user_id]["email"]=$s_email;
-
}
-
}
//No results
-else{
-
+else {
echo ''.get_lang("NoResults").' | ';
-
}
-
echo ' ';
-
if(isset($_POST['export'])){
-
exportCsv($a_header,$a_data);
-
}
echo "
";
-echo " |