Way to determine if ini setting exists?

Author Message

zurgutt -

Monday 08 May 2006 10:52:03 am

Using ezini() to read unexisting ini value will work but trigers error in logs. Doesnt seem to be any way to check for existence of value cleanly?

Certified eZ developer looking for projects.
zurgutt at gg.ee

Paul Borgermans

Monday 08 May 2006 1:04:16 pm

Hi Zurgutt

I think the error message (in the logs) is good anyway. If it is about "custom" ini settings, I would prefer explicit declarations instead of assuming a condition (like false) if it is not there.

Or can you be more specific?

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

zurgutt -

Monday 08 May 2006 1:34:04 pm

I control some extra privileges on per-usergroup, per-objectclass basis, like:

[PermitEdit]
PermitEdit_13_66=true

to show some controls on class 66 to group 13. Not feasible to have a line for every permutation, list would be very long and change often.

Actually i can see now that this is stupid and inefficient way to store and get this data, I was very beginner when coded that part ;)

But anyhow just to confirm: there is no function to check if ini setting is set by design, it is assumed to be there? And correct way to solve similar situation would be to use array to store list of defined setting names separately?

Certified eZ developer looking for projects.
zurgutt at gg.ee

Paul Borgermans

Monday 08 May 2006 1:39:25 pm

Yes/No,

There is no operator/function to check existence of ini variables.

Anyway, I would go with arrays instead of "weird" property names.

See you in Skien?

--paul

eZ Publish, eZ Find, Solr expert consulting and training
http://twitter.com/paulborgermans

zurgutt -

Tuesday 09 May 2006 2:30:17 am

Aye, I'll be there.

Will be driving my battlestation through sweden from stockholm.

Certified eZ developer looking for projects.
zurgutt at gg.ee

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

Main resources:

Total runtime0.7168 sec
Peak memory usage4,096.0000 KB
Database Queries63

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0046 589.1641152.6406
Module start 'layout' 0.00460.0023 741.804739.4609
Module start 'content' 0.00690.7083 781.2656565.3672
Module end 'content' 0.71520.0015 1,346.632816.1563
Script end 0.7167  1,362.7891 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00290.4082160.0002
Check MTime0.00120.1672160.0001
Mysql Total
Database connection0.00060.081810.0006
Mysqli_queries0.665592.8467630.0106
Looping result0.00050.0707610.0000
Template Total0.691196.420.3455
Template load0.00200.276520.0010
Template processing0.689196.133320.3445
Template load and register function0.00010.012310.0001
states
state_id_array0.00110.155610.0011
state_identifier_array0.00120.168220.0006
Override
Cache load0.00170.2349300.0001
Sytem overhead
Fetch class attribute can translate value0.00070.091320.0003
Fetch class attribute name0.00100.141670.0001
XML
Image XML parsing0.00100.139220.0005
class_abstraction
Instantiating content class attribute0.00000.0027100.0000
General
dbfile0.00090.1279240.0000
String conversion0.00000.001140.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
5content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
5content/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
1content/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: 19
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs