CLI sript - remove object - language

Author Message

Martin Jerie

Thursday 26 August 2010 10:34:47 pm

Hi,

in my CLI sript i use function eZContentObjectTreeNode::removeSubtrees to remove object (file)

If object is in main language it works fine, but if object is created only in different language function does'nt remove it.

Thanks for your help,
Martin

Nicolas Pastorino

Thursday 26 August 2010 11:15:42 pm

Hi Martin,

If you are removing one object only, you may want to consider the purge() method of the eZContentObject class.
Check it here : http://github.com/ezsystems/ezpublish/blob/master/kernel/classes/ezcontentobject.php#L1704

Caution though : it *really* purges about anything related to the object :)

Cheers !

--
Nicolas Pastorino
Director Community - eZ
Member of the Community Project Board

eZ Publish Community on twitter: http://twitter.com/ezcommunity

t : http://twitter.com/jeanvoye
G+ : http://plus.tl/jeanvoye

Jérôme Vieilledent

Friday 27 August 2010 8:23:38 am

Or you can install SQLIImport content framework : http://svn.projects.ez.no/sqliimport/trunk/stubs/contentremove.php ;-).

You will find the doc in the downloads section.

Enjoy !

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 21:08:56
Script start
Timing: Jan 30 2025 21:08:56
Module start 'layout'
Timing: Jan 30 2025 21:08:56
Module start 'content'
Timing: Jan 30 2025 21:08:56
Module end 'content'
Timing: Jan 30 2025 21:08:56
Script end

Main resources:

Total runtime0.0235 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 588.1406151.2109
Module start 'layout' 0.00590.0046 739.3516220.6875
Module start 'content' 0.01050.0115 960.0391997.8984
Module end 'content' 0.02200.0014 1,957.937533.9922
Script end 0.0235  1,991.9297 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002611.2451140.0002
Check MTime0.00104.3854140.0001
Mysql Total
Database connection0.00072.823710.0007
Mysqli_queries0.004719.868630.0016
Looping result0.00000.051810.0000
Template Total0.00114.610.0011
Template load0.00093.627910.0009
Template processing0.00020.953410.0002
Override
Cache load0.00062.679510.0006
General
dbfile0.00031.442880.0000
String conversion0.00000.029440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs