From d7b701262d7aa0eb516d627a24bf33afd7a59ac5 Mon Sep 17 00:00:00 2001
From: Callan Barrett <wizzomafizzo@gmail.com>
Date: Sun, 5 Oct 2008 06:13:18 +0800
Subject: [PATCH] Fix bugs in pkg_notify

Wrong varibale in foreach loop due to new behavior
Success messages used print instead of return

Signed-off-by: Callan Barrett <wizzomafizzo@gmail.com>
---
 web/lib/pkgfuncs.inc |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/web/lib/pkgfuncs.inc b/web/lib/pkgfuncs.inc
index 27b623a..c715469 100644
--- a/web/lib/pkgfuncs.inc
+++ b/web/lib/pkgfuncs.inc
@@ -1347,7 +1347,7 @@ function pkg_notify ($atype, $ids) {
 	}
 	
 	foreach ($ids as $pid) {
-		if (!is_numeric($ids)) {
+		if (!is_numeric($pid)) {
 			return __("Couldn't add to notification list.");
 		}
 	}
@@ -1390,8 +1390,8 @@ function pkg_notify ($atype, $ids) {
 	}
 	
 	if ($action) {
-		print __("You have been added to the comment notification list for %s.", $msg);
+		return __("You have been added to the comment notification list for %s.", $msg);
 	} else {
-		print __("You have been removed from the comment notification list for %s.", $msg);
+		return __("You have been removed from the comment notification list for %s.", $msg);
 	}
 }
-- 
1.6.0.2

