From fab143778a7ef940ce0d45f73fc43b89004ffec3 Mon Sep 17 00:00:00 2001 From: Colin Smith Date: Tue, 26 Jul 2005 18:58:41 +0000 Subject: [PATCH] Fix close_notice(). --- etc/inc/notices.inc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/etc/inc/notices.inc b/etc/inc/notices.inc index ed4afe964e..1cf7dbc44b 100644 --- a/etc/inc/notices.inc +++ b/etc/inc/notices.inc @@ -83,6 +83,7 @@ function get_notices($category = "all") { function close_notice($id) { global $notice_path; require_once("util.inc"); + $ids = array(); if(!$notices = get_notices()) return; if($id == "all") { unlink_if_exists($notice_path); @@ -103,9 +104,9 @@ function close_notice($id) { break; } } - if(count($queue) != 0) { + if(count($notices) != 0) { $queueout = fopen($notice_path, "w"); - fwrite($queueout, serialize($queue)); + fwrite($queueout, serialize($notices)); fclose($queueout); } else { unlink_if_exists($notice_path); @@ -170,4 +171,4 @@ function are_notices_pending($category = "all") { return false; } -?> \ No newline at end of file +?>