/** * post delete function * * this function will be called by MsObject::delete() * * @return bool */ public function postDelete() { global $db, $ms; $sth = $db->prepare("\n DELETE FROM\n TABLEPREFIXassign_pipes_to_chains\n WHERE\n apc_chain_idx LIKE ?\n "); $db->execute($sth, array($this->id)); $db->freeStatement($sth); try { $chains = new \MasterShaper\Models\ChainsModel(); } catch (\Exception $e) { static::raiseError(__METHOD__ . '(), failed to load ChainsModel!', false, $e); return false; } if (!$chains->updatePositions($this->chain_netpath_idx)) { static::raiseError(get_class($chains) . '::updatePositions() returned false!'); return false; } return true; }