Author Topic

gilles guirand

Wednesday 05 January 2011 8:19:17 am

Comment64811

You could also play with the setVariable (eZINI) method to temporary unset some ini (like the smart view cache)

@Nicolas : I found today another method in Kaliop's code (@g4vroche copyright)

private function disablePublishOperation( $index )
    {
        if( !isset( $GLOBALS['eZGlobalModuleOperationList']['content'] ) )
        {
            $moduleOperationInfo = new eZModuleOperationInfo( 'content', false );
            $moduleOperationInfo->loadDefinition();

            $GLOBALS['eZGlobalModuleOperationList']['content'] = $moduleOperationInfo;
        }

        unset(  $GLOBALS['eZGlobalModuleOperationList']['content']->OperationList['publish']['body'][$index] );

    }

So, to disable cache cleaning :

self::disablePublishOperation( 13 );
 self::disablePublishOperation( 14 );

--
Gilles Guirand
eZ Community Board Member
http://twitter.com/gandbox
http://www.gandbox.fr