In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
735 [In-Portal CMS] Optimization task N/A 2010-05-18 07:28 2010-07-22 15:06
alex  
alex  
normal  
closed 5.0.3  
fixed  
 
none 5.1.0-B1  
http://groups.google.com/group/in-portal-dev/browse_thread/thread/82a907b35b0d9285
0
0000735: Addressing (in code) users "root" and "Guest" using named constants
System users "root" (id = -1) and "Guest" (id = -2) are using in In-Portal since it's first version. Despite their popularity we always use their IDs in code and not thinking about creating named constants.

I say enough to mystic numbers and propose to create constants:

    * USER_ROOT - for "-1" value
    * USER_GUEST - for "-2" value

I've already did that and replaced all places, where I've found that magic numbers with proposed constants.
related to 0000704closed  (5.1.0)alex Improvements to "E-mail Template" editing 
patch user_constants_core.patch (31,830) 2010-05-18 07:28
http://tracker.in-portal.org/file_download.php?file_id=551&type=bug
patch user_constants_modules.patch (36,982) 2010-05-18 07:29
http://tracker.in-portal.org/file_download.php?file_id=552&type=bug
Issue History
2010-07-22 15:06 alex Note Added: 0002527
2010-07-22 15:06 alex Status resolved => closed
2010-05-19 02:33 alex Changeset attached 5.1.x r13581
2010-05-19 02:33 alex Note Added: 0002246
2010-05-19 02:33 alex Status reviewed and tested => resolved
2010-05-19 02:33 alex Fixed in Version => 5.1.0-B1
2010-05-19 02:33 alex Resolution open => fixed
2010-05-19 02:33 alex Assigned To !COMMUNITY => alex
2010-05-19 02:27 alex Changeset attached 5.1.x r13580
2010-05-19 02:26 alex Changeset attached 5.1.x r13579
2010-05-19 02:25 alex Changeset attached 5.1.x r13578
2010-05-19 02:24 alex Changeset attached 5.1.x r13577
2010-05-19 02:22 alex Changeset attached 5.1.x r13576
2010-05-19 02:21 alex Changeset attached 1.1.x r13575
2010-05-19 02:21 alex Summary Addressing (in code) users "root" and "Guest" using named contants => Addressing (in code) users "root" and "Guest" using named constants
2010-05-19 02:19 alex Reproducibility always => N/A
2010-05-18 22:29 Dmitry Note Added: 0002245
2010-05-18 22:29 Dmitry Status needs testing => reviewed and tested
2010-05-18 07:31 alex Assigned To => !COMMUNITY
2010-05-18 07:31 alex Developer => alex
2010-05-18 07:31 alex Status active => needs testing
2010-05-18 07:31 alex Reference => http://groups.google.com/group/in-portal-dev/browse_thread/thread/82a907b35b0d9285
2010-05-18 07:29 alex Relationship added related to 0000704
2010-05-18 07:29 alex File Added: user_constants_modules.patch
2010-05-18 07:28 alex New Issue
2010-05-18 07:28 alex File Added: user_constants_core.patch

Notes
(0002245)
Dmitry   
2010-05-18 22:29   
Tested good.
(0002246)
alex   
2010-05-19 02:33   
Fix committed to 5.1.x branch. Commit Message:

Fixes 0000735: Addressing (in code) users "root" and "Guest" using named constants
(0002527)
alex   
2010-07-22 15:06   
Closing, since 5.1.0 release has been released.