Skip to content
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

refactoring manage mails. #287

Merged
merged 4 commits into from Apr 1, 2013
Merged

refactoring manage mails. #287

merged 4 commits into from Apr 1, 2013

Conversation

eurich
Copy link
Member

@eurich eurich commented Apr 1, 2013

This is a refactoring PR, purpose is to:

  • use private / public for methods
  • move the database queries from the controller to related subs file.

Please review carefully, I don't have a proper test system set up in order to test the mail queue functionality.

Note: This is just a sample, If you like it I can pick up and redisign other files too:)

Signed-off-by:Thorsten Eurich <thorsten@eurich.de>
Signed-off-by:Thorsten Eurich <thorsten@eurich.de>
Signed-off-by:Thorsten Eurich <thorsten@eurich.de>
Signed-off-by:Thorsten Eurich <thorsten@eurich.de>
@eurich
Copy link
Member Author

eurich commented Apr 1, 2013

fixed the issues, thank you for the review :)

list ($_GET['te']) = $smcFunc['db_fetch_row']($request);
$smcFunc['db_free_result']($request);
}
$_GET['te'] = list_getMailQueueSize();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the $_GET['te'] is used just here and in _pauseMailQueueClear, wouldn't be better to use a variable or something instead of assign it to a $_GET?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think that would be better, than to use $_GET directly. Specially with encapsulation of methods, it suits its purpose better if we don't break that encapsulation by superglobals

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@norv
Copy link
Contributor

norv commented Apr 1, 2013

Note: This is just a sample, If you like it I can pick up and redisign other files too:)

Of course, please feel free to! Better encapsulation and separation of concerns makes it for a much nicer code to play around with ;)
It gets also easier to spot bugs in.

norv added a commit that referenced this pull request Apr 1, 2013
@norv norv merged commit ea32c7c into elkarte:master Apr 1, 2013
@eurich eurich deleted the refactor_managemail branch April 2, 2013 02:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants