Revision: 1371
http://mrbs.svn.sourceforge.net/mrbs/?rev=1371&view=rev
Author: cimorrison
Date: 2010-07-14 10:51:22 +0000 (Wed, 14 Jul 2010)
Log Message:
-----------
- Fixed a bug which was resulting in an SQL error if you logged out of MRBS
when the More Info page was displayed
- Made view_entry more robust by checking that an id variable exists
- Fixed a bug in the fatal error handling whereby some global variables had not
been declared resulting in undefined variable problems.
Modified Paths:
--------------
mrbs/trunk/web/functions.inc
mrbs/trunk/web/mrbs_sql.inc
mrbs/trunk/web/view_entry.php
Modified: mrbs/trunk/web/functions.inc
===================================================================
--- mrbs/trunk/web/functions.inc 2010-07-14 10:08:54 UTC (rev 1370)
+++ mrbs/trunk/web/functions.inc 2010-07-14 10:51:22 UTC (rev 1371)
@@ -334,6 +334,8 @@
// caller did that. Alway outputs the bottom of the page and exits.
function fatal_error($need_header, $message)
{
+ global $simple_trailer, $weekstarts, $view_week_number;
+
if ($need_header)
{
print_header(0, 0, 0, 0, "");
Modified: mrbs/trunk/web/mrbs_sql.inc
===================================================================
--- mrbs/trunk/web/mrbs_sql.inc 2010-07-14 10:08:54 UTC (rev 1370)
+++ mrbs/trunk/web/mrbs_sql.inc 2010-07-14 10:51:22 UTC (rev 1371)
@@ -714,6 +714,19 @@
{
global $tbl_entry, $tbl_repeat, $tbl_room, $tbl_area;
global $provisional_enabled;
+
+ // Check that we've got an id
+ if (!isset($id))
+ {
+ if ($silent)
+ {
+ return FALSE;
+ }
+ else
+ {
+ fatal_error(0, ($series ? get_vocab("invalid_series_id") :
get_vocab("invalid_entry_id")));
+ }
+ }
if ($series)
{
@@ -774,9 +787,7 @@
}
else
{
- fatal_error(0,
- ($series ? get_vocab("invalid_series_id") :
get_vocab("invalid_entry_id"))
- );
+ fatal_error(0, ($series ? get_vocab("invalid_series_id") :
get_vocab("invalid_entry_id")));
}
}
Modified: mrbs/trunk/web/view_entry.php
===================================================================
--- mrbs/trunk/web/view_entry.php 2010-07-14 10:08:54 UTC (rev 1370)
+++ mrbs/trunk/web/view_entry.php 2010-07-14 10:51:22 UTC (rev 1371)
@@ -9,11 +9,9 @@
{
global $room_id;
- echo "<form action=\"$form_action\" method=\"post\">\n";
+ echo "<form action=\"$form_action?id=$id&series=$series\"
method=\"post\">\n";
echo "<fieldset>\n";
echo "<legend></legend>\n";
- echo "<input type=\"hidden\" name=\"id\" value=\"$id\">\n";
- echo "<input type=\"hidden\" name=\"series\" value=\"$series\">\n";
echo "<input type=\"hidden\" name=\"action\" value=\"$action_type\">\n";
echo "<input type=\"hidden\" name=\"room_id\" value=\"$room_id\">\n";
echo "<input type=\"hidden\" name=\"returl\" value=\"" .
htmlspecialchars($returl) . "\">\n";
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits