Bugs 495279 and 495872
authorToby Elliott <telliott@mozilla.com>
Tue, 09 Jun 2009 11:04:06 -0700
changeset 1009 76a39d37aa0a468ada6990d8e4461b40274b2f1b
parent 1007 0de4652a64ddcc106ebb6d544a3f4e0dc70efd24
child 1010 6eaaf3f96ff69855e08323eb15a8bfb7820be621
push id638
push usertelliott@mozilla.com
push dateTue, 09 Jun 2009 18:08:12 +0000
bugs495279, 495872
Bugs 495279 and 495872
server/templates/nav.php
server/templates/persona_detail.php
server/viewpersonas.php
--- a/server/templates/nav.php
+++ b/server/templates/nav.php
@@ -1,13 +1,13 @@
             <p id="account">
 <?php 
 	if(!array_key_exists('no_my', $_GET) && $user->get_unauthed_username())
 	{
-		echo 'Welcome, ' . $user->get_unauthed_username() . ' | <a href="/signin?action=signout&return=' . $_SERVER['SCRIPT_URL'] . '">Sign Out</a>';
+		echo 'Welcome, ' . $user->get_unauthed_username() . ' | <a href="/profile' . $_SERVER['SCRIPT_URL'] . '">Edit Your Profile</a> | <a href="/signin?action=signout&return=' . $_SERVER['SCRIPT_URL'] . '">Sign Out</a>';
 	}
 	elseif(!array_key_exists('no_my', $_GET))
 	{
 		if (array_key_exists('signout_success', $_GET))
 			echo "You have been signed out | ";
 		echo '<a href="/signin?return=' . $_SERVER['SCRIPT_URL'] . '">Sign In</a>';
 	}
 ?>
--- a/server/templates/persona_detail.php
+++ b/server/templates/persona_detail.php
@@ -28,21 +28,21 @@
 <?php
 		if ($persona['popularity'])
 			print '<p class="numb-users">' . number_format($persona['popularity']) . ' active daily users</p>';
 
 		if ($user->get_unauthed_username())
 		{
 			if ($favorite_persona)
 			{
-				echo '<a href="" id="favoritebutton" onClick="return change_favorite();">Remove from favorites</a>"';
+				echo '<a href="" id="favoritebutton" onClick="return change_favorite();">Remove from favorites</a>';
 			}
 			else
 			{
-				echo '<a href="" id="favoritebutton" onClick="return change_favorite();">Add to favorites</a>"';			
+				echo '<a href="" id="favoritebutton" onClick="return change_favorite();">Add to favorites</a>';			
 			}
 		}
 ?>
 	<p><script type="text/javascript" src="http://w.sharethis.com/button/sharethis.js#publisher=df86b16e-195c-4917-ae28-61a1382ba281&amp;type=website&amp;send_services=&amp;post_services=facebook%2Cdigg%2Cdelicious%2Cybuzz%2Ctwitter%2Cstumbleupon%2Creddit%2Ctechnorati%2Cmixx%2Cblogger%2Ctypepad%2Cwordpress%2Cgoogle_bmarks%2Cwindows_live%2Cmyspace%2Cfark%2Cbus_exchange%2Cpropeller%2Cnewsvine%2Clinkedin"></script></p>
 <?php
 	} else {
 ?>            
                 <p class="description">We are unable to find this persona. Please return to the gallery and try again.</p>
--- a/server/viewpersonas.php
+++ b/server/viewpersonas.php
@@ -68,46 +68,49 @@
 			$category = 'All';
 	}
 		
 	$page_header = "View Personas";
 	$list = array(); #grab the appropriate personas for display
 	if ($category == 'Designer')
 	{
 		$display_username = $user->get_display_username($tab);
-		$page_header = "Personas by " . $display_username;
 		if ($tab) #tab is actually the author here
+		{
 			$list = $db->get_persona_by_author($tab); 
+			$title = $page_header = "Personas by " . $display_username;
+		}
 	}
 	elseif ($tab == 'Recent')
 	{
 		$list = $db->get_recent_personas($category == 'All' ? null : $category, $page_size);
 	}
 	elseif ($tab == 'Popular')
 	{
 		$list = $db->get_popular_personas($category == 'All' ? null : $category, $page_size);			
 	}
 	elseif ($tab == 'My')
 	{
 		$user->force_signin();
-		$page_header = "My Personas";
+		$title = $page_header = "My Personas";
 		if ($user->get_username())
 			$list = $db->get_persona_by_author($user->get_username(), $category == 'All' ? null : $category);			
 	}
 	elseif ($tab == 'Favorites')
 	{
 		$user->force_signin();
-		$page_header = "My Favorite Personas";
+		$title = $page_header = "My Favorite Personas";
 		if ($user->get_username())
-			$list = $db->get_user_favorites($user->get_username(), $category);			
+			$list = $db->get_user_favorites($user->get_username(), $category);		
 	}
 	elseif ($tab == 'Search')
 	{
 		if (array_key_exists('p', $_GET) && $_GET['p'])
 		{
+			$title = $page_header = "Personas Search Results for " . htmlspecialchars($_GET['p']);
 			$list = $db->search_personas($_GET['p'], $category, $page_size);
 		}
 	}
 	else #tab = all
 	{
 		$page_size = 501;
 		$page = is_numeric($page) ? $page : 1;
 		$start = ($page - 1) * $page_size;