shaarli / Shaarli

The personal, minimalist, super-fast, database free, bookmarking service - community repo
https://shaarli.readthedocs.io/
Other
3.45k stars 297 forks source link

Memo: code refactoring #324

Closed virtualtam closed 2 years ago

virtualtam commented 9 years ago

Motivation

Refactoring serves multiple purposes:

See also: #71, #95, #130

Tasks

Remove dead code

Date formatting

270 / #486 - Use DateTime to format dates and timestamps

Feed

273, #515 - use templates for Atom & RSS feeds

HTML generation

397 #560 - move PageBuilder to a proper file

Images

345 - Refactor thumbnail functions

687 - Use web-thumbnailer to retrieve thumbnails

Import & export

493, #607 - Netscape import

538 - Netscape export

Links

Shaarli utilities

372 - Introduce a Shaarli class to group install/compatibility/update checks

40 - Require write permissions only for relevant directories

396 - application: refactor the install form generation

Session & login management

1005 - Refactor session management utilities

587 - Improve IP ban file format

1008 - Refactor login / ban management

Utilities

437 - Logging: move logm() from index.php to application/Utils.php

800 - Fix a warning generated in return_bytes and refactor it

1122 - Replace logm() with a PSR-3 logger

Contributing

If there's a topic you'd like to work on, please say so in the comments or have a chat on Gitter before starting to code ;-)

Topics related to active issues will get extra attention.

I'll keep this issue updated as cleanup is progressing.

nicolasdanelon commented 9 years ago

@virtualtam I change the class name Auth (the idea came from Laravel) to Authentication but I have some doubt about the unit tests.. can you (or anybody) help with that?

virtualtam commented 9 years ago

Sure :)

Here is a suggestion for grouping and renaming existing methods into new Authentication and Session classes, acknowledging:

Authentication:

1008 - LoginManager:

1005 - Session:

Now regarding how to proceed (& split work into sub-tasks):

virtualtam commented 2 years ago

Closing as stale / obsolete.