diff --git a/app/post.class.php b/app/post.class.php
index 058c24c..d768e76 100644
--- a/app/post.class.php
+++ b/app/post.class.php
@@ -13,8 +13,8 @@ private static function parse_content($c){
// Highlight
if(Config::get("highlight")){
- $c = preg_replace_callback('/\[code(?:=([^\[]+))?\](.+?)(?:(?=\[\/code\]))\[\/code\]/m', function($m){
- return ''.htmlentities($m[2]).'
';
+ $c = preg_replace_callback('/\[code(?:=([^\[]+))?\]((.|\s)+?)(?:(?=\[\/code\]))\[\/code\]/m', function($m){
+ return ''.htmlentities(trim($m[2])).'
';
}, $c);
} else {
// Links
@@ -41,6 +41,7 @@ private static function parse_content($c){
private static function raw_data($raw_input){
$default_input = [
"text" => '',
+ "plain_text" => '',
"feeling" => '',
"persons" => '',
"location" => '',
@@ -121,7 +122,7 @@ public static function delete($r){
public static function edit_data($r){
self::login_protected();
- return DB::get_instance()->query("SELECT `plain_text` AS `text`, `feeling`, `persons`, `location`, `privacy`, `content_type`, `content` FROM `posts` WHERE `id` = ? AND `status` = 1", $r["id"])->first();
+ return DB::get_instance()->query("SELECT `plain_text`, `feeling`, `persons`, `location`, `privacy`, `content_type`, `content` FROM `posts` WHERE `id` = ? AND `status` = 1", $r["id"])->first();
}
public static function get_date($r){
diff --git a/config.ini b/config.ini
index 93c1845..2278d68 100644
--- a/config.ini
+++ b/config.ini
@@ -10,7 +10,7 @@ title = Blog
name = Max Musermann
pic_small = static/images/profile.jpg
pic_big = static/images/profile_big.jpg
-cover = static/images/cover.jpg
+;cover = static/images/cover.jpg
[language]
lang = en
@@ -24,6 +24,6 @@ pass = demo
[system]
system_name = blog
-version = 1.03
+version = 1.04
debug = true
logs = false
\ No newline at end of file
diff --git a/index.php b/index.php
index c3459e3..5e58286 100644
--- a/index.php
+++ b/index.php
@@ -31,7 +31,7 @@
}
$hours = '';
-for($h=0;$h<=60;$h++){
+for($h=0;$h<=24;$h++){
$hours .= sprintf('', $h, $h);
}
@@ -153,7 +153,10 @@