Last modified: 2009-06-25 00:42:01 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T19804, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 17804 - Please make EmailNotification members protected (was public)
Please make EmailNotification members protected (was public)
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Watchlist (Other open bugs)
1.15.x
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-05 16:53 UTC by Dan Barrett
Modified: 2009-06-25 00:42 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
Unless there's a very good reason to make a property 'private', they should all be 'protected'. (588 bytes, patch)
2009-03-05 16:53 UTC, Dan Barrett
Details

Description Dan Barrett 2009-03-05 16:53:00 UTC
In 1.13, in class EmailNotification (UserMailer.php), the members "subject" and "body" used to be public.  In 1.14, they suddenly became private, breaking some extensions that extend EmailNotification by subclassing.

Could you please either:

1. Make these members protected instead of private, so we can subclass EmailNotification properly?
2. Provide public set/get methods on these members?

Thank you.
Comment 1 Dan Barrett 2009-03-05 16:53:34 UTC
Created attachment 5891 [details]
Unless there's a very good reason to make a property 'private', they should all be 'protected'.
Comment 2 Mike Reall 2009-05-15 22:33:51 UTC
Comment on attachment 5891 [details]
Unless there's a very good reason to make a property 'private', they should all be 'protected'.

>*** UserMailer.php	Thu Mar  5 11:52:23 2009
>--- UserMailer-new.php	Thu Mar  5 11:53:09 2009
>***************
>*** 263,269 ****
>   *
>   */
>  class EmailNotification {
>! 	private $to, $subject, $body, $replyto, $from;
>  	private $user, $title, $timestamp, $summary, $minorEdit, $oldid, $composed_common, $editor;
>  	private $mailTargets = array();
>  
>--- 263,269 ----
>   *
>   */
>  class EmailNotification {
>! 	protected $to, $subject, $body, $replyto, $from;
>  	protected $user, $title, $timestamp, $summary, $minorEdit, $oldid, $composed_common, $editor;
>  	protected $mailTargets = array();
>
Comment 3 Chad H. 2009-06-25 00:42:01 UTC
Done in r52383.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links