Two issues restrict the flexibility of updates:

1. update_sql acceps only one argument, the $sql, but in some cases it's necessary to feed additional parameters (strings or numbers to be used as query parameters).

2. Some updates require more than queries (e.g., they may call other Drupal functions), and so could use some other form of messaging than that provided by update_sql (which provides messages only about the success or failure of SQL calls).

The attached patch addresses these issues by (a) making update_sql accept extra arguments and (b) introducing two message types "info" and "warning" in addition to the existing "ok" and "failure". (Also, message strings are now passed through the t('') function.)

This is a quick initial take and not yet tested.

CommentFileSizeAuthor
update_4.patch1.75 KBnedjo

Comments

nedjo’s picture

Status: Active » Closed (fixed)

Probably not needed now.