CRM-16373 - CRM_Core_Config - Simplify initialization, esp `templateCompileDir`
authorTim Otten <totten@civicrm.org>
Sun, 23 Aug 2015 08:38:35 +0000 (01:38 -0700)
committerTim Otten <totten@civicrm.org>
Thu, 17 Sep 2015 22:45:01 +0000 (15:45 -0700)
commit635f0b8655fb0b77ba882cde2081e5055326d175
tree9453cee8d1e47051730a009761615ca839635a3c
parent348754d5baf83293564406b5770f01edf647b74b
CRM-16373 - CRM_Core_Config - Simplify initialization, esp `templateCompileDir`

Generally, this commit removes some silly 1-line functions, misplaed
functions, duplicated steps, obvious comments, and expired comments.

There is a change in `templateCompileDir`.

The `templateCompileDir` had two different intialization blocks (in
different places), which likely arose from variations in the code-paths used
for memcache systems.  Both routines append a locale and create the dir.

This is redundant, and it unnecessarily forces us to resolve the locale
early during initialization.  But honestly we don't need to append the
locale until much later (when/if Smarty is first used).

There are a few oddballs who use `$config->templateCompileDir` and they may
see a slight change (working with the real templateCompileDir rather than
the locale subdir):

 * The cleanup. If this code causes a change, it will be an improvement:
   instead of cleaning the Smarty cache for one locale, it'll clean the
   entire Smarty cache for all locales.
 * Random temp files. The temp files seem to be transactional in nature
   (tied to the specific invocatoin) and not to the locale.
CRM/Core/Config.php
CRM/Core/Config/Defaults.php
CRM/Core/DAO.php
CRM/Core/Smarty.php
CRM/Upgrade/Form.php
CRM/Utils/File.php
CRM/Utils/Geocode.php [new file with mode: 0644]
CRM/Utils/System.php