Commit 15671f47 authored by Dries's avatar Dries

- Patch #332123 by webchick, lilou: remove t() function from schema descriptions.

parent 97fdc491
......@@ -852,7 +852,7 @@ function form_error(&$element, $message = '') {
* $_POST data.
*/
function form_builder($form_id, $form, &$form_state) {
static $complete_form, $cache;
static $complete_form, $cache, $file;
// Initialize as unprocessed.
$form['#processed'] = FALSE;
......@@ -943,9 +943,20 @@ function form_builder($form_id, $form, &$form_state) {
if (!empty($form['#cache'])) {
$cache = $form['#cache'];
}
// We are on the top form, we can copy back #cache if it's set.
if (isset($form['#type']) && $form['#type'] == 'form' && isset($cache)) {
$form['#cache'] = TRUE;
// If there is a file element, we need to flip a static flag so later the
// form encoding can be set.
if ($form['#type'] == 'file') {
$file = TRUE;
}
if (isset($form['#type']) && $form['#type'] == 'form') {
// We are on the top form, we can copy back #cache if it's set.
if (isset($cache)) {
$form['#cache'] = TRUE;
}
// If there is a file element, we set the form encoding.
if (isset($file)) {
$form['#attributes']['enctype'] = 'multipart/form-data';
}
}
return $form;
}
......
......@@ -27,32 +27,32 @@ function aggregator_uninstall() {
*/
function aggregator_schema() {
$schema['aggregator_category'] = array(
'description' => t('Stores categories for aggregator feeds and feed items.'),
'description' => 'Stores categories for aggregator feeds and feed items.',
'fields' => array(
'cid' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => t('Primary Key: Unique aggregator category ID.'),
'description' => 'Primary Key: Unique aggregator category ID.',
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Title of the category.'),
'description' => 'Title of the category.',
),
'description' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => t('Description of the category'),
'description' => 'Description of the category',
),
'block' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => t('The number of recent items to show within the category block.'),
'description' => 'The number of recent items to show within the category block.',
)
),
'primary key' => array('cid'),
......@@ -62,19 +62,19 @@ function aggregator_schema() {
);
$schema['aggregator_category_feed'] = array(
'description' => t('Bridge table; maps feeds to categories.'),
'description' => 'Bridge table; maps feeds to categories.',
'fields' => array(
'fid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t("The feed's {aggregator_feed}.fid."),
'description' => "The feed's {aggregator_feed}.fid.",
),
'cid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The {aggregator_category}.cid to which the feed is being assigned.'),
'description' => 'The {aggregator_category}.cid to which the feed is being assigned.',
)
),
'primary key' => array('cid', 'fid'),
......@@ -84,19 +84,19 @@ function aggregator_schema() {
);
$schema['aggregator_category_item'] = array(
'description' => t('Bridge table; maps feed items to categories.'),
'description' => 'Bridge table; maps feed items to categories.',
'fields' => array(
'iid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t("The feed item's {aggregator_item}.iid."),
'description' => "The feed item's {aggregator_item}.iid.",
),
'cid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The {aggregator_category}.cid to which the feed item is being assigned.'),
'description' => 'The {aggregator_category}.cid to which the feed item is being assigned.',
)
),
'primary key' => array('cid', 'iid'),
......@@ -106,84 +106,84 @@ function aggregator_schema() {
);
$schema['aggregator_feed'] = array(
'description' => t('Stores feeds to be parsed by the aggregator.'),
'description' => 'Stores feeds to be parsed by the aggregator.',
'fields' => array(
'fid' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => t('Primary Key: Unique feed ID.'),
'description' => 'Primary Key: Unique feed ID.',
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Title of the feed.'),
'description' => 'Title of the feed.',
),
'url' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('URL to the feed.'),
'description' => 'URL to the feed.',
),
'refresh' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('How often to check for new feed items, in seconds.'),
'description' => 'How often to check for new feed items, in seconds.',
),
'checked' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('Last time feed was checked for new items, as Unix timestamp.'),
'description' => 'Last time feed was checked for new items, as Unix timestamp.',
),
'link' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('The parent website of the feed; comes from the <link> element in the feed.'),
'description' => 'The parent website of the feed; comes from the <link> element in the feed.',
),
'description' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => t("The parent website's description; comes from the <description> element in the feed."),
'description' => "The parent website's description; comes from the <description> element in the feed.",
),
'image' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => t('An image representing the feed.'),
'description' => 'An image representing the feed.',
),
'hash' => array(
'type' => 'varchar',
'length' => 32,
'not null' => TRUE,
'default' => '',
'description' => t('Calculated md5 hash of the feed data, used for validating cache.'),
'description' => 'Calculated md5 hash of the feed data, used for validating cache.',
),
'etag' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Entity tag HTTP response header, used for validating cache.'),
'description' => 'Entity tag HTTP response header, used for validating cache.',
),
'modified' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('When the feed was last modified, as a Unix timestamp.'),
'description' => 'When the feed was last modified, as a Unix timestamp.',
),
'block' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => t("Number of items to display in the feed's block."),
'description' => "Number of items to display in the feed's block.",
)
),
'primary key' => array('fid'),
......@@ -194,56 +194,56 @@ function aggregator_schema() {
);
$schema['aggregator_item'] = array(
'description' => t('Stores the individual items imported from feeds.'),
'description' => 'Stores the individual items imported from feeds.',
'fields' => array(
'iid' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => t('Primary Key: Unique ID for feed item.'),
'description' => 'Primary Key: Unique ID for feed item.',
),
'fid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The {aggregator_feed}.fid to which this item belongs.'),
'description' => 'The {aggregator_feed}.fid to which this item belongs.',
),
'title' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Title of the feed item.'),
'description' => 'Title of the feed item.',
),
'link' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Link to the feed item.'),
'description' => 'Link to the feed item.',
),
'author' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Author of the feed item.'),
'description' => 'Author of the feed item.',
),
'description' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => t('Body of the feed item.'),
'description' => 'Body of the feed item.',
),
'timestamp' => array(
'type' => 'int',
'not null' => FALSE,
'description' => t('Posted date of the feed item, as a Unix timestamp.'),
'description' => 'Posted date of the feed item, as a Unix timestamp.',
),
'guid' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'description' => t('Unique identifier for the feed item.'),
'description' => 'Unique identifier for the feed item.',
)
),
'primary key' => array('iid'),
......
......@@ -163,7 +163,7 @@ function block_schema() {
);
$schema['cache_block'] = drupal_get_schema_unprocessed('system', 'cache');
$schema['cache_block']['description'] = t('Cache table for the Block module to store already built blocks, identified by module, delta, and various contexts which may change the block, such as theme, locale, and caching mode defined for the block.');
$schema['cache_block']['description'] = 'Cache table for the Block module to store already built blocks, identified by module, delta, and various contexts which may change the block, such as theme, locale, and caching mode defined for the block.';
return $schema;
}
......@@ -23,28 +23,28 @@ function blogapi_uninstall() {
*/
function blogapi_schema() {
$schema['blogapi_files'] = array(
'description' => t('Stores information for files uploaded via the blogapi.'),
'description' => 'Stores information for files uploaded via the blogapi.',
'fields' => array(
'fid' => array(
'description' => t('Primary Key: Unique file ID.'),
'description' => 'Primary Key: Unique file ID.',
'type' => 'serial',
),
'uid' => array(
'description' => t('The {users}.uid of the user who is associated with the file.'),
'description' => 'The {users}.uid of the user who is associated with the file.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
),
'filepath' => array(
'description' => t('Path of the file relative to Drupal root.'),
'description' => 'Path of the file relative to Drupal root.',
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
),
'filesize' => array(
'description' => t('The size of the file in bytes.'),
'description' => 'The size of the file in bytes.',
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
......
......@@ -251,28 +251,28 @@ function book_update_6000() {
*/
function book_schema() {
$schema['book'] = array(
'description' => t('Stores book outline information. Uniquely connects each node in the outline to a link in {menu_links}'),
'description' => 'Stores book outline information. Uniquely connects each node in the outline to a link in {menu_links}',
'fields' => array(
'mlid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t("The book page's {menu_links}.mlid."),
'description' => "The book page's {menu_links}.mlid.",
),
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t("The book page's {node}.nid."),
'description' => "The book page's {node}.nid.",
),
'bid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t("The book ID is the {book}.nid of the top-level page."),
'description' => "The book ID is the {book}.nid of the top-level page.",
),
),
'primary key' => array('mlid'),
......
......@@ -118,56 +118,56 @@ function comment_update_7001() {
*/
function comment_schema() {
$schema['comments'] = array(
'description' => t('Stores comments and associated data.'),
'description' => 'Stores comments and associated data.',
'fields' => array(
'cid' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => t('Primary Key: Unique comment ID.'),
'description' => 'Primary Key: Unique comment ID.',
),
'pid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The {comments}.cid to which this comment is a reply. If set to 0, this comment is not a reply to an existing comment.'),
'description' => 'The {comments}.cid to which this comment is a reply. If set to 0, this comment is not a reply to an existing comment.',
),
'nid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The {node}.nid to which this comment is a reply.'),
'description' => 'The {node}.nid to which this comment is a reply.',
),
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The {users}.uid who authored the comment. If set to 0, this comment was created by an anonymous user.'),
'description' => 'The {users}.uid who authored the comment. If set to 0, this comment was created by an anonymous user.',
),
'subject' => array(
'type' => 'varchar',
'length' => 64,
'not null' => TRUE,
'default' => '',
'description' => t('The comment title.'),
'description' => 'The comment title.',
),
'comment' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => t('The comment body.'),
'description' => 'The comment body.',
),
'hostname' => array(
'type' => 'varchar',
'length' => 128,
'not null' => TRUE,
'default' => '',
'description' => t("The author's host name."),
'description' => "The author's host name.",
),
'timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The time that the comment was created, or last edited by its author, as a Unix timestamp.'),
'description' => 'The time that the comment was created, or last edited by its author, as a Unix timestamp.',
),
'status' => array(
'type' => 'int',
......@@ -175,38 +175,38 @@ function comment_schema() {
'not null' => TRUE,
'default' => 1,
'size' => 'tiny',
'description' => t('The published status of a comment. (0 = Not Published, 1 = Published)'),
'description' => 'The published status of a comment. (0 = Not Published, 1 = Published)',
),
'format' => array(
'type' => 'int',
'size' => 'small',
'not null' => TRUE,
'default' => 0,
'description' => t('The {filter_formats}.format of the comment body.'),
'description' => 'The {filter_formats}.format of the comment body.',
),
'thread' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'description' => t("The vancode representation of the comment's place in a thread."),
'description' => "The vancode representation of the comment's place in a thread.",
),
'name' => array(
'type' => 'varchar',
'length' => 60,
'not null' => FALSE,
'description' => t("The comment author's name. Uses {users}.name if the user is logged in, otherwise uses the value typed into the comment form."),
'description' => "The comment author's name. Uses {users}.name if the user is logged in, otherwise uses the value typed into the comment form.",
),
'mail' => array(
'type' => 'varchar',
'length' => 64,
'not null' => FALSE,
'description' => t("The comment author's e-mail address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on."),
'description' => "The comment author's e-mail address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on.",
),
'homepage' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'description' => t("The comment author's home page address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on."),
'description' => "The comment author's home page address from the comment form, if user is anonymous, and the 'Anonymous users may/must leave their contact information' setting is turned on.",
)
),
'indexes' => array(
......@@ -219,39 +219,39 @@ function comment_schema() {
);
$schema['node_comment_statistics'] = array(
'description' => t('Maintains statistics of node and comments posts to show "new" and "updated" flags.'),
'description' => 'Maintains statistics of node and comments posts to show "new" and "updated" flags.',
'fields' => array(
'nid' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('The {node}.nid for which the statistics are compiled.'),
'description' => 'The {node}.nid for which the statistics are compiled.',
),
'last_comment_timestamp' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The Unix timestamp of the last comment that was posted within this node, from {comments}.timestamp.'),
'description' => 'The Unix timestamp of the last comment that was posted within this node, from {comments}.timestamp.',
),
'last_comment_name' => array(
'type' => 'varchar',
'length' => 60,
'not null' => FALSE,
'description' => t('The name of the latest author to post a comment on this node, from {comments}.name.'),
'description' => 'The name of the latest author to post a comment on this node, from {comments}.name.',
),
'last_comment_uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The user ID of the latest author to post a comment on this node, from {comments}.uid.'),
'description' => 'The user ID of the latest author to post a comment on this node, from {comments}.uid.',
),
'comment_count' => array(
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
'default' => 0,
'description' => t('The total number of comments on this node.'),
'description' => 'The total number of comments on this node.',
),
),
'primary key' => array('nid'),
......
......@@ -26,46 +26,46 @@ function contact_uninstall() {
*/
function contact_schema() {
$schema['contact'] = array(
'description' => t('Contact form category settings.'),
'description' => 'Contact form category settings.',
'fields' => array(
'cid' => array(
'type' => 'serial',
'unsigned' => TRUE,
'not null' => TRUE,
'description' => t('Primary Key: Unique category ID.'),
'description' => 'Primary Key: Unique category ID.',
),
'category' => array(
'type' => 'varchar',
'length' => 255,
'not null' => TRUE,
'default' => '',
'description' => t('Category name.'),
'description' => 'Category name.',
),
'recipients' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => t('Comma-separated list of recipient e-mail addresses.'),
'description' => 'Comma-separated list of recipient e-mail addresses.',
),
'reply' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => t('Text of the auto-reply message.'),
'description' => 'Text of the auto-reply message.',
),
'weight' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => t("The category's weight."),
'description' => "The category's weight.",
),
'selected' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => t('Flag to indicate whether or not category is selected by default. (1 = Yes, 0 = No)'),
'description' => 'Flag to indicate whether or not category is selected by default. (1 = Yes, 0 = No)',
),
),
'primary key' => array('cid'),
......
......@@ -22,37 +22,37 @@ function dblog_uninstall() {
*/
function dblog_schema() {
$schema['watchdog'] = array(
'description' => t('Table that contains logs of all system events.'),
'description' => 'Table that contains logs of all system events.',
'fields' => array(
'wid' => array(
'type' => 'serial',
'not null' => TRUE,
'description' => t('Primary Key: Unique watchdog event ID.'),
'description' => 'Primary Key: Unique watchdog event ID.',
),
'uid' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'description' => t('The {users}.uid of the user who triggered the event.'),
'description' => 'The {users}.uid of the user who triggered the event.',
),
'type' => array(
'type' => 'varchar',
'length' => 16,
'not null' => TRUE,
'default' => '',
'description' => t('Type of log message, for example "user" or "page not found."'),
'description' => 'Type of log message, for example "user" or "page not found."',
),
'message' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => t('Text of log message to be passed into the t() function.'),
'description' => 'Text of log message to be passed into the t() function.',
),
'variables' => array(
'type' => 'text',
'not null' => TRUE,
'size' => 'big',
'description' => t('Serialized array of variables that match the message string and that is passed into the t() function.'),
'description' => 'Serialized array of variables that match the message string and that is passed into the t() function.',
),
'severity' => array(
'type' => 'int',
......@@ -60,39 +60,39 @@ function dblog_schema() {
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
'description' => t('The severity level of the event; ranges from 0 (Emergency) to 7 (Debug)'),
'description' => 'The severity level of the event; ranges from 0 (Emergency) to 7 (Debug)',
),
'link' => array(
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
'default' => '',
'description' => t('Link to view the result of the event.'),
'description' => 'Link to view the result of the event.',
),
'location' => array(