Opened 14 years ago
Closed 14 years ago
#17064 closed defect (bug) (fixed)
Upgrade SquirrelMail POP3 class
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 3.2 | Priority: | normal |
Severity: | normal | Version: | 3.1 |
Component: | External Libraries | Keywords: | has-patch |
Focuses: | Cc: |
Description
I ran across this issue while looking into #16026 (removing ereg/eregi since it's deprecated in PHP 5.3). The SquirrelMail POP3 class we're using is 5 years old. The new version is NOT all that different, but upgrading WOULD remove all ereg/eregi usage.
Attachments (1)
Change History (8)
#3
@
14 years ago
- Milestone changed from Awaiting Review to 3.2
- Owner set to westi
- Status changed from new to assigned
#5
@
14 years ago
Something I'm curious about: It looks like SquirrelMail's POP3 class uses gettext (before and after this upgrade: _()
). It looks like gettext is optional. Should we be dropping _()
back into compat.php and put it back?
Note: See
TracTickets for help on using
tickets.
The code was taken straight from http://squirrelmail.org/docs/stable-code/__filesource/fsource_plugins_mail_fetch_pluginsmail_fetchclass.POP3.php.html
The main changes seem to be the replacement of ereg/eregi with preg_match, strpos, and stripos (for which they add a PHP4 compatibility bit at the end of the file...we could remove this if we so desire). They also switched to using
$line{0}
instead of$line[0]
to get the first character of a string, and combined two str_replace calls into one.All in all it looks to be a really clean drop-in that shouldn't hurt anything.