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 .= '
'; $output .= drupal_render($form['buttons'][$type]); $output .= theme('table', array(), array($row), array('id' => $type . '-add-table')); Index: includes/menu.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/menu.inc,v retrieving revision 1.4 diff -u -p -r1.4 menu.inc --- includes/menu.inc 12 Jul 2009 05:28:31 -0000 1.4 +++ includes/menu.inc 7 Oct 2009 23:25:21 -0000 @@ -145,32 +145,29 @@ function ctools_menu_tree_page_data($ite // Build and run the query, and build the tree. if ($item['access']) { // Check whether a menu link exists that corresponds to the current path. - $args = array($menu_name, $item['href']); - $placeholders = "'%s'"; + $args = array($item['href']); if (drupal_is_front_page()) { $args[] = ''; - $placeholders .= ", '%s'"; } - $parents = db_fetch_array(db_query("SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM {menu_links} WHERE menu_name = '%s' AND link_path IN (". $placeholders .")", $args)); + $parents = db_query("SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM {menu_links} WHERE menu_name = :menu_name AND link_path IN (:href)", array(':menu_name' => $menu_name, ':href' => $args))->fetchAll(PDO::FETCH_ASSOC); if (empty($parents)) { // If no link exists, we may be on a local task that's not in the links. // TODO: Handle the case like a local task on a specific node in the menu. - $parents = db_fetch_array(db_query("SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM {menu_links} WHERE menu_name = '%s' AND link_path = '%s'", $menu_name, $item['tab_root'])); + $parents = db_query("SELECT p1, p2, p3, p4, p5, p6, p7, p8 FROM {menu_links} WHERE menu_name = :menu_name AND link_path = :path", array(':menu_name' => $menu_name, ':path' => $item['tab_root']))->fetchAll(PDO::FETCH_ASSOC); } // We always want all the top-level links with plid == 0. $parents[] = '0'; // Use array_values() so that the indices are numeric for array_merge(). $args = $parents = array_unique(array_values($parents)); - $placeholders = implode(', ', array_fill(0, count($args), '%d')); $expanded = variable_get('menu_expanded', array()); // Check whether the current menu has any links set to be expanded. if (in_array($menu_name, $expanded)) { // Collect all the links set to be expanded, and then add all of // their children to the list as well. do { - $result = db_query("SELECT mlid FROM {menu_links} WHERE menu_name = '%s' AND expanded = 1 AND has_children = 1 AND plid IN (". $placeholders .') AND mlid NOT IN ('. $placeholders .')', array_merge(array($menu_name), $args, $args)); + $result = db_query('SELECT mlid FROM {menu_links} WHERE menu_name = :menu_name AND expanded = 1 AND has_children = 1 AND plid IN (:args) AND mlid NOT IN (:args)', array(':menu_name' => $menu_name, ':args' => $args))->fetchAll(PDO::FETCH_ASSOC); $num_rows = FALSE; while ($item = db_fetch_array($result)) { $args[] = $item['mlid']; Index: includes/object-cache.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/object-cache.inc,v retrieving revision 1.9 diff -u -p -r1.9 object-cache.inc --- includes/object-cache.inc 27 Sep 2009 03:41:01 -0000 1.9 +++ includes/object-cache.inc 8 Oct 2009 00:42:58 -0000 @@ -35,9 +35,9 @@ function ctools_object_cache_get($obj, $ } if (!array_key_exists($key, $cache)) { - $data = db_fetch_object(db_query("SELECT * FROM {ctools_object_cache} WHERE sid = '%s' AND obj = '%s' AND name = '%s'", session_id(), $obj, $name)); + $data = db_query("SELECT * FROM {ctools_object_cache} WHERE sid = :session_id AND obj = :object AND name = :name", array(':session_id' => session_id(), ':object' => $obj, ':name' => $name))->fetchObject(); if ($data) { - $cache[$key] = unserialize(db_decode_blob($data->data)); + $cache[$key] = unserialize($data->data); } } return isset($cache[$key]) ? $cache[$key] : NULL; @@ -56,7 +56,15 @@ function ctools_object_cache_get($obj, $ */ function ctools_object_cache_set($obj, $name, $cache) { ctools_object_cache_clear($obj, $name); - db_query("INSERT INTO {ctools_object_cache} (sid, obj, name, data, updated) VALUES ('%s', '%s', '%s', %b, %d)", session_id(), $obj, $name, serialize($cache), REQUEST_TIME); + db_insert('ctools_object_cache') + ->fields(array( + 'sid' => session_id(), + 'obj' => $obj, + 'name' => $name, + 'data' => serialize($cache), + 'updated' => REQUEST_TIME, + )) + ->execute(); } /** @@ -69,7 +77,11 @@ function ctools_object_cache_set($obj, $ * The name of the object being removed. */ function ctools_object_cache_clear($obj, $name) { - db_query("DELETE FROM {ctools_object_cache} WHERE sid = '%s' AND obj = '%s' AND name = '%s'", session_id(), $obj, $name); + db_delete('ctools_object_cache') + ->condition('sid', session_id()) + ->condition('obj', $obj) + ->condition('name', $name) + ->execute(); } Index: includes/wizard.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/wizard.inc,v retrieving revision 1.13 diff -u -p -r1.13 wizard.inc --- includes/wizard.inc 27 Sep 2009 03:41:01 -0000 1.13 +++ includes/wizard.inc 4 Oct 2009 18:04:45 -0000 @@ -218,7 +218,7 @@ function ctools_wizard_wrapper(&$form, & $button_attributes = array(); if (!empty($form_state['ajax']) && empty($form_state['modal'])) { - $button_attributes = array('class' => 'ctools-use-ajax'); + $button_attributes = array('class' => array('ctools-use-ajax')); } if (!empty($form_info['show back']) && isset($form_state['previous'])) { Index: page_manager/page_manager.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/page_manager/page_manager.admin.inc,v retrieving revision 1.28 diff -u -p -r1.28 page_manager.admin.inc --- page_manager/page_manager.admin.inc 27 Sep 2009 03:41:02 -0000 1.28 +++ page_manager/page_manager.admin.inc 4 Oct 2009 18:10:00 -0000 @@ -71,14 +71,14 @@ function page_manager_list_page($js = NU $form = ctools_build_form('page_manager_list_pages_form', $form_state); $header = array( - array('data' => t('Type'), 'class' => 'page-manager-page-type'), - array('data' => t('Name'), 'class' => 'page-manager-page-name'), - array('data' => t('Title'), 'class' => 'page-manager-page-title'), - array('data' => t('Path'), 'class' => 'page-manager-page-path'), - array('data' => t('Storage'), 'class' => 'page-manager-page-storage'), + array('data' => t('Type'), 'class' => array('page-manager-page-type')), + array('data' => t('Name'), 'class' => array('page-manager-page-name')), + array('data' => t('Title'), 'class' => array('page-manager-page-title')), + array('data' => t('Path'), 'class' => array('page-manager-page-path')), + array('data' => t('Storage'), 'class' => array('page-manager-page-storage')), ); - $header[] = array('data' => t('Operations'), 'class' => 'page-manager-page-operations'); + $header[] = array('data' => t('Operations'), 'class' => array('page-manager-page-operations')); $table = theme('table', $header, $pages['rows'], array('id' => 'page-manager-list-pages')); $operations = ''; @@ -120,13 +120,13 @@ function page_manager_get_pages($tasks, $task_name = $task['name']; } - $class = 'page-task-' . $id; + $class = array('page-task-' . $id); if (isset($task['row class'])) { - $class .= ' ' . $task['row class']; + $class[] = $task['row class']; } if (!empty($task['disabled'])) { - $class .= ' page-manager-disabled'; + $class[] = 'page-manager-disabled'; } $path = array(); @@ -148,15 +148,15 @@ function page_manager_get_pages($tasks, $type = isset($task['admin type']) ? $task['admin type'] : t('System'); $pages['types'][$type] = $type; - $row['data']['type'] = array('data' => $type, 'class' => 'page-manager-page-type'); + $row['data']['type'] = array('data' => $type, 'class' => array('page-manager-page-type')); - $row['data']['name'] = array('data' => $task_name, 'class' => 'page-manager-page-name'); - $row['data']['title'] = array('data' => $task['admin title'], 'class' => 'page-manager-page-title'); - $row['data']['path'] = array('data' => $visible_path, 'class' => 'page-manager-page-path'); + $row['data']['name'] = array('data' => $task_name, 'class' => array('page-manager-page-name')); + $row['data']['title'] = array('data' => $task['admin title'], 'class' => array('page-manager-page-title')); + $row['data']['path'] = array('data' => $visible_path, 'class' => array('page-manager-page-path')); $storage = isset($task['storage']) ? $task['storage'] : t('In code'); $pages['storages'][$storage] = $storage; - $row['data']['storage'] = array('data' => $storage, 'class' => 'page-manager-page-storage'); + $row['data']['storage'] = array('data' => $storage, 'class' => array('page-manager-page-storage')); /* @@ -192,7 +192,7 @@ function page_manager_get_pages($tasks, } } - $row['data']['operations'] = array('data' => theme('links', $operations), 'class' => 'page-manager-page-operations'); + $row['data']['operations'] = array('data' => theme('links', $operations), 'class' => array('page-manager-page-operations')); $pages['disabled'][$task_name] = !empty($task['disabled']); $pages['rows'][$task_name] = $row; @@ -273,14 +273,14 @@ function page_manager_list_pages_form(&$ '#type' => 'submit', '#id' => 'edit-pages-apply', '#value' => t('Apply'), - '#attributes' => array('class' => 'ctools-use-ajax'), + '#attributes' => array('class' => array('ctools-use-ajax')), ); $form['reset'] = array( '#type' => 'submit', '#id' => 'edit-pages-reset', '#value' => t('Reset'), - '#attributes' => array('class' => 'ctools-use-ajax'), + '#attributes' => array('class' => array('ctools-use-ajax')), ); ctools_add_js('ajax-responder'); @@ -373,7 +373,7 @@ function page_manager_edit_page($page) { $operations = page_manager_get_operations($page); $args = array('summary'); - $rendered_operations = page_manager_render_operations($page, $operations, $args, array('class' => 'operations-main'), 'nav'); + $rendered_operations = page_manager_render_operations($page, $operations, $args, array('class' => array('operations-main')), 'nav'); $content = page_manager_get_operation_content(FALSE, $page, $args, $operations); $output = theme('page_manager_edit_page', $page, $form, $rendered_operations, $content); @@ -410,7 +410,7 @@ function page_manager_edit_page_operatio // operations, such as renaming or adding a handler. Thus we get a new set // of operations. $operations = page_manager_get_operations($page); - $rendered_operations = page_manager_render_operations($page, $operations, $args, array('class' => 'operations-main'), 'nav'); + $rendered_operations = page_manager_render_operations($page, $operations, $args, array('class' => array('operations-main')), 'nav'); // Since this form should never be submitted to this page, process it late so // that we can be sure it notices changes. @@ -465,7 +465,7 @@ function page_manager_get_operations($pa 'actions' => array( 'type' => 'group', 'title' => '', - 'class' => 'operations-actions', + 'class' => array('operations-actions'), 'location' => 'primary', 'children' => array(), ), @@ -611,7 +611,7 @@ function page_manager_get_handler_operat ctools_include('export'); $group = array( 'type' => 'group', - 'class' => 'operations-handlers', + 'class' => array('operations-handlers'), 'title' => t('Variants'), ); @@ -628,7 +628,7 @@ function page_manager_get_handler_operat $operations[$id] = array( 'type' => 'group', - 'class' => 'operations-handlers-' . $id, + 'class' => array('operations-handlers-' . $id), 'title' => page_manager_get_handler_title($plugin, $handler, $page->task, $page->subtask_id), 'collapsible' => $collapsible, 'children' => array(), @@ -636,7 +636,7 @@ function page_manager_get_handler_operat $operations[$id]['children']['actions'] = array( 'type' => 'group', - 'class' => 'operations-handlers-actions-' . $id, + 'class' => array('operations-handlers-actions-' . $id), 'title' => t('Variant operations'), 'children' => array(), 'location' => $id, @@ -1042,29 +1042,29 @@ function page_manager_render_operations( // We only render an li for things in the same nav tree. if (empty($operation['location']) || $operation['location'] == $location) { - $class = $attributes['class']; + $class = array($attributes['class']); if ($id == $first) { - $class .= ' operation-first'; + $class[] = 'operation-first'; } else if ($id == $last) { - $class .= ' operation-last'; + $class[] = 'operation-last'; } if (empty($operation['silent']) && !empty($page->changes[$current_path])) { - $class .= $operation['type'] == 'group' ? ' changed-group' : ' changed'; + $class[] = $operation['type'] == 'group' ? 'changed-group' : 'changed'; } else { - $class .= ' not-changed'; + $class[] = 'not-changed'; } if ($active == $id) { - $class .= $operation['type'] == 'group' ? ' active-group' : ' active'; + $class[] = $operation['type'] == 'group' ? 'active-group' : 'active'; } else { - $class .= ' not-active'; + $class[] = 'not-active'; } - $output[$location] .= '
  • '; + $output[$location] .= '
  • '; } switch ($operation['type']) { @@ -1084,12 +1084,12 @@ function page_manager_render_operations( } } - $class = 'page-manager-operation'; + $class = array('page-manager-operation'); if (!isset($operation['ajax']) || !empty($operation['ajax'])) { - $class .= ' ctools-use-ajax'; + $class[] = 'ctools-use-ajax'; } if (!empty($operation['class'])) { - $class .= ' ' . $operation['class']; + $class[] = $operation['class']; } $description = isset($operation['description']) ? $operation['description'] : ''; Index: page_manager/plugins/tasks/page.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/page_manager/plugins/tasks/page.admin.inc,v retrieving revision 1.19 diff -u -p -r1.19 page.admin.inc --- page_manager/plugins/tasks/page.admin.inc 27 Sep 2009 03:41:02 -0000 1.19 +++ page_manager/plugins/tasks/page.admin.inc 4 Oct 2009 18:13:06 -0000 @@ -858,14 +858,14 @@ function page_manager_page_form_argument // The URL for this ajax button $form['table']['argument'][$keyword]['change-url'] = array( - '#attributes' => array('class' => "page-manager-context-$keyword-change-url"), + '#attributes' => array('class' => array("page-manager-context-$keyword-change-url")), '#type' => 'hidden', '#value' => url("admin/build/pages/argument/change/$task_name/$keyword", array('absolute' => TRUE)), ); $form['table']['argument'][$keyword]['change'] = array( '#type' => 'submit', '#value' => t('Change'), - '#attributes' => array('class' => 'ctools-use-modal'), + '#attributes' => array('class' => array('ctools-use-modal')), '#id' => "page-manager-context-$keyword-change", ); @@ -875,14 +875,14 @@ function page_manager_page_form_argument if (!empty($plugin)) { // The URL for this ajax button $form['table']['argument'][$keyword]['settings-url'] = array( - '#attributes' => array('class' => "page-manager-context-$keyword-settings-url"), + '#attributes' => array('class' => array("page-manager-context-$keyword-settings-url")), '#type' => 'hidden', '#value' => url("admin/build/pages/argument/settings/$task_name/$keyword", array('absolute' => TRUE)), ); $form['table']['argument'][$keyword]['settings'] = array( '#type' => 'submit', '#value' => t('Settings'), - '#attributes' => array('class' => 'ctools-use-modal'), + '#attributes' => array('class' => array('ctools-use-modal')), '#id' => "page-manager-context-$keyword-settings", ); } @@ -894,10 +894,10 @@ function page_manager_page_form_argument */ function theme_page_manager_page_form_argument_table($form) { $header = array( - array('data' => t('Argument'), 'class' => 'page-manager-argument'), - array('data' => t('Position in path'), 'class' => 'page-manager-position'), - array('data' => t('Context assigned'), 'class' => 'page-manager-context'), - array('data' => t('Operations'), 'class' => 'page-manager-operations'), + array('data' => t('Argument'), 'class' => array('page-manager-argument')), + array('data' => t('Position in path'), 'class' => array('page-manager-position')), + array('data' => t('Context assigned'), 'class' => array('page-manager-context')), + array('data' => t('Operations'), 'class' => array('page-manager-operations')), ); $rows = array(); Index: page_manager/plugins/tasks/page.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/page_manager/plugins/tasks/page.inc,v retrieving revision 1.17 diff -u -p -r1.17 page.inc --- page_manager/plugins/tasks/page.inc 19 Aug 2009 01:12:24 -0000 1.17 +++ page_manager/plugins/tasks/page.inc 4 Oct 2009 18:15:10 -0000 @@ -572,9 +572,9 @@ function page_manager_page_admin_summary $rows = array(); $rows[] = array( - array('class' => t('page-summary-label'), 'data' => t('Storage')), - array('class' => t('page-summary-data'), 'data' => $subtask['storage']), - array('class' => t('page-summary-operation'), 'data' => ''), + array('class' => array('page-summary-label'), 'data' => t('Storage')), + array('class' => array('page-summary-data'), 'data' => $subtask['storage']), + array('class' => array('page-summary-operation'), 'data' => ''), ); if (!empty($page->disabled)) { @@ -587,9 +587,9 @@ function page_manager_page_admin_summary } $rows[] = array( - array('class' => t('page-summary-label'), 'data' => t('Status')), - array('class' => t('page-summary-data'), 'data' => $text), - array('class' => t('page-summary-operation'), 'data' => $link), + array('class' => array('page-summary-label'), 'data' => t('Status')), + array('class' => array('page-summary-data'), 'data' => $text), + array('class' => array('page-summary-operation'), 'data' => $link), ); @@ -614,8 +614,8 @@ function page_manager_page_admin_summary if ($message) { $rows[] = array( - array('class' => t('page-summary-data'), 'data' => $message, 'colspan' => 2), - array('class' => t('page-summary-operation'), 'data' => $link), + array('class' => array('page-summary-data'), 'data' => $message, 'colspan' => 2), + array('class' => array('page-summary-operation'), 'data' => $link), ); } @@ -627,9 +627,9 @@ function page_manager_page_admin_summary } $rows[] = array( - array('class' => t('page-summary-label'), 'data' => t('Path')), - array('class' => t('page-summary-data'), 'data' => $path), - array('class' => t('page-summary-operation'), 'data' => $link), + array('class' => array('page-summary-label'), 'data' => t('Path')), + array('class' => array('page-summary-data'), 'data' => $path), + array('class' => array('page-summary-operation'), 'data' => $link), ); if (empty($access['plugins'])) { @@ -648,9 +648,9 @@ function page_manager_page_admin_summary $link = l(t('Edit'), page_manager_edit_url($task_name, array('settings', 'access'))); $rows[] = array( - array('class' => t('page-summary-label'), 'data' => t('Access')), - array('class' => t('page-summary-data'), 'data' => $access), - array('class' => t('page-summary-operation'), 'data' => $link), + array('class' => array('page-summary-label'), 'data' => t('Access')), + array('class' => array('page-summary-data'), 'data' => $access), + array('class' => array('page-summary-operation'), 'data' => $link), ); $menu_options = array( @@ -683,9 +683,9 @@ function page_manager_page_admin_summary $link = l(t('Edit'), page_manager_edit_url($task_name, array('settings', 'menu'))); $rows[] = array( - array('class' => t('page-summary-label'), 'data' => t('Menu')), - array('class' => t('page-summary-data'), 'data' => $menu), - array('class' => t('page-summary-operation'), 'data' => $link), + array('class' => array('page-summary-label'), 'data' => t('Menu')), + array('class' => array('page-summary-data'), 'data' => $menu), + array('class' => array('page-summary-operation'), 'data' => $link), ); $output .= theme('table', array(), $rows, array('id' => 'page-manager-page-summary')); Index: page_manager/plugins/tasks/term_view.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/page_manager/plugins/tasks/term_view.inc,v retrieving revision 1.5 diff -u -p -r1.5 term_view.inc --- page_manager/plugins/tasks/term_view.inc 4 Aug 2009 21:43:06 -0000 1.5 +++ page_manager/plugins/tasks/term_view.inc 4 Oct 2009 18:15:50 -0000 @@ -255,23 +255,23 @@ function page_manager_term_view_admin_su $task_name = page_manager_make_task_name($task['name'], $subtask['name']); $rows[] = array( - array('class' => t('page-summary-label'), 'data' => t('Path')), - array('class' => t('page-summary-data'), 'data' => 'taxonomy/term/%term'), - array('class' => t('page-summary-operation'), 'data' => ''), + array('class' => array('page-summary-label'), 'data' => t('Path')), + array('class' => array('page-summary-data'), 'data' => 'taxonomy/term/%term'), + array('class' => array('page-summary-operation'), 'data' => ''), ); $rows[] = array( - array('class' => t('page-summary-label'), 'data' => t('Access')), - array('class' => t('page-summary-data'), 'data' => t('This page is publicly accessible.')), - array('class' => t('page-summary-operation'), 'data' => ''), + array('class' => array('page-summary-label'), 'data' => t('Access')), + array('class' => array('page-summary-data'), 'data' => t('This page is publicly accessible.')), + array('class' => array('page-summary-operation'), 'data' => ''), ); $menu = t('No menu entry'); $rows[] = array( - array('class' => t('page-summary-label'), 'data' => t('Menu')), - array('class' => t('page-summary-data'), 'data' => $menu), - array('class' => t('page-summary-operation'), 'data' => ''), + array('class' => array('page-summary-label'), 'data' => t('Menu')), + array('class' => array('page-summary-data'), 'data' => $menu), + array('class' => array('page-summary-operation'), 'data' => ''), ); if (variable_get('page_manager_term_view_type', 'multiple') == 'multiple') { @@ -282,9 +282,9 @@ function page_manager_term_view_admin_su } $rows[] = array( - array('class' => t('page-summary-label'), 'data' => t('%term')), - array('class' => t('page-summary-data'), 'data' => $message), - array('class' => t('page-summary-operation'), 'data' => ''), + array('class' => array('page-summary-label'), 'data' => t('%term')), + array('class' => array('page-summary-data'), 'data' => $message), + array('class' => array('page-summary-operation'), 'data' => ''), ); if (variable_get('page_manager_taxonomy_breadcrumb', TRUE)) { @@ -295,9 +295,9 @@ function page_manager_term_view_admin_su } $rows[] = array( - array('class' => t('page-summary-label'), 'data' => t('Breadcrumb')), - array('class' => t('page-summary-data'), 'data' => $message), - array('class' => t('page-summary-operation'), 'data' => ''), + array('class' => array('page-summary-label'), 'data' => t('Breadcrumb')), + array('class' => array('page-summary-data'), 'data' => $message), + array('class' => array('page-summary-operation'), 'data' => ''), ); $output = theme('table', array(), $rows, array('id' => 'page-manager-page-summary')); Index: page_manager/theme/page_manager.theme.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/page_manager/theme/page_manager.theme.inc,v retrieving revision 1.5 diff -u -p -r1.5 page_manager.theme.inc --- page_manager/theme/page_manager.theme.inc 27 Sep 2009 03:41:02 -0000 1.5 +++ page_manager/theme/page_manager.theme.inc 4 Oct 2009 18:16:29 -0000 @@ -84,13 +84,13 @@ function theme_page_manager_handler_rear $row[] = array( 'data' => drupal_render($element['title']), - 'class' => 'page-manager-handler', + 'class' => array('page-manager-handler'), ); - $element['weight']['#attributes']['class'] = 'weight'; + $element['weight']['#attributes']['class'][] = 'weight'; $row[] = drupal_render($element['weight']); - $rows[] = array('data' => $row, 'class' => 'draggable', 'id' => 'page-manager-row-' . $id); + $rows[] = array('data' => $row, 'class' => array('draggable'), 'id' => 'page-manager-row-' . $id); } } @@ -99,7 +99,7 @@ function theme_page_manager_handler_rear } $header = array( - array('data' => t('Variant'), 'class' => 'page-manager-handler'), + array('data' => t('Variant'), 'class' => array('page-manager-handler')), t('Weight'), ); Index: plugins/content_types/user_context/profile_fields.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/ctools/plugins/content_types/user_context/profile_fields.inc,v retrieving revision 1.5 diff -u -p -r1.5 profile_fields.inc --- plugins/content_types/user_context/profile_fields.inc 27 Sep 2009 03:41:03 -0000 1.5 +++ plugins/content_types/user_context/profile_fields.inc 4 Oct 2009 18:17:16 -0000 @@ -41,6 +41,7 @@ function ctools_profile_fields_content_t if (is_array($account->content[$category])) { foreach ($account->content[$category] as $field) { if (is_array($field['#attributes'])) { + // @todo 'class' is *always* an array now. 04/10/2009 sun $vars[$field['#attributes']['class']]['title'] = $field['#title']; $vars[$field['#attributes']['class']]['value'] = $field['#value']; }