eZPublishCommunityProject(LegacyStack)  2013.5
cleanup.php File Reference

Namespaces

 kernel
 Autoloader definition for eZ Publish Kernel files.
 

Variables

 $clean
 
if($siteAccess) $cleanAllItems = false
 
 $cli = eZCLI::instance()
 
 $dbHost = $options['db-host'] ? $options['db-host'] : false
 
 $dbImpl = $options['db-driver'] ? $options['db-driver'] : false
 
 $dbName = $options['db-database'] ? $options['db-database'] : false
 
 $dbPassword = $options['db-password'] ? $options['db-password'] : false
 
if(count($options['arguments'])< 1) $dbUser = $options['db-user'] ? $options['db-user'] : false
 
 $endl = $cli->endlineString()
 
 $options
 
 $script
 
 $showSQL = $options['sql'] ? true : false
 
 $siteAccess = $options['siteaccess'] ? $options['siteaccess'] : false
 
foreach($options['arguments']
as $arg) if($cleanAllItems) 
else
 

Variable Documentation

$clean
Initial value:
= array( 'session' => false,
'expired_session' => false,
'preferences' => false,
'browse' => false,
'tipafriend' => false,
'shop' => false,
'forgotpassword' => false,
'workflow' => false,
'collaboration' => false,
'collectedinformation' => false,
'notification' => false,
'searchstats' => false )
if ($siteAccess) $cleanAllItems = false
$cli = eZCLI::instance()
$dbHost = $options['db-host'] ? $options['db-host'] : false
$dbImpl = $options['db-driver'] ? $options['db-driver'] : false
$dbName = $options['db-database'] ? $options['db-database'] : false
$dbPassword = $options['db-password'] ? $options['db-password'] : false
if (count($options['arguments'])< 1) $dbUser = $options['db-user'] ? $options['db-user'] : false
$endl = $cli->endlineString()
$options
Initial value:
= $script->getOptions( "[db-host:][db-user:][db-password:][db-database:][db-type:|db-driver:][sql]",
"[name]",
array( 'db-host' => "Database host",
'db-user' => "Database user",
'db-password' => "Database password",
'db-database' => "Database name",
'db-driver' => "Database driver",
'db-type' => "Database driver, alias for --db-driver",
'sql' => "Display sql queries"
) )
$script
Definition: adddefaultstates.php:22
$script
Initial value:
= eZScript::instance( array( 'description' => ( "eZ Publish database cleanup.\n\n" .
"Will cleanup various data from the currently used database in eZ Publish\n" .
"\n" .
"Possible values for NAME is:\n" .
"session, expired_session, preferences, browse, tipafriend, shop, forgotpassword, workflow,\n" .
"collaboration, collectedinformation, notification, searchstats or all (for all items)\n" .
"cleanup.php -s admin session"),
'use-session' => false,
'use-modules' => true,
'use-extensions' => true ) )
static instance($settings=array())
Returns a shared instance of the eZScript class.
Definition: ezscript.php:1084
$showSQL = $options['sql'] ? true : false
$siteAccess = $options['siteaccess'] ? $options['siteaccess'] : false
foreach ($options['arguments'] as $arg) if ($cleanAllItems) else
Initial value:
{
if ( count( $cleanItems ) == 0 )
{
help();
$script->shutdown( 0 );
}
foreach ( $cleanItems as $name )
{
$clean[$name] = true;
}
}
function changeSiteAccessSetting( &$siteaccess, $optionData )
{
$availableSiteAccessList = $ini->variable( 'SiteAccessSettings', 'AvailableSiteAccessList' );
if ( in_array( $optionData, $availableSiteAccessList ) )
{
$siteaccess = $optionData;
$cli->output( "Using siteaccess $siteaccess for database cleanup" );
}
else
{
$cli->notice( "Siteaccess $optionData does not exist, using default siteaccess" );
}
}
if($siteAccess) changeSiteAccessSetting($siteAccess)
Definition: updateniceurls.php:75
$db
Definition: adddefaultstates.php:36
static instance($databaseImplementation=false, $databaseParameters=false, $forceNewInstance=false)
Returns a shared instance of the eZDBInterface class aka database object.
Definition: ezdb.php:117
static instance()
Returns a shared instance of the eZCLI class.
Definition: ezcli.php:710
static instance($fileName= 'site.ini', $rootDir= 'settings', $useTextCodec=null, $useCache=null, $useLocalOverrides=null, $directAccess=false, $addArrayDefinition=false)
Returns a shared instance of the eZINI class pr $fileName, $rootDir and $useLocalOverrides param comb...
Definition: ezini.php:1826
help()
Definition: ezpm.php:24
$ini
Definition: ezgeneratetranslationcache.php:58
$cli
Definition: adddefaultstates.php:14
$clean
Definition: cleanup.php:63
$script
Definition: adddefaultstates.php:22
$siteaccess
Definition: ezpm.php:196