Created
March 3, 2017 09:20
-
-
Save Opencontent/8bc104f2e3ffeab04dea59b58a0d675e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require 'autoload.php'; | |
$script = eZScript::instance( array( 'description' => ( 'Check image ini' ), | |
'use-session' => false, | |
'use-modules' => true, | |
'use-extensions' => true ) ); | |
$script->startup(); | |
$options = $script->getOptions(); | |
$script->initialize(); | |
$script->setUseDebugAccumulators( true ); | |
$cli = eZCLI::instance(); | |
$ini = eZINI::instance( 'image.ini' ); | |
$aliasList = $ini->variable('AliasSettings', 'AliasList'); | |
$add = array(); | |
foreach($aliasList as $alias) | |
{ | |
if ( !$ini->hasGroup( $alias ) ) | |
{ | |
$cli->error( "No such group $alias in ini file image.ini" ); | |
} | |
else | |
{ | |
$group = $ini->group( $alias ); | |
$reference = $group['Reference']; | |
if ($reference != 'reference'){ | |
$add[] = $alias; | |
} | |
} | |
} | |
sort($add); | |
$add = array_unique($add); | |
foreach($add as $item){ | |
if ($item != 'reference'){ | |
$cli->warning("[$item]"); | |
$cli->warning("Reference=reference"); | |
$cli->warning(""); | |
} | |
} | |
$script->shutdown(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment