aboutsummaryrefslogtreecommitdiffstats
path: root/core
AgeCommit message (Collapse)AuthorFilesLines
2017-09-02Some code optimizations has been made in admin/index.php to prevent ↵Thomas Lange1-2/+2
duplicate definitions of the same SQL query. Additionally, the default database fetch mode was changed to FETCH_ASSOC.
2017-09-02An unnecessary "else" block in admin/auth.php was removed and spelling ↵Thomas Lange2-2/+2
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-08-10The SQL queries for the HTTP ETag header generation have been combined into ↵Thomas Lange1-11/+8
one single query. In addition, some meaningless code was removed.
2017-07-07The function "makeSlugURL" has been renamed to "generateSlug" because the ↵Thomas Lange2-3/+9
name was misleading because the function did not generate a complete URL, but only a partial string (the slug) for the final URL. By the way, some improvements were made to the code.
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).
2017-05-30 Several changes have been made in this commit, which together with the ↵v2.2Thomas Lange7-158/+82
previous commits result in version 2.2 [changed template parameters]: + Implemented [core]: A new method called "getAll" has been added to the "Attribute" class which now returns all attributes as key->value array. The first parameter can be an array with attribute names which shall be excluded from returning. + Optimization [core]: The function "generateItemData" has been renamed to "generateItemTemplateData" and has been restructured to use the new implemented method "getAll" from the "Attribute" class. + Optimization [core]: The function "generateNaviTemplate" has been added and the functions "generatePageNaviTemplate", "generatePostNaviTemplate" and "generateUserNaviTemplate" have been restructured to make use of the new "generateNaviTemplate" function to reduce duplicate code. + Optimization [core]: Several files within the admin directory has been optimized to use the new "getAll" method of the "Attribute" class. + Optimization [core]: Several code optimizations have been made to the "HTTP" class. + Optimization [admin template]: All occurences of $PAGE['ID'], $POST['ID'] and $USER['ID'] have been replaced with $PAGE['ATTR']['ID'], $POST['ATTR']['ID'] and $USER['ATTR']['ID'] to make it more consistent. You now have to use ['ATTR']['ID'] instead of ['ID'] in your templates to get the ID of an item! Template upgrade to version 2.2 (only for customized templates): SEARCH: ['ID'] REPLACE: ['ATTR']['ID']
2017-05-21Bugfixes: There were two problems with the internal sorting of items which ↵v2.1.2Thomas Lange1-4/+4
have been fixed. This results in version 2.1.2 (database update recommended): + Bugfix [core]: If the insertion date of a newly created item has been placed to a datetime in the past after which other items have already appeared, the sorting of the forward and backward functionality has been interrupted because the WHERE clause in the database query had the condition that the next item must have a higher ID and the previous item must have a lower ID than the current one. If this newly created item was the last one and the insertion date had been placed to a datetime in the past, no next item could be fetched because THIS is already the item with the highest ID and the correct sorting by time_insert for this item has stopped working. + Bugfix [core]: If one or more items had exactly the same insertion time, the items with the exact same time has been appeard within the overview list in an order which did not correspond to the insertion sequence. There were several ways to fix this problem, but this would result in more complicated database queries and more code. To fix the problem in the simplest way, the column "time_insert" now has a UNIQUE index to prevent two or more items from having the exactly same insertion time. Database update to version 2.1.2 (no existing data will be lost or changed): ALTER TABLE `page` ADD UNIQUE KEY `time_insert` (`time_insert`); ALTER TABLE `post` ADD UNIQUE KEY `time_insert` (`time_insert`); ALTER TABLE `user` ADD UNIQUE KEY `time_insert` (`time_insert`);
2017-05-17Explicit types for return values and function parameters added.Thomas Lange1-6/+6
2017-05-14Disable the automatic linking of URLs which are not explicitly wrapped ↵Thomas Lange1-0/+1
around "<" and ">" in markdown syntax.
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-05-05A significant increase in the response time has been achieved, since the ↵v2.1Thomas Lange4-7/+15
template parameters "$ITEM['BODY']['TEXT']" and "$ITEM['BODY']['HTML']" are now no longer strings but closures (anonymous functions). This means that the underlying logic, which parses the content or converts it into Markdown, is not executed until one of these parameters is really needed and called in the template (which maybe significantly increases the response time on a long list of items which not use one of those two parameters). This means that within templates you now have to call these parameters in the following way (note the brackets at the end, which represent a function call): <?=$ITEM['BODY']['TEXT']()?> <?=$ITEM['BODY']['HTML']()?> In the background, the anonymous functions are called and executes $Item->getBody() and $Item->getHTML() only when needed. Previously, $Item->getBody() and $Item->getHTML() were basically executed and the parsed content was passed to the template, regardless of whether these parameters are required in the template or not!
2017-05-01The "excerpt" function has been optimized.Thomas Lange1-0/+1
2017-04-29ItemFactory does not need to implement FactoryInterface because it is ↵Thomas Lange1-1/+1
already implemented in the parent Factory class.
2017-04-29Two changes have been made in this commit:Thomas Lange1-3/+6
+ The method "Item::getArguments" has been optimized and checks now the syntax of the argument names (only A-Z, a-z, 0-9 and underscores are allowed). + The admin template has been changed and displays now the used arguments of an item within the list.
2017-04-29The function "makeSlugURL" has been modified and optimized.Thomas Lange1-6/+10
2017-04-27Several changes have been made in this commit, which together with the ↵v2.0Thomas Lange5-2/+26
previous commits result in version 2.0 (database update required): + Implemented [core]: A new database field has been added to all tables to define optional "arguments" for a page, post or user through the content editor. These arguments will be parsed into key->value pairs and can be used within templates to do something special. Please read the wiki of this repository for further information about this new feature. + Bugfix [core]: The function "makeSlugURL" had not convert uppercase umlauts to lowercase because "strtolower" was used instead of the multibyte equivalent "mb_strtolower". + Optimization [core]: The first regular expression within the function "makeSlugURL" has been optimized (checking for uppercase characters at this point is unnecessary because $string is only lowercase). + Optimization [all templates]: Markup for the pagination.php has been simplified (a little bit). + Optimization [admin template]: The javascript for the arrow key navigation has been outsourced to the main.js file. + Optimization [admin template]: The javascript file will now be included with the "defer" attribute. + Optimization [standard template]: Some language variables have been changed. Database update to version 2.0 (no existing data will be lost or changed): ALTER TABLE `page` ADD `argv` VARCHAR(100) NULL DEFAULT NULL AFTER `body`; ALTER TABLE `post` ADD `argv` VARCHAR(100) NULL DEFAULT NULL AFTER `body`; ALTER TABLE `user` ADD `argv` VARCHAR(100) NULL DEFAULT NULL AFTER `body`;
2017-04-24Parameter type declaration changed to "Throwable" because this parameter can ↵Thomas Lange1-1/+1
also be an "Error" which is not a child of "Exception" but each type implements the interface "Throwable".
2017-04-24Nested function calls for generating the meta description are removed and a ↵Thomas Lange4-6/+17
function was added to perform this task.
2017-04-19Comments added and unnecessary "abs" function calls removed.Thomas Lange3-3/+12
2017-04-12The file "application.php" has been modified.Thomas Lange1-2/+1
2017-04-12Catch block for PDOException was modified.Thomas Lange1-2/+1
2017-04-12The function "set_exception_handler" was modified.Thomas Lange1-3/+2
2017-04-11The control structures "require_once" have been replaced by a simple ↵Thomas Lange2-5/+5
"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-11The system directory has been moved to a non-public directory. After the ↵v1.2Thomas Lange9-0/+691
commit e33c245d910e55b8cab407a03e669470509a705d, it is no longer necessary that the directory is publicly accessible via HTTP because all requests are running through the router.
2017-04-11Class "ExceptionHandler" has been removed and several files has been changed.Thomas Lange6-15/+7
2017-04-11Methods "error403" and "error404" has been added to the "Application" class; ↵Thomas Lange2-3/+18
several files has been changed.
2017-04-11Error pages for HTTP status code 403 and 404 moved to another location ↵Thomas Lange2-3/+2
(preparations for the next commits in which the system directory will be moved to a non-public directory).
2017-04-07Fixed inconsistency for return type declaration.Thomas Lange1-1/+1
2017-03-29Item exceptions now inherit "ExceptionHandler" to benefit from the ↵Thomas Lange3-3/+3
"defaultHandler" method.
2017-03-25HTTP response status "404 Not Found" was not sent if a route was not found.Thomas Lange1-0/+1
2017-03-10Several changes have been made in this commit, which together with the ↵v1.1Thomas Lange6-30/+144
previous commits result in version 1.1: + The rules for the Apache and nginx configuration have been changed and redirects now all requests to the index.php. + A router class has been added which now handles all requests that arrives at the application on the index.php. + Short-hand functions "PAGE", "POST" and "USER" for use in templates added to get specific item data by ID. + More language variables have been added to the core language.
2017-03-07Fixed wrong environment variable name.Thomas Lange1-2/+2
2017-03-04Factory method "buildBySlug" is now defined in the "ItemFactory" class.Thomas Lange4-14/+14
2017-03-04Use environment variable "REQUEST_SCHEME" instead of "HTTPS" to determine ↵Thomas Lange1-1/+1
the current used protocol.
2017-02-28Spelling mistakes corrected.Thomas Lange2-2/+2
2017-02-27Unnecessary code removed, comments modified and simple getter method added.Thomas Lange1-34/+8
2017-02-27Foreach loop was replaced by a single function called "extract".Thomas Lange1-3/+1
2017-02-26Incorrect comment corrected and function moved to another line.Thomas Lange1-7/+7
2017-02-24Initial commit.v1.0Thomas Lange33-0/+3538