Uploaded image for project: 'In-Portal CMS'
  1. In-Portal CMS
  2. INP-1159

Create intermediate class to access /system/config.php file

    XMLWordPrintable

    Details

    • Additional information:
      Hide

      Constants, that are defined based on /system/config.php file contents, like SQL_DB, ADMIN_DIRECTORY can stay of course.

      Show
      Constants, that are defined based on /system/config.php file contents, like SQL_DB, ADMIN_DIRECTORY can stay of course.
    • Change Log Group:
      Added
    • Change Log Message:
      Added "kSystemConfig" class for accessing "/system/config.php" file.
    • Story Points:
      2
    • External issue ID:
      1402
    • Copy Issue Key:
    • Patch Instructions:

      Patches must be submitted through Phabricator.

    • Commit Revision:
      15,962

      Description

      File /system/config.php is created during In-Portal installation and contains all core settings that are needed to be able to run In-Portal.
      For example it contains database connection information. Then once connected to database In-Portal can get other settings from there.

      This file very powerful, however code that uses it is scattered across the system. For example there is:

      • kUtil::parseVars method, that returns contents of that file as array (used each time)
      • some pieces of code in /core/kernel/startup.php file, that ensures default values for some settings, that might be missing (used each time)
      • some pieces of code in /core/install.php file, that ensures default values for some other settings, that might be missing (used during install)

      I'm proposing to create kSystemConfig class, that can be accessed from everywhere (due his static nature) and will ensure that all settings have their default values and can be accessed properly.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                alex Alex
                Developer:
                Erik Snarski [Intechnic]
                Reviewer:
                Alex
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: