aboutsummaryrefslogtreecommitdiffstats
path: root/core
AgeCommit message (Collapse)AuthorFilesLines
2021-06-24Add configuration option MIGRATOR.ENABLEDThomas Lange1-1/+4
2021-06-24Return NULL instead of config string if unsetThomas Lange1-1/+1
2021-06-24Implement database schema MigratorThomas Lange4-0/+244
This commit implements the new database schema Migrator which keeps track of the on-disk schema and the schema used by the codebase. It tries to makes future database schema upgrades user-friendlier.
2021-06-24Remove migration for migration table (readme)Thomas Lange2-4/+1
This commit removes the migration number 5 which created the migration table. The initialization of the migration table will be implemented in the upcoming migration script by itself. Sorry! If you recently installed the application with a fresh database which contained the migration table, please manually set the schema_version to 4. It is recommended to only install a specific tag instead of the latest master branch unless you are a developer or know what you do. UPDATE migration SET schema_version = 4
2021-06-24Set Database attribute in Application classThomas Lange2-14/+13
2021-06-22Add missing static keywords and fix typosThomas Lange2-4/+4
2021-06-22Implement new Repository and Entity classesThomas Lange37-707/+822
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. :)
2021-06-21Remove unnecessary $ItemTemplate variablesThomas Lange5-16/+4
2021-06-21Rename some template variablesThomas Lange6-14/+14
2021-06-21Rename "attr" method of Item class to "get"Thomas Lange10-16/+16
2021-06-21Remove getArguments method from Item classThomas Lange1-20/+0
2021-06-21Use function parseArgumentsThomas Lange1-1/+1
2021-06-21Add function parseArgumentsThomas Lange1-0/+20
2021-06-21Remove unused methods from Item classThomas Lange1-50/+0
2021-06-21Use function getMarkdownImageURLsThomas Lange2-2/+2
2021-06-21Add function getMarkdownImageURLsThomas Lange1-0/+14
2021-06-21Use function parseEntityContentThomas Lange1-1/+1
2021-06-21Use function parseContentTagsThomas Lange1-1/+3
2021-06-21Add function parseEntityContentThomas Lange1-0/+32
2021-06-21Add function parseContentTagsThomas Lange1-0/+26
2021-06-21Remove getGUID methods from Item classesThomas Lange4-35/+0
2021-06-21Use function generatePseudoGUIDThomas Lange1-1/+1
2021-06-21Add function generatePseudoGUIDThomas Lange1-0/+22
2021-06-21Remove getURL methods from Item classesThomas Lange4-34/+0
2021-06-21Use getEntityURL method of Application classThomas Lange8-9/+9
This commit replaces all calls to "$Item->getURL()" with calls to the previously added "getEntityURL" method of the "Application" class.
2021-06-21Add method getEntityURL to Application classThomas Lange1-0/+20
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.
2021-06-20Call password_verify directly in login scriptThomas Lange1-7/+0
2021-06-19Remove unused variableThomas Lange1-1/+0
2021-06-19Rename CRUD methods of Attribute classThomas Lange1-3/+3
2021-06-17Pass configuration array directly to foreachThomas Lange1-8/+3
2021-06-17Move database.sql to core/db/Thomas Lange1-0/+86
2021-06-17Add migrations directoryThomas Lange5-0/+18
This commit adds the directory core/db/migrations/ which contains all migrations that were applied to the database since the first release.
2021-06-14Remove more redundant try/catch blocksThomas Lange9-352/+251
Remove all try/catch blocks where the exception handling did not differ from the exception handler already defined by "set_exception_handler".
2021-06-14Remove redundant try/catch blockThomas Lange1-12/+13
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".
2021-06-14Remove useless AttributeInterfaceThomas Lange2-7/+1
2021-06-13Use grid layout for items in administration areaThomas Lange1-2/+2
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
2021-06-13Add configuration settings (admin prefixes)Thomas Lange1-0/+14
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
2021-06-12Remove function "getRandomValue"Thomas Lange2-8/+1
This commit removes the "getRandomValue" function. In addition, the Application class now calls PHPs "random_bytes" function directly.
2021-05-20Update Parsedown library to version 1.7.4v2.4.3Thomas Lange1-5/+38
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
2020-12-31Remove PHP closing tags and add LF in "core/namespace/User/*"Thomas Lange4-4/+0
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.
2019-10-29Remove PHP closing tags and add LF to text filesThomas Lange37-37/+0
Remove the unnecessary PHP closing tags and ensure that *all* text files ending with a LF character.
2019-10-16Use strftime() with locale supportThomas Lange2-29/+6
This commit changes the parseDatetime() function to use strftime() with locale support to replace the day-and-month name related parts within the format string. The strftime() function uses the locale defined by the LC_TIME or LC_ALL environment variable which can be set with PHPs own setlocale() function within the configuration.php.
2019-04-26Rename "template" directory to "theme"Thomas Lange2-3/+3
This commit renames the "template" directory to "theme" because "theme" is the more correct term here.
2019-04-26Rename "standard" template to "default"Thomas Lange2-2/+2
2018-09-09Correct regex replace stringsThomas Lange1-2/+2
2018-09-09Use function "parseUnicodeEmoticons"Thomas Lange1-0/+1
We will now use this function (in addition to "parseEmoticons") to parse already UTF-8 encoded unicode emoticons (instead of the ASCII emoticons for which "parseEmoticons" is responsible) from the markdown content.
2018-09-09Add function "parseUnicodeEmoticons"Thomas Lange1-0/+14
This function wraps all the UTF-8 encoded emoticons (from "getUnicodeEmoticons") found in $string into a "span" element with a "title" attribute, which will contain the emoticon explanation text.
2018-09-09Add function "getUnicodeEmoticons"Thomas Lange1-0/+24
This function returns an associative array with the UTF-8 encoded emoticon character as key and the corresponding explanation text as value.
2018-03-29Update Parsedown library to version 1.7.1v2.4.2Thomas Lange2-24/+195
This commit updates the Parsedown library to the latest version 1.7.1. The patch to prevent that tab indentations in code blocks are being converted to spaces (see 78c5974cd34559d0130d8be509935e2c992cd9ca) is already applied here. In addition, the patch file itself is now shipped within the same directory where the Parsedown.php resides.
2018-02-14Add configuration option "$ITEM.SINGLE_REDIRECT"Thomas Lange4-3/+36
Each option can be set to "TRUE" or "FALSE" (the default value is "FALSE"). For example, if you only have one user and "USER.SINGLE_REDIRECT" is set to "TRUE", then requests to "/user/" will be automatically redirected to "/user/username/".