From e7260dc014e554ddeab0e4157736ebe4e5f2421b Mon Sep 17 00:00:00 2001 From: gggeek Date: Fri, 31 Mar 2017 14:32:58 +0100 Subject: [PATCH] Allow to get scm info from files; update copyright year; remove php closing tag --- autoloads/eztemplateautoload.php | 3 - autoloads/ggsysinfotemplateoperators.php | 2 - bin/php/report.php | 4 +- classes/contentstatsgatherer.php | 4 +- classes/dbchecker.php | 3 +- classes/ezcGraphGdDriver2.php | 2 - classes/ezinactiveextensionloader.php | 2 +- classes/ezlogsgrapher.php | 3 +- classes/ezmodulelister.php | 4 +- classes/ezsysinfoclustermanager.php | 2 +- classes/ezsysinfomodule.php | 2 +- classes/ezsysinfoscmchecker.php | 93 +++++++++++++++---- classes/inichecker.php | 2 +- classes/phpchecker.php | 2 +- classes/reportgenerator.php | 2 +- classes/reports/ezcontentclassesreport.php | 2 +- classes/reports/ezinireport.php | 2 +- classes/reports/ezpoliciesreport.php | 2 +- classes/reports/ezworkflowsreport.php | 2 +- classes/statustests/sysinfotests.php | 2 +- classes/sysinfomodule.php | 2 +- classes/sysinfotools.php | 2 +- classes/systemchecker.php | 2 +- classes/tplchecker.php | 2 +- classes/viewgroups/ezsysinfobaseviewgroup.php | 2 +- .../ezsysinfodevelopmentviewgroup.php | 2 +- .../ezsysinfoezpublishviewgroup.php | 2 +- .../viewgroups/ezsysinfoindexviewgroup.php | 2 +- classes/viewgroups/ezsysinfophpviewgroup.php | 2 +- classes/viewgroups/ezsysinfoqaviewgroup.php | 2 +- .../viewgroups/ezsysinforeportsviewgroup.php | 2 +- composer.json | 2 +- doc/changelogs/CHANGELOG-0.9.3-to-0.9.4 | 4 + doc/changelogs/CHANGELOG-0.9.4-to-0.9.5 | 4 + extension.xml | 4 +- ezinfo.php | 4 +- interfaces/ezsysinfoviewgroup.php | 2 +- modules/sysinfo/acceleratorplus.php | 4 +- modules/sysinfo/apc.php | 4 +- modules/sysinfo/cachesearch.php | 4 +- modules/sysinfo/cachestats.php | 2 +- modules/sysinfo/classesreport.php | 1 - modules/sysinfo/clustercachestats.php | 2 +- modules/sysinfo/clustermasterview.php | 2 +- modules/sysinfo/clusterslaveview.php | 2 +- modules/sysinfo/clusterstoragestats.php | 2 +- modules/sysinfo/contentstats.php | 4 +- modules/sysinfo/customlogview.php | 2 +- modules/sysinfo/databaseqa.php | 4 +- modules/sysinfo/eaccelerator.php | 4 +- modules/sysinfo/eventtypelist.php | 2 +- modules/sysinfo/fetchlist.php | 4 +- modules/sysinfo/genericview.php | 2 +- modules/sysinfo/index.php | 2 - modules/sysinfo/inifilesqa.php | 4 +- modules/sysinfo/inisettingsqa.php | 4 +- modules/sysinfo/logchurn.php | 2 +- modules/sysinfo/logstats.php | 2 +- modules/sysinfo/logview.php | 2 +- modules/sysinfo/modulelist.php | 4 +- modules/sysinfo/mysqli.php | 4 +- modules/sysinfo/operationlist.php | 4 +- modules/sysinfo/operatorlist.php | 4 +- modules/sysinfo/php.php | 4 +- modules/sysinfo/phpfilesqa.php | 2 +- modules/sysinfo/policiesreport.php | 2 - modules/sysinfo/policylist.php | 4 +- modules/sysinfo/realpath.php | 2 +- modules/sysinfo/secinfo.php | 4 +- modules/sysinfo/sourcerevision.php | 2 +- modules/sysinfo/storagechurn.php | 4 +- modules/sysinfo/storagestats.php | 2 +- modules/sysinfo/systemcheck.php | 4 +- modules/sysinfo/systemstatus.php | 3 +- modules/sysinfo/tplfilesqa.php | 2 +- modules/sysinfo/viewlist.php | 4 +- modules/sysinfo/wincache.php | 4 +- modules/sysinfo/workflowsreport.php | 2 +- modules/sysinfo/xcache.php | 4 +- settings/cronjob.ini.append.php | 2 - settings/design.ini.append.php | 2 - settings/menu.ini.append.php | 2 - settings/module.ini.append.php | 2 - settings/site.ini.append.php | 2 - settings/sysinfo.ini | 5 + 85 files changed, 160 insertions(+), 163 deletions(-) create mode 100644 doc/changelogs/CHANGELOG-0.9.3-to-0.9.4 create mode 100644 doc/changelogs/CHANGELOG-0.9.4-to-0.9.5 diff --git a/autoloads/eztemplateautoload.php b/autoloads/eztemplateautoload.php index e8c224c..6ba289d 100644 --- a/autoloads/eztemplateautoload.php +++ b/autoloads/eztemplateautoload.php @@ -4,6 +4,3 @@ $eZTemplateOperatorArray[] = array( 'script' => 'extension/ggsysinfo/autoloads/ggsysinfotemplateoperators.php', 'class' => 'ggSysinfoTemplateOperators', 'operator_names' => array_keys( ggSysinfoTemplateOperators::$operators ) ); - - -?> diff --git a/autoloads/ggsysinfotemplateoperators.php b/autoloads/ggsysinfotemplateoperators.php index 3dc3018..4f1a0fe 100644 --- a/autoloads/ggsysinfotemplateoperators.php +++ b/autoloads/ggsysinfotemplateoperators.php @@ -89,5 +89,3 @@ public function modify( $tpl, $operatorName, $operatorParameters, $rootNamespace } } - -?> diff --git a/bin/php/report.php b/bin/php/report.php index 78f39c2..74f9cdc 100644 --- a/bin/php/report.php +++ b/bin/php/report.php @@ -8,7 +8,7 @@ * also this script uses a custom autoloader for php classes * * @author G. Giunta - * @copyright (C) G. Giunta 2012-2016 + * @copyright (C) G. Giunta 2012-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo add options to let users to select which tests to run when running status report (ALL by default) @@ -196,5 +196,3 @@ public static function autoloadCallback( $php, $label ) } } } - -?> \ No newline at end of file diff --git a/classes/contentstatsgatherer.php b/classes/contentstatsgatherer.php index d02e21e..41aa07f 100644 --- a/classes/contentstatsgatherer.php +++ b/classes/contentstatsgatherer.php @@ -2,7 +2,7 @@ /** * * @author G. Giunta - * @copyright (C) G. Giunta 2012-2016 + * @copyright (C) G. Giunta 2012-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo add more classes of content that have no stats in main admin interface @@ -85,5 +85,3 @@ static function gather() return $contentList; } } - -?> diff --git a/classes/dbchecker.php b/classes/dbchecker.php index 4388869..4abac89 100644 --- a/classes/dbchecker.php +++ b/classes/dbchecker.php @@ -1,7 +1,7 @@ \ No newline at end of file diff --git a/classes/ezcGraphGdDriver2.php b/classes/ezcGraphGdDriver2.php index 5fb34e8..27a2598 100644 --- a/classes/ezcGraphGdDriver2.php +++ b/classes/ezcGraphGdDriver2.php @@ -13,5 +13,3 @@ public function render( $file ) parent::render( $file ); } } - -?> diff --git a/classes/ezinactiveextensionloader.php b/classes/ezinactiveextensionloader.php index 1656feb..9c618b5 100644 --- a/classes/ezinactiveextensionloader.php +++ b/classes/ezinactiveextensionloader.php @@ -1,7 +1,7 @@ diff --git a/classes/ezmodulelister.php b/classes/ezmodulelister.php index 0abfe4d..a3a7945 100644 --- a/classes/ezmodulelister.php +++ b/classes/ezmodulelister.php @@ -4,7 +4,7 @@ * Copied here from ezwebservicesapi and renamed to avoid clashes * * @author G. Giunta - * @copyright (C) G. Giunta 2010-2016 + * @copyright (C) G. Giunta 2010-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt */ @@ -39,5 +39,3 @@ static function getModuleList() }*/ } - -?> \ No newline at end of file diff --git a/classes/ezsysinfoclustermanager.php b/classes/ezsysinfoclustermanager.php index 7912110..45511f9 100644 --- a/classes/ezsysinfoclustermanager.php +++ b/classes/ezsysinfoclustermanager.php @@ -1,7 +1,7 @@ variable('SCMSettings', 'RepoType'); + + $dirs = self::getScmDir($type); if (!$dirs) { return array(); } @@ -53,37 +55,92 @@ public static function getScmInfo() continue; } - $revisionInfo = array(); - exec( "cd $dir && git log -1", $revisionInfo, $retcode ); + switch( $type ) + { + case 'git': + $out[$name] = static::getRevisionInfoFromGit($dir); + break; + case 'file': + $out[$name] = static::getRevisionInfoFromFiles($dir); + break; + default: + eZDebug::writeError( "Unsupported scm type '$type'", __METHOD__ ); + } + } + + return $out; + } + + /** + * @param string $dir + * @return array + * @todo add check that 'git' is executable + */ + protected static function getRevisionInfoFromGit( $dir ) + { + $revisionInfo = array(); + exec( "cd $dir && git log -1", $revisionInfo, $retcode ); - $statusInfo = array(); - exec( "cd $dir && git status", $statusInfo, $retcode ); + $statusInfo = array(); + exec( "cd $dir && git status", $statusInfo, $retcode ); - $tagInfo = array(); - exec( "cd $dir && git describe", $tagInfo, $retcode ); + $tagInfo = array(); + exec( "cd $dir && git describe", $tagInfo, $retcode ); - $out[$name] = array( - 'revision_info' => $revisionInfo, - 'status_info' => $statusInfo, - 'tag_info' => $tagInfo - ); + return array( + 'revision_info' => $revisionInfo, + 'status_info' => $statusInfo, + 'tag_info' => $tagInfo + ); + } + + protected static function getRevisionInfoFromFiles( $dir ) + { + $revisionInfo = array(); + if ( is_file( "$dir/revision.txt" ) ) + { + $revisionInfo = file( "$dir/revision.txt", FILE_IGNORE_NEW_LINES ); } - return $out; + $statusInfo = array(); + if ( is_file( "$dir/status.txt" ) ) + { + $revisionInfo = file( "$dir/status.txt", FILE_IGNORE_NEW_LINES ); + } + + $tagInfo = array(); + if ( is_file( "$dir/tag.txt" ) ) + { + $revisionInfo = file( "$dir/tag.txt", FILE_IGNORE_NEW_LINES ); + } + + return array( + 'revision_info' => $revisionInfo, + 'status_info' => $statusInfo, + 'tag_info' => $tagInfo + ); } /** * @return false|array|string */ - protected static function getScmDir() + protected static function getScmDir($type) { $ini = eZINI::instance( 'sysinfo.ini' ); - $dir = $ini->variable('SCMSettings', 'RepoDir'); - if ($dir !== '') + $dir = $ini->variable( 'SCMSettings', 'RepoDir' ); + if ( $dir !== '' ) { return $dir; } - return is_dir( './.git' ) ? './.git' : ( is_dir( '../.git' ) && is_file( '../ezpublish/EzPublishKernel.php' ) ? '../.git' : false ); + switch($type) + { + case 'git': + return is_dir( './.git' ) ? './.git' : ( is_dir( '../.git' ) && is_file( '../ezpublish/EzPublishKernel.php' ) ? '../.git' : false ); + case 'file': + default: + eZDebug::writeError( "Can not find info from scm type '$type' with an empty directory", __METHOD__ ); + return false; + } } } diff --git a/classes/inichecker.php b/classes/inichecker.php index 1826ab2..0ebaecf 100644 --- a/classes/inichecker.php +++ b/classes/inichecker.php @@ -1,7 +1,7 @@ =5.3", + "php": ">=5.3", "ezsystems/ezpublish-legacy-installer": "*", "zetacomponents/graph": ">=1.5.2" }, diff --git a/doc/changelogs/CHANGELOG-0.9.3-to-0.9.4 b/doc/changelogs/CHANGELOG-0.9.3-to-0.9.4 new file mode 100644 index 0000000..0e096fe --- /dev/null +++ b/doc/changelogs/CHANGELOG-0.9.3-to-0.9.4 @@ -0,0 +1,4 @@ +Changes from 0.9.3 to 0.9.4 - released 2016/9/9 + +Fixed: +- Fix a warning when generating reports diff --git a/doc/changelogs/CHANGELOG-0.9.4-to-0.9.5 b/doc/changelogs/CHANGELOG-0.9.4-to-0.9.5 new file mode 100644 index 0000000..91cc14f --- /dev/null +++ b/doc/changelogs/CHANGELOG-0.9.4-to-0.9.5 @@ -0,0 +1,4 @@ +Changes from 0.9.4 to 0.9.5 - released 2017/3/31 + +New: +- allow to get SCM info from a set of files (eg. generated by a deployment script) diff --git a/extension.xml b/extension.xml index c010495..399a3de 100644 --- a/extension.xml +++ b/extension.xml @@ -2,8 +2,8 @@ ggsysinfo - 0.9.3 - Copyright (C) 2008-2016 Gaetano Giunta + 0.9.5 + Copyright (C) 2008-2017 Gaetano Giunta GNU General Public License v2.0 diff --git a/ezinfo.php b/ezinfo.php index a3aab03..1d0fdca 100644 --- a/ezinfo.php +++ b/ezinfo.php @@ -5,8 +5,8 @@ class ggsysinfoInfo static function info() { return array( 'Name' => "ggsysinfo", - 'Version' => "0.9.3", - 'Copyright' => "Copyright (C) 2008-2016 Gaetano Giunta", + 'Version' => "0.9.5", + 'Copyright' => "Copyright (C) 2008-2017 Gaetano Giunta", 'License' => "GNU General Public License v2.0" ); } diff --git a/interfaces/ezsysinfoviewgroup.php b/interfaces/ezsysinfoviewgroup.php index 0f4a6c6..e88210f 100644 --- a/interfaces/ezsysinfoviewgroup.php +++ b/interfaces/ezsysinfoviewgroup.php @@ -1,7 +1,7 @@ setVariable( 'css', 'acceleratorplus.css' ); $tpl->setVariable( 'info', $output ); - -?> diff --git a/modules/sysinfo/apc.php b/modules/sysinfo/apc.php index d2c676c..8b26e9b 100644 --- a/modules/sysinfo/apc.php +++ b/modules/sysinfo/apc.php @@ -2,7 +2,7 @@ /** * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt */ @@ -32,5 +32,3 @@ $tpl->setVariable( 'css', 'apc.css' ); $tpl->setVariable( 'info', $output ); - -?> diff --git a/modules/sysinfo/cachesearch.php b/modules/sysinfo/cachesearch.php index 13f563e..6a61702 100644 --- a/modules/sysinfo/cachesearch.php +++ b/modules/sysinfo/cachesearch.php @@ -2,7 +2,7 @@ /** * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo add support for offset, to facilitate display of long searches results @@ -82,5 +82,3 @@ $tpl->setVariable( 'cachelist', $cacheDirsList2 ); $tpl->setVariable( 'deletedfiles', $deletedfiles ); $tpl->setVariable( 'is_regexp', $is_regexp ); - -?> diff --git a/modules/sysinfo/cachestats.php b/modules/sysinfo/cachestats.php index 4aa644b..f32c47e 100644 --- a/modules/sysinfo/cachestats.php +++ b/modules/sysinfo/cachestats.php @@ -2,7 +2,7 @@ /** * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo add more details, such as dates of first/last files diff --git a/modules/sysinfo/classesreport.php b/modules/sysinfo/classesreport.php index 5308ffd..e75b7b2 100644 --- a/modules/sysinfo/classesreport.php +++ b/modules/sysinfo/classesreport.php @@ -1,3 +1,2 @@ \ No newline at end of file diff --git a/modules/sysinfo/clustercachestats.php b/modules/sysinfo/clustercachestats.php index a406125..3c17720 100644 --- a/modules/sysinfo/clustercachestats.php +++ b/modules/sysinfo/clustercachestats.php @@ -2,7 +2,7 @@ /** * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo add more details, such as dates of first/last files diff --git a/modules/sysinfo/clustermasterview.php b/modules/sysinfo/clustermasterview.php index 56d61fe..abf2622 100644 --- a/modules/sysinfo/clustermasterview.php +++ b/modules/sysinfo/clustermasterview.php @@ -6,7 +6,7 @@ * Mode of operation: iframe contents are served from this same view, which acts as a proxy, requesting the data from other nodes * * @author G. Giunta - * @copyright (C) G. Giunta 2014-2016 + * @copyright (C) G. Giunta 2014-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo use a 3-level path, with the name of the group as 2nd element ? diff --git a/modules/sysinfo/clusterslaveview.php b/modules/sysinfo/clusterslaveview.php index db3a11f..912581c 100644 --- a/modules/sysinfo/clusterslaveview.php +++ b/modules/sysinfo/clusterslaveview.php @@ -1,7 +1,7 @@ setVariable( 'contentlist', contentStatsGatherer::gather() ); - -?> diff --git a/modules/sysinfo/customlogview.php b/modules/sysinfo/customlogview.php index 671038e..5c2e687 100644 --- a/modules/sysinfo/customlogview.php +++ b/modules/sysinfo/customlogview.php @@ -3,7 +3,7 @@ * Display a log file * * @author G. Giunta - * @copyright (C) G. Giunta 2014-2016 + * @copyright (C) G. Giunta 2014-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo add support for if-modified-since, etag headers diff --git a/modules/sysinfo/databaseqa.php b/modules/sysinfo/databaseqa.php index 1781adb..c44bbcf 100644 --- a/modules/sysinfo/databaseqa.php +++ b/modules/sysinfo/databaseqa.php @@ -1,12 +1,10 @@ setVariable( 'warnings', $warnings ); - -?> \ No newline at end of file diff --git a/modules/sysinfo/eaccelerator.php b/modules/sysinfo/eaccelerator.php index 6686ee0..9785130 100644 --- a/modules/sysinfo/eaccelerator.php +++ b/modules/sysinfo/eaccelerator.php @@ -2,7 +2,7 @@ /** * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt */ @@ -17,5 +17,3 @@ $tpl->setVariable( 'css', 'eaccelerator.css' ); $tpl->setVariable( 'info', $output ); - -?> diff --git a/modules/sysinfo/eventtypelist.php b/modules/sysinfo/eventtypelist.php index ed17b54..4eb2425 100644 --- a/modules/sysinfo/eventtypelist.php +++ b/modules/sysinfo/eventtypelist.php @@ -3,7 +3,7 @@ * List all existing workflow event types * * @author G. Giunta - * @copyright (C) G. Giunta 2014-2016 + * @copyright (C) G. Giunta 2014-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo allow filtering by extension diff --git a/modules/sysinfo/fetchlist.php b/modules/sysinfo/fetchlist.php index 1c46668..cb39c19 100644 --- a/modules/sysinfo/fetchlist.php +++ b/modules/sysinfo/fetchlist.php @@ -2,7 +2,7 @@ /** * List all existing fetch functions (optionally, in a given module) * @author G. Giunta - * @copyright (C) G. Giunta 2010-2016 + * @copyright (C) G. Giunta 2010-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * */ @@ -84,5 +84,3 @@ $tpl->setVariable( 'sdkversion', eZPublishSDK::version() ); $tpl->setVariable( 'ezgeshi_available', $ezgeshi_available ); $tpl->setVariable( 'source_available', sysInfoTools::sourceCodeAvailable( eZPublishSDK::version() ) ); - -?> diff --git a/modules/sysinfo/genericview.php b/modules/sysinfo/genericview.php index 138bb28..517f14f 100644 --- a/modules/sysinfo/genericview.php +++ b/modules/sysinfo/genericview.php @@ -4,7 +4,7 @@ * It supports "cluster-slave-node" mode, where page navigation elements are not displayed * * @author G. Giunta - * @copyright (C) G. Giunta 2010-2016 + * @copyright (C) G. Giunta 2010-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo use a 3-level path, with the name of the group as 2nd element ? diff --git a/modules/sysinfo/index.php b/modules/sysinfo/index.php index 684c884..4f15fec 100644 --- a/modules/sysinfo/index.php +++ b/modules/sysinfo/index.php @@ -1,5 +1,3 @@ setVariable( 'groups', ezSysinfoModule::groupList() ); - -?> \ No newline at end of file diff --git a/modules/sysinfo/inifilesqa.php b/modules/sysinfo/inifilesqa.php index 01a60c5..28baf7c 100644 --- a/modules/sysinfo/inifilesqa.php +++ b/modules/sysinfo/inifilesqa.php @@ -1,7 +1,7 @@ setVariable( 'warnings', $warnings ); $tpl->setVariable( 'ezgeshi_available', $ezgeshi_available ); - -?> \ No newline at end of file diff --git a/modules/sysinfo/inisettingsqa.php b/modules/sysinfo/inisettingsqa.php index 5596f7d..b707378 100644 --- a/modules/sysinfo/inisettingsqa.php +++ b/modules/sysinfo/inisettingsqa.php @@ -1,7 +1,7 @@ setVariable( 'warnings', $warnings ); $tpl->setVariable( 'ezgeshi_available', $ezgeshi_available ); - -?> \ No newline at end of file diff --git a/modules/sysinfo/logchurn.php b/modules/sysinfo/logchurn.php index 9f7ac9a..e46e8f8 100644 --- a/modules/sysinfo/logchurn.php +++ b/modules/sysinfo/logchurn.php @@ -3,7 +3,7 @@ * Create a graph of messages-per-minute by analyzing error logs * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo add support for user-selected start and end date diff --git a/modules/sysinfo/logstats.php b/modules/sysinfo/logstats.php index 3005ad0..6b9891b 100644 --- a/modules/sysinfo/logstats.php +++ b/modules/sysinfo/logstats.php @@ -2,7 +2,7 @@ /** * * @author G. Giunta - * @copyright (C) G. Giunta 2010-2016 + * @copyright (C) G. Giunta 2010-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo sort logs by criticity diff --git a/modules/sysinfo/logview.php b/modules/sysinfo/logview.php index 9d69e3a..671b87f 100644 --- a/modules/sysinfo/logview.php +++ b/modules/sysinfo/logview.php @@ -4,7 +4,7 @@ * Now with support for "raw" version as well * * @author G. Giunta - * @copyright (C) G. Giunta 2010-2016 + * @copyright (C) G. Giunta 2010-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo add support for user-selected start and end date (offset/limit?) diff --git a/modules/sysinfo/modulelist.php b/modules/sysinfo/modulelist.php index c3f4f89..1618be9 100644 --- a/modules/sysinfo/modulelist.php +++ b/modules/sysinfo/modulelist.php @@ -2,7 +2,7 @@ /** * List all existing modules (optionally, in a given extension) * @author G. Giunta - * @copyright (C) G. Giunta 2010-2016 + * @copyright (C) G. Giunta 2010-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * */ @@ -58,5 +58,3 @@ $tpl->setVariable( 'sdkversion', eZPublishSDK::version() ); $tpl->setVariable( 'ezgeshi_available', $ezgeshi_available ); $tpl->setVariable( 'source_available', sysInfoTools::sourceCodeAvailable( eZPublishSDK::version() ) ); - -?> diff --git a/modules/sysinfo/mysqli.php b/modules/sysinfo/mysqli.php index 9cf69f1..572fdad 100644 --- a/modules/sysinfo/mysqli.php +++ b/modules/sysinfo/mysqli.php @@ -1,7 +1,7 @@ setVariable( 'stats', $stats ); $tpl->setVariable( 'mysqlnd_available', $mysqlnd_available ); $tpl->setVariable( 'important_stats', array( 'slow_queries', 'connect_failure' ) ); - -?> \ No newline at end of file diff --git a/modules/sysinfo/operationlist.php b/modules/sysinfo/operationlist.php index 28c75df..1d0c69d 100644 --- a/modules/sysinfo/operationlist.php +++ b/modules/sysinfo/operationlist.php @@ -2,7 +2,7 @@ /** * List all existing operations (optionally, in a given module) * @author G. Giunta - * @copyright (C) G. Giunta 2010-2016 + * @copyright (C) G. Giunta 2010-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * */ @@ -80,5 +80,3 @@ $tpl->setVariable( 'sdkversion', eZPublishSDK::version() ); $tpl->setVariable( 'ezgeshi_available', $ezgeshi_available ); $tpl->setVariable( 'source_available', sysInfoTools::sourceCodeAvailable( eZPublishSDK::version() ) ); - -?> diff --git a/modules/sysinfo/operatorlist.php b/modules/sysinfo/operatorlist.php index 85df159..86b9add 100644 --- a/modules/sysinfo/operatorlist.php +++ b/modules/sysinfo/operatorlist.php @@ -3,7 +3,7 @@ * List all existing tpl ops (optionally, in a given extension) * * @author G. Giunta - * @copyright (C) G. Giunta 2014-2016 + * @copyright (C) G. Giunta 2014-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * */ @@ -68,5 +68,3 @@ $tpl->setVariable( 'sdkversion', eZPublishSDK::version() ); $tpl->setVariable( 'ezgeshi_available', $ezgeshi_available ); $tpl->setVariable( 'source_available', sysInfoTools::sourceCodeAvailable( eZPublishSDK::version() ) ); - -?> diff --git a/modules/sysinfo/php.php b/modules/sysinfo/php.php index cda2877..b933afd 100644 --- a/modules/sysinfo/php.php +++ b/modules/sysinfo/php.php @@ -2,7 +2,7 @@ /** * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt */ @@ -14,5 +14,3 @@ $tpl->setVariable( 'css', 'php.css' ); $tpl->setVariable( 'info', $output ); - -?> diff --git a/modules/sysinfo/phpfilesqa.php b/modules/sysinfo/phpfilesqa.php index caaeda8..8d5dec5 100644 --- a/modules/sysinfo/phpfilesqa.php +++ b/modules/sysinfo/phpfilesqa.php @@ -1,7 +1,7 @@ setVariable( 'roles', ezPoliciesReport::getRoles() ); - -?> \ No newline at end of file diff --git a/modules/sysinfo/policylist.php b/modules/sysinfo/policylist.php index 85ac4eb..0cafc14 100644 --- a/modules/sysinfo/policylist.php +++ b/modules/sysinfo/policylist.php @@ -2,7 +2,7 @@ /** * List all existing policy functions (optionally, in a given module) * @author G. Giunta - * @copyright (C) G. Giunta 2010-2016 + * @copyright (C) G. Giunta 2010-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * */ @@ -52,5 +52,3 @@ $tpl->setVariable( 'title', $title ); $tpl->setVariable( 'policylist', $policyList ); - -?> diff --git a/modules/sysinfo/realpath.php b/modules/sysinfo/realpath.php index 2051a06..fbf2d19 100644 --- a/modules/sysinfo/realpath.php +++ b/modules/sysinfo/realpath.php @@ -8,4 +8,4 @@ 'entries' => count( realpath_cache_get() ), 'ttl' => ini_get( 'realpath_cache_ttl' ) ) -); \ No newline at end of file +); diff --git a/modules/sysinfo/secinfo.php b/modules/sysinfo/secinfo.php index 76b9a95..3fae80e 100644 --- a/modules/sysinfo/secinfo.php +++ b/modules/sysinfo/secinfo.php @@ -3,7 +3,7 @@ * Tests security of eZ Publish install. Based on phpsecinfo tests * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt */ @@ -16,5 +16,3 @@ unset( $results['test_results']['Core']['file_uploads'] ); $tpl->setVariable( 'results', $results ); - -?> \ No newline at end of file diff --git a/modules/sysinfo/sourcerevision.php b/modules/sysinfo/sourcerevision.php index 95f07fb..58e14a1 100644 --- a/modules/sysinfo/sourcerevision.php +++ b/modules/sysinfo/sourcerevision.php @@ -1,3 +1,3 @@ setVariable( 'info', eZSysinfoSCMChecker::getScmInfo() ); \ No newline at end of file +$tpl->setVariable( 'info', eZSysinfoSCMChecker::getScmInfo() ); diff --git a/modules/sysinfo/storagechurn.php b/modules/sysinfo/storagechurn.php index eb1f2fa..9c95484 100644 --- a/modules/sysinfo/storagechurn.php +++ b/modules/sysinfo/storagechurn.php @@ -3,7 +3,7 @@ * Create a graph of files-per-minute by analyzing storage.log * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo add support for user-selected start and end date @@ -89,5 +89,3 @@ $tpl->setVariable( 'graphsource', $cachefile ); $tpl->setVariable( 'errormsg', $errormsg ); - -?> \ No newline at end of file diff --git a/modules/sysinfo/storagestats.php b/modules/sysinfo/storagestats.php index 4120402..591de24 100644 --- a/modules/sysinfo/storagestats.php +++ b/modules/sysinfo/storagestats.php @@ -2,7 +2,7 @@ /** * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt * * @todo add more details, such as dates of first/last files diff --git a/modules/sysinfo/systemcheck.php b/modules/sysinfo/systemcheck.php index 64a6a9e..69a73bd 100644 --- a/modules/sysinfo/systemcheck.php +++ b/modules/sysinfo/systemcheck.php @@ -1,12 +1,10 @@ setVariable( 'warnings', $warnings ); - -?> \ No newline at end of file diff --git a/modules/sysinfo/systemstatus.php b/modules/sysinfo/systemstatus.php index 6c97a3f..4fd4861 100644 --- a/modules/sysinfo/systemstatus.php +++ b/modules/sysinfo/systemstatus.php @@ -5,7 +5,7 @@ * NB: some tests are enabled/disabled depending upon config in sysinfo.ini * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt */ @@ -34,4 +34,3 @@ $tpl->setVariable( 'testslist', $testsList ); $tpl->setVariable( 'ezsnmpd_available', $ezsnmpd_available ); - diff --git a/modules/sysinfo/tplfilesqa.php b/modules/sysinfo/tplfilesqa.php index 93c4c9b..45b520d 100644 --- a/modules/sysinfo/tplfilesqa.php +++ b/modules/sysinfo/tplfilesqa.php @@ -1,7 +1,7 @@ setVariable( 'sdkversion', eZPublishSDK::version() ); $tpl->setVariable( 'ezgeshi_available', $ezgeshi_available ); $tpl->setVariable( 'source_available', sysInfoTools::sourceCodeAvailable( eZPublishSDK::version() ) ); - -?> diff --git a/modules/sysinfo/wincache.php b/modules/sysinfo/wincache.php index 4d29f9d..532898a 100644 --- a/modules/sysinfo/wincache.php +++ b/modules/sysinfo/wincache.php @@ -2,7 +2,7 @@ /** * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt */ @@ -15,5 +15,3 @@ $tpl->setVariable( 'css', 'wincache.css' ); $tpl->setVariable( 'info', $output ); - -?> diff --git a/modules/sysinfo/workflowsreport.php b/modules/sysinfo/workflowsreport.php index 0f365c2..0bafb99 100644 --- a/modules/sysinfo/workflowsreport.php +++ b/modules/sysinfo/workflowsreport.php @@ -4,4 +4,4 @@ $triggers = eZTrigger::fetchList(); $tpl->setVariable( 'workflows', $workflows ); -$tpl->setVariable( 'triggers', $triggers ); \ No newline at end of file +$tpl->setVariable( 'triggers', $triggers ); diff --git a/modules/sysinfo/xcache.php b/modules/sysinfo/xcache.php index 7d54004..99334ae 100644 --- a/modules/sysinfo/xcache.php +++ b/modules/sysinfo/xcache.php @@ -2,7 +2,7 @@ /** * * @author G. Giunta - * @copyright (C) G. Giunta 2008-2016 + * @copyright (C) G. Giunta 2008-2017 * @license Licensed under GNU General Public License v2.0. See file license.txt */ @@ -14,5 +14,3 @@ $output = preg_replace( array( '#^.*#s','#.*$#s' ), '', $output ); $tpl->setVariable( 'info', $output ); - -?> diff --git a/settings/cronjob.ini.append.php b/settings/cronjob.ini.append.php index e71f27f..e2d90ad 100644 --- a/settings/cronjob.ini.append.php +++ b/settings/cronjob.ini.append.php @@ -4,5 +4,3 @@ #[CronjobSettings] #ExtensionDirectories[]=ggsysinfo - -*/ ?> \ No newline at end of file diff --git a/settings/design.ini.append.php b/settings/design.ini.append.php index 1efec16..8a4c7b3 100644 --- a/settings/design.ini.append.php +++ b/settings/design.ini.append.php @@ -2,5 +2,3 @@ [ExtensionSettings] DesignExtensions[]=ggsysinfo - -*/?> \ No newline at end of file diff --git a/settings/menu.ini.append.php b/settings/menu.ini.append.php index 79cd699..c24bf0c 100644 --- a/settings/menu.ini.append.php +++ b/settings/menu.ini.append.php @@ -27,5 +27,3 @@ # current user has access to the setup/system_info policy # You can disable it if you use PolicyOmitList to allow access to the sysinfo module PolicyList[]=setup/system_info - -*/ ?> \ No newline at end of file diff --git a/settings/module.ini.append.php b/settings/module.ini.append.php index cc9bdf9..e8bf3d7 100644 --- a/settings/module.ini.append.php +++ b/settings/module.ini.append.php @@ -4,5 +4,3 @@ ExtensionRepositories[]=ggsysinfo ModuleList[]=sysinfo - -*/?> \ No newline at end of file diff --git a/settings/site.ini.append.php b/settings/site.ini.append.php index 32b436c..a3e2898 100644 --- a/settings/site.ini.append.php +++ b/settings/site.ini.append.php @@ -28,5 +28,3 @@ [Cache_sysinfo] name=ggSysInfo extension graph cache path=sysinfo - -*/ ?> \ No newline at end of file diff --git a/settings/sysinfo.ini b/settings/sysinfo.ini index ca542c2..64d57ab 100644 --- a/settings/sysinfo.ini +++ b/settings/sysinfo.ini @@ -78,9 +78,14 @@ TokenSecret=ChangeMePlease TokenTTL=300 [SCMSettings] + # Used in the tpl for SCM INFO RepoLink= RepoName= + +# 'git' and 'file' supported at this time. +# If 'file' we expect to find, in each of the dirs for RepoDir 3 files: revision.txt, status.txt and tag.txt +RepoType=git # Set this to force the directory used to check source code version. # Useful f.e. if there is a .git dir in the ezp_legacy directory # Can be either a string (single directory) or an array (many dirs)