Opened 3 years ago
Closed 14 months ago
#1487009 closed Feature Requests (fixed)
Inconsistent (global) function naming in PHP files
| Reported by: | alec | Owned by: | alec |
|---|---|---|---|
| Priority: | 5 | Milestone: | 0.9-beta |
| Component: | PHP backend | Version: | 0.4-stable |
| Severity: | normal | Keywords: | |
| Cc: |
Description
In main.inc and rcube_shared.inc function names have prefix rcmail_, rcube_ or rc_. This should be unified. Additionaly, functions that are using rcube_* objects should be moved from rcube_shared.inc to main.inc. Finally, some "real shared" functions are having rc_ prefix that should be removed, e.g. rc_detect_encoding.
Change History (6)
comment:1 Changed 3 years ago by thomasb
- Milestone changed from 0.5-beta to 0.6-beta
comment:2 Changed 2 years ago by alec
- Milestone changed from 0.6-beta to 0.7-beta
comment:3 Changed 21 months ago by alec
- Milestone changed from 0.7-beta to later
comment:4 Changed 17 months ago by alec
- Milestone changed from later to 0.8-beta
- Owner set to alec
Work started in devel-framework branch. Functions will be moved into a few separate classes, rcube_charset, rcube_ui, etc.
comment:5 Changed 15 months ago by alec
- Milestone changed from 0.8-rc to 0.9-beta
comment:6 Changed 14 months ago by alec
- Resolution set to fixed
- Status changed from new to closed
Branch merged into trunk.
Note: See
TracTickets for help on using
tickets.

The reason why we had functions named differently was the initial idea of building some library with common non-webmail-related functions. rcube_* are mostly utility functions and rcmail_* should be application-related functions. However, this is an ancient story and doesn't apply to the current situation.
I still think we could have stand-alone utility functions such as rc_wordwrap(), rc_detect_encoding() named with this short prefix and located in an extra file. Maybe utils.php?