Author: jfthomps
Date: Wed Jul  8 19:33:04 2015
New Revision: 1689944

URL: http://svn.apache.org/r1689944
Log:
VCL-881 - cannot delete schedules

modified toggleDeleteResource - moved call to 
$this->submitToggleDeleteResourceExtra to before the query to delete the entry 
from the specific resource (i.e. "schedule" table, not "resource" table) table 
so that foreign key constraints on any entries deleted by the Extra function 
will not prevent the entry from being deleted from the specific resource table

Modified:
    vcl/trunk/web/.ht-inc/resource.php

Modified: vcl/trunk/web/.ht-inc/resource.php
URL: 
http://svn.apache.org/viewvc/vcl/trunk/web/.ht-inc/resource.php?rev=1689944&r1=1689943&r2=1689944&view=diff
==============================================================================
--- vcl/trunk/web/.ht-inc/resource.php (original)
+++ vcl/trunk/web/.ht-inc/resource.php Wed Jul  8 19:33:04 2015
@@ -581,6 +581,8 @@ class Resource {
                                return 0;
                }
                else {
+                       $this->submitToggleDeleteResourceExtra($rscid);
+
                        $query = "DELETE r "
                               . "FROM resource r, "
                               .      "resourcetype rt "
@@ -591,8 +593,6 @@ class Resource {
                        $query = "DELETE FROM `{$this->restype}` "
                               . "WHERE id = $rscid";
                        doQuery($query);
-
-                       $this->submitToggleDeleteResourceExtra($rscid);
                }
 
                # clear user resource cache for this type


Reply via email to