Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port Customer DAO to use PDO #551

Merged
merged 9 commits into from
Jan 25, 2022
Merged

Port Customer DAO to use PDO #551

merged 9 commits into from
Jan 25, 2022

Commits on Jan 12, 2022

  1. Move runSelectQuery() up to BaseDAO.

    It will be reused by other DAOs. The class name for PDO::FETCH_CLASS
    is now passed as a parameter.
    jaragunde committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    df4e6f2 View commit details
    Browse the repository at this point in the history
  2. Remove redundant CustomerDAO constructor declaration.

    The declaration in CustomerDAO was shadowed by the one in
    PostgreSQLCustomerDAO, it was actually invalid because it was declared
    "protected", which didn't allow the DAOFactory to instantiate it.
    jaragunde committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    5bd78ab View commit details
    Browse the repository at this point in the history
  3. Migrate CustomerDAO::getById and getAll to PDO.

    The query for getAll when $active is set was incorrect, so it has been
    changed. The front end is not using it, but it can be tested calling
    web/services/getUserCustomersService.php?active=true
    
    CustomerVO property names changed for PDO::FETCH_CLASS to work.
    jaragunde committed Jan 12, 2022
    Configuration menu
    Copy the full SHA
    6141862 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2022

  1. Migrate CustomerDAO::getByProjectUserLogin to PDO.

    The query was incorrect and we hadn't noticed because it's not
    currently used by our front end. It can be tested calling
    web/services/getUserCustomersService.php?uid=admin&active=true
    jaragunde committed Jan 25, 2022
    Configuration menu
    Copy the full SHA
    011987c View commit details
    Browse the repository at this point in the history
  2. Remove unused CustomerDAO::getBySectorId and related code.

    It was only used from SectorDAO::GetCustomers, which was in turn
    unused.
    jaragunde committed Jan 25, 2022
    Configuration menu
    Copy the full SHA
    0424e4b View commit details
    Browse the repository at this point in the history
  3. Migrate CustomerDAO create/update/delete operations to PDO.

    We also remove unnecessary checks for the customer id in update and
    delete operations.
    jaragunde committed Jan 25, 2022
    Configuration menu
    Copy the full SHA
    04bd184 View commit details
    Browse the repository at this point in the history
  4. [#431] Fix PHP warnings in customer management page.

    Fixes:
    * Undefined index: sid, uid, active, login, order
    * Undefined variable: string
    jaragunde committed Jan 25, 2022
    Configuration menu
    Copy the full SHA
    06a1e57 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e4f3dbe View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    4839173 View commit details
    Browse the repository at this point in the history