is the posted values global ? ($http->hasPostVariable poblem)

Author Message

Selmah Maxim

Thursday 22 May 2003 5:37:12 am

hello ..

now am working on workflow, will check if user had submit his data befor or not (not user data), i was trying to catch the posted value from hidden input in form :

$http->hasPostVariable('CheckSubmition');

i got always false from my workflow file, but i went to content/action.php and added this line to store the value in the session vars :

if($http->hasPostVariable( 'CheckSubmition') ) $http->setSessionVariable( "CheckSubmition", "CheckSubmition" );

now, from my workflow file am useing this to check the value :

if ( $http->hasSessionVariable( 'CheckSubmition') )

if it`s true will call template file with msg that he have submit befor, work nice, but the value is still stored in session vars, so he cann`t browes the site, he will always get this msg !
so, i thought better if remove this value from the session after call the msg template, now is working also well, but if user click refesh will access the page :(

how can i slove this, $http->hasPostVariable is not working from workflow !

the workflow setting is , content,read, befor.

any help plz !

Bård Farstad

Wednesday 28 May 2003 1:58:21 am

Using the eZHTTPTool class and the postVariable function you will be able to fetch any HTTP POST variable in your script.

In a shopping workflow I use:
$http =& eZHTTPTool::instance();
if ( $http->hasPostVariable( "Name" ) )
$tmpName = $http->postVariable( "Name" );

This works on a normal form variable called Name.

--bård

Documentation: http://ez.no/doc

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 11:25:04
Script start
Timing: Jan 18 2025 11:25:04
Module start 'layout'
Timing: Jan 18 2025 11:25:04
Module start 'content'
Timing: Jan 18 2025 11:25:05
Module end 'content'
Timing: Jan 18 2025 11:25:05
Script end

Main resources:

Total runtime0.8217 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.0067 588.1563152.6563
Module start 'layout' 0.00670.0032 740.812539.5078
Module start 'content' 0.01000.8101 780.3203524.7109
Module end 'content' 0.82010.0016 1,305.03138.0938
Script end 0.8216  1,313.1250 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.4589160.0002
Check MTime0.00130.1608160.0001
Mysql Total
Database connection0.00120.143110.0012
Mysqli_queries0.770493.7653540.0143
Looping result0.00050.0636520.0000
Template Total0.784895.520.3924
Template load0.00250.299220.0012
Template processing0.782395.207920.3911
Template load and register function0.00020.021810.0002
states
state_id_array0.00090.110910.0009
state_identifier_array0.00130.157720.0006
Override
Cache load0.00180.2246240.0001
Sytem overhead
Fetch class attribute can translate value0.00100.118420.0005
Fetch class attribute name0.00120.142430.0004
XML
Image XML parsing0.00070.081820.0003
class_abstraction
Instantiating content class attribute0.00000.000730.0000
General
dbfile0.00090.1044170.0001
String conversion0.00000.001340.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/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
2content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 11
 Number of unique templates used: 6

Time used to render debug report: 0.0002 secs