New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

$this->options in class_parser.php #880

Closed
Sama34 opened this Issue Jul 5, 2014 · 9 comments

Comments

Projects
None yet
4 participants
@Sama34
Contributor

Sama34 commented Jul 5, 2014

Currently in class_parser.php we use the $options array instead of $this->options which is preferable.

I have tested many plug-ins in the past and I doubt any will be affected by this change. MyBB itself shouldn't be.

Reference: http://community.mybb.com/thread-57997.html

@Sama34 Sama34 added this to the 1.8 Beta 3 milestone Jul 5, 2014

@Sama34 Sama34 self-assigned this Jul 5, 2014

Sama34 pushed a commit that referenced this issue Jul 5, 2014

@Sama34

This comment has been minimized.

Show comment
Hide comment
@Sama34

Sama34 Jul 5, 2014

Contributor
    /**
     * Options for this parsed message (Private - set by parse_message argument)
     *
     * @access public
     * @var array
     */
    public $options;

Is it me being bad at English or is there a mistake?

Also, any reason for the cache_mycode(), cache_smilies(), and cache_badwords() methods to remain private?

@mybb/developers

Contributor

Sama34 commented Jul 5, 2014

    /**
     * Options for this parsed message (Private - set by parse_message argument)
     *
     * @access public
     * @var array
     */
    public $options;

Is it me being bad at English or is there a mistake?

Also, any reason for the cache_mycode(), cache_smilies(), and cache_badwords() methods to remain private?

@mybb/developers

@euantorano

This comment has been minimized.

Show comment
Hide comment
@euantorano

euantorano Jul 6, 2014

Member

I asusme you are referencing the comment (Private - set by parse_message argument) when the parameter is actually public? If so, that's probably not a big deal - leave it public but change the comment. There may be plugins relying on it being public. I haven't seen any, but it's not a risk we can take.

Member

euantorano commented Jul 6, 2014

I asusme you are referencing the comment (Private - set by parse_message argument) when the parameter is actually public? If so, that's probably not a big deal - leave it public but change the comment. There may be plugins relying on it being public. I haven't seen any, but it's not a risk we can take.

@Sama34

This comment has been minimized.

Show comment
Hide comment
@Sama34

Sama34 Jul 6, 2014

Contributor

Yes I meant the comment, IIRC it was private and was changed at some point for that reason.

But is there any reason for the before mentioned methods to remain private? I can think of I least once where I tried to use those but couldn't.

Contributor

Sama34 commented Jul 6, 2014

Yes I meant the comment, IIRC it was private and was changed at some point for that reason.

But is there any reason for the before mentioned methods to remain private? I can think of I least once where I tried to use those but couldn't.

@euantorano

This comment has been minimized.

Show comment
Hide comment
@euantorano

euantorano Jul 6, 2014

Member

I don't see why making them public would hurt. If they could be useful outside the class, go ahead. There's no cost to doing it 😄

Member

euantorano commented Jul 6, 2014

I don't see why making them public would hurt. If they could be useful outside the class, go ahead. There's no cost to doing it 😄

@Sama34

This comment has been minimized.

Show comment
Hide comment
@Sama34

Sama34 Jul 10, 2014

Contributor

If no one objects I will make them public and then close this then.

Contributor

Sama34 commented Jul 10, 2014

If no one objects I will make them public and then close this then.

@JordanMussi

This comment has been minimized.

Show comment
Hide comment
@JordanMussi
Contributor

JordanMussi commented Jul 13, 2014

@Sama34

This comment has been minimized.

Show comment
Hide comment
@Sama34

Sama34 Jul 13, 2014

Contributor

I have been reading a little about the matter and I'm unsure whether we should make them public. That is why I'm waiting for some feedback. It is just three lines modifications so we can wait to the last day.

Contributor

Sama34 commented Jul 13, 2014

I have been reading a little about the matter and I'm unsure whether we should make them public. That is why I'm waiting for some feedback. It is just three lines modifications so we can wait to the last day.

@PirataNervo

This comment has been minimized.

Show comment
Hide comment
@PirataNervo

PirataNervo Jul 14, 2014

Contributor

There's nothing wrong with having public attributes, we're not following any OOP standard so we do whatever we think is best for the plugin developers :)

Contributor

PirataNervo commented Jul 14, 2014

There's nothing wrong with having public attributes, we're not following any OOP standard so we do whatever we think is best for the plugin developers :)

@Sama34 Sama34 added the fixed label Jul 16, 2014

Sama34 pushed a commit that referenced this issue Jul 16, 2014

@Sama34

This comment has been minimized.

Show comment
Hide comment
@Sama34

Sama34 Jul 16, 2014

Contributor

This should be now finished.

Contributor

Sama34 commented Jul 16, 2014

This should be now finished.

@Sama34 Sama34 closed this Jul 17, 2014

@JordanMussi JordanMussi removed the feedback label Jul 21, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment