Browse Source

Undefined index in listing attachments (due to switch to createList)

Signed-off-by: emanuele <[email protected]>
emanuele 12 years ago
parent
commit
9a561ecc66
2 changed files with 6 additions and 5 deletions
  1. 1 1
      Sources/Karma.php
  2. 5 4
      Themes/default/Profile.template.php

+ 1 - 1
Sources/Karma.php

@@ -159,7 +159,7 @@ function BookOfUnknown()
 	if (strpos($_GET['action'], 'mozilla') !== false && !isBrowser('gecko'))
 		redirectexit('http://www.getfirefox.com/');
 	elseif (strpos($_GET['action'], 'mozilla') !== false)
-		redirectexit('about:mozilla');
+		redirectexit('about:mozilla', true);
 
 	echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml"', $context['right_to_left'] ? ' dir="rtl"' : '', '>

+ 5 - 4
Themes/default/Profile.template.php

@@ -340,10 +340,10 @@ function template_showPosts()
 			<h3 class="catbg">
 				', (!isset($context['attachments']) && empty($context['is_topics']) ? $txt['showMessages'] : (!empty($context['is_topics']) ? $txt['showTopics'] : $txt['showAttachments'])), ' - ', $context['member']['name'], '
 			</h3>
-		</div>
+		</div>', !empty($context['page_index']) ? '
 		<div class="pagesection">
-			<div class="pagelinks">', $context['page_index'], '</div>
-		</div>';
+			<div class="pagelinks">' . $context['page_index'] . '</div>
+		</div>' : '';
 
 	// Button shortcuts
 	$quote_button = create_button('quote.png', 'reply_quote', 'quote', 'class="centericon"');
@@ -429,7 +429,8 @@ function template_showPosts()
 		</table>';
 
 	// Show more page numbers.
-	echo '
+	if (!empty($context['page_index']))
+		echo '
 		<div class="pagesection" style="margin-bottom: 0;">
 			<div class="pagelinks">', $context['page_index'], '</div>
 		</div>';