protected static function initialize($force = false) { if (self::$initialized && !$force) { return; } self::$originalphps = array(); $knowndirs = array('autoload', 'bin', 'cronjobs', 'kernel', 'lib', 'update'); foreach ($knowndirs as $phpdir) { self::$originalphps = array_merge(self::$originalphps, self::scanDirForphps($phpdir, true)); } self::$extensionphps = array(); $extensionsdir = eZExtension::baseDirectory(); $ini = eZINI::instance('site.ini'); /// @todo take this from an ini too, to allow user to add more known php files dirs foreach ($ini->variable('ExtensionSettings', 'ActiveExtensions') as $extdir) { self::$extensionphps = array_merge(self::$extensionphps, self::scanDirForphps("{$extensionsdir}/{$extdir}", true)); } $php = 'php'; exec($php . ' -v', $output); if (count($output) && strpos($output[0], 'PHP') !== false) { self::$php = $php; } self::$initialized = true; }
<?php /** * @author G. Giunta * @copyright (C) G. Giunta 2010-2016 * @license Licensed under GNU General Public License v2.0. See file license.txt */ $warnings = phpChecker::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);