Index: trunk/kernel/parser.php
===================================================================
diff -u -r1221 -r1278
--- trunk/kernel/parser.php (.../parser.php) (revision 1221)
+++ trunk/kernel/parser.php (.../parser.php) (revision 1278)
@@ -406,31 +406,31 @@
*/
function m_form_checkbox($attribs = array())
{
- global $FormValues, $objConfig;
+ global $FormValues, $objConfig;
- $html_attribs = ExtraAttributes($attribs);
- $form = $attribs["_form"];
- $field = strtolower($attribs["_field"]);
- if(isset($_POST[$field]))
- {
- $value = (int)$_POST[$field];
- if($value==1)
- $checked = " CHECKED";
- }
- else
- {
- $value = (int)$FormValues[$form][$field];
- if($value==1)
- $checked=" CHECKED";
- }
- //echo $form.".".$field."=".$value."
\n";
- $ret = "";
- if($attribs["_required"])
- $ret .= "";
- if($attribs["_custom"])
- $ret .= "";
+ $html_attribs = ExtraAttributes($attribs);
+ $form = $attribs['_form'];
+ $field = strtolower($attribs['_field']);
+ if(isset($_POST[$field]))
+ {
+ $value = (int)$_POST[$field];
+ if($value==1) $checked = ' CHECKED';
+ }
+ else
+ {
+ $value = (int)$FormValues[$form][$field];
+ if($value==1)
+ $checked=' CHECKED';
+ }
+ //echo $form.".".$field."=".$value."
\n";
+ $ret = "";
+ if($attribs["_required"])
+ $ret .= "";
+ if($attribs["_custom"])
+ $ret .= "";
- return $ret;
+ $ret .= '';
+ return $ret;
}
/*
Index: trunk/kernel/startup.php
===================================================================
diff -u -r927 -r1278
--- trunk/kernel/startup.php (.../startup.php) (revision 927)
+++ trunk/kernel/startup.php (.../startup.php) (revision 1278)
@@ -37,6 +37,7 @@
$var=htmlspecialchars($strip?stripslashes($var):$var);
return $var;
}
+
/*
startup.php: this is the primary startup sequence for in-portal services
*/
@@ -55,6 +56,16 @@
require_once($pathtoroot."globals.php");
include_once($pathtoroot.'kernel/include/'.( IsDebugMode() ? 'debugger.php' : 'debugger_dummy.php') );
+ // put all non-checked checkboxes in $_POST & $_REQUEST with 0 values
+ if( GetVar('form_fields') )
+ {
+ $form_fields = GetVar('form_fields');
+ foreach($form_fields as $checkbox_name)
+ {
+ if( GetVar($checkbox_name) === false ) SetVar($checkbox_name,0);
+ }
+ }
+
LogEntry("Initalizing System..\n");
/* for 64 bit timestamps */
require_once($pathtoroot."kernel/include/adodb/adodb-time.inc.php");
Index: trunk/kernel/frontaction.php
===================================================================
diff -u -r1276 -r1278
--- trunk/kernel/frontaction.php (.../frontaction.php) (revision 1276)
+++ trunk/kernel/frontaction.php (.../frontaction.php) (revision 1278)
@@ -575,14 +575,14 @@
if($userid>0)
{
$u = $objUsers->GetItem($userid);
- $profile_fields = Array('firstname','lastname','dob','email','phone','street','city','state','zip','country');
-
- foreach($profile_fields as $field)
+ foreach($_POST as $field=>$value)
{
- $field = 'pp_'.$field;
- $value = (int)GetVar($field);
- $objSession->SetPersistantVariable($field,$value);
+ if(substr($field,0,3)=="pp_")
+ {
+ $objSession->SetPersistantVariable($field,$value);
+ }
}
+
}
break;
case "m_set_lang":