summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Palmer <nick@sluggardy.net>2008-01-31 19:38:56 +0000
committerNick Palmer <nick@sluggardy.net>2008-01-31 19:38:56 +0000
commit7c811d95f8a8986a636ae0cd88fec4d3c6c3ba01 (patch)
tree1148e661856141d415c6846d482d79ea60f0389b
parent4bc8fd7464fa43ca57727bbb3a61dd71aad5279a (diff)
downloadusers-7c811d95f8a8986a636ae0cd88fec4d3c6c3ba01.tar.gz
users-7c811d95f8a8986a636ae0cd88fec4d3c6c3ba01.tar.bz2
users-7c811d95f8a8986a636ae0cd88fec4d3c6c3ba01.zip
Fix primary labels in users attachment browser and make attachments to personal pages work again.
-rw-r--r--BitUser.php12
-rw-r--r--templates/edit_personal_page.tpl6
2 files changed, 10 insertions, 8 deletions
diff --git a/BitUser.php b/BitUser.php
index 5f810da..bc8a700 100644
--- a/BitUser.php
+++ b/BitUser.php
@@ -1,6 +1,6 @@
<?php
/**
- * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.165 2007/11/28 19:14:42 joasch Exp $
+ * $Header: /cvsroot/bitweaver/_bit_users/BitUser.php,v 1.166 2008/01/31 19:38:56 nickpalmer 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.165 2007/11/28 19:14:42 joasch Exp $
+ * $Id: BitUser.php,v 1.166 2008/01/31 19:38:56 nickpalmer 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.165 $
+ * @version $Revision: 1.166 $
* @package users
* @subpackage BitUser
*/
@@ -132,6 +132,8 @@ class BitUser extends LibertyAttachable {
unset( $this->mInfo['user_password'] );
unset( $this->mInfo['hash'] );
$this->loadPreferences();
+ // Load attachments
+ LibertyAttachable::load();
if( $this->getPreference( 'users_country' ) ) {
$this->setPreference( 'flag', $this->getPreference( 'users_country' ) );
$this->setPreference( 'users_country', str_replace( '_', ' ', $this->getPreference( 'users_country' ) ) );
@@ -636,7 +638,7 @@ class BitUser extends LibertyAttachable {
}
// Prevent liberty from assuming ANONYMOUS_USER_ID while storing
$pParamHash['user_id'] = $this->mUserId;
- if( LibertyContent::store( $pParamHash ) ) {
+ if( LibertyAttachable::store( $pParamHash ) ) {
if( empty( $this->mInfo['content_id'] ) || ($pParamHash['content_id'] != $this->mInfo['content_id']) ) {
$query = "UPDATE `".BIT_DB_PREFIX."users_users` SET `content_id`=? WHERE `user_id`=?";
$result = $this->mDb->query( $query, array( $pParamHash['content_id'], $this->mUserId ) );
@@ -695,7 +697,7 @@ class BitUser extends LibertyAttachable {
}
// Prevent liberty from assuming ANONYMOUS_USER_ID while storing
$pParamHash['user_id'] = $this->mUserId;
- if( LibertyContent::store( $pParamHash ) ) {
+ if( LibertyAttachable::store( $pParamHash ) ) {
if( empty( $this->mInfo['content_id'] ) || ($pParamHash['content_id'] != $this->mInfo['content_id']) ) {
$query = "UPDATE `".BIT_DB_PREFIX."users_users` SET `content_id`=? WHERE `user_id`=?";
$result = $this->mDb->query( $query, array( $pParamHash['content_id'], $this->mUserId ) );
diff --git a/templates/edit_personal_page.tpl b/templates/edit_personal_page.tpl
index 24b0732..239a9c7 100644
--- a/templates/edit_personal_page.tpl
+++ b/templates/edit_personal_page.tpl
@@ -1,4 +1,4 @@
-{* $Header: /cvsroot/bitweaver/_bit_users/templates/edit_personal_page.tpl,v 1.3 2007/07/14 14:52:16 squareing Exp $ *}
+{* $Header: /cvsroot/bitweaver/_bit_users/templates/edit_personal_page.tpl,v 1.4 2008/01/31 19:38:56 nickpalmer Exp $ *}
{strip}
<div class="floaticon">{bithelp}</div>
@@ -136,7 +136,7 @@
</div>
{if $gBitSystem->isFeatureActive( 'wiki_attachments' )}
- {include file="bitpackage:liberty/edit_storage_list.tpl"}
+ {include file="bitpackage:liberty/edit_storage_list.tpl" primary_label=Avatar}
{/if}
{/legend}
{/jstab}
@@ -146,7 +146,7 @@
{if $gBitSystem->isFeatureActive( 'wiki_attachments' ) && $show_attachments eq 'y' && $gBitUser->hasPermission('p_liberty_attach_attachments')}
{jstab title="Attachments"}
{legend legend="Attachments"}
- {include file="bitpackage:liberty/edit_storage.tpl"}
+ {include file="bitpackage:liberty/edit_storage.tpl" primary_label=Avatar}
{/legend}
{/jstab}
{/if}