X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/timetracker.git/blobdiff_plain/32173f5d1d4c523d9f3223489651049cafad9a5e..07ee49d8208cc8308a167487f010e4b919555e03:/WEB-INF/lib/ttOrgHelper.class.php diff --git a/WEB-INF/lib/ttOrgHelper.class.php b/WEB-INF/lib/ttOrgHelper.class.php index 4a322f07..81bfbcf7 100644 --- a/WEB-INF/lib/ttOrgHelper.class.php +++ b/WEB-INF/lib/ttOrgHelper.class.php @@ -84,11 +84,17 @@ class ttOrgHelper { } // deleteOrg deletes data for the entire organization from database permanently. - static function deleteOrg() { - return false; // Work in progress, currently not implemented. - + // Work in progress, currently not fully implemented. + static function deleteOrg($org_id) { // We shall do it in a straightforward way by a delete operation from all tables by org_id. // However, at this time not all tables have org_id. // So, we need to add the field as we write code here. + + // Delete monthly quotas. + $sql = "delete from tt_monthly_quotas where org_id = $org_id"; + $affected = $mdb2->exec($sql); + if (is_a($affected, 'PEAR_Error')) return false; + + return true; // Work in progress, currently not fully implemented. } }