Skip to Content.
Sympa Menu

comanage-dev - [comanage-dev] r657 - registry/trunk/app/Controller

Subject: COmanage Developers List

List archive

[comanage-dev] r657 - registry/trunk/app/Controller


Chronological Thread 
  • From:
  • To:
  • Subject: [comanage-dev] r657 - registry/trunk/app/Controller
  • Date: Tue, 14 Jan 2014 18:10:13 -0500

Author: benno
Date: 2014-01-14 18:10:13 -0500 (Tue, 14 Jan 2014)
New Revision: 657

Modified:
registry/trunk/app/Controller/CoPeopleController.php
Log:
Remove old CoPeopleController delete code (from original Group plugin)
(CO-761)

Modified: registry/trunk/app/Controller/CoPeopleController.php
===================================================================
--- registry/trunk/app/Controller/CoPeopleController.php 2014-01-14
23:07:47 UTC (rev 656)
+++ registry/trunk/app/Controller/CoPeopleController.php 2014-01-14
23:10:13 UTC (rev 657)
@@ -255,45 +255,6 @@
}

/**
- * Delete a CoPerson Object. WARNING: this method will delete all
associated data.
- * This method calls the StandardController delete() method after first
temporarily changing
- * model dependecies if necessary to compensate for data sources used for
groups and group
- * memberships that may not use SQL and support cascading deletes.
- *
- * - precondition: see StandardController
- * - postcondition: see StandardController
- * - postcondition: see StandardController
- *
- * @since COmanage Registry v0.8
- * @param integer Object identifier (eg: cm_co_groups:id) representing
object to be deleted
- */
-
- function delete($id) {
- // If a data store for groups and group memberships is being used that
- // is not a relational database supporting SQL then temporarily remove
- // the model relationship to group memberships.
- //
- // May need to revisit at some point due to
- // https://bugs.internet2.edu/jira/browse/CO-444.
- if (!Configure::read('COmanage.groupSqlDataSource')) {
- $groupMembersLinkValue = $this->CoPerson->hasMany['CoGroupMember'];
- unset($this->CoPerson->hasMany['CoGroupMember']);
-
- // Use the parent method to do the delete.
- $ret = parent::delete($id);
-
- // TODO delete the memberships...
-
- // Restore the model relationship to group memberships if it was
deleted.
- $this->CoPerson->hasMany['CoGroupMember'] = $groupMembersLinkValue;
- } else {
- // Use the parent method to do the delete.
- $ret = parent::delete($id);
- }
- return $ret;
- }
-
- /**
* Generate a display key to be used in messages such as "Item Added".
*
* @since COmanage Registry v0.1



  • [comanage-dev] r657 - registry/trunk/app/Controller, svnlog, 01/14/2014

Archive powered by MHonArc 2.6.16.

Top of Page