In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Simple Details Jump to Notes ] Wiki ] View Advanced ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0000055 [In-Portal CMS] Optimization task always 2009-06-08 07:27 2012-07-25 05:33
Reporter alex View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.2.0-B1
Status closed Product Version 5.1.0 Target Version 5.2.0
Time EstimateNo estimate
Summary 0000055: Get rid of safeDefine function usage when possible
Description Currently we use "safeDefine" function instead of "define". Function "safeDefine" doesn't define constant if it was previously defined to prevent fatal error. Later this function was globally used due integration issues with old kernel. Now, when it's gone we should revise usage of this function.
Additional Information There should be explanation provided for every safeDefine replaced by define.
Tags No tags attached.
Reference
Change Log Message
Estimate Points 1
Attached Files patch file icon safedefine_to_define_55.patch [^] (2,397 bytes) 2011-09-28 07:25 [Show Content]
patch file icon safedefine_to_define_55.2.patch [^] (875 bytes) 2011-10-04 05:38 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
User avatar (0003894)
alex (manager)
2011-09-24 05:22

Maybe this was already done. Needs to be checked.
User avatar (0003915)
alex (manager)
2011-09-27 04:10

I've searched for kUtil::safeDefine method usages and found 19 of them. And ~5 of them are worth changing. Other occurrences can stay.
User avatar (0003933)
erik (manager)
2011-09-28 07:28

Patch attached - needs testing
User avatar (0003982)
alex (manager)
2011-10-03 12:48

Review of changed places:
1. // user can't edit anything. Not safeDefine - Run() can't be called twice
Run can't be called twice but searching for EDITING_MODE constant in this method reveals, that it can be defined before safeDefine method call (when using browse modes on front-end) resulting a PHP Warning

2. // no need for safeDefine - this tag can't be twice on page
Tag InitCacheUpdater can't be called twice, but safeDefine here is placed to allow developers to increase cache update step size from "modules/custom/constants.php" file

3. same here, your fix prevents ability for developer to override that constants

4. these constants should be moved away into "core/kernel/constants.php" file
User avatar (0003997)
erik (manager)
2011-10-04 05:38

safedefine_to_define_55.2.patch attached - needs testing
User avatar (0004024)
alex (manager)
2011-10-05 09:18

Fix committed to 5.2.x branch. Commit Message:

Fixes 0000055: Get rid of safeDefine function usage when possible
Commit on behalf of Erik
User avatar (0005107)
alex (manager)
2012-07-25 05:33

Since 5.2.0 version was released.

- Related Changesets
In-Portal CMS: 5.2.x r14640
Timestamp: 2011-10-05 09:18:35
Author: alex
Details ] Diff ]
Fixes 0000055: Get rid of safeDefine function usage when possible
Commit on behalf of Erik
mod - /in-portal/branches/5.2.x/core/kernel/constants.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/selectors/selectors_event_handler.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-07-25 05:33 alex Note Added: 0005107
2012-07-25 05:33 alex Status resolved => closed
2011-10-22 05:30 alex Estimate Points => 1
2011-10-05 09:18 alex Changeset attached 5.2.x r14640
2011-10-05 09:18 alex Note Added: 0004024
2011-10-05 09:18 alex Status reviewed and tested => resolved
2011-10-05 09:18 alex Fixed in Version => 5.2.0-B1
2011-10-05 09:18 alex Resolution open => fixed
2011-10-05 09:18 alex Assigned To !COMMUNITY => alex
2011-10-05 09:18 alex Summary Get rid of safeDefine function usage when possible. => Get rid of safeDefine function usage when possible
2011-10-05 09:18 alex Assigned To alex => !COMMUNITY
2011-10-05 09:18 alex Status needs testing => reviewed and tested
2011-10-04 05:38 erik Note Added: 0003997
2011-10-04 05:38 erik Assigned To erik => alex
2011-10-04 05:38 erik Status needs work => needs testing
2011-10-04 05:38 erik File Added: safedefine_to_define_55.2.patch
2011-10-03 12:48 alex Note Added: 0003982
2011-10-03 12:48 alex Assigned To alex => erik
2011-10-03 12:48 alex Status needs testing => needs work
2011-09-28 07:28 erik Note Added: 0003933
2011-09-28 07:28 erik Assigned To erik => alex
2011-09-28 07:28 erik Developer => erik
2011-09-28 07:28 erik Status needs work => needs testing
2011-09-28 07:28 erik Time Estimate Removed 1 =>
2011-09-28 07:25 erik File Added: safedefine_to_define_55.patch
2011-09-27 04:10 alex Time Estimate Added 1
2011-09-27 04:10 alex Note Added: 0003915
2011-09-26 04:22 alex Additional Information Updated View Revisions
2011-09-24 05:22 alex Note Added: 0003894
2011-09-23 21:47 Dmitry Assigned To => erik
2011-09-23 21:47 Dmitry Status active => needs work
2011-09-23 21:47 Dmitry Target Version Icebox => 5.2.0
2010-08-31 14:12 alex version => 5.1.0
2010-06-10 13:48 alex Target Version 5.2.x => Icebox
2009-10-06 14:27 alex Type bug report => task
2009-06-09 10:49 Dmitry Target Version => 5.2.x
2009-06-08 07:27 alex New Issue



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker