From dd9a14bafc75345241f236fac784df7a583a3e3a Mon Sep 17 00:00:00 2001 From: Edi Date: Thu, 19 Oct 2017 21:26:49 +0200 Subject: [PATCH 1/4] Fix language paginator --- bl-themes/log/php/home.php | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/bl-themes/log/php/home.php b/bl-themes/log/php/home.php index b364ecec..fe16daa4 100644 --- a/bl-themes/log/php/home.php +++ b/bl-themes/log/php/home.php @@ -70,15 +70,15 @@ \ No newline at end of file + + +
  • + + + + +
  • + + + From a68641b0fef892421718b4b9ddb89d6e4577ea25 Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Thu, 19 Oct 2017 21:53:58 +0200 Subject: [PATCH 2/4] Update en.json add missing "Read more" definintion --- bl-languages/en.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bl-languages/en.json b/bl-languages/en.json index 2fbf334d..8229bb23 100644 --- a/bl-languages/en.json +++ b/bl-languages/en.json @@ -232,5 +232,6 @@ "scheduled": "Scheduled", "this-token-is-similar-to-a-password-it-should-not-be-shared": "This token is similar to a password, it should not be shared.", "congratulations-you-have-successfully-installed-your-bludit": "Congratulations you have successfully installed your **Bludit**.", - "this-theme-may-not-be-supported-by-this-version-of-bludit": "This theme may not be supported by this version of Bludit" -} \ No newline at end of file + "this-theme-may-not-be-supported-by-this-version-of-bludit": "This theme may not be supported by this version of Bludit", + "read-more": "Read more" +} From 1290850800414941dbbef8318fbc0acf86894dca Mon Sep 17 00:00:00 2001 From: Max Kostikov Date: Thu, 19 Oct 2017 21:55:25 +0200 Subject: [PATCH 3/4] Update ru_RU.json add missing "Read more" definintion --- bl-languages/ru_RU.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bl-languages/ru_RU.json b/bl-languages/ru_RU.json index e192da82..64a6dc2c 100644 --- a/bl-languages/ru_RU.json +++ b/bl-languages/ru_RU.json @@ -231,5 +231,6 @@ "scheduled": "Запланировано", "this-token-is-similar-to-a-password-it-should-not-be-shared": "Этот токен похож на пароль, он не должен демонстрироваться.", "congratulations-you-have-successfully-installed-your-bludit": "Поздравляем! Вы успешно установили **Bludit**", - "this-theme-may-not-be-supported-by-this-version-of-bludit": "Эта тема может не поддерживаться текущей версией Bludit" + "this-theme-may-not-be-supported-by-this-version-of-bludit": "Эта тема может не поддерживаться текущей версией Bludit", + "read-more": "Далее" } From b089edfa5186038a5509c738149fb63e704a530f Mon Sep 17 00:00:00 2001 From: Diego Najar Date: Fri, 20 Oct 2017 20:34:22 +0200 Subject: [PATCH 4/4] Bug fixes: Static content as parents --- .gitignore | 3 ++- bl-kernel/dbpages.class.php | 6 +++--- bl-plugins/api/plugin.php | 40 +++++++++++++++++++------------------ 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index 26dd0e10..6d8587f9 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ bl-content/* bl-plugins/timemachine bl-plugins/remote-content -bl-kernel/bludit.pro.php \ No newline at end of file +bl-kernel/bludit.pro.php +bl-themes/docs diff --git a/bl-kernel/dbpages.class.php b/bl-kernel/dbpages.class.php index 7c4311d3..05355898 100644 --- a/bl-kernel/dbpages.class.php +++ b/bl-kernel/dbpages.class.php @@ -386,10 +386,10 @@ class dbPages extends dbJSON // Returns an array with all parents pages key, a parent page is not a child public function getParents() { - $db = $this->getPublishedDB(); - foreach($db as $key=>$fields) { + $db = $this->getPublishedDB() + $this->getStaticDB(); + foreach ($db as $key=>$fields) { // if the key has slash then is a child - if( Text::stringContains($key, '/') ) { + if (Text::stringContains($key, '/')) { unset($db[$key]); } } diff --git a/bl-plugins/api/plugin.php b/bl-plugins/api/plugin.php index d721dcbe..9e1de637 100644 --- a/bl-plugins/api/plugin.php +++ b/bl-plugins/api/plugin.php @@ -168,14 +168,14 @@ class pluginAPI extends Plugin { $inputs = $_GET; break; case "PUT": - $inputs = file_get_contents("php://input"); + $inputs = ''; break; default: $inputs = json_encode(array()); break; } - // Try to get raw data + // Try to get raw/json data if (empty($inputs)) { $inputs = file_get_contents('php://input'); } @@ -183,6 +183,25 @@ class pluginAPI extends Plugin { return $this->cleanInputs($inputs); } + // Returns an array with key=>value + // If the content is JSON is parsed to array + private function cleanInputs($inputs) + { + $tmp = array(); + if (is_array($inputs)) { + foreach ($inputs as $key=>$value) { + $tmp[$key] = Sanitize::html($value); + } + } elseif (is_string($inputs)) { + $tmp = json_decode($inputs, true); + if (json_last_error()!==JSON_ERROR_NONE) { + $tmp = array(); + } + } + + return $tmp; + } + private function getEndpointParameters($URI) { // ENDPOINT Parameters @@ -202,23 +221,6 @@ class pluginAPI extends Plugin { return $parameters; } - private function cleanInputs($inputs) - { - $tmp = array(); - if (is_array($inputs)) { - foreach ($inputs as $key=>$value) { - $tmp[$key] = Sanitize::html($value); - } - } elseif(is_string($inputs)) { - $tmp = json_decode($inputs, true); - if (json_last_error()!==JSON_ERROR_NONE) { - $tmp = array(); - } - } - - return $tmp; - } - private function response($code=200, $message='OK', $data=array()) { header('HTTP/1.1 '.$code.' '.$message);