In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
268 [In-Portal CMS] Optimization task always 2009-09-04 12:05 2012-07-25 05:39
Dmitry  
 
normal  
active 5.1.0  
open  
 
none  
3
0000268: Code Cleanup in 5.2.x branch
This an ongoing task for Code cleanup in the whole system in 5.2.x branch.

---------------
1. kModRewriteHelper and kUrlManager both works with urls and get some data from kApplication class too. Need to unify url build/parse process (maybe by creating kiUrlProcessor interface, that will be implemented in PlainUrlProcessor and RewriteUrlProcessor classes).

2. Temp Handler class optimization:
- implement class using Collection pattern (like tests are collected in phpUnit) and create Clone, Delete, etc. methods for the class.
- this way operations will be single-item based, not table-based as right now.
- This of course will result separate sqls for subitem quering based on individual parent, but that's small price to pay to have correctly organized class hierarchy

3. 0001224 - Email event usage refactoring (part 1)
- create kEmail class with following public methods:
-- findEvent($name, $type)
-- setParams($params)
-- send()
- make $this->sender refer to kEmailSendingHelper class instance for easy access across all methods
- move existing code from EmailEventsEventHandler into new kEmail class
- replace OnEmailEvent event sending with new kEmail class usage

4. Email event refactoring (part 2)
- replace tons of "switch by RecipientType (to, cc, bcc) field" into polymorphism
Users:

0001031: User management internals refactoring
0000964: Improvements to user Login field
0000778: Improvements to Create User & Admin form in Admin
0000948: Change in "Forgot Password" logic

Data Validation:

0000270: "Form Configuration" for Add/Edit in Admin Console
0000271: Redesign "Data Validation" Engine
https://groups.google.com/forum/#!topic/in-portal-dev/cfhRH6VUxaE/discussion
related to 0000463closed  (Icebox) Migration to PHP5 (ongoing) 
related to 0001003resolved  (5.2.1)alex Logging engine 
related to 0001224closed  (5.2.0)alex Email event usage refactoring 
parent of 0001255closed  (5.2.0)!COMMUNITY Mod-rewrite url caching problem 
parent of 0001387resolved  (5.2.1)alex Debugger report is opened at wrong scroll position 
related to 0001153active  (Icebox) Minimizing In-Portal CORE 
patch scope_kw_core.patch (410,800) 2011-10-04 04:32
http://tracker.in-portal.org/file_download.php?file_id=1193&type=bug
patch scope_kw_modules.patch (120,716) 2011-10-04 04:32
http://tracker.in-portal.org/file_download.php?file_id=1194&type=bug
patch removing_references_in_events_core.patch (267,180) 2012-03-03 12:37
http://tracker.in-portal.org/file_download.php?file_id=1527&type=bug
patch removing_references_in_events_modules.patch (182,174) 2012-03-03 13:01
http://tracker.in-portal.org/file_download.php?file_id=1528&type=bug
patch removing_references_in_makeclass_recallobject_core.patch (294,978) 2012-03-04 02:05
http://tracker.in-portal.org/file_download.php?file_id=1529&type=bug
patch removing_references_in_makeclass_recallobject_modules.patch (210,600) 2012-03-04 02:05
http://tracker.in-portal.org/file_download.php?file_id=1530&type=bug
patch removing_references_in_parent_event_core.patch (3,293) 2012-03-04 02:57
http://tracker.in-portal.org/file_download.php?file_id=1531&type=bug
patch removing_references_in_event_getobject_core.patch (95,682) 2012-03-04 03:03
http://tracker.in-portal.org/file_download.php?file_id=1532&type=bug
patch removing_references_in_event_getobject_modules.patch (84,935) 2012-03-04 03:03
http://tracker.in-portal.org/file_download.php?file_id=1533&type=bug
patch removing_references_in_tp_getobject_core.patch (44,335) 2012-03-04 03:24
http://tracker.in-portal.org/file_download.php?file_id=1534&type=bug
patch removing_references_in_tp_getobject_modules.patch (49,194) 2012-03-04 03:25
http://tracker.in-portal.org/file_download.php?file_id=1535&type=bug
patch use_simplexml_for_internal_xml_parsing.patch (23,360) 2012-03-04 05:50
http://tracker.in-portal.org/file_download.php?file_id=1536&type=bug
Issue History
2012-09-04 05:51 alex Relationship added parent of 0001387
2012-08-17 10:19 alex Changeset attached 5.2.x r15518
2012-07-25 05:39 alex Target Version 5.2.0 => 5.2.1
2012-05-29 09:45 alex Changeset attached 5.2.x r15371
2012-05-29 06:15 alex Description Updated bug_revision_view_page.php?rev_id=1017#r1017
2012-05-18 04:59 alex Changeset attached 1.2.x r15348
2012-04-12 03:45 alex Changeset attached 5.2.x r15292
2012-04-06 14:25 alex Relationship added parent of 0001255
2012-03-26 05:38 alex Changeset attached 5.2.x r15233
2012-03-26 05:32 alex Changeset attached 5.2.x r15232
2012-03-26 03:18 alex Changeset attached 5.2.x r15229
2012-03-26 02:36 alex Changeset attached 5.2.x r15228
2012-03-14 12:12 alex Relationship added related to 0001224
2012-03-14 12:12 alex Description Updated bug_revision_view_page.php?rev_id=982#r982
2012-03-13 08:09 alex Description Updated bug_revision_view_page.php?rev_id=981#r981
2012-03-04 05:50 alex Changeset attached 5.2.x r15158
2012-03-04 05:50 alex File Added: use_simplexml_for_internal_xml_parsing.patch
2012-03-04 03:27 alex Changeset attached 5.2.x r15157
2012-03-04 03:27 alex Changeset attached 5.2.x r15156
2012-03-04 03:27 alex Changeset attached 5.2.x r15155
2012-03-04 03:26 alex Changeset attached 5.2.x r15154
2012-03-04 03:26 alex Changeset attached 1.2.x r15153
2012-03-04 03:26 alex Changeset attached 5.2.x r15152
2012-03-04 03:25 alex File Added: removing_references_in_tp_getobject_modules.patch
2012-03-04 03:24 alex File Added: removing_references_in_tp_getobject_core.patch
2012-03-04 03:05 alex Changeset attached 5.2.x r15151
2012-03-04 03:05 alex Changeset attached 5.2.x r15150
2012-03-04 03:05 alex Changeset attached 5.2.x r15149
2012-03-04 03:04 alex Changeset attached 5.2.x r15148
2012-03-04 03:04 alex Changeset attached 5.2.x r15147
2012-03-04 03:04 alex Changeset attached 1.2.x r15146
2012-03-04 03:04 alex Changeset attached 5.2.x r15145
2012-03-04 03:03 alex File Added: removing_references_in_event_getobject_modules.patch
2012-03-04 03:03 alex File Added: removing_references_in_event_getobject_core.patch
2012-03-04 02:58 alex Changeset attached 5.2.x r15144
2012-03-04 02:57 alex File Added: removing_references_in_parent_event_core.patch
2012-03-04 02:09 alex Changeset attached 5.2.x r15143
2012-03-04 02:08 alex Changeset attached 5.2.x r15142
2012-03-04 02:08 alex Changeset attached 5.2.x r15141
2012-03-04 02:07 alex Changeset attached 5.2.x r15140
2012-03-04 02:07 alex Changeset attached 5.2.x r15139
2012-03-04 02:06 alex Changeset attached 1.2.x r15138
2012-03-04 02:06 alex Changeset attached 5.2.x r15137
2012-03-04 02:05 alex File Added: removing_references_in_makeclass_recallobject_modules.patch
2012-03-04 02:05 alex File Added: removing_references_in_makeclass_recallobject_core.patch
2012-03-03 15:16 alex Note Added: 0004482
2012-03-03 13:05 alex Changeset attached 5.2.x r15136
2012-03-03 13:05 alex Changeset attached 5.2.x r15135
2012-03-03 13:04 alex Changeset attached 5.2.x r15134
2012-03-03 13:04 alex Changeset attached 5.2.x r15133
2012-03-03 13:04 alex Changeset attached 5.2.x r15132
2012-03-03 13:04 alex Changeset attached 1.2.x r15131
2012-03-03 13:01 alex File Added: removing_references_in_events_modules.patch
2012-03-03 12:38 alex Changeset attached 5.2.x r15130
2012-03-03 12:37 alex File Added: removing_references_in_events_core.patch
2012-02-17 09:26 alex Changeset attached 5.2.x r15115
2012-02-06 04:14 alex Changeset attached 5.2.x r15104
2012-01-18 08:25 alex Changeset attached 5.2.x r15073
2012-01-18 08:19 alex Changeset attached 5.2.x r15072
2012-01-18 08:18 alex Changeset attached 5.2.x r15071
2012-01-18 08:17 alex Changeset attached 5.2.x r15069
2012-01-17 09:11 alex Changeset attached 5.2.x r15065
2012-01-17 08:51 alex Changeset attached 5.2.x r15064
2012-01-17 08:51 alex Changeset attached 5.2.x r15063
2012-01-17 08:50 alex Changeset attached 5.2.x r15062
2012-01-17 08:50 alex Changeset attached 5.2.x r15061
2012-01-17 08:31 alex Changeset attached 5.2.x r15060
2012-01-17 08:27 alex Changeset attached 5.2.x r15059
2012-01-17 08:25 alex Changeset attached 1.2.x r15058
2012-01-17 03:22 alex Changeset attached 5.2.x r15055
2012-01-16 07:58 alex Changeset attached 5.2.x r15046
2012-01-16 07:56 alex Changeset attached 5.2.x r15045
2012-01-10 04:10 alex Changeset attached 5.2.x r15027
2012-01-10 02:57 alex Changeset attached 5.2.x r15025
2012-01-09 11:16 alex Changeset attached 5.2.x r15021
2012-01-09 11:14 alex Changeset attached 5.2.x r15020
2012-01-09 05:41 alex Changeset attached 5.2.x r15018
2012-01-09 04:28 alex Changeset attached 5.2.x r15017
2012-01-09 04:27 alex Changeset attached 5.2.x r15016
2012-01-06 06:22 alex Changeset attached 5.2.x r14998
2012-01-05 05:19 alex Changeset attached 5.2.x r14995
2012-01-04 10:24 alex Changeset attached 5.2.x r14989
2012-01-04 10:12 alex Changeset attached 5.2.x r14988
2012-01-04 10:12 alex Changeset attached 5.2.x r14987
2012-01-04 10:11 alex Changeset attached 5.2.x r14986
2012-01-04 10:04 alex Changeset attached 5.2.x r14985
2012-01-04 10:02 alex Changeset attached 5.2.x r14984
2012-01-04 09:59 alex Changeset attached 1.2.x r14983
2011-12-30 04:49 alex Changeset attached 5.2.x r14958
2011-12-30 04:49 alex Changeset attached 5.2.x r14957
2011-12-30 04:48 alex Changeset attached 5.2.x r14956
2011-12-30 04:48 alex Changeset attached 5.2.x r14955
2011-12-27 10:27 alex Changeset attached 5.2.x r14926
2011-12-27 10:03 alex Changeset attached 5.2.x r14924
2011-12-27 10:02 alex Changeset attached 5.2.x r14923
2011-12-27 06:04 alex Changeset attached 5.2.x r14921
2011-12-23 11:37 Dmitry Relationship added related to 0001153
2011-12-23 11:35 Dmitry Description Updated bug_revision_view_page.php?rev_id=936#r936
2011-12-23 10:57 alex Relationship added related to 0001003
2011-12-23 03:25 alex Changeset attached 5.2.x r14904
2011-12-20 10:11 alex Changeset attached 5.2.x r14889
2011-12-16 05:59 alex Changeset attached 5.2.x r14874
2011-12-16 05:56 alex Changeset attached 5.2.x r14873
2011-12-16 05:56 alex Changeset attached 5.2.x r14872
2011-12-16 05:55 alex Changeset attached 5.2.x r14871
2011-12-16 05:54 alex Changeset attached 5.2.x r14870
2011-12-16 05:14 alex Changeset attached 5.2.x r14869
2011-12-08 08:49 alex Changeset attached 5.2.x r14854
2011-12-08 06:31 alex Changeset attached 5.2.x r14851
2011-12-08 06:29 alex Changeset attached 5.2.x r14850
2011-12-08 06:29 alex Changeset attached 5.2.x r14849
2011-12-08 06:28 alex Changeset attached 5.2.x r14848
2011-12-08 06:27 alex Changeset attached 1.2.x r14847
2011-12-08 03:24 alex Changeset attached 5.2.x r14843
2011-12-01 07:16 alex Changeset attached 5.2.x r14815
2011-11-24 10:39 alex Changeset attached 5.2.x r14796
2011-11-23 07:25 alex Changeset attached 5.2.x r14787
2011-11-22 10:44 alex Changeset attached 5.2.x r14784
2011-11-22 05:57 alex Changeset attached 5.2.x r14776
2011-11-22 05:56 alex Changeset attached 5.2.x r14775
2011-11-22 05:56 alex Changeset attached 5.2.x r14774
2011-11-22 05:56 alex Changeset attached 5.2.x r14773
2011-11-09 03:36 alex Changeset attached 5.2.x r14750
2011-11-09 03:36 alex Changeset attached 5.2.x r14749
2011-11-09 03:35 alex Changeset attached 5.2.x r14748
2011-11-07 14:06 alex Changeset attached 5.2.x r14738
2011-11-07 04:52 alex Note Added: 0004137
2011-11-07 03:48 alex Changeset attached 5.2.x r14735
2011-11-01 05:05 alex Changeset attached 5.2.x r14714
2011-11-01 04:41 alex Changeset attached 5.2.x r14713
2011-11-01 04:40 alex Changeset attached 5.2.x r14712
2011-11-01 04:40 alex Changeset attached 5.2.x r14711
2011-11-01 04:39 alex Changeset attached 5.2.x r14710
2011-11-01 04:38 alex Changeset attached 1.2.x r14709
2011-10-31 07:16 alex Changeset attached 5.2.x r14707
2011-10-31 03:20 alex Changeset attached 5.2.x r14706
2011-10-26 06:43 alex Changeset attached 5.2.x r14704
2011-10-26 06:43 alex Changeset attached 5.2.x r14703
2011-10-26 06:43 alex Changeset attached 5.2.x r14702
2011-10-26 06:41 alex Changeset attached 5.2.x r14701
2011-10-26 06:40 alex Changeset attached 5.2.x r14700
2011-10-26 06:39 alex Changeset attached 5.2.x r14699
2011-10-24 06:52 alex Description Updated bug_revision_view_page.php?rev_id=887#r887
2011-10-22 05:31 alex Estimate Points => 3
2011-10-19 03:32 alex Changeset attached 5.2.x r14678
2011-10-19 03:32 alex Changeset attached 5.2.x r14677
2011-10-19 03:30 alex Changeset attached 5.2.x r14676
2011-10-19 03:29 alex Changeset attached 5.2.x r14675
2011-10-15 13:46 alex Changeset attached 5.2.x r14667
2011-10-15 13:46 alex Changeset attached 1.2.x r14666
2011-10-11 11:16 alex Changeset attached 5.2.x r14656
2011-10-11 10:44 alex Changeset attached 5.2.x r14655
2011-10-11 10:41 alex Changeset attached 5.2.x r14654
2011-10-05 05:10 alex Changeset attached 5.2.x r14632
2011-10-04 04:36 alex Changeset attached 5.2.x r14628
2011-10-04 04:35 alex Changeset attached 5.2.x r14627
2011-10-04 04:34 alex Changeset attached 5.2.x r14626
2011-10-04 04:34 alex Changeset attached 5.2.x r14625
2011-10-04 04:33 alex Changeset attached 5.2.x r14624
2011-10-04 04:33 alex Changeset attached 5.2.x r14623
2011-10-04 04:32 alex Changeset attached 1.2.x r14622
2011-10-04 04:32 alex File Added: scope_kw_modules.patch
2011-10-04 04:32 alex File Added: scope_kw_core.patch
2011-07-07 13:03 alex Additional Information Updated bug_revision_view_page.php?rev_id=750#r750
2011-07-07 09:24 alex Description Updated bug_revision_view_page.php?rev_id=747#r747
2011-07-05 15:41 Dmitry Relationship added related to 0000463
2011-07-05 15:39 Dmitry Additional Information Updated bug_revision_view_page.php?rev_id=740#r740
2011-07-05 15:38 Dmitry Note Edited: 0003206 bug_revision_view_page.php?bugnote_id=0003206#r739
2011-07-05 15:38 Dmitry Additional Information Updated bug_revision_view_page.php?rev_id=737#r737
2011-07-05 11:33 alex Changeset attached 5.2.x r14429
2011-07-05 11:32 alex Note Added: 0003583
2011-07-05 11:31 alex Changeset attached 5.2.x r14428
2011-02-07 01:58 alex Description Updated bug_revision_view_page.php?rev_id=679#r679
2011-02-01 03:47 alex Description Updated bug_revision_view_page.php?rev_id=674#r674
2011-01-31 02:20 alex Description Updated bug_revision_view_page.php?rev_id=673#r673
2011-01-31 02:19 alex Issue Monitored: alex
2011-01-24 09:55 alex Description Updated bug_revision_view_page.php?rev_id=666#r666
2011-01-24 02:17 alex Description Updated bug_revision_view_page.php?rev_id=665#r665
2011-01-12 09:16 alex Changeset attached 5.2.x r14184
2011-01-12 09:15 alex Note Added: 0003206
2010-12-28 12:15 alex Changeset attached 5.2.x r14103
2010-12-28 12:13 alex Additional Information Updated bug_revision_view_page.php?rev_id=641#r641
2010-12-28 12:12 alex Changeset attached 5.2.x r14102
2010-12-28 12:10 alex Changeset attached 5.2.x r14101
2010-12-28 12:10 alex Changeset attached 5.2.x r14100
2010-12-28 12:08 alex Changeset attached 5.2.x r14099
2010-12-28 11:48 alex Changeset attached 5.2.x r14098
2010-12-28 11:47 alex Changeset attached 5.2.x r14097
2010-12-28 11:41 alex Changeset attached 1.2.x r14096
2010-12-28 11:37 alex Changeset attached 5.2.x r14095
2010-12-28 11:29 alex Note Edited: 0002970 bug_revision_view_page.php?bugnote_id=0002970#r639
2010-12-04 09:37 alex Note Edited: 0002970 bug_revision_view_page.php?bugnote_id=0002970#r626
2010-11-07 12:48 alex Note Added: 0002970
2010-08-31 14:14 alex version => 5.1.0
2010-08-31 14:14 alex Target Version Icebox => 5.2.0
2010-05-19 15:58 Dmitry version 5.0.1 =>
2010-05-19 15:58 Dmitry Summary Code Cleanup (Ongoing) => Code Cleanup in 5.2.x branch
2010-05-19 15:58 Dmitry Description Updated bug_revision_view_page.php?rev_id=490#r490
2009-10-11 09:42 alex Changeset attached 5.0.x r12687
2009-10-06 14:29 alex Type feature request => task
2009-09-21 03:25 alex Target Version => Icebox
2009-09-04 12:07 Dmitry Changeset attached 5.0.x r12443
2009-09-04 12:05 Dmitry New Issue

Notes
(0002970)
alex   
2010-11-07 12:48   
(edited on: 2010-12-28 11:29)
-----------
kBase class
-----------
- moved up "Conn" property to "kBase" class, since it is declared in most of class descendants anyway
- hidden "kBase::Application" and "kBase::Conn" properties, so only descendant class could access them
- added hidden "kBase::prefixSpecial" property to cache prefix special, instead of creating it on the fly as for now
- removed "kBase::OriginalParams" property
- removed "kBase::getProperty", "kBase::setProperty" methods

-------------
kDBBase class
-------------
- class marked as abstract
- hidden "kDBBase::SelectClause" property in favor of already existing "kDBBase::SetSelectSQL" and "kDBBase::GetSelectSQL" access methods
- hidden "kDBBase::Fields" property in favor of already existing "kDBBase::GetFieldOptions" and "kDBBase:SetFieldOptions" access methods
- added "kDBBase::isField" method for checking if given field is declared in this object (because of hidden "kDBBase::Fields" property)
- added "kDBBase::getFields" method (because of hidden "kDBBase::Fields" property)
- added "kDBBase::GetFieldOption" and "kDBBase::SetFieldOption" methods for easy access to single option from unit config field declaration
- hidden "kDBBase::customFields" property in favor of "kDBBase::setCustomFields" (existing) and "kDBBase::getCustomFields" (added) access methods
- hidden "kDBBase::VirtualFields" property in favor of "kDBBase::setVirtualFields" (existing) and "kDBBase::getVirtualFields" (added) access methods
- added "kDBBase::isVirtualField" method for checking if given virtual field is declared in this object (because of hidden "kDBBase::VirtualFields" property)
- hidden "kDBBase::CalculatedFields" property in favor of "kDBBase::setCalculatedFields" (added), "kDBBase::addCalculatedField" (added) and "kDBBase::getCalculatedFields" (existing) access methods
- added "kDBBase::isCalculatedField" method for checking if given virtual field is also a calculated field (because of hidden "kDBBase::CalculatedFields" property)
- hidden "kDBBase::AggregatedCalculatedFields" property in favor of "kDBBase::setAggregatedCalculatedFields" (added) and "kDBBase::getCalculatedFields" (existing) access methods
- added hidden "kDBBase::populateMultiLangFields" property to store object's initial ML status (formerly "$populate_ml_fields" parameter of "kDBItem::SetDefaultValues" method)
- replaced "kDBBase::mode" property with already existing method "kDBBase::IsTempMode" usage
- hidden "kDBBase::replaceModePrefix" and "kDBBase::addCalculatedFields" methods
- removed "kDBBase::SetIDField" and "kDBBase::setTableName" methods, since properties "kDBBase::IDField" and "kDBBase::TableName" they are using has public access level anyway
- added optional "$populate_ml_fields" parameter to "kDBBase::Configure" method (moved from "kDBItem::SetDefaultValues" method)
- changed "kDBBase::Configure" method to support repeated invocation for repeated object configuration
- added hidden "kDBBase::getFieldsBySpecial" method to unify retrieving values of special-based unit options, like "CalculatedFields", "ListSortings", etc.
- changed "kDBBase::SetFieldOptions" and "kDBBase::GetFieldOptions" methods to support processing of virtual fields
- made abstract "kDBBase::GetDBField", "kDBBase::HasField", "kDBBase::GetFieldValues", "kDBBase::isLoaded" and "kDBBase::GetCol" methods
- hidden "kDBBase::prepareConfigOptions", "kDBBase::escapeField", "kDBBase::_replaceLanguageId" and "kDBBase::PrepareFieldOptions" methods
- merged "kDBBase::PrepareOptions" method into "kDBBase::prepareConfigOptions" method

-------------
kDBList class
-------------
- renamed constants related to list processing (*_FILTER, FLT_*) to kDBList::*, e.g. WHERE_FILTER to kDBList::WHERE_FILTER
- removed duplicate code from "kCatDBTagProcessor::CatalogItemCount" method (code was copied from "kDBList::GetRecordsCount" method)
- method "kDBTagProcessor::groupRecords" encapsulated into "kDBList" class, since it only operates on it's properties
- hidden "kDBList::Totals" and "kDBList::TotalsCalculated" properties in favor of already existing "kDBList::getTotal" and "kDBList::GetFormattedTotal" access methods
- hidden "kDBList::OrderFields" property in favor of already existing "kDBList::AddOrderField", "kDBList::ClearOrderFields", "kDBList::GetOrderField" and "kDBList::GetOrderDirection" access methods
- hidden "kDBList::RecordsCount" property in favor of existing "kDBList::GetRecordsCount" access method
- merged "kDBList::GetNoFilterCount" method into "kDBList::GetRecordsCount" method because of similar nature
- hidden "kDBList::NoFilterCount" property in favor of modified "kDBList::GetRecordsCount" access method
- hidden "kDBList::SelectedCount" property in favor of added "kDBList::GetSelectedCount" access method
- hidden "kDBList::CurrentIndex" property in favor of already existing "kDBList::getCurrentRecord", "kDBList::GoIndex", "kDBList::GoFirst", "kDBList::GoNext", "kDBList::GoPrev" and "kDBList::EOL" methods
- hidden "kDBList::PerPage" property in favor of added "kDBList::GetPerPage" access method
- hidden "kDBList::TotalPages" property in favor of already existing "kDBList::GetTotalPages" access method
- hidden "kDBList::Page" property in favor of added "kDBList::GetPage" access method
- hidden "kDBList::Offset" property in favor of added "kDBList::SetOffset" and "kDBList::GetOffset" access methods
- hidden "kDBList::WhereFilter", "kDBList::HavingFilter" and "kDBList::AggregateFilter" properties in favor of already existing "kDBList::addFilter", "kDBList::getFilter" and "kDBList::removeFilter" access methods
- hidden "kDBList::GroupByFields" in favor of already existing "kDBList::AddGroupByField" and "kDBList::RemoveGroupByField" access methods
- hidden "kDBList::Queried" property in favor of already existing "kDBList::Query" and "kDBList::isLoaded" methods
- hidden "kDBList::Counted" property in favor of new "kDBList::reset" and "kDBList:isCounted" methods
- added "kDBList::reset" method, which handles "requery" parameter usage (reset counted status, clear filters [NEW], clear order fields)
- hidden "kDBList::mainList" property in favor of new "kDBList::isMainList" access method (this way property made readonly)
- added "kDBList::becameMain" method to allow setting list as main (one way, no way remove such mark!)
- hidden "kDBList::CountRecs" method, since it is automatically called, when needed by "kDBList::GetRecordsCount" and "kDBList::GetTotalPages" methods
- hidden "kDBList::CalculateTotals" method, since it is automatically called, when needed by "kDBList::getTotal" method
- hidden "kDBList::extractCalculatedFields" method, since it's automatically called, when needed by "kDBList::GetWhereClause" and "kDBList::GetHavingClause" methods
- removed unused "kDBList::SetWhereClause" method
- hidden "kDBList::GetWhereClause", "kDBList::GetHavingClause", "kDBList::GetGroupClause" and "kDBList::GetOrderClause" methods to encapsulate database query building logic
- changed "kDBList::GetFieldValues" method to properly return current record data by reference
- changed "kDBList::getCurrentRecord" method to properly return "false" value by reference

-------------
kDBItem class
-------------
- hidden "kDBItem::FieldValues" property in favor of already existing "kDBBase::SetDBField" and "kDBBase::GetDBField" access methods
- hidden "kDBItem::DirtyFieldValues" property in favor of already existing "kDBItem::SetDirtyField" and "kDBItem::GetDirtyField" access methods
- hidden "kDBItem::OriginalFieldValues" property in favor of already existing "kDBItem::SetOriginalField" and "kDBItem::GetOriginalField" access methods
- hidden "kDBItem::FieldErrors" property in favor of "kDBItem::SetError" (existing), "kDBItem::GetErrorPseudo" (added), "kDBItem::HasErrors" (existing), "kDBItem::GetErrorMsg" (existing), "kDBItem::GetFieldErrors" (added) and "kDBItem::RemoveError" (added) methods
- hidden "kDBItem::ErrorMsgs" property in favor of already existing "kDBItem::SetError" and "kDBItem::GetErrorMsg" access methods
- hidden "kDBItem::Loaded" property in favor of "kDBItem::isLoaded" (existing) and "kDBItem::setLoaded" (added) access methods
- hidden "kDBItem::ID" property in favor of already existing "kDBItem::SetID" and "kDBItem::GetID" access methods
- added "kDBItem::RemoveError", "kDBItem::GetErrorPseudo" and "kDBItem::GetFieldErrors" methods (because of hidden "kDBItem::FieldErrors" property)
- hidden "kDBItem::GetKeyClause", "kDBItem::raiseEvent", "kDBItem::LogChanges", "kDBItem::getParentId" and "kDBItem::generateID" methods, since they are used only internally
- changed "kDBItem::GetSelectSQL" method to match with parent class method declaration
- hidden "kDBItem::CustomValidation" method, since it is designed to be called by "kDBItem::ValidateField" method from "kDBItem" class descendant classes only
- changed declaration of "kDBItem::HasErrors" method to make "$skip_fields" parameter optional
- hidden "kDBItem::ValidateUnique" and "kDBItem::ValidateRange" methods, since they are called by "kDBItem::ValidateField" method only
- changed "kDBItem::GetErrorMsg" method to use newly added "kDBItem::GetErrorPseudo" method instead of duplicating it's code locally
- changed "kDBItem::isRequired" method to use "isset" instead of "getArrayValue" (+performance boost)

-------------------
kEventHandler class
-------------------
- hidden "kEventHandler::eventMethods" property in favor of "kEventHandler::processEvent" access method
- hidden "kEventHandler::permMapping" property in favor of "kEventHandler::CheckPermission" access method
- hidden "kEventHandler::mapEvents", "kEventHandler::mapPermissions" and "kEventHandler::prepareObject" methods, since they are expected to be called by descendant classes only
- hidden "kEventHandler::OnBuild", "kEventHandler::OnGoBack" and "kEventHandler::OnAfterConfigRead" methods, since all events in event handler are not directly accessible (only via "kEventHandler::processEvent" method)

-------------------
kEventManager class
-------------------
- added implementation of kiCacheable interface (cached data: build events, hooks, agents)
- extracted new "kHookManager" class for hook processing from "kEventManager" class (delegate method "kEventManager:registerHook")
- extracted new "kAgentManager" class for agent processing from "kEventManager" class (delegate methods "kEventManager::getAgents", "kEventManager::registerAgent", "kEventManager::runAgents" and "kEventManager::runAgent")
- extracted new "kRequestManager" class for event from request processing from "kEventManager" class (delegate methods "kEventManager::ProcessRequest", "kEventManager::openerStackPush" and "kEventManager::openerStackChange")
- renamed "kEventManager::getRegularEvents" into "kEventManager::getAgents"
- renamed "kEventManager::RunRegularEvents" method into "kEventManager::runAgents"
- renamed "kEventManager::registerRegularEvent" method into "kEventManager::registerAgent"

-------------
NParser class
-------------
- added ParserException exception class to handle errors during template compilation process
- changed error processing during template compilation to use exception model instead of replacing current error handler to do it

-------------
Session class
-------------
- moved class "SessionStorage" and "InpSessionStorage" declarations into separate PHP files to conform with "one class - one file" rule
- added "SessionStorage::setSession" method, which removed need of passing $session in each SessionStorage class method call
- removed "SessionStorage::setSessionTimeout" method, because now SessionStorage class has direct access to Session class instance and could ask it, when needed
- renamed session mode constants (sm*) to "Session::sm*), e.g. "smGET_ONLY" to "Session::smGET_ONLY"

--------------
Debugger class
--------------
- moved functions identical to "kUtil" class functions (from "Debugger" class) to new "DebuggerUtil" class
- changed default value for DBG_IGNORE_STRICT_ERRORS debugger option to show E_STRICT php errors, since most of code, raising them was already fixed
- added error/notice/warning number near each error, allowing for easy error finding in debugger report, when DBG_SQL_PROFILE option is enabled
- added exception handler to "Debugger" class
- moved debugger short report to debugger report, when opened (useful, when it's not initially visible, e.g. in grids or editing forms in admin console)
[NEW] - not shown debugger, when DBG_RAISE_ON_WARNINGS is enabled during installation process

------------
kEvent class
------------
- renamed event status constants from "er*" into "kEvent::er*" (e.g. erSUCCESS to kEvent::erSUCCESS)
- hidden "kEvent::Prefix_Special" property in favor of already existing "kEvent::getPrefixSpecial" method
- hidden "kEvent::redirect_params" property in favor of new "kEvent::setRedirectParams" access method
- renamed "kEvent::redirect_params" property into "kEvent::redirectParams" property to comply with naming standards
- renamed "kEvent::redirect_script" property into "kEvent::redirectScript" property to comply with naming standards
- hidden "kEvent::redirectParams" property in favor of "kEvent::getRedirectParams" (added), "kEvent::getRedirectParam" (added), "kEvent::SetRedirectParam" (existing) and "kEvent::setRedirectParams" (added) access methods
- hidden "kEvent::specificParams" property in favor of already existing "kEvent::setEventParam" and "kEvent::getEventParam" access methods
- hidden "kEvent::pseudoClass" property in favor of already existing "kEvent::setPseudoClass" access method
- changed "kEvent::getPrefixSpecial" method to use parent class method, when possible (duplicate code removed)
- added "kEvent::__toString" method for retrieving string representation of kEvent class instance
- added "kEvent::copyFrom" method to copy data between current and given event (useful for sub-event processing)

--------------
kFactory class
--------------
- added implementation of kiCacheable interface (cached data: class names, file names, class dependencies)
- added "$arguments" parameter to "kFactory::getObject" method to support passing additional parameters to instanced class constructor
- added "$arguments" parameter to "kApplication::recallObject" (calls "kFactory::getObject") to support passing additional parameters to instanced class constructor
- moved build event creation and running to "kEventManager::runBuildEvent" method (instead of "kEventManager::getBuildEvent" and "kApplication::HandleEvent" method calls)
- removed "kFactory::getObjectP", because now build-in "ReflectionClass" (PHP 5.2+) class is used for passing additional parameters to instanced class constructor
- removed "kApplication::recallObjectP", because called method "kFactory::getObjectP" was also removed
- added "$arguments" parameter to "kApplication::makeClass" (calls "kFactory::makeClass") to support passing additional parameters to instanced class constructor
- added "kFactory::unregisterClass" method (called by "kApplication::unregisterClass" method) for allowing to undo class registration, made by "kFactory::registerClass"
- simplified "kFactory::registerDependency" method, since it was checking for 2 conditions, while one of them was always "true"
- removed "makeClass" methods from various classes, who have additional parameters in their constructors, since now it's handled by new version of "kFactory::makeClass" method

----------------
kHTTPQuery class
----------------
- added "kHTTPQuery::discoveredUnits" property (former "kEventManager::queryMaps" property)
- added "kHTTPQuery::getDiscoveredUnits" method
- added "kHTTPQuery::discoverUnit" method (former "kEventManager::setQueryMap" method)
- added "kHTTPQuery::getQueryString" method (former "kEventManager::getQueryMap" method)

-----------------------
kUnitConfigReader class
-----------------------
- added implementation of kiCacheable interface (cached data: unit config file locations)
- changed data caching to get/set data via provided by kiCacheable interface methods (no private attributes are used as before)
- added "kUnitConfigReader::preloadConfigVars" method to logically divide configuration variable preloading from overall cache saving method
- added debugger message, that cache was rebuild during current page display
- divided "kUnitConfigReader::parseConfig" method into separate methods: "kUnitConfigReader::parseClasses", "kUnitConfigReader::parseAgents", "kUnitConfigReader::parseHooks" and "kUnitConfigReader::parseAggregatedTags"
- changed typecasting into array in "kUnitConfigReader::parseClasses" method to be performed in more native way (could be a performance boost)
- fixed "kUnitConfigReader::ValidateConfig" to show debugger, when unit config validation was made (worked before, but was broken at some point)

-----------------
kCurlHelper class
-----------------
- hidden "kCurlHelper::connectionID" and "kCurlHelper::logFilePointer" properties
- added hidden "kCurlHelper::requestMethod" property with "kCurlHelper::SetRequestMethod" access method
- renamed "kCurlHelper::postData" property into "kCurlHelper::requestData" property
- hidden "kCurlHelper::requestData" property in favor of "kCurlHelper::SetPostData" (existing) and "kCurlHelper::SetRequestData" (added) methods
- hidden "kCurlHelper::requestHeaders" property in favor of already existing "kCurlHelper::SetHeaders" access method
- hidden "kCurlHelper::responceHeaders" property in favor of already existing "kCurlHelper::ParseHeader" method
- hidden "kCurlHelper::options" property in favor of already existing "kCurlHelper::setOptions" access method
- hidden "kCurlHelper::_resetSettings", "kCurlHelper::prepareOptions", "kCurlHelper::applyOptions", "kCurlHelper::ParseHeader" and "kCurlHelper::prepareHeaders" methods
- added "kCurlHelper::SetRequestMethod" method to set curl request type to GET or POST
- changed "kCurlHelper::prepareHeaders" method to support headers without distinct value (e.g. "Connection Keep-Alive" vs "Host: www.site.com")

--------------------------
kMultiLanguageHelper class
--------------------------
- hidden "kMultiLanguageHelper::languageCount" property in favor of added "kMultiLanguageHelper::getLanguages" method
- hidden "kMultiLanguageHelper::languagesIDs" property in favor of added "kMultiLanguageHelper::getLanguages" method
- added "kMultiLanguageHelper::getLanguages" method, that returns all language ids, that have/should have lN_FieldName columns created in other tables
- removed "kMultiLanguageHelper::getLanguageCount" method in favor of added "kMultiLanguageHelper::getLanguages" method
- hidden "kMultiLanguageHelper::LanguageFound" method in favor of added "kMultiLanguageHelper::getLanguages" method

------------------
file "globals.php"
------------------
- renamed 99% of global functions in "globals.php" file into new static class "kUtil" members with their names intact (although some were renamed and will be noted below)
- renamed "print_pre" function into "kUtil::print_r" static method
- renamed "array_merge_recursive2" function into "kUtil::array_merge_recursive" static method
- renamed constant "POUND_TO_KG" into "kUtil::POUND_TO_KG"
- not changed "getArrayValue" function due inability to pass undetermined parameter count to it
- renamed "parse_portal_ini" function into "kUtil::parseConfig" static method
- added "kUtil::getConfigVars" method to retrieve parsed content of "config.php" file (also removed global variable "$vars" used for that purpose)
- renamed function "k4_include_once" into "kUtil::includeOnce" static method
- renamed function "makepassword4" into "kUtil::generatePassword" static method
- removed "ref_call_user_func_array" function (used eval inside), because now build-in "ReflectionClass" (PHP 5.2+) class does the same but faster (+performance boost)
- renamed function "fputcsv2" into "kUtil::fputcsv" static method
- moved "request_headers" function to "kMainTagProcessor::_requestHeaders" hidden method, since only use was discovered there
- not changed "parse_ini_string" function because of it will be available since PHP 5.3 anyway
- not changed "memory_get_usage" function to handle cases, when PHP was compiled without memory usage tracking capabilities
- not changed "imagecreatefrombmp" because of someday GD could also have such a function
- all useless calls to "safeDefine" function replaced with calls to "define" function
- removed "getmicrotime" function definition from "globals.php", since it is declared in every main php file (e.g. index.php, cron.php, etc.)

-----
Other
-----
- formatting changed in some PHP files (initial tabbed column removed)
- changed Status field display on "agent editing form" from dropdown to radio buttons (since it only has 2 values)
- removed "view menu" filters, which duplicated grid column filters (from 5.1.1)
- moved "per_page" setting to template from unit config for "Search Config" sections
- merged notable changes from "curl_post" function to "kCurlHelper" class (e.g. skip SSL certificate checking)
- replaced "curl_post" function usage with "kCurlHelper" class usage
- removed "curl_post" function, since it's deprecated
- replaced "array_merge_recursive2" function usage with "array_merge" function usage, when only one-dimensional arrays were used (+performance boost)
- introduced exception throwing/handling model (in both Debugger and kApplication classes)
- replaced user fatal errors triggering with exception throwing
- renamed email event related constants to have "EmailEvent::" prefix in their name
- added "kiCacheable" interface to indicate, that class can provide data to be stored/retrieved to unit config cache (uses "Keeper" pattern)
- removed "kApplication::Application" property from "kApplication" class (prevents recursion, when object data is displayed using "debug_backtrace" function)
- removed duplicate installed module loading query from "kApplication::refreshModuleInfo" method
- database query from "kApplication::refreshModuleInfo" method marked as cacheable
- used "$this->Application->EventManager" reference instead of using "kApplication::recallObject" to retrieve it
- removed duplication SERVER_NAME constant declaration from "kApplication::SetDefaultConstants" method
- database query from "kApplication::ConfigValue" method marked as cacheable
- renamed parameters of "kApplication::HandleEvent" method to conform with naming standards
- refactored "kApplication::registerHook" method to have 4 parameters (2 of them are optional) instead of 8 required parameters
- added automatic call trace display in debugger, when user fatal error is triggered or exception is thrown
- simplified code of "kApplication::handleError" method
- removed unused "kApplication::reportError" method
- duplicate code removed from "kApplication::GetTempName" method (now it uses "kApplication::GetTempTablePrefix" method)
- cached usage results of "kApplication::IsTempTable" function, because of regular usage
- implementation of kiCacheable interface added to kApplication class (cached data: configuration variables, replacement templates, rewrite listeners, installed modules)
- renamed change log related constants to ChangeLog::*
- renamed agent related constants to Agent::*
- renamed mailing list related constants to MailingList::*
- renamed user login process related constants to LoginResult::*
- renamed form submission related constants to SubmissionFormField::*
- changed declaration of kCatDBItem::NameCopy method to match parent class method declaration
- replaced duplicate code (classes: kCatDBEventHandler, ImageEventHandler) with "kSearchHelper::SetComplexFilter" method usage, which does the same
- renamed constructors of almost all classes into "__construct" (easier to call parent class constructor without knowing which of parent classes has overridden constructor)
- fixed non-resetable cache problem in "kCatDBTagProcessor::HasAdditionalImages" method (from 5.1.1)
- rewritten database connection error processing in kDBConnection class (from 5.1.1)
- replaced "..." html tags with "<strong>...</strong>" html tags in some error messages
- changed event status of "kDBEventHandler::OnViewFile" event to be "kEvent::erSTOP" instead of doing "exit;" at the end of event
- replaced "kDBTagProcessor::getObject" method usage to "kDBTagProcessor::GetList" method usage in "kDBTagProcessor::PerPage" method
- changed "TemplatesCache::CheckDir" method to stop processing, when it's unable to create at least one directory in requested path
- formatted database query in "kMainTagProcessor::RequireLogin" and "kMainTagProcessor::IsMember" methods
- fixed direct prefix/special change (not via kDBBase::Init method) in "kTagProcessor::ProcessParsedTag", "kTagProcessor::processAggregatedTag", "LanguagesTagProcessor::ListLanguages" and "kDBTagProcessor::PerPage" methods
- hidden "kHelper::prepareTagParams" method
- added implementation if kiCacheable interface in kArray class (cached data: tag aggregation mapping)
- removed unused "AdminTagProcessor::SetConst" method
- optimized "AgentEventHandler::OnRefreshAgents" method to load all agents information with one database query instead of one query per agent as before
- added "RunTime" (was missing) and "Status" (was commented out) columns to agent grid
- changed declaration of "CategoriesItem::NameCopy" method to match parent class method declaration
- improved menu cache rebuild (on admin login screen with missing memory cache; from 5.1.1)
- renamed XML_* constants to kXMLHelper::XML_*
- changed declaration of "LanguagesItem::Load" and "ThemeItem:Load" methods to match parent class method declaration
- "Custom" section in admin console made visible in debug mode only
- added constants for coupon, discount, product option, product inventory
- changed declaration of "FilesItem::Delete" method to match parent method declaration
- moved "add to cart" logic and "discount" calculation in order logic to new OrderCalculator and OrderManager classes
- changed declaration of "OrdersItem::GetErrorMsg" method to match parent method declaration
- removed undefined "$rootURL" global variable usage in "startup.php" file
- removed usage of missing "DomainDetect" configuration variable in module license processing code
- fixed "kApplication::setDBCache" now doesn't accept value by reference
- replaced "getmicrotime" function with "microtime(true)" function call
- changed login code during "Install Maintenace" to use UserHelper::loginUser directly, instead of calling u:OnLogin event
- changed licensing url to point to in-portal.com instead of intechnic.com website

(0003206)
alex   
2011-01-12 09:15   
(edited on: 2011-07-05 15:38)
- created class kCacheManager to hold all caching processing code
- moved configuration variable & phrase caching code to kCacheManager class
- moved unit config caching code from kUnitConfigReader class to kCacheManager class
- created kUrlManager class for all url building code
- moved url building code from kApplication class to kUrlManager class
- removed unused PhraseCache::GetCachedIds, PhraseCache::UpdateCache methods
- moved usage of kApplication::ConfigValue method from unit configs to event handlers
- moved kApplication::getFilename to kModRewriteHelper, since it's used only there


Test Plan for 2 previous commits:

- check upgrade from 4.0.1 to 5.2.0 (change database column of "text" type to be NULL, change path from "/kernel/" to "/system" in PageContent table on all languages, subject and body ML columns added to EmailMessage table, phrases from multiple languages merged into single-record-per-phrase basis)
- check curl requests in all payment gateways in In-Commerce

(0003583)
alex   
2011-07-05 11:32   
- ability to override every system class, that is retrieved via factory (e.g. kEventManager)
- all classes are created via kFactory class, so they can be overridden too
- system object, like kUnitConfigReader class object are no longer stored in kFactory class
- class registration in kApplication::RegisterDefaultClasses method rearranged into logical groups
- design patterns, noted in class/method comments, when applicatable
- unit config re-reading redesign by interface usage
(0004137)
alex   
2011-11-07 04:52   
What was done with url processing code:
1. all url building code was moved from kApplication to kUrlManager class
2. mod-rewrite/non-mod-rewrite code was split into kRewriteUrlProcessor and kPlainUrlProcessor classes
3. mod-rewrite parsing code was moved from kModRewriteHelper class into kRewriteUrlProcessor
4. non-mod-rewrite parsing code was moved from kHTTPQuery class into kPlainUrlProcessor class
(0004482)
alex   
2012-03-03 15:16   
Patches removing_references_in_events_core.patch & removing_references_in_events_modules.patch does:

1. added check for SimpleXML upon install
2. required version of PHP incremented to 5.3.2
3. removed "&" before $event function parameters
4. manual class file loading & class dependencies ('require_classes' parameter in unit config) replaced with autoloader
5. added ability to override factory class upon application initialization (for unit testing purposes)
6. display short debugger report inside toolbar (no need to scroll down the page)
7. don't run affiliate code during installation