[svn r15932] Fixed productions listing in whoisonline + improved code

skala
Yannick Warnier 17 years ago
parent 02947b983e
commit 2bf2934f8c
  1. 7
      main/auth/profile.php
  2. 4
      main/inc/lib/usermanager.lib.php
  3. 17
      whoisonline.php

@ -1,4 +1,4 @@
<?php // $Id: profile.php 15822 2008-07-18 12:35:27Z pcool $
<?php // $Id: profile.php 15932 2008-08-06 19:59:11Z yannoo $
/*
==============================================================================
Dokeos - elearning and course management software
@ -436,9 +436,8 @@ function upload_user_image($user_id)
$image_path = UserManager::get_user_picture_path_by_id($user_id,'system',true);
$image_repository = $image_path['dir'];
$existing_image = $image_path['file'];
$file_extension = explode('.', $_FILES['picture']['name']);
$file_extension = strtolower($file_extension[sizeof($file_extension) - 1]);
$file_extension = explode('.', $_FILES['picture']['name']);
$file_extension = strtolower($file_extension[count($file_extension) - 1]);
if (!file_exists($image_repository))
{

@ -1,4 +1,4 @@
<?php // $Id: usermanager.lib.php 15899 2008-08-04 13:03:05Z elixir_julian $
<?php // $Id: usermanager.lib.php 15932 2008-08-06 19:59:11Z yannoo $
/*
==============================================================================
Dokeos - elearning and course management software
@ -663,7 +663,7 @@ class UserManager
while ($file = readdir($handle))
{
if ($file == '.' || $file == '..' || $file == '.htaccess')
if ($file == '.' || $file == '..' || $file == '.htaccess' || is_dir($production_repository.$file))
continue; // skip current/parent directory and .htaccess
$productions[] = $file;

@ -1,4 +1,4 @@
<?php // $Id: whoisonline.php 14958 2008-04-20 18:17:02Z yannoo $
<?php // $Id: whoisonline.php 15932 2008-08-06 19:59:11Z yannoo $
/*
==============================================================================
Dokeos - elearning and course management software
@ -78,14 +78,9 @@ function display_user_list($user_list, $_plugins)
$user_info = api_get_user_info($uid);
$table_row = array();
$url = '?id='.$uid.$course_url;
if(strlen($user_info['picture_uri']) > 0)
{
$table_row[] = '<span style="display:none;">1</span><a href="'.$url.'"><img src="'.api_get_path(WEB_CODE_PATH).'upload/users/'.$user_info['picture_uri'].'" alt="'.htmlentities($user_info['firstName'],ENT_QUOTES,$charset).'" width="40" border="0"/></a>';
}
else
{
$table_row[] = '<span style="display:none;">0</span>';
}
$image_array=UserManager::get_user_picture_path_by_id($uid,'web',false,true);
$table_row[] = '<a href="'.$url.'"><img src="'.$image_array['dir'].$image_array['file'].'" border="1" height="100"></a>';
$table_row[] = '<a href="'.$url.'">'.$user_info['firstName'].'</a>';
$table_row[] = '<a href="'.$url.'">'.$user_info['lastName'].'</a>';
if (api_get_setting("show_email_addresses") == "true")
@ -193,9 +188,9 @@ function display_productions($user_id)
{
global $clarolineRepositoryWeb, $disabled_output;
$sysdir_array = UserManager::get_user_picture_path_by_id($user_id,'system');
$sysdir = $sysdir_array['dir'];
$sysdir = $sysdir_array['dir'].$user_id.'/';
$webdir_array = UserManager::get_user_picture_path_by_id($user_id,'web');
$webdir = $webdir_array['dir'];
$webdir = $webdir_array['dir'].$user_id.'/';
if( !is_dir($sysdir))
{
mkpath($sysdir);

Loading…
Cancel
Save