Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a loader for the non-classed items
Some parts in turba, forms and most likely some other apps try to load nls data arrays through relative autoload paths. this works in PEAR but not in composer or other autoload scenarios. The loader is an autoloadable item which, in turn, has a stable relative path to the data files. This change is backward compatible, untouched code will not break (if it worked before). The suggested idiom to use the loader is: /* Countries */ if (class_exists(\Horde_Nls_Loader::class)) { $countries = \Horde_Nls_Loader::loadCountries(); } else { include 'Horde/Nls/Countries.php'; } This will work both with older NLS libraries or with scenarios where the class cannot be autoloaded, provided that the include path works (backward compat).
- Loading branch information