Revision: 2017
          http://mrbs.svn.sourceforge.net/mrbs/?rev=2017&view=rev
Author:   cimorrison
Date:     2011-09-27 11:17:53 +0000 (Tue, 27 Sep 2011)
Log Message:
-----------
Tidied up the use of default values for form parameters, using the optional 
third parameter to get_form_var()

Modified Paths:
--------------
    mrbs/trunk/web/day.php
    mrbs/trunk/web/del_entry.php
    mrbs/trunk/web/edit_entry.php
    mrbs/trunk/web/month.php
    mrbs/trunk/web/week.php

Modified: mrbs/trunk/web/day.php
===================================================================
--- mrbs/trunk/web/day.php      2011-09-27 10:56:19 UTC (rev 2016)
+++ mrbs/trunk/web/day.php      2011-09-27 11:17:53 UTC (rev 2017)
@@ -9,11 +9,6 @@
 $timetohighlight = get_form_var('timetohighlight', 'int');
 $debug_flag = get_form_var('debug_flag', 'int');
 
-if (empty($debug_flag))
-{
-  $debug_flag = 0;
-}
-
 // Check the user is authorised for this page
 checkAuthorised();
 

Modified: mrbs/trunk/web/del_entry.php
===================================================================
--- mrbs/trunk/web/del_entry.php        2011-09-27 10:56:19 UTC (rev 2016)
+++ mrbs/trunk/web/del_entry.php        2011-09-27 11:17:53 UTC (rev 2017)
@@ -16,16 +16,11 @@
 $series = get_form_var('series', 'int');
 $returl = get_form_var('returl', 'string');
 $action = get_form_var('action', 'string');
-$note = get_form_var('note', 'string');
+$note = get_form_var('note', 'string', '');
 
 // Check the user is authorised for this page
 checkAuthorised();
 
-if (!isset($note))
-{
-  $note = "";
-}
-
 if (empty($returl))
 {
   switch ($default_view)

Modified: mrbs/trunk/web/edit_entry.php
===================================================================
--- mrbs/trunk/web/edit_entry.php       2011-09-27 10:56:19 UTC (rev 2016)
+++ mrbs/trunk/web/edit_entry.php       2011-09-27 11:17:53 UTC (rev 2017)
@@ -127,13 +127,9 @@
 $period = get_form_var('period', 'int');
 $id = get_form_var('id', 'int');
 $copy = get_form_var('copy', 'int');
-$edit_type = get_form_var('edit_type', 'string');
+$edit_type = get_form_var('edit_type', 'string', '');
 $returl = get_form_var('returl', 'string');
 
-if (!isset($edit_type))
-{
-  $edit_type = "";
-}
 
 // We might be going through edit_entry more than once, for example if we have 
to log on on the way.  We
 // still need to preserve the original calling page so that once we've 
completed edit_entry_handler we can

Modified: mrbs/trunk/web/month.php
===================================================================
--- mrbs/trunk/web/month.php    2011-09-27 10:56:19 UTC (rev 2016)
+++ mrbs/trunk/web/month.php    2011-09-27 11:17:53 UTC (rev 2017)
@@ -22,12 +22,6 @@
   return "> ";
 }
 
-// Default parameters:
-if (empty($debug_flag))
-{
-  $debug_flag = 0;
-}
-
 // Check the user is authorised for this page
 checkAuthorised();
 

Modified: mrbs/trunk/web/week.php
===================================================================
--- mrbs/trunk/web/week.php     2011-09-27 10:56:19 UTC (rev 2016)
+++ mrbs/trunk/web/week.php     2011-09-27 11:17:53 UTC (rev 2017)
@@ -11,11 +11,6 @@
 $debug_flag = get_form_var('debug_flag', 'int');
 $timetohighlight = get_form_var('timetohighlight', 'int');
 
-if (empty($debug_flag))
-{
-  $debug_flag = 0;
-}
-
 // Check the user is authorised for this page
 checkAuthorised();
 

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2dcopy1
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits

Reply via email to