Commit ddabf7ba authored by KarenS's avatar KarenS

#218973 Follow up to cvs re-organization, rename files and file paths in code.

parent b41536bd
......@@ -68,15 +68,15 @@ function content_flush_caches() {
* Implementation of hook_init().
*/
function content_init() {
drupal_add_css(drupal_get_path('module', 'content') .'/content.css');
drupal_add_css(drupal_get_path('module', 'content') .'/theme/content.css');
if (module_exists('views')) {
module_load_include('inc', 'content', 'content_views');
module_load_include('inc', 'content', 'includes/content.views');
}
if (module_exists('token') && !function_exists('content_token_values')) {
module_load_include('inc', 'content', 'content.token');
module_load_include('inc', 'content', 'includes/content.token');
}
if (module_exists('diff') && !function_exists('content_diff')) {
module_load_include('inc', 'content', 'content.diff');
module_load_include('inc', 'content', 'includes/content.diff');
}
if (content_menu_needs_rebuild()) {
content_clear_type_cache(TRUE);
......@@ -116,7 +116,7 @@ function content_menu() {
'title' => 'Fields',
'page callback' => '_content_admin_type_fields',
'access arguments' => array('administer content types'),
'file' => 'content_admin.inc',
'file' => 'includes/content.admin.inc',
'type' => MENU_LOCAL_TASK,
);
// Callback for AHAH add more buttons.
......@@ -124,7 +124,7 @@ function content_menu() {
'page callback' => 'content_add_more_js',
// TODO : access rule ?
'access arguments' => array('access content'),
'file' => 'content_node_form.inc',
'file' => 'includes/content.node_form.inc',
'type' => MENU_CALLBACK,
);
......@@ -141,7 +141,7 @@ function content_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('content_admin_field_overview_form', $type_name),
'access arguments' => array('administer content types'),
'file' => 'content_admin.inc',
'file' => 'includes/content.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 1,
);
......@@ -150,7 +150,7 @@ function content_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('content_admin_display_overview_form', $type_name),
'access arguments' => array('administer content types'),
'file' => 'content_admin.inc',
'file' => 'includes/content.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 2,
);
......@@ -172,7 +172,7 @@ function content_menu() {
'page callback' => '_content_admin_field_add',
'page arguments' => array($type_name),
'access arguments' => array('administer content types'),
'file' => 'content_admin.inc',
'file' => 'includes/content.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 3,
);
......@@ -183,7 +183,7 @@ function content_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('_content_admin_field', $type_name, $field_name),
'access arguments' => array('administer content types'),
'file' => 'content_admin.inc',
'file' => 'includes/content.admin.inc',
'type' => MENU_LOCAL_TASK,
);
$items['admin/content/node-type/'. $type_url_str .'/fields/'. $field_name .'/remove'] = array(
......@@ -191,7 +191,7 @@ function content_menu() {
'page callback' => 'drupal_get_form',
'page arguments' => array('_content_admin_field_remove', $type_name, $field_name),
'access arguments' => array('administer content types'),
'file' => 'content_admin.inc',
'file' => 'includes/content.admin.inc',
'type' => MENU_CALLBACK,
);
}
......@@ -432,7 +432,7 @@ function content_nodeapi(&$node, $op, $teaser, $page) {
*/
function content_form_alter(&$form, $form_state, $form_id) {
if (isset($form['type']) && isset($form['#node']) && $form['type']['#value'] .'_node_form' == $form_id) {
module_load_include('inc', 'content', 'content_node_form');
module_load_include('inc', 'content', 'includes/content.node_form');
// Merge field widgets.
$form = array_merge($form, content_form($form, $form_state));
// Adjust weights for non-CCK fields.
......@@ -528,7 +528,7 @@ function content_notify($op, $module) {
content_clear_type_cache();
break;
case 'uninstall':
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
content_module_delete($module);
content_clear_type_cache(TRUE);
break;
......@@ -1286,7 +1286,7 @@ function _content_type_info($reset = FALSE) {
}
// Populate actual field instances.
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
foreach (node_get_types() as $type_name => $data) {
$type = (array) $data;
$type['url_str'] = str_replace('_', '-', $type['type']);
......@@ -1329,15 +1329,15 @@ function _content_type_info($reset = FALSE) {
function content_node_type($op, $info) {
switch ($op) {
case 'insert':
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
content_type_create($info);
break;
case 'update':
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
content_type_update($info);
break;
case 'delete':
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
content_type_delete($info);
break;
}
......@@ -1405,7 +1405,7 @@ function content_storage_type($field) {
return CONTENT_DB_STORAGE_PER_FIELD;
}
else {
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
$instances = content_field_instance_read(array('field_name' => $field['field_name']));
if (count($instances) > 1) {
return CONTENT_DB_STORAGE_PER_FIELD;
......
......@@ -393,7 +393,7 @@ function theme_content_admin_display_overview_form($form) {
* Submit handler for the display overview form.
*/
function content_admin_display_overview_form_submit($form, &$form_state) {
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
$form_values = $form_state['values'];
$fields = content_fields();
foreach ($form_values as $key => $values) {
......@@ -531,7 +531,7 @@ function theme_content_admin_field_add_new_field_widget_type($form) {
* Add an existing field to a content type.
*/
function _content_admin_field_add_existing_submit($form, &$form_state) {
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
$form_values = $form_state['values'];
if (content_field_instance_create($form_values)) {
......@@ -570,7 +570,7 @@ function _content_admin_field_add_new_validate($form, &$form_state) {
* Create a new field for a content type.
*/
function _content_admin_field_add_new_submit($form, &$form_state) {
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
$form_values = $form_state['values'];
$field_widget_type = explode('-', $form_values['field_widget_type']);
......@@ -624,7 +624,7 @@ function _content_admin_field_remove(&$form_state, $type_name, $field_name) {
* Remove a field from a content type.
*/
function _content_admin_field_remove_submit($form, &$form_state) {
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
$form_values = $form_state['values'];
$type = content_types($form_values['type_name']);
......@@ -722,7 +722,7 @@ function _content_admin_field(&$form_state, $type_name, $field_name) {
// Make sure the default value is not a required field.
$widget_field = $field;
$widget_field['required'] = FALSE;
module_load_include('inc', 'content', 'content_node_form');
module_load_include('inc', 'content', 'includes/content_node_form');
$form_element = content_field_form($widget_form, $widget_form_state, $widget_field, 0);
$form['widget']['default_value_fieldset']['default_value_widget'] = $form_element;
$form['widget']['default_value_fieldset']['default_value_widget']['#tree'] = TRUE;
......@@ -824,7 +824,7 @@ function _content_admin_field(&$form_state, $type_name, $field_name) {
* Validate a field's settings.
*/
function _content_admin_field_validate($form, &$form_state) {
include_once('./'. drupal_get_path('module', 'content') .'/content_crud.inc');
include_once('./'. drupal_get_path('module', 'content') .'/includes/content.crud.inc');
$form_values = $form_state['values'];
$previous_field = unserialize($form_values['previous_field']);
$field = content_field_instance_expand($form_values);
......@@ -929,7 +929,7 @@ function _content_admin_field_validate($form, &$form_state) {
* Save a field's settings after editing.
*/
function _content_admin_field_submit($form, &$form_state) {
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
$form_values = $form_state['values'];
// If the widget type has changed, update the widget module, too.
......@@ -1249,7 +1249,7 @@ function content_alter_fields($previous_field, $new_field) {
'finished' => '_content_alter_fields_finished',
'title' => t('Processing'),
'error_message' => t('The update has encountered an error.'),
'file' => './'. drupal_get_path('module', 'content') .'/content_admin.inc',
'file' => './'. drupal_get_path('module', 'content') .'/includes/content.admin.inc',
);
batch_set($batch);
if (!empty($url)) {
......
......@@ -191,7 +191,7 @@ function content_field_instance_collapse($field) {
* - widget_type, the type of widget to use
*/
function content_field_instance_create($field) {
include_once('./'. drupal_get_path('module', 'content') .'/content_admin.inc');
include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
$form_values = $field;
$field = content_field_instance_expand($field);
......@@ -284,7 +284,7 @@ function content_field_instance_create($field) {
* array of form values.
*/
function content_field_instance_update($field) {
include_once('./'. drupal_get_path('module', 'content') .'/content_admin.inc');
include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
// Get the previous value from the table.
$previous = content_field_instance_read(array('field_name' => $field['field_name'], 'type_name' => $field['type_name']));
......@@ -473,7 +473,7 @@ function content_field_instance_read($param = NULL) {
* Delete an existing field instance.
*/
function content_field_instance_delete($field_name, $type_name) {
include_once('./'. drupal_get_path('module', 'content') .'/content_admin.inc');
include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
// Get the previous field value.
$field = array_pop(content_field_instance_read(array('field_name' => $field_name, 'type_name' => $type_name)));
......
......@@ -57,7 +57,7 @@ function content_copy_menu() {
* A form to export field definitions.
*/
function content_copy_export_form(&$form_state) {
include_once('./'. drupal_get_path('module', 'content') .'/content_admin.inc');
include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
include_once('./'. drupal_get_path('module', 'node') .'/content_types.inc');
$form_values = isset($form_state['values']) ? $form_state['values'] : array();
......@@ -180,8 +180,8 @@ function content_copy_export($form_values) {
module_load_include('inc', 'node', 'content_types');
drupal_execute('node_type_form', $node_state, node_get_types('type', $form_values['type_name']));
module_load_include('inc', 'content', 'content_admin');
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.admin');
module_load_include('inc', 'content', 'includes/content.crud');
// Get an array of groups to export.
// Record a macro for each group by submitting the group edit form.
......@@ -221,7 +221,7 @@ function content_copy_export($form_values) {
* A form to import formatted text created with export.
*/
function content_copy_import_form(&$form_state, $type_name = '') {
include_once('./'. drupal_get_path('module', 'content') .'/content_admin.inc');
include_once('./'. drupal_get_path('module', 'content') .'/includes/content.admin.inc');
include_once('./'. drupal_get_path('module', 'node') .'/content_types.inc');
$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.');
......@@ -271,7 +271,7 @@ function content_copy_import_form_submit($form, &$form_state) {
return;
}
module_load_include('inc', 'content', 'content_crud');
module_load_include('inc', 'content', 'includes/content.crud');
// Get all type and field info for this database.
$content_info = _content_type_info();
......@@ -342,7 +342,7 @@ function content_copy_import_form_submit($form, &$form_state) {
$node_state = array('values' => array('type_name' => $imported_type_name));
// There's no API for creating node types, we still have to use drupal_execute().
module_load_include('inc', 'node', 'content_types');
module_load_include('inc', 'node', 'includes/content_types');
drupal_execute('node_type_form', $node_state, $node);
// Reset type and database values once new type has been added.
......
......@@ -156,7 +156,7 @@ function fieldgroup_edit_group_form(&$form_state, $content_type, $group_name, $a
'#description' => t('A description of the group.'),
'#required' => FALSE,
);
module_load_include('inc', 'content', 'content_admin');
module_load_include('inc', 'content', 'includes/content.admin');
foreach (array_merge(array_keys(_content_admin_display_contexts(CONTENT_CONTEXTS_SIMPLE)), array('label')) as $key) {
$form['settings']['display'][$key] = array('#type' => 'value', '#value' => isset($group['settings']['display'][$key]) ? $group['settings']['display'][$key] : 'fieldset');
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment