Fetch all draft objects - possible?

Author Message

Nicklas Lundgren

Saturday 13 January 2007 8:01:29 am

Hi,

Im writing an export script, exporting a certain type of content objects to xml.
However - as the content objects still are drafts when I want to export them - I think I have a problem.

I need to get all the drafts of a certain class, no matter which user has created them.

I know about the
fetch( 'content', 'draft_version_list', hash...

But this only fetches drafts from current user. I want to fetch them all.

Any suggestions on how to achieve this?

Thanks in advance - and best regards,
/Nicklas

Nicklas Lundgren, Managing Director
Novitell AB, Sweden

kracker (the)

Saturday 13 January 2007 12:20:20 pm

If it was me, I'd start by writing a custom php-cli eZ 'script' to provide this without use of template language using only php no tpl.
If the client was paying for it i might write a 'cronjob' and possibly a 'module' all within an extension.

<i>//kracker
it's really just something to do when the music as turned your ears against your mind early morning just rubbing they sleep out your eyes. but when i am standing on a the soap box holding a boombox playing anything from sole that's able to be throwing drops like bombs blowing out speakers and your ...</i>

<i>Sole : Selling live water</i>

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

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 18 2025 22:37:15
Script start
Timing: Jan 18 2025 22:37:15
Module start 'layout'
Timing: Jan 18 2025 22:37:15
Module start 'content'
Timing: Jan 18 2025 22:37:16
Module end 'content'
Timing: Jan 18 2025 22:37:16
Script end

Main resources:

Total runtime1.1986 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 587.9219152.6250
Module start 'layout' 0.00460.0033 740.546939.4453
Module start 'content' 0.00791.1888 779.9922539.0391
Module end 'content' 1.19670.0019 1,319.03138.4688
Script end 1.1986  1,327.5000 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.2736160.0002
Check MTime0.00140.1190160.0001
Mysql Total
Database connection0.00050.041710.0005
Mysqli_queries1.148995.8518540.0213
Looping result0.00050.0441520.0000
Template Total1.165297.220.5826
Template load0.00220.185420.0011
Template processing1.162997.021720.5815
Template load and register function0.00010.009210.0001
states
state_id_array0.00090.075610.0009
state_identifier_array0.00150.121420.0007
Override
Cache load0.00190.1557210.0001
Sytem overhead
Fetch class attribute can translate value0.00070.057920.0003
Fetch class attribute name0.00110.092440.0003
XML
Image XML parsing0.00130.107320.0006
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.00090.0791250.0000
String conversion0.00000.001840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
6content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
5content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 17
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs