aboutsummaryrefslogtreecommitdiffstats
path: root/core/include/page/list.php
AgeCommit message (Collapse)AuthorFilesLines
2021-07-24Use correct config option for redirect singlesThomas Lange1-1/+1
In addition to the last commit, use the correct configuration option in the code to check if single items should be redirected.
2021-07-02Add generic function to create pagination templateThomas Lange1-1/+3
This commit adds and uses the new function createPaginationTemplate to create the generic pagination template for various entity lists. This function replaces the many old confusing functions: * generateNaviTemplate * generatePageNaviTemplate * generatePostNaviTemplate * generateUserNaviTemplate * generateCategoryNaviTemplate * generateCategoryPostNaviTemplate
2021-06-22Implement new Repository and Entity classesThomas Lange1-15/+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-21Remove unnecessary $ItemTemplate variablesThomas Lange1-4/+1
2021-06-21Rename some template variablesThomas Lange1-2/+2
2021-06-21Rename "attr" method of Item class to "get"Thomas Lange1-1/+1
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-14Remove more redundant try/catch blocksThomas Lange1-37/+28
Remove all try/catch blocks where the exception handling did not differ from the exception handler already defined by "set_exception_handler".
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.
2018-02-14Add configuration option "$ITEM.SINGLE_REDIRECT"Thomas Lange1-1/+11
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/".
2017-04-19Comments added and unnecessary "abs" function calls removed.Thomas Lange1-1/+4
2017-04-11The system directory has been moved to a non-public directory. After the ↵v1.2Thomas Lange1-0/+65
commit e33c245d910e55b8cab407a03e669470509a705d, it is no longer necessary that the directory is publicly accessible via HTTP because all requests are running through the router.