aboutsummaryrefslogtreecommitdiffstats
path: root/core/namespace/Application.php
AgeCommit message (Collapse)AuthorFilesLines
2021-08-04Move error page logic into the Application classThomas Lange1-4/+10
Move the logic for generating the error pages into the Application class to remove this ugly "require" call in the error403 and error404 methods.
2021-07-22Rename: Append "Repository" to repository classesThomas Lange1-2/+2
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 Lange1-0/+13
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-01Add category system to categorize posts (readme)Thomas Lange1-0/+10
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-06-25Reorganize namespacesThomas Lange1-6/+8
2021-06-24Return NULL instead of config string if unsetThomas Lange1-1/+1
2021-06-24Implement database schema MigratorThomas Lange1-0/+14
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 Lange1-3/+3
2021-06-22Implement new Repository and Entity classesThomas Lange1-4/+20
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 Lange1-3/+3
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-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.
2019-10-29Remove PHP closing tags and add LF to text filesThomas Lange1-1/+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 Lange1-2/+2
This commit renames the "template" directory to "theme" because "theme" is the more correct term here.
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 Lange1-1/+3
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-12Bugfix: If the database password is removed within the first "getDatabase" ↵Thomas Lange1-2/+0
call, it will prevent that a new connection can be enforced when calling "getDatabase(TRUE)" because the password was removed in the first call before and doesn't exist anymore (the database connection will fail because of an invalid connection password).
2017-05-12The method "getLanguage" has been restructured.Thomas Lange1-1/+4
2017-04-11The control structures "require_once" have been replaced by a simple ↵Thomas Lange1-2/+2
"require" (except within the 403.php and 404.php where it makes sense, because these files can be directly called or included).
2017-04-11Inconsistency in class method fixed.Thomas Lange1-1/+1
2017-04-11Return type declaration "void" added.Thomas Lange1-3/+3
2017-04-11Class "ExceptionHandler" has been removed and several files has been changed.Thomas Lange1-3/+3
2017-04-11Methods "error403" and "error404" has been added to the "Application" class; ↵Thomas Lange1-2/+17
several files has been changed.
2017-04-11Error pages for HTTP status code 403 and 404 moved to another location ↵Thomas Lange1-1/+1
(preparations for the next commits in which the system directory will be moved to a non-public directory).
2017-02-26Incorrect comment corrected and function moved to another line.Thomas Lange1-7/+7
2017-02-24Initial commit.v1.0Thomas Lange1-0/+148