* @return void
*/
public function modelAction($actionData = false)
- {
+ {
$option = false;
$option2 = 'registrations';
$settings_updated = false;
$settings_update_error = false;
$reg_settings = false;
-
+
// General settings are always stored in a record with ID=1.
$id = 1;
-
+
// Determine if current user can edit configurations
if (!current_user_can('glm_members_management')) {
return array(
// Update the settings and redisplay the form
case 'submit':
-
+
// Update the general settings
$reg_settings = $this->updateEntry( $id );
-
+
if ($reg_settings['status']) {
$settings_updated = true;
+ $reg_settings = $this->editEntry( $id );
} else {
$settings_update_error = true;
}
//echo "<pre>" . print_r($reg_settings, true) . "</pre>";
-
+
// Display admin message that the data has been updated
glmMembersAdmin::addNotice('General Settings for the '.GLM_MEMBERS_REGISTRATIONS_PLUGIN_NAME.' plugin have been updated.', 'AdminNotice');
$reg_settings = $this->editEntry( $id );
//echo "<pre>" . print_r($reg_settings, true) . "</pre>";
-
+
// Check that we actually have the terms
if ($reg_settings === false) {
break;
}
-
+
// Compile template data
$template_data = array(
'regSettings' => $reg_settings,
'settingsUpdated' => $settings_updated,
'settingsUpdateError' => $settings_update_error,
);
-
+
//echo "<pre>" . print_r($regSettings, true) . "</pre>";
// Return status, suggested view, and data to controller
return array(
);
}
}
-?>
\ No newline at end of file
+?>