protected static function initialize($force = false) { if (self::$initialized && !$force) { return; } self::$originaltpls = array(); $knowndirs = array('design'); foreach ($knowndirs as $phpdir) { self::$originaltpls = array_merge(self::$originaltpls, self::scanDirFortpls($phpdir, true)); } self::$extensiontpls = array(); $extensionsdir = eZExtension::baseDirectory(); $ini = eZINI::instance('design.ini'); /// @todo take this from an ini too, to allow user to add more known php files dirs foreach ($ini->variable('ExtensionSettings', 'DesignExtensions') as $extdir) { self::$extensiontpls = array_merge(self::$extensiontpls, self::scanDirFortpls("{$extensionsdir}/{$extdir}/design", true)); } self::$tpl = sysInfoTools::eZTemplateFactory(); self::$initialized = true; }
<?php /** * @author G. Giunta * @copyright (C) G. Giunta 2014-2016 * @license Licensed under GNU General Public License v2.0. See file license.txt */ $warnings = tplChecker::checkFileContents(); $ezgeshi_available = sysInfoTools::ezgeshiAvailable(); if ($Params['viewmode'] == 'json') { $response_type = $Params['viewmode']; $response_data = $warnings; return; } $tpl->setVariable('warnings', $warnings); $tpl->setVariable('ezgeshi_available', $ezgeshi_available);