summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Kremmel <xing@synapse.plus.com>2007-06-23 17:29:58 +0000
committerMax Kremmel <xing@synapse.plus.com>2007-06-23 17:29:58 +0000
commit9c26d7a4cb1b8536ef6d8e369995e17eb8718820 (patch)
tree608ea90e02db5545523088495dc3f5c714dae3e4
parent159147822effc4e455028c94938854e459473569 (diff)
downloadusers-9c26d7a4cb1b8536ef6d8e369995e17eb8718820.tar.gz
users-9c26d7a4cb1b8536ef6d8e369995e17eb8718820.tar.bz2
users-9c26d7a4cb1b8536ef6d8e369995e17eb8718820.zip
automagically select best image type that's best for the particular upladed file, allow override of file types and use liberty thumbnail fetcher where possible
-rw-r--r--BitUser.php9
1 files changed, 4 insertions, 5 deletions
diff --git a/BitUser.php b/BitUser.php
index 8aa534f..d129edb 100644
--- a/BitUser.php
+++ b/BitUser.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.144 2007/06/15 22:00:37 lsces Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.145 2007/06/23 17:29:58 squareing Exp $
*
* Lib for user administration, groups and permissions
* This lib uses pear so the constructor requieres
@@ -12,7 +12,7 @@
* All Rights Reserved. See copyright.txt for details and a complete list of authors.
* Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details
*
- * $Id: BitUser.php,v 1.144 2007/06/15 22:00:37 lsces Exp $
+ * $Id: BitUser.php,v 1.145 2007/06/23 17:29:58 squareing Exp $
* @package users
*/
@@ -40,7 +40,7 @@ define("ACCOUNT_DISABLED", -6);
* Class that holds all information for a given user
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.144 $
+ * @version $Revision: 1.145 $
* @package users
* @subpackage BitUser
*/
@@ -1609,11 +1609,10 @@ class BitUser extends LibertyAttachable {
$ret = array();
global $gBitSystem;
- if( $gBitSystem->isFeatureActive( 'liberty_png_thumbnails' )) { $ext = '.png'; } else { $ext = '.jpg'; }
while( $res = $result->fetchRow() ) {
if( !empty($res['avatar_storage_path'] ) ) {
$res['avatar_url'] = BIT_ROOT_URL.$res['avatar_storage_path'];
- $res['thumbnail_url'] = dirname( $res['avatar_url'] ).'/small'.$ext;
+ $res['thumbnail_url'] = liberty_fetch_thumbnail_url( $res['avatar_url'], 'small' );
}
$res["groups"] = $this->getGroups( $res['user_id'] );
array_push( $ret, $res );