From: James E. F. <jf...@ac...> - 2002-04-16 16:55:52
|
Thanks for pointing that out. I just committed smaller patch doing the same thing. :-) There is no need to check public, since the handler prefix is included by the handler (if it hasn't already) anyway, so now we just include it explicitly above any content. if ($result = mysql_query($sql)) { if (mysql_num_rows($result) > 0) list($sid, $_title) = mysql_fetch_row($result); mysql_free_result($result); } } + include($ESPCONFIG['handler_prefix']); ?> Checkout new revision from cvs. -James On Tue, 16 Apr 2002, Matthew Gregg wrote: > One other thing. > survey.php doesn't take into account private surveys. > I think it's a small change to do this, but larger than I felt safe committing > to CVS myself :-) > > - $sql = "SELECT id,title FROM survey WHERE name = '$_name'"; > + $sql = "SELECT id, title, public FROM survey WHERE name = '$_name'"; > if ($result = mysql_query($sql)) { > if (mysql_num_rows($result) > 0) > - list($sid, $_title) = mysql_fetch_row($result); > + list($sid, $_title, $public) = mysql_fetch_row($result); > mysql_free_result($result); > } > } > + if ($public == "N") { > + include($ESPCONFIG['handler_prefix']); > + } > ?> |