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 = '') { ...@@ -852,7 +852,7 @@ function form_error(&$element, $message = '') {
* $_POST data. * $_POST data.
*/ */
function form_builder($form_id, $form, &$form_state) { function form_builder($form_id, $form, &$form_state) {
static $complete_form, $cache; static $complete_form, $cache, $file;
// Initialize as unprocessed. // Initialize as unprocessed.
$form['#processed'] = FALSE; $form['#processed'] = FALSE;
...@@ -943,9 +943,20 @@ function form_builder($form_id, $form, &$form_state) { ...@@ -943,9 +943,20 @@ function form_builder($form_id, $form, &$form_state) {
if (!empty($form['#cache'])) { if (!empty($form['#cache'])) {
$cache = $form['#cache']; $cache = $form['#cache'];
} }
// We are on the top form, we can copy back #cache if it's set. // If there is a file element, we need to flip a static flag so later the
if (isset($form['#type']) && $form['#type'] == 'form' && isset($cache)) { // form encoding can be set.
$form['#cache'] = TRUE; 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; return $form;
} }
......
...@@ -27,32 +27,32 @@ function aggregator_uninstall() { ...@@ -27,32 +27,32 @@ function aggregator_uninstall() {
*/ */
function aggregator_schema() { function aggregator_schema() {
$schema['aggregator_category'] = array( $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( 'fields' => array(
'cid' => array( 'cid' => array(
'type' => 'serial', 'type' => 'serial',
'not null' => TRUE, 'not null' => TRUE,
'description' => t('Primary Key: Unique aggregator category ID.'), 'description' => 'Primary Key: Unique aggregator category ID.',
), ),
'title' => array( 'title' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 255,
'not null' => TRUE, 'not null' => TRUE,
'default' => '', 'default' => '',
'description' => t('Title of the category.'), 'description' => 'Title of the category.',
), ),
'description' => array( 'description' => array(
'type' => 'text', 'type' => 'text',
'not null' => TRUE, 'not null' => TRUE,
'size' => 'big', 'size' => 'big',
'description' => t('Description of the category'), 'description' => 'Description of the category',
), ),
'block' => array( 'block' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, 'default' => 0,
'size' => 'tiny', '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'), 'primary key' => array('cid'),
...@@ -62,19 +62,19 @@ function aggregator_schema() { ...@@ -62,19 +62,19 @@ function aggregator_schema() {
); );
$schema['aggregator_category_feed'] = array( $schema['aggregator_category_feed'] = array(
'description' => t('Bridge table; maps feeds to categories.'), 'description' => 'Bridge table; maps feeds to categories.',
'fields' => array( 'fields' => array(
'fid' => array( 'fid' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, 'default' => 0,
'description' => t("The feed's {aggregator_feed}.fid."), 'description' => "The feed's {aggregator_feed}.fid.",
), ),
'cid' => array( 'cid' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, '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'), 'primary key' => array('cid', 'fid'),
...@@ -84,19 +84,19 @@ function aggregator_schema() { ...@@ -84,19 +84,19 @@ function aggregator_schema() {
); );
$schema['aggregator_category_item'] = array( $schema['aggregator_category_item'] = array(
'description' => t('Bridge table; maps feed items to categories.'), 'description' => 'Bridge table; maps feed items to categories.',
'fields' => array( 'fields' => array(
'iid' => array( 'iid' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, 'default' => 0,
'description' => t("The feed item's {aggregator_item}.iid."), 'description' => "The feed item's {aggregator_item}.iid.",
), ),
'cid' => array( 'cid' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, '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'), 'primary key' => array('cid', 'iid'),
...@@ -106,84 +106,84 @@ function aggregator_schema() { ...@@ -106,84 +106,84 @@ function aggregator_schema() {
); );
$schema['aggregator_feed'] = array( $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( 'fields' => array(
'fid' => array( 'fid' => array(
'type' => 'serial', 'type' => 'serial',
'not null' => TRUE, 'not null' => TRUE,
'description' => t('Primary Key: Unique feed ID.'), 'description' => 'Primary Key: Unique feed ID.',
), ),
'title' => array( 'title' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 255,
'not null' => TRUE, 'not null' => TRUE,
'default' => '', 'default' => '',
'description' => t('Title of the feed.'), 'description' => 'Title of the feed.',
), ),
'url' => array( 'url' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 255,
'not null' => TRUE, 'not null' => TRUE,
'default' => '', 'default' => '',
'description' => t('URL to the feed.'), 'description' => 'URL to the feed.',
), ),
'refresh' => array( 'refresh' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, '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( 'checked' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, '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( 'link' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 255,
'not null' => TRUE, 'not null' => TRUE,
'default' => '', '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( 'description' => array(
'type' => 'text', 'type' => 'text',
'not null' => TRUE, 'not null' => TRUE,
'size' => 'big', '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( 'image' => array(
'type' => 'text', 'type' => 'text',
'not null' => TRUE, 'not null' => TRUE,
'size' => 'big', 'size' => 'big',
'description' => t('An image representing the feed.'), 'description' => 'An image representing the feed.',
), ),
'hash' => array( 'hash' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 32, 'length' => 32,
'not null' => TRUE, 'not null' => TRUE,
'default' => '', '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( 'etag' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 255,
'not null' => TRUE, 'not null' => TRUE,
'default' => '', 'default' => '',
'description' => t('Entity tag HTTP response header, used for validating cache.'), 'description' => 'Entity tag HTTP response header, used for validating cache.',
), ),
'modified' => array( 'modified' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, '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( 'block' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, 'default' => 0,
'size' => 'tiny', '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'), 'primary key' => array('fid'),
...@@ -194,56 +194,56 @@ function aggregator_schema() { ...@@ -194,56 +194,56 @@ function aggregator_schema() {
); );
$schema['aggregator_item'] = array( $schema['aggregator_item'] = array(
'description' => t('Stores the individual items imported from feeds.'), 'description' => 'Stores the individual items imported from feeds.',
'fields' => array( 'fields' => array(
'iid' => array( 'iid' => array(
'type' => 'serial', 'type' => 'serial',
'not null' => TRUE, 'not null' => TRUE,
'description' => t('Primary Key: Unique ID for feed item.'), 'description' => 'Primary Key: Unique ID for feed item.',
), ),
'fid' => array( 'fid' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, '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( 'title' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 255,
'not null' => TRUE, 'not null' => TRUE,
'default' => '', 'default' => '',
'description' => t('Title of the feed item.'), 'description' => 'Title of the feed item.',
), ),
'link' => array( 'link' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 255,
'not null' => TRUE, 'not null' => TRUE,
'default' => '', 'default' => '',
'description' => t('Link to the feed item.'), 'description' => 'Link to the feed item.',
), ),
'author' => array( 'author' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 255,
'not null' => TRUE, 'not null' => TRUE,
'default' => '', 'default' => '',
'description' => t('Author of the feed item.'), 'description' => 'Author of the feed item.',
), ),
'description' => array( 'description' => array(
'type' => 'text', 'type' => 'text',
'not null' => TRUE, 'not null' => TRUE,
'size' => 'big', 'size' => 'big',
'description' => t('Body of the feed item.'), 'description' => 'Body of the feed item.',
), ),
'timestamp' => array( 'timestamp' => array(
'type' => 'int', 'type' => 'int',
'not null' => FALSE, '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( 'guid' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 255,
'not null' => FALSE, 'not null' => FALSE,
'description' => t('Unique identifier for the feed item.'), 'description' => 'Unique identifier for the feed item.',
) )
), ),
'primary key' => array('iid'), 'primary key' => array('iid'),
......
...@@ -163,7 +163,7 @@ function block_schema() { ...@@ -163,7 +163,7 @@ function block_schema() {
); );
$schema['cache_block'] = drupal_get_schema_unprocessed('system', 'cache'); $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; return $schema;
} }
...@@ -23,28 +23,28 @@ function blogapi_uninstall() { ...@@ -23,28 +23,28 @@ function blogapi_uninstall() {
*/ */
function blogapi_schema() { function blogapi_schema() {
$schema['blogapi_files'] = array( $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( 'fields' => array(
'fid' => array( 'fid' => array(
'description' => t('Primary Key: Unique file ID.'), 'description' => 'Primary Key: Unique file ID.',
'type' => 'serial', 'type' => 'serial',
), ),
'uid' => array( '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', 'type' => 'int',
'unsigned' => TRUE, 'unsigned' => TRUE,
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, 'default' => 0,
), ),
'filepath' => array( 'filepath' => array(
'description' => t('Path of the file relative to Drupal root.'), 'description' => 'Path of the file relative to Drupal root.',
'type' => 'varchar', 'type' => 'varchar',
'length' => 255, 'length' => 255,
'not null' => TRUE, 'not null' => TRUE,
'default' => '', 'default' => '',
), ),
'filesize' => array( 'filesize' => array(
'description' => t('The size of the file in bytes.'), 'description' => 'The size of the file in bytes.',
'type' => 'int', 'type' => 'int',
'unsigned' => TRUE, 'unsigned' => TRUE,
'not null' => TRUE, 'not null' => TRUE,
......
...@@ -251,28 +251,28 @@ function book_update_6000() { ...@@ -251,28 +251,28 @@ function book_update_6000() {
*/ */
function book_schema() { function book_schema() {
$schema['book'] = array( $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( 'fields' => array(
'mlid' => array( 'mlid' => array(
'type' => 'int', 'type' => 'int',
'unsigned' => TRUE, 'unsigned' => TRUE,
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, 'default' => 0,
'description' => t("The book page's {menu_links}.mlid."), 'description' => "The book page's {menu_links}.mlid.",
), ),
'nid' => array( 'nid' => array(
'type' => 'int', 'type' => 'int',
'unsigned' => TRUE, 'unsigned' => TRUE,
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, 'default' => 0,
'description' => t("The book page's {node}.nid."), 'description' => "The book page's {node}.nid.",
), ),
'bid' => array( 'bid' => array(
'type' => 'int', 'type' => 'int',
'unsigned' => TRUE, 'unsigned' => TRUE,
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, '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'), 'primary key' => array('mlid'),
......
...@@ -118,56 +118,56 @@ function comment_update_7001() { ...@@ -118,56 +118,56 @@ function comment_update_7001() {
*/ */
function comment_schema() { function comment_schema() {
$schema['comments'] = array( $schema['comments'] = array(
'description' => t('Stores comments and associated data.'), 'description' => 'Stores comments and associated data.',
'fields' => array( 'fields' => array(
'cid' => array( 'cid' => array(
'type' => 'serial', 'type' => 'serial',
'not null' => TRUE, 'not null' => TRUE,
'description' => t('Primary Key: Unique comment ID.'), 'description' => 'Primary Key: Unique comment ID.',
), ),
'pid' => array( 'pid' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, '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( 'nid' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, '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( 'uid' => array(
'type' => 'int', 'type' => 'int',
'not null' => TRUE, 'not null' => TRUE,
'default' => 0, '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( 'subject' => array(
'type' => 'varchar', 'type' => 'varchar',
'length' => 64, 'length' => 64,
'not null' => TRUE, 'not null' => TRUE,
'default' => '', 'default' => '',
'description' => t('The comment title.'), 'description' => 'The comment title.',
), ),
'comment' => array( 'comment' => array(
'type' => 'text', 'type' => 'text',
'not null' => TRUE, 'not null' => TRUE,
'size' => 'big', 'size' => 'big',
'description' => t('The comment body.'), 'description' => 'The comment body.',
), ),
'hostname' => array( 'hostname' => array(
'type' => 'varchar',