Age | Commit message (Collapse) | Author | Files | Lines |
|
This commit adds new Repository and Entity classes which are better
abstracted from the rest of the application. They dont know anymore
about configuration options or how to parse to HTML because this is
not the job for the ORM but for other parts of the application.
The previous commits were a preparation for this big change.
An entity now represents just a single record from a specific table
of the database – nothing more. The repositories job is it to fetch
or update records of the database and instantiate the entities.
Another problem that was solved is the high amount of database queries
that was needed before. For example, on the blogs home page first were
all 10 latest post IDs fetched from the database and then another query
was executed with "WHERE id = :id" for *each* single post?! ...
This problem is solved with the new repository classes; they now use a
single query to fetch and build the entities of the 10 latest posts.
This change also solves the problem with database queries spread across
the application and limits the exzessive use of try/catch blocks which
were used before. The new classes make the whole code much cleaner. :)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This commit replaces all calls to "$Item->getURL()" with calls to the
previously added "getEntityURL" method of the "Application" class.
|
|
This commit adds the method "getEntityURL" to the "Application" class.
This method takes an instance of "Item" as parameter and then builds
the absolute URL of the item from its attribute data.
|
|
|
|
|
|
This commit removes the ID form field, enlarges the title form field
and rearranges the other form fields in the grid layout.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This commit adds the directory core/db/migrations/ which contains all
migrations that were applied to the database since the first release.
|
|
This commit adds a new table called "migration" to the database which
will contain information used for database schema migrations.
The current schema version is 5 because 5 modifications (migrations)
have been applied to the database schema since the initial release.
|
|
Remove all try/catch blocks where the exception handling did not differ
from the exception handler already defined by "set_exception_handler".
|
|
Remove the redundant exception handler from core/application.php. The
exception handling in the catch block did not differ from the default
handler already defined by "set_exception_handler".
|
|
|
|
|
|
Introduce a new 1/2/3-column CSS grid layout in the administration area
for items on overview pages and in the search results. The column count
of the grid depends on the users viewport width.
In addition, the default value of the following configuration settings
has been changed to 12 because 12 can also be divided by 2 and 3 which
is useful for the 1/2/3-column grid layout.
ADMIN.PAGE.LIST_SIZE = 12
ADMIN.POST.LIST_SIZE = 12
|
|
|
|
Introduce the following configuration settings to make it possible to
use different settings for the number of displayed items and ordering
on the administration areas overview pages.
ADMIN.PAGE.LIST_SIZE
ADMIN.POST.LIST_SIZE
ADMIN.USER.LIST_SIZE
ADMIN.PAGE.LIST_SORT
ADMIN.POST.LIST_SORT
ADMIN.USER.LIST_SORT
|
|
This commit replaces the initial CSS flexbox layout for forms of the
admin theme with a more elegant approach called "grid layout". :)
Some interesting information:
https://www.w3schools.com/css/css_grid.asp
https://blog.logrocket.com/flexbox-vs-css-grid/
|
|
|
|
|
|
This commit removes the "getRandomValue" function. In addition, the
Application class now calls PHPs "random_bytes" function directly.
|
|
If a item has at least one Markdown image embedded in its content, show
this image within the <blockquote> tag in the item.php template files.
|
|
|
|
This commit changes the URL of the icon link in the admin theme. The
link now leads to the blogs home page instead of the admin dashboard.
|
|
This commit updates the Parsedown library to version 1.7.4. The patch to
prevent tab indentations in code blocks from being converted to spaces
is already applied here.
See: 78c5974cd34559d0130d8be509935e2c992cd9ca
|
|
|
|
In addition to the last commit, remove the unnecessary PHP closing tags from the end of the files and ensure that the files ending with an LF character.
|
|
Remove the unnecessary PHP closing tags and ensure that *all* text files ending with a LF character.
|