コード例 #1
0
ファイル: Customers.php プロジェクト: kokkez/shineisp
 /**
  * massdelete
  * delete the customer selected 
  * @param array
  * @return Boolean
  */
 public static function bulk_delete($customers)
 {
     $retval = Doctrine_Query::create()->delete()->from('Customers c')->whereIn('c.customer_id', $customers)->addWhere("c.isp_id = ?", Isp::getCurrentId())->execute();
     foreach ($customers as $customerid) {
         CustomersDomainsRegistrars::del($customerid);
         Orders::DeleteByCustomerID($customerid);
         Shineisp_Commons_Utilities::delTree(PUBLIC_PATH . "/documents/orders/{$customerid}");
         // Delete the orders files
     }
     return $retval;
 }