? po/ru.po
Index: content.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content.module,v
retrieving revision 1.132
diff -u -r1.132 content.module
--- content.module	6 Jul 2007 12:30:50 -0000	1.132
+++ content.module	7 Jul 2007 00:44:08 -0000
@@ -32,15 +32,18 @@
  */
 function content_init() {
   drupal_add_css(drupal_get_path('module', 'content') .'/content.css');
-  if (arg(0) == 'admin') {
-    module_load_include('inc', 'content', 'content_admin');
-  }
-  if (module_exists('views')) {
-    module_load_include('inc', 'content', 'content_views');
-  }
-  if (module_exists('pathauto')) {
-    module_load_include('inc', 'content', 'content_pathauto');
-  }
+// This should not be needed anymore ?
+//  if (arg(0) == 'admin') {
+//    module_load_include('inc', 'content', 'content_admin');
+//  }
+
+// We should really get rid of those...
+//  if (module_exists('views')) {
+//    module_load_include('inc', 'content', 'content_views');
+//  }
+//  if (module_exists('pathauto')) {
+//    module_load_include('inc', 'content', 'content_pathauto');
+//  }
 }
 
 /**
@@ -52,6 +55,8 @@
     'title' => 'Fields',
     'page callback' => '_content_admin_type_fields',
     'access arguments' => array('administer content types'),
+    'file' => 'content_admin.inc',
+    'file path' => drupal_get_path('module', 'content'),
     'type' => MENU_LOCAL_TASK,
   );
   foreach (node_get_types() as $type) {
@@ -90,7 +95,7 @@
       'weight' => 2,
     );
     foreach ($content_type['fields'] as $field) {
-      $field_name = $field['name'];
+      $field_name = $field['field_name'];
       $items['admin/content/types/'. $type_url_str .'/fields/'. $field_name] = array(
         'title' => $field['widget']['label'],
         'page callback' => 'drupal_get_form',
Index: content_admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content_admin.inc,v
retrieving revision 1.68
diff -u -r1.68 content_admin.inc
--- content_admin.inc	6 Jul 2007 12:30:50 -0000	1.68
+++ content_admin.inc	7 Jul 2007 00:42:44 -0000
@@ -42,7 +42,7 @@
  * and displays other form elements and their weights to make it
  * easier to place CCK fields in the form and see where they will appear.
  */
-function content_admin_field_overview_form($type_name) {
+function content_admin_field_overview_form(&$form_state, $type_name) {
   $form = array();
 
   $type = content_types($type_name);
@@ -58,7 +58,7 @@
   $dummy_form = node_form($form_state, $dummy_form);
   foreach (module_implements('form_alter') as $module) {
     $function = $module .'_form_alter';
-    $function($dummy_form, $form_state);
+    $function($dummy_form, $form_state, $dummy_form['#id']);
   }
 
   // Move group fields into a 'fields' subgroup to make them easier to identify.
@@ -346,7 +346,7 @@
  * Form includes form widgets to select which fields appear for teaser, full node...
  * and how the field labels should be rendered
  */
-function content_admin_display_overview_form($type_name) {
+function content_admin_display_overview_form(&$form_state, $type_name) {
   $type = content_types($type_name);
   $field_types = _content_field_types();
 
@@ -463,7 +463,7 @@
   return $output;
 }
 
-function _content_admin_field_add_existing($type_name) {
+function _content_admin_field_add_existing(&$form_state, $type_name) {
   $output = '';
   $type = content_types($type_name);
   $fields = content_fields();
@@ -496,7 +496,7 @@
   return $form;
 }
 
-function _content_admin_field_add_new($type_name, $new_field_name = '') {
+function _content_admin_field_add_new(&$form_state, $type_name, $new_field_name = '') {
   $field_types = _content_field_types();
   $widget_types = _content_widget_types();
   $form = array();
@@ -660,6 +660,7 @@
   db_query("INSERT INTO {node_field_instance} (field_name, type_name, weight, label, widget_type, widget_settings, display_settings, description) VALUES ('%s', '%s', %d, '%s', '%s', '%s', '%s', '%s')", $field_name, $form_values['type_name'], 0, $form_values['label'], $field_widget_type[1], serialize(array()), serialize(array()), '');
 
   content_clear_type_cache();
+  menu_rebuild();
 
   // Create new database columns as necessary.
   $field_types = _content_field_types();
@@ -679,7 +680,7 @@
 /**
  * Menu callback; present a form for removing a field from a content type.
  */
-function _content_admin_field_remove($type_name, $field_name) {
+function _content_admin_field_remove(&$form_state, $type_name, $field_name) {
   $type = content_types($type_name);
   $field = $type['fields'][$field_name];
 
@@ -726,7 +727,7 @@
 /**
  * Menu callback; presents the field editing page.
  */
-function _content_admin_field($type_name, $field_name) {
+function _content_admin_field(&$form_state, $type_name, $field_name) {
   $output = '';
 
   $type = content_types($type_name);
Index: content_copy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content_copy.module,v
retrieving revision 1.7
diff -u -r1.7 content_copy.module
--- content_copy.module	30 Mar 2007 15:18:46 -0000	1.7
+++ content_copy.module	7 Jul 2007 00:41:28 -0000
@@ -49,9 +49,9 @@
 /**
  *  A form to export field definitions.
  */
-function content_copy_export_form($form_values = NULL) {
-
-  $step = intval($form_values['step'] + 1);
+function content_copy_export_form(&$form_state) {
+  $form_values = $form_state['values'];
+  $form_state['storage']['step'] = isset($form_state['storage']['step']) ? $form_state['storage']['step'] + 1 : 1;
 
   $type_name = $form_values['type_name'];
   $types  = content_copy_types();
@@ -67,14 +67,7 @@
     $step = 3;
   }
 
-  $form['step'] = array(
-    '#type' => 'hidden',
-    '#value' => $step,
-  );
-
   $form['#prefix'] = t('This form will process a content type and one or more fields from that type and export the settings. The export created by this process can be copied and pasted as an import into the current or any other database. The import will add the fields to into an existing content type or create a new content type that includes the selected fields.');
-  $form['#multistep'] = TRUE;
-  $form['#redirect'] = FALSE;
 
   switch ($step) {
 
@@ -203,7 +196,7 @@
 /**
  *  A form to import formatted text created with export.
  */
-function content_copy_import_form($type_name = '') {
+function content_copy_import_form(&$form_state, $type_name = '') {
 
   $form['#prefix'] = t('This form will import field definitions exported from another content type or another database.<br/>Note that fields cannot be duplicated within the same content type, so imported fields will be added only if they do not already exist in the selected type.');
   $form['type_name'] = array(
@@ -233,7 +226,8 @@
  *     1) add new field to the database
  *     2) execute the imported field macro to update the settings to the imported values
  */
-function content_copy_import_form_submit($form_id, $form_values) {
+function content_copy_import_form_submit($form, &$form_state) {
+  $form_values = $form_state['values'];
 
   // Get the content type we are importing into.
   $type_name = $form_values['type_name'];
@@ -438,7 +432,7 @@
 function content_copy_form_alter(&$form, $form_id) {
   $alter_forms = array('node_type_form', '_content_admin_field', 'fieldgroup_edit_group_form');
   if ($GLOBALS['content_copy']['status'] == 'export' && in_array($form_id, $alter_forms)) {
-    $form['#submit'] = array('content_copy_record_macro' => array($form));
+    $form['#submit'][] = 'content_copy_record_macro';
   }
 }
 
Index: fieldgroup.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/fieldgroup.module,v
retrieving revision 1.32
diff -u -r1.32 fieldgroup.module
--- fieldgroup.module	6 Jul 2007 12:30:50 -0000	1.32
+++ fieldgroup.module	7 Jul 2007 00:40:35 -0000
@@ -23,15 +23,15 @@
     $items['admin/content/types/'. $type_url_str .'/add_group'] = array(
       'title' => 'Add group',
       'page callback' => 'drupal_get_form',
-      'page arguments' => array($content_type, '', 'add'),
+      'page arguments' => array('fieldgroup_edit_group_form', $content_type, '', 'add'),
       'access arguments' => array('administer content types'),
       'type' => MENU_LOCAL_TASK,
       'weight' => 3,
     );
     $items['admin/content/types/'. $type_url_str .'/groups/%/edit'] = array(
       'title' => 'Edit group',
-      'page callback' => 'fieldgroup_edit_group',
-      'page arguments' => array($content_type, 5, 'edit'),
+      'page callback' => 'drupal_get_form',
+      'page arguments' => array('fieldgroup_edit_group_form', $content_type, 5, 'edit'),
       'access arguments' => array('administer content types'),
       'type' => MENU_CALLBACK,
     );
@@ -60,11 +60,7 @@
   );
 }
 
-function fieldgroup_edit_group($content_type, $group_name, $action) {
-  return drupal_get_form('fieldgroup_edit_group_form', $content_type, $group_name, $action);
-}
-
-function fieldgroup_edit_group_form($content_type, $group_name, $action) {
+function fieldgroup_edit_group_form(&$form_state, $content_type, $group_name, $action) {
   $groups = fieldgroup_groups($content_type['type']);
   $group = $groups[$group_name];
 
@@ -220,7 +216,7 @@
   }
 }
 
-function fieldgroup_remove_group($content_type, $group_name) {
+function fieldgroup_remove_group(&$form_state, $content_type, $group_name) {
   $groups = fieldgroup_groups($content_type['type']);
   $group = $groups[$group_name];
 
