summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--includes/export.inc34
-rw-r--r--includes/form.inc8
-rw-r--r--page_manager/page_manager.admin.inc5
-rw-r--r--plugins/content_types/user_context/profile_fields.inc2
4 files changed, 48 insertions, 1 deletions
diff --git a/includes/export.inc b/includes/export.inc
index b5cfeda..dd7a1da 100644
--- a/includes/export.inc
+++ b/includes/export.inc
@@ -10,6 +10,40 @@
*
* This doesn't include a write routine since drupal_write_record is
* more or less sufficient.
+ *
+ * Exportable objects are created by adding definition to the schema
+ * in an 'export' section. The following fields are supported in this
+ * chunk of code:
+ * - key: This is the primary key of the exportable object and should be
+ * a string as names are more portable across systems. It is possible
+ * to use numbers here, but be aware that export collisions are very
+ * likely. Defaults to 'name'.
+ * - object: The class the object should be created ass. Defaults as stdClass.
+ * - can disable: Control whether or not the exportable objects can be
+ * disabled. All this does is cause the 'disabled' field on the object
+ * to always be set appropriately, and a variable is kept to record
+ * the state. Changes made to this state must be handled by the owner
+ * of the object. Defaults to TRUE.
+ * - status: Exportable objects can be enabled or disabled, and this status
+ * is stored in a variable. This defines what variable that is. Defaults
+ * to: 'default_' . $table,
+ * - default hook: What hook to invoke to find exportable objects that are
+ * currently defined. These will all be gathered into a giant array.
+ * Defaults to 'default_' . $table,
+ * - identifier: When exporting the object, the identifier is the variable that
+ * the exported object will be placed in. Defaults to $table.
+ * - bulk export': Declares whether or not the exportable will be available
+ * for bulk exporting. (Bulk export UI is currently left to be handled
+ * by contrib, though the core hooks are present so this can be done.).
+ * - export callback: The callback to use for bulk exporting. Defaults to
+ * $module . '_export_' . $table.
+ * - list callback: Bulk export callback to provide a list of exportable
+ * objects to be chosen for bulk exporting. Defaults to
+ * $module . '_' . $table . '_list'.
+ * - to hook code callback: Function used to generate an export for the bulk
+ * export process. This is only necessary if the export is more complicated
+ * than simply listing the fields. Defaults to $module . '_' . $table .
+ * '_to_hook_code'.
*/
/**
diff --git a/includes/form.inc b/includes/form.inc
index ebf7c5d..3e49007 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -136,6 +136,14 @@ function ctools_build_form($form_id, &$form_state) {
if (!empty($form_state['want form'])) {
return $form;
}
+
+ // Do not render certain items if requested not to:
+ if (!empty($form_state['drop tokens'])) {
+ unset($form['#id']);
+ unset($form['#build_id']);
+ unset($form['#token']);
+ unset($form['form_token']);
+ }
// If we haven't redirected to a new location by now, we want to
// render whatever form array is currently in hand.
// Do not render certain items if requested not to:
diff --git a/page_manager/page_manager.admin.inc b/page_manager/page_manager.admin.inc
index fd67a5f..ff8ac85 100644
--- a/page_manager/page_manager.admin.inc
+++ b/page_manager/page_manager.admin.inc
@@ -199,6 +199,11 @@ function page_manager_get_pages($tasks, &$pages, $task_id = NULL) {
* Provide a form for sorting and filtering the list of pages.
*/
function page_manager_list_pages_form(&$form_state) {
+ // This forces the form to *always* treat as submitted which is
+ // necessary to make it work.
+ if (empty($_POST)) {
+ $form["#programmed"] = TRUE;
+ }
$form['#action'] = url('admin/build/pages/nojs/', array('absolute' => TRUE));
if (!variable_get('clean_url', FALSE)) {
$form['q'] = array(
diff --git a/plugins/content_types/user_context/profile_fields.inc b/plugins/content_types/user_context/profile_fields.inc
index 580d3df..c58eeab 100644
--- a/plugins/content_types/user_context/profile_fields.inc
+++ b/plugins/content_types/user_context/profile_fields.inc
@@ -14,7 +14,7 @@ function ctools_profile_fields_ctools_content_types() {
'description' => t('Contents of a single profile category.'),
'required context' => new ctools_context_required(t('User'), 'user'),
'category' => t('User'),
- 'defaults' => array('title' => '', 'category' => '', 'empty' => ''),
+ 'defaults' => array('category' => '', 'empty' => ''),
'hook theme' => 'ctools_profile_fields_content_type_theme',
);
}