From: Matthew G. <gr...@mu...> - 2002-04-16 16:02:05
|
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']); + } ?> On Sun, Apr 14, 2002 at 03:05:39PM -0400, James E. Flemer wrote: > On Wed, 10 Apr 2002, Matthew Gregg wrote: > > > Attached is first run at a patch to allow publishing of surveys > > without needing to manually create a php "include" file. > > I made a few slight changes, nothing effecting use, and > committed this patch. Thanks. > > > Take a look in handler-prefix.php where the remote user id is found. > > I commented the QUERY_STRING case because it would grab the > > query string for survey selection every time. Can we live without > > that case? > > I changed this so that survey.php removes "name=xxx" from > the query string, so no mods to handler-prefix were needed. > > Thanks for the patch. > > -James > -- brought to you by, Matthew Gregg... one of the friendly folks in the IT Lab. --------------------------------------\ The IT Lab (http://www.itlab.musc.edu) \____________________ Probably the world's premier software development center. Serving: Programming, Tools, Ice Cream, Seminars |