Around the time we merged Beanie-cms and phpwebsite, I was working on an overhaul of the conditional api. While in the database I made various fixes. This code got lost in the merge.
Fortunately, I had a backup and here it is.
Around the time we merged Beanie-cms and phpwebsite, I was working on an overhaul of the conditional api. While in the database I made various fixes. This code got lost in the merge.
Fortunately, I had a backup and here it is.
Very big update. Rewrote the ModuleController to handle the loading of modules. No longer handled by PHPWS_Core.

Global/Backward/Module.php - removed

Global/GlobalModule.php *new
- Lets Global library work as a module for the purpose of using Settings. 

Global/Module.php *new
- Takes the place of old modules that do not have Module.php in their directory.

Global/ModuleAbstract.php
- Removed beanie specific code and variables and added variable names from old phpwebsite. This abstract class will be the foundation for the Module classes used by future apps.
- Modules now have a deprecated flag. If 1 (one) that means the module has not been updated for 1.8.2. This is ok for now.
- Setting the domains for translation was moved into this class.
- added missing "set" methods

Global/ModuleController.php
- Greatly expanded its role. It now handles the beginning processing once done by Core and Init.
- Several function written to take the place of methods in PHPWS_Core.
- Added code to handle future modules that use the Module object instead of runtime, init, close, and index.php.
- Processes not related to handling modules was moved to the inc/Bootstrap.php file.

Global/ModuleManager.php
- Deleted. Was beanie-cms specific.

Global/Request.php
- ModuleController is using this so revisited functionality.
- The requests module is now noted in the object.

Global/Server.php
- A replacement for server functions in PHPWS_Core.
- Fixed mistyped function call.

Global/Session.php
- Now employed by ModuleController to start the session.
- Added start function.

Global/Settings.php
- Tinkered around to get it to start working. Eventually will replace a bulk of the site defines. For now stores a couple of Global variables (language).
- Eventual replacement for PHPWS_Settings.

Global/Variable/TextOnly.php *new
- A String Variable extension that turns off tags by default.

core/class/Icon.php
- Part of Icon checked for Layout; part did not. Both ran in the same function. For now, Layout must be included, which should be ok with autoload. Icon needs revisiting.

core/class/Init.php
- DELETED, functionality moved to Global/Language.php, the t() function and some of ModuleController.

core/class/PHPWS_Core.php
- Eventually, we hope to eliminate this hodge podge of functions. For now, the follow methods were removed: initializeModules, runtimeModules, runCurrentModule
- getModules rewritten to use ModuleController
- getModuleNames rewritten to use ModuleController
- errors cause Exceptions now. Not PEAR objects and not error pages but exceptions.
- setLastPost, _getPostKey, and isPosted have been commented out for now. I want to see if other modules are using them

core/conf/DEPRECATED.txt
- as config files are removed and put into settings, they will be listed in this file.

core/conf/language
- deleted. Now a setting in Global. Unfortunately, language is not easily accessible until Settings ui built.

inc/Bootstrap.php
- received includes that were in ModuleController that were not related to Module control. This whole file will need to be cleaned out and separated into processes.

inc/Forward.php
- deleted. Functionality moved to ModuleController.php

index.php
- The ModuleController is a singleton. Adjusted the call here.

mod/Layout
- The beginnings of the Layout rewrite.

mod/layout/class/Functions.php
- Contains the functions that were previously hanging out in the Layout class

mod/search/class/Search.php
- A change in the wordlist.txt file so I could remove a function from PHPWS_Core. This was the only module using said function.

mod/users/class/Action.php
- There is a case for return_bookmark. I could not find any place where it was used so I removed it.

setup/install.php
- Not yet used, but these changes will be required for new installations.