Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

radio_button-replace_blanks_with_a_default_value #203

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jnip
Copy link
Contributor

@jnip jnip commented Mar 20, 2015

This should work now

@jnip
Copy link
Contributor Author

jnip commented Mar 20, 2015

@eikonos
Could you take a look at the description I added (_AM_ELE_OPT_REPLACEBLANKSWITHDEFAULT).
Let me know if I need to change it. I will also need the description in french, to add in modules/formulize/language/french/admin.php

Previously did not work if <Resynch existing entries> was also happening
at the same time.
}
// replace with default value
foreach ($update_array as $entry_id) {
$sql = "UPDATE `".$xoopsDB->prefix("formulize_".$formObject->getVar('form_handle')."` SET `".$element->getVar('ele_handle')."`='".$default_entry."' WHERE entry_id=".$entry_id);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using $default_entry directly in an SQL query, it should be formulize_db_escape($default_entry) instead, because user input might contain text that's not safe for SQL.

Applied the three mentioned changes
@jnip
Copy link
Contributor Author

jnip commented Mar 26, 2015

@eikonos I have applied the 3 mentioned changes. Please take another look.

@jegelstaff
Copy link
Owner

A very useful feature that should be merged in. Conflicts should be simple to deal with.

@jegelstaff
Copy link
Owner

See also: #139

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants