aboutsummaryrefslogtreecommitdiffstats
path: root/core
AgeCommit message (Collapse)AuthorFilesLines
2021-06-17Merge branch 'master' into 'optimization'optimizationThomas Lange48-462/+479
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-04-01Use method "buildByAttribute" to create Item instances for item listingThomas Lange5-25/+23
This commit significantly reduces the number of database queries required to display a list of pages, posts or users. This could be achieved by using "SELECT * FROM […]" in combination with the new implemented factory method "buildByAttribute". Previously, the first database query returned an array of unique item IDs that were then passed to the factory method "build" within the "foreach" loop which caused the application to make an additional database query like "SELECT * FROM […] WHERE id = {current_id}" for every single item ID to get it's payload data. Since this commit, this additional query for every item is not necessary anymore.
2018-04-01Remove unused method "getSearchResultIDs" from Page and Post classThomas Lange2-35/+0
2018-04-01Replace method calls "getSearchResultIDs" with "getSearchResults"Thomas Lange1-4/+4
This commit replaces the method calls of "Item::getSearchResultIDs" with "Item::getSearchResults". In addition, the associated Item instances (Page or Post) are therefore now created with "Factory::buildByAttribute" instead of "Factory::build" (because "getSearchResults" returns an array of Attribute instances while "getSearchResultIDs" had returned an array of unique item IDs without attribute data).
2018-04-01Add method "getSearchResults" to Page and Post classThomas Lange2-0/+35
2018-04-01Add method "getUserAttribute" to Page and Post classThomas Lange2-0/+16
2018-04-01Add method "buildByAttribute" and use it in "buildBySlug"Thomas Lange1-1/+13
This commit adds the method "buildByAttribute" to the ItemFactory and is used from now within the method "buildBySlug" to create the Item instance.
2018-04-01Add possibility to create instance with Attribute as first parameterThomas Lange2-2/+13
2018-04-01Add method "getByField"Thomas Lange1-0/+17
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/".
2018-01-09Fix spelling mistake in commentsThomas Lange1-2/+2
2018-01-08Bugfix: Incorrect behavior of the "truncate" function in some circumstances:Thomas Lange1-2/+5
If the first word from $string was longer than $length characters, then the regular expression had not truncated the string at all (for example, a string with a total length of 2000 characters was displayed without any cut, but with the $replace string at the end). This bug has been reported by Markus Hackspacher (https://github.com/MarkusHackspacher).
2017-11-29The "cut" function has been optimized and renamed to "truncate". In ↵Thomas Lange1-7/+8
addition, the $replace parameter is now an empty string by default.
2017-11-28Bugfix: The "excerpt" function had returned a string with unnecessary ↵Thomas Lange1-2/+3
whitespace between the truncated text and the $replace string ("[…]") if the truncated text from the regular expression had contained whitespace at the end (before it was concatenated with $replace). This issue has been fixed by passing the truncated text directly after truncation to the "trim" function (before the truncated text is concatenated with $replace). In addition, the now unnecessary "trim" call within the "excerpt" function has been removed.
2017-11-24Fixed a spelling mistake in several comments:Thomas Lange2-4/+4
It's called "override" instead of "overwrite" in those contexts.
2017-11-13The default value for "PATHINFO.PROT" is now "https" if ↵Thomas Lange1-2/+2
$_SERVER['REQUEST_SCHEME'] is not defined (https://github.com/Nerdmind/Blog/issues/8). In addition, the default value for "PATHINFO.HOST" is now "localhost" if $_SERVER['HTTP_HOST'] is not defined.
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-24You can now access item data in the main.php template (the file which ↵Thomas Lange3-0/+14
contains the basic HTML framework) for pages, posts and users. This makes it possible to use the optional argument field in the content editor to add additional HTML <meta> tags (or something else) for a specific page, post or user if you implement this functionality into your template. The following snippet shows how you can access the item data in the main.php template and which parameters are defined for each type of item (currently, there are three types: PAGE, POST and USER): if(isset($TYPE)) { switch($TYPE) { case 'PAGE': # $PAGE and associated $USER is accessible var_dump($PAGE['ARGV']); break; case 'POST': # $POST and associated $USER is accessible var_dump($POST['ARGV']); break; case 'USER': # $USER is accessible var_dump($USER['ARGV']); break; default: # Nothing } }
2017-10-24Some comments have been updated, unnecessary whitespace at the end of some ↵Thomas Lange3-3/+6
files was removed and some missing PHP closing tags were added.
2017-10-23There was a tiny mistake in the previous commit which has been fixed.Thomas Lange1-1/+2
2017-10-23An overwrite mechanism for the application's configuration has been ↵Thomas Lange2-85/+65
implemented. This makes the configuration.php much cleaner and you only have to define configuration values if the default values doesn't satisfy you. In addition, it makes it easier to implement new configuration values to the core without the need, that the users have to update their personal configuration.php files manually.
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 Lange3-0/+38
administration area. In addition, some markup within the "/*/index.php" files of the admin template was re-formatted.
2017-09-15A tiny mistake in the german core translation has been fixed.Thomas Lange1-1/+1
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).