Skip to content

Commit

Permalink
3.0-beta1 (#116)
Browse files Browse the repository at this point in the history
* Upgrade paths, import redirect, and fix to force import form and tampers.
* PHP Notice fixes
* 3.0-beta1
  • Loading branch information
sherakama authored Jan 16, 2017
1 parent 4e473eb commit c8404db
Show file tree
Hide file tree
Showing 17 changed files with 83 additions and 15 deletions.
28 changes: 28 additions & 0 deletions CHANGELOG.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
Stanford CAPx x.x-x.x, xxxx-xx-xx
---------------------------------

Stanford CAPx 7.x-3.0-beta1, 2017-01-16
---------------------------------
- Exportables!
Yes, you can finally put your configuration in a feature or directly copy a
mapper from one site to the next via copy and paste!
- Code climate updates and some code clean up
- Upgrade hooks from 2.x -> 3.x to ensure you get the best.

Stanford CAPx 7.x-2.1, 2017-01-16
---------------------------------
- Tamper data
You can now alter the data before it gets saved to your entity directly
through the UI. Very similar to Feeds Tamper Data.
- Filters for importers
Perhaps you didn't want everyone in that organization after all. You can now
set conditions on the importers on who to import.
- Webauth Integration
Now when you create user entities you can have them automatically linked up
with webauth so they may log in.
- Simple SAML PHP auth Integration
Instead of webauth you can use stanford_ssp to authenticate user entities
created through CAPx
- Performance improvements
Wee speed.
- Orphan processing performance improvements
- Orphan processing logic enhancements
- Minor bug fixes

Stanford CAPx 7.x-2.0, 2016-05-27
---------------------------------
- Entity relationships!
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Stanford CAPx
#### Version 3.0-dev
#### Version 3.0-beta1

Stanford CAP Extensible module builds on some great work. This module provides an interface for administrators to pull information directly from the CAP API into Drupal. This allows profile owners to continue to manage their profile information on the CAP web service and have that information automatically reflected into a Drupal website.

Expand Down
2 changes: 1 addition & 1 deletion modules/capx_auto_nodetitle/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[CAPX Auto Nodetitle](https://github.com/SU-SWS/stanford_capx/tree/7.x-1.x/modules/capx_auto_nodetitle)
##### Version: 7.x-3.0-dev
##### Version: 7.x-3.0-beta1

Maintainers: [jbickar](https://github.com/jbickar), [sherakama](https://github.com/sherakama)
[Changelog.txt](CHANGELOG.txt)
Expand Down
2 changes: 1 addition & 1 deletion modules/capx_auto_nodetitle/capx_auto_nodetitle.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = CAPX Auto Node Title Support
description = Allows support for the auto_nodetitle module
core = 7.x
package = Stanford
version = 7.x-3.0-dev
version = 7.x-3.0-beta1
project = capx_auto_nodetitle
dependencies[] = auto_nodetitle
dependencies[] = stanford_capx
Expand Down
2 changes: 1 addition & 1 deletion modules/capx_filters/capx_filters.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = CAPx Filters
core = 7.x
package = Stanford CAPx
project = capx_filters
version = 7.x-3.0-dev
version = 7.x-3.0-beta1

files[] = views/views_handler_filters_link.inc

Expand Down
2 changes: 1 addition & 1 deletion modules/capx_filters/capx_filters.module
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ function capx_filters_parse_date($string) {
function capx_filters_entity_presave($entity, $type) {

// We only want to act on importer cfe entities.
if ($type !== 'capx_cfe' && $entity->type !== 'importer') {
if ($type !== 'capx_cfe' || !isset($entity->type) || $entity->type !== 'importer') {
return NULL;
}

Expand Down
2 changes: 1 addition & 1 deletion modules/capx_issue_collector/capx_issue_collector.info
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = Stanford CAPx Issue Collector
description = Provides a feedback link to the CAPx Working Group Jira project.
core = 7.x
version = 7.x-3.0-dev
version = 7.x-3.0-beta1
package = Stanford CAPx
; scripts[] = capx_issue_collector.js
2 changes: 1 addition & 1 deletion modules/capx_ssp/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[CAPx SSP](https://github.com/SU-SWS/stanford_capx)
##### Version: 7.x-3.0-dev
##### Version: 7.x-3.0-beta1

Maintainers: [jbickar](https://github.com/jbickar), [sherakama](https://github.com/sherakama)
[Changelog.txt](CHANGELOG.txt)
Expand Down
2 changes: 1 addition & 1 deletion modules/capx_ssp/capx_ssp.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = CAPx SSO Integration
description = Enable to allow user entities to log in with SSO
core = 7.x
package = Stanford
version = 7.x-3.0-dev
version = 7.x-3.0-beta1
project = capx_ssp
dependencies[] = stanford_capx
dependencies[] = stanford_ssp
2 changes: 1 addition & 1 deletion modules/capx_tamper/capx_tamper.forms.inc
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function capx_tamper_list_form($form, &$form_state, CFEntity $mapper, $source =
$form['tampers'][$target][$tamper->id]['enabled'] = array(
'#type' => 'checkbox',
'#title' => t('Enabled'),
'#default_value' => !$tamper->disabled,
'#default_value' => @!$tamper->disabled,
);
}
$form['tampers'][$target]['add_link'] = array(
Expand Down
2 changes: 1 addition & 1 deletion modules/capx_tamper/capx_tamper.info
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = CAPx Tamper
core = 7.x
version = 7.x-3.0-dev
version = 7.x-3.0-beta1
package = Stanford CAPx
project = capx_tamper

Expand Down
8 changes: 7 additions & 1 deletion modules/capx_tamper/capx_tamper.module
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,13 @@ function capx_tamper_delete_instance($tamper) {
function capx_tamper_invalidate_etags($mapper_id) {
/** @var \CAPx\Drupal\Entities\CFEntity $mapper */
$mapper = capx_tamper_mapper_load($mapper_id);
CAPx::invalidateEtags('mapper', $mapper);

// Check to be sure the mapper can be loaded. This is getting fired on a
// delete mapper function.
if ($mapper) {
CAPx::invalidateEtags('mapper', $mapper);
}

}

/**
Expand Down
2 changes: 1 addition & 1 deletion modules/capx_webauth/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#[CAPx Webauth](https://github.com/SU-SWS/stanford_capx)
##### Version: 7.x-3.0-dev
##### Version: 7.x-3.0-beta1

Maintainers: [jbickar](https://github.com/jbickar), [sherakama](https://github.com/sherakama)
[Changelog.txt](CHANGELOG.txt)
Expand Down
2 changes: 1 addition & 1 deletion modules/capx_webauth/capx_webauth.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = CAPx WebAuth Integration
description = Enable to allow user entities to log in with SSO
core = 7.x
package = Stanford
version = 7.x-3.0-dev
version = 7.x-3.0-beta1
project = capx_webauth
dependencies[] = stanford_capx
dependencies[] = webauth
2 changes: 1 addition & 1 deletion stanford_capx.info
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description = Provides the ability to import profiles into existing entity types
core = 7.x
package = Stanford CAPx
project = stanford_capx
version = 7.x-3.0-dev
version = 7.x-3.0-beta1

dependencies[] = entity
dependencies[] = block
Expand Down
27 changes: 27 additions & 0 deletions stanford_capx.install
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,30 @@ function stanford_capx_update_7202() {
$mapper->save();
}
}

/**
* Upgrade path from 2.x - 3.x
*/
function stanford_capx_update_7300() {
// db_add_field($table, $field, $spec, $keys_new = array())
$status_spec = array(
'type' => 'int',
'not null' => TRUE,
'default' => 0x01,
'size' => 'tiny',
'description' => 'The exportable status of the entity.',
);

$module_spec = array(
'description' => 'The name of the providing module if the entity has been defined in code.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
);

db_add_field("capx_cfe", "status", $status_spec);
db_add_field("capx_cfe", "module", $module_spec);
db_add_field("capx_cfe_type", "status", $status_spec);
db_add_field("capx_cfe_type", "module", $module_spec);

}
9 changes: 8 additions & 1 deletion stanford_capx.module
Original file line number Diff line number Diff line change
Expand Up @@ -987,9 +987,16 @@ function stanford_capx_preset_import_form_submit($form, &$form_state) {
}

// entity_import does not actually save the item.
capx_cfe_save($item);
// Check to see if this is a replace or a new item.
$cfe = capx_cfe_load_by_machine_name($item->machine_name, $item->type);
if ($cfe) {
capx_cfe_delete($cfe);
}

capx_cfe_save($item);
drupal_set_message("Item imported successfully", "status");

$form_state['redirect'] = "admin/config/capx/mapper";
}

/**
Expand Down

0 comments on commit c8404db

Please sign in to comment.