Index: ctools.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/ctools.info,v
retrieving revision 1.4
diff -u -p -r1.4 ctools.info
--- ctools.info 27 Sep 2009 03:41:00 -0000 1.4
+++ ctools.info 4 Oct 2009 16:57:25 -0000
@@ -2,4 +2,27 @@
name = Chaos tools
description = A library of helpful tools by Merlin of Chaos.
core = 7.x
-package = Chaos tool suite
\ No newline at end of file
+package = Chaos tool suite
+files[] = ctools.module
+files[] = includes/ajax.inc
+files[] = includes/collapsible.theme.inc
+files[] = includes/content.inc
+files[] = includes/content.menu.inc
+files[] = includes/content.theme.inc
+files[] = includes/context-access-admin.inc
+files[] = includes/context-admin.inc
+files[] = includes/context-task-handler.inc
+files[] = includes/context.inc
+files[] = includes/context.menu.inc
+files[] = includes/context.theme.inc
+files[] = includes/css.inc
+files[] = includes/dependent.inc
+files[] = includes/dropdown.theme.inc
+files[] = includes/export.inc
+files[] = includes/form.inc
+files[] = includes/menu.inc
+files[] = includes/modal.inc
+files[] = includes/object-cache.inc
+files[] = includes/plugins.inc
+files[] = includes/wizard.inc
+files[] = includes/wizard.theme.inc
Index: ctools.install
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/ctools.install,v
retrieving revision 1.12
diff -u -p -r1.12 ctools.install
--- ctools.install 16 Aug 2009 21:59:42 -0000 1.12
+++ ctools.install 4 Oct 2009 17:02:39 -0000
@@ -13,22 +13,15 @@
function ctools_requirements($phase) {
$requirements = array();
if ($phase == 'runtime') {
- $path = file_create_path('ctools/css');
- if (!file_check_directory($path)) {
- $path = file_directory_path() . '/ctools';
- file_check_directory($path, FILE_CREATE_DIRECTORY);
- $path .= '/css';
- file_check_directory($path, FILE_CREATE_DIRECTORY);
- }
-
$requirements['ctools_css_cache'] = array(
'title' => t('CTools CSS Cache'),
'severity' => REQUIREMENT_OK,
'value' => t('Exists'),
);
- if (!file_check_directory($path)) {
- $requirements['ctools_css_cache']['description'] = t('The CTools CSS cache directory, %path could not be created due to a misconfigured files directory. Please ensure that the files directory is correctly configured and that the webserver has permission to create directories.', array('%path' => $path));
+ $path = 'public://ctools/css';
+ if (!file_prepare_directory($path, FILE_CREATE_DIRECTORY)) {
+ $requirements['ctools_css_cache']['description'] = t('The CTools CSS cache directory, %path could not be created due to a misconfigured files directory. Please ensure that the files directory is correctly configured and that the webserver has permission to create directories.', array('%path' => file_uri_target($path)));
$requirements['ctools_css_cache']['severity'] = REQUIREMENT_ERROR;
$requirements['ctools_css_cache']['value'] = t('Unable to create');
}
@@ -38,20 +31,6 @@ function ctools_requirements($phase) {
}
/**
- * Implementation of hook_install()
- */
-function ctools_install() {
- drupal_install_schema('ctools');
-}
-
-/**
- * Implementation of hook_uninstall()
- */
-function ctools_uninstall() {
- drupal_uninstall_schema('ctools');
-}
-
-/**
* Implementation of hook_schemea
*/
function ctools_schema() {
Index: ctools.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/ctools.module,v
retrieving revision 1.28
diff -u -p -r1.28 ctools.module
--- ctools.module 27 Sep 2009 03:41:00 -0000 1.28
+++ ctools.module 4 Oct 2009 17:10:44 -0000
@@ -226,13 +226,8 @@ function ctools_ctools_plugin_directory(
function ctools_get_roles() {
static $roles = NULL;
if (!isset($roles)) {
- $roles = array();
- $result = db_query("SELECT r.rid, r.name FROM {role} r ORDER BY r.name");
- while ($obj = db_fetch_object($result)) {
- $roles[$obj->rid] = $obj->name;
- }
+ $roles = db_query("SELECT r.rid, r.name FROM {role} r ORDER BY r.name")->fetchAllKeyed();
}
-
return $roles;
}
Index: bulk_export/bulk_export.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/bulk_export/bulk_export.info,v
retrieving revision 1.2
diff -u -p -r1.2 bulk_export.info
--- bulk_export/bulk_export.info 12 Jul 2009 18:11:58 -0000 1.2
+++ bulk_export/bulk_export.info 4 Oct 2009 17:15:08 -0000
@@ -1,6 +1,7 @@
; $Id: bulk_export.info,v 1.2 2009/07/12 18:11:58 merlinofchaos Exp $
name = Bulk Export
description = Performs bulk exporting of data objects known about by Chaos tools.
-core = 6.x
+core = 7.x
dependencies[] = ctools
-package = Chaos tool suite
\ No newline at end of file
+package = Chaos tool suite
+files[] = bulk_export.module
Index: bulk_export/bulk_export.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/bulk_export/bulk_export.module,v
retrieving revision 1.3
diff -u -p -r1.3 bulk_export.module
--- bulk_export/bulk_export.module 22 Jul 2009 21:12:07 -0000 1.3
+++ bulk_export/bulk_export.module 4 Oct 2009 17:18:31 -0000
@@ -9,15 +9,21 @@
/**
* Implementation of hook_perm().
*/
-function bulk_export_perm() {
- return array('use bulk exporter');
+function bulk_export_permission() {
+ return array(
+ 'use bulk exporter' => array(
+ 'title' => t('Access Bulk Exporter'),
+ 'description' => t('Export various system objects into code.'),
+ ),
+ );
}
/**
* Implementation of hook_theme().
*/
function bulk_export_theme() {
- return array('bulk_export_export_form' => array(
+ return array(
+ 'bulk_export_export_form' => array(
'arguments' => array('form' => NULL),
),
);
@@ -56,14 +62,13 @@ function bulk_export_export() {
}
}
if ($exportables) {
- ctools_include('form');
$form_state = array(
're_render' => FALSE,
'no_redirect' => TRUE,
'exportables' => $exportables,
'export_tables' => $export_tables,
);
- $output = ctools_build_form('bulk_export_export_form', $form_state);
+ $output = drupal_build_form('bulk_export_export_form', $form_state);
if (!$output) {
drupal_set_title(t('Bulk export results'));
$output = '';
@@ -138,8 +143,7 @@ function bulk_export_export() {
* FAPI definition for the bulk exporter form.
*
*/
-function bulk_export_export_form(&$form_state) {
- $form = array();
+function bulk_export_export_form($form, &$form_state) {
$form['tables'] = array(
'#prefix' => '
',
'#suffix' => '
',
Index: delegator/delegator.admin.inc
===================================================================
RCS file: delegator/delegator.admin.inc
diff -N delegator/delegator.admin.inc
Index: delegator/delegator.module
===================================================================
RCS file: delegator/delegator.module
diff -N delegator/delegator.module
Index: includes/ajax.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/ajax.inc,v
retrieving revision 1.15
diff -u -p -r1.15 ajax.inc
--- includes/ajax.inc 27 Sep 2009 03:41:01 -0000 1.15
+++ includes/ajax.inc 4 Oct 2009 18:01:11 -0000
@@ -44,7 +44,7 @@ function ctools_ajax_image_button($image
* to use-ajax.
*/
function ctools_ajax_text_button($text, $dest, $alt, $class = '', $type = 'use-ajax') {
- return l($text, $dest, array('html' => TRUE, 'attributes' => array('class' => "$type $class", 'title' => $alt)));
+ return l($text, $dest, array('html' => TRUE, 'attributes' => array('class' => array($type, $class), 'title' => $alt)));
}
/**
@@ -125,13 +125,13 @@ function ctools_ajax_associate_url_to_el
//Create a unique ID to associate $form_element and hidden elements since we dont have an ID
$form_element['#id'] = uniqid('ctools-ajax-url-');
- $form_element['#attributes']['class'] = $type;
+ $form_element['#attributes']['class'] = array($type);
}
//Add hidden form element to hold base URL
$form[$form_element['#id'] . '-url'] = array(
'#type' => 'hidden',
'#value' => $dest,
- '#attributes' => array('class' => $form_element['#id'] . '-url'),
+ '#attributes' => array('class' => array($form_element['#id'] . '-url')),
);
}
Index: includes/content.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/content.inc,v
retrieving revision 1.12
diff -u -p -r1.12 content.inc
--- includes/content.inc 19 Aug 2009 23:21:55 -0000 1.12
+++ includes/content.inc 4 Oct 2009 17:34:32 -0000
@@ -298,7 +298,7 @@ function ctools_content_render($type, $s
$url = $content->title_link;
}
// set defaults so we don't bring up notices
- $url += array('href' => '', 'attributes' => NULL, 'query' => NULL, 'fragment' => NULL, 'absolute' => NULL, 'html' => TRUE);
+ $url += array('href' => '', 'attributes' => array(), 'query' => array(), 'fragment' => '', 'absolute' => NULL, 'html' => TRUE);
$content->title = l($content->title, $url['href'], $url);
}
}
@@ -419,7 +419,7 @@ function ctools_content_admin_info($type
if (empty($output) || !is_object($output)) {
$output = new stdClass();
$output->title = t('No info');
- $output->content =t ('No info available.');
+ $output->content = t('No info available.');
}
return $output;
}
Index: includes/content.menu.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/content.menu.inc,v
retrieving revision 1.3
diff -u -p -r1.3 content.menu.inc
--- includes/content.menu.inc 27 Sep 2009 03:41:01 -0000 1.3
+++ includes/content.menu.inc 4 Oct 2009 17:43:24 -0000
@@ -31,20 +31,20 @@ function ctools_content_autocomplete_nod
$match = preg_match('/^nid: (\d+)/', $string, $preg_matches);
}
if ($match) {
- $arg = $preg_matches[1];
- $where = "n.nid = %d";
+ $arg = array(':nid' => $preg_matches[1]);
+ $where = "n.nid = :nid";
}
else {
- $arg = $string;
- $where = "LOWER(n.title) LIKE LOWER('%%%s%%')";
+ $arg = array(':title' => '%' . $string . '%');
+ $where = "LOWER(n.title) LIKE LOWER(:title)";
}
- $result = db_query_range("SELECT n.nid, n.title, u.name FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE $where", $arg, 0, 10);
+ $result = db_query_range("SELECT n.nid, n.title, u.name FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE $where", 0, 10, $arg);
$matches = array();
- while ($node = db_fetch_object($result)) {
+ foreach ($result as $node) {
$name = empty($node->name) ? variable_get('anonymous', t('Anonymous')) : check_plain($node->name);
$matches[$node->title . " [nid: $node->nid]"] = '' . check_plain($node->title) . ' (' . t('by @user', array('@user' => $name)) . ')';
}
- drupal_json($matches);
+ drupal_json_output($matches);
}
}
Index: includes/context-access-admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/context-access-admin.inc,v
retrieving revision 1.8
diff -u -p -r1.8 context-access-admin.inc
--- includes/context-access-admin.inc 27 Sep 2009 03:41:01 -0000 1.8
+++ includes/context-access-admin.inc 7 Oct 2009 21:21:49 -0000
@@ -113,7 +113,7 @@
/**
* Administrative form for access control.
*/
-function ctools_access_admin_form(&$form_state) {
+function ctools_access_admin_form($form, &$form_state) {
ctools_include('context');
$argument = isset($form_state['callback argument']) ? $form_state['callback argument'] : '';
$fragment = $form_state['module'];
@@ -132,7 +132,7 @@ function ctools_access_admin_form(&$form
);
// This sets up the URL for the add access modal.
$form['add-button']['add-url'] = array(
- '#attributes' => array('class' => "ctools-access-add-url"),
+ '#attributes' => array('class' => array("ctools-access-add-url")),
'#type' => 'hidden',
'#value' => url("ctools/context/ajax/access/add/$fragment", array('absolute' => TRUE)),
);
@@ -147,14 +147,14 @@ function ctools_access_admin_form(&$form
$form['add-button']['type'] = array(
// This ensures that the form item is added to the URL.
- '#attributes' => array('class' => "ctools-access-add-url"),
+ '#attributes' => array('class' => array("ctools-access-add-url")),
'#type' => 'select',
'#options' => $options,
);
$form['add-button']['add'] = array(
'#type' => 'submit',
- '#attributes' => array('class' => 'ctools-use-modal'),
+ '#attributes' => array('class' => array('ctools-use-modal')),
'#id' => "ctools-access-add",
'#value' => t('Add'),
);
@@ -197,23 +197,23 @@ function ctools_access_admin_render_tabl
$plugin = ctools_get_access_plugin($test['name']);
$title = isset($plugin['title']) ? $plugin['title'] : t('Broken/missing access plugin %plugin', array('%plugin' => $test['name']));
- $row[] = array('data' => $title, 'class' => 'ctools-access-title');
+ $row[] = array('data' => $title, 'class' => array('ctools-access-title'));
$description = ctools_access_summary($plugin, $contexts, $test);
- $row[] = array('data' => $description, 'class' => 'ctools-access-description');
+ $row[] = array('data' => $description, 'class' => array('ctools-access-description'));
$operations = ctools_modal_image_button(ctools_image_path('icon-configure.png'), "ctools/context/ajax/access/configure/$fragment/$id", t('Configure settings for this item.'));
$operations .= ctools_ajax_image_button(ctools_image_path('icon-delete.png'), "ctools/context/ajax/access/delete/$fragment/$id", t('Remove this item.'));
- $row[] = array('data' => $operations, 'class' => 'ctools-access-operations', 'align' => 'right');
+ $row[] = array('data' => $operations, 'class' => array('ctools-access-operations'), 'align' => 'right');
$rows[] = $row;
}
$header = array(
- array('data' => t('Title'), 'class' => 'ctools-access-title'),
- array('data' => t('Description'), 'class' => 'ctools-access-description'),
- array('data' => '', 'class' => 'ctools-access-operations', 'align' => 'right'),
+ array('data' => t('Title'), 'class' => array('ctools-access-title')),
+ array('data' => t('Description'), 'class' => array('ctools-access-description')),
+ array('data' => '', 'class' => array('ctools-access-operations'), 'align' => 'right'),
);
if (empty($rows)) {
@@ -387,7 +387,7 @@ function ctools_access_ajax_edit($fragme
/**
* From to edit the settings of an access test.
*/
-function ctools_access_ajax_edit_item(&$form_state) {
+function ctools_access_ajax_edit_item($form, &$form_state) {
$test = &$form_state['test'];
$plugin = &$form_state['plugin'];
@@ -411,7 +411,7 @@ function ctools_access_ajax_edit_item(&$
/**
* Validate handler for argument settings.
*/
-function ctools_access_ajax_edit_item_validate(&$form, &$form_state) {
+function ctools_access_ajax_edit_item_validate($form, &$form_state) {
if ($function = ctools_plugin_get_function($form_state['plugin'], 'settings form validate')) {
$function($form, $form_state);
}
@@ -420,7 +420,7 @@ function ctools_access_ajax_edit_item_va
/**
* Submit handler for argument settings.
*/
-function ctools_access_ajax_edit_item_submit(&$form, &$form_state) {
+function ctools_access_ajax_edit_item_submit($form, &$form_state) {
if ($function = ctools_plugin_get_function($form_state['plugin'], 'settings form submit')) {
$function($form, $form_state);
}
Index: includes/context-admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/context-admin.inc,v
retrieving revision 1.10
diff -u -p -r1.10 context-admin.inc
--- includes/context-admin.inc 27 Sep 2009 03:41:01 -0000 1.10
+++ includes/context-admin.inc 4 Oct 2009 18:02:38 -0000
@@ -288,21 +288,21 @@ function ctools_context_add_item_table_b
// The URL for this ajax button
$form['buttons'][$type]['add-url'] = array(
- '#attributes' => array('class' => "ctools-$type-add-url"),
+ '#attributes' => array('class' => array("ctools-$type-add-url")),
'#type' => 'hidden',
'#value' => url("ctools/context/ajax/add/$module/$type/$name", array('absolute' => TRUE)),
);
// This also will be in the URL.
$form['buttons'][$type]['item'] = array(
- '#attributes' => array('class' => "ctools-$type-add-url"),
+ '#attributes' => array('class' => array("ctools-$type-add-url")),
'#type' => 'select',
'#options' => $available_contexts,
);
$form['buttons'][$type]['add'] = array(
'#type' => 'submit',
- '#attributes' => array('class' => 'ctools-use-modal'),
+ '#attributes' => array('class' => array('ctools-use-modal')),
'#id' => "ctools-$type-add",
'#value' => $type_info['add button'],
);
@@ -327,7 +327,7 @@ function ctools_context_add_item_to_form
$form['position'] = array(
'#type' => 'weight',
'#default_value' => $position,
- '#attributes' => array('class' => 'drag-position'),
+ '#attributes' => array('class' => array('drag-position')),
);
}
Index: includes/context.theme.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/context.theme.inc,v
retrieving revision 1.7
diff -u -p -r1.7 context.theme.inc
--- includes/context.theme.inc 3 Aug 2009 21:41:41 -0000 1.7
+++ includes/context.theme.inc 4 Oct 2009 17:55:09 -0000
@@ -93,8 +93,8 @@ function theme_ctools_context_item_form(
if (!empty($form['buttons'])) {
// Display the add context item.
$row = array();
- $row[] = array('data' => drupal_render($form['buttons'][$type]['item']), 'class' => 'title');
- $row[] = array('data' => drupal_render($form['buttons'][$type]['add']), 'class' => 'add', 'width' => "60%");
+ $row[] = array('data' => drupal_render($form['buttons'][$type]['item']), 'class' => array('title'));
+ $row[] = array('data' => drupal_render($form['buttons'][$type]['add']), 'class' => array('add'), 'width' => "60%");
$output .= '