[geeklog-hg] [Geeklog-Core/geeklog] deb80c: Fixed issue of 2 many file locations added by temp...

GitHub noreply at github.com
Tue Apr 24 10:50:31 EDT 2018


  Branch: refs/heads/master
  Home:   https://github.com/Geeklog-Core/geeklog
  Commit: deb80c8676832e8bf253e3179ba604f28fff6d04
      https://github.com/Geeklog-Core/geeklog/commit/deb80c8676832e8bf253e3179ba604f28fff6d04
  Author: Tom Homer <tomhomer at gmail.com>
  Date:   2018-04-24 (Tue, 24 Apr 2018)

  Changed paths:
    M public_html/admin/article.php
    M public_html/admin/auth.inc.php
    M public_html/admin/block.php
    M public_html/admin/database.php
    M public_html/admin/envcheck.php
    M public_html/admin/group.php
    M public_html/admin/install/success.php
    M public_html/admin/logviewer.php
    M public_html/admin/mail.php
    M public_html/admin/plugins.php
    M public_html/admin/router.php
    M public_html/admin/syndication.php
    M public_html/admin/topic.php
    M public_html/admin/trackback.php
    M public_html/admin/user.php
    M public_html/article.php
    M public_html/directory.php
    M public_html/index.php
    M public_html/lib-common.php
    M public_html/profiles.php
    M public_html/submit.php
    M public_html/users.php
    M public_html/usersettings.php
    M system/classes/article.class.php
    M system/classes/config.class.php
    M system/classes/language.class.php
    M system/classes/listfactory.class.php
    M system/classes/navbar.class.php
    M system/classes/search.class.php
    M system/classes/template.class.php
    M system/lib-admin.php
    M system/lib-article.php
    M system/lib-comment.php
    M system/lib-security.php
    M system/lib-template.php
    M system/lib-topic.php
    M system/lib-trackback.php
    M system/lib-user.php

  Log Message:
  -----------
  Fixed issue of 2 many file locations added by template class to check for template files

For issue #855.

CTL_setTemplateRoot before was set back when child themes support was added (not sure which Geeklog version) as a hook to run as a template preprocessor and add any theme default directories for child themes. This was fine for Geeklog Core but could create issues for plugins as the function could not tell the difference and would add in theme and theme_default root dir locations for plugins (among other custom folders).

For backwards compatibility the hook and CTL_setTemplateRoot has been left in place (but modified to perform better) since some plugins still set the template class directly or may use COM_newTemplate without CTL_core_templatePath or CTL_plugin_templatePath.

**CTL_setTemplateRoot has now been depreciated and will disappear as of Geeklog 3.0.0. This means plugins CANNOT set the template class directly like below. They will be required to use COM_newTemplate and either CTL_plugin_templatePath or CTL_core_templatePath.**

Now for COM_newTemplate, if root is passed as a single directory (not an array) it is assumed that Geeklog Core is setting the template or an old style plugin and will leave the hook in place.

If root is an array it is assumed that either CTL_core_templatePath or CTL_plugin_templatePath is being used and the hook will be removed. For more info see template class set_root function, CTL_setTemplateRoot, CTL_core_templatePath, CTL_plugin_templatePath.

Also fixed a few spots where COM_newTemplate was not being used in Geeklog Core

The template class was being set directly like:

`$T = new Template($_DLM_CONF['path_layout']);`




More information about the geeklog-cvs mailing list