In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
273 [In-Portal CMS] Optimization task always 2009-09-05 08:37 2010-05-11 02:59
alex  
alex  
normal  
closed 5.0.0  
fixed  
 
none 5.0.3-B1  
0
0000273: Get rid of ereg* functions usage, because they are slow and are deprecated since PHP 5.3
Get rid of ereg* functions usage, because they are slow and are deprecated since PHP 5.3
related to 0000236closed  (5.0.2)alex Don't use preg_replace for removing trailing words in strings 
patch 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100211-v1-CORE.patch (2,374) 2010-02-11 16:21
http://tracker.in-portal.org/file_download.php?file_id=286&type=bug
patch 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100211-v1-In-Commerce.patch (5,976) 2010-02-11 19:08
http://tracker.in-portal.org/file_download.php?file_id=288&type=bug
patch 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100314-v2-CORE.patch (2,618) 2010-03-14 23:00
http://tracker.in-portal.org/file_download.php?file_id=368&type=bug
patch 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100314-v2-In-Commerce.patch (5,906) 2010-03-15 00:10
http://tracker.in-portal.org/file_download.php?file_id=369&type=bug
patch 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100315-v3-CORE.patch (12,687) 2010-03-15 15:01
http://tracker.in-portal.org/file_download.php?file_id=370&type=bug
patch 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100315-v3-In-Commerce.patch (5,977) 2010-03-15 15:12
http://tracker.in-portal.org/file_download.php?file_id=371&type=bug
Issue History
2010-05-11 02:59 alex Note Added: 0002124
2010-05-11 02:59 alex Status resolved => closed
2010-03-17 12:54 alex Note Added: 0001680
2010-03-17 12:54 alex Status reviewed and tested => resolved
2010-03-17 12:54 alex Fixed in Version => 5.0.3-B1
2010-03-17 12:54 alex Resolution open => fixed
2010-03-17 12:54 alex Assigned To !COMMUNITY => alex
2010-03-17 12:54 alex Changeset attached 5.0.x r13263
2010-03-17 12:53 alex Changeset attached 5.0.x r13262
2010-03-17 12:52 alex Note Added: 0001679
2010-03-17 12:52 alex Status needs testing => reviewed and tested
2010-03-15 15:14 Dmitry Note Added: 0001611
2010-03-15 15:14 Dmitry Status needs work => needs testing
2010-03-15 15:12 Dmitry File Added: 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100315-v3-In-Commerce.patch
2010-03-15 15:01 Dmitry File Added: 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100315-v3-CORE.patch
2010-03-15 00:10 Dmitry File Added: 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100314-v2-In-Commerce.patch
2010-03-14 23:00 Dmitry File Added: 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100314-v2-CORE.patch
2010-03-12 02:57 alex Note Added: 0001576
2010-03-11 23:46 Dmitry Note Added: 0001567
2010-03-11 05:48 alex Note Edited: 0001550 bug_revision_view_page.php?bugnote_id=0001550#r401
2010-03-11 05:13 alex Note Added: 0001550
2010-03-11 05:13 alex Assigned To alex => !COMMUNITY
2010-03-11 05:13 alex Status needs testing => needs work
2010-02-26 16:53 Dmitry Developer => Dmitry
2010-02-11 19:12 Dmitry Time Estimate Removed 2 =>
2010-02-11 19:12 Dmitry Note Added: 0001478
2010-02-11 19:12 Dmitry Status active => needs testing
2010-02-11 19:08 Dmitry File Added: 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100211-v1-In-Commerce.patch
2010-02-11 19:08 Dmitry File Deleted: 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100211-v1-In-Commerce.patch
2010-02-11 19:06 Dmitry File Added: 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100211-v1-In-Commerce.patch
2010-02-11 16:21 Dmitry File Added: 273-Get_rid_of_ereg_functions_usage_because_slow_and_deprecated-Dmitry-20100211-v1-CORE.patch
2009-10-06 14:23 alex Type bug report => task
2009-10-06 13:58 alex Note Added: 0000826
2009-10-06 13:58 alex Target Version 5.0.2 => 5.0.3
2009-10-03 07:54 administrator Status needs work => active
2009-09-23 13:18 alex Time Estimate Added 2
2009-09-23 13:18 alex Note Added: 0000532
2009-09-20 15:11 alex Target Version 5.1.0 => 5.0.2
2009-09-15 12:21 alex Changeset attached 5.0.x r12510
2009-09-14 15:39 alex Relationship added related to 0000236
2009-09-07 01:23 alex Note Added: 0000406
2009-09-07 01:23 alex Status needs feedback => needs work
2009-09-05 18:54 Dmitry Target Version => 5.1.0
2009-09-05 16:31 Dmitry Note Added: 0000401
2009-09-05 16:31 Dmitry Assigned To => alex
2009-09-05 16:31 Dmitry Status active => needs feedback
2009-09-05 09:13 alex Note Added: 0000400
2009-09-05 09:12 alex Changeset attached 5.1.x r12456
2009-09-05 09:12 alex Changeset attached 5.1.x r12455
2009-09-05 09:12 alex Changeset attached 1.1.x r12454
2009-09-05 09:11 alex Changeset attached 5.1.x r12453
2009-09-05 08:59 alex Changeset attached 5.0.x r12452
2009-09-05 08:57 alex Changeset attached 5.0.x r12451
2009-09-05 08:39 alex Changeset attached 5.0.x r12450
2009-09-05 08:37 alex New Issue

Notes
(0000400)
alex   
2009-09-05 09:13   
There are still some places left with more complex regular expressions in kDateFormatter and other classes.
(0000401)
Dmitry   
2009-09-05 16:31   
Which Release we are doing this for? 5.0.1 or 5.1.0?
(0000406)
alex   
2009-09-07 01:23   
For now it's partially done for 5.0.x and what's done is merged to 5.1.x as you can see by commit log bellow.
(0000532)
alex   
2009-09-23 13:18   
Plan:
1. only left in order credit card and payment gateway response processing and in some places in fck editor.
(0000826)
alex   
2009-10-06 13:58   
Moving to 5.0.3 because of too much work. Also much of this is already done already.
(0001478)
Dmitry   
2010-02-11 19:12   
Patches attached - please review and test.

There might be some changes needed to regex - let me know.
(0001550)
alex   
2010-03-11 05:13   
(edited on: 2010-03-11 05:48)
Core patch for fck doesn't work, since you missed "(" and ")" while moving file extension regexp to constant. You should remove "$" from regexp and use it like (contant)$ where that contant is used. Verify, that you see proper file icons in fck file manager, since I'm seeing default icon for all files now.

In-commerce patch uses "str_ireplace" function which is for PHP5 only and in-commerce payment gateways will stop working on PHP4. Also why are you using case insensitive replace function, when you are replacing "." and ",", since they don't have case at all.

Also why you using "i" and "g" preg_* modifiers with regular expressions that doesn't have case sensitive characters in them. And there is not "g" modifier (see http://lv.php.net/manual/en/reference.pcre.pattern.modifiers.php).

Also you have lost part of regex during conversion to preg function in PhoneClean method.

Also there is special php function file extension detection and we should use regex or additional constants for that.

(0001567)
Dmitry   
2010-03-11 23:46   
Reminder sent to: alex

DID you mean:

Also there is special php function file extension detection and we should NOT use regex or additional constants for that?

instead of:

Also there is special php function file extension detection and we should use regex or additional constants for that.
(0001576)
alex   
2010-03-12 02:57   
That's probably what I meant to say: use special function instead of regex here.
(0001611)
Dmitry   
2010-03-15 15:14   
Redone both patches - please test v3 of the patches.

NOTES: in CORE patch there is a very minor fix for Images path in core/admin_templates/browser/frmresourceslist.tpl template
(0001679)
alex   
2010-03-17 12:52   
ok
(0001680)
alex   
2010-03-17 12:54   
Fix committed to 5.0.x branch. Commit Message:

1. Fixes 0000273: Get rid of ereg* functions usage, because they are slow and are deprecated since PHP 5.3
2. Commit on behalf of Dmitry.
(0002124)
alex   
2010-05-11 02:59   
Closing all tasks from released versions.