aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace
AgeCommit message (Collapse)AuthorFilesLines
2021-07-22Add user and category filter on post searchThomas Lange1-0/+10
Add a user and category filter option for the post search in the administration area. Filter on default theme is followed later.
2021-07-22Move repository search functionality into a traitThomas Lange4-99/+109
Move the methods for the search functionality of the abstract Repository class into a separate trait and use it in the Page and Post repository. The reason because of this is that only the Page and Post repositories having a search functionality, while the other repositories have not.
2021-07-22Add pagination for search resultsThomas Lange1-6/+18
Add pagination for search results in the admin and default theme.
2021-07-22Add LIMIT and OFFSET parameters for search methodThomas Lange1-3/+7
2021-07-22Do not redefine properties of Entity classThomas Lange4-12/+0
Do not redefine properties that are already defined in the Entity class.
2021-07-22Rename: Append "Repository" to repository classesThomas Lange5-18/+15
Rename the repository classes and append the name with "Repository" to prevent naming confusions with the entity classes.
2021-07-20Implement new *content functions* feature (readme)Thomas Lange2-0/+97
This commit implements a new feature called *content functions* that is similar but much more powerful than the already existing *content tags* which you may have already used (`{POST[1]}`, for example). You now can also add your own *content functions* to do some interesting things like embedding a YouTube video or other things to prevent typing repetitive lines of text or code in your entities content. Read the corresponding wiki page to learn more about this: https://github.com/Nerdmind/Blog/wiki/Content-functions
2021-07-20Rename and reorganize several "get count" methodsThomas Lange4-33/+42
2021-07-19Add and use new parser/transformer classesThomas Lange4-0/+146
Classes: * Parsers\ArgumentParser * Parsers\EmoticonParser * Parsers\MarkdownParser Interfaces: * Parsers\ParserInterface
2021-07-17Reduce the redundant mapping logic in repositoriesThomas Lange2-49/+33
Reduce the redundant mapping logic in the repository classes by using the new methods "fetchEntity" and "fetchEntities".
2021-07-11Modify parameter list for getAll methodThomas Lange1-3/+3
2021-07-11Reuse prepared statement in update methodThomas Lange1-4/+0
Reuse the already defined prepared statement in the update method of the Category repository instead of creating a new one.
2021-07-02Clarify comment in determineFallbackSchemaVersionThomas Lange1-1/+1
If the migration table does not yet exist, the user sits *either* at 0, 1, 2, 3 or 4; not *between* 0 and 4 (which would be 1, 2 or 3).
2021-07-01Add category system to categorize posts (readme)Thomas Lange5-6/+181
This commit implements a new category system to categorize posts. Each category can have an unlimited number of nested children categories. A single post don't necessarily need to be in a category, but it can. Each category can have a full content body like posts or pages, so you have enough space to describe the content of your categories. Please note that you need to have at least the following MySQL/MariaDB versions to use the category system, because it uses "WITH RECURSIVE" database queries, the so-called "Common-Table-Expressions (CTE)". MariaDB: 10.2.2 MySQL: 8.0 See: https://mariadb.com/kb/en/with/ See: https://dev.mysql.com/doc/refman/8.0/en/with.html
2021-07-01Update database schema for coming category systemThomas Lange1-1/+1
This commit updates the database schema and adds a new migration for the upcoming category system. Please note that you need to have at least the following MySQL/MariaDB versions to use the category system later: MariaDB: 10.2.2 MySQL: 8.0
2021-07-01Bugfix: Explicitly check for FALSE in MigratorThomas Lange1-1/+2
Explicitly check for boolean FALSE because the result can be string "0" when directly upgrading from release v1.0 which has schema version "0".
2021-07-01Update database schema: Make id columns unsignedThomas Lange1-1/+1
This commit updates the database schema and adds a new migration to modify the signed integer columns to make them unsigned.
2021-06-29Add WHERE filter option to getCount methodThomas Lange1-4/+23
2021-06-28Bugfix: Remove explicit parameter type intThomas Lange1-3/+3
2021-06-27Allow NULL value comparison in WHERE clauseThomas Lange1-2/+6
2021-06-25Fix wrong property name in Repository classThomas Lange1-2/+2
2021-06-25Reorganize namespacesThomas Lange11-27/+44
2021-06-24Return NULL instead of config string if unsetThomas Lange1-1/+1
2021-06-24Implement database schema MigratorThomas Lange2-0/+196
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-24Set Database attribute in Application classThomas Lange1-1/+13
2021-06-22Add missing static keywords and fix typosThomas Lange2-4/+4
2021-06-22Implement new Repository and Entity classesThomas Lange26-362/+480
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-21Rename "attr" method of Item class to "get"Thomas Lange2-4/+4
2021-06-21Remove getArguments method from Item classThomas Lange1-20/+0
2021-06-21Remove unused methods from Item classThomas Lange1-50/+0
2021-06-21Remove getGUID methods from Item classesThomas Lange4-35/+0
2021-06-21Remove getURL methods from Item classesThomas Lange4-34/+0
2021-06-21Use getEntityURL method of Application classThomas Lange1-1/+1
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-19Rename CRUD methods of Attribute classThomas Lange1-3/+3
2021-06-14Remove useless AttributeInterfaceThomas Lange2-7/+1
2021-06-12Remove function "getRandomValue"Thomas Lange1-1/+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 Lange23-23/+0
Remove the unnecessary PHP closing tags and ensure that *all* text files ending with a LF character.
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.
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-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.
2017-11-04The Parsedown library has been patched to prevent tab indentations from ↵Thomas Lange1-21/+10
being converted to spaces: For example, if you had used the markdown syntax for displaying source code in your post, Parsedown had replaced your semantically correct tab indentations with hard spaces. This behavior meant that the code that was displayed after parsing was no longer exactly the code you inserted into the content editor. If someone had copied source code from your post into his IDE, then your tab indentations were gone because of the spaces. That's why I hacked the Parsedown library and created a patch: https://github.com/erusev/parsedown/issues/508
2017-10-23The methods "setCookie" and "getCookie" have been added to the HTTP class.Thomas Lange1-0/+14
2017-10-22Implemented: A full-text search functionality for posts and pages in the ↵Thomas Lange1-0/+14
administration area. In addition, some markup within the "/*/index.php" files of the admin template was re-formatted.
2017-09-02An unnecessary "else" block in admin/auth.php was removed and spelling ↵Thomas Lange1-1/+1
mistakes and inconsistencies in some comments were corrected.
2017-08-11Several changes have been made in this commit, which together with the ↵v2.3Thomas Lange2-31/+37
previous commits result in version 2.3: + Optimization: Originally, the core and template languages were completely separated in the logic of the Language class and you had to use "$Language->text()" to get a core language string and "$Language->template()" to get a template language string. Since this commit, the core and template language strings are still located in different files, but you now have to use "$Language->text()" for core and template language strings both. Thus, you can now even overwrite a core language string from the language file of a template if the core language string does not satisfy you. + Deprecated: The method "$Language->template()" was marked as deprecated and will be removed in further versions (currently, it's just an alias for "$Language->text()"). Template upgrade to version 2.3 (only for customized templates): SEARCH: $Language->template REPLACE: $Language->text
2017-05-31Two changes have been made in this commit:Thomas Lange1-8/+8
+ Update [core]: Parsedown has been updated to version 1.6.2. + Optimization [admin template]: The markdown buttons have been placed directly above the content editor. + Optimization [admin template]: The content editor has been visually embellished (padding from the parent was removed).