summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--attachments.php8
-rw-r--r--templates/attachments.tpl2
2 files changed, 7 insertions, 3 deletions
diff --git a/attachments.php b/attachments.php
index f3ba489..186bda3 100644
--- a/attachments.php
+++ b/attachments.php
@@ -3,7 +3,7 @@
* attachment_browser
*
* @author spider <spider@steelsun.com>
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
* @package liberty
* @subpackage functions
*/
@@ -22,12 +22,16 @@ if( !$gBitUser->isRegistered() ) {
$feedback = array();
$listHash = &$_REQUEST;
if( $gBitUser->isAdmin() ) {
- if( !empty( $listHash['login'] ) ) {
+ if( !empty( $listHash['login'] ) && $listHash['login'] == 'all' ) {
+ $listHash['user_id'] = NULL;
+ } elseif( !empty( $listHash['login'] ) ) {
if( $userInfo = $gBitUser->getUserInfo( array( 'login' => $listHash['login'] ) ) ) {
$listHash['user_id'] = $userInfo['user_id'];
} else {
$feedback['error'] = tra( 'That user does not exist.' );
}
+ } else {
+ $listHash['user_id'] = $gBitUser->mUserId;
}
} else {
$listHash['user_id'] = $gBitUser->mUserId;
diff --git a/templates/attachments.tpl b/templates/attachments.tpl
index 2484865..7bbe745 100644
--- a/templates/attachments.tpl
+++ b/templates/attachments.tpl
@@ -13,7 +13,7 @@
{formlabel label="User" for=""}
{forminput}
<input type="text" name="login" value="{$smarty.request.login}" />
- {formhelp note="Enter the login name of a given user."}
+ {formhelp note="Enter the login name of a given user. Enter 'all' to view all attachments."}
{/forminput}
</div>