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

Include module constants during Separate Installation

    XMLWordPrintable

    Details

      Description

      When doing separate module installation, then it's "constants.php" file isn't included during Application initialization because module isn't installed yet.

      This creates Fatal Error in case if classes defined in "constants.php" are used inside unit configs of this not yet installed module.

      As a solution I'm proposing to add these lines:
      $constants_file = FULL_PATH . '/' . $module_folder . '/constants.php';

      if ( file_exists($constants_file) )

      { require_once $constants_file; }

      after these lines:
      include_once(FULL_PATH . '/core/kernel/startup.php');
      require_once FULL_PATH . '/core/install/install_toolkit.php';

      in each module's install.php file.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                alex Alex
                Reporter:
                dmitry Dmitry Andrejev [Intechnic]
                Developer:
                Erik Snarski [Intechnic]
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: