Giter VIP home page Giter VIP logo

fossbilling-dns's People

Contributors

amanzella avatar getpinga avatar

Stargazers

 avatar  avatar

Forkers

amanzella

fossbilling-dns's Issues

Errors when placing order and/or activating

I have set the product, selected PowerDNS, set the API IP, Key and etc. When I try to order or activate the order, it just spins. After checking, I'm getting a 500 error on /api/admin/order/activate?id=

This only happens when trying to order/activate the DNS product. Everything else works fine.

Suggested changes

I noticed a few items that I'd suggest refactoring in your code:

Config handling

You're directly including into an array which will break if we decide to move the config file or change the format that it's stored in.
Starting with version 0.6.10, we've specifically added in a new class to make config file management easier and less likely to cause headache.

// Get the whole config
$dbConfig = \FOSSBilling\Config::getProperty('db', []);

// Or for example, just the DB type
$dbConfig = \FOSSBilling\Config::getProperty('db.type', 'mysql');

The first parameter is the array key to reference, written using dot-notation. The second parameter is optional and just allows you to set a default value if one isn't set.

At the very least, PATH_CONFIG contains absolute path to the config file, so include __DIR__ . '/../../../config.php'; would just be include PATH_CONFIG, but in either case we consider accessing the config file through anything other than the config class to be deprecated.

Exception class

Every time a \FOSSBilling\Exception exception is thrown, that's caught and sent via error reporting. so every time your module throws an exception to say "Domain name is not set." or even just "Not yet implemented", we get an event on our end.

\FOSSBilling\InformationException is treated as something that's simply informational and as such is not forwarded to error reporting, reducing spam and clutter in our dashboard. Ideally, the normal exception class should only be used for an actual error.

If you want to change that I can let events from the module continue to be captured and periodically forward them to you to look at, but otherwise I'm just going to add it to the blacklist so we don't get events for it, either way is fine with me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.