summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandrew morton2008-10-10 00:59:10 (GMT)
committer andrew morton2008-10-10 00:59:10 (GMT)
commit0ed571941e4cf5971e6207819105261133f5e5a7 (patch)
treeef11e9bdcc15f8cf41b3dd0d8478ee50aa0cff22
parent56f3f61b4dc212f3ef86ad5e1f52dbb77f267e16 (diff)
#318993 by stella, Patch for problems found in code review.
-rw-r--r--field_file.inc7
-rw-r--r--filefield.install3
-rw-r--r--filefield_widget.inc2
3 files changed, 6 insertions, 6 deletions
diff --git a/field_file.inc b/field_file.inc
index 2a1156c..fc3aeee 100644
--- a/field_file.inc
+++ b/field_file.inc
@@ -342,10 +342,9 @@ function field_file_check_directory(&$directory, $mode = 0, $form_item = NULL) {
chmod($directory .'/.htaccess', 0664);
}
else {
- $message = "Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines: <code>!htaccess</code>";
- $repl = array('%directory' => $directory, '!htaccess' => '<br />'. nl2br(check_plain($htaccess_lines)));
- form_set_error($form_item, t($message, $repl));
- watchdog('security', $message, $repl, WATCHDOG_ERROR);
+ $repl = array('%directory' => $directory, '!htaccess' => nl2br(check_plain($htaccess_lines)));
+ form_set_error($form_item, t("Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines:<br /><code>!htaccess</code>", $repl));
+ watchdog('security', "Security warning: Couldn't write .htaccess file. Please create a .htaccess file in your %directory directory which contains the following lines:<br /><code>!htaccess</code>", $repl, WATCHDOG_ERROR);
}
}
diff --git a/filefield.install b/filefield.install
index 7c76d96..d45eb7b 100644
--- a/filefield.install
+++ b/filefield.install
@@ -237,8 +237,9 @@ function _filefield_update_6001_move_operation($field, &$context) {
* Drop the list and description columns.
*/
function _filefield_update_6001_drop_operation($field, &$context) {
+ $ret = array();
$db_info = content_database_info($field);
// TODO: Now that the data has been migrated we can drop the columns.
- db_query('ALTER TABLE '. $db_info['table'] .' DROP COLUMN '. $db_info['columns']['description']['column']);
+ db_drop_field($ret, $db_info['table'], $db_info['columns']['description']['column']);
$context['finished'] = 1;
}
diff --git a/filefield_widget.inc b/filefield_widget.inc
index 0e64ba9..097211d 100644
--- a/filefield_widget.inc
+++ b/filefield_widget.inc
@@ -357,7 +357,7 @@ function filefield_node_form_validate($form, &$form_state) {
}
}
-function filefield_node_form_submit($form, $form_state) {
+function filefield_node_form_submit($form, &$form_state) {
// we ignore all but the save button here.
if ($form_state['values']['op'] != t('Save')) {
return;